${o.message}
${o.info.split('\n').map((line, i, arr)=>`${line}
- ${arr.length > 1 && o.enableMore && i == 0 ? `${o.more}` : ''}`).join('')}
+ ${arr.length > 1 && o.enableMore && i == 0 ? `${o.more}` : ''}`).join('')}
${o.sections.map((section)=>{
let hasConsent = getConsents()[section];
diff --git a/dist/biscuitman.min.css b/dist/biscuitman.min.css
index dbf360a..09572a5 100644
--- a/dist/biscuitman.min.css
+++ b/dist/biscuitman.min.css
@@ -1 +1 @@
-/*! biscuitman.js 0.5.2 */.biscuitman{--ui:0,0,0;--tx:#444;--bg:#fff;--c:#105d89;background:var(--bg);box-sizing:border-box;z-index:3;width:100%;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;display:none;position:fixed;bottom:0;box-shadow:0 -2px 10px #00000029}.bm-show .biscuitman{display:block}.biscuitman *{box-sizing:border-box;color:var(--tx);margin:0;padding:0;font-family:inherit;font-size:16px;line-height:1.4em}.biscuitman:has([open]){transform:translateY(100%)}.biscuitman article{padding:0;position:relative}@media (min-width:770px){.biscuitman article{padding-right:calc(max(300px,30vw) + 20px)}.biscuitman article nav{width:30vw;min-width:300px;position:absolute;bottom:50%;right:0;transform:translateY(50%)}}.biscuitman article p{color:var(--tx);margin:10px 0;font-size:13px}@media (min-width:575px){.biscuitman article p{font-size:14px}}.biscuitman button{background:var(--bg);border:2px solid var(--c);color:var(--c);cursor:pointer;border-radius:3px;margin-top:10px;padding:.8em;font-size:13px;line-height:1em}.biscuitman button[data-id=accept]{background:var(--c);color:var(--bg)!important}.biscuitman button[data-id=close]{color:rgba(var(--ui),.5);opacity:.6;-webkit-user-select:none;user-select:none;z-index:2;background:0 0;border:none;outline:none;padding:10px;font-size:24px;line-height:1em;position:absolute;top:0;right:10px}.biscuitman button[disabled]{display:none}.biscuitman button:hover{opacity:.8}@media (min-width:576px){.biscuitman nav{flex-direction:row-reverse;gap:10px;width:100%;display:flex}.biscuitman nav button{flex-grow:1;margin-bottom:0}}@media (max-width:575px){.biscuitman nav{flex-direction:column;flex-grow:1;display:flex}}.biscuitman dialog{background:var(--bg);border:0;width:100%;max-width:100%;height:100%;max-height:100%}@media (min-width:576px){.biscuitman dialog{border-radius:10px;width:90vw;max-width:860px;max-height:80vh;margin:auto;box-shadow:0 0 8px #0000004d}}@media (min-width:576px) and (min-height:1134px){.biscuitman dialog{max-height:950px}}.biscuitman dialog nav{justify-self:flex-end;position:relative}.biscuitman .bm-dialog{flex-direction:column;height:100%;padding:20px;display:flex}.biscuitman .bm-dialog b{padding-bottom:8px;position:relative}.biscuitman .bm-dialog>b:after{content:"";background:linear-gradient(180deg,var(--bg)20%,#fff0);pointer-events:none;z-index:1;width:100%;height:25px;margin-bottom:-24px;position:absolute;bottom:0;left:0}.biscuitman .bm-dialog nav:after{content:"";background:linear-gradient(0deg,var(--bg)20%,#fff0);pointer-events:none;width:100%;height:25px;position:absolute;top:-24px;left:0}.biscuitman .bm-sections{scrollbar-color:rgba(var(--ui),.2)var(--bg);flex-shrink:1;height:100%;padding:15px 0;position:relative;overflow-y:scroll}@media (min-width:576px){.biscuitman .bm-sections{margin-right:-18px;padding-right:4px}}.biscuitman .bm-sections>p{padding-right:30px;font-size:13px;line-height:18px}@media (min-width:576px){.biscuitman .bm-sections>p{font-size:14px}}.biscuitman .bm-sections>p span{font-size:inherit;padding-bottom:5px;display:inline-block}.biscuitman .bm-sections>p [data-id=more]~span{display:none}.biscuitman a{font-size:inherit;color:var(--c);cursor:pointer;text-decoration:none;display:inline-block}.biscuitman a:hover{text-decoration:underline}.biscuitman section{margin-bottom:10px;position:relative}.biscuitman section:first-of-type{margin-top:10px}.biscuitman details{border:1px solid rgba(var(--ui),.2);border-radius:5px;padding:10px;list-style:none;box-shadow:0 2px 4px #0000001a}.biscuitman details[open] summary b:after{margin:-3px 0 0 -2px;transform:rotate(45deg)scale(.3)}.biscuitman summary{cursor:pointer;flex-direction:column;width:100%;padding:5px 80px 10px 10px;list-style:none;display:flex;position:relative}.biscuitman summary b{margin-bottom:3px}.biscuitman summary b:after{content:"";border:5px solid rgba(var(--ui),.4);border-top-color:#0000;border-left-color:#0000;border-radius:2px;width:1em;height:1em;margin:-2px 0 0 -4px;display:block;transform:rotate(-45deg)scale(.3)}.biscuitman summary p{color:var(--tx);font-size:14px}.biscuitman summary>*{display:inline-flex}.biscuitman summary::marker{display:none}.biscuitman summary::-webkit-details-marker{display:none}.biscuitman dl{background:rgba(var(--ui),.08);margin:10px;padding:10px;display:flex}.biscuitman dl dt,.biscuitman dl dd{color:var(--tx);font-size:12px}.biscuitman dl dt{min-width:120px;padding-right:30px;font-weight:700}.biscuitman label{--height:1.2em;--width:2.3em;--gap:2px;height:var(--height);width:var(--width);background-color:rgba(var(--ui),.3);border-radius:var(--height);margin-top:-2px;display:block;position:absolute;top:50%;right:20px;transform:translateY(-50%);font-size:20px!important}.biscuitman label:before{content:"";background:var(--bg);height:calc(var(--height) - calc(var(--gap)*2));width:calc(var(--height) - calc(var(--gap)*2));height:var(--height);width:var(--height);left:var(--gap);transform-origin:50%;border-radius:100%;display:block;position:absolute;top:50%;left:0;transform:translateY(-50%)scale(.8)}.biscuitman label.checked{background-color:var(--c)}.biscuitman label.checked:before{left:auto;right:0}.biscuitman label:has(:focus-visible){outline:auto highlight}.biscuitman label.disabled.checked{opacity:.5}.biscuitman label input{opacity:0}.bm-dialog-polyfill .biscuitman dialog{position:fixed;top:50%;transform:translateY(-50%)}
\ No newline at end of file
+/*! biscuitman.js 0.5.3 */.biscuitman{--ui:0,0,0;--tx:#444;--bg:#fff;--c:#105d89;background:var(--bg);box-sizing:border-box;z-index:3;width:100%;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;display:none;position:fixed;bottom:0;box-shadow:0 -2px 10px #00000029}.bm-show .biscuitman{display:block}.biscuitman *{box-sizing:border-box;color:var(--tx);margin:0;padding:0;font-family:inherit;font-size:16px;line-height:1.4em}.biscuitman:has([open]){transform:translateY(100%)}.biscuitman article{padding:0;position:relative}@media (min-width:770px){.biscuitman article{padding-right:calc(max(300px,30vw) + 20px)}.biscuitman article nav{width:30vw;min-width:300px;position:absolute;bottom:50%;right:0;transform:translateY(50%)}}.biscuitman article p{color:var(--tx);margin:10px 0;font-size:13px}@media (min-width:575px){.biscuitman article p{font-size:14px}}.biscuitman button{background:var(--bg);border:2px solid var(--c);color:var(--c);cursor:pointer;border-radius:3px;margin-top:10px;padding:.8em;font-size:13px;line-height:1em}.biscuitman button[data-id=accept]{background:var(--c);color:var(--bg)!important}.biscuitman button[data-id=close]{color:rgba(var(--ui),.5);opacity:.6;-webkit-user-select:none;user-select:none;z-index:2;background:0 0;border:none;outline:none;padding:10px;font-size:24px;line-height:1em;position:absolute;top:0;right:10px}.biscuitman button[disabled]{display:none}.biscuitman button:hover{opacity:.8}@media (min-width:576px){.biscuitman nav{flex-direction:row-reverse;gap:10px;width:100%;display:flex}.biscuitman nav button{flex-grow:1;margin-bottom:0}}@media (max-width:575px){.biscuitman nav{flex-direction:column;flex-grow:1;display:flex}}.biscuitman dialog{background:var(--bg);border:0;width:100%;max-width:100%;height:100%;max-height:100%}@media (min-width:576px){.biscuitman dialog{border-radius:10px;width:90vw;max-width:860px;max-height:80vh;margin:auto;box-shadow:0 0 8px #0000004d}}@media (min-width:576px) and (min-height:1134px){.biscuitman dialog{max-height:950px}}.biscuitman dialog nav{justify-self:flex-end;position:relative}.biscuitman .bm-dialog{flex-direction:column;height:100%;padding:20px;display:flex}.biscuitman .bm-dialog b{padding-bottom:8px;position:relative}.biscuitman .bm-dialog>b:after{content:"";background:linear-gradient(180deg,var(--bg)20%,#fff0);pointer-events:none;z-index:1;width:100%;height:25px;margin-bottom:-24px;position:absolute;bottom:0;left:0}.biscuitman .bm-dialog nav:after{content:"";background:linear-gradient(0deg,var(--bg)20%,#fff0);pointer-events:none;width:100%;height:25px;position:absolute;top:-24px;left:0}.biscuitman .bm-sections{scrollbar-color:rgba(var(--ui),.2)var(--bg);flex-shrink:1;height:100%;padding:15px 0;position:relative;overflow-y:scroll}@media (min-width:576px){.biscuitman .bm-sections{margin-right:-18px;padding-right:4px}}.biscuitman .bm-sections>p{padding-right:30px;font-size:13px;line-height:18px}@media (min-width:576px){.biscuitman .bm-sections>p{font-size:14px}}.biscuitman .bm-sections>p span{font-size:inherit;padding-bottom:5px;display:inline-block}.biscuitman .bm-sections>p [data-id=more]~span{display:none}.biscuitman a{font-size:inherit;color:var(--c);cursor:pointer;text-decoration:none;display:inline-block}.biscuitman a:hover{text-decoration:underline}.biscuitman section{margin-bottom:10px;position:relative}.biscuitman section:first-of-type{margin-top:10px}.biscuitman details{border:1px solid rgba(var(--ui),.2);border-radius:5px;padding:10px;list-style:none;box-shadow:0 2px 4px #0000001a}.biscuitman details[open] summary b:after{margin:-3px 0 0 -2px;transform:rotate(45deg)scale(.3)}.biscuitman summary{cursor:pointer;flex-direction:column;width:100%;padding:5px 80px 10px 10px;list-style:none;display:flex;position:relative}.biscuitman summary b{margin-bottom:3px}.biscuitman summary b:after{content:"";border:5px solid rgba(var(--ui),.4);border-top-color:#0000;border-left-color:#0000;border-radius:2px;width:1em;height:1em;margin:-2px 0 0 -4px;display:block;transform:rotate(-45deg)scale(.3)}.biscuitman summary p{color:var(--tx);font-size:14px}.biscuitman summary>*{display:inline-flex}.biscuitman summary::marker{display:none}.biscuitman summary::-webkit-details-marker{display:none}.biscuitman dl{background:rgba(var(--ui),.08);margin:10px;padding:10px;display:flex}.biscuitman dl dt,.biscuitman dl dd{color:var(--tx);font-size:12px}.biscuitman dl dt{min-width:120px;padding-right:30px;font-weight:700}.biscuitman label{--height:1.2em;--width:2.3em;--gap:2px;height:var(--height);width:var(--width);background-color:rgba(var(--ui),.3);border-radius:var(--height);margin-top:-2px;display:block;position:absolute;top:50%;right:20px;transform:translateY(-50%);font-size:20px!important}.biscuitman label:before{content:"";background:var(--bg);height:calc(var(--height) - calc(var(--gap)*2));width:calc(var(--height) - calc(var(--gap)*2));height:var(--height);width:var(--height);left:var(--gap);transform-origin:50%;border-radius:100%;display:block;position:absolute;top:50%;left:0;transform:translateY(-50%)scale(.8)}.biscuitman label.checked{background-color:var(--c)}.biscuitman label.checked:before{left:auto;right:0}.biscuitman label:has(:focus-visible){outline:auto highlight}.biscuitman label.disabled.checked{opacity:.5}.biscuitman label input{opacity:0}.bm-dialog-polyfill .biscuitman dialog{position:fixed;top:50%;transform:translateY(-50%)}
\ No newline at end of file
diff --git a/dist/biscuitman.min.js b/dist/biscuitman.min.js
index 8dd18e1..c56eabf 100644
--- a/dist/biscuitman.min.js
+++ b/dist/biscuitman.min.js
@@ -1 +1 @@
-/*! biscuitman.js 0.5.2 */((e,t,o,a)=>{let i;let n={key:"myconsent",global:"Consent",force:!1,enableMore:!0,sections:["essential"],title:"Your privacy matters",message:"We use cookies",settings:"Settings",reject:"Reject All",accept:"Accept All",save:"Save My Settings",settingsTitle:"My Consent Settings",info:"",more:"Show more",noCookies:"No cookies to display",acceptNonEU:!1,dialogPolyfill:"/dist/dialog-polyfill.withcss.min.js",...t.biscuitman},s=e.createElement("div"),l=()=>{a.style.setProperty("--bm-height",`${s.offsetHeight}px`)},c=e=>{a.classList.toggle("bm-show",e),l()},r=()=>{let{consentTime:e,...t}=p();for(let[i,s]of(e||(t=o.fromEntries(n.sections.slice(1).map(e=>[e,!1]))),o.entries(t)))a.classList.toggle(`bm-${i}`,s),a.classList.toggle(`bm-no-${i}`,!s)};function d(){m("open"),i.showModal()}function m(t,o){let a=`bm:${t}`,i={...void 0!==o&&o,time:+new Date};e.dispatchEvent(new CustomEvent(a,{detail:i})),console.debug(a,i)}let p=()=>t[n.global]||{};function u(e){t[n.global]=e,r()}function b(e,t){for(let o in e)e[o]&&!1===t[o]&&m("revoke",{section:o})}function g(){try{return JSON.parse(localStorage.getItem(n.key))}catch(e){return console.error(e),localStorage.removeItem(n.key),{}}}function f(){let t=o.fromEntries(o.entries(localStorage)),a=o.fromEntries(e.cookie.split("; ").map(e=>e.split("="))),{consentTime:i,...s}=g()||n.sections.slice(1).reduce((e,t)=>(e[t]=!1,{consentTime:void 0,...e}),{});for(let[i,l]of o.entries(s)){if(l)continue;let s=o.keys(n[`${i}Cookies`]||{});for(let i of(s.filter(e=>e.endsWith("*")).map(e=>{o.keys({...a,...t}).map(t=>{t.startsWith(e.slice(0,-1))&&s.push(t)})}),s)){if(a[i]){let t=`${i}=;expires=Thu, 01 Jan 1970 00:00:01 UTC;path=/;`;e.cookie=t,e.cookie=`${t}domain=${location.hostname};`,e.cookie=`${t}domain=.${location.hostname};`,m("delete",{cookie:i})}t[i]&&(localStorage.removeItem(i),m("delete",{localStorage:i}))}}}function $(e){let t=void 0===e,o={consentTime:+new Date};n.sections.forEach(a=>{if("essential"===a)return;let i=s.querySelector(`[data-s=${a}]`),n=t?i.checked:e;o[a]=n,t||(i.checked=e)}),b(p(),o),u(o),localStorage.setItem(n.key,JSON.stringify(o)),m("save",{data:o}),f(),k(),i.open&&i.close(),c(!1)}function k(){e.querySelectorAll("script[data-consent]").forEach(t=>{if(!p()[t.dataset.consent])return;let o=e.createElement("script");for(let{name:e,value:a}of t.attributes)e.startsWith("data-")||"type"===e||o.setAttribute(e,a);o.setAttribute("type",t.dataset.type||"text/javascript"),t.src||(o.textContent=t.textContent),t.parentNode.replaceChild(o,t),m("inject",{el:t,...t.id&&{id:t.id}}),t.src&&""!==t.textContent.trim()&&o.addEventListener("load",()=>{let a=e.createElement("script");a.textContent=t.textContent,t.id&&(a.id=t.id+"-after"),o.insertAdjacentElement("afterend",a),m("inject",{el:a,parent:t,...a.id&&{id:a.id}})})})}u(g()||{});let v=Intl.DateTimeFormat().resolvedOptions().timeZone,h=/^(GMT|UTC)$/.test(v)||/(Europe|BST|CEST|CET|EET|IST|WEST|WET|GMT-1|GMT-2|UTC+1|UTC+2|UTC+3)/.test(v);n.acceptNonEU&&!h&&($(!0),c(!1)),s.className="biscuitman",s.innerHTML=`
${n.title}${n.message}
`.replaceAll("{link}",`
${n.linkText}`),s.onclick=e=>{let t=e.target.dataset.id;if(t)switch(m("button",{id:t}),t){case"more":e.target.remove();break;case"accept":$(!0);break;case"close":i.close();break;case"settings":d();break;case"save":$();break;case"reject":$(!1)}},s.onchange=e=>{e.target.dataset.s&&e.target.parentElement.classList.toggle("checked",e.target.checked)},i=s.querySelector("dialog"),n.dialogPolyfill&&!i.close&&function(o){function a(){e.documentElement.classList.add("bm-dialog-polyfill"),t.dialogPolyfill.registerDialog(o)}if(t.dialogPolyfill)a();else{let t=e.createElement("script");t.onload=a,t.src=n.dialogPolyfill,e.head.appendChild(t)}}(i),i.onclose=()=>m("close"),n.force&&(i.oncancel=e=>e.preventDefault(),i.onkeydown=e=>"Escape"===e.key?e.preventDefault():null),e.body.appendChild(s),t.addEventListener("resize",l),f(),t[n.global].consentTime?(c(!1),k()):(c(!0),n.force&&d()),t.bmInvalidate=()=>{m("invalidate",{data:p()}),b({}),$(!1),u({}),localStorage.removeItem(n.key),c(!0),n.force&&i.showModal()},t.bmUpdate=()=>{m("update",{data:p()}),d()}})(document,window,Object,document.documentElement);
\ No newline at end of file
+/*! biscuitman.js 0.5.3 */((e,t,o,a)=>{let i;let n={key:"myconsent",global:"Consent",force:!1,enableMore:!0,sections:["essential"],title:"Your privacy matters",message:"We use cookies",settings:"Settings",reject:"Reject All",accept:"Accept All",save:"Save My Settings",settingsTitle:"My Consent Settings",info:"",more:"Show more",noCookies:"No cookies to display",acceptNonEU:!1,dialogPolyfill:"/dist/dialog-polyfill.withcss.min.js",...t.biscuitman},l=e.createElement("div"),s=()=>{a.style.setProperty("--bm-height",`${l.offsetHeight}px`)},c=e=>{a.classList.toggle("bm-show",e),s()},r=()=>{let{consentTime:e,...t}=p();for(let[i,l]of(e||(t=o.fromEntries(n.sections.slice(1).map(e=>[e,!1]))),o.entries(t)))a.classList.toggle(`bm-${i}`,l),a.classList.toggle(`bm-no-${i}`,!l)};function d(){m("open"),i.showModal()}function m(t,o){let a=`bm:${t}`,i={...void 0!==o&&o,time:+new Date};e.dispatchEvent(new CustomEvent(a,{detail:i})),console.debug(a,i)}let p=()=>t[n.global]||{};function u(e){t[n.global]=e,r()}function b(e,t){for(let o in e)e[o]&&!1===t[o]&&m("revoke",{section:o})}function g(){try{return JSON.parse(localStorage.getItem(n.key))}catch(e){return console.error(e),localStorage.removeItem(n.key),{}}}function f(){let t=o.fromEntries(o.entries(localStorage)),a=o.fromEntries(e.cookie.split("; ").map(e=>e.split("="))),{consentTime:i,...l}=g()||n.sections.slice(1).reduce((e,t)=>(e[t]=!1,{consentTime:void 0,...e}),{});for(let[i,s]of o.entries(l)){if(s)continue;let l=o.keys(n[`${i}Cookies`]||{});for(let i of(l.filter(e=>e.endsWith("*")).map(e=>{o.keys({...a,...t}).map(t=>{t.startsWith(e.slice(0,-1))&&l.push(t)})}),l)){if(a[i]){let t=`${i}=;expires=Thu, 01 Jan 1970 00:00:01 UTC;path=/;`;e.cookie=t,e.cookie=`${t}domain=${location.hostname};`,e.cookie=`${t}domain=.${location.hostname};`,m("delete",{cookie:i})}t[i]&&(localStorage.removeItem(i),m("delete",{localStorage:i}))}}}function $(e){let t=void 0===e,o={consentTime:+new Date};n.sections.forEach(a=>{if("essential"===a)return;let i=l.querySelector(`[data-s=${a}]`),n=t?i.checked:e;o[a]=n,t||(i.checked=e)}),b(p(),o),u(o),localStorage.setItem(n.key,JSON.stringify(o)),m("save",{data:o}),f(),k(),i.open&&i.close(),c(!1)}function k(){e.querySelectorAll("script[data-consent]").forEach(t=>{if(!p()[t.dataset.consent])return;let o=e.createElement("script");for(let{name:e,value:a}of t.attributes)e.startsWith("data-")||"type"===e||o.setAttribute(e,a);o.setAttribute("type",t.dataset.type||"text/javascript"),t.src||(o.textContent=t.textContent),t.parentNode.replaceChild(o,t),m("inject",{el:t,...t.id&&{id:t.id}}),t.src&&""!==t.textContent.trim()&&o.addEventListener("load",()=>{let a=e.createElement("script");a.textContent=t.textContent,t.id&&(a.id=t.id+"-after"),o.insertAdjacentElement("afterend",a),m("inject",{el:a,parent:t,...a.id&&{id:a.id}})})})}u(g()||{});let h=Intl.DateTimeFormat().resolvedOptions().timeZone,v=/^(GMT|UTC)$/.test(h)||/(Europe|BST|CEST|CET|EET|IST|WEST|WET|GMT-1|GMT-2|UTC+1|UTC+2|UTC+3)/.test(h);n.acceptNonEU&&!v&&($(!0),c(!1)),l.className="biscuitman",l.innerHTML=`
${n.title}${n.message}
`.replaceAll("{link}",`
${n.linkText}`),l.onclick=e=>{let t=e.target.dataset.id;if(t)switch(m("button",{id:t}),t){case"more":e.target.remove();break;case"accept":$(!0);break;case"close":i.close();break;case"settings":d();break;case"save":$();break;case"reject":$(!1)}},l.onchange=e=>{e.target.dataset.s&&e.target.parentElement.classList.toggle("checked",e.target.checked)},i=l.querySelector("dialog"),n.dialogPolyfill&&!i.close&&function(o){function a(){e.documentElement.classList.add("bm-dialog-polyfill"),t.dialogPolyfill.registerDialog(o)}if(t.dialogPolyfill)a();else{let t=e.createElement("script");t.onload=a,t.src=n.dialogPolyfill,e.head.appendChild(t)}}(i),i.onclose=()=>m("close"),n.force&&(i.oncancel=e=>e.preventDefault(),i.onkeydown=e=>"Escape"===e.key?e.preventDefault():null),e.body.appendChild(l),t.addEventListener("resize",s),f(),t[n.global].consentTime?(c(!1),k()):(c(!0),n.force&&d()),t.bmInvalidate=()=>{m("invalidate",{data:p()}),b({}),$(!1),u({}),localStorage.removeItem(n.key),c(!0),n.force&&i.showModal()},t.bmUpdate=()=>{m("update",{data:p()}),d()}})(document,window,Object,document.documentElement);
\ No newline at end of file
diff --git a/dist/biscuitman.withcss.js b/dist/biscuitman.withcss.js
index 33bd1d8..83aca80 100644
--- a/dist/biscuitman.withcss.js
+++ b/dist/biscuitman.withcss.js
@@ -1,4 +1,4 @@
-/*! biscuitman.js 0.5.2 */
+/*! biscuitman.js 0.5.3 */
((d, w, O, h)=>{
const defaults = {
key: 'myconsent',
@@ -47,7 +47,7 @@
${o.message}
${o.info.split('\n').map((line, i, arr)=>`${line}
- ${arr.length > 1 && o.enableMore && i == 0 ? `${o.more}` : ''}`).join('')}
+ ${arr.length > 1 && o.enableMore && i == 0 ? `${o.more}` : ''}`).join('')}
${o.sections.map((section)=>{
let hasConsent = getConsents()[section];
@@ -331,7 +331,7 @@
;
((d)=>{
let css=d.createElement('style');
- css.textContent=`/*! biscuitman.js 0.5.2 */
+ css.textContent=`/*! biscuitman.js 0.5.3 */
.biscuitman {
--ui: 0, 0, 0;
--tx: #444;
diff --git a/dist/biscuitman.withcss.min.js b/dist/biscuitman.withcss.min.js
index 6daa027..aa55cee 100644
--- a/dist/biscuitman.withcss.min.js
+++ b/dist/biscuitman.withcss.min.js
@@ -1 +1 @@
-/*! biscuitman.js 0.5.2 */((e,t,o,a)=>{let i;let n={key:"myconsent",global:"Consent",force:!1,enableMore:!0,sections:["essential"],title:"Your privacy matters",message:"We use cookies",settings:"Settings",reject:"Reject All",accept:"Accept All",save:"Save My Settings",settingsTitle:"My Consent Settings",info:"",more:"Show more",noCookies:"No cookies to display",acceptNonEU:!1,dialogPolyfill:"/dist/dialog-polyfill.withcss.min.js",...t.biscuitman},s=e.createElement("div"),l=()=>{a.style.setProperty("--bm-height",`${s.offsetHeight}px`)},c=e=>{a.classList.toggle("bm-show",e),l()},r=()=>{let{consentTime:e,...t}=p();for(let[i,s]of(e||(t=o.fromEntries(n.sections.slice(1).map(e=>[e,!1]))),o.entries(t)))a.classList.toggle(`bm-${i}`,s),a.classList.toggle(`bm-no-${i}`,!s)};function d(){m("open"),i.showModal()}function m(t,o){let a=`bm:${t}`,i={...void 0!==o&&o,time:+new Date};e.dispatchEvent(new CustomEvent(a,{detail:i})),console.debug(a,i)}let p=()=>t[n.global]||{};function u(e){t[n.global]=e,r()}function b(e,t){for(let o in e)e[o]&&!1===t[o]&&m("revoke",{section:o})}function g(){try{return JSON.parse(localStorage.getItem(n.key))}catch(e){return console.error(e),localStorage.removeItem(n.key),{}}}function f(){let t=o.fromEntries(o.entries(localStorage)),a=o.fromEntries(e.cookie.split("; ").map(e=>e.split("="))),{consentTime:i,...s}=g()||n.sections.slice(1).reduce((e,t)=>(e[t]=!1,{consentTime:void 0,...e}),{});for(let[i,l]of o.entries(s)){if(l)continue;let s=o.keys(n[`${i}Cookies`]||{});for(let i of(s.filter(e=>e.endsWith("*")).map(e=>{o.keys({...a,...t}).map(t=>{t.startsWith(e.slice(0,-1))&&s.push(t)})}),s)){if(a[i]){let t=`${i}=;expires=Thu, 01 Jan 1970 00:00:01 UTC;path=/;`;e.cookie=t,e.cookie=`${t}domain=${location.hostname};`,e.cookie=`${t}domain=.${location.hostname};`,m("delete",{cookie:i})}t[i]&&(localStorage.removeItem(i),m("delete",{localStorage:i}))}}}function $(e){let t=void 0===e,o={consentTime:+new Date};n.sections.forEach(a=>{if("essential"===a)return;let i=s.querySelector(`[data-s=${a}]`),n=t?i.checked:e;o[a]=n,t||(i.checked=e)}),b(p(),o),u(o),localStorage.setItem(n.key,JSON.stringify(o)),m("save",{data:o}),f(),k(),i.open&&i.close(),c(!1)}function k(){e.querySelectorAll("script[data-consent]").forEach(t=>{if(!p()[t.dataset.consent])return;let o=e.createElement("script");for(let{name:e,value:a}of t.attributes)e.startsWith("data-")||"type"===e||o.setAttribute(e,a);o.setAttribute("type",t.dataset.type||"text/javascript"),t.src||(o.textContent=t.textContent),t.parentNode.replaceChild(o,t),m("inject",{el:t,...t.id&&{id:t.id}}),t.src&&""!==t.textContent.trim()&&o.addEventListener("load",()=>{let a=e.createElement("script");a.textContent=t.textContent,t.id&&(a.id=t.id+"-after"),o.insertAdjacentElement("afterend",a),m("inject",{el:a,parent:t,...a.id&&{id:a.id}})})})}u(g()||{});let v=Intl.DateTimeFormat().resolvedOptions().timeZone,h=/^(GMT|UTC)$/.test(v)||/(Europe|BST|CEST|CET|EET|IST|WEST|WET|GMT-1|GMT-2|UTC+1|UTC+2|UTC+3)/.test(v);n.acceptNonEU&&!h&&($(!0),c(!1)),s.className="biscuitman",s.innerHTML=`
${n.title}${n.message}
`.replaceAll("{link}",`
${n.linkText}`),s.onclick=e=>{let t=e.target.dataset.id;if(t)switch(m("button",{id:t}),t){case"more":e.target.remove();break;case"accept":$(!0);break;case"close":i.close();break;case"settings":d();break;case"save":$();break;case"reject":$(!1)}},s.onchange=e=>{e.target.dataset.s&&e.target.parentElement.classList.toggle("checked",e.target.checked)},i=s.querySelector("dialog"),n.dialogPolyfill&&!i.close&&function(o){function a(){e.documentElement.classList.add("bm-dialog-polyfill"),t.dialogPolyfill.registerDialog(o)}if(t.dialogPolyfill)a();else{let t=e.createElement("script");t.onload=a,t.src=n.dialogPolyfill,e.head.appendChild(t)}}(i),i.onclose=()=>m("close"),n.force&&(i.oncancel=e=>e.preventDefault(),i.onkeydown=e=>"Escape"===e.key?e.preventDefault():null),e.body.appendChild(s),t.addEventListener("resize",l),f(),t[n.global].consentTime?(c(!1),k()):(c(!0),n.force&&d()),t.bmInvalidate=()=>{m("invalidate",{data:p()}),b({}),$(!1),u({}),localStorage.removeItem(n.key),c(!0),n.force&&i.showModal()},t.bmUpdate=()=>{m("update",{data:p()}),d()}})(document,window,Object,document.documentElement);;((d)=>{let c=d.createElement('style');c.textContent=`/*! biscuitman.js 0.5.2 */.biscuitman{--ui:0,0,0;--tx:#444;--bg:#fff;--c:#105d89;background:var(--bg);box-sizing:border-box;z-index:3;width:100%;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;display:none;position:fixed;bottom:0;box-shadow:0 -2px 10px #00000029}.bm-show .biscuitman{display:block}.biscuitman *{box-sizing:border-box;color:var(--tx);margin:0;padding:0;font-family:inherit;font-size:16px;line-height:1.4em}.biscuitman:has([open]){transform:translateY(100%)}.biscuitman article{padding:0;position:relative}@media (min-width:770px){.biscuitman article{padding-right:calc(max(300px,30vw) + 20px)}.biscuitman article nav{width:30vw;min-width:300px;position:absolute;bottom:50%;right:0;transform:translateY(50%)}}.biscuitman article p{color:var(--tx);margin:10px 0;font-size:13px}@media (min-width:575px){.biscuitman article p{font-size:14px}}.biscuitman button{background:var(--bg);border:2px solid var(--c);color:var(--c);cursor:pointer;border-radius:3px;margin-top:10px;padding:.8em;font-size:13px;line-height:1em}.biscuitman button[data-id=accept]{background:var(--c);color:var(--bg)!important}.biscuitman button[data-id=close]{color:rgba(var(--ui),.5);opacity:.6;-webkit-user-select:none;user-select:none;z-index:2;background:0 0;border:none;outline:none;padding:10px;font-size:24px;line-height:1em;position:absolute;top:0;right:10px}.biscuitman button[disabled]{display:none}.biscuitman button:hover{opacity:.8}@media (min-width:576px){.biscuitman nav{flex-direction:row-reverse;gap:10px;width:100%;display:flex}.biscuitman nav button{flex-grow:1;margin-bottom:0}}@media (max-width:575px){.biscuitman nav{flex-direction:column;flex-grow:1;display:flex}}.biscuitman dialog{background:var(--bg);border:0;width:100%;max-width:100%;height:100%;max-height:100%}@media (min-width:576px){.biscuitman dialog{border-radius:10px;width:90vw;max-width:860px;max-height:80vh;margin:auto;box-shadow:0 0 8px #0000004d}}@media (min-width:576px) and (min-height:1134px){.biscuitman dialog{max-height:950px}}.biscuitman dialog nav{justify-self:flex-end;position:relative}.biscuitman .bm-dialog{flex-direction:column;height:100%;padding:20px;display:flex}.biscuitman .bm-dialog b{padding-bottom:8px;position:relative}.biscuitman .bm-dialog>b:after{content:"";background:linear-gradient(180deg,var(--bg)20%,#fff0);pointer-events:none;z-index:1;width:100%;height:25px;margin-bottom:-24px;position:absolute;bottom:0;left:0}.biscuitman .bm-dialog nav:after{content:"";background:linear-gradient(0deg,var(--bg)20%,#fff0);pointer-events:none;width:100%;height:25px;position:absolute;top:-24px;left:0}.biscuitman .bm-sections{scrollbar-color:rgba(var(--ui),.2)var(--bg);flex-shrink:1;height:100%;padding:15px 0;position:relative;overflow-y:scroll}@media (min-width:576px){.biscuitman .bm-sections{margin-right:-18px;padding-right:4px}}.biscuitman .bm-sections>p{padding-right:30px;font-size:13px;line-height:18px}@media (min-width:576px){.biscuitman .bm-sections>p{font-size:14px}}.biscuitman .bm-sections>p span{font-size:inherit;padding-bottom:5px;display:inline-block}.biscuitman .bm-sections>p [data-id=more]~span{display:none}.biscuitman a{font-size:inherit;color:var(--c);cursor:pointer;text-decoration:none;display:inline-block}.biscuitman a:hover{text-decoration:underline}.biscuitman section{margin-bottom:10px;position:relative}.biscuitman section:first-of-type{margin-top:10px}.biscuitman details{border:1px solid rgba(var(--ui),.2);border-radius:5px;padding:10px;list-style:none;box-shadow:0 2px 4px #0000001a}.biscuitman details[open] summary b:after{margin:-3px 0 0 -2px;transform:rotate(45deg)scale(.3)}.biscuitman summary{cursor:pointer;flex-direction:column;width:100%;padding:5px 80px 10px 10px;list-style:none;display:flex;position:relative}.biscuitman summary b{margin-bottom:3px}.biscuitman summary b:after{content:"";border:5px solid rgba(var(--ui),.4);border-top-color:#0000;border-left-color:#0000;border-radius:2px;width:1em;height:1em;margin:-2px 0 0 -4px;display:block;transform:rotate(-45deg)scale(.3)}.biscuitman summary p{color:var(--tx);font-size:14px}.biscuitman summary>*{display:inline-flex}.biscuitman summary::marker{display:none}.biscuitman summary::-webkit-details-marker{display:none}.biscuitman dl{background:rgba(var(--ui),.08);margin:10px;padding:10px;display:flex}.biscuitman dl dt,.biscuitman dl dd{color:var(--tx);font-size:12px}.biscuitman dl dt{min-width:120px;padding-right:30px;font-weight:700}.biscuitman label{--height:1.2em;--width:2.3em;--gap:2px;height:var(--height);width:var(--width);background-color:rgba(var(--ui),.3);border-radius:var(--height);margin-top:-2px;display:block;position:absolute;top:50%;right:20px;transform:translateY(-50%);font-size:20px!important}.biscuitman label:before{content:"";background:var(--bg);height:calc(var(--height) - calc(var(--gap)*2));width:calc(var(--height) - calc(var(--gap)*2));height:var(--height);width:var(--height);left:var(--gap);transform-origin:50%;border-radius:100%;display:block;position:absolute;top:50%;left:0;transform:translateY(-50%)scale(.8)}.biscuitman label.checked{background-color:var(--c)}.biscuitman label.checked:before{left:auto;right:0}.biscuitman label:has(:focus-visible){outline:auto highlight}.biscuitman label.disabled.checked{opacity:.5}.biscuitman label input{opacity:0}.bm-dialog-polyfill .biscuitman dialog{position:fixed;top:50%;transform:translateY(-50%)}`;d.head.appendChild(c)})(document);
\ No newline at end of file
+/*! biscuitman.js 0.5.3 */((e,t,o,a)=>{let i;let n={key:"myconsent",global:"Consent",force:!1,enableMore:!0,sections:["essential"],title:"Your privacy matters",message:"We use cookies",settings:"Settings",reject:"Reject All",accept:"Accept All",save:"Save My Settings",settingsTitle:"My Consent Settings",info:"",more:"Show more",noCookies:"No cookies to display",acceptNonEU:!1,dialogPolyfill:"/dist/dialog-polyfill.withcss.min.js",...t.biscuitman},l=e.createElement("div"),s=()=>{a.style.setProperty("--bm-height",`${l.offsetHeight}px`)},c=e=>{a.classList.toggle("bm-show",e),s()},r=()=>{let{consentTime:e,...t}=p();for(let[i,l]of(e||(t=o.fromEntries(n.sections.slice(1).map(e=>[e,!1]))),o.entries(t)))a.classList.toggle(`bm-${i}`,l),a.classList.toggle(`bm-no-${i}`,!l)};function d(){m("open"),i.showModal()}function m(t,o){let a=`bm:${t}`,i={...void 0!==o&&o,time:+new Date};e.dispatchEvent(new CustomEvent(a,{detail:i})),console.debug(a,i)}let p=()=>t[n.global]||{};function u(e){t[n.global]=e,r()}function b(e,t){for(let o in e)e[o]&&!1===t[o]&&m("revoke",{section:o})}function g(){try{return JSON.parse(localStorage.getItem(n.key))}catch(e){return console.error(e),localStorage.removeItem(n.key),{}}}function f(){let t=o.fromEntries(o.entries(localStorage)),a=o.fromEntries(e.cookie.split("; ").map(e=>e.split("="))),{consentTime:i,...l}=g()||n.sections.slice(1).reduce((e,t)=>(e[t]=!1,{consentTime:void 0,...e}),{});for(let[i,s]of o.entries(l)){if(s)continue;let l=o.keys(n[`${i}Cookies`]||{});for(let i of(l.filter(e=>e.endsWith("*")).map(e=>{o.keys({...a,...t}).map(t=>{t.startsWith(e.slice(0,-1))&&l.push(t)})}),l)){if(a[i]){let t=`${i}=;expires=Thu, 01 Jan 1970 00:00:01 UTC;path=/;`;e.cookie=t,e.cookie=`${t}domain=${location.hostname};`,e.cookie=`${t}domain=.${location.hostname};`,m("delete",{cookie:i})}t[i]&&(localStorage.removeItem(i),m("delete",{localStorage:i}))}}}function $(e){let t=void 0===e,o={consentTime:+new Date};n.sections.forEach(a=>{if("essential"===a)return;let i=l.querySelector(`[data-s=${a}]`),n=t?i.checked:e;o[a]=n,t||(i.checked=e)}),b(p(),o),u(o),localStorage.setItem(n.key,JSON.stringify(o)),m("save",{data:o}),f(),k(),i.open&&i.close(),c(!1)}function k(){e.querySelectorAll("script[data-consent]").forEach(t=>{if(!p()[t.dataset.consent])return;let o=e.createElement("script");for(let{name:e,value:a}of t.attributes)e.startsWith("data-")||"type"===e||o.setAttribute(e,a);o.setAttribute("type",t.dataset.type||"text/javascript"),t.src||(o.textContent=t.textContent),t.parentNode.replaceChild(o,t),m("inject",{el:t,...t.id&&{id:t.id}}),t.src&&""!==t.textContent.trim()&&o.addEventListener("load",()=>{let a=e.createElement("script");a.textContent=t.textContent,t.id&&(a.id=t.id+"-after"),o.insertAdjacentElement("afterend",a),m("inject",{el:a,parent:t,...a.id&&{id:a.id}})})})}u(g()||{});let h=Intl.DateTimeFormat().resolvedOptions().timeZone,v=/^(GMT|UTC)$/.test(h)||/(Europe|BST|CEST|CET|EET|IST|WEST|WET|GMT-1|GMT-2|UTC+1|UTC+2|UTC+3)/.test(h);n.acceptNonEU&&!v&&($(!0),c(!1)),l.className="biscuitman",l.innerHTML=`
${n.title}${n.message}
`.replaceAll("{link}",`
${n.linkText}`),l.onclick=e=>{let t=e.target.dataset.id;if(t)switch(m("button",{id:t}),t){case"more":e.target.remove();break;case"accept":$(!0);break;case"close":i.close();break;case"settings":d();break;case"save":$();break;case"reject":$(!1)}},l.onchange=e=>{e.target.dataset.s&&e.target.parentElement.classList.toggle("checked",e.target.checked)},i=l.querySelector("dialog"),n.dialogPolyfill&&!i.close&&function(o){function a(){e.documentElement.classList.add("bm-dialog-polyfill"),t.dialogPolyfill.registerDialog(o)}if(t.dialogPolyfill)a();else{let t=e.createElement("script");t.onload=a,t.src=n.dialogPolyfill,e.head.appendChild(t)}}(i),i.onclose=()=>m("close"),n.force&&(i.oncancel=e=>e.preventDefault(),i.onkeydown=e=>"Escape"===e.key?e.preventDefault():null),e.body.appendChild(l),t.addEventListener("resize",s),f(),t[n.global].consentTime?(c(!1),k()):(c(!0),n.force&&d()),t.bmInvalidate=()=>{m("invalidate",{data:p()}),b({}),$(!1),u({}),localStorage.removeItem(n.key),c(!0),n.force&&i.showModal()},t.bmUpdate=()=>{m("update",{data:p()}),d()}})(document,window,Object,document.documentElement);;((d)=>{let c=d.createElement('style');c.textContent=`/*! biscuitman.js 0.5.3 */.biscuitman{--ui:0,0,0;--tx:#444;--bg:#fff;--c:#105d89;background:var(--bg);box-sizing:border-box;z-index:3;width:100%;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;display:none;position:fixed;bottom:0;box-shadow:0 -2px 10px #00000029}.bm-show .biscuitman{display:block}.biscuitman *{box-sizing:border-box;color:var(--tx);margin:0;padding:0;font-family:inherit;font-size:16px;line-height:1.4em}.biscuitman:has([open]){transform:translateY(100%)}.biscuitman article{padding:0;position:relative}@media (min-width:770px){.biscuitman article{padding-right:calc(max(300px,30vw) + 20px)}.biscuitman article nav{width:30vw;min-width:300px;position:absolute;bottom:50%;right:0;transform:translateY(50%)}}.biscuitman article p{color:var(--tx);margin:10px 0;font-size:13px}@media (min-width:575px){.biscuitman article p{font-size:14px}}.biscuitman button{background:var(--bg);border:2px solid var(--c);color:var(--c);cursor:pointer;border-radius:3px;margin-top:10px;padding:.8em;font-size:13px;line-height:1em}.biscuitman button[data-id=accept]{background:var(--c);color:var(--bg)!important}.biscuitman button[data-id=close]{color:rgba(var(--ui),.5);opacity:.6;-webkit-user-select:none;user-select:none;z-index:2;background:0 0;border:none;outline:none;padding:10px;font-size:24px;line-height:1em;position:absolute;top:0;right:10px}.biscuitman button[disabled]{display:none}.biscuitman button:hover{opacity:.8}@media (min-width:576px){.biscuitman nav{flex-direction:row-reverse;gap:10px;width:100%;display:flex}.biscuitman nav button{flex-grow:1;margin-bottom:0}}@media (max-width:575px){.biscuitman nav{flex-direction:column;flex-grow:1;display:flex}}.biscuitman dialog{background:var(--bg);border:0;width:100%;max-width:100%;height:100%;max-height:100%}@media (min-width:576px){.biscuitman dialog{border-radius:10px;width:90vw;max-width:860px;max-height:80vh;margin:auto;box-shadow:0 0 8px #0000004d}}@media (min-width:576px) and (min-height:1134px){.biscuitman dialog{max-height:950px}}.biscuitman dialog nav{justify-self:flex-end;position:relative}.biscuitman .bm-dialog{flex-direction:column;height:100%;padding:20px;display:flex}.biscuitman .bm-dialog b{padding-bottom:8px;position:relative}.biscuitman .bm-dialog>b:after{content:"";background:linear-gradient(180deg,var(--bg)20%,#fff0);pointer-events:none;z-index:1;width:100%;height:25px;margin-bottom:-24px;position:absolute;bottom:0;left:0}.biscuitman .bm-dialog nav:after{content:"";background:linear-gradient(0deg,var(--bg)20%,#fff0);pointer-events:none;width:100%;height:25px;position:absolute;top:-24px;left:0}.biscuitman .bm-sections{scrollbar-color:rgba(var(--ui),.2)var(--bg);flex-shrink:1;height:100%;padding:15px 0;position:relative;overflow-y:scroll}@media (min-width:576px){.biscuitman .bm-sections{margin-right:-18px;padding-right:4px}}.biscuitman .bm-sections>p{padding-right:30px;font-size:13px;line-height:18px}@media (min-width:576px){.biscuitman .bm-sections>p{font-size:14px}}.biscuitman .bm-sections>p span{font-size:inherit;padding-bottom:5px;display:inline-block}.biscuitman .bm-sections>p [data-id=more]~span{display:none}.biscuitman a{font-size:inherit;color:var(--c);cursor:pointer;text-decoration:none;display:inline-block}.biscuitman a:hover{text-decoration:underline}.biscuitman section{margin-bottom:10px;position:relative}.biscuitman section:first-of-type{margin-top:10px}.biscuitman details{border:1px solid rgba(var(--ui),.2);border-radius:5px;padding:10px;list-style:none;box-shadow:0 2px 4px #0000001a}.biscuitman details[open] summary b:after{margin:-3px 0 0 -2px;transform:rotate(45deg)scale(.3)}.biscuitman summary{cursor:pointer;flex-direction:column;width:100%;padding:5px 80px 10px 10px;list-style:none;display:flex;position:relative}.biscuitman summary b{margin-bottom:3px}.biscuitman summary b:after{content:"";border:5px solid rgba(var(--ui),.4);border-top-color:#0000;border-left-color:#0000;border-radius:2px;width:1em;height:1em;margin:-2px 0 0 -4px;display:block;transform:rotate(-45deg)scale(.3)}.biscuitman summary p{color:var(--tx);font-size:14px}.biscuitman summary>*{display:inline-flex}.biscuitman summary::marker{display:none}.biscuitman summary::-webkit-details-marker{display:none}.biscuitman dl{background:rgba(var(--ui),.08);margin:10px;padding:10px;display:flex}.biscuitman dl dt,.biscuitman dl dd{color:var(--tx);font-size:12px}.biscuitman dl dt{min-width:120px;padding-right:30px;font-weight:700}.biscuitman label{--height:1.2em;--width:2.3em;--gap:2px;height:var(--height);width:var(--width);background-color:rgba(var(--ui),.3);border-radius:var(--height);margin-top:-2px;display:block;position:absolute;top:50%;right:20px;transform:translateY(-50%);font-size:20px!important}.biscuitman label:before{content:"";background:var(--bg);height:calc(var(--height) - calc(var(--gap)*2));width:calc(var(--height) - calc(var(--gap)*2));height:var(--height);width:var(--height);left:var(--gap);transform-origin:50%;border-radius:100%;display:block;position:absolute;top:50%;left:0;transform:translateY(-50%)scale(.8)}.biscuitman label.checked{background-color:var(--c)}.biscuitman label.checked:before{left:auto;right:0}.biscuitman label:has(:focus-visible){outline:auto highlight}.biscuitman label.disabled.checked{opacity:.5}.biscuitman label input{opacity:0}.bm-dialog-polyfill .biscuitman dialog{position:fixed;top:50%;transform:translateY(-50%)}`;d.head.appendChild(c)})(document);
\ No newline at end of file
diff --git a/dist/dialog-polyfill.withcss.js b/dist/dialog-polyfill.withcss.js
index 612d4a0..5870c0d 100644
--- a/dist/dialog-polyfill.withcss.js
+++ b/dist/dialog-polyfill.withcss.js
@@ -1,4 +1,4 @@
-/*! biscuitman.js 0.5.2 *//* dialog-polyfill.js ^0.5.6*/
+/*! biscuitman.js 0.5.3 *//* dialog-polyfill.js ^0.5.6*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@@ -868,6 +868,6 @@
(function(d) {
var css=d.createElement('style');
- css.textContent='/*! biscuitman.js 0.5.2 */dialog{color:#000;background:#fff;border:solid;width:fit-content;height:fit-content;margin:auto;padding:1em;display:block;position:absolute;left:0;right:0}dialog:not([open]){display:none}dialog+.backdrop{background:#0000001a;position:fixed;inset:0}._dialog_overlay{position:fixed;inset:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}';
+ css.textContent='/*! biscuitman.js 0.5.3 */dialog{color:#000;background:#fff;border:solid;width:fit-content;height:fit-content;margin:auto;padding:1em;display:block;position:absolute;left:0;right:0}dialog:not([open]){display:none}dialog+.backdrop{background:#0000001a;position:fixed;inset:0}._dialog_overlay{position:fixed;inset:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}';
d.head.appendChild(css)
})(document);
\ No newline at end of file
diff --git a/dist/dialog-polyfill.withcss.min.js b/dist/dialog-polyfill.withcss.min.js
index f4699cc..2dfb61c 100644
--- a/dist/dialog-polyfill.withcss.min.js
+++ b/dist/dialog-polyfill.withcss.min.js
@@ -1 +1 @@
-/*! biscuitman.js 0.5.2 *//* dialog-polyfill.js ^0.5.6*/function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _type_of(obj){return obj&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj}!function(global,factory){("undefined"==typeof exports?"undefined":_type_of(exports))==="object"&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):(global=global||self).dialogPolyfill=factory()}(this,function(){"use strict";var supportCustomEvent=window.CustomEvent;function safeDispatchEvent(target,event){var check="on"+event.type.toLowerCase();return"function"==typeof target[check]&&target[check](event),target.dispatchEvent(event)}function findNearestDialog(el){for(;el;){if("dialog"===el.localName)return el;el=el.parentElement?el.parentElement:el.parentNode?el.parentNode.host:null}return null}function safeBlur(el){for(;el&&el.shadowRoot&&el.shadowRoot.activeElement;)el=el.shadowRoot.activeElement;el&&el.blur&&el!==document.body&&el.blur()}function isFormMethodDialog(el){return!!(el&&el.hasAttribute("method"))&&"dialog"===el.getAttribute("method").toLowerCase()}function isConnected(element){return element.isConnected||document.body.contains(element)}function findFormSubmitter(event){if(event.submitter)return event.submitter;var form=event.target;if(!_instanceof(form,HTMLFormElement))return null;var submitter=dialogPolyfill.formSubmitter;if(!submitter){var target=event.target;submitter=("getRootNode"in target&&target.getRootNode()||document).activeElement}return submitter&&submitter.form===form?submitter:null}function maybeHandleSubmit(event){if(!event.defaultPrevented){var form=event.target,value=dialogPolyfill.imagemapUseValue,submitter=findFormSubmitter(event);null===value&&submitter&&(value=submitter.value);var dialog=findNearestDialog(form);dialog&&"dialog"===(submitter&&submitter.getAttribute("formmethod")||form.getAttribute("method"))&&(event.preventDefault(),null!=value?dialog.close(value):dialog.close())}}function dialogPolyfillInfo(dialog){if(this.dialog_=dialog,this.replacedStyleTop_=!1,this.openAsModal_=!1,dialog.hasAttribute("role")||dialog.setAttribute("role","dialog"),dialog.show=this.show.bind(this),dialog.showModal=this.showModal.bind(this),dialog.close=this.close.bind(this),dialog.addEventListener("submit",maybeHandleSubmit,!1),"returnValue"in dialog||(dialog.returnValue=""),"MutationObserver"in window)new MutationObserver(this.maybeHideModal.bind(this)).observe(dialog,{attributes:!0,attributeFilter:["open"]});else{var timeout,removed=!1,cb=(function(){removed?this.downgradeModal():this.maybeHideModal(),removed=!1}).bind(this),delayModel=function(ev){if(ev.target===dialog){var cand="DOMNodeRemoved";removed|=ev.type.substr(0,cand.length)===cand,window.clearTimeout(timeout),timeout=window.setTimeout(cb,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(name){dialog.addEventListener(name,delayModel)})}Object.defineProperty(dialog,"open",{set:this.setOpen.bind(this),get:dialog.hasAttribute.bind(dialog,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}supportCustomEvent&&(void 0===supportCustomEvent?"undefined":_type_of(supportCustomEvent))!=="object"||((supportCustomEvent=function(event,x){x=x||{};var ev=document.createEvent("CustomEvent");return ev.initCustomEvent(event,!!x.bubbles,!!x.cancelable,x.detail||null),ev}).prototype=window.Event.prototype),dialogPolyfillInfo.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&isConnected(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),dialogPolyfill.dm.removeDialog(this))},setOpen:function(value){value?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(e){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var fake=document.createElement("div");this.dialog_.insertBefore(fake,this.dialog_.firstChild),fake.tabIndex=-1,fake.focus(),this.dialog_.removeChild(fake)}var redirectedEvent=document.createEvent("MouseEvents");redirectedEvent.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),this.dialog_.dispatchEvent(redirectedEvent),e.stopPropagation()},focus_:function(){var target=this.dialog_.querySelector("[autofocus]:not([disabled])");!target&&this.dialog_.tabIndex>=0&&(target=this.dialog_),target||(target=function findFocusableElementWithin(hostElement){var query=["button","input","keygen","select","textarea"].map(function(el){return el+":not([disabled])"});query.push('[tabindex]:not([disabled]):not([tabindex=""])');var target=hostElement.querySelector(query.join(", "));if(!target&&"attachShadow"in Element.prototype)for(var elems=hostElement.querySelectorAll("*"),i=0;i
, the polyfill may not work correctly",element),"dialog"!==element.localName)throw Error("Failed to register dialog: The element is not a dialog.");new dialogPolyfillInfo(element)},dialogPolyfill.registerDialog=function(element){element.showModal||dialogPolyfill.forceRegisterDialog(element)},dialogPolyfill.DialogManager=function(){this.pendingDialogStack=[];var checkDOM=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(e){this.forwardTab_=void 0,e.stopPropagation(),checkDOM([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(records){var removed=[];records.forEach(function(rec){for(var c,i=0;c=rec.removedNodes[i];++i)_instanceof(c,Element)&&("dialog"===c.localName&&removed.push(c),removed=removed.concat(c.querySelectorAll("dialog")))}),removed.length&&checkDOM(removed)}))},dialogPolyfill.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},dialogPolyfill.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},dialogPolyfill.DialogManager.prototype.updateStacking=function(){for(var dpi,zIndex=this.zIndexHigh_,i=0;dpi=this.pendingDialogStack[i];++i)dpi.updateZIndex(--zIndex,--zIndex),0===i&&(this.overlay.style.zIndex=--zIndex);var last=this.pendingDialogStack[0];last?(last.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},dialogPolyfill.DialogManager.prototype.containedByTopDialog_=function(candidate){for(;candidate=findNearestDialog(candidate);){for(var dpi,i=0;dpi=this.pendingDialogStack[i];++i)if(dpi.dialog===candidate)return 0===i;candidate=candidate.parentElement}return!1},dialogPolyfill.DialogManager.prototype.handleFocus_=function(event){var target=event.composedPath?event.composedPath()[0]:event.target;if(!this.containedByTopDialog_(target)&&document.activeElement!==document.documentElement&&(event.preventDefault(),event.stopPropagation(),safeBlur(target),void 0!==this.forwardTab_)){var dpi=this.pendingDialogStack[0];return dpi.dialog.compareDocumentPosition(target)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?dpi.focus_():target!==document.documentElement&&document.documentElement.focus()),!1}},dialogPolyfill.DialogManager.prototype.handleKey_=function(event){if(this.forwardTab_=void 0,27===event.keyCode){event.preventDefault(),event.stopPropagation();var cancelEvent=new supportCustomEvent("cancel",{bubbles:!1,cancelable:!0}),dpi=this.pendingDialogStack[0];dpi&&safeDispatchEvent(dpi.dialog,cancelEvent)&&dpi.dialog.close()}else 9===event.keyCode&&(this.forwardTab_=!event.shiftKey)},dialogPolyfill.DialogManager.prototype.checkDOM_=function(removed){this.pendingDialogStack.slice().forEach(function(dpi){-1!==removed.indexOf(dpi.dialog)?dpi.downgradeModal():dpi.maybeHideModal()})},dialogPolyfill.DialogManager.prototype.pushDialog=function(dpi){var allowed=(this.zIndexHigh_-this.zIndexLow_)/2-1;return!(this.pendingDialogStack.length>=allowed)&&(1===this.pendingDialogStack.unshift(dpi)&&this.blockDocument(),this.updateStacking(),!0)},dialogPolyfill.DialogManager.prototype.removeDialog=function(dpi){var index=this.pendingDialogStack.indexOf(dpi);-1!==index&&(this.pendingDialogStack.splice(index,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},dialogPolyfill.dm=new dialogPolyfill.DialogManager,dialogPolyfill.formSubmitter=null,dialogPolyfill.imagemapUseValue=null,void 0===window.HTMLDialogElement){var testForm=document.createElement("form");if(testForm.setAttribute("method","dialog"),"dialog"!==testForm.method){var methodDescriptor=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(methodDescriptor){var realGet=methodDescriptor.get;methodDescriptor.get=function(){return isFormMethodDialog(this)?"dialog":realGet.call(this)};var realSet=methodDescriptor.set;methodDescriptor.set=function(v){return"string"==typeof v&&"dialog"===v.toLowerCase()?this.setAttribute("method",v):realSet.call(this,v)},Object.defineProperty(HTMLFormElement.prototype,"method",methodDescriptor)}}document.addEventListener("click",function(ev){if(dialogPolyfill.formSubmitter=null,dialogPolyfill.imagemapUseValue=null,!ev.defaultPrevented){var target=ev.target;if("composedPath"in ev&&(target=ev.composedPath().shift()||target),target&&isFormMethodDialog(target.form)){if(!("submit"===target.type&&["button","input"].indexOf(target.localName)>-1)){if(!("input"===target.localName&&"image"===target.type))return;dialogPolyfill.imagemapUseValue=ev.offsetX+","+ev.offsetY}findNearestDialog(target)&&(dialogPolyfill.formSubmitter=target)}}},!1),document.addEventListener("submit",function(ev){var form=ev.target;if(!findNearestDialog(form)){var submitter=findFormSubmitter(ev);"dialog"===(submitter&&submitter.getAttribute("formmethod")||form.getAttribute("method"))&&ev.preventDefault()}});var nativeFormSubmit=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(!isFormMethodDialog(this))return nativeFormSubmit.call(this);var dialog=findNearestDialog(this);dialog&&dialog.close()}}return dialogPolyfill});;(function(d){var c=d.createElement('style');c.textContent='/*! biscuitman.js 0.5.2 */dialog{color:#000;background:#fff;border:solid;width:fit-content;height:fit-content;margin:auto;padding:1em;display:block;position:absolute;left:0;right:0}dialog:not([open]){display:none}dialog+.backdrop{background:#0000001a;position:fixed;inset:0}._dialog_overlay{position:fixed;inset:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}';d.head.appendChild(c)})(document);
\ No newline at end of file
+/*! biscuitman.js 0.5.3 *//* dialog-polyfill.js ^0.5.6*/function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _type_of(obj){return obj&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj}!function(global,factory){("undefined"==typeof exports?"undefined":_type_of(exports))==="object"&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):(global=global||self).dialogPolyfill=factory()}(this,function(){"use strict";var supportCustomEvent=window.CustomEvent;function safeDispatchEvent(target,event){var check="on"+event.type.toLowerCase();return"function"==typeof target[check]&&target[check](event),target.dispatchEvent(event)}function findNearestDialog(el){for(;el;){if("dialog"===el.localName)return el;el=el.parentElement?el.parentElement:el.parentNode?el.parentNode.host:null}return null}function safeBlur(el){for(;el&&el.shadowRoot&&el.shadowRoot.activeElement;)el=el.shadowRoot.activeElement;el&&el.blur&&el!==document.body&&el.blur()}function isFormMethodDialog(el){return!!(el&&el.hasAttribute("method"))&&"dialog"===el.getAttribute("method").toLowerCase()}function isConnected(element){return element.isConnected||document.body.contains(element)}function findFormSubmitter(event){if(event.submitter)return event.submitter;var form=event.target;if(!_instanceof(form,HTMLFormElement))return null;var submitter=dialogPolyfill.formSubmitter;if(!submitter){var target=event.target;submitter=("getRootNode"in target&&target.getRootNode()||document).activeElement}return submitter&&submitter.form===form?submitter:null}function maybeHandleSubmit(event){if(!event.defaultPrevented){var form=event.target,value=dialogPolyfill.imagemapUseValue,submitter=findFormSubmitter(event);null===value&&submitter&&(value=submitter.value);var dialog=findNearestDialog(form);dialog&&"dialog"===(submitter&&submitter.getAttribute("formmethod")||form.getAttribute("method"))&&(event.preventDefault(),null!=value?dialog.close(value):dialog.close())}}function dialogPolyfillInfo(dialog){if(this.dialog_=dialog,this.replacedStyleTop_=!1,this.openAsModal_=!1,dialog.hasAttribute("role")||dialog.setAttribute("role","dialog"),dialog.show=this.show.bind(this),dialog.showModal=this.showModal.bind(this),dialog.close=this.close.bind(this),dialog.addEventListener("submit",maybeHandleSubmit,!1),"returnValue"in dialog||(dialog.returnValue=""),"MutationObserver"in window)new MutationObserver(this.maybeHideModal.bind(this)).observe(dialog,{attributes:!0,attributeFilter:["open"]});else{var timeout,removed=!1,cb=(function(){removed?this.downgradeModal():this.maybeHideModal(),removed=!1}).bind(this),delayModel=function(ev){if(ev.target===dialog){var cand="DOMNodeRemoved";removed|=ev.type.substr(0,cand.length)===cand,window.clearTimeout(timeout),timeout=window.setTimeout(cb,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(name){dialog.addEventListener(name,delayModel)})}Object.defineProperty(dialog,"open",{set:this.setOpen.bind(this),get:dialog.hasAttribute.bind(dialog,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}supportCustomEvent&&(void 0===supportCustomEvent?"undefined":_type_of(supportCustomEvent))!=="object"||((supportCustomEvent=function(event,x){x=x||{};var ev=document.createEvent("CustomEvent");return ev.initCustomEvent(event,!!x.bubbles,!!x.cancelable,x.detail||null),ev}).prototype=window.Event.prototype),dialogPolyfillInfo.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&isConnected(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),dialogPolyfill.dm.removeDialog(this))},setOpen:function(value){value?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(e){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var fake=document.createElement("div");this.dialog_.insertBefore(fake,this.dialog_.firstChild),fake.tabIndex=-1,fake.focus(),this.dialog_.removeChild(fake)}var redirectedEvent=document.createEvent("MouseEvents");redirectedEvent.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),this.dialog_.dispatchEvent(redirectedEvent),e.stopPropagation()},focus_:function(){var target=this.dialog_.querySelector("[autofocus]:not([disabled])");!target&&this.dialog_.tabIndex>=0&&(target=this.dialog_),target||(target=function findFocusableElementWithin(hostElement){var query=["button","input","keygen","select","textarea"].map(function(el){return el+":not([disabled])"});query.push('[tabindex]:not([disabled]):not([tabindex=""])');var target=hostElement.querySelector(query.join(", "));if(!target&&"attachShadow"in Element.prototype)for(var elems=hostElement.querySelectorAll("*"),i=0;i, the polyfill may not work correctly",element),"dialog"!==element.localName)throw Error("Failed to register dialog: The element is not a dialog.");new dialogPolyfillInfo(element)},dialogPolyfill.registerDialog=function(element){element.showModal||dialogPolyfill.forceRegisterDialog(element)},dialogPolyfill.DialogManager=function(){this.pendingDialogStack=[];var checkDOM=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(e){this.forwardTab_=void 0,e.stopPropagation(),checkDOM([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(records){var removed=[];records.forEach(function(rec){for(var c,i=0;c=rec.removedNodes[i];++i)_instanceof(c,Element)&&("dialog"===c.localName&&removed.push(c),removed=removed.concat(c.querySelectorAll("dialog")))}),removed.length&&checkDOM(removed)}))},dialogPolyfill.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},dialogPolyfill.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},dialogPolyfill.DialogManager.prototype.updateStacking=function(){for(var dpi,zIndex=this.zIndexHigh_,i=0;dpi=this.pendingDialogStack[i];++i)dpi.updateZIndex(--zIndex,--zIndex),0===i&&(this.overlay.style.zIndex=--zIndex);var last=this.pendingDialogStack[0];last?(last.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},dialogPolyfill.DialogManager.prototype.containedByTopDialog_=function(candidate){for(;candidate=findNearestDialog(candidate);){for(var dpi,i=0;dpi=this.pendingDialogStack[i];++i)if(dpi.dialog===candidate)return 0===i;candidate=candidate.parentElement}return!1},dialogPolyfill.DialogManager.prototype.handleFocus_=function(event){var target=event.composedPath?event.composedPath()[0]:event.target;if(!this.containedByTopDialog_(target)&&document.activeElement!==document.documentElement&&(event.preventDefault(),event.stopPropagation(),safeBlur(target),void 0!==this.forwardTab_)){var dpi=this.pendingDialogStack[0];return dpi.dialog.compareDocumentPosition(target)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?dpi.focus_():target!==document.documentElement&&document.documentElement.focus()),!1}},dialogPolyfill.DialogManager.prototype.handleKey_=function(event){if(this.forwardTab_=void 0,27===event.keyCode){event.preventDefault(),event.stopPropagation();var cancelEvent=new supportCustomEvent("cancel",{bubbles:!1,cancelable:!0}),dpi=this.pendingDialogStack[0];dpi&&safeDispatchEvent(dpi.dialog,cancelEvent)&&dpi.dialog.close()}else 9===event.keyCode&&(this.forwardTab_=!event.shiftKey)},dialogPolyfill.DialogManager.prototype.checkDOM_=function(removed){this.pendingDialogStack.slice().forEach(function(dpi){-1!==removed.indexOf(dpi.dialog)?dpi.downgradeModal():dpi.maybeHideModal()})},dialogPolyfill.DialogManager.prototype.pushDialog=function(dpi){var allowed=(this.zIndexHigh_-this.zIndexLow_)/2-1;return!(this.pendingDialogStack.length>=allowed)&&(1===this.pendingDialogStack.unshift(dpi)&&this.blockDocument(),this.updateStacking(),!0)},dialogPolyfill.DialogManager.prototype.removeDialog=function(dpi){var index=this.pendingDialogStack.indexOf(dpi);-1!==index&&(this.pendingDialogStack.splice(index,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},dialogPolyfill.dm=new dialogPolyfill.DialogManager,dialogPolyfill.formSubmitter=null,dialogPolyfill.imagemapUseValue=null,void 0===window.HTMLDialogElement){var testForm=document.createElement("form");if(testForm.setAttribute("method","dialog"),"dialog"!==testForm.method){var methodDescriptor=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(methodDescriptor){var realGet=methodDescriptor.get;methodDescriptor.get=function(){return isFormMethodDialog(this)?"dialog":realGet.call(this)};var realSet=methodDescriptor.set;methodDescriptor.set=function(v){return"string"==typeof v&&"dialog"===v.toLowerCase()?this.setAttribute("method",v):realSet.call(this,v)},Object.defineProperty(HTMLFormElement.prototype,"method",methodDescriptor)}}document.addEventListener("click",function(ev){if(dialogPolyfill.formSubmitter=null,dialogPolyfill.imagemapUseValue=null,!ev.defaultPrevented){var target=ev.target;if("composedPath"in ev&&(target=ev.composedPath().shift()||target),target&&isFormMethodDialog(target.form)){if(!("submit"===target.type&&["button","input"].indexOf(target.localName)>-1)){if(!("input"===target.localName&&"image"===target.type))return;dialogPolyfill.imagemapUseValue=ev.offsetX+","+ev.offsetY}findNearestDialog(target)&&(dialogPolyfill.formSubmitter=target)}}},!1),document.addEventListener("submit",function(ev){var form=ev.target;if(!findNearestDialog(form)){var submitter=findFormSubmitter(ev);"dialog"===(submitter&&submitter.getAttribute("formmethod")||form.getAttribute("method"))&&ev.preventDefault()}});var nativeFormSubmit=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(!isFormMethodDialog(this))return nativeFormSubmit.call(this);var dialog=findNearestDialog(this);dialog&&dialog.close()}}return dialogPolyfill});;(function(d){var c=d.createElement('style');c.textContent='/*! biscuitman.js 0.5.3 */dialog{color:#000;background:#fff;border:solid;width:fit-content;height:fit-content;margin:auto;padding:1em;display:block;position:absolute;left:0;right:0}dialog:not([open]){display:none}dialog+.backdrop{background:#0000001a;position:fixed;inset:0}._dialog_overlay{position:fixed;inset:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}';d.head.appendChild(c)})(document);
\ No newline at end of file
diff --git a/dist/esm/biscuitman.min.mjs b/dist/esm/biscuitman.min.mjs
index d2b595a..8b65229 100644
--- a/dist/esm/biscuitman.min.mjs
+++ b/dist/esm/biscuitman.min.mjs
@@ -1 +1 @@
-/*! biscuitman.js 0.5.2 */let e,t,o;let{document:a,window:n,Object:i}=globalThis,l=a.documentElement,s={key:"myconsent",global:"Consent",force:!1,enableMore:!0,sections:["essential"],title:"Your privacy matters",message:"We use cookies",settings:"Settings",reject:"Reject All",accept:"Accept All",save:"Save My Settings",settingsTitle:"My Consent Settings",info:"",more:"Show more",noCookies:"No cookies to display",acceptNonEU:!1,dialogPolyfill:"/dist/dialog-polyfill.withcss.min.js"},c=document.createElement("div"),r={},d=()=>{l.style.setProperty("--bm-height",`${c.offsetHeight}px`)},m=e=>{l.classList.toggle("bm-show",e),d()},p=()=>{let{consentTime:t,...o}=b();for(let[a,n]of(t||(o=i.fromEntries(e.sections.slice(1).map(e=>[e,!1]))),i.entries(o)))l.classList.toggle(`bm-${a}`,n),l.classList.toggle(`bm-no-${a}`,!n)};function u(){f("open"),t.showModal()}function f(e,t){let o=`bm:${e}`,n={...void 0!==t&&t,time:+new Date};a.dispatchEvent(new CustomEvent(o,{detail:n})),console.debug(o,n),r[o]&&r[o].forEach(e=>e(n))}let b=()=>n[e.global]||{};function g(t){n[e.global]=t,p()}let $=e=>!!b()[e];function h(e,t){for(let o in e)e[o]&&!1===t[o]&&f("revoke",{section:o})}function v(){try{return JSON.parse(localStorage.getItem(e.key))}catch(t){return console.error(t),localStorage.removeItem(e.key),{}}}function k(){let t=i.fromEntries(i.entries(localStorage)),o=i.fromEntries(a.cookie.split("; ").map(e=>e.split("="))),{consentTime:n,...l}=v()||e.sections.slice(1).reduce((e,t)=>(e[t]=!1,{consentTime:void 0,...e}),{});for(let[n,s]of i.entries(l)){if(s)continue;let l=i.keys(e[`${n}Cookies`]||{});for(let e of(l.filter(e=>e.endsWith("*")).map(e=>{i.keys({...o,...t}).map(t=>{t.startsWith(e.slice(0,-1))&&l.push(t)})}),l)){if(o[e]){let t=`${e}=;expires=Thu, 01 Jan 1970 00:00:01 UTC;path=/;`;a.cookie=t,a.cookie=`${t}domain=${location.hostname};`,a.cookie=`${t}domain=.${location.hostname};`,f("delete",{cookie:e})}t[e]&&(localStorage.removeItem(e),f("delete",{localStorage:e}))}}}function y(o){let a=void 0===o,n={consentTime:+new Date};e.sections.forEach(e=>{if("essential"===e)return;let t=c.querySelector(`[data-s=${e}]`),i=a?t.checked:o;n[e]=i,a||(t.checked=o)}),h(b(),n),g(n),localStorage.setItem(e.key,JSON.stringify(n)),f("save",{data:n}),k(),E(),t.open&&t.close(),m(!1)}function E(){a.querySelectorAll("script[data-consent]").forEach(e=>{if(!b()[e.dataset.consent])return;let t=a.createElement("script");for(let{name:o,value:a}of e.attributes)o.startsWith("data-")||"type"===o||t.setAttribute(o,a);t.setAttribute("type",e.dataset.type||"text/javascript"),e.src||(t.textContent=e.textContent),e.parentNode.replaceChild(t,e),f("inject",{el:e,...e.id&&{id:e.id}}),e.src&&""!==e.textContent.trim()&&t.addEventListener("load",()=>{let o=a.createElement("script");o.textContent=e.textContent,e.id&&(o.id=e.id+"-after"),t.insertAdjacentElement("afterend",o),f("inject",{el:o,parent:e,...o.id&&{id:o.id}})})})}export default{create:function(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o)return o;e={...s,...l};let p=n.bmInvalidate=()=>{f("invalidate",{data:b()}),h({}),y(!1),g({}),localStorage.removeItem(e.key),m(!0),e.force&&t.showModal()},T=n.bmUpdate=()=>{f("update",{data:b()}),u()};return g(v()||{}),function(){let t=Intl.DateTimeFormat().resolvedOptions().timeZone,o=/^(GMT|UTC)$/.test(t)||/(Europe|BST|CEST|CET|EET|IST|WEST|WET|GMT-1|GMT-2|UTC+1|UTC+2|UTC+3)/.test(t);e.acceptNonEU&&!o&&(y(!0),m(!1))}(),c.className="biscuitman",c.innerHTML=` ${e.title}${e.message}
`.replaceAll("{link}",`${e.linkText}`),c.onclick=e=>{let o=e.target.dataset.id;if(o)switch(f("button",{id:o}),o){case"more":e.target.remove();break;case"accept":y(!0);break;case"close":t.close();break;case"settings":u();break;case"save":y();break;case"reject":y(!1)}},t=c.querySelector("dialog"),e.dialogPolyfill&&!t.close&&function(t){function o(){a.documentElement.classList.add("bm-dialog-polyfill"),n.dialogPolyfill.registerDialog(t)}if(n.dialogPolyfill)o();else{let t=a.createElement("script");t.onload=o,t.src=e.dialogPolyfill,a.head.appendChild(t)}}(t),t.onclose=()=>f("close"),e.force&&(t.oncancel=e=>e.preventDefault(),t.onkeydown=e=>"Escape"===e.key?e.preventDefault():null),c.querySelectorAll("[data-s]").forEach(e=>e.addEventListener("change",t=>{e.parentElement.classList.toggle("checked",t.target.checked)})),a.body.appendChild(c),n.addEventListener("resize",d),k(),n[e.global].consentTime?(m(!1),E()):(m(!0),e.force&&u()),o={consent:$,invalidate:p,update:T,on:(e,t)=>{let a=`bm:${e}`;return r[a]||(r[a]=[]),r[a].push(t),o},off:(e,t)=>{let o=`bm:${e}`;r[o]&&(r[o]=r[o].filter(e=>e!==t))}}}};
\ No newline at end of file
+/*! biscuitman.js 0.5.3 */let e,t,o;let{document:a,window:n,Object:i}=globalThis,l=a.documentElement,s={key:"myconsent",global:"Consent",force:!1,enableMore:!0,sections:["essential"],title:"Your privacy matters",message:"We use cookies",settings:"Settings",reject:"Reject All",accept:"Accept All",save:"Save My Settings",settingsTitle:"My Consent Settings",info:"",more:"Show more",noCookies:"No cookies to display",acceptNonEU:!1,dialogPolyfill:"/dist/dialog-polyfill.withcss.min.js"},c=document.createElement("div"),r={},d=()=>{l.style.setProperty("--bm-height",`${c.offsetHeight}px`)},m=e=>{l.classList.toggle("bm-show",e),d()},p=()=>{let{consentTime:t,...o}=b();for(let[a,n]of(t||(o=i.fromEntries(e.sections.slice(1).map(e=>[e,!1]))),i.entries(o)))l.classList.toggle(`bm-${a}`,n),l.classList.toggle(`bm-no-${a}`,!n)};function u(){f("open"),t.showModal()}function f(e,t){let o=`bm:${e}`,n={...void 0!==t&&t,time:+new Date};a.dispatchEvent(new CustomEvent(o,{detail:n})),console.debug(o,n),r[o]&&r[o].forEach(e=>e(n))}let b=()=>n[e.global]||{};function g(t){n[e.global]=t,p()}let $=e=>!!b()[e];function h(e,t){for(let o in e)e[o]&&!1===t[o]&&f("revoke",{section:o})}function v(){try{return JSON.parse(localStorage.getItem(e.key))}catch(t){return console.error(t),localStorage.removeItem(e.key),{}}}function k(){let t=i.fromEntries(i.entries(localStorage)),o=i.fromEntries(a.cookie.split("; ").map(e=>e.split("="))),{consentTime:n,...l}=v()||e.sections.slice(1).reduce((e,t)=>(e[t]=!1,{consentTime:void 0,...e}),{});for(let[n,s]of i.entries(l)){if(s)continue;let l=i.keys(e[`${n}Cookies`]||{});for(let e of(l.filter(e=>e.endsWith("*")).map(e=>{i.keys({...o,...t}).map(t=>{t.startsWith(e.slice(0,-1))&&l.push(t)})}),l)){if(o[e]){let t=`${e}=;expires=Thu, 01 Jan 1970 00:00:01 UTC;path=/;`;a.cookie=t,a.cookie=`${t}domain=${location.hostname};`,a.cookie=`${t}domain=.${location.hostname};`,f("delete",{cookie:e})}t[e]&&(localStorage.removeItem(e),f("delete",{localStorage:e}))}}}function y(o){let a=void 0===o,n={consentTime:+new Date};e.sections.forEach(e=>{if("essential"===e)return;let t=c.querySelector(`[data-s=${e}]`),i=a?t.checked:o;n[e]=i,a||(t.checked=o)}),h(b(),n),g(n),localStorage.setItem(e.key,JSON.stringify(n)),f("save",{data:n}),k(),E(),t.open&&t.close(),m(!1)}function E(){a.querySelectorAll("script[data-consent]").forEach(e=>{if(!b()[e.dataset.consent])return;let t=a.createElement("script");for(let{name:o,value:a}of e.attributes)o.startsWith("data-")||"type"===o||t.setAttribute(o,a);t.setAttribute("type",e.dataset.type||"text/javascript"),e.src||(t.textContent=e.textContent),e.parentNode.replaceChild(t,e),f("inject",{el:e,...e.id&&{id:e.id}}),e.src&&""!==e.textContent.trim()&&t.addEventListener("load",()=>{let o=a.createElement("script");o.textContent=e.textContent,e.id&&(o.id=e.id+"-after"),t.insertAdjacentElement("afterend",o),f("inject",{el:o,parent:e,...o.id&&{id:o.id}})})})}export default{create:function(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o)return o;e={...s,...l};let p=n.bmInvalidate=()=>{f("invalidate",{data:b()}),h({}),y(!1),g({}),localStorage.removeItem(e.key),m(!0),e.force&&t.showModal()},T=n.bmUpdate=()=>{f("update",{data:b()}),u()};return g(v()||{}),function(){let t=Intl.DateTimeFormat().resolvedOptions().timeZone,o=/^(GMT|UTC)$/.test(t)||/(Europe|BST|CEST|CET|EET|IST|WEST|WET|GMT-1|GMT-2|UTC+1|UTC+2|UTC+3)/.test(t);e.acceptNonEU&&!o&&(y(!0),m(!1))}(),c.className="biscuitman",c.innerHTML=` ${e.title}${e.message}
`.replaceAll("{link}",`${e.linkText}`),c.onclick=e=>{let o=e.target.dataset.id;if(o)switch(f("button",{id:o}),o){case"more":e.target.remove();break;case"accept":y(!0);break;case"close":t.close();break;case"settings":u();break;case"save":y();break;case"reject":y(!1)}},t=c.querySelector("dialog"),e.dialogPolyfill&&!t.close&&function(t){function o(){a.documentElement.classList.add("bm-dialog-polyfill"),n.dialogPolyfill.registerDialog(t)}if(n.dialogPolyfill)o();else{let t=a.createElement("script");t.onload=o,t.src=e.dialogPolyfill,a.head.appendChild(t)}}(t),t.onclose=()=>f("close"),e.force&&(t.oncancel=e=>e.preventDefault(),t.onkeydown=e=>"Escape"===e.key?e.preventDefault():null),c.querySelectorAll("[data-s]").forEach(e=>e.addEventListener("change",t=>{e.parentElement.classList.toggle("checked",t.target.checked)})),a.body.appendChild(c),n.addEventListener("resize",d),k(),n[e.global].consentTime?(m(!1),E()):(m(!0),e.force&&u()),o={consent:$,invalidate:p,update:T,on:(e,t)=>{let a=`bm:${e}`;return r[a]||(r[a]=[]),r[a].push(t),o},off:(e,t)=>{let o=`bm:${e}`;r[o]&&(r[o]=r[o].filter(e=>e!==t))}}}};
\ No newline at end of file
diff --git a/dist/esm/biscuitman.mjs b/dist/esm/biscuitman.mjs
index 2a48c3a..ec1f0ce 100644
--- a/dist/esm/biscuitman.mjs
+++ b/dist/esm/biscuitman.mjs
@@ -1,4 +1,4 @@
-/*! biscuitman.js 0.5.2 */
+/*! biscuitman.js 0.5.3 */
const { document: d, window: w, Object: O } = globalThis;
const h = d.documentElement;
const defaults = {
diff --git a/dist/esm/biscuitman.withcss.min.mjs b/dist/esm/biscuitman.withcss.min.mjs
index 3aacaff..8fb1ec5 100644
--- a/dist/esm/biscuitman.withcss.min.mjs
+++ b/dist/esm/biscuitman.withcss.min.mjs
@@ -1 +1 @@
-/*! biscuitman.js 0.5.2 */let e,t,o;let{document:a,window:n,Object:i}=globalThis,l=a.documentElement,s={key:"myconsent",global:"Consent",force:!1,enableMore:!0,sections:["essential"],title:"Your privacy matters",message:"We use cookies",settings:"Settings",reject:"Reject All",accept:"Accept All",save:"Save My Settings",settingsTitle:"My Consent Settings",info:"",more:"Show more",noCookies:"No cookies to display",acceptNonEU:!1,dialogPolyfill:"/dist/dialog-polyfill.withcss.min.js"},c=document.createElement("div"),r={},d=()=>{l.style.setProperty("--bm-height",`${c.offsetHeight}px`)},m=e=>{l.classList.toggle("bm-show",e),d()},p=()=>{let{consentTime:t,...o}=b();for(let[a,n]of(t||(o=i.fromEntries(e.sections.slice(1).map(e=>[e,!1]))),i.entries(o)))l.classList.toggle(`bm-${a}`,n),l.classList.toggle(`bm-no-${a}`,!n)};function u(){f("open"),t.showModal()}function f(e,t){let o=`bm:${e}`,n={...void 0!==t&&t,time:+new Date};a.dispatchEvent(new CustomEvent(o,{detail:n})),console.debug(o,n),r[o]&&r[o].forEach(e=>e(n))}let b=()=>n[e.global]||{};function g(t){n[e.global]=t,p()}let $=e=>!!b()[e];function h(e,t){for(let o in e)e[o]&&!1===t[o]&&f("revoke",{section:o})}function v(){try{return JSON.parse(localStorage.getItem(e.key))}catch(t){return console.error(t),localStorage.removeItem(e.key),{}}}function k(){let t=i.fromEntries(i.entries(localStorage)),o=i.fromEntries(a.cookie.split("; ").map(e=>e.split("="))),{consentTime:n,...l}=v()||e.sections.slice(1).reduce((e,t)=>(e[t]=!1,{consentTime:void 0,...e}),{});for(let[n,s]of i.entries(l)){if(s)continue;let l=i.keys(e[`${n}Cookies`]||{});for(let e of(l.filter(e=>e.endsWith("*")).map(e=>{i.keys({...o,...t}).map(t=>{t.startsWith(e.slice(0,-1))&&l.push(t)})}),l)){if(o[e]){let t=`${e}=;expires=Thu, 01 Jan 1970 00:00:01 UTC;path=/;`;a.cookie=t,a.cookie=`${t}domain=${location.hostname};`,a.cookie=`${t}domain=.${location.hostname};`,f("delete",{cookie:e})}t[e]&&(localStorage.removeItem(e),f("delete",{localStorage:e}))}}}function y(o){let a=void 0===o,n={consentTime:+new Date};e.sections.forEach(e=>{if("essential"===e)return;let t=c.querySelector(`[data-s=${e}]`),i=a?t.checked:o;n[e]=i,a||(t.checked=o)}),h(b(),n),g(n),localStorage.setItem(e.key,JSON.stringify(n)),f("save",{data:n}),k(),E(),t.open&&t.close(),m(!1)}function E(){a.querySelectorAll("script[data-consent]").forEach(e=>{if(!b()[e.dataset.consent])return;let t=a.createElement("script");for(let{name:o,value:a}of e.attributes)o.startsWith("data-")||"type"===o||t.setAttribute(o,a);t.setAttribute("type",e.dataset.type||"text/javascript"),e.src||(t.textContent=e.textContent),e.parentNode.replaceChild(t,e),f("inject",{el:e,...e.id&&{id:e.id}}),e.src&&""!==e.textContent.trim()&&t.addEventListener("load",()=>{let o=a.createElement("script");o.textContent=e.textContent,e.id&&(o.id=e.id+"-after"),t.insertAdjacentElement("afterend",o),f("inject",{el:o,parent:e,...o.id&&{id:o.id}})})})}export default{create:function(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o)return o;e={...s,...l};let p=n.bmInvalidate=()=>{f("invalidate",{data:b()}),h({}),y(!1),g({}),localStorage.removeItem(e.key),m(!0),e.force&&t.showModal()},T=n.bmUpdate=()=>{f("update",{data:b()}),u()};return g(v()||{}),function(){let t=Intl.DateTimeFormat().resolvedOptions().timeZone,o=/^(GMT|UTC)$/.test(t)||/(Europe|BST|CEST|CET|EET|IST|WEST|WET|GMT-1|GMT-2|UTC+1|UTC+2|UTC+3)/.test(t);e.acceptNonEU&&!o&&(y(!0),m(!1))}(),c.className="biscuitman",c.innerHTML=` ${e.title}${e.message}
`.replaceAll("{link}",`${e.linkText}`),c.onclick=e=>{let o=e.target.dataset.id;if(o)switch(f("button",{id:o}),o){case"more":e.target.remove();break;case"accept":y(!0);break;case"close":t.close();break;case"settings":u();break;case"save":y();break;case"reject":y(!1)}},t=c.querySelector("dialog"),e.dialogPolyfill&&!t.close&&function(t){function o(){a.documentElement.classList.add("bm-dialog-polyfill"),n.dialogPolyfill.registerDialog(t)}if(n.dialogPolyfill)o();else{let t=a.createElement("script");t.onload=o,t.src=e.dialogPolyfill,a.head.appendChild(t)}}(t),t.onclose=()=>f("close"),e.force&&(t.oncancel=e=>e.preventDefault(),t.onkeydown=e=>"Escape"===e.key?e.preventDefault():null),c.querySelectorAll("[data-s]").forEach(e=>e.addEventListener("change",t=>{e.parentElement.classList.toggle("checked",t.target.checked)})),a.body.appendChild(c),n.addEventListener("resize",d),k(),n[e.global].consentTime?(m(!1),E()):(m(!0),e.force&&u()),o={consent:$,invalidate:p,update:T,on:(e,t)=>{let a=`bm:${e}`;return r[a]||(r[a]=[]),r[a].push(t),o},off:(e,t)=>{let o=`bm:${e}`;r[o]&&(r[o]=r[o].filter(e=>e!==t))}}}};;if(typeof BMCSS==='undefined'){let c=document.createElement('style');c.id='BMCSS';c.textContent=`/*! biscuitman.js 0.5.2 */.biscuitman{--ui:0,0,0;--tx:#444;--bg:#fff;--c:#105d89;background:var(--bg);box-sizing:border-box;z-index:3;width:100%;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;display:none;position:fixed;bottom:0;box-shadow:0 -2px 10px #00000029}.bm-show .biscuitman{display:block}.biscuitman *{box-sizing:border-box;color:var(--tx);margin:0;padding:0;font-family:inherit;font-size:16px;line-height:1.4em}.biscuitman:has([open]){transform:translateY(100%)}.biscuitman article{padding:0;position:relative}@media (min-width:770px){.biscuitman article{padding-right:calc(max(300px,30vw) + 20px)}.biscuitman article nav{width:30vw;min-width:300px;position:absolute;bottom:50%;right:0;transform:translateY(50%)}}.biscuitman article p{color:var(--tx);margin:10px 0;font-size:13px}@media (min-width:575px){.biscuitman article p{font-size:14px}}.biscuitman button{background:var(--bg);border:2px solid var(--c);color:var(--c);cursor:pointer;border-radius:3px;margin-top:10px;padding:.8em;font-size:13px;line-height:1em}.biscuitman button[data-id=accept]{background:var(--c);color:var(--bg)!important}.biscuitman button[data-id=close]{color:rgba(var(--ui),.5);opacity:.6;-webkit-user-select:none;user-select:none;z-index:2;background:0 0;border:none;outline:none;padding:10px;font-size:24px;line-height:1em;position:absolute;top:0;right:10px}.biscuitman button[disabled]{display:none}.biscuitman button:hover{opacity:.8}@media (min-width:576px){.biscuitman nav{flex-direction:row-reverse;gap:10px;width:100%;display:flex}.biscuitman nav button{flex-grow:1;margin-bottom:0}}@media (max-width:575px){.biscuitman nav{flex-direction:column;flex-grow:1;display:flex}}.biscuitman dialog{background:var(--bg);border:0;width:100%;max-width:100%;height:100%;max-height:100%}@media (min-width:576px){.biscuitman dialog{border-radius:10px;width:90vw;max-width:860px;max-height:80vh;margin:auto;box-shadow:0 0 8px #0000004d}}@media (min-width:576px) and (min-height:1134px){.biscuitman dialog{max-height:950px}}.biscuitman dialog nav{justify-self:flex-end;position:relative}.biscuitman .bm-dialog{flex-direction:column;height:100%;padding:20px;display:flex}.biscuitman .bm-dialog b{padding-bottom:8px;position:relative}.biscuitman .bm-dialog>b:after{content:"";background:linear-gradient(180deg,var(--bg)20%,#fff0);pointer-events:none;z-index:1;width:100%;height:25px;margin-bottom:-24px;position:absolute;bottom:0;left:0}.biscuitman .bm-dialog nav:after{content:"";background:linear-gradient(0deg,var(--bg)20%,#fff0);pointer-events:none;width:100%;height:25px;position:absolute;top:-24px;left:0}.biscuitman .bm-sections{scrollbar-color:rgba(var(--ui),.2)var(--bg);flex-shrink:1;height:100%;padding:15px 0;position:relative;overflow-y:scroll}@media (min-width:576px){.biscuitman .bm-sections{margin-right:-18px;padding-right:4px}}.biscuitman .bm-sections>p{padding-right:30px;font-size:13px;line-height:18px}@media (min-width:576px){.biscuitman .bm-sections>p{font-size:14px}}.biscuitman .bm-sections>p span{font-size:inherit;padding-bottom:5px;display:inline-block}.biscuitman .bm-sections>p [data-id=more]~span{display:none}.biscuitman a{font-size:inherit;color:var(--c);cursor:pointer;text-decoration:none;display:inline-block}.biscuitman a:hover{text-decoration:underline}.biscuitman section{margin-bottom:10px;position:relative}.biscuitman section:first-of-type{margin-top:10px}.biscuitman details{border:1px solid rgba(var(--ui),.2);border-radius:5px;padding:10px;list-style:none;box-shadow:0 2px 4px #0000001a}.biscuitman details[open] summary b:after{margin:-3px 0 0 -2px;transform:rotate(45deg)scale(.3)}.biscuitman summary{cursor:pointer;flex-direction:column;width:100%;padding:5px 80px 10px 10px;list-style:none;display:flex;position:relative}.biscuitman summary b{margin-bottom:3px}.biscuitman summary b:after{content:"";border:5px solid rgba(var(--ui),.4);border-top-color:#0000;border-left-color:#0000;border-radius:2px;width:1em;height:1em;margin:-2px 0 0 -4px;display:block;transform:rotate(-45deg)scale(.3)}.biscuitman summary p{color:var(--tx);font-size:14px}.biscuitman summary>*{display:inline-flex}.biscuitman summary::marker{display:none}.biscuitman summary::-webkit-details-marker{display:none}.biscuitman dl{background:rgba(var(--ui),.08);margin:10px;padding:10px;display:flex}.biscuitman dl dt,.biscuitman dl dd{color:var(--tx);font-size:12px}.biscuitman dl dt{min-width:120px;padding-right:30px;font-weight:700}.biscuitman label{--height:1.2em;--width:2.3em;--gap:2px;height:var(--height);width:var(--width);background-color:rgba(var(--ui),.3);border-radius:var(--height);margin-top:-2px;display:block;position:absolute;top:50%;right:20px;transform:translateY(-50%);font-size:20px!important}.biscuitman label:before{content:"";background:var(--bg);height:calc(var(--height) - calc(var(--gap)*2));width:calc(var(--height) - calc(var(--gap)*2));height:var(--height);width:var(--height);left:var(--gap);transform-origin:50%;border-radius:100%;display:block;position:absolute;top:50%;left:0;transform:translateY(-50%)scale(.8)}.biscuitman label.checked{background-color:var(--c)}.biscuitman label.checked:before{left:auto;right:0}.biscuitman label:has(:focus-visible){outline:auto highlight}.biscuitman label.disabled.checked{opacity:.5}.biscuitman label input{opacity:0}.bm-dialog-polyfill .biscuitman dialog{position:fixed;top:50%;transform:translateY(-50%)}`;document.head.appendChild(c)}
\ No newline at end of file
+/*! biscuitman.js 0.5.3 */let e,t,o;let{document:a,window:n,Object:i}=globalThis,l=a.documentElement,s={key:"myconsent",global:"Consent",force:!1,enableMore:!0,sections:["essential"],title:"Your privacy matters",message:"We use cookies",settings:"Settings",reject:"Reject All",accept:"Accept All",save:"Save My Settings",settingsTitle:"My Consent Settings",info:"",more:"Show more",noCookies:"No cookies to display",acceptNonEU:!1,dialogPolyfill:"/dist/dialog-polyfill.withcss.min.js"},c=document.createElement("div"),r={},d=()=>{l.style.setProperty("--bm-height",`${c.offsetHeight}px`)},m=e=>{l.classList.toggle("bm-show",e),d()},p=()=>{let{consentTime:t,...o}=b();for(let[a,n]of(t||(o=i.fromEntries(e.sections.slice(1).map(e=>[e,!1]))),i.entries(o)))l.classList.toggle(`bm-${a}`,n),l.classList.toggle(`bm-no-${a}`,!n)};function u(){f("open"),t.showModal()}function f(e,t){let o=`bm:${e}`,n={...void 0!==t&&t,time:+new Date};a.dispatchEvent(new CustomEvent(o,{detail:n})),console.debug(o,n),r[o]&&r[o].forEach(e=>e(n))}let b=()=>n[e.global]||{};function g(t){n[e.global]=t,p()}let $=e=>!!b()[e];function h(e,t){for(let o in e)e[o]&&!1===t[o]&&f("revoke",{section:o})}function v(){try{return JSON.parse(localStorage.getItem(e.key))}catch(t){return console.error(t),localStorage.removeItem(e.key),{}}}function k(){let t=i.fromEntries(i.entries(localStorage)),o=i.fromEntries(a.cookie.split("; ").map(e=>e.split("="))),{consentTime:n,...l}=v()||e.sections.slice(1).reduce((e,t)=>(e[t]=!1,{consentTime:void 0,...e}),{});for(let[n,s]of i.entries(l)){if(s)continue;let l=i.keys(e[`${n}Cookies`]||{});for(let e of(l.filter(e=>e.endsWith("*")).map(e=>{i.keys({...o,...t}).map(t=>{t.startsWith(e.slice(0,-1))&&l.push(t)})}),l)){if(o[e]){let t=`${e}=;expires=Thu, 01 Jan 1970 00:00:01 UTC;path=/;`;a.cookie=t,a.cookie=`${t}domain=${location.hostname};`,a.cookie=`${t}domain=.${location.hostname};`,f("delete",{cookie:e})}t[e]&&(localStorage.removeItem(e),f("delete",{localStorage:e}))}}}function y(o){let a=void 0===o,n={consentTime:+new Date};e.sections.forEach(e=>{if("essential"===e)return;let t=c.querySelector(`[data-s=${e}]`),i=a?t.checked:o;n[e]=i,a||(t.checked=o)}),h(b(),n),g(n),localStorage.setItem(e.key,JSON.stringify(n)),f("save",{data:n}),k(),E(),t.open&&t.close(),m(!1)}function E(){a.querySelectorAll("script[data-consent]").forEach(e=>{if(!b()[e.dataset.consent])return;let t=a.createElement("script");for(let{name:o,value:a}of e.attributes)o.startsWith("data-")||"type"===o||t.setAttribute(o,a);t.setAttribute("type",e.dataset.type||"text/javascript"),e.src||(t.textContent=e.textContent),e.parentNode.replaceChild(t,e),f("inject",{el:e,...e.id&&{id:e.id}}),e.src&&""!==e.textContent.trim()&&t.addEventListener("load",()=>{let o=a.createElement("script");o.textContent=e.textContent,e.id&&(o.id=e.id+"-after"),t.insertAdjacentElement("afterend",o),f("inject",{el:o,parent:e,...o.id&&{id:o.id}})})})}export default{create:function(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o)return o;e={...s,...l};let p=n.bmInvalidate=()=>{f("invalidate",{data:b()}),h({}),y(!1),g({}),localStorage.removeItem(e.key),m(!0),e.force&&t.showModal()},T=n.bmUpdate=()=>{f("update",{data:b()}),u()};return g(v()||{}),function(){let t=Intl.DateTimeFormat().resolvedOptions().timeZone,o=/^(GMT|UTC)$/.test(t)||/(Europe|BST|CEST|CET|EET|IST|WEST|WET|GMT-1|GMT-2|UTC+1|UTC+2|UTC+3)/.test(t);e.acceptNonEU&&!o&&(y(!0),m(!1))}(),c.className="biscuitman",c.innerHTML=` ${e.title}${e.message}
`.replaceAll("{link}",`${e.linkText}`),c.onclick=e=>{let o=e.target.dataset.id;if(o)switch(f("button",{id:o}),o){case"more":e.target.remove();break;case"accept":y(!0);break;case"close":t.close();break;case"settings":u();break;case"save":y();break;case"reject":y(!1)}},t=c.querySelector("dialog"),e.dialogPolyfill&&!t.close&&function(t){function o(){a.documentElement.classList.add("bm-dialog-polyfill"),n.dialogPolyfill.registerDialog(t)}if(n.dialogPolyfill)o();else{let t=a.createElement("script");t.onload=o,t.src=e.dialogPolyfill,a.head.appendChild(t)}}(t),t.onclose=()=>f("close"),e.force&&(t.oncancel=e=>e.preventDefault(),t.onkeydown=e=>"Escape"===e.key?e.preventDefault():null),c.querySelectorAll("[data-s]").forEach(e=>e.addEventListener("change",t=>{e.parentElement.classList.toggle("checked",t.target.checked)})),a.body.appendChild(c),n.addEventListener("resize",d),k(),n[e.global].consentTime?(m(!1),E()):(m(!0),e.force&&u()),o={consent:$,invalidate:p,update:T,on:(e,t)=>{let a=`bm:${e}`;return r[a]||(r[a]=[]),r[a].push(t),o},off:(e,t)=>{let o=`bm:${e}`;r[o]&&(r[o]=r[o].filter(e=>e!==t))}}}};;if(typeof BMCSS==='undefined'){let c=document.createElement('style');c.id='BMCSS';c.textContent=`/*! biscuitman.js 0.5.3 */.biscuitman{--ui:0,0,0;--tx:#444;--bg:#fff;--c:#105d89;background:var(--bg);box-sizing:border-box;z-index:3;width:100%;padding:20px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;display:none;position:fixed;bottom:0;box-shadow:0 -2px 10px #00000029}.bm-show .biscuitman{display:block}.biscuitman *{box-sizing:border-box;color:var(--tx);margin:0;padding:0;font-family:inherit;font-size:16px;line-height:1.4em}.biscuitman:has([open]){transform:translateY(100%)}.biscuitman article{padding:0;position:relative}@media (min-width:770px){.biscuitman article{padding-right:calc(max(300px,30vw) + 20px)}.biscuitman article nav{width:30vw;min-width:300px;position:absolute;bottom:50%;right:0;transform:translateY(50%)}}.biscuitman article p{color:var(--tx);margin:10px 0;font-size:13px}@media (min-width:575px){.biscuitman article p{font-size:14px}}.biscuitman button{background:var(--bg);border:2px solid var(--c);color:var(--c);cursor:pointer;border-radius:3px;margin-top:10px;padding:.8em;font-size:13px;line-height:1em}.biscuitman button[data-id=accept]{background:var(--c);color:var(--bg)!important}.biscuitman button[data-id=close]{color:rgba(var(--ui),.5);opacity:.6;-webkit-user-select:none;user-select:none;z-index:2;background:0 0;border:none;outline:none;padding:10px;font-size:24px;line-height:1em;position:absolute;top:0;right:10px}.biscuitman button[disabled]{display:none}.biscuitman button:hover{opacity:.8}@media (min-width:576px){.biscuitman nav{flex-direction:row-reverse;gap:10px;width:100%;display:flex}.biscuitman nav button{flex-grow:1;margin-bottom:0}}@media (max-width:575px){.biscuitman nav{flex-direction:column;flex-grow:1;display:flex}}.biscuitman dialog{background:var(--bg);border:0;width:100%;max-width:100%;height:100%;max-height:100%}@media (min-width:576px){.biscuitman dialog{border-radius:10px;width:90vw;max-width:860px;max-height:80vh;margin:auto;box-shadow:0 0 8px #0000004d}}@media (min-width:576px) and (min-height:1134px){.biscuitman dialog{max-height:950px}}.biscuitman dialog nav{justify-self:flex-end;position:relative}.biscuitman .bm-dialog{flex-direction:column;height:100%;padding:20px;display:flex}.biscuitman .bm-dialog b{padding-bottom:8px;position:relative}.biscuitman .bm-dialog>b:after{content:"";background:linear-gradient(180deg,var(--bg)20%,#fff0);pointer-events:none;z-index:1;width:100%;height:25px;margin-bottom:-24px;position:absolute;bottom:0;left:0}.biscuitman .bm-dialog nav:after{content:"";background:linear-gradient(0deg,var(--bg)20%,#fff0);pointer-events:none;width:100%;height:25px;position:absolute;top:-24px;left:0}.biscuitman .bm-sections{scrollbar-color:rgba(var(--ui),.2)var(--bg);flex-shrink:1;height:100%;padding:15px 0;position:relative;overflow-y:scroll}@media (min-width:576px){.biscuitman .bm-sections{margin-right:-18px;padding-right:4px}}.biscuitman .bm-sections>p{padding-right:30px;font-size:13px;line-height:18px}@media (min-width:576px){.biscuitman .bm-sections>p{font-size:14px}}.biscuitman .bm-sections>p span{font-size:inherit;padding-bottom:5px;display:inline-block}.biscuitman .bm-sections>p [data-id=more]~span{display:none}.biscuitman a{font-size:inherit;color:var(--c);cursor:pointer;text-decoration:none;display:inline-block}.biscuitman a:hover{text-decoration:underline}.biscuitman section{margin-bottom:10px;position:relative}.biscuitman section:first-of-type{margin-top:10px}.biscuitman details{border:1px solid rgba(var(--ui),.2);border-radius:5px;padding:10px;list-style:none;box-shadow:0 2px 4px #0000001a}.biscuitman details[open] summary b:after{margin:-3px 0 0 -2px;transform:rotate(45deg)scale(.3)}.biscuitman summary{cursor:pointer;flex-direction:column;width:100%;padding:5px 80px 10px 10px;list-style:none;display:flex;position:relative}.biscuitman summary b{margin-bottom:3px}.biscuitman summary b:after{content:"";border:5px solid rgba(var(--ui),.4);border-top-color:#0000;border-left-color:#0000;border-radius:2px;width:1em;height:1em;margin:-2px 0 0 -4px;display:block;transform:rotate(-45deg)scale(.3)}.biscuitman summary p{color:var(--tx);font-size:14px}.biscuitman summary>*{display:inline-flex}.biscuitman summary::marker{display:none}.biscuitman summary::-webkit-details-marker{display:none}.biscuitman dl{background:rgba(var(--ui),.08);margin:10px;padding:10px;display:flex}.biscuitman dl dt,.biscuitman dl dd{color:var(--tx);font-size:12px}.biscuitman dl dt{min-width:120px;padding-right:30px;font-weight:700}.biscuitman label{--height:1.2em;--width:2.3em;--gap:2px;height:var(--height);width:var(--width);background-color:rgba(var(--ui),.3);border-radius:var(--height);margin-top:-2px;display:block;position:absolute;top:50%;right:20px;transform:translateY(-50%);font-size:20px!important}.biscuitman label:before{content:"";background:var(--bg);height:calc(var(--height) - calc(var(--gap)*2));width:calc(var(--height) - calc(var(--gap)*2));height:var(--height);width:var(--height);left:var(--gap);transform-origin:50%;border-radius:100%;display:block;position:absolute;top:50%;left:0;transform:translateY(-50%)scale(.8)}.biscuitman label.checked{background-color:var(--c)}.biscuitman label.checked:before{left:auto;right:0}.biscuitman label:has(:focus-visible){outline:auto highlight}.biscuitman label.disabled.checked{opacity:.5}.biscuitman label input{opacity:0}.bm-dialog-polyfill .biscuitman dialog{position:fixed;top:50%;transform:translateY(-50%)}`;document.head.appendChild(c)}
\ No newline at end of file
diff --git a/dist/esm/biscuitman.withcss.mjs b/dist/esm/biscuitman.withcss.mjs
index 97fdd52..846e3ea 100644
--- a/dist/esm/biscuitman.withcss.mjs
+++ b/dist/esm/biscuitman.withcss.mjs
@@ -1,4 +1,4 @@
-/*! biscuitman.js 0.5.2 */
+/*! biscuitman.js 0.5.3 */
const { document: d, window: w, Object: O } = globalThis;
const h = d.documentElement;
const defaults = {
@@ -365,7 +365,7 @@ export default {
if (typeof BMCSS === 'undefined') {
let css=document.createElement('style');
css.id = 'BMCSS';
- css.textContent=`/*! biscuitman.js 0.5.2 */
+ css.textContent=`/*! biscuitman.js 0.5.3 */
.biscuitman {
--ui: 0, 0, 0;
--tx: #444;
diff --git a/package.json b/package.json
index 389141a..cede625 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "biscuitman",
- "version": "0.5.2",
+ "version": "0.5.3",
"description": "Super lightweight open-source privacy consent manager for your website ",
"browser": "biscuitman.js",
"keywords": [
diff --git a/src/biscuitman.js b/src/biscuitman.js
index 161b476..4c5d062 100644
--- a/src/biscuitman.js
+++ b/src/biscuitman.js
@@ -70,7 +70,7 @@
${o.info.split('\n').map((line, i, arr) =>
`${line}
${arr.length > 1 && o.enableMore && i == 0 ?
- `${o.more}` : ''
+ `${o.more}` : ''
}`).join('')}
${o.sections.map(section => {