@antistatique/leckerli 1.2.1 → 1.2.3

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 CHANGED
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.2.3] - 2023-10-11
10
+ - Add documentation for i18n (first approach)
11
+
12
+ ### Added
13
+ - Add classes to override default settings banner style
14
+
9
15
  ## [1.2.1] - 2023-09-25
10
16
  ### Fixed
11
17
  - Change build system for iife format and more logic scoping (fix "jQuery conflicts")
@@ -69,7 +75,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
69
75
  ### Added
70
76
  - First POC
71
77
 
72
- [Unreleased]: https://github.com/antistatique/leckerli/compare/v1.2.1...HEAD
78
+ [Unreleased]: https://github.com/antistatique/leckerli/compare/v1.2.3...HEAD
79
+ [1.2.3]: https://github.com/antistatique/leckerli/compare/v1.2.1...v1.2.3
73
80
  [1.2.1]: https://github.com/antistatique/leckerli/compare/v1.2.0...v1.2.1
74
81
  [1.2.0]: https://github.com/antistatique/leckerli/compare/v1.1.1...v1.2.0
75
82
  [1.1.1]: https://github.com/antistatique/leckerli/compare/v1.1.0...v1.1.1
package/README.md CHANGED
@@ -264,15 +264,20 @@ You can theme Leckerli with the following CSS custom properties (variables):
264
264
 
265
265
  To override any other style, you can use the following classes:
266
266
 
267
- | Class | Description |
268
- | ----------------------- | ----------------------------------- |
269
- | `.banner-wrapper` | Override the banner display style |
270
- | `.banner-title` | Override the title style |
271
- | `.banner-description` | Override the description style |
272
- | `.banner-btns` | Override the buttons display style |
273
- | `.banner-btn-customise` | Override the customize button style |
274
- | `.banner-btn-accept` | Override the accept button style |
275
- | `.banner-btn-reject` | Override the reject button style |
267
+ | Class | Description |
268
+ | ----------------------- | -------------------------------------------------|
269
+ | `.banner-wrapper` | Override the banner display style |
270
+ | `.banner-title` | Override the title style |
271
+ | `.banner-description` | Override the description style |
272
+ | `.banner-btns` | Override the buttons display style |
273
+ | `.banner-btn-customise` | Override the customize button style |
274
+ | `.banner-btn-accept` | Override the accept button style |
275
+ | `.banner-btn-reject` | Override the reject button style |
276
+ | `.banner-settings-title` | Override the custom settings title style |
277
+ | `.banner-settings-toggle` | Override the custom settings toggle button style |
278
+ | `.banner-settings-description`| Override the custom settings description style |
279
+ | `.banner-settings-save` | Override the custom settings save button style |
280
+ | `.banner-settings-close` | Override the custom settings close button style |
276
281
 
277
282
  ## 🧑‍💻 Contribute
278
283
 
@@ -1 +1 @@
1
- !function(){"use strict";if(window.leckerliSettings.enableGtmAutoLoad){const e=document.createElement("link");e.rel="stylesheet",e.href="//www.unpkg.com/@antistatique/leckerli@1.2.1/dist/assets/leckerli.min.css",document.head.appendChild(e)}if(window.leckerliSettings.enableGtmAutoLoad){const e=document.createElement("script");e.src="//www.unpkg.com/@antistatique/leckerli@1.2.1/dist/assets/leckerli.min.js",document.body.appendChild(e)}document.addEventListener("leckerli:permissions-updated",(e=>{window.leckerliGTMUpdate(e.detail.cookie)}))}();
1
+ !function(){"use strict";if(window.leckerliSettings.enableGtmAutoLoad){const e=document.createElement("link");e.rel="stylesheet",e.href="//www.unpkg.com/@antistatique/leckerli@1.2.3/dist/assets/leckerli.min.css",document.head.appendChild(e)}if(window.leckerliSettings.enableGtmAutoLoad){const e=document.createElement("script");e.src="//www.unpkg.com/@antistatique/leckerli@1.2.3/dist/assets/leckerli.min.js",document.body.appendChild(e)}document.addEventListener("leckerli:permissions-updated",(e=>{window.leckerliGTMUpdate(e.detail.cookie)}))}();
@@ -7,4 +7,4 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var bn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},En=gn.useSyncExternalStore,kn=vn.useRef,Sn=vn.useEffect,Tn=vn.useMemo,xn=vn.useDebugValue;an.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=kn(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=Tn((function(){function e(e){if(!c){if(c=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return l=t}return l=e}if(t=l,bn(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,l=n)}var i,l,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var l=En(e,i[0],i[1]);return Sn((function(){a.hasValue=!0,a.value=l}),[l]),xn(l),l},on.exports=an;var An=nn(on.exports);const{useSyncExternalStoreWithSelector:Nn}=An;let wn=!1;const Cn=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?Je(e):Je)(e):e,n=(e,n)=>function(e,t=e.getState,n){n&&!wn&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),wn=!0);const r=Nn(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return fe(r),r}(t,e,n);return Object.assign(n,t),n},On=Ze({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",settings:[{slug:"analytics_storage",title:"Statistics",description:"Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously."},{slug:"ad_storage",title:"Marketing",description:"Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers."}]},permissions:["analytics_storage","ad_storage"],baseData:{},cookie:{},choiceMade:!1,settingsOpen:!1,domain:window.location.hostname,enableGtmAutoLoad:!1},window.leckerliSettings??{}),Rn=new Date;Rn.setMonth(Rn.getMonth()+1);const Dn={sameSite:"strict",domain:On.domain,expires:Rn},Ln=Ee.get(On.name);On.cookie=$e(Ln)?JSON.parse(Ln):On.permissions.reduce(((e,t)=>({...e,[t]:!1})),On.baseData),On.choiceMade=$e(Ln);const Mn=(In=(e,t)=>({...On,init:()=>{const e=t();Be(Ln)&&e.choiceMade&&Ee.set(e.name,JSON.stringify(e.cookie),Dn),document.dispatchEvent(new CustomEvent("leckerli:initialised",{detail:{cookie:e.choiceMade?e.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(e){const n=t();Ee.set(n.name,JSON.stringify(e),Dn),document.dispatchEvent(new CustomEvent("leckerli:permissions-updated",{detail:{cookie:e}}))},setChoice:t=>e((e=>({...e,choiceMade:t}))),setModal:t=>e((e=>(document.dispatchEvent(new CustomEvent("leckerli:modal-"+(t?"opened":"closed"))),{...e,settingsOpen:t}))),setPermissions:t=>e((e=>{const n=e.permissions.reduce(((e,n)=>({...e,[n]:t[n]??!1})),e.baseData);return e.propagate(n),{...e,choiceMade:!0,cookie:n}})),togglePermission:t=>e((e=>{const n=e.permissions.reduce(((n,r)=>(n[r]=t===r?!$e(e.cookie[r])||!e.cookie[r]:e.cookie[r]??!1,n)),e.baseData);return e.propagate(n),{...e,choiceMade:!0,cookie:n}})),acceptAll:()=>{t().setPermissions(t().permissions.reduce(((e,t)=>({...e,[t]:!0})),{}))},rejectAll:()=>{t().setPermissions(t().permissions.reduce(((e,t)=>({...e,[t]:!1})),{}))}}))?Cn(In):Cn;/*! @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 */var In;const{entries:Pn,setPrototypeOf:Un,isFrozen:jn,getPrototypeOf:Hn,getOwnPropertyDescriptor:Fn}=Object;let{freeze:zn,seal:Wn,create:Bn}=Object,{apply:Vn,construct:qn}="undefined"!=typeof Reflect&&Reflect;Vn||(Vn=function(e,t,n){return e.apply(t,n)}),zn||(zn=function(e){return e}),Wn||(Wn=function(e){return e}),qn||(qn=function(e,t){return new e(...t)});const Gn=or(Array.prototype.forEach),Yn=or(Array.prototype.pop),$n=or(Array.prototype.push),Xn=or(String.prototype.toLowerCase),Kn=or(String.prototype.toString),Zn=or(String.prototype.match),Jn=or(String.prototype.replace),Qn=or(String.prototype.indexOf),er=or(String.prototype.trim),tr=or(RegExp.prototype.test),nr=(rr=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qn(rr,t)});var rr;function or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Vn(e,t,r)}}function ir(e,t,n){var r;n=null!==(r=n)&&void 0!==r?r:Xn,Un&&Un(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(jn(t)||(t[o]=e),r=e)}e[r]=!0}return e}function ar(e){const t=Bn(null);for(const[n,r]of Pn(e))t[n]=r;return t}function lr(e,t){for(;null!==e;){const n=Fn(e,t);if(n){if(n.get)return or(n.get);if("function"==typeof n.value)return or(n.value)}e=Hn(e)}return function(e){return console.warn("fallback value for",e),null}}const cr=zn(["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"]),ur=zn(["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"]),sr=zn(["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"]),fr=zn(["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"]),_r=zn(["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"]),pr=zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dr=zn(["#text"]),mr=zn(["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"]),hr=zn(["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"]),yr=zn(["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"]),vr=zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gr=Wn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),br=Wn(/<%[\w\W]*|[\w\W]*%>/gm),Er=Wn(/\${[\w\W]*}/gm),kr=Wn(/^data-[\-\w.\u00B7-\uFFFF]/),Sr=Wn(/^aria-[\-\w]+$/),Tr=Wn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xr=Wn(/^(?:\w+script|data):/i),Ar=Wn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Nr=Wn(/^html$/i);var wr=Object.freeze({__proto__:null,MUSTACHE_EXPR:gr,ERB_EXPR:br,TMPLIT_EXPR:Er,DATA_ATTR:kr,ARIA_ATTR:Sr,IS_ALLOWED_URI:Tr,IS_SCRIPT_OR_DATA:xr,ATTR_WHITESPACE:Ar,DOCTYPE_NAME:Nr});const Cr=()=>"undefined"==typeof window?null:window;var Or=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cr();const n=t=>e(t);if(n.version="3.0.5",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;const r=t.document,o=r.currentScript;let{document:i}=t;const{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:u,NodeFilter:s,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:_,DOMParser:p,trustedTypes:d}=t,m=u.prototype,h=lr(m,"cloneNode"),y=lr(m,"nextSibling"),v=lr(m,"childNodes"),g=lr(m,"parentNode");if("function"==typeof l){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let b,E="";const{implementation:k,createNodeIterator:S,createDocumentFragment:T,getElementsByTagName:x}=i,{importNode:A}=r;let N={};n.isSupported="function"==typeof Pn&&"function"==typeof g&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:w,ERB_EXPR:C,TMPLIT_EXPR:O,DATA_ATTR:R,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:M}=wr;let{IS_ALLOWED_URI:I}=wr,P=null;const U=ir({},[...cr,...ur,...sr,..._r,...dr]);let j=null;const H=ir({},[...mr,...hr,...yr,...vr]);let F=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}})),z=null,W=null,B=!0,V=!0,q=!1,G=!0,Y=!1,$=!1,X=!1,K=!1,Z=!1,J=!1,Q=!1,ee=!0,te=!1,ne=!0,re=!1,oe={},ie=null;const ae=ir({},["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 le=null;const ce=ir({},["audio","video","img","source","image","track"]);let ue=null;const se=ir({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",_e="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml";let de=pe,me=!1,he=null;const ye=ir({},[fe,_e,pe],Kn);let ve;const ge=["application/xhtml+xml","text/html"];let be,Ee=null;const ke=i.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},Te=function(e){if(!Ee||Ee!==e){if(e&&"object"==typeof e||(e={}),e=ar(e),ve=ve=-1===ge.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,be="application/xhtml+xml"===ve?Kn:Xn,P="ALLOWED_TAGS"in e?ir({},e.ALLOWED_TAGS,be):U,j="ALLOWED_ATTR"in e?ir({},e.ALLOWED_ATTR,be):H,he="ALLOWED_NAMESPACES"in e?ir({},e.ALLOWED_NAMESPACES,Kn):ye,ue="ADD_URI_SAFE_ATTR"in e?ir(ar(se),e.ADD_URI_SAFE_ATTR,be):se,le="ADD_DATA_URI_TAGS"in e?ir(ar(ce),e.ADD_DATA_URI_TAGS,be):ce,ie="FORBID_CONTENTS"in e?ir({},e.FORBID_CONTENTS,be):ae,z="FORBID_TAGS"in e?ir({},e.FORBID_TAGS,be):{},W="FORBID_ATTR"in e?ir({},e.FORBID_ATTR,be):{},oe="USE_PROFILES"in e&&e.USE_PROFILES,B=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,$=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,Q=e.RETURN_TRUSTED_TYPE||!1,K=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,I=e.ALLOWED_URI_REGEXP||Tr,de=e.NAMESPACE||pe,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(V=!1),J&&(Z=!0),oe&&(P=ir({},[...dr]),j=[],!0===oe.html&&(ir(P,cr),ir(j,mr)),!0===oe.svg&&(ir(P,ur),ir(j,hr),ir(j,vr)),!0===oe.svgFilters&&(ir(P,sr),ir(j,hr),ir(j,vr)),!0===oe.mathMl&&(ir(P,_r),ir(j,yr),ir(j,vr))),e.ADD_TAGS&&(P===U&&(P=ar(P)),ir(P,e.ADD_TAGS,be)),e.ADD_ATTR&&(j===H&&(j=ar(j)),ir(j,e.ADD_ATTR,be)),e.ADD_URI_SAFE_ATTR&&ir(ue,e.ADD_URI_SAFE_ATTR,be),e.FORBID_CONTENTS&&(ie===ae&&(ie=ar(ie)),ir(ie,e.FORBID_CONTENTS,be)),ne&&(P["#text"]=!0),$&&ir(P,["html","head","body"]),P.table&&(ir(P,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=e.TRUSTED_TYPES_POLICY,E=b.createHTML("")}else void 0===b&&(b=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(d,o)),null!==b&&"string"==typeof E&&(E=b.createHTML(""));zn&&zn(e),Ee=e}},xe=ir({},["mi","mo","mn","ms","mtext"]),Ae=ir({},["foreignobject","desc","title","annotation-xml"]),Ne=ir({},["title","style","font","a","script"]),we=ir({},ur);ir(we,sr),ir(we,fr);const Ce=ir({},_r);ir(Ce,pr);const Oe=function(e){$n(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Re=function(e,t){try{$n(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){$n(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!j[e])if(Z||J)try{Oe(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t,n;if(K)e="<remove></remove>"+e;else{const t=Zn(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ve&&de===pe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=b?b.createHTML(e):e;if(de===pe)try{t=(new p).parseFromString(r,ve)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(de,"template",null);try{t.documentElement.innerHTML=me?E:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),de===pe?x.call(t,$?"html":"body")[0]:$?t.documentElement:o},Le=function(e){return S.call(e.ownerDocument||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT,null,!1)},Me=function(e){return"object"==typeof c?e instanceof c:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ie=function(e,t,r){N[e]&&Gn(N[e],(e=>{e.call(n,t,r,Ee)}))},Pe=function(e){let t;if(Ie("beforeSanitizeElements",e,null),(r=e)instanceof _&&("string"!=typeof r.nodeName||"string"!=typeof r.textContent||"function"!=typeof r.removeChild||!(r.attributes instanceof f)||"function"!=typeof r.removeAttribute||"function"!=typeof r.setAttribute||"string"!=typeof r.namespaceURI||"function"!=typeof r.insertBefore||"function"!=typeof r.hasChildNodes))return Oe(e),!0;var r;const o=be(e.nodeName);if(Ie("uponSanitizeElement",e,{tagName:o,allowedTags:P}),e.hasChildNodes()&&!Me(e.firstElementChild)&&(!Me(e.content)||!Me(e.content.firstElementChild))&&tr(/<[/\w]/g,e.innerHTML)&&tr(/<[/\w]/g,e.textContent))return Oe(e),!0;if(!P[o]||z[o]){if(!z[o]&&je(o)){if(F.tagNameCheck instanceof RegExp&&tr(F.tagNameCheck,o))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(o))return!1}if(ne&&!ie[o]){const t=g(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r)t.insertBefore(h(n[r],!0),y(e))}}return Oe(e),!0}return e instanceof u&&!function(e){let t=g(e);t&&t.tagName||(t={namespaceURI:de,tagName:"template"});const n=Xn(e.tagName),r=Xn(t.tagName);return!!he[e.namespaceURI]&&(e.namespaceURI===_e?t.namespaceURI===pe?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===r||xe[r]):Boolean(we[n]):e.namespaceURI===fe?t.namespaceURI===pe?"math"===n:t.namespaceURI===_e?"math"===n&&Ae[r]:Boolean(Ce[n]):e.namespaceURI===pe?!(t.namespaceURI===_e&&!Ae[r])&&!(t.namespaceURI===fe&&!xe[r])&&!Ce[n]&&(Ne[n]||!we[n]):!("application/xhtml+xml"!==ve||!he[e.namespaceURI]))}(e)?(Oe(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!tr(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,t=Jn(t,w," "),t=Jn(t,C," "),t=Jn(t,O," "),e.textContent!==t&&($n(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ie("afterSanitizeElements",e,null),!1):(Oe(e),!0)},Ue=function(e,t,n){if(ee&&("id"===t||"name"===t)&&(n in i||n in ke))return!1;if(V&&!W[t]&&tr(R,t));else if(B&&tr(D,t));else if(!j[t]||W[t]){if(!(je(e)&&(F.tagNameCheck instanceof RegExp&&tr(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&tr(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&tr(F.tagNameCheck,n)||F.tagNameCheck instanceof Function&&F.tagNameCheck(n))))return!1}else if(ue[t]);else if(tr(I,Jn(n,M,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Qn(n,"data:")||!le[e]){if(q&&!tr(L,Jn(n,M,"")));else if(n)return!1}else;return!0},je=function(e){return e.indexOf("-")>0},He=function(e){let t,r,o,i;Ie("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:u}=t;if(r="value"===c?t.value:er(t.value),o=be(c),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,Ie("uponSanitizeAttribute",e,l),r=l.attrValue,l.forceKeepAttr)continue;if(Re(c,e),!l.keepAttr)continue;if(!G&&tr(/\/>/i,r)){Re(c,e);continue}Y&&(r=Jn(r,w," "),r=Jn(r,C," "),r=Jn(r,O," "));const s=be(e.nodeName);if(Ue(s,o,r)){if(!te||"id"!==o&&"name"!==o||(Re(c,e),r="user-content-"+r),b&&"object"==typeof d&&"function"==typeof d.getAttributeType)if(u);else switch(d.getAttributeType(s,o)){case"TrustedHTML":r=b.createHTML(r);break;case"TrustedScriptURL":r=b.createScriptURL(r)}try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),Yn(n.removed)}catch(e){}}}Ie("afterSanitizeAttributes",e,null)},Fe=function e(t){let n;const r=Le(t);for(Ie("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Ie("uponSanitizeShadowNode",n,null),Pe(n)||(n.content instanceof a&&e(n.content),He(n));Ie("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t,o,i,l,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Me(e)){if("function"!=typeof e.toString)throw nr("toString is not a function");if("string"!=typeof(e=e.toString()))throw nr("dirty is not a string, aborting")}if(!n.isSupported)return e;if(X||Te(u),n.removed=[],"string"==typeof e&&(re=!1),re){if(e.nodeName){const t=be(e.nodeName);if(!P[t]||z[t])throw nr("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)t=De("\x3c!----\x3e"),o=t.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?t=o:t.appendChild(o);else{if(!Z&&!Y&&!$&&-1===e.indexOf("<"))return b&&Q?b.createHTML(e):e;if(t=De(e),!t)return Z?null:Q?E:""}t&&K&&Oe(t.firstChild);const s=Le(re?e:t);for(;i=s.nextNode();)Pe(i)||(i.content instanceof a&&Fe(i.content),He(i));if(re)return e;if(Z){if(J)for(l=T.call(t.ownerDocument);t.firstChild;)l.appendChild(t.firstChild);else l=t;return(j.shadowroot||j.shadowrootmode)&&(l=A.call(r,l,!0)),l}let f=$?t.outerHTML:t.innerHTML;return $&&P["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&tr(Nr,t.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+f),Y&&(f=Jn(f,w," "),f=Jn(f,C," "),f=Jn(f,O," ")),b&&Q?b.createHTML(f):f},n.setConfig=function(e){Te(e),X=!0},n.clearConfig=function(){Ee=null,X=!1},n.isValidAttribute=function(e,t,n){Ee||Te({});const r=be(e),o=be(t);return Ue(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(N[e]=N[e]||[],$n(N[e],t))},n.removeHook=function(e){if(N[e])return Yn(N[e])},n.removeHooks=function(e){N[e]&&(N[e]=[])},n.removeAllHooks=function(){N={}},n}();const Rr=()=>{const{banner:e,acceptAll:t,rejectAll:n,setModal:r}=Mn();return W("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&&W("h3",{className:"m-0 text-lg font-semibold font-primary md:text-xl banner-title",children:e.title}),e.description&&W("p",{className:"m-0 text-sm leading-snug font-primary md:text-base banner-description",dangerouslySetInnerHTML:{__html:Or.sanitize(e.description,{USE_PROFILES:{html:!0},ALLOWED_TAGS:["b","i","em","strong","p","ul","li","ol","span","h2","h3","h4","h5","h6","a","div"],ALLOWED_ATTR:["href","target"]})}}),W("div",{className:"pt-2 space-y-2 banner-btns",children:[!Ge(e.settings)&&W("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}),W("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}),W("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})]})]})},Dr=()=>{const{cookie:e,setPermissions:t,banner:n,setModal:r}=Mn(),[o,i]=ne(e);return W("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:[W("div",{className:"space-y-6",children:[W("h3",{className:"w-10/12 m-0 text-xl font-semibold font-primary md:text-2xl",children:n.customise}),n.settings.map((({slug:e,title:t,description:n})=>W("div",{children:[W("div",{className:"flex items-start justify-between",children:[W("h3",{className:"m-0 text-lg font-semibold font-primary",children:t}),W("button",{type:"button",className:(o[e]?"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:()=>i({...o,[e]:!o[e]}),children:[W("span",{className:"sr-only",children:"Toggle"}),W("span",{"aria-hidden":"true",className:(o[e]?"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"})]})]}),W("p",{className:"m-0 mt-2 text-sm leading-snug font-primary md:text-base",children:n})]},`setting-${e}`))),W("div",{className:"pt-4",children:W("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(o),r(!1)},children:n.save})})]}),W("button",{type:"button",className:"absolute top-0 right-0 w-8 h-8 mt-0 text-xl rounded-full",onClick:()=>r(!1),children:"×"})]})},Lr=document.createElement("div");Lr.id="lkrl-wrapper",document.body.appendChild(Lr),U(W((()=>{const{choiceMade:e,init:t,settingsOpen:n}=Mn();return oe((()=>{t()}),[]),W(y,{children:[!e&&!n&&W(Rr,{}),n&&W(Dr,{})]})}),{}),Lr)}();
10
+ */var bn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},En=gn.useSyncExternalStore,kn=vn.useRef,Sn=vn.useEffect,Tn=vn.useMemo,xn=vn.useDebugValue;an.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=kn(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=Tn((function(){function e(e){if(!c){if(c=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return l=t}return l=e}if(t=l,bn(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,l=n)}var i,l,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var l=En(e,i[0],i[1]);return Sn((function(){a.hasValue=!0,a.value=l}),[l]),xn(l),l},on.exports=an;var An=nn(on.exports);const{useSyncExternalStoreWithSelector:Nn}=An;let wn=!1;const Cn=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?Je(e):Je)(e):e,n=(e,n)=>function(e,t=e.getState,n){n&&!wn&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),wn=!0);const r=Nn(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return fe(r),r}(t,e,n);return Object.assign(n,t),n},On=Ze({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",settings:[{slug:"analytics_storage",title:"Statistics",description:"Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously."},{slug:"ad_storage",title:"Marketing",description:"Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers."}]},permissions:["analytics_storage","ad_storage"],baseData:{},cookie:{},choiceMade:!1,settingsOpen:!1,domain:window.location.hostname,enableGtmAutoLoad:!1},window.leckerliSettings??{}),Rn=new Date;Rn.setMonth(Rn.getMonth()+1);const Dn={sameSite:"strict",domain:On.domain,expires:Rn},Ln=Ee.get(On.name);On.cookie=$e(Ln)?JSON.parse(Ln):On.permissions.reduce(((e,t)=>({...e,[t]:!1})),On.baseData),On.choiceMade=$e(Ln);const Mn=(In=(e,t)=>({...On,init:()=>{const e=t();Be(Ln)&&e.choiceMade&&Ee.set(e.name,JSON.stringify(e.cookie),Dn),document.dispatchEvent(new CustomEvent("leckerli:initialised",{detail:{cookie:e.choiceMade?e.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(e){const n=t();Ee.set(n.name,JSON.stringify(e),Dn),document.dispatchEvent(new CustomEvent("leckerli:permissions-updated",{detail:{cookie:e}}))},setChoice:t=>e((e=>({...e,choiceMade:t}))),setModal:t=>e((e=>(document.dispatchEvent(new CustomEvent("leckerli:modal-"+(t?"opened":"closed"))),{...e,settingsOpen:t}))),setPermissions:t=>e((e=>{const n=e.permissions.reduce(((e,n)=>({...e,[n]:t[n]??!1})),e.baseData);return e.propagate(n),{...e,choiceMade:!0,cookie:n}})),togglePermission:t=>e((e=>{const n=e.permissions.reduce(((n,r)=>(n[r]=t===r?!$e(e.cookie[r])||!e.cookie[r]:e.cookie[r]??!1,n)),e.baseData);return e.propagate(n),{...e,choiceMade:!0,cookie:n}})),acceptAll:()=>{t().setPermissions(t().permissions.reduce(((e,t)=>({...e,[t]:!0})),{}))},rejectAll:()=>{t().setPermissions(t().permissions.reduce(((e,t)=>({...e,[t]:!1})),{}))}}))?Cn(In):Cn;/*! @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 */var In;const{entries:Pn,setPrototypeOf:Un,isFrozen:jn,getPrototypeOf:Hn,getOwnPropertyDescriptor:Fn}=Object;let{freeze:zn,seal:Wn,create:Bn}=Object,{apply:Vn,construct:qn}="undefined"!=typeof Reflect&&Reflect;Vn||(Vn=function(e,t,n){return e.apply(t,n)}),zn||(zn=function(e){return e}),Wn||(Wn=function(e){return e}),qn||(qn=function(e,t){return new e(...t)});const Gn=or(Array.prototype.forEach),Yn=or(Array.prototype.pop),$n=or(Array.prototype.push),Xn=or(String.prototype.toLowerCase),Kn=or(String.prototype.toString),Zn=or(String.prototype.match),Jn=or(String.prototype.replace),Qn=or(String.prototype.indexOf),er=or(String.prototype.trim),tr=or(RegExp.prototype.test),nr=(rr=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qn(rr,t)});var rr;function or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Vn(e,t,r)}}function ir(e,t,n){var r;n=null!==(r=n)&&void 0!==r?r:Xn,Un&&Un(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(jn(t)||(t[o]=e),r=e)}e[r]=!0}return e}function ar(e){const t=Bn(null);for(const[n,r]of Pn(e))t[n]=r;return t}function lr(e,t){for(;null!==e;){const n=Fn(e,t);if(n){if(n.get)return or(n.get);if("function"==typeof n.value)return or(n.value)}e=Hn(e)}return function(e){return console.warn("fallback value for",e),null}}const cr=zn(["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"]),ur=zn(["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"]),sr=zn(["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"]),fr=zn(["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"]),_r=zn(["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"]),pr=zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dr=zn(["#text"]),mr=zn(["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"]),hr=zn(["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"]),yr=zn(["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"]),vr=zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gr=Wn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),br=Wn(/<%[\w\W]*|[\w\W]*%>/gm),Er=Wn(/\${[\w\W]*}/gm),kr=Wn(/^data-[\-\w.\u00B7-\uFFFF]/),Sr=Wn(/^aria-[\-\w]+$/),Tr=Wn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xr=Wn(/^(?:\w+script|data):/i),Ar=Wn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Nr=Wn(/^html$/i);var wr=Object.freeze({__proto__:null,MUSTACHE_EXPR:gr,ERB_EXPR:br,TMPLIT_EXPR:Er,DATA_ATTR:kr,ARIA_ATTR:Sr,IS_ALLOWED_URI:Tr,IS_SCRIPT_OR_DATA:xr,ATTR_WHITESPACE:Ar,DOCTYPE_NAME:Nr});const Cr=()=>"undefined"==typeof window?null:window;var Or=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cr();const n=t=>e(t);if(n.version="3.0.5",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;const r=t.document,o=r.currentScript;let{document:i}=t;const{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:u,NodeFilter:s,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:_,DOMParser:p,trustedTypes:d}=t,m=u.prototype,h=lr(m,"cloneNode"),y=lr(m,"nextSibling"),v=lr(m,"childNodes"),g=lr(m,"parentNode");if("function"==typeof l){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let b,E="";const{implementation:k,createNodeIterator:S,createDocumentFragment:T,getElementsByTagName:x}=i,{importNode:A}=r;let N={};n.isSupported="function"==typeof Pn&&"function"==typeof g&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:w,ERB_EXPR:C,TMPLIT_EXPR:O,DATA_ATTR:R,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:M}=wr;let{IS_ALLOWED_URI:I}=wr,P=null;const U=ir({},[...cr,...ur,...sr,..._r,...dr]);let j=null;const H=ir({},[...mr,...hr,...yr,...vr]);let F=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}})),z=null,W=null,B=!0,V=!0,q=!1,G=!0,Y=!1,$=!1,X=!1,K=!1,Z=!1,J=!1,Q=!1,ee=!0,te=!1,ne=!0,re=!1,oe={},ie=null;const ae=ir({},["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 le=null;const ce=ir({},["audio","video","img","source","image","track"]);let ue=null;const se=ir({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",_e="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml";let de=pe,me=!1,he=null;const ye=ir({},[fe,_e,pe],Kn);let ve;const ge=["application/xhtml+xml","text/html"];let be,Ee=null;const ke=i.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},Te=function(e){if(!Ee||Ee!==e){if(e&&"object"==typeof e||(e={}),e=ar(e),ve=ve=-1===ge.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,be="application/xhtml+xml"===ve?Kn:Xn,P="ALLOWED_TAGS"in e?ir({},e.ALLOWED_TAGS,be):U,j="ALLOWED_ATTR"in e?ir({},e.ALLOWED_ATTR,be):H,he="ALLOWED_NAMESPACES"in e?ir({},e.ALLOWED_NAMESPACES,Kn):ye,ue="ADD_URI_SAFE_ATTR"in e?ir(ar(se),e.ADD_URI_SAFE_ATTR,be):se,le="ADD_DATA_URI_TAGS"in e?ir(ar(ce),e.ADD_DATA_URI_TAGS,be):ce,ie="FORBID_CONTENTS"in e?ir({},e.FORBID_CONTENTS,be):ae,z="FORBID_TAGS"in e?ir({},e.FORBID_TAGS,be):{},W="FORBID_ATTR"in e?ir({},e.FORBID_ATTR,be):{},oe="USE_PROFILES"in e&&e.USE_PROFILES,B=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,$=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,Q=e.RETURN_TRUSTED_TYPE||!1,K=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,I=e.ALLOWED_URI_REGEXP||Tr,de=e.NAMESPACE||pe,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(V=!1),J&&(Z=!0),oe&&(P=ir({},[...dr]),j=[],!0===oe.html&&(ir(P,cr),ir(j,mr)),!0===oe.svg&&(ir(P,ur),ir(j,hr),ir(j,vr)),!0===oe.svgFilters&&(ir(P,sr),ir(j,hr),ir(j,vr)),!0===oe.mathMl&&(ir(P,_r),ir(j,yr),ir(j,vr))),e.ADD_TAGS&&(P===U&&(P=ar(P)),ir(P,e.ADD_TAGS,be)),e.ADD_ATTR&&(j===H&&(j=ar(j)),ir(j,e.ADD_ATTR,be)),e.ADD_URI_SAFE_ATTR&&ir(ue,e.ADD_URI_SAFE_ATTR,be),e.FORBID_CONTENTS&&(ie===ae&&(ie=ar(ie)),ir(ie,e.FORBID_CONTENTS,be)),ne&&(P["#text"]=!0),$&&ir(P,["html","head","body"]),P.table&&(ir(P,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=e.TRUSTED_TYPES_POLICY,E=b.createHTML("")}else void 0===b&&(b=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(d,o)),null!==b&&"string"==typeof E&&(E=b.createHTML(""));zn&&zn(e),Ee=e}},xe=ir({},["mi","mo","mn","ms","mtext"]),Ae=ir({},["foreignobject","desc","title","annotation-xml"]),Ne=ir({},["title","style","font","a","script"]),we=ir({},ur);ir(we,sr),ir(we,fr);const Ce=ir({},_r);ir(Ce,pr);const Oe=function(e){$n(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Re=function(e,t){try{$n(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){$n(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!j[e])if(Z||J)try{Oe(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t,n;if(K)e="<remove></remove>"+e;else{const t=Zn(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ve&&de===pe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=b?b.createHTML(e):e;if(de===pe)try{t=(new p).parseFromString(r,ve)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(de,"template",null);try{t.documentElement.innerHTML=me?E:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),de===pe?x.call(t,$?"html":"body")[0]:$?t.documentElement:o},Le=function(e){return S.call(e.ownerDocument||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT,null,!1)},Me=function(e){return"object"==typeof c?e instanceof c:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ie=function(e,t,r){N[e]&&Gn(N[e],(e=>{e.call(n,t,r,Ee)}))},Pe=function(e){let t;if(Ie("beforeSanitizeElements",e,null),(r=e)instanceof _&&("string"!=typeof r.nodeName||"string"!=typeof r.textContent||"function"!=typeof r.removeChild||!(r.attributes instanceof f)||"function"!=typeof r.removeAttribute||"function"!=typeof r.setAttribute||"string"!=typeof r.namespaceURI||"function"!=typeof r.insertBefore||"function"!=typeof r.hasChildNodes))return Oe(e),!0;var r;const o=be(e.nodeName);if(Ie("uponSanitizeElement",e,{tagName:o,allowedTags:P}),e.hasChildNodes()&&!Me(e.firstElementChild)&&(!Me(e.content)||!Me(e.content.firstElementChild))&&tr(/<[/\w]/g,e.innerHTML)&&tr(/<[/\w]/g,e.textContent))return Oe(e),!0;if(!P[o]||z[o]){if(!z[o]&&je(o)){if(F.tagNameCheck instanceof RegExp&&tr(F.tagNameCheck,o))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(o))return!1}if(ne&&!ie[o]){const t=g(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r)t.insertBefore(h(n[r],!0),y(e))}}return Oe(e),!0}return e instanceof u&&!function(e){let t=g(e);t&&t.tagName||(t={namespaceURI:de,tagName:"template"});const n=Xn(e.tagName),r=Xn(t.tagName);return!!he[e.namespaceURI]&&(e.namespaceURI===_e?t.namespaceURI===pe?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===r||xe[r]):Boolean(we[n]):e.namespaceURI===fe?t.namespaceURI===pe?"math"===n:t.namespaceURI===_e?"math"===n&&Ae[r]:Boolean(Ce[n]):e.namespaceURI===pe?!(t.namespaceURI===_e&&!Ae[r])&&!(t.namespaceURI===fe&&!xe[r])&&!Ce[n]&&(Ne[n]||!we[n]):!("application/xhtml+xml"!==ve||!he[e.namespaceURI]))}(e)?(Oe(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!tr(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,t=Jn(t,w," "),t=Jn(t,C," "),t=Jn(t,O," "),e.textContent!==t&&($n(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ie("afterSanitizeElements",e,null),!1):(Oe(e),!0)},Ue=function(e,t,n){if(ee&&("id"===t||"name"===t)&&(n in i||n in ke))return!1;if(V&&!W[t]&&tr(R,t));else if(B&&tr(D,t));else if(!j[t]||W[t]){if(!(je(e)&&(F.tagNameCheck instanceof RegExp&&tr(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&tr(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&tr(F.tagNameCheck,n)||F.tagNameCheck instanceof Function&&F.tagNameCheck(n))))return!1}else if(ue[t]);else if(tr(I,Jn(n,M,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Qn(n,"data:")||!le[e]){if(q&&!tr(L,Jn(n,M,"")));else if(n)return!1}else;return!0},je=function(e){return e.indexOf("-")>0},He=function(e){let t,r,o,i;Ie("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:u}=t;if(r="value"===c?t.value:er(t.value),o=be(c),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,Ie("uponSanitizeAttribute",e,l),r=l.attrValue,l.forceKeepAttr)continue;if(Re(c,e),!l.keepAttr)continue;if(!G&&tr(/\/>/i,r)){Re(c,e);continue}Y&&(r=Jn(r,w," "),r=Jn(r,C," "),r=Jn(r,O," "));const s=be(e.nodeName);if(Ue(s,o,r)){if(!te||"id"!==o&&"name"!==o||(Re(c,e),r="user-content-"+r),b&&"object"==typeof d&&"function"==typeof d.getAttributeType)if(u);else switch(d.getAttributeType(s,o)){case"TrustedHTML":r=b.createHTML(r);break;case"TrustedScriptURL":r=b.createScriptURL(r)}try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),Yn(n.removed)}catch(e){}}}Ie("afterSanitizeAttributes",e,null)},Fe=function e(t){let n;const r=Le(t);for(Ie("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Ie("uponSanitizeShadowNode",n,null),Pe(n)||(n.content instanceof a&&e(n.content),He(n));Ie("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t,o,i,l,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Me(e)){if("function"!=typeof e.toString)throw nr("toString is not a function");if("string"!=typeof(e=e.toString()))throw nr("dirty is not a string, aborting")}if(!n.isSupported)return e;if(X||Te(u),n.removed=[],"string"==typeof e&&(re=!1),re){if(e.nodeName){const t=be(e.nodeName);if(!P[t]||z[t])throw nr("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)t=De("\x3c!----\x3e"),o=t.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?t=o:t.appendChild(o);else{if(!Z&&!Y&&!$&&-1===e.indexOf("<"))return b&&Q?b.createHTML(e):e;if(t=De(e),!t)return Z?null:Q?E:""}t&&K&&Oe(t.firstChild);const s=Le(re?e:t);for(;i=s.nextNode();)Pe(i)||(i.content instanceof a&&Fe(i.content),He(i));if(re)return e;if(Z){if(J)for(l=T.call(t.ownerDocument);t.firstChild;)l.appendChild(t.firstChild);else l=t;return(j.shadowroot||j.shadowrootmode)&&(l=A.call(r,l,!0)),l}let f=$?t.outerHTML:t.innerHTML;return $&&P["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&tr(Nr,t.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+f),Y&&(f=Jn(f,w," "),f=Jn(f,C," "),f=Jn(f,O," ")),b&&Q?b.createHTML(f):f},n.setConfig=function(e){Te(e),X=!0},n.clearConfig=function(){Ee=null,X=!1},n.isValidAttribute=function(e,t,n){Ee||Te({});const r=be(e),o=be(t);return Ue(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(N[e]=N[e]||[],$n(N[e],t))},n.removeHook=function(e){if(N[e])return Yn(N[e])},n.removeHooks=function(e){N[e]&&(N[e]=[])},n.removeAllHooks=function(){N={}},n}();const Rr=()=>{const{banner:e,acceptAll:t,rejectAll:n,setModal:r}=Mn();return W("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&&W("h3",{className:"m-0 text-lg font-semibold font-primary md:text-xl banner-title",children:e.title}),e.description&&W("p",{className:"m-0 text-sm leading-snug font-primary md:text-base banner-description",dangerouslySetInnerHTML:{__html:Or.sanitize(e.description,{USE_PROFILES:{html:!0},ALLOWED_TAGS:["b","i","em","strong","p","ul","li","ol","span","h2","h3","h4","h5","h6","a","div"],ALLOWED_ATTR:["href","target"]})}}),W("div",{className:"pt-2 space-y-2 banner-btns",children:[!Ge(e.settings)&&W("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}),W("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}),W("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})]})]})},Dr=()=>{const{cookie:e,setPermissions:t,banner:n,setModal:r}=Mn(),[o,i]=ne(e);return W("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 banner-wrapper",children:[W("div",{className:"space-y-6",children:[W("h3",{className:"w-10/12 m-0 text-xl font-semibold font-primary md:text-2xl banner-title",children:n.customise}),n.settings.map((({slug:e,title:t,description:n})=>W("div",{children:[W("div",{className:"flex items-start justify-between",children:[W("h3",{className:"m-0 text-lg font-semibold font-primary banner-settings-title",children:t}),W("button",{type:"button",className:(o[e]?"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 banner-settings-toggle",role:"switch","aria-checked":"false",onClick:()=>i({...o,[e]:!o[e]}),children:[W("span",{className:"sr-only",children:"Toggle"}),W("span",{"aria-hidden":"true",className:(o[e]?"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"})]})]}),W("p",{className:"m-0 mt-2 text-sm leading-snug font-primary md:text-base banner-settings-description",children:n})]},`setting-${e}`))),W("div",{className:"pt-4",children:W("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-settings-save",onClick:()=>{t(o),r(!1)},children:n.save})})]}),W("button",{type:"button",className:"absolute top-0 right-0 w-8 h-8 mt-0 text-xl rounded-full banner-settings-close",onClick:()=>r(!1),children:"×"})]})},Lr=document.createElement("div");Lr.id="lkrl-wrapper",document.body.appendChild(Lr),U(W((()=>{const{choiceMade:e,init:t,settingsOpen:n}=Mn();return oe((()=>{t()}),[]),W(y,{children:[!e&&!n&&W(Rr,{}),n&&W(Dr,{})]})}),{}),Lr)}();
@@ -42,6 +42,42 @@ If you need to fire a tag when the user's consent settings are updated, you can
42
42
  4. Set the _Event name_ value to `leckerliConsentUpdate`.
43
43
  5. Click on the _Save_ button and set _Leckerli Consent Update_ as trigger name.
44
44
 
45
+ ### (Optional) Manage Internationalisation
46
+
47
+ Using the html[lang] attribute, a _Trigger_ and a _Tag_ dedicated for each language can be created.
48
+
49
+ 1. Create a _Custom variable_ type _DOM element_ with "Element selector" : html and "Attribute name": lang
50
+ 2. For each language
51
+ 1. Create a _Trigger_ type "Consent Initialization" which fire only on your custom variable = your language code
52
+ 2. Create a _Tag_ type "Leckerli Cookie Banner" with json configuration according to your language strings
53
+
54
+ #### JSON configuration auf deutsch
55
+
56
+ ```
57
+ {
58
+ "banner": {
59
+ "title": "Wir respektieren Ihre Privatsphäre.",
60
+ "description": "Wir verwenden Cookies, um Ihr Surf-Erlebnis zu verbessern, personalisierte Anzeigen oder Inhalte zu schalten und unseren Verkehr zu analysieren. Durch Klicken auf „Alles akzeptieren“ stimmen Sie unserer Verwendung von Cookies zu.",
61
+ "accept": "Alles akzeptieren",
62
+ "reject": "Alles ablehnen",
63
+ "customise": "Anpassen",
64
+ "save": "Speichern",
65
+ "settings": [
66
+ {
67
+ "slug": "analytics_storage",
68
+ "title": "Google Analytics",
69
+ "description": "Google Analytics ermöglicht es, das Verhalten von Website-Besuchern zu messen und zu analysieren, indem es Schlüsseldaten über ihre Herkunft, Navigation und Engagement liefert, um die Website zu optimieren und das Benutzererlebnis zu verbessern."
70
+ }
71
+ ]
72
+ },
73
+ "permissions": [
74
+ "analytics_storage"
75
+ ]
76
+ }
77
+
78
+ ```
79
+
80
+
45
81
  ## Configuration
46
82
 
47
83
  ### How to configure Leckerli with GTM
@@ -20,7 +20,7 @@ const DEFAULT_CONSENT_STATE = {
20
20
  const ALLOWED_CONSENT_STATE = Object.keys(DEFAULT_CONSENT_STATE);
21
21
  const CONSENT_UPDATE_CUSTOM_EVENT = 'leckerliConsentUpdate';
22
22
  const COOKIE_NAME = 'gtm-leckerli';
23
- const LECKERLI_JS_URL = 'https://www.unpkg.com/@antistatique/leckerli@1.2/dist/assets/leckerli-gtm.min.js'
23
+ const LECKERLI_JS_URL = 'https://www.unpkg.com/@antistatique/leckerli@1.2/dist/assets/leckerli-gtm.min.js';
24
24
 
25
25
  /**
26
26
  * Used to merge an object in another.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antistatique/leckerli",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Lightweight and customisable GDPR cookie consent manager",
5
5
  "private": false,
6
6
  "repository": "https://github.com/antistatique/leckerli",
@@ -7,16 +7,16 @@ const Settings = () => {
7
7
  const [cookieProxy, setCookieProxy] = useState(cookie);
8
8
 
9
9
  return (
10
- <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">
10
+ <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 banner-wrapper">
11
11
  <div className="space-y-6">
12
- <h3 className="w-10/12 m-0 text-xl font-semibold font-primary md:text-2xl">
12
+ <h3 className="w-10/12 m-0 text-xl font-semibold font-primary md:text-2xl banner-title">
13
13
  {banner.customise}
14
14
  </h3>
15
15
 
16
16
  {banner.settings.map(({ slug, title, description }) => (
17
17
  <div key={`setting-${slug}`}>
18
18
  <div className="flex items-start justify-between">
19
- <h3 className="m-0 text-lg font-semibold font-primary">
19
+ <h3 className="m-0 text-lg font-semibold font-primary banner-settings-title">
20
20
  {title}
21
21
  </h3>
22
22
 
@@ -24,7 +24,7 @@ const Settings = () => {
24
24
  type="button"
25
25
  className={`${
26
26
  cookieProxy[slug] ? 'bg-primary' : 'bg-gray-200'
27
- } 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`}
27
+ } 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 banner-settings-toggle`}
28
28
  role="switch"
29
29
  aria-checked="false"
30
30
  onClick={() =>
@@ -41,7 +41,7 @@ const Settings = () => {
41
41
  </button>
42
42
  </div>
43
43
 
44
- <p className="m-0 mt-2 text-sm leading-snug font-primary md:text-base">
44
+ <p className="m-0 mt-2 text-sm leading-snug font-primary md:text-base banner-settings-description">
45
45
  {description}
46
46
  </p>
47
47
  </div>
@@ -50,7 +50,7 @@ const Settings = () => {
50
50
  <div className="pt-4">
51
51
  <button
52
52
  type="button"
53
- 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"
53
+ 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-settings-save"
54
54
  onClick={() => {
55
55
  setPermissions(cookieProxy);
56
56
  setModal(false);
@@ -62,7 +62,7 @@ const Settings = () => {
62
62
  </div>
63
63
  <button
64
64
  type="button"
65
- className="absolute top-0 right-0 w-8 h-8 mt-0 text-xl rounded-full"
65
+ className="absolute top-0 right-0 w-8 h-8 mt-0 text-xl rounded-full banner-settings-close"
66
66
  onClick={() => setModal(false)}
67
67
  >
68
68
  &times;
package/__index.html DELETED
@@ -1,50 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>🍪 Leckerli</title>
7
- </head>
8
- <body style="background: #cbd5e1; display: grid; place-content: center; font-family: sans-serif; min-height: 100vh;">
9
- <h1>Your website here 🤗</h1>
10
- <a href="gtm-basic.html">Go to GTM-Basic.</a>
11
- <script defer type="module" src="/src/index.tsx"></script>
12
-
13
- <script>
14
- // To listen the initialisation
15
- document.addEventListener('leckerli:initialised', (event) => {
16
- // to get cookie data OR null if the user's choice has not been made
17
- console.log('init', event.detail.cookie);
18
- });
19
-
20
- // To listen to the permissions / cookie's updates
21
- document.addEventListener('leckerli:permissions-updated', (event) => {
22
- // to get cookie data
23
- console.log('update', event.detail.cookie);
24
- });
25
-
26
- // To listen the modal states
27
- document.addEventListener('leckerli:modal-opened', () => {
28
- // react to modal opened
29
- console.log('modal opened')
30
- });
31
- document.addEventListener('leckerli:modal-closed', () => {
32
- // react to modal closed
33
- console.log('modal closed')
34
- });
35
- </script>
36
-
37
- <style>
38
- /*
39
- :root {
40
- --leckerli-foreground: #fff;
41
- --leckerli-background: #000;
42
- --leckerli-primary: #ff0099;
43
- --leckerli-primary-hover: #d1007e;
44
- --leckerli-primary-active: #9D005F;
45
- --leckerli-font: sans-serif;
46
- }
47
- */
48
- </style>
49
- </body>
50
- </html>