@antistatique/leckerli 1.0.7 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +51 -0
- package/dist/assets/leckerli.min.js +4 -3
- package/package.json +3 -1
- package/src/components/Banner.tsx +56 -18
- package/src/hooks/useSettings.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.1.0] - 2023-07-19
|
|
10
|
+
### Added
|
|
11
|
+
- Add classes to override default banner style
|
|
12
|
+
- Add cookie expires property and possiblity to override it
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Ensure title, description and customise btn are optionnal elements
|
|
16
|
+
- Ensure description can contains whitelisted HTML
|
|
17
|
+
|
|
9
18
|
## [1.0.7] - 2023-06-29
|
|
10
19
|
### Changed
|
|
11
20
|
- Settings scrollbar
|
package/README.md
CHANGED
|
@@ -73,6 +73,10 @@ It's the `name` of your cookie.
|
|
|
73
73
|
|
|
74
74
|
It's the `domain` of your cookie, by default the current website (`window.location.hostname`).
|
|
75
75
|
|
|
76
|
+
### expires
|
|
77
|
+
|
|
78
|
+
It's the `expires` of your cookie, by default it is set for a month from the current day. It should be either a Date or a number.
|
|
79
|
+
|
|
76
80
|
### banner
|
|
77
81
|
|
|
78
82
|
`banner` is an object with the text content to override. By default:
|
|
@@ -92,6 +96,31 @@ window.leckerliSettings = {
|
|
|
92
96
|
}
|
|
93
97
|
```
|
|
94
98
|
|
|
99
|
+
if the `title` or `description` are not provided, it won't be shown.
|
|
100
|
+
|
|
101
|
+
The `description` can contain markup in a restricted way: only the following tags are allowed:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
const allowedTags = [
|
|
105
|
+
'b',
|
|
106
|
+
'i',
|
|
107
|
+
'em',
|
|
108
|
+
'strong',
|
|
109
|
+
'p',
|
|
110
|
+
'ul',
|
|
111
|
+
'li',
|
|
112
|
+
'ol',
|
|
113
|
+
'span',
|
|
114
|
+
'h2',
|
|
115
|
+
'h3',
|
|
116
|
+
'h4',
|
|
117
|
+
'h5',
|
|
118
|
+
'h6',
|
|
119
|
+
'a',
|
|
120
|
+
'div',
|
|
121
|
+
]
|
|
122
|
+
```
|
|
123
|
+
|
|
95
124
|
### permissions
|
|
96
125
|
|
|
97
126
|
The core of Leckerli, it's all the `permissions` that you want to manage. By default:
|
|
@@ -110,6 +139,16 @@ window.leckerliSettings = {
|
|
|
110
139
|
}
|
|
111
140
|
```
|
|
112
141
|
|
|
142
|
+
if the `permissions` setting is set to an empty array, the "customize" button won't be shown.
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
window.leckerliSettings = {
|
|
146
|
+
//...
|
|
147
|
+
permissions: [],
|
|
148
|
+
//...
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
113
152
|
### baseData
|
|
114
153
|
|
|
115
154
|
`baseData` is an object of any kind that **will be passed to the final cookie** as well. For example for store consent-id of some sort.
|
|
@@ -256,6 +295,18 @@ You can theme Leckerli with the following CSS custom properties (variables):
|
|
|
256
295
|
</style>
|
|
257
296
|
```
|
|
258
297
|
|
|
298
|
+
To override any other style, you can use the following classes:
|
|
299
|
+
|
|
300
|
+
| Class | Description |
|
|
301
|
+
| ----------------------- | ----------------------------------- |
|
|
302
|
+
| `.banner-wrapper` | Override the banner display style |
|
|
303
|
+
| `.banner-title` | Override the title style |
|
|
304
|
+
| `.banner-description` | Override the description style |
|
|
305
|
+
| `.banner-btns` | Override the buttons display style |
|
|
306
|
+
| `.banner-btn-customise` | Override the customize button style |
|
|
307
|
+
| `.banner-btn-accept` | Override the accept button style |
|
|
308
|
+
| `.banner-btn-reject` | Override the reject button style |
|
|
309
|
+
|
|
259
310
|
## 🧑💻 Contribute
|
|
260
311
|
|
|
261
312
|
To locally run the project:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const _ of o.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&r(_)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var V,a,Xe,R,Pe,et,fe,tt,X={},nt=[],Xt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,oe=Array.isArray;function $(e,t){for(var n in t)e[n]=t[n];return e}function rt(e){var t=e.parentNode;t&&t.removeChild(e)}function C(e,t,n){var r,i,o,_={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:_[o]=t[o];if(arguments.length>2&&(_.children=arguments.length>3?V.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)_[o]===void 0&&(_[o]=e.defaultProps[o]);return I(e,_,r,i,null)}function I(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Xe};return i==null&&a.vnode!=null&&a.vnode(o),o}function ot(){return{current:null}}function E(e){return e.children}function S(e,t){this.props=e,this.context=t}function F(e,t){if(t==null)return e.__?F(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?F(e):null}function it(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return it(e)}}function pe(e){(!e.__d&&(e.__d=!0)&&R.push(e)&&!ee.__r++||Pe!==a.debounceRendering)&&((Pe=a.debounceRendering)||et)(ee)}function ee(){var e,t,n,r,i,o,_,c;for(R.sort(fe);e=R.shift();)e.__d&&(t=R.length,r=void 0,i=void 0,_=(o=(n=e).__v).__e,(c=n.__P)&&(r=[],(i=$({},o)).__v=o.__v+1,ye(c,o,i,n.__n,c.ownerSVGElement!==void 0,o.__h!=null?[_]:null,r,_??F(o),o.__h),lt(r,o),o.__e!=_&&it(o)),R.length>t&&R.sort(fe));ee.__r=0}function ut(e,t,n,r,i,o,_,c,s,p){var u,h,f,l,d,w,g,b=r&&r.__k||nt,x=b.length;for(n.__k=[],u=0;u<t.length;u++)if((l=n.__k[u]=(l=t[u])==null||typeof l=="boolean"||typeof l=="function"?null:typeof l=="string"||typeof l=="number"||typeof l=="bigint"?I(null,l,null,null,l):oe(l)?I(E,{children:l},null,null,null):l.__b>0?I(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):l)!=null){if(l.__=n,l.__b=n.__b+1,(f=b[u])===null||f&&l.key==f.key&&l.type===f.type)b[u]=void 0;else for(h=0;h<x;h++){if((f=b[h])&&l.key==f.key&&l.type===f.type){b[h]=void 0;break}f=null}ye(e,l,f=f||X,i,o,_,c,s,p),d=l.__e,(h=l.ref)&&f.ref!=h&&(g||(g=[]),f.ref&&g.push(f.ref,null,l),g.push(h,l.__c||d,l)),d!=null?(w==null&&(w=d),typeof l.type=="function"&&l.__k===f.__k?l.__d=s=_t(l,s,e):s=ct(e,l,f,b,d,s),typeof n.type=="function"&&(n.__d=s)):s&&f.__e==s&&s.parentNode!=e&&(s=F(f))}for(n.__e=w,u=x;u--;)b[u]!=null&&(typeof n.type=="function"&&b[u].__e!=null&&b[u].__e==n.__d&&(n.__d=st(r).nextSibling),ft(b[u],b[u]));if(g)for(u=0;u<g.length;u++)at(g[u],g[++u],g[++u])}function _t(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t=typeof r.type=="function"?_t(r,t,n):ct(n,r,r,i,r.__e,t));return t}function P(e,t){return t=t||[],e==null||typeof e=="boolean"||(oe(e)?e.some(function(n){P(n,t)}):t.push(e)),t}function ct(e,t,n,r,i,o){var _,c,s;if(t.__d!==void 0)_=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),_=null;else{for(c=o,s=0;(c=c.nextSibling)&&s<r.length;s+=1)if(c==i)break e;e.insertBefore(i,o),_=o}return _!==void 0?_:i.nextSibling}function st(e){var t,n,r;if(e.type==null||typeof e.type=="string")return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=st(n)))return r}return null}function en(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||te(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||te(e,o,t[o],n[o],r)}function Oe(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Xt.test(t)?n:n+"px"}function te(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Oe(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Oe(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Re:De,o):e.removeEventListener(t,o?Re:De,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function De(e){return this.l[e.type+!1](a.event?a.event(e):e)}function Re(e){return this.l[e.type+!0](a.event?a.event(e):e)}function ye(e,t,n,r,i,o,_,c,s){var p,u,h,f,l,d,w,g,b,x,q,H,Ne,G,ce,k=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(s=n.__h,c=t.__e=n.__e,t.__h=null,o=[c]),(p=a.__b)&&p(t);try{e:if(typeof k=="function"){if(g=t.props,b=(p=k.contextType)&&r[p.__c],x=p?b?b.props.value:p.__:r,n.__c?w=(u=t.__c=n.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(g,x):(t.__c=u=new S(g,x),u.constructor=k,u.render=nn),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=x,u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),k.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=$({},u.__s)),$(u.__s,k.getDerivedStateFromProps(g,u.__s))),f=u.props,l=u.state,u.__v=t,h)k.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,x),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(g,u.__s,x)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(K){K&&(K.__=t)}),q=0;q<u._sb.length;q++)u.__h.push(u._sb[q]);u._sb=[],u.__h.length&&_.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,x),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,l,d)})}if(u.context=x,u.props=g,u.__P=e,H=a.__r,Ne=0,"prototype"in k&&k.prototype.render){for(u.state=u.__s,u.__d=!1,H&&H(t),p=u.render(u.props,u.state,u.context),G=0;G<u._sb.length;G++)u.__h.push(u._sb[G]);u._sb=[]}else do u.__d=!1,H&&H(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++Ne<25);u.state=u.__s,u.getChildContext!=null&&(r=$($({},r),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(d=u.getSnapshotBeforeUpdate(f,l)),ut(e,oe(ce=p!=null&&p.type===E&&p.key==null?p.props.children:p)?ce:[ce],t,n,r,i,o,_,c,s),u.base=t.__e,t.__h=null,u.__h.length&&_.push(u),w&&(u.__E=u.__=null),u.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=tn(n.__e,t,n,r,i,o,_,s);(p=a.diffed)&&p(t)}catch(K){t.__v=null,(s||o!=null)&&(t.__e=c,t.__h=!!s,o[o.indexOf(c)]=null),a.__e(K,t,n)}}function lt(e,t){a.__c&&a.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){a.__e(r,n.__v)}})}function tn(e,t,n,r,i,o,_,c){var s,p,u,h=n.props,f=t.props,l=t.type,d=0;if(l==="svg"&&(i=!0),o!=null){for(;d<o.length;d++)if((s=o[d])&&"setAttribute"in s==!!l&&(l?s.localName===l:s.nodeType===3)){e=s,o[d]=null;break}}if(e==null){if(l===null)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",l):document.createElement(l,f.is&&f),o=null,c=!1}if(l===null)h===f||c&&e.data===f||(e.data=f);else{if(o=o&&V.call(e.childNodes),p=(h=n.props||X).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!c){if(o!=null)for(h={},d=0;d<e.attributes.length;d++)h[e.attributes[d].name]=e.attributes[d].value;(u||p)&&(u&&(p&&u.__html==p.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(en(e,f,h,i,c),u)t.__k=[];else if(ut(e,oe(d=t.props.children)?d:[d],t,n,r,i&&l!=="foreignObject",o,_,o?o[0]:n.__k&&F(n,0),c),o!=null)for(d=o.length;d--;)o[d]!=null&&rt(o[d]);c||("value"in f&&(d=f.value)!==void 0&&(d!==e.value||l==="progress"&&!d||l==="option"&&d!==h.value)&&te(e,"value",d,h.value,!1),"checked"in f&&(d=f.checked)!==void 0&&d!==e.checked&&te(e,"checked",d,h.checked,!1))}return e}function at(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){a.__e(r,n)}}function ft(e,t,n){var r,i;if(a.unmount&&a.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||at(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){a.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&ft(r[i],t,n||typeof e.type!="function");n||e.__e==null||rt(e.__e),e.__=e.__e=e.__d=void 0}function nn(e,t,n){return this.constructor(e,n)}function L(e,t,n){var r,i,o;a.__&&a.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],ye(t,e=(!r&&n||t).__k=C(E,null,[e]),i||X,X,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?V.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),lt(o,e)}function pt(e,t){L(e,t,pt)}function rn(e,t,n){var r,i,o,_,c=$({},e.props);for(o in e.type&&e.type.defaultProps&&(_=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:c[o]=t[o]===void 0&&_!==void 0?_[o]:t[o];return arguments.length>2&&(c.children=arguments.length>3?V.call(arguments,2):n),I(e.type,c,r||e.key,i||e.ref,null)}function dt(e,t){var n={__c:t="__cC"+tt++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(_){this.props.value!==_.value&&i.some(function(c){c.__e=!0,pe(c)})},this.sub=function(_){i.push(_);var c=_.componentWillUnmount;_.componentWillUnmount=function(){i.splice(i.indexOf(_),1),c&&c.call(_)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}V=nt.slice,a={__e:function(e,t,n,r){for(var i,o,_;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),_=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),_=i.__d),_)return i.__E=i}catch(c){e=c}throw e}},Xe=0,S.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=$({},this.state),typeof e=="function"&&(e=e($({},n),this.props)),e&&$(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),pe(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),pe(this))},S.prototype.render=E,R=[],et=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fe=function(e,t){return e.__v.__b-t.__v.__b},ee.__r=0,tt=0;var O,m,se,Ue,j=0,ht=[],Z=[],Me=a.__b,Ae=a.__r,Le=a.diffed,je=a.__c,Te=a.unmount;function M(e,t){a.__h&&a.__h(m,e,j||t),j=0;var n=m.__H||(m.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Z}),n.__[e]}function B(e){return j=1,ge(kt,e)}function ge(e,t,n){var r=M(O++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):kt(void 0,t),function(c){var s=r.__N?r.__N[0]:r.__[0],p=r.t(s,c);s!==p&&(r.__N=[p,r.__[1]],r.__c.setState({}))}],r.__c=m,!m.u)){var i=function(c,s,p){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(f){return f.__c});if(u.every(function(f){return!f.__N}))return!o||o.call(this,c,s,p);var h=!1;return u.forEach(function(f){if(f.__N){var l=f.__[0];f.__=f.__N,f.__N=void 0,l!==f.__[0]&&(h=!0)}}),!(!h&&r.__c.props===c)&&(!o||o.call(this,c,s,p))};m.u=!0;var o=m.shouldComponentUpdate,_=m.componentWillUpdate;m.componentWillUpdate=function(c,s,p){if(this.__e){var u=o;o=void 0,i(c,s,p),o=u}_&&_.call(this,c,s,p)},m.shouldComponentUpdate=i}return r.__N||r.__}function ie(e,t){var n=M(O++,3);!a.__s&&ke(n.__H,t)&&(n.__=e,n.i=t,m.__H.__h.push(n))}function z(e,t){var n=M(O++,4);!a.__s&&ke(n.__H,t)&&(n.__=e,n.i=t,m.__h.push(n))}function mt(e){return j=5,ue(function(){return{current:e}},[])}function vt(e,t,n){j=6,z(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function ue(e,t){var n=M(O++,7);return ke(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function yt(e,t){return j=8,ue(function(){return e},t)}function gt(e){var t=m.context[e.__c],n=M(O++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(m)),t.props.value):e.__}function be(e,t){a.useDebugValue&&a.useDebugValue(t?t(e):e)}function on(e){var t=M(O++,10),n=B();return t.__=e,m.componentDidCatch||(m.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function bt(){var e=M(O++,11);if(!e.__){for(var t=m.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function un(){for(var e;e=ht.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Q),e.__H.__h.forEach(de),e.__H.__h=[]}catch(t){e.__H.__h=[],a.__e(t,e.__v)}}a.__b=function(e){m=null,Me&&Me(e)},a.__r=function(e){Ae&&Ae(e),O=0;var t=(m=e.__c).__H;t&&(se===m?(t.__h=[],m.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Z,n.__N=n.i=void 0})):(t.__h.forEach(Q),t.__h.forEach(de),t.__h=[],O=0)),se=m},a.diffed=function(e){Le&&Le(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ht.push(t)!==1&&Ue===a.requestAnimationFrame||((Ue=a.requestAnimationFrame)||_n)(un)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Z&&(n.__=n.__V),n.i=void 0,n.__V=Z})),se=m=null},a.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Q),n.__h=n.__h.filter(function(r){return!r.__||de(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],a.__e(r,n.__v)}}),je&&je(e,t)},a.unmount=function(e){Te&&Te(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Q(r)}catch(i){t=i}}),n.__H=void 0,t&&a.__e(t,n.__v))};var He=typeof requestAnimationFrame=="function";function _n(e){var t,n=function(){clearTimeout(r),He&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);He&&(t=requestAnimationFrame(n))}function Q(e){var t=m,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),m=t}function de(e){var t=m;e.__c=e.__(),m=t}function ke(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function kt(e,t){return typeof t=="function"?t(e):t}/*! js-cookie v3.0.5 | MIT */function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var cn={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function he(e,t){function n(i,o,_){if(!(typeof document>"u")){_=J({},t,_),typeof _.expires=="number"&&(_.expires=new Date(Date.now()+_.expires*864e5)),_.expires&&(_.expires=_.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var s in _)_[s]&&(c+="; "+s,_[s]!==!0&&(c+="="+_[s].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+c}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],_={},c=0;c<o.length;c++){var s=o[c].split("="),p=s.slice(1).join("=");try{var u=decodeURIComponent(s[0]);if(_[u]=e.read(p,u),i===u)break}catch{}}return i?_[i]:_}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",J({},o,{expires:-1}))},withAttributes:function(i){return he(this.converter,J({},this.attributes,i))},withConverter:function(i){return he(J({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var me=he(cn,{path:"/"});function y(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function N(e){return function t(n){return arguments.length===0||y(n)?t:e.apply(this,arguments)}}function D(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return y(n)?t:N(function(i){return e(n,i)});default:return y(n)&&y(r)?t:y(n)?N(function(i){return e(i,r)}):y(r)?N(function(i){return e(n,i)}):e(n,r)}}}function xt(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return y(n)?t:D(function(o,_){return e(n,o,_)});case 2:return y(n)&&y(r)?t:y(n)?D(function(o,_){return e(o,r,_)}):y(r)?D(function(o,_){return e(n,o,_)}):N(function(o){return e(n,r,o)});default:return y(n)&&y(r)&&y(i)?t:y(n)&&y(r)?D(function(o,_){return e(o,_,i)}):y(n)&&y(i)?D(function(o,_){return e(o,r,_)}):y(r)&&y(i)?D(function(o,_){return e(n,o,_)}):y(n)?N(function(o){return e(o,r,i)}):y(r)?N(function(o){return e(n,o,i)}):y(i)?N(function(o){return e(n,r,o)}):e(n,r,i)}}}function Y(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function Ie(e){return Object.prototype.toString.call(e)==="[object Object]"}var St=N(function(t){return t==null}),sn=N(function(t){return!St(t)});const xe=sn;var ln=xt(function(t,n,r){var i={},o;n=n||{},r=r||{};for(o in n)Y(o,n)&&(i[o]=Y(o,r)?t(o,n[o],r[o]):n[o]);for(o in r)Y(o,r)&&!Y(o,i)&&(i[o]=r[o]);return i}),an=xt(function e(t,n,r){return ln(function(i,o,_){return Ie(o)&&Ie(_)?e(t,o,_):t(i,o,_)},n,r)}),fn=D(function(t,n){return an(function(r,i,o){return o},t,n)});const pn=fn,We=e=>{let t;const n=new Set,r=(s,p)=>{const u=typeof s=="function"?s(t):s;if(!Object.is(u,t)){const h=t;t=p??typeof u!="object"?u:Object.assign({},t,u),n.forEach(f=>f(t,h))}},i=()=>t,c={setState:r,getState:i,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,c),c},dn=e=>e?We(e):We;function Ct(e,t){for(var n in t)e[n]=t[n];return e}function ve(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function le(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ne(e){this.props=e}function Et(e,t){function n(i){var o=this.props.ref,_=o==i.ref;return!_&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!_:ve(this.props,i)}function r(i){return this.shouldComponentUpdate=n,C(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ne.prototype=new S).isPureReactComponent=!0,ne.prototype.shouldComponentUpdate=function(e,t){return ve(this.props,e)||ve(this.state,t)};var Fe=a.__b;a.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Fe&&Fe(e)};var hn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function wt(e){function t(n){var r=Ct({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=hn,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ve=function(e,t){return e==null?null:P(P(e).map(t))},$t={map:Ve,forEach:Ve,count:function(e){return e?P(e).length:0},only:function(e){var t=P(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:P},mn=a.__e;a.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}mn(e,t,n,r)};var Be=a.unmount;function Nt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Ct({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Nt(r,t,n)})),e}function Pt(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Pt(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function W(){this.__u=0,this.t=null,this.__b=null}function Ot(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Dt(e){var t,n,r;function i(o){if(t||(t=e()).then(function(_){n=_.default||_},function(_){r=_}),r)throw r;if(!n)throw t;return C(n,o)}return i.displayName="Lazy",i.__f=!0,i}function A(){this.u=null,this.o=null}a.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Be&&Be(e)},(W.prototype=new S).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Ot(r.__v),o=!1,_=function(){o||(o=!0,n.__R=null,i?i(c):c())};n.__R=_;var c=function(){if(!--r.__u){if(r.state.__a){var p=r.state.__a;r.__v.__k[0]=Pt(p,p.__c.__P,p.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}},s=t.__h===!0;r.__u++||s||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(_,_)},W.prototype.componentWillUnmount=function(){this.t=[]},W.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Nt(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&C(E,null,e.fallback);return i&&(i.__h=null),[C(E,null,t.__a?null:e.children),i]};var ze=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function vn(e){return this.getChildContext=function(){return e.context},e.children}function yn(e){var t=this,n=e.i;t.componentWillUnmount=function(){L(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),L(C(vn,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Rt(e,t){var n=C(yn,{__v:e,i:t});return n.containerInfo=t,n}(A.prototype=new S).__a=function(e){var t=this,n=Ot(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),ze(t,e,r)):i()};n?n(o):o()}},A.prototype.render=function(e){this.u=null,this.o=new Map;var t=P(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},A.prototype.componentDidUpdate=A.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ze(e,n,t)})};var Ut=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,gn=/^(?: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]/,bn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,kn=/[A-Z0-9]/g,xn=typeof document<"u",Sn=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Mt(e,t,n){return t.__k==null&&(t.textContent=""),L(e,t),typeof n=="function"&&n(),e?e.__c:null}function At(e,t,n){return pt(e,t),typeof n=="function"&&n(),e?e.__c:null}S.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(S.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var qe=a.event;function Cn(){}function En(){return this.cancelBubble}function wn(){return this.defaultPrevented}a.event=function(e){return qe&&(e=qe(e)),e.persist=Cn,e.isPropagationStopped=En,e.isDefaultPrevented=wn,e.nativeEvent=e};var Se,$n={enumerable:!1,configurable:!0,get:function(){return this.class}},Ge=a.vnode;a.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var o in n){var _=n[o];if(!(o==="value"&&"defaultValue"in n&&_==null||xn&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var c=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&_===!0?_="":c==="ondoubleclick"?o="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||Sn(n.type)?c==="onfocus"?o="onfocusin":c==="onblur"?o="onfocusout":bn.test(o)?o=c:r.indexOf("-")===-1&&gn.test(o)?o=o.replace(kn,"-$&").toLowerCase():_===null&&(_=void 0):c=o="oninput",c==="oninput"&&i[o=c]&&(o="oninputCapture"),i[o]=_}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=P(n.children).forEach(function(s){s.props.selected=i.value.indexOf(s.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=P(n.children).forEach(function(s){s.props.selected=i.multiple?i.defaultValue.indexOf(s.props.value)!=-1:i.defaultValue==s.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",$n)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=Ut,Ge&&Ge(e)};var Ke=a.__r;a.__r=function(e){Ke&&Ke(e),Se=e.__c};var Je=a.diffed;a.diffed=function(e){Je&&Je(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Se=null};var Lt={ReactCurrentDispatcher:{current:{readContext:function(e){return Se.__n[e.__c].props.value}}}},Nn="17.0.2";function jt(e){return C.bind(null,e)}function Ce(e){return!!e&&e.$$typeof===Ut}function Tt(e){return Ce(e)?rn.apply(null,arguments):e}function Ht(e){return!!e.__k&&(L(null,e),!0)}function It(e){return e&&(e.base||e.nodeType===1&&e)||null}var Wt=function(e,t){return e(t)},Ft=function(e,t){return e(t)},Vt=E;function Ee(e){e()}function Bt(e){return e}function zt(){return[!1,Ee]}var qt=z;function Gt(e,t){var n=t(),r=B({h:{__:n,v:t}}),i=r[0].h,o=r[1];return z(function(){i.__=n,i.v=t,le(i.__,t())||o({h:i})},[e,n,t]),ie(function(){return le(i.__,i.v())||o({h:i}),e(function(){le(i.__,i.v())||o({h:i})})},[e]),n}var Pn={useState:B,useId:bt,useReducer:ge,useEffect:ie,useLayoutEffect:z,useInsertionEffect:qt,useTransition:zt,useDeferredValue:Bt,useSyncExternalStore:Gt,startTransition:Ee,useRef:mt,useImperativeHandle:vt,useMemo:ue,useCallback:yt,useContext:gt,useDebugValue:be,version:"17.0.2",Children:$t,render:Mt,hydrate:At,unmountComponentAtNode:Ht,createPortal:Rt,createElement:C,createContext:dt,createFactory:jt,cloneElement:Tt,createRef:ot,Fragment:E,isValidElement:Ce,findDOMNode:It,Component:S,PureComponent:ne,memo:Et,forwardRef:wt,flushSync:Ft,unstable_batchedUpdates:Wt,StrictMode:Vt,Suspense:W,SuspenseList:A,lazy:Dt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lt};const On=Object.freeze(Object.defineProperty({__proto__:null,Children:$t,Component:S,Fragment:E,PureComponent:ne,StrictMode:Vt,Suspense:W,SuspenseList:A,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lt,cloneElement:Tt,createContext:dt,createElement:C,createFactory:jt,createPortal:Rt,createRef:ot,default:Pn,findDOMNode:It,flushSync:Ft,forwardRef:wt,hydrate:At,isValidElement:Ce,lazy:Dt,memo:Et,render:Mt,startTransition:Ee,unmountComponentAtNode:Ht,unstable_batchedUpdates:Wt,useCallback:yt,useContext:gt,useDebugValue:be,useDeferredValue:Bt,useEffect:ie,useErrorBoundary:on,useId:bt,useImperativeHandle:vt,useInsertionEffect:qt,useLayoutEffect:z,useMemo:ue,useReducer:ge,useRef:mt,useState:B,useSyncExternalStore:Gt,useTransition:zt,version:Nn},Symbol.toStringTag,{value:"Module"}));function Dn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Rn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Kt={exports:{}},Jt={};const Yt=Rn(On);var Zt={exports:{}},Qt={};/**
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var xe,d,er,ae,hn,tr,kt,nr,Ve={},rr=[],vo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ze=Array.isArray;function J(e,t){for(var n in t)e[n]=t[n];return e}function or(e){var t=e.parentNode;t&&t.removeChild(e)}function Y(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?xe.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return we(e,s,r,i,null)}function we(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++er};return i==null&&d.vnode!=null&&d.vnode(o),o}function ir(){return{current:null}}function X(e){return e.children}function B(e,t){this.props=e,this.context=t}function Re(e,t){if(t==null)return e.__?Re(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Re(e):null}function ar(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return ar(e)}}function Ct(e){(!e.__d&&(e.__d=!0)&&ae.push(e)&&!qe.__r++||hn!==d.debounceRendering)&&((hn=d.debounceRendering)||tr)(qe)}function qe(){var e,t,n,r,i,o,s,u;for(ae.sort(kt);e=ae.shift();)e.__d&&(t=ae.length,r=void 0,i=void 0,s=(o=(n=e).__v).__e,(u=n.__P)&&(r=[],(i=J({},o)).__v=o.__v+1,Mt(u,o,i,n.__n,u.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s??Re(o),o.__h),_r(r,o),o.__e!=s&&ar(o)),ae.length>t&&ae.sort(kt));qe.__r=0}function sr(e,t,n,r,i,o,s,u,_,m){var l,E,y,p,v,W,S,N=r&&r.__k||rr,I=N.length;for(n.__k=[],l=0;l<t.length;l++)if((p=n.__k[l]=(p=t[l])==null||typeof p=="boolean"||typeof p=="function"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?we(null,p,null,null,p):Ze(p)?we(X,{children:p},null,null,null):p.__b>0?we(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(y=N[l])===null||y&&p.key==y.key&&p.type===y.type)N[l]=void 0;else for(E=0;E<I;E++){if((y=N[E])&&p.key==y.key&&p.type===y.type){N[E]=void 0;break}y=null}Mt(e,p,y=y||Ve,i,o,s,u,_,m),v=p.__e,(E=p.ref)&&y.ref!=E&&(S||(S=[]),y.ref&&S.push(y.ref,null,p),S.push(E,p.__c||v,p)),v!=null?(W==null&&(W=v),typeof p.type=="function"&&p.__k===y.__k?p.__d=_=lr(p,_,e):_=ur(e,p,y,N,v,_),typeof n.type=="function"&&(n.__d=_)):_&&y.__e==_&&_.parentNode!=e&&(_=Re(y))}for(n.__e=W,l=I;l--;)N[l]!=null&&(typeof n.type=="function"&&N[l].__e!=null&&N[l].__e==n.__d&&(n.__d=cr(r).nextSibling),pr(N[l],N[l]));if(S)for(l=0;l<S.length;l++)fr(S[l],S[++l],S[++l])}function lr(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t=typeof r.type=="function"?lr(r,t,n):ur(n,r,r,i,r.__e,t));return t}function Q(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ze(e)?e.some(function(n){Q(n,t)}):t.push(e)),t}function ur(e,t,n,r,i,o){var s,u,_;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),s=null;else{for(u=o,_=0;(u=u.nextSibling)&&_<r.length;_+=1)if(u==i)break e;e.insertBefore(i,o),s=o}return s!==void 0?s:i.nextSibling}function cr(e){var t,n,r;if(e.type==null||typeof e.type=="string")return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=cr(n)))return r}return null}function go(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||Ye(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||Ye(e,o,t[o],n[o],r)}function yn(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||vo.test(t)?n:n+"px"}function Ye(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||yn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||yn(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?gn:vn,o):e.removeEventListener(t,o?gn:vn,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function vn(e){return this.l[e.type+!1](d.event?d.event(e):e)}function gn(e){return this.l[e.type+!0](d.event?d.event(e):e)}function Mt(e,t,n,r,i,o,s,u,_){var m,l,E,y,p,v,W,S,N,I,w,j,ue,ce,Ae,P=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(_=n.__h,u=t.__e=n.__e,t.__h=null,o=[u]),(m=d.__b)&&m(t);try{e:if(typeof P=="function"){if(S=t.props,N=(m=P.contextType)&&r[m.__c],I=m?N?N.props.value:m.__:r,n.__c?W=(l=t.__c=n.__c).__=l.__E:("prototype"in P&&P.prototype.render?t.__c=l=new P(S,I):(t.__c=l=new B(S,I),l.constructor=P,l.render=bo),N&&N.sub(l),l.props=S,l.state||(l.state={}),l.context=I,l.__n=r,E=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),P.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=J({},l.__s)),J(l.__s,P.getDerivedStateFromProps(S,l.__s))),y=l.props,p=l.state,l.__v=t,E)P.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(P.getDerivedStateFromProps==null&&S!==y&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(S,I),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(S,l.__s,I)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(l.props=S,l.state=l.__s,l.__d=!1),l.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(_e){_e&&(_e.__=t)}),w=0;w<l._sb.length;w++)l.__h.push(l._sb[w]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(S,l.__s,I),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(y,p,v)})}if(l.context=I,l.props=S,l.__P=e,j=d.__r,ue=0,"prototype"in P&&P.prototype.render){for(l.state=l.__s,l.__d=!1,j&&j(t),m=l.render(l.props,l.state,l.context),ce=0;ce<l._sb.length;ce++)l.__h.push(l._sb[ce]);l._sb=[]}else do l.__d=!1,j&&j(t),m=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++ue<25);l.state=l.__s,l.getChildContext!=null&&(r=J(J({},r),l.getChildContext())),E||l.getSnapshotBeforeUpdate==null||(v=l.getSnapshotBeforeUpdate(y,p)),sr(e,Ze(Ae=m!=null&&m.type===X&&m.key==null?m.props.children:m)?Ae:[Ae],t,n,r,i,o,s,u,_),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),W&&(l.__E=l.__=null),l.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Eo(n.__e,t,n,r,i,o,s,_);(m=d.diffed)&&m(t)}catch(_e){t.__v=null,(_||o!=null)&&(t.__e=u,t.__h=!!_,o[o.indexOf(u)]=null),d.__e(_e,t,n)}}function _r(e,t){d.__c&&d.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){d.__e(r,n.__v)}})}function Eo(e,t,n,r,i,o,s,u){var _,m,l,E=n.props,y=t.props,p=t.type,v=0;if(p==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((_=o[v])&&"setAttribute"in _==!!p&&(p?_.localName===p:_.nodeType===3)){e=_,o[v]=null;break}}if(e==null){if(p===null)return document.createTextNode(y);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,y.is&&y),o=null,u=!1}if(p===null)E===y||u&&e.data===y||(e.data=y);else{if(o=o&&xe.call(e.childNodes),m=(E=n.props||Ve).dangerouslySetInnerHTML,l=y.dangerouslySetInnerHTML,!u){if(o!=null)for(E={},v=0;v<e.attributes.length;v++)E[e.attributes[v].name]=e.attributes[v].value;(l||m)&&(l&&(m&&l.__html==m.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(go(e,y,E,i,u),l)t.__k=[];else if(sr(e,Ze(v=t.props.children)?v:[v],t,n,r,i&&p!=="foreignObject",o,s,o?o[0]:n.__k&&Re(n,0),u),o!=null)for(v=o.length;v--;)o[v]!=null&&or(o[v]);u||("value"in y&&(v=y.value)!==void 0&&(v!==e.value||p==="progress"&&!v||p==="option"&&v!==E.value)&&Ye(e,"value",v,E.value,!1),"checked"in y&&(v=y.checked)!==void 0&&v!==e.checked&&Ye(e,"checked",v,E.checked,!1))}return e}function fr(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){d.__e(r,n)}}function pr(e,t,n){var r,i;if(d.unmount&&d.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||fr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){d.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&pr(r[i],t,n||typeof e.type!="function");n||e.__e==null||or(e.__e),e.__=e.__e=e.__d=void 0}function bo(e,t,n){return this.constructor(e,n)}function Ee(e,t,n){var r,i,o;d.__&&d.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],Mt(t,e=(!r&&n||t).__k=Y(X,null,[e]),i||Ve,Ve,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?xe.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),_r(o,e)}function dr(e,t){Ee(e,t,dr)}function To(e,t,n){var r,i,o,s,u=J({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:u[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(u.children=arguments.length>3?xe.call(arguments,2):n),we(e.type,u,r||e.key,i||e.ref,null)}function mr(e,t){var n={__c:t="__cC"+nr++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(u){u.__e=!0,Ct(u)})},this.sub=function(s){i.push(s);var u=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),u&&u.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}xe=rr.slice,d={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(u){e=u}throw e}},er=0,B.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=J({},this.state),typeof e=="function"&&(e=e(J({},n),this.props)),e&&J(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ct(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ct(this))},B.prototype.render=X,ae=[],tr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kt=function(e,t){return e.__v.__b-t.__v.__b},qe.__r=0,nr=0;var ee,T,ht,En,be=0,hr=[],ze=[],bn=d.__b,Tn=d.__r,An=d.diffed,Sn=d.__c,kn=d.unmount;function le(e,t){d.__h&&d.__h(T,e,be||t),be=0;var n=T.__H||(T.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ze}),n.__[e]}function De(e){return be=1,Pt(Tr,e)}function Pt(e,t,n){var r=le(ee++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Tr(void 0,t),function(u){var _=r.__N?r.__N[0]:r.__[0],m=r.t(_,u);_!==m&&(r.__N=[m,r.__[1]],r.__c.setState({}))}],r.__c=T,!T.u)){var i=function(u,_,m){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(y){return y.__c});if(l.every(function(y){return!y.__N}))return!o||o.call(this,u,_,m);var E=!1;return l.forEach(function(y){if(y.__N){var p=y.__[0];y.__=y.__N,y.__N=void 0,p!==y.__[0]&&(E=!0)}}),!(!E&&r.__c.props===u)&&(!o||o.call(this,u,_,m))};T.u=!0;var o=T.shouldComponentUpdate,s=T.componentWillUpdate;T.componentWillUpdate=function(u,_,m){if(this.__e){var l=o;o=void 0,i(u,_,m),o=l}s&&s.call(this,u,_,m)},T.shouldComponentUpdate=i}return r.__N||r.__}function Je(e,t){var n=le(ee++,3);!d.__s&&$t(n.__H,t)&&(n.__=e,n.i=t,T.__H.__h.push(n))}function Le(e,t){var n=le(ee++,4);!d.__s&&$t(n.__H,t)&&(n.__=e,n.i=t,T.__h.push(n))}function yr(e){return be=5,Qe(function(){return{current:e}},[])}function vr(e,t,n){be=6,Le(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Qe(e,t){var n=le(ee++,7);return $t(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function gr(e,t){return be=8,Qe(function(){return e},t)}function Er(e){var t=T.context[e.__c],n=le(ee++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(T)),t.props.value):e.__}function Ut(e,t){d.useDebugValue&&d.useDebugValue(t?t(e):e)}function Ao(e){var t=le(ee++,10),n=De();return t.__=e,T.componentDidCatch||(T.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function br(){var e=le(ee++,11);if(!e.__){for(var t=T.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function So(){for(var e;e=hr.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Be),e.__H.__h.forEach(Ot),e.__H.__h=[]}catch(t){e.__H.__h=[],d.__e(t,e.__v)}}d.__b=function(e){T=null,bn&&bn(e)},d.__r=function(e){Tn&&Tn(e),ee=0;var t=(T=e.__c).__H;t&&(ht===T?(t.__h=[],T.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=ze,n.__N=n.i=void 0})):(t.__h.forEach(Be),t.__h.forEach(Ot),t.__h=[],ee=0)),ht=T},d.diffed=function(e){An&&An(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(hr.push(t)!==1&&En===d.requestAnimationFrame||((En=d.requestAnimationFrame)||ko)(So)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==ze&&(n.__=n.__V),n.i=void 0,n.__V=ze})),ht=T=null},d.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Be),n.__h=n.__h.filter(function(r){return!r.__||Ot(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],d.__e(r,n.__v)}}),Sn&&Sn(e,t)},d.unmount=function(e){kn&&kn(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Be(r)}catch(i){t=i}}),n.__H=void 0,t&&d.__e(t,n.__v))};var Cn=typeof requestAnimationFrame=="function";function ko(e){var t,n=function(){clearTimeout(r),Cn&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Cn&&(t=requestAnimationFrame(n))}function Be(e){var t=T,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),T=t}function Ot(e){var t=T;e.__c=e.__(),T=t}function $t(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Tr(e,t){return typeof t=="function"?t(e):t}/*! js-cookie v3.0.5 | MIT */function He(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Co={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function wt(e,t){function n(i,o,s){if(!(typeof document>"u")){s=He({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var _ in s)s[_]&&(u+="; "+_,s[_]!==!0&&(u+="="+s[_].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+u}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},u=0;u<o.length;u++){var _=o[u].split("="),m=_.slice(1).join("=");try{var l=decodeURIComponent(_[0]);if(s[l]=e.read(m,l),i===l)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",He({},o,{expires:-1}))},withAttributes:function(i){return wt(this.converter,He({},this.attributes,i))},withConverter:function(i){return wt(He({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Nt=wt(Co,{path:"/"});function C(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function U(e){return function t(n){return arguments.length===0||C(n)?t:e.apply(this,arguments)}}function te(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return C(n)?t:U(function(i){return e(n,i)});default:return C(n)&&C(r)?t:C(n)?U(function(i){return e(i,r)}):C(r)?U(function(i){return e(n,i)}):e(n,r)}}}function Ar(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return C(n)?t:te(function(o,s){return e(n,o,s)});case 2:return C(n)&&C(r)?t:C(n)?te(function(o,s){return e(o,r,s)}):C(r)?te(function(o,s){return e(n,o,s)}):U(function(o){return e(n,r,o)});default:return C(n)&&C(r)&&C(i)?t:C(n)&&C(r)?te(function(o,s){return e(o,s,i)}):C(n)&&C(i)?te(function(o,s){return e(o,r,s)}):C(r)&&C(i)?te(function(o,s){return e(n,o,s)}):C(n)?U(function(o){return e(o,r,i)}):C(r)?U(function(o){return e(n,o,i)}):C(i)?U(function(o){return e(n,r,o)}):e(n,r,i)}}}const Oo=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function On(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t}function wn(e,t,n){for(var r=0,i=n.length;r<i;){if(e(t,n[r]))return!0;r+=1}return!1}function wo(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function ne(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function No(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}const yt=typeof Object.is=="function"?Object.is:No;var Nn=Object.prototype.toString,Sr=function(){return Nn.call(arguments)==="[object Arguments]"?function(t){return Nn.call(t)==="[object Arguments]"}:function(t){return ne("callee",t)}}(),Ro=!{toString:null}.propertyIsEnumerable("toString"),Rn=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],xn=function(){return arguments.propertyIsEnumerable("length")}(),xo=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1},Dn=U(typeof Object.keys=="function"&&!xn?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var n,r,i=[],o=xn&&Sr(t);for(n in t)ne(n,t)&&(!o||n!=="length")&&(i[i.length]=n);if(Ro)for(r=Rn.length-1;r>=0;)n=Rn[r],ne(n,t)&&!xo(i,n)&&(i[i.length]=n),r-=1;return i}),Ln=U(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function In(e,t,n,r){var i=On(e),o=On(t);function s(u,_){return Ft(u,_,n.slice(),r.slice())}return!wn(function(u,_){return!wn(s,_,u)},o,i)}function Ft(e,t,n,r){if(yt(e,t))return!0;var i=Ln(e);if(i!==Ln(t))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&wo(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&yt(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!yt(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var o=n.length-1;o>=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:In(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:In(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=Dn(e);if(s.length!==Dn(t).length)return!1;var u=n.concat([e]),_=r.concat([t]);for(o=s.length-1;o>=0;){var m=s[o];if(!(ne(m,t)&&Ft(t[m],e[m],u,_)))return!1;o-=1}return!0}var Do=te(function(t,n){return Ft(t,n,[],[])});function Rt(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lo(e){return Object.prototype.toString.call(e)==="[object String]"}var kr=U(function(t){return t==null});function Io(e){var t=Object.prototype.toString.call(e);return t==="[object Uint8ClampedArray]"||t==="[object Int8Array]"||t==="[object Uint8Array]"||t==="[object Int16Array]"||t==="[object Uint16Array]"||t==="[object Int32Array]"||t==="[object Uint32Array]"||t==="[object Float32Array]"||t==="[object Float64Array]"||t==="[object BigInt64Array]"||t==="[object BigUint64Array]"}var Mo=U(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():Oo(t)?[]:Lo(t)?"":Rt(t)?{}:Sr(t)?function(){return arguments}():Io(t)?t.constructor.from(""):void 0}),Po=U(function(t){return t!=null&&Do(t,Mo(t))});const Uo=Po;var $o=U(function(t){return!kr(t)});const Ht=$o;var Fo=Ar(function(t,n,r){var i={},o;n=n||{},r=r||{};for(o in n)ne(o,n)&&(i[o]=ne(o,r)?t(o,n[o],r[o]):n[o]);for(o in r)ne(o,r)&&!ne(o,i)&&(i[o]=r[o]);return i}),Ho=Ar(function e(t,n,r){return Fo(function(i,o,s){return Rt(o)&&Rt(s)?e(t,o,s):t(i,o,s)},n,r)}),Wo=te(function(t,n){return Ho(function(r,i,o){return o},t,n)});const jo=Wo,Mn=e=>{let t;const n=new Set,r=(_,m)=>{const l=typeof _=="function"?_(t):_;if(!Object.is(l,t)){const E=t;t=m??typeof l!="object"?l:Object.assign({},t,l),n.forEach(y=>y(t,E))}},i=()=>t,u={setState:r,getState:i,subscribe:_=>(n.add(_),()=>n.delete(_)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,u),u},zo=e=>e?Mn(e):Mn;function Cr(e,t){for(var n in t)e[n]=t[n];return e}function xt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function vt(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Xe(e){this.props=e}function Or(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:xt(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Y(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xe.prototype=new B).isPureReactComponent=!0,Xe.prototype.shouldComponentUpdate=function(e,t){return xt(this.props,e)||xt(this.state,t)};var Pn=d.__b;d.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Pn&&Pn(e)};var Bo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function wr(e){function t(n){var r=Cr({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Bo,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Un=function(e,t){return e==null?null:Q(Q(e).map(t))},Nr={map:Un,forEach:Un,count:function(e){return e?Q(e).length:0},only:function(e){var t=Q(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Q},Go=d.__e;d.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Go(e,t,n,r)};var $n=d.unmount;function Rr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Cr({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Rr(r,t,n)})),e}function xr(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return xr(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Ne(){this.__u=0,this.t=null,this.__b=null}function Dr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Lr(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return Y(n,o)}return i.displayName="Lazy",i.__f=!0,i}function ge(){this.u=null,this.o=null}d.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),$n&&$n(e)},(Ne.prototype=new B).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Dr(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=s;var u=function(){if(!--r.__u){if(r.state.__a){var m=r.state.__a;r.__v.__k[0]=xr(m,m.__c.__P,m.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.t.pop();)l.forceUpdate()}},_=t.__h===!0;r.__u++||_||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Ne.prototype.componentWillUnmount=function(){this.t=[]},Ne.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Rr(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Y(X,null,e.fallback);return i&&(i.__h=null),[Y(X,null,t.__a?null:e.children),i]};var Fn=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Vo(e){return this.getChildContext=function(){return e.context},e.children}function qo(e){var t=this,n=e.i;t.componentWillUnmount=function(){Ee(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Ee(Y(Vo,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ir(e,t){var n=Y(qo,{__v:e,i:t});return n.containerInfo=t,n}(ge.prototype=new B).__a=function(e){var t=this,n=Dr(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Fn(t,e,r)):i()};n?n(o):o()}},ge.prototype.render=function(e){this.u=null,this.o=new Map;var t=Q(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ge.prototype.componentDidUpdate=ge.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Fn(e,n,t)})};var Mr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Yo=/^(?: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]/,Xo=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ko=/[A-Z0-9]/g,Zo=typeof document<"u",Jo=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Pr(e,t,n){return t.__k==null&&(t.textContent=""),Ee(e,t),typeof n=="function"&&n(),e?e.__c:null}function Ur(e,t,n){return dr(e,t),typeof n=="function"&&n(),e?e.__c:null}B.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(B.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Hn=d.event;function Qo(){}function ei(){return this.cancelBubble}function ti(){return this.defaultPrevented}d.event=function(e){return Hn&&(e=Hn(e)),e.persist=Qo,e.isPropagationStopped=ei,e.isDefaultPrevented=ti,e.nativeEvent=e};var Wt,ni={enumerable:!1,configurable:!0,get:function(){return this.class}},Wn=d.vnode;d.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var o in n){var s=n[o];if(!(o==="value"&&"defaultValue"in n&&s==null||Zo&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var u=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===!0?s="":u==="ondoubleclick"?o="ondblclick":u!=="onchange"||r!=="input"&&r!=="textarea"||Jo(n.type)?u==="onfocus"?o="onfocusin":u==="onblur"?o="onfocusout":Xo.test(o)?o=u:r.indexOf("-")===-1&&Yo.test(o)?o=o.replace(Ko,"-$&").toLowerCase():s===null&&(s=void 0):u=o="oninput",u==="oninput"&&i[o=u]&&(o="oninputCapture"),i[o]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Q(n.children).forEach(function(_){_.props.selected=i.value.indexOf(_.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Q(n.children).forEach(function(_){_.props.selected=i.multiple?i.defaultValue.indexOf(_.props.value)!=-1:i.defaultValue==_.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",ni)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=Mr,Wn&&Wn(e)};var jn=d.__r;d.__r=function(e){jn&&jn(e),Wt=e.__c};var zn=d.diffed;d.diffed=function(e){zn&&zn(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Wt=null};var $r={ReactCurrentDispatcher:{current:{readContext:function(e){return Wt.__n[e.__c].props.value}}}},ri="17.0.2";function Fr(e){return Y.bind(null,e)}function jt(e){return!!e&&e.$$typeof===Mr}function Hr(e){return jt(e)?To.apply(null,arguments):e}function Wr(e){return!!e.__k&&(Ee(null,e),!0)}function jr(e){return e&&(e.base||e.nodeType===1&&e)||null}var zr=function(e,t){return e(t)},Br=function(e,t){return e(t)},Gr=X;function zt(e){e()}function Vr(e){return e}function qr(){return[!1,zt]}var Yr=Le;function Xr(e,t){var n=t(),r=De({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Le(function(){i.__=n,i.v=t,vt(i.__,t())||o({h:i})},[e,n,t]),Je(function(){return vt(i.__,i.v())||o({h:i}),e(function(){vt(i.__,i.v())||o({h:i})})},[e]),n}var oi={useState:De,useId:br,useReducer:Pt,useEffect:Je,useLayoutEffect:Le,useInsertionEffect:Yr,useTransition:qr,useDeferredValue:Vr,useSyncExternalStore:Xr,startTransition:zt,useRef:yr,useImperativeHandle:vr,useMemo:Qe,useCallback:gr,useContext:Er,useDebugValue:Ut,version:"17.0.2",Children:Nr,render:Pr,hydrate:Ur,unmountComponentAtNode:Wr,createPortal:Ir,createElement:Y,createContext:mr,createFactory:Fr,cloneElement:Hr,createRef:ir,Fragment:X,isValidElement:jt,findDOMNode:jr,Component:B,PureComponent:Xe,memo:Or,forwardRef:wr,flushSync:Br,unstable_batchedUpdates:zr,StrictMode:Gr,Suspense:Ne,SuspenseList:ge,lazy:Lr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r};const ii=Object.freeze(Object.defineProperty({__proto__:null,Children:Nr,Component:B,Fragment:X,PureComponent:Xe,StrictMode:Gr,Suspense:Ne,SuspenseList:ge,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r,cloneElement:Hr,createContext:mr,createElement:Y,createFactory:Fr,createPortal:Ir,createRef:ir,default:oi,findDOMNode:jr,flushSync:Br,forwardRef:wr,hydrate:Ur,isValidElement:jt,lazy:Lr,memo:Or,render:Pr,startTransition:zt,unmountComponentAtNode:Wr,unstable_batchedUpdates:zr,useCallback:gr,useContext:Er,useDebugValue:Ut,useDeferredValue:Vr,useEffect:Je,useErrorBoundary:Ao,useId:br,useImperativeHandle:vr,useInsertionEffect:Yr,useLayoutEffect:Le,useMemo:Qe,useReducer:Pt,useRef:yr,useState:De,useSyncExternalStore:Xr,useTransition:qr,version:ri},Symbol.toStringTag,{value:"Module"}));function ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function si(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Kr={exports:{}},Zr={};const Jr=si(ii);var Qr={exports:{}},eo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Te=Jr;function li(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ui=typeof Object.is=="function"?Object.is:li,ci=Te.useState,_i=Te.useEffect,fi=Te.useLayoutEffect,pi=Te.useDebugValue;function di(e,t){var n=t(),r=ci({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return fi(function(){i.value=n,i.getSnapshot=t,gt(i)&&o({inst:i})},[e,n,t]),_i(function(){return gt(i)&&o({inst:i}),e(function(){gt(i)&&o({inst:i})})},[e]),pi(n),n}function gt(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ui(e,n)}catch{return!0}}function mi(e,t){return t()}var hi=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?mi:di;eo.useSyncExternalStore=Te.useSyncExternalStore!==void 0?Te.useSyncExternalStore:hi;Qr.exports=eo;var yi=Qr.exports;/**
|
|
10
10
|
* @license React
|
|
11
11
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
12
12
|
*
|
|
@@ -14,4 +14,5 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var _e=Yt,Vn=Fn;function Bn(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zn=typeof Object.is=="function"?Object.is:Bn,qn=Vn.useSyncExternalStore,Gn=_e.useRef,Kn=_e.useEffect,Jn=_e.useMemo,Yn=_e.useDebugValue;Jt.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Gn(null);if(o.current===null){var _={hasValue:!1,value:null};o.current=_}else _=o.current;o=Jn(function(){function s(l){if(!p){if(p=!0,u=l,l=r(l),i!==void 0&&_.hasValue){var d=_.value;if(i(d,l))return h=d}return h=l}if(d=h,zn(u,l))return d;var w=r(l);return i!==void 0&&i(d,w)?d:(u=l,h=w)}var p=!1,u,h,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,r,i]);var c=qn(e,o[0],o[1]);return Kn(function(){_.hasValue=!0,_.value=c},[c]),Yn(c),c};Kt.exports=Jt;var Zn=Kt.exports;const Qn=Dn(Zn),{useSyncExternalStoreWithSelector:Xn}=Qn;function er(e,t=e.getState,n){const r=Xn(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return be(r),r}const Ye=e=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?dn(e):e,n=(r,i)=>er(t,r,i);return Object.assign(n,t),n},tr=e=>e?Ye(e):Ye,nr={name:"leckerli",banner:{title:"This website uses cookies.",description:'We use cookies to improve your browsing experience, deliver personalised advertising or content and analyse our traffic. By clicking on "Accept all", you consent to our use of cookies.',accept:"Accept all",reject:"Deny",customise:"Customize",save:"Save"},permissions:[{slug:"settings",title:"Preferences",description:"Preference cookies enable a website to remember information that changes the way the website behaves or looks, like your preferred language or the region that you are in."}],baseData:{},cookie:{},choiceMade:!1,settingsOpen:!1,domain:window.location.hostname,enableGtmConsent:!1};window.dataLayer=window.dataLayer||[];function rr(e,t,n){window.dataLayer.push(arguments)}const Ze=e=>{rr("consent","update",e.permissions.reduce((t,n)=>({...t,[n.slug]:e.cookie[n.slug]?"granted":"denied"}),{}))},U=pn(nr,window.leckerliSettings??{}),Qe={sameSite:"strict",domain:U.domain},re=me.get(U.name);U.cookie=xe(re)?JSON.parse(re):U.permissions.reduce((e,t)=>({...e,[t.slug]:!1}),U.baseData);U.choiceMade=xe(re);const we=tr((e,t)=>({...U,init:()=>{const n=t();St(re)&&n.choiceMade&&me.set(n.name,JSON.stringify(n.cookie),Qe),n.choiceMade&&n.enableGtmConsent&&Ze(n),document.dispatchEvent(new CustomEvent("leckerli:initialised",{detail:{cookie:n.choiceMade?n.cookie:null}})),document.addEventListener("leckerli:open-banner",()=>t().setChoice(!1)),document.addEventListener("leckerli:close-banner",()=>t().setChoice(!0)),document.addEventListener("leckerli:open-modal",()=>t().setModal(!0)),document.addEventListener("leckerli:close-modal",()=>t().setModal(!1))},propagate(n){const r=t();me.set(r.name,JSON.stringify(n),Qe),r.enableGtmConsent&&Ze({...r,cookie:n}),document.dispatchEvent(new CustomEvent("leckerli:permissions-updated",{detail:{cookie:n}}))},setChoice:n=>e(r=>({...r,choiceMade:n})),setModal:n=>e(r=>(document.dispatchEvent(new CustomEvent(`leckerli:modal-${n?"opened":"closed"}`)),{...r,settingsOpen:n})),setPermissions:n=>e(r=>{const i=r.permissions.reduce((o,_)=>({...o,[_.slug]:n[_.slug]??!1}),r.baseData);return r.propagate(i),{...r,choiceMade:!0,cookie:i}}),togglePermission:n=>e(r=>{const i=r.permissions.reduce((o,_)=>(n===_.slug?o[_.slug]=xe(r.cookie[_.slug])?!r.cookie[_.slug]:!0:o[_.slug]=r.cookie[_.slug]??!1,o),r.baseData);return r.propagate(i),{...r,choiceMade:!0,cookie:i}}),acceptAll:()=>{t().setPermissions(t().permissions.reduce((n,r)=>({...n,[r.slug]:!0}),{}))},rejectAll:()=>{t().setPermissions(t().permissions.reduce((n,r)=>({...n,[r.slug]:!1}),{}))}}));var or=0;function v(e,t,n,r,i,o){var _,c,s={};for(c in t)c=="ref"?_=t[c]:s[c]=t[c];var p={type:e,props:s,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--or,__source:i,__self:o};if(typeof e=="function"&&(_=e.defaultProps))for(c in _)s[c]===void 0&&(s[c]=_[c]);return a.vnode&&a.vnode(p),p}const ir=()=>{const{banner:e,acceptAll:t,rejectAll:n,setModal:r}=we();return v("div",{className:"fixed bottom-0 left-0 max-w-md px-5 py-4 m-2 shadow-md shadow-black/25 z-[9998] bg-background space-y-4 font-primary text-foreground rounded-md",children:[v("h3",{className:"m-0 text-lg font-semibold font-primary md:text-xl",children:e.title}),v("p",{className:"m-0 text-sm leading-snug font-primary md:text-base",children:e.description}),v("div",{className:"pt-2 space-y-2",children:[v("button",{type:"button",className:"px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-background font-primary text-primary md:px-3.5 py-1.5 md:py-2.5 border-primary hover:border-primary-hover hover:text-primary-hover active:border-primary-active active:text-primary-active transition-colors",onClick:()=>r(!0),children:e.customise}),v("button",{type:"button",className:"px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-background font-primary text-primary md:px-3.5 py-1.5 md:py-2.5 border-primary hover:border-primary-hover hover:text-primary-hover active:border-primary-active active:text-primary-active transition-colors",onClick:n,children:e.reject}),v("button",{type:"button",className:"px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-primary font-primary text-background md:px-3.5 py-1.5 md:py-2.5 border-primary hover:bg-primary-hover hover:border-primary-hover active:bg-primary-active active:border-primary-active transition-colors",onClick:t,children:e.accept})]})]})},ur=()=>{const{permissions:e,cookie:t,setPermissions:n,banner:r,setModal:i}=we(),[o,_]=B(t);return v("div",{className:"fixed bottom-0 left-0 w-full max-w-lg max-h-full px-5 py-4 m-2 overflow-y-auto text-black shadow-md shadow-black/25 z-[9999] bg-background text-foreground font-primary rounded-md",children:[v("div",{className:"space-y-6",children:[v("h3",{className:"w-10/12 m-0 text-xl font-semibold font-primary md:text-2xl",children:r.customise}),e.map(({slug:c,title:s,description:p})=>v("div",{children:[v("div",{className:"flex items-start justify-between",children:[v("h3",{className:"m-0 text-lg font-semibold font-primary",children:s}),v("button",{type:"button",className:`${o[c]?"bg-primary":"bg-gray-200"} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 mt-0.5`,role:"switch","aria-checked":"false",onClick:()=>_({...o,[c]:!o[c]}),children:[v("span",{className:"sr-only",children:"Toggle"}),v("span",{"aria-hidden":"true",className:`${o[c]?"translate-x-5":"translate-x-0"} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-background shadow ring-0 transition duration-200 ease-in-out`})]})]}),v("p",{className:"m-0 mt-2 text-sm leading-snug font-primary md:text-base",children:p})]},`setting-${c}`)),v("div",{className:"pt-4",children:v("button",{type:"button",className:"px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-primary font-primary text-background md:px-3.5 py-1.5 md:py-2.5 border-primary hover:bg-primary-hover hover:border-primary-hover active:bg-primary-active active:border-primary-active transition-colors",onClick:()=>{n(o),i(!1)},children:r.save})})]}),v("button",{type:"button",className:"absolute top-0 right-0 w-8 h-8 mt-0 text-xl rounded-full",onClick:()=>i(!1),children:"×"})]})},_r=()=>{const{choiceMade:e,init:t,settingsOpen:n}=we();return ie(()=>{t()},[]),v(E,{children:[!e&&!n&&v(ir,{}),n&&v(ur,{})]})};const $e=document.createElement("div");$e.id="lkrl-wrapper";document.body.appendChild($e);L(v(_r,{}),$e);
|
|
17
|
+
*/var et=Jr,vi=yi;function gi(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ei=typeof Object.is=="function"?Object.is:gi,bi=vi.useSyncExternalStore,Ti=et.useRef,Ai=et.useEffect,Si=et.useMemo,ki=et.useDebugValue;Zr.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Ti(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Si(function(){function _(p){if(!m){if(m=!0,l=p,p=r(p),i!==void 0&&s.hasValue){var v=s.value;if(i(v,p))return E=v}return E=p}if(v=E,Ei(l,p))return v;var W=r(p);return i!==void 0&&i(v,W)?v:(l=p,E=W)}var m=!1,l,E,y=n===void 0?null:n;return[function(){return _(t())},y===null?void 0:function(){return _(y())}]},[t,n,r,i]);var u=bi(e,o[0],o[1]);return Ai(function(){s.hasValue=!0,s.value=u},[u]),ki(u),u};Kr.exports=Zr;var Ci=Kr.exports;const Oi=ai(Ci),{useSyncExternalStoreWithSelector:wi}=Oi;function Ni(e,t=e.getState,n){const r=wi(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return Ut(r),r}const Bn=e=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?zo(e):e,n=(r,i)=>Ni(t,r,i);return Object.assign(n,t),n},Ri=e=>e?Bn(e):Bn,xi={name:"leckerli",banner:{title:"This website uses cookies.",description:'We use cookies to improve your browsing experience, deliver personalised advertising or content and analyse our traffic. By clicking on "Accept all", you consent to our use of cookies.',accept:"Accept all",reject:"Deny",customise:"Customize",save:"Save"},permissions:[{slug:"settings",title:"Preferences",description:"Preference cookies enable a website to remember information that changes the way the website behaves or looks, like your preferred language or the region that you are in."}],baseData:{},cookie:{},choiceMade:!1,settingsOpen:!1,domain:window.location.hostname,enableGtmConsent:!1};window.dataLayer=window.dataLayer||[];function Di(e,t,n){window.dataLayer.push(arguments)}const Gn=e=>{Di("consent","update",e.permissions.reduce((t,n)=>({...t,[n.slug]:e.cookie[n.slug]?"granted":"denied"}),{}))},se=jo(xi,window.leckerliSettings??{}),Dt=new Date;Dt.setMonth(Dt.getMonth()+1);const Vn={sameSite:"strict",domain:se.domain,expires:Dt},Ke=Nt.get(se.name);se.cookie=Ht(Ke)?JSON.parse(Ke):se.permissions.reduce((e,t)=>({...e,[t.slug]:!1}),se.baseData);se.choiceMade=Ht(Ke);const Bt=Ri((e,t)=>({...se,init:()=>{const n=t();kr(Ke)&&n.choiceMade&&Nt.set(n.name,JSON.stringify(n.cookie),Vn),n.choiceMade&&n.enableGtmConsent&&Gn(n),document.dispatchEvent(new CustomEvent("leckerli:initialised",{detail:{cookie:n.choiceMade?n.cookie:null}})),document.addEventListener("leckerli:open-banner",()=>t().setChoice(!1)),document.addEventListener("leckerli:close-banner",()=>t().setChoice(!0)),document.addEventListener("leckerli:open-modal",()=>t().setModal(!0)),document.addEventListener("leckerli:close-modal",()=>t().setModal(!1))},propagate(n){const r=t();Nt.set(r.name,JSON.stringify(n),Vn),r.enableGtmConsent&&Gn({...r,cookie:n}),document.dispatchEvent(new CustomEvent("leckerli:permissions-updated",{detail:{cookie:n}}))},setChoice:n=>e(r=>({...r,choiceMade:n})),setModal:n=>e(r=>(document.dispatchEvent(new CustomEvent(`leckerli:modal-${n?"opened":"closed"}`)),{...r,settingsOpen:n})),setPermissions:n=>e(r=>{const i=r.permissions.reduce((o,s)=>({...o,[s.slug]:n[s.slug]??!1}),r.baseData);return r.propagate(i),{...r,choiceMade:!0,cookie:i}}),togglePermission:n=>e(r=>{const i=r.permissions.reduce((o,s)=>(n===s.slug?o[s.slug]=Ht(r.cookie[s.slug])?!r.cookie[s.slug]:!0:o[s.slug]=r.cookie[s.slug]??!1,o),r.baseData);return r.propagate(i),{...r,choiceMade:!0,cookie:i}}),acceptAll:()=>{t().setPermissions(t().permissions.reduce((n,r)=>({...n,[r.slug]:!0}),{}))},rejectAll:()=>{t().setPermissions(t().permissions.reduce((n,r)=>({...n,[r.slug]:!1}),{}))}}));/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:to,setPrototypeOf:qn,isFrozen:Li,getPrototypeOf:Ii,getOwnPropertyDescriptor:Mi}=Object;let{freeze:M,seal:G,create:Pi}=Object,{apply:Lt,construct:It}=typeof Reflect<"u"&&Reflect;Lt||(Lt=function(t,n,r){return t.apply(n,r)});M||(M=function(t){return t});G||(G=function(t){return t});It||(It=function(t,n){return new t(...n)});const Ui=H(Array.prototype.forEach),Yn=H(Array.prototype.pop),Ce=H(Array.prototype.push),Ge=H(String.prototype.toLowerCase),Et=H(String.prototype.toString),$i=H(String.prototype.match),z=H(String.prototype.replace),Fi=H(String.prototype.indexOf),Hi=H(String.prototype.trim),$=H(RegExp.prototype.test),Oe=Wi(TypeError);function H(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Lt(e,t,r)}}function Wi(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return It(e,n)}}function g(e,t,n){var r;n=(r=n)!==null&&r!==void 0?r:Ge,qn&&qn(e,null);let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=n(o);s!==o&&(Li(t)||(t[i]=s),o=s)}e[o]=!0}return e}function ve(e){const t=Pi(null);for(const[n,r]of to(e))t[n]=r;return t}function We(e,t){for(;e!==null;){const r=Mi(e,t);if(r){if(r.get)return H(r.get);if(typeof r.value=="function")return H(r.value)}e=Ii(e)}function n(r){return console.warn("fallback value for",r),null}return n}const Xn=M(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bt=M(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Tt=M(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ji=M(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),At=M(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zi=M(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Kn=M(["#text"]),Zn=M(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),St=M(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Jn=M(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),je=M(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Bi=G(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Gi=G(/<%[\w\W]*|[\w\W]*%>/gm),Vi=G(/\${[\w\W]*}/gm),qi=G(/^data-[\-\w.\u00B7-\uFFFF]/),Yi=G(/^aria-[\-\w]+$/),no=G(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xi=G(/^(?:\w+script|data):/i),Ki=G(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ro=G(/^html$/i);var Qn=Object.freeze({__proto__:null,MUSTACHE_EXPR:Bi,ERB_EXPR:Gi,TMPLIT_EXPR:Vi,DATA_ATTR:qi,ARIA_ATTR:Yi,IS_ALLOWED_URI:no,IS_SCRIPT_OR_DATA:Xi,ATTR_WHITESPACE:Ki,DOCTYPE_NAME:ro});const Zi=()=>typeof window>"u"?null:window,Ji=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function oo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zi();const t=h=>oo(h);if(t.version="3.0.5",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;const n=e.document,r=n.currentScript;let{document:i}=e;const{DocumentFragment:o,HTMLTemplateElement:s,Node:u,Element:_,NodeFilter:m,NamedNodeMap:l=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:E,DOMParser:y,trustedTypes:p}=e,v=_.prototype,W=We(v,"cloneNode"),S=We(v,"nextSibling"),N=We(v,"childNodes"),I=We(v,"parentNode");if(typeof s=="function"){const h=i.createElement("template");h.content&&h.content.ownerDocument&&(i=h.content.ownerDocument)}let w,j="";const{implementation:ue,createNodeIterator:ce,createDocumentFragment:Ae,getElementsByTagName:P}=i,{importNode:_e}=n;let V={};t.isSupported=typeof to=="function"&&typeof I=="function"&&ue&&ue.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:tt,ERB_EXPR:nt,TMPLIT_EXPR:rt,DATA_ATTR:io,ARIA_ATTR:ao,IS_SCRIPT_OR_DATA:so,ATTR_WHITESPACE:Vt}=Qn;let{IS_ALLOWED_URI:qt}=Qn,R=null;const Yt=g({},[...Xn,...bt,...Tt,...At,...Kn]);let x=null;const Xt=g({},[...Zn,...St,...Jn,...je]);let O=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,ot=null,Kt=!0,it=!0,Zt=!1,Jt=!0,fe=!1,re=!1,at=!1,st=!1,pe=!1,Ie=!1,Me=!1,Qt=!0,en=!1;const lo="user-content-";let lt=!0,ke=!1,de={},me=null;const tn=g({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let nn=null;const rn=g({},["audio","video","img","source","image","track"]);let ut=null;const on=g({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pe="http://www.w3.org/1998/Math/MathML",Ue="http://www.w3.org/2000/svg",K="http://www.w3.org/1999/xhtml";let he=K,ct=!1,_t=null;const uo=g({},[Pe,Ue,K],Et);let oe;const co=["application/xhtml+xml","text/html"],_o="text/html";let D,ye=null;const fo=i.createElement("form"),an=function(a){return a instanceof RegExp||a instanceof Function},ft=function(a){if(!(ye&&ye===a)){if((!a||typeof a!="object")&&(a={}),a=ve(a),oe=co.indexOf(a.PARSER_MEDIA_TYPE)===-1?oe=_o:oe=a.PARSER_MEDIA_TYPE,D=oe==="application/xhtml+xml"?Et:Ge,R="ALLOWED_TAGS"in a?g({},a.ALLOWED_TAGS,D):Yt,x="ALLOWED_ATTR"in a?g({},a.ALLOWED_ATTR,D):Xt,_t="ALLOWED_NAMESPACES"in a?g({},a.ALLOWED_NAMESPACES,Et):uo,ut="ADD_URI_SAFE_ATTR"in a?g(ve(on),a.ADD_URI_SAFE_ATTR,D):on,nn="ADD_DATA_URI_TAGS"in a?g(ve(rn),a.ADD_DATA_URI_TAGS,D):rn,me="FORBID_CONTENTS"in a?g({},a.FORBID_CONTENTS,D):tn,Se="FORBID_TAGS"in a?g({},a.FORBID_TAGS,D):{},ot="FORBID_ATTR"in a?g({},a.FORBID_ATTR,D):{},de="USE_PROFILES"in a?a.USE_PROFILES:!1,Kt=a.ALLOW_ARIA_ATTR!==!1,it=a.ALLOW_DATA_ATTR!==!1,Zt=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Jt=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,fe=a.SAFE_FOR_TEMPLATES||!1,re=a.WHOLE_DOCUMENT||!1,pe=a.RETURN_DOM||!1,Ie=a.RETURN_DOM_FRAGMENT||!1,Me=a.RETURN_TRUSTED_TYPE||!1,st=a.FORCE_BODY||!1,Qt=a.SANITIZE_DOM!==!1,en=a.SANITIZE_NAMED_PROPS||!1,lt=a.KEEP_CONTENT!==!1,ke=a.IN_PLACE||!1,qt=a.ALLOWED_URI_REGEXP||no,he=a.NAMESPACE||K,O=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&an(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(O.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&an(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(O.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(O.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),fe&&(it=!1),Ie&&(pe=!0),de&&(R=g({},[...Kn]),x=[],de.html===!0&&(g(R,Xn),g(x,Zn)),de.svg===!0&&(g(R,bt),g(x,St),g(x,je)),de.svgFilters===!0&&(g(R,Tt),g(x,St),g(x,je)),de.mathMl===!0&&(g(R,At),g(x,Jn),g(x,je))),a.ADD_TAGS&&(R===Yt&&(R=ve(R)),g(R,a.ADD_TAGS,D)),a.ADD_ATTR&&(x===Xt&&(x=ve(x)),g(x,a.ADD_ATTR,D)),a.ADD_URI_SAFE_ATTR&&g(ut,a.ADD_URI_SAFE_ATTR,D),a.FORBID_CONTENTS&&(me===tn&&(me=ve(me)),g(me,a.FORBID_CONTENTS,D)),lt&&(R["#text"]=!0),re&&g(R,["html","head","body"]),R.table&&(g(R,["tbody"]),delete Se.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw Oe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Oe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=a.TRUSTED_TYPES_POLICY,j=w.createHTML("")}else w===void 0&&(w=Ji(p,r)),w!==null&&typeof j=="string"&&(j=w.createHTML(""));M&&M(a),ye=a}},sn=g({},["mi","mo","mn","ms","mtext"]),ln=g({},["foreignobject","desc","title","annotation-xml"]),po=g({},["title","style","font","a","script"]),$e=g({},bt);g($e,Tt),g($e,ji);const pt=g({},At);g(pt,zi);const mo=function(a){let c=I(a);(!c||!c.tagName)&&(c={namespaceURI:he,tagName:"template"});const f=Ge(a.tagName),b=Ge(c.tagName);return _t[a.namespaceURI]?a.namespaceURI===Ue?c.namespaceURI===K?f==="svg":c.namespaceURI===Pe?f==="svg"&&(b==="annotation-xml"||sn[b]):!!$e[f]:a.namespaceURI===Pe?c.namespaceURI===K?f==="math":c.namespaceURI===Ue?f==="math"&&ln[b]:!!pt[f]:a.namespaceURI===K?c.namespaceURI===Ue&&!ln[b]||c.namespaceURI===Pe&&!sn[b]?!1:!pt[f]&&(po[f]||!$e[f]):!!(oe==="application/xhtml+xml"&&_t[a.namespaceURI]):!1},ie=function(a){Ce(t.removed,{element:a});try{a.parentNode.removeChild(a)}catch{a.remove()}},dt=function(a,c){try{Ce(t.removed,{attribute:c.getAttributeNode(a),from:c})}catch{Ce(t.removed,{attribute:null,from:c})}if(c.removeAttribute(a),a==="is"&&!x[a])if(pe||Ie)try{ie(c)}catch{}else try{c.setAttribute(a,"")}catch{}},un=function(a){let c,f;if(st)a="<remove></remove>"+a;else{const F=$i(a,/^[\r\n\t ]+/);f=F&&F[0]}oe==="application/xhtml+xml"&&he===K&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");const b=w?w.createHTML(a):a;if(he===K)try{c=new y().parseFromString(b,oe)}catch{}if(!c||!c.documentElement){c=ue.createDocument(he,"template",null);try{c.documentElement.innerHTML=ct?j:b}catch{}}const L=c.body||c.documentElement;return a&&f&&L.insertBefore(i.createTextNode(f),L.childNodes[0]||null),he===K?P.call(c,re?"html":"body")[0]:re?c.documentElement:L},cn=function(a){return ce.call(a.ownerDocument||a,a,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT,null,!1)},ho=function(a){return a instanceof E&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof l)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Fe=function(a){return typeof u=="object"?a instanceof u:a&&typeof a=="object"&&typeof a.nodeType=="number"&&typeof a.nodeName=="string"},Z=function(a,c,f){V[a]&&Ui(V[a],b=>{b.call(t,c,f,ye)})},_n=function(a){let c;if(Z("beforeSanitizeElements",a,null),ho(a))return ie(a),!0;const f=D(a.nodeName);if(Z("uponSanitizeElement",a,{tagName:f,allowedTags:R}),a.hasChildNodes()&&!Fe(a.firstElementChild)&&(!Fe(a.content)||!Fe(a.content.firstElementChild))&&$(/<[/\w]/g,a.innerHTML)&&$(/<[/\w]/g,a.textContent))return ie(a),!0;if(!R[f]||Se[f]){if(!Se[f]&&pn(f)&&(O.tagNameCheck instanceof RegExp&&$(O.tagNameCheck,f)||O.tagNameCheck instanceof Function&&O.tagNameCheck(f)))return!1;if(lt&&!me[f]){const b=I(a)||a.parentNode,L=N(a)||a.childNodes;if(L&&b){const F=L.length;for(let k=F-1;k>=0;--k)b.insertBefore(W(L[k],!0),S(a))}}return ie(a),!0}return a instanceof _&&!mo(a)||(f==="noscript"||f==="noembed"||f==="noframes")&&$(/<\/no(script|embed|frames)/i,a.innerHTML)?(ie(a),!0):(fe&&a.nodeType===3&&(c=a.textContent,c=z(c,tt," "),c=z(c,nt," "),c=z(c,rt," "),a.textContent!==c&&(Ce(t.removed,{element:a.cloneNode()}),a.textContent=c)),Z("afterSanitizeElements",a,null),!1)},fn=function(a,c,f){if(Qt&&(c==="id"||c==="name")&&(f in i||f in fo))return!1;if(!(it&&!ot[c]&&$(io,c))){if(!(Kt&&$(ao,c))){if(!x[c]||ot[c]){if(!(pn(a)&&(O.tagNameCheck instanceof RegExp&&$(O.tagNameCheck,a)||O.tagNameCheck instanceof Function&&O.tagNameCheck(a))&&(O.attributeNameCheck instanceof RegExp&&$(O.attributeNameCheck,c)||O.attributeNameCheck instanceof Function&&O.attributeNameCheck(c))||c==="is"&&O.allowCustomizedBuiltInElements&&(O.tagNameCheck instanceof RegExp&&$(O.tagNameCheck,f)||O.tagNameCheck instanceof Function&&O.tagNameCheck(f))))return!1}else if(!ut[c]){if(!$(qt,z(f,Vt,""))){if(!((c==="src"||c==="xlink:href"||c==="href")&&a!=="script"&&Fi(f,"data:")===0&&nn[a])){if(!(Zt&&!$(so,z(f,Vt,"")))){if(f)return!1}}}}}}return!0},pn=function(a){return a.indexOf("-")>0},dn=function(a){let c,f,b,L;Z("beforeSanitizeAttributes",a,null);const{attributes:F}=a;if(!F)return;const k={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:x};for(L=F.length;L--;){c=F[L];const{name:q,namespaceURI:mt}=c;if(f=q==="value"?c.value:Hi(c.value),b=D(q),k.attrName=b,k.attrValue=f,k.keepAttr=!0,k.forceKeepAttr=void 0,Z("uponSanitizeAttribute",a,k),f=k.attrValue,k.forceKeepAttr||(dt(q,a),!k.keepAttr))continue;if(!Jt&&$(/\/>/i,f)){dt(q,a);continue}fe&&(f=z(f,tt," "),f=z(f,nt," "),f=z(f,rt," "));const mn=D(a.nodeName);if(fn(mn,b,f)){if(en&&(b==="id"||b==="name")&&(dt(q,a),f=lo+f),w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!mt)switch(p.getAttributeType(mn,b)){case"TrustedHTML":{f=w.createHTML(f);break}case"TrustedScriptURL":{f=w.createScriptURL(f);break}}try{mt?a.setAttributeNS(mt,q,f):a.setAttribute(q,f),Yn(t.removed)}catch{}}}Z("afterSanitizeAttributes",a,null)},yo=function h(a){let c;const f=cn(a);for(Z("beforeSanitizeShadowDOM",a,null);c=f.nextNode();)Z("uponSanitizeShadowNode",c,null),!_n(c)&&(c.content instanceof o&&h(c.content),dn(c));Z("afterSanitizeShadowDOM",a,null)};return t.sanitize=function(h){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,f,b,L;if(ct=!h,ct&&(h="<!-->"),typeof h!="string"&&!Fe(h))if(typeof h.toString=="function"){if(h=h.toString(),typeof h!="string")throw Oe("dirty is not a string, aborting")}else throw Oe("toString is not a function");if(!t.isSupported)return h;if(at||ft(a),t.removed=[],typeof h=="string"&&(ke=!1),ke){if(h.nodeName){const q=D(h.nodeName);if(!R[q]||Se[q])throw Oe("root node is forbidden and cannot be sanitized in-place")}}else if(h instanceof u)c=un("<!---->"),f=c.ownerDocument.importNode(h,!0),f.nodeType===1&&f.nodeName==="BODY"||f.nodeName==="HTML"?c=f:c.appendChild(f);else{if(!pe&&!fe&&!re&&h.indexOf("<")===-1)return w&&Me?w.createHTML(h):h;if(c=un(h),!c)return pe?null:Me?j:""}c&&st&&ie(c.firstChild);const F=cn(ke?h:c);for(;b=F.nextNode();)_n(b)||(b.content instanceof o&&yo(b.content),dn(b));if(ke)return h;if(pe){if(Ie)for(L=Ae.call(c.ownerDocument);c.firstChild;)L.appendChild(c.firstChild);else L=c;return(x.shadowroot||x.shadowrootmode)&&(L=_e.call(n,L,!0)),L}let k=re?c.outerHTML:c.innerHTML;return re&&R["!doctype"]&&c.ownerDocument&&c.ownerDocument.doctype&&c.ownerDocument.doctype.name&&$(ro,c.ownerDocument.doctype.name)&&(k="<!DOCTYPE "+c.ownerDocument.doctype.name+`>
|
|
18
|
+
`+k),fe&&(k=z(k,tt," "),k=z(k,nt," "),k=z(k,rt," ")),w&&Me?w.createHTML(k):k},t.setConfig=function(h){ft(h),at=!0},t.clearConfig=function(){ye=null,at=!1},t.isValidAttribute=function(h,a,c){ye||ft({});const f=D(h),b=D(a);return fn(f,b,c)},t.addHook=function(h,a){typeof a=="function"&&(V[h]=V[h]||[],Ce(V[h],a))},t.removeHook=function(h){if(V[h])return Yn(V[h])},t.removeHooks=function(h){V[h]&&(V[h]=[])},t.removeAllHooks=function(){V={}},t}var Qi=oo(),ea=0;function A(e,t,n,r,i,o){var s,u,_={};for(u in t)u=="ref"?s=t[u]:_[u]=t[u];var m={type:e,props:_,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ea,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(u in s)_[u]===void 0&&(_[u]=s[u]);return d.vnode&&d.vnode(m),m}const ta=()=>{const{banner:e,acceptAll:t,rejectAll:n,setModal:r,permissions:i}=Bt(),o=["b","i","em","strong","p","ul","li","ol","span","h2","h3","h4","h5","h6","a","div"],s=["href","target"];return A("div",{className:"fixed bottom-0 left-0 max-w-md px-5 py-4 m-2 shadow-md shadow-black/25 z-[9998] bg-background space-y-4 font-primary text-foreground rounded-md banner-wrapper",children:[e.title&&A("h3",{className:"m-0 text-lg font-semibold font-primary md:text-xl banner-title",children:e.title}),e.description&&A("p",{className:"m-0 text-sm leading-snug font-primary md:text-base banner-description",dangerouslySetInnerHTML:{__html:Qi.sanitize(e.description,{USE_PROFILES:{html:!0},ALLOWED_TAGS:o,ALLOWED_ATTR:s})}}),A("div",{className:"pt-2 space-y-2 banner-btns",children:[!Uo(i)&&A("button",{type:"button",className:"px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-background font-primary text-primary md:px-3.5 py-1.5 md:py-2.5 border-primary hover:border-primary-hover hover:text-primary-hover active:border-primary-active active:text-primary-active transition-colors banner-btn-customise",onClick:()=>r(!0),children:e.customise}),A("button",{type:"button",className:"px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-background font-primary text-primary md:px-3.5 py-1.5 md:py-2.5 border-primary hover:border-primary-hover hover:text-primary-hover active:border-primary-active active:text-primary-active transition-colors banner-btn-reject",onClick:n,children:e.reject}),A("button",{type:"button",className:"px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-primary font-primary text-background md:px-3.5 py-1.5 md:py-2.5 border-primary hover:bg-primary-hover hover:border-primary-hover active:bg-primary-active active:border-primary-active transition-colors banner-btn-accept",onClick:t,children:e.accept})]})]})},na=()=>{const{permissions:e,cookie:t,setPermissions:n,banner:r,setModal:i}=Bt(),[o,s]=De(t);return A("div",{className:"fixed bottom-0 left-0 w-full max-w-lg max-h-full px-5 py-4 m-2 overflow-y-auto text-black shadow-md shadow-black/25 z-[9999] bg-background text-foreground font-primary rounded-md",children:[A("div",{className:"space-y-6",children:[A("h3",{className:"w-10/12 m-0 text-xl font-semibold font-primary md:text-2xl",children:r.customise}),e.map(({slug:u,title:_,description:m})=>A("div",{children:[A("div",{className:"flex items-start justify-between",children:[A("h3",{className:"m-0 text-lg font-semibold font-primary",children:_}),A("button",{type:"button",className:`${o[u]?"bg-primary":"bg-gray-200"} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 mt-0.5`,role:"switch","aria-checked":"false",onClick:()=>s({...o,[u]:!o[u]}),children:[A("span",{className:"sr-only",children:"Toggle"}),A("span",{"aria-hidden":"true",className:`${o[u]?"translate-x-5":"translate-x-0"} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-background shadow ring-0 transition duration-200 ease-in-out`})]})]}),A("p",{className:"m-0 mt-2 text-sm leading-snug font-primary md:text-base",children:m})]},`setting-${u}`)),A("div",{className:"pt-4",children:A("button",{type:"button",className:"px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-primary font-primary text-background md:px-3.5 py-1.5 md:py-2.5 border-primary hover:bg-primary-hover hover:border-primary-hover active:bg-primary-active active:border-primary-active transition-colors",onClick:()=>{n(o),i(!1)},children:r.save})})]}),A("button",{type:"button",className:"absolute top-0 right-0 w-8 h-8 mt-0 text-xl rounded-full",onClick:()=>i(!1),children:"×"})]})},ra=()=>{const{choiceMade:e,init:t,settingsOpen:n}=Bt();return Je(()=>{t()},[]),A(X,{children:[!e&&!n&&A(ta,{}),n&&A(na,{})]})};const Gt=document.createElement("div");Gt.id="lkrl-wrapper";document.body.appendChild(Gt);Ee(A(ra,{}),Gt);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antistatique/leckerli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Lightweight and customisable GDPR cookie consent manager",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": "https://github.com/antistatique/leckerli",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@types/ramda": "^0.29.2",
|
|
22
|
+
"dompurify": "^3.0.5",
|
|
22
23
|
"js-cookie": "^3.0.5",
|
|
23
24
|
"preact": "^10.13.2",
|
|
24
25
|
"ramda": "^0.29.0",
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@preact/preset-vite": "^2.5.0",
|
|
30
|
+
"@types/dompurify": "^3.0.2",
|
|
29
31
|
"@types/js-cookie": "^3.0.3",
|
|
30
32
|
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
|
31
33
|
"@typescript-eslint/parser": "^5.60.1",
|
|
@@ -1,36 +1,74 @@
|
|
|
1
|
+
import DOMPurify from 'dompurify';
|
|
2
|
+
import { isEmpty } from 'ramda';
|
|
3
|
+
|
|
1
4
|
import useSettings from '../hooks/useSettings';
|
|
2
5
|
|
|
3
6
|
const Banner = () => {
|
|
4
|
-
const { banner, acceptAll, rejectAll, setModal } = useSettings();
|
|
7
|
+
const { banner, acceptAll, rejectAll, setModal, permissions } = useSettings();
|
|
8
|
+
|
|
9
|
+
// Prevent the injection of unwanted HTML tags in the banner description
|
|
10
|
+
const allowedTags = [
|
|
11
|
+
'b',
|
|
12
|
+
'i',
|
|
13
|
+
'em',
|
|
14
|
+
'strong',
|
|
15
|
+
'p',
|
|
16
|
+
'ul',
|
|
17
|
+
'li',
|
|
18
|
+
'ol',
|
|
19
|
+
'span',
|
|
20
|
+
'h2',
|
|
21
|
+
'h3',
|
|
22
|
+
'h4',
|
|
23
|
+
'h5',
|
|
24
|
+
'h6',
|
|
25
|
+
'a',
|
|
26
|
+
'div',
|
|
27
|
+
];
|
|
28
|
+
const allowedAttributes = ['href', 'target'];
|
|
5
29
|
|
|
6
30
|
return (
|
|
7
|
-
<div className="fixed bottom-0 left-0 max-w-md px-5 py-4 m-2 shadow-md shadow-black/25 z-[9998] bg-background space-y-4 font-primary text-foreground rounded-md">
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
31
|
+
<div className="fixed bottom-0 left-0 max-w-md px-5 py-4 m-2 shadow-md shadow-black/25 z-[9998] bg-background space-y-4 font-primary text-foreground rounded-md banner-wrapper">
|
|
32
|
+
{banner.title && (
|
|
33
|
+
<h3 className="m-0 text-lg font-semibold font-primary md:text-xl banner-title">
|
|
34
|
+
{banner.title}
|
|
35
|
+
</h3>
|
|
36
|
+
)}
|
|
11
37
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
38
|
+
{banner.description && (
|
|
39
|
+
<p
|
|
40
|
+
className="m-0 text-sm leading-snug font-primary md:text-base banner-description"
|
|
41
|
+
// eslint-disable-next-line react/no-danger
|
|
42
|
+
dangerouslySetInnerHTML={{
|
|
43
|
+
__html: DOMPurify.sanitize(banner.description, {
|
|
44
|
+
USE_PROFILES: { html: true },
|
|
45
|
+
ALLOWED_TAGS: allowedTags,
|
|
46
|
+
ALLOWED_ATTR: allowedAttributes,
|
|
47
|
+
}),
|
|
48
|
+
}}
|
|
49
|
+
/>
|
|
50
|
+
)}
|
|
15
51
|
|
|
16
|
-
<div className="pt-2 space-y-2">
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
52
|
+
<div className="pt-2 space-y-2 banner-btns">
|
|
53
|
+
{!isEmpty(permissions) && (
|
|
54
|
+
<button
|
|
55
|
+
type="button"
|
|
56
|
+
className="px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-background font-primary text-primary md:px-3.5 py-1.5 md:py-2.5 border-primary hover:border-primary-hover hover:text-primary-hover active:border-primary-active active:text-primary-active transition-colors banner-btn-customise"
|
|
57
|
+
onClick={() => setModal(true)}
|
|
58
|
+
>
|
|
59
|
+
{banner.customise}
|
|
60
|
+
</button>
|
|
61
|
+
)}
|
|
24
62
|
<button
|
|
25
63
|
type="button"
|
|
26
|
-
className="px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-background font-primary text-primary md:px-3.5 py-1.5 md:py-2.5 border-primary hover:border-primary-hover hover:text-primary-hover active:border-primary-active active:text-primary-active transition-colors"
|
|
64
|
+
className="px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-background font-primary text-primary md:px-3.5 py-1.5 md:py-2.5 border-primary hover:border-primary-hover hover:text-primary-hover active:border-primary-active active:text-primary-active transition-colors banner-btn-reject"
|
|
27
65
|
onClick={rejectAll}
|
|
28
66
|
>
|
|
29
67
|
{banner.reject}
|
|
30
68
|
</button>
|
|
31
69
|
<button
|
|
32
70
|
type="button"
|
|
33
|
-
className="px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-primary font-primary text-background md:px-3.5 py-1.5 md:py-2.5 border-primary hover:bg-primary-hover hover:border-primary-hover active:bg-primary-active active:border-primary-active transition-colors"
|
|
71
|
+
className="px-2 mr-2 text-sm font-semibold border-2 border-solid rounded bg-primary font-primary text-background md:px-3.5 py-1.5 md:py-2.5 border-primary hover:bg-primary-hover hover:border-primary-hover active:bg-primary-active active:border-primary-active transition-colors banner-btn-accept"
|
|
34
72
|
onClick={acceptAll}
|
|
35
73
|
>
|
|
36
74
|
{banner.accept}
|
package/src/hooks/useSettings.ts
CHANGED
|
@@ -27,13 +27,19 @@ const initialState = mergeDeepRight(
|
|
|
27
27
|
window.leckerliSettings ?? {}
|
|
28
28
|
);
|
|
29
29
|
|
|
30
|
+
// Build the expiration date
|
|
31
|
+
const expirationDate = new Date();
|
|
32
|
+
expirationDate.setMonth(expirationDate.getMonth() + 1);
|
|
33
|
+
|
|
30
34
|
// Define cookie configuration
|
|
31
35
|
const cookieConfig: {
|
|
32
36
|
sameSite: 'strict';
|
|
33
37
|
domain: string;
|
|
38
|
+
expires?: number | Date;
|
|
34
39
|
} = {
|
|
35
40
|
sameSite: 'strict',
|
|
36
41
|
domain: initialState.domain,
|
|
42
|
+
expires: expirationDate, // 1 month by default
|
|
37
43
|
};
|
|
38
44
|
|
|
39
45
|
// Get cookie value
|