@consenti/api 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +387 -90
  2. package/dist/chunk-IY4L6MNB.js +2 -0
  3. package/dist/chunk-IY4L6MNB.js.map +1 -0
  4. package/dist/chunk-O5UG4OYI.js +2 -0
  5. package/dist/chunk-O5UG4OYI.js.map +1 -0
  6. package/dist/dashboard/assets/ApiConfig-CE-Noelz.js +1 -0
  7. package/dist/dashboard/assets/ArchivedProfileList-Bw-fx-BD.js +1 -0
  8. package/dist/dashboard/assets/AuditLog-D6HiTQ1o.js +1 -0
  9. package/dist/dashboard/assets/ChangePassword-D2rPkzD1.js +1 -0
  10. package/dist/dashboard/assets/ConfirmDialog-DTtw7VJ-.js +1 -0
  11. package/dist/dashboard/assets/ConsentList-BWOvPOMG.js +1 -0
  12. package/dist/dashboard/assets/ConsentTemplateEditor-BKIEnLmA.js +1 -0
  13. package/dist/dashboard/assets/ConsentTemplateList-DCys2nM3.js +1 -0
  14. package/dist/dashboard/assets/HeadingTagInput-BTjrdzlS.js +1 -0
  15. package/dist/dashboard/assets/HowItWorks-AeyjfQGO.js +1 -0
  16. package/dist/dashboard/assets/PermissionGate-Bhhf7SMh.js +1 -0
  17. package/dist/dashboard/assets/PreviewPane-Dq5K1h2L.js +35 -0
  18. package/dist/dashboard/assets/ProfileEditor-BXtaE0tL.js +2 -0
  19. package/dist/dashboard/assets/ProfileList-CWKSAgu0.js +1 -0
  20. package/dist/dashboard/assets/ProfileVersionHistory-1h8sUgog.js +3 -0
  21. package/dist/dashboard/assets/RecordDetailModal-FaFhzQXi.js +1 -0
  22. package/dist/dashboard/assets/Reports-DWEjQOKh.js +1 -0
  23. package/dist/dashboard/assets/RoleList-BSGoqlzp.js +1 -0
  24. package/dist/dashboard/assets/Select-DjJNwlbY.js +1 -0
  25. package/dist/dashboard/assets/Settings-CVYrlyLm.js +1 -0
  26. package/dist/dashboard/assets/SetupWizard-4NTb5bZj.js +1 -0
  27. package/dist/dashboard/assets/Table-DH_jh8_N.js +1 -0
  28. package/dist/dashboard/assets/TenantList-5AwFtoHf.js +1 -0
  29. package/dist/dashboard/assets/UITemplateEditor-9A55scBe.js +1 -0
  30. package/dist/dashboard/assets/UITemplateList-BS7X4u4F.js +1 -0
  31. package/dist/dashboard/assets/UserList-SPkMyFRy.js +1 -0
  32. package/dist/dashboard/assets/VendorList-C5fPhr6U.js +1 -0
  33. package/dist/dashboard/assets/VisitorList-COP1SyNd.js +1 -0
  34. package/dist/dashboard/assets/check-o5cp1s2J.js +1 -0
  35. package/dist/dashboard/assets/client-ymc9nwWr.js +1 -0
  36. package/dist/dashboard/assets/copy-C01KoUUH.js +1 -0
  37. package/dist/dashboard/assets/createLucideIcon-MdjI3m3u.js +1 -0
  38. package/dist/dashboard/assets/de-DET92Jb5.js +5 -0
  39. package/dist/dashboard/assets/debounce-DlvAAT2V.js +1 -0
  40. package/dist/dashboard/assets/dist-DlhLroYC.js +1 -0
  41. package/dist/dashboard/assets/es-CJNunrnU.js +5 -0
  42. package/dist/dashboard/assets/external-link-DVe00ZBK.js +1 -0
  43. package/dist/dashboard/assets/fr-akfTuf5x.js +5 -0
  44. package/dist/dashboard/assets/history-CHTts_m2.js +1 -0
  45. package/dist/dashboard/assets/index-DW3qOrry.css +2 -0
  46. package/dist/dashboard/assets/index-H_Zm0X-u.js +6 -0
  47. package/dist/dashboard/assets/ja-B0nLWkOd.js +5 -0
  48. package/dist/dashboard/assets/profiles-DmrdGv7t.js +1 -0
  49. package/dist/dashboard/assets/roles-C0dJPFl4.js +1 -0
  50. package/dist/dashboard/assets/search-Bd2RdDRh.js +1 -0
  51. package/dist/dashboard/assets/templates-B2xiivh4.js +1 -0
  52. package/dist/dashboard/assets/templates-CnMoLavN.js +1 -0
  53. package/dist/dashboard/assets/trash-2-BBnkdgm_.js +1 -0
  54. package/dist/dashboard/assets/trash-Dj1jhzHJ.js +1 -0
  55. package/dist/dashboard/assets/useHashQuery-B5ytMIMp.js +1 -0
  56. package/dist/dashboard/assets/users-czK8LRVh.js +1 -0
  57. package/dist/dashboard/assets/x-BRuyBEQP.js +1 -0
  58. package/dist/dashboard/assets/zh-CN-Dxg3G-BL.js +5 -0
  59. package/dist/dashboard/index.html +4 -2
  60. package/dist/dist-Z5RVTVBT.js +2 -0
  61. package/dist/dist-Z5RVTVBT.js.map +1 -0
  62. package/dist/index.cjs +89 -100
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/index.d.cts +663 -128
  65. package/dist/index.d.ts +663 -128
  66. package/dist/index.js +90 -101
  67. package/dist/index.js.map +1 -1
  68. package/dist/profiles-XTYPWLVC.js +2 -0
  69. package/dist/profiles-XTYPWLVC.js.map +1 -0
  70. package/dist/widget/widget.css +1 -1
  71. package/dist/widget/widget.js +1 -1
  72. package/package.json +14 -14
  73. package/dist/dashboard/assets/de-DwE2aQfW.js +0 -5
  74. package/dist/dashboard/assets/es-Dq88TWkB.js +0 -5
  75. package/dist/dashboard/assets/fr-o_Pyg8eR.js +0 -5
  76. package/dist/dashboard/assets/index-BSsYDdb9.js +0 -40
  77. package/dist/dashboard/assets/index-bOTGevzl.css +0 -2
  78. package/dist/dashboard/assets/ja-CwgXYmpD.js +0 -5
  79. package/dist/dashboard/assets/zh-CN-ety9KoQ0.js +0 -5
@@ -1,40 +0,0 @@
1
- (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h={},g=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(t,n,r){var i,a,o,s={};for(o in n)o==`key`?i=n[o]:o==`ref`?a=n[o]:s[o]=n[o];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),typeof t==`function`&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return S(t,s,i,a,null)}function S(e,r,i,a,o){var s={type:e,props:r,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++n,__i:-1,__u:0};return o==null&&t.vnode!=null&&t.vnode(s),s}function C(e){return e.children}function w(e,t){this.props=e,this.context=t}function T(e,t){if(t==null)return e.__?T(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?T(e):null}function E(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],a=[],o=y({},n);o.__v=n.__v+1,t.vnode&&t.vnode(o),oe(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??T(n),!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,se(i,o,a),n.__e=n.__=null,o.__e!=r&&D(o)}}function D(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),D(e)}function O(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!k.__r++||i!=t.debounceRendering)&&((i=t.debounceRendering)||a)(k)}function k(){try{for(var e,t=1;r.length;)r.length>t&&r.sort(o),e=r.shift(),t=r.length,E(e)}finally{r.length=k.__r=0}}function ee(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,_,v,y,b=r&&r.__k||g,x=t.length;for(c=te(n,t,b,c,x),d=0;d<x;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&b[p.__i]||h,p.__i=d,v=oe(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&P(f.ref,null,p),u.push(p.ref,p.__c||m,p)),_==null&&m!=null&&(_=m),(y=!!(4&p.__u))||f.__k===p.__k?(c=ne(p,c,e,y),y&&f.__e&&(f.__e=null)):typeof p.type==`function`&&v!==void 0?c=v:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=_,c}function te(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=S(null,o,null,null,null):v(o)?o=e.__k[a]=S(C,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=S(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=j(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=T(s)),F(s,s));return r}function ne(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=ne(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=T(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function A(e,t){return t||=[],e==null||typeof e==`boolean`||(v(e)?e.some(function(e){A(e,t)}):t.push(e)),t}function j(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function re(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||_.test(t)?n:n+`px`}function ie(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||re(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||re(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(u,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[l]=r[l]:(n[l]=d,e.addEventListener(t,a?p:f,a)):e.removeEventListener(t,a?p:f,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function ae(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[c]==null)n[c]=d++;else if(n[c]<r[l])return;return r(t.event?t.event(n):n)}}}function oe(e,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,_,x,S,T,E,D,O,k,te,ne,A,j=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[c=n.__e=r.__e]),(d=t.__b)&&d(n);n:if(typeof j==`function`){f=s.length;try{if(T=n.props,E=j.prototype&&j.prototype.render,D=(d=j.contextType)&&i[d.__c],O=d?D?D.props.value:d.__:i,r.__c?S=(p=n.__c=r.__c).__=p.__E:(E?n.__c=p=new j(T,O):(n.__c=p=new w(T,O),p.constructor=j,p.render=le),D&&D.sub(p),p.state||={},p.__n=i,m=p.__d=!0,p.__h=[],p._sb=[]),E&&p.__s==null&&(p.__s=p.state),E&&j.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=y({},p.__s)),y(p.__s,j.getDerivedStateFromProps(T,p.__s))),h=p.props,_=p.state,p.__v=n,m)E&&j.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),E&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(E&&j.getDerivedStateFromProps==null&&T!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(T,O),n.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(T,p.__s,O)){n.__v!=r.__v&&(p.props=T,p.state=p.__s,p.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),g.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(T,p.__s,O),E&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,_,x)})}if(p.context=O,p.props=T,p.__P=e,p.__e=!1,k=t.__r,te=0,E)p.state=p.__s,p.__d=!1,k&&k(n),d=p.render(p.props,p.state,p.context),g.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,k&&k(n),d=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++te<25);p.state=p.__s,p.getChildContext!=null&&(i=y(y({},i),p.getChildContext())),E&&!m&&p.getSnapshotBeforeUpdate!=null&&(x=p.getSnapshotBeforeUpdate(h,_)),ne=d!=null&&d.type===C&&d.key==null?N(d.props.children):d,c=ee(e,v(ne)?ne:[ne],n,r,i,a,o,s,c,l,u),p.base=n.__e,n.__u&=-161,p.__h.length&&s.push(p),S&&(p.__E=p.__=null)}catch(e){if(s.length=f,n.__v=null,l||o!=null){if(e.then){for(n.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),n.__e=c}else if(o!=null)for(A=o.length;A--;)b(o[A])}else n.__e=r.__e;n.__k??=r.__k||[],e.then||M(n),t.__e(e,n,r)}}else o==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):c=n.__e=ce(r.__e,n,r,i,a,o,s,l,u);return(d=t.diffed)&&d(n),128&n.__u?void 0:c}function M(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(M))}function se(e,n,r){for(var i=0;i<r.length;i++)P(r[i],r[++i],r[++i]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function N(e){return typeof e!=`object`||!e||e.__b>0?e:v(e)?e.map(N):e.constructor===void 0?y({},e):null}function ce(n,r,i,a,o,s,c,l,u){var d,f,p,m,g,_,y,x=i.props||h,S=r.props,C=r.type;if(C==`svg`?o=`http://www.w3.org/2000/svg`:C==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d<s.length;d++)if((g=s[d])&&`setAttribute`in g==!!C&&(C?g.localName==C:g.nodeType==3)){n=g,s[d]=null;break}}if(n==null){if(C==null)return document.createTextNode(S);n=document.createElementNS(o,C,S.is&&S),l&&=(t.__m&&t.__m(r,s),!1),s=null}if(C==null)x===S||l&&n.data==S||(n.data=S);else{if(s=C==`textarea`&&S.defaultValue!=null?null:s&&e.call(n.childNodes),!l&&s!=null)for(x={},d=0;d<n.attributes.length;d++)x[(g=n.attributes[d]).name]=g.value;for(d in x)g=x[d],d==`dangerouslySetInnerHTML`?p=g:d==`children`||d in S||d==`value`&&`defaultValue`in S||d==`checked`&&`defaultChecked`in S||ie(n,d,null,g,o);for(d in S)g=S[d],d==`children`?m=g:d==`dangerouslySetInnerHTML`?f=g:d==`value`?_=g:d==`checked`?y=g:l&&typeof g!=`function`||x[d]===g||ie(n,d,g,x[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==n.innerHTML)||(n.innerHTML=f.__html),r.__k=[];else if(p&&(n.innerHTML=``),ee(r.type==`template`?n.content:n,v(m)?m:[m],r,i,a,C==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:i.__k&&T(i,0),l,u),s!=null)for(d=s.length;d--;)b(s[d]);l&&C!=`textarea`||(d=`value`,C==`progress`&&_==null?n.removeAttribute(`value`):_!=null&&(_!==n[d]||C==`progress`&&!_||C==`option`&&_!=x[d])&&ie(n,d,_,x[d],o),d=`checked`,y!=null&&y!=n[d]&&ie(n,d,y,x[d],o))}return n}function P(e,n,r){try{if(typeof e==`function`){var i=typeof e.__u==`function`;i&&e.__u(),i&&n==null||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function F(e,n,r){var i,a;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||P(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,n)}i.base=i.__P=i.__n=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&F(i[a],n,r||typeof e.type!=`function`);r||b(e.__e),e.__c=e.__=e.__e=void 0}function le(e,t,n){return this.constructor(e,n)}function ue(n,r,i){var a,o,s,c;r==document&&(r=document.documentElement),t.__&&t.__(n,r),o=(a=typeof i==`function`)?null:i&&i.__k||r.__k,s=[],c=[],oe(r,n=(!a&&i||r).__k=x(C,null,[n]),o||h,h,r.namespaceURI,!a&&i?[i]:o?null:r.firstChild?e.call(r.childNodes):null,s,!a&&i?i:o?o.__e:r.firstChild,a,c),se(s,n,c),n.props.children=null}function de(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,O(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}e=g.slice,t={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},n=0,w.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=y({},this.state);typeof e==`function`&&(e=e(y({},n),this.props)),e&&y(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),O(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O(this))},w.prototype.render=C,r=[],a=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,s=Math.random().toString(8),c=`__d`+s,l=`__a`+s,u=/(PointerCapture)$|Capture$/i,d=0,f=ae(!1),p=ae(!0),m=0;var fe,I,pe,me,he=0,ge=[],L=t,_e=L.__b,ve=L.__r,ye=L.diffed,be=L.__c,xe=L.unmount,Se=L.__;function Ce(e,t){L.__h&&L.__h(I,e,he||t),he=0;var n=I.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function R(e){return he=1,we(Ae,e)}function we(e,t,n){var r=Ce(fe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ae(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=I,!I.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};I.__f=!0;var a=I.shouldComponentUpdate,o=I.componentWillUpdate;I.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},I.shouldComponentUpdate=i}return r.__N||r.__}function z(e,t){var n=Ce(fe++,3);!L.__s&&ke(n.__H,t)&&(n.__=e,n.u=t,I.__H.__h.push(n))}function B(e){return he=5,V(function(){return{current:e}},[])}function V(e,t){var n=Ce(fe++,7);return ke(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Te(e){var t=I.context[e.__c],n=Ce(fe++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(I)),t.props.value):e.__}function Ee(){for(var e;e=ge.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(H),t.__h.some(U),t.__h=[]}catch(n){t.__h=[],L.__e(n,e.__v)}}}L.__b=function(e){I=null,_e&&_e(e)},L.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Se&&Se(e,t)},L.__r=function(e){ve&&ve(e),fe=0;var t=(I=e.__c).__H;t&&(pe===I?(t.__h=[],I.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.length&&Ee(),fe=0)),pe=I},L.diffed=function(e){ye&&ye(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ge.push(t)!==1&&me===L.requestAnimationFrame||((me=L.requestAnimationFrame)||Oe)(Ee)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),pe=I=null},L.__c=function(e,t){t.some(function(e){try{e.__h.some(H),e.__h=e.__h.filter(function(e){return!e.__||U(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],L.__e(n,e.__v)}}),be&&be(e,t)},L.unmount=function(e){xe&&xe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{H(e)}catch(e){t=e}}),n.__H=void 0,t&&L.__e(t,n.__v))};var De=typeof requestAnimationFrame==`function`;function Oe(e){var t,n=function(){clearTimeout(r),De&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);De&&(t=requestAnimationFrame(n))}function H(e){var t=I,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),I=t}function U(e){var t=I;e.__c=e.__(),I=t}function ke(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Ae(e,t){return typeof t==`function`?t(e):t}var je=0;Array.isArray;function W(e,n,r,i,a,o){n||={};var s,c,l=n;if(`ref`in l)for(c in l={},n)c==`ref`?s=n[c]:l[c]=n[c];var u={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--je,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return t.vnode&&t.vnode(u),u}var Me=`consenti_token`;function Ne(e){if(!e)return null;try{let t=e.split(`.`)[1];if(!t)return null;let n=JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`))),r=n.exp;return r&&r<Math.floor(Date.now()/1e3)?null:{sub:n.sub,email:n.email,roles:n.roles??[],permissions:n.permissions??[]}}catch{return null}}var Pe=de({user:null,token:null,login:()=>{},logout:()=>{}});function Fe({children:e}){let[t,n]=R(()=>localStorage.getItem(Me)),[r,i]=R(()=>Ne(localStorage.getItem(Me)));return W(Pe.Provider,{value:{user:r,token:t,login:e=>{localStorage.setItem(Me,e),n(e),i(Ne(e))},logout:()=>{localStorage.removeItem(Me),n(null),i(null),window.location.hash=`#/login`}},children:e})}function G(){return Te(Pe)}var Ie=de({theme:`light`,toggle:()=>{}});function Le({children:e}){let[t,n]=R(()=>{try{return localStorage.getItem(`dashboard-theme`)??`light`}catch{return`light`}});return z(()=>{document.documentElement.classList.toggle(`dark`,t===`dark`);try{localStorage.setItem(`dashboard-theme`,t)}catch{}},[t]),W(Ie.Provider,{value:{theme:t,toggle:()=>n(e=>e===`dark`?`light`:`dark`)},children:e})}var Re=()=>Te(Ie),ze={appName:`Consenti`,appLogoPath:`./logo-dark.svg`,hidePoweredBy:!1};function Be(){let e=window.__CONSENTI_CONFIG__;return e?{appName:e.appName,appLogoPath:e.appLogoPath,hidePoweredBy:e.hidePoweredBy}:ze}var Ve=de(ze);function He({children:e}){let[t]=R(Be);return W(Ve.Provider,{value:t,children:e})}function Ue(){return Te(Ve)}function We(e,t){for(var n in t)e[n]=t[n];return e}function Ge(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function Ke(e,t){this.props=e,this.context=t}(Ke.prototype=new w).isPureReactComponent=!0,Ke.prototype.shouldComponentUpdate=function(e,t){return Ge(this.props,e)||Ge(this.state,t)};var K=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),K&&K(e)};var qe=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function Je(e){function t(t){var n=We({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=qe,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var Ye=t.__e;t.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Ye(e,t,n,r)};var Xe=t.unmount;function Ze(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=We({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Ze(e,t,n)})),e}function Qe(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Qe(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function $e(){this.__u=0,this.o=null,this.__b=null}function et(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function tt(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Xe&&Xe(e)},($e.prototype=new w).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=et(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Qe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},$e.prototype.componentWillUnmount=function(){this.o=[]},$e.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=Ze(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&x(C,null,e.fallback);return i&&(i.__u&=-33),[x(C,null,t.__a?null:e.children),i]};var nt=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function rt(e){return this.getChildContext=function(){return e.context},e.children}function it(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){ue(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}ue(x(rt,{context:t.context},e.__v),t.v)}function at(e,t){var n=x(it,{__v:e,h:t});return n.containerInfo=t,n}(tt.prototype=new w).__a=function(e){var t=this,n=et(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),nt(t,e,r)):i()};n?n(a):a()}},tt.prototype.render=function(e){this.i=null,this.l=new Map;var t=A(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},tt.prototype.componentDidUpdate=tt.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){nt(e,n,t)})};var ot=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,st=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ct=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,lt=/[A-Z0-9]/g,ut=typeof document<`u`,dt=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ft=t.event;t.event=function(e){return ft&&(e=ft(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var pt={configurable:!0,get:function(){return this.class}},mt=t.vnode;t.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)==-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||ut&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||dt(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:ct.test(a)&&(a=s):s=a=`oninput`:i&&st.test(a)?a=a.replace(lt,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&(r.multiple&&Array.isArray(r.value)&&(r.value=A(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=A(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",pt)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=ot,mt&&mt(e)};var ht=t.__r;t.__r=function(e){ht&&ht(e),e.__c};var gt=t.diffed;t.diffed=function(e){gt&&gt(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value)};var _t=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),vt=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),yt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),bt=e=>{let t=yt(e);return t.charAt(0).toUpperCase()+t.slice(1)},xt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},St=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ct=de({}),wt=()=>Te(Ct),Tt=Je(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=wt()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return x(`svg`,{ref:c,...xt,width:t??l??xt.width,height:t??l??xt.height,stroke:e??f,strokeWidth:m,className:_t(`lucide`,p,i),...!a&&!St(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>x(e,t)),...Array.isArray(a)?a:[a]])}),q=(e,t)=>{let n=Je(({className:n,...r},i)=>x(Tt,{ref:i,iconNode:t,className:_t(`lucide-${vt(bt(e))}`,`lucide-${e}`,n),...r}));return n.displayName=bt(e),n},Et=q(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),Dt=q(`book-copy`,[[`path`,{d:`M5 7a2 2 0 0 0-2 2v11`,key:`1yhqjt`}],[`path`,{d:`M5.803 18H5a2 2 0 0 0 0 4h9.5a.5.5 0 0 0 .5-.5V21`,key:`edzzo5`}],[`path`,{d:`M9 15V4a2 2 0 0 1 2-2h9.5a.5.5 0 0 1 .5.5v14a.5.5 0 0 1-.5.5H11a2 2 0 0 1 0-4h10`,key:`1nwzrg`}]]),Ot=q(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),kt=q(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),At=q(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),jt=q(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Mt=q(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Nt=q(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Pt=q(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ft=q(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),It=q(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Lt=q(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Rt=q(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),zt=q(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Bt=q(`cookie`,[[`path`,{d:`M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5`,key:`laymnq`}],[`path`,{d:`M8.5 8.5v.01`,key:`ue8clq`}],[`path`,{d:`M16 15.5v.01`,key:`14dtrp`}],[`path`,{d:`M12 12v.01`,key:`u5ubse`}],[`path`,{d:`M11 17v.01`,key:`1hyl5a`}],[`path`,{d:`M7 14v.01`,key:`uct60s`}]]),Vt=q(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Ht=q(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Ut=q(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Wt=q(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Gt=q(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Kt=q(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),qt=q(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Jt=q(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Yt=q(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Xt=q(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Zt=q(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Qt=q(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),$t=q(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),en=q(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),tn=q(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),nn=q(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),rn=q(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),an=q(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),on=q(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),sn=q(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),cn=q(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),ln=q(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),un=q(`power-off`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),dn=q(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),fn=q(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),pn=q(`satellite-dish`,[[`path`,{d:`M4 10a7.31 7.31 0 0 0 10 10Z`,key:`1fzpp3`}],[`path`,{d:`m9 15 3-3`,key:`88sc13`}],[`path`,{d:`M17 13a6 6 0 0 0-6-6`,key:`15cc6u`}],[`path`,{d:`M21 13A10 10 0 0 0 11 3`,key:`11nf8s`}]]),mn=q(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]),hn=q(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),gn=q(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),_n=q(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),vn=q(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),yn=q(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),bn=q(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),xn=q(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Sn=q(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Cn=q(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),wn=q(`ticket-slash`,[[`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`,key:`qn84l0`}],[`path`,{d:`m9.5 14.5 5-5`,key:`qviqfa`}]]),Tn=q(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),En=q(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Dn=q(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),On=q(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),kn=q(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),An=q(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),jn=q(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Mn=q(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Nn={_section_nav:`── Navigation ──────────────────────────────────────────`,"nav.dashboard":`Dashboard`,"nav.consentBanners":`Consent Banners`,"nav.cookieTemplates":`Cookie Templates`,"nav.uiTemplates":`UI Templates`,"nav.profiles":`Profiles`,"nav.consents":`Consents`,"nav.visitors":`Visitors`,"nav.users":`Users`,"nav.roles":`Roles`,"nav.sites":`Sites`,"nav.vendors":`TCF Vendors`,"nav.audit":`Audit Log`,"nav.api":`API`,"nav.apiConfig":`Config`,"nav.apiDocs":`Endpoint Docs`,"nav.settings":`Settings`,"nav.adminDashboard":`Admin Dashboard`,_section_layout:`── Layout ───────────────────────────────────────────`,"layout.expandSidebar":`Expand sidebar`,"layout.collapseSidebar":`Collapse sidebar`,"layout.signOut":`Sign out`,"layout.toggleDark":`Switch to dark mode`,"layout.toggleLight":`Switch to light mode`,"layout.poweredBy":`Powered by`,_section_common:`── Common ───────────────────────────────────────────`,"common.loading":`Loading…`,"common.save":`Save`,"common.saving":`Saving…`,"common.cancel":`Cancel`,"common.close":`Close`,"common.delete":`Delete`,"common.edit":`Edit`,"common.create":`Create`,"common.confirm":`Confirm`,"common.noData":`No data`,"common.exportCsv":`Export CSV`,"common.duplicate":`Duplicate`,"common.active":`Active`,"common.inactive":`Inactive`,"common.name":`Name`,"common.email":`Email`,"common.status":`Status`,"common.created":`Created`,"common.id":`ID`,"common.add":`Add`,"common.remove":`Remove`,"common.revoke":`Revoke`,"common.required":`Required`,"common.version":`Version`,"common.locale":`Locale`,"common.country":`Country`,"common.source":`Source`,"common.grantAll":`Grant all`,"common.revokeAll":`Revoke all`,"common.granted":`granted`,"common.page":`Page {{n}}`,"common.prev":`Prev`,"common.next":`Next`,"common.you":`You`,"common.default":`default`,"common.hide":`Hide`,"common.show":`Show`,"common.activate":`Activate`,"common.deactivate":`Deactivate`,"common.newRole":`New Role`,"common.copyToClipboard":`Copy to clipboard`,"common.back":`Back`,"common.copyId":`Copy ID`,"common.mandatory":`mandatory`,"common.optional":`Optional`,"common.roles":`Roles`,"common.showPassword":`Show password`,"common.hidePassword":`Hide password`,"common.updated":`Updated`,_section_locale:`── Locale Switcher ─────────────────────────────────`,"locale.en":`English`,"locale.switcherAria":`Switch language`,_section_login:`── Login ────────────────────────────────────────────`,"login.title":`{{appName}} Admin`,"login.subtitle":`Sign in to your account`,"login.email":`Email`,"login.emailPlaceholder":`admin@example.com`,"login.password":`Password`,"login.submit":`Sign in`,"login.submitting":`Signing in…`,"login.error.invalid":`Invalid email or password`,"login.showPassword":`Show password`,"login.hidePassword":`Hide password`,"login.devSignIn":`⚡ Dev: sign in as user@consenti.dev`,_section_dashboard:`── Dashboard ────────────────────────────────────`,"dashboard.title":`Dashboard`,"dashboard.stats.totalConsents":`Total Consents`,"dashboard.stats.totalVisitors":`Total Visitors`,"dashboard.stats.accepted":`Accepted`,"dashboard.stats.acceptedSub":`≥80% cookies granted`,"dashboard.stats.rejected":`Rejected`,"dashboard.stats.rejectedSub":`≤20% cookies granted`,"dashboard.chart.timeline":`Consents (last 30 days)`,"dashboard.chart.timelineAria":`Consent timeline chart`,"dashboard.chart.countries":`Top Countries`,"dashboard.chart.noData":`No data.`,"dashboard.chart.noCountryData":`No country data.`,"dashboard.gpc.label":`GPC Detection Rate`,"dashboard.gpc.sub":`{{detected}} of {{total}} consents`,_section_consents:`── Consents ─────────────────────────────────────`,"consents.title":`Consent Records`,"consents.filterFrom":`From`,"consents.filterTo":`To`,"consents.filterGpc":`GPC only`,"consents.records":`{{n}} records`,"consents.empty":`No consent records yet.`,"consents.col.visitorId":`Visitor ID`,"consents.col.profile":`Profile`,"consents.col.locale":`Locale`,"consents.col.gpc":`GPC`,"consents.col.age":`Age`,"consents.col.source":`Source`,"consents.col.created":`Created`,"consents.gpcYes":`Yes`,"consents.ageVerified":`Verified`,_section_visitors:`── Visitors ─────────────────────────────────────`,"visitors.title":`Visitors`,"visitors.empty":`No visitors recorded yet.`,"visitors.col.visitorId":`Visitor ID`,"visitors.col.country":`Country`,"visitors.col.firstSeen":`First Seen`,"visitors.col.lastSeen":`Last Seen`,_section_users:`── Users ────────────────────────────────────────────`,"users.title":`Users`,"users.count":`{{n}} users`,"users.newUser":`+ New User`,"users.createForm.title":`Create User`,"users.createForm.namePlaceholder":`Name`,"users.createForm.emailPlaceholder":`Email`,"users.createForm.passwordPlaceholder":`Password`,"users.createForm.confirmPasswordPlaceholder":`Confirm password`,"users.createForm.selectRole":`Select role…`,"users.createForm.passwordMismatch":`Passwords do not match`,"users.createForm.error":`Failed to create user`,"users.col.status":`Status`,"users.status.active":`Active`,"users.status.inactive":`Inactive`,"users.action.activate":`Activate`,"users.action.deactivate":`Deactivate`,"users.dialog.delete.title":`Delete user "{{name}}"?`,"users.dialog.delete.message":`This user account will be permanently removed.`,"users.allowedSites":`Allowed Sites`,"users.allowedSitesHint":`(leave empty to allow all)`,"users.edit.title":`Edit User: {{name}}`,"users.edit.error.save":`Failed to save changes.`,_section_roles:`── Roles & Permissions ──────────────────────────`,"roles.title":`Roles & Permissions`,"roles.list.heading":`Roles`,"roles.list.empty":`No roles yet. Create one to get started.`,"roles.form.roleNameLabel":`Role name`,"roles.form.roleNamePlaceholder":`e.g. Editor`,"roles.form.descriptionLabel":`Description`,"roles.form.descriptionPlaceholder":`Optional description`,"roles.perms.heading":`Permissions — {{name}}`,"roles.perms.selectPrompt":`Select a role to manage permissions`,"roles.perms.clickPrompt":`Click a role on the left to view and manage its permissions.`,"roles.perms.noPerms":`No permissions defined in the system.`,"roles.error.load":`Failed to load roles.`,"roles.error.create":`Failed to create role.`,"roles.error.update":`Failed to update role.`,"roles.error.delete":`Failed to delete role.`,"roles.error.perm":`Failed to update permission.`,"roles.dialog.delete.title":`Delete role "{{name}}"?`,"roles.dialog.delete.message":`Users assigned this role will lose its permissions immediately.`,"roles.aria.editRole":`Edit role`,"roles.aria.deleteRole":`Delete role`,_section_profiles:`── Profiles ──────────────────────────────────────`,"profiles.title":`Profiles`,"profiles.count":`{{n}} profiles`,"profiles.countSingular":`{{n}} profile`,"profiles.newProfile":`+ New Profile`,"profiles.empty":`No profiles yet. Create one to get started.`,"profiles.col.name":`Name`,"profiles.col.defaultLocale":`Default Locale`,"profiles.col.version":`Version`,"profiles.col.templates":`Templates`,"profiles.col.created":`Created`,"profiles.template.cookie":`Cookie:`,"profiles.template.ui":`UI:`,"profiles.action.copyId":`Copy profile ID`,"profiles.action.copying":`Copying…`,"profiles.dialog.delete.title":`Delete "{{name}}"?`,"profiles.dialog.delete.message":`This profile and all its locale content will be permanently removed.`,"profiles.dialog.copy.title":`Copy "{{name}}"?`,"profiles.dialog.copy.message":`This profile and all its locale content will be duplicated.`,_section_profileEditor:`── Profile Editor ───────────────────────────`,"profileEditor.title.new":`New Profile`,"profileEditor.title.edit":`Edit Profile`,"profileEditor.title.loading":`Profile Editor`,"profileEditor.step.config":`Profile Config`,"profileEditor.step.templates":`Templates`,"profileEditor.step.content":`Content`,"profileEditor.step.mainBanner":`Main Banner`,"profileEditor.step.gpcBanner":`GPC Banner`,"profileEditor.step.prefModal":`Pref Modal`,"profileEditor.config.profileName":`Profile Name`,"profileEditor.config.profileNamePlaceholder":`My Website`,"profileEditor.config.defaultLocale":`Default Locale`,"profileEditor.config.allowedDomains":`Allowed Domains`,"profileEditor.config.allowedDomainsHint":`Supports wildcards (*.example.com). Leave empty to allow all.`,"profileEditor.config.regulations":`Compliance Regulations`,"profileEditor.config.reg.gdprLabel":`GDPR`,"profileEditor.config.reg.gdprDesc":`EU/EEA opt-in. No tracking until consent is given. Banner shown on first visit.`,"profileEditor.config.reg.ccpaLabel":`CCPA`,"profileEditor.config.reg.ccpaDesc":`California opt-out. Cookies default granted. Provide a "Do Not Sell" trigger.`,"profileEditor.config.reg.cpraLabel":`CPRA`,"profileEditor.config.reg.cpraDesc":`California 2023. Opt-out for sale/sharing; opt-in for sensitive data. GPC honored.`,"profileEditor.config.reg.dpdpaLabel":`DPDPA`,"profileEditor.config.reg.dpdpaDesc":`India 2023. Opt-in like GDPR. GPC not recognised. Data Fiduciary notice required.`,"profileEditor.config.darkMode":`Enable Dark Mode`,"profileEditor.config.darkModeHint":`Applies dark colour tokens to the consent widget for sites with a dark theme.`,"profileEditor.config.dpdpa.heading":`DPDPA — Required Consent Notice Fields`,"profileEditor.config.dpdpa.fiduciary":`Data Fiduciary Name`,"profileEditor.config.dpdpa.fiduciaryPlaceholder":`Acme Corp Pvt Ltd`,"profileEditor.config.dpdpa.grievanceEmail":`Grievance Officer Email`,"profileEditor.config.dpdpa.grievanceEmailPlaceholder":`grievance@acme.com`,"profileEditor.config.dpdpa.purpose":`Purpose Description`,"profileEditor.config.dpdpa.purposePlaceholder":`We collect your data to personalise your experience…`,"profileEditor.templates.cookieTemplate":`Cookie Template`,"profileEditor.templates.cookieTemplateHint":`Defines which cookies/purposes appear in the preference modal. All fields are derived from the template — read-only in the profile.`,"profileEditor.templates.selectCookie":`— Select a cookie template —`,"profileEditor.templates.uiTemplate":`UI Template`,"profileEditor.templates.uiTemplateHint":`Defines banner/modal layout, button count, and category structure. You add text content in Steps 3–5.`,"profileEditor.templates.selectUi":`— Select a UI template —`,"profileEditor.templates.noTemplate":`No template selected.`,"profileEditor.templates.previewPrompt":`Select both a cookie template and a UI template to see a live preview.`,"profileEditor.templates.categoriesCount":`categories`,"profileEditor.templates.buttonsTotal":`buttons total`,"profileEditor.content.loadDefaults":`Load Defaults`,"profileEditor.content.loadDefaultsTitle":`Fill this section with compliance-aware English defaults`,"profileEditor.content.loadDefaultsNotice":`Load Defaults fills English text only — translate using the locale tab bar above.`,"profileEditor.content.importError":`Could not parse the uploaded file. Make sure it matches the Consenti locale template format.`,"profileEditor.content.mainBanner":`Main Banner`,"profileEditor.content.gpcBanner":`GPC Banner`,"profileEditor.content.prefModal":`Preference Modal`,"profileEditor.content.heading":`Heading`,"profileEditor.content.subheading":`Subheading`,"profileEditor.content.bodyText":`Body Text`,"profileEditor.content.introText":`Intro Text (optional)`,"profileEditor.content.buttonLabels":`Button Labels`,"profileEditor.content.categoryHeading":`Category Heading`,"profileEditor.content.categoryDesc":`Category Description`,"profileEditor.content.categoryFallback":`Category {{n}}`,"profileEditor.content.categoryDescPlaceholder":`Description of this cookie category…`,"profileEditor.content.mainBannerHeadingPlaceholder":`We value your privacy`,"profileEditor.content.mainBannerBodyPlaceholder":`We use cookies to improve your experience…`,"profileEditor.content.gpcHeadingPlaceholder":`Global Privacy Control Detected`,"profileEditor.content.prefHeadingPlaceholder":`Privacy Preferences`,"profileEditor.content.prefSubheadingPlaceholder":`Manage your cookie preferences below.`,"profileEditor.content.prefIntroPlaceholder":`Optional intro above categories…`,"profileEditor.content.noContent":`Select a UI template in step 2 to begin editing content.`,"profileEditor.content.loadingTemplate":`Loading template…`,"profileEditor.nav.nextTemplates":`Next: Templates`,"profileEditor.nav.nextContent":`Next: Content`,"profileEditor.nav.nextMainBanner":`Next: Main Banner`,"profileEditor.nav.nextGpcBanner":`Next: GPC Banner`,"profileEditor.nav.nextPrefModal":`Next: Pref Modal`,"profileEditor.action.create":`Create Profile`,"profileEditor.action.save":`Save Profile`,"profileEditor.error.nameRequired":`Profile name is required.`,"profileEditor.error.nameRequiredContinue":`Profile name is required before continuing.`,"profileEditor.error.cookieRequired":`Select a cookie template.`,"profileEditor.error.cookieContinue":`Select a cookie template to continue.`,"profileEditor.error.uiRequired":`Select a UI template.`,"profileEditor.error.uiContinue":`Select a UI template to continue.`,"profileEditor.error.failed":`Failed to save profile.`,"profileEditor.error.load":`Failed to load profile.`,"profileEditor.table.noNoCookies":`No cookies defined in this template.`,"profileEditor.table.id":`ID`,"profileEditor.table.legalBasis":`Legal Basis`,"profileEditor.table.mandatory":`Mandatory`,"profileEditor.table.gpc":`GPC`,"profileEditor.table.expiry":`Expiry`,"profileEditor.table.tcfVendor":`TCF Vendor`,"profileEditor.table.cpraCategory":`CPRA Category`,"profileEditor.export.json":`JSON`,"profileEditor.export.csv":`CSV`,"profileEditor.export.import":`Import`,"profileEditor.export.jsonTitle":`Export all locale tabs as a single JSON file`,"profileEditor.export.csvTitle":`Download locale content as CSV for translation`,"profileEditor.export.importTitle":`Import JSON (all locales) or CSV (current locale)`,"profileEditor.import.imported":`Imported {{n}} locales: {{list}}`,"profileEditor.import.importedSingular":`Imported 1 locale: {{list}}`,"profileEditor.import.skipped":`Skipped {{n}} unrecognised locale keys: {{list}}`,"profileEditor.import.skippedSingular":`Skipped 1 unrecognised locale key: {{list}}`,"profileEditor.newLink":`+ New ↗`,"profileEditor.config.selectDefaultLocale":`Select default locale…`,"profileEditor.config.complianceGroup":`Compliance Group`,"profileEditor.config.complianceGroupNone":`None / Custom`,"profileEditor.config.gpcMode":`GPC Signal Mode`,"profileEditor.config.gpcModeDefault":`Default (inherit from compliance group)`,"profileEditor.config.gpcModePlaceholder":`Default`,"profileEditor.config.hidePoweredBy":`Hide "Powered by Consenti"`,"profileEditor.config.hidePoweredByHint":`Remove the branding link from the consent banner.`,"profileEditor.config.allowReceipt":`Allow consent receipt`,"profileEditor.config.allowReceiptHint":`Let visitors download a JSON receipt of their consent choices.`,"profileEditor.conflict.title":`Active profile conflict`,"profileEditor.conflict.message":`Profile "{{name}}" is already active for this compliance group. Only one profile can be active per group.`,"profileEditor.conflict.deactivate":`Deactivate "{{name}}" and activate this one`,"profileEditor.conflict.saveInactive":`Save this profile as inactive`,"profileEditor.compliance.errors.heading":`Compliance errors — fix before continuing:`,"profileEditor.compliance.warnings.heading":`Compliance warnings:`,"profileEditor.compliance.warnings.acknowledge":`I acknowledge these warnings and wish to continue`,"profileEditor.content.selectLocale":`Select locale…`,"profileEditor.content.addLocale":`+ Add locale`,"profileEditor.content.defaultLocaleLabel":`(default)`,_section_readability:`── Readability Warnings ─────────────────────────`,"readability.headingTooLong":`Heading is {{n}} characters — keep it under 80 for readability.`,"readability.avgSentenceLong":`Average sentence length is {{n}} words — aim for 25 or fewer.`,"readability.totalWordsLong":`Text is {{n}} words long — consider keeping banner copy under 150 words.`,_section_cookieTemplates:`── Cookie Templates ─────────────────────────`,"cookieTemplates.title":`Cookie Templates`,"cookieTemplates.count":`{{n}} templates`,"cookieTemplates.countSingular":`{{n}} template`,"cookieTemplates.new":`+ New Cookie Template`,"cookieTemplates.empty.title":`No cookie templates yet.`,"cookieTemplates.empty.hint":`Cookie templates define the list of cookies/purposes for your consent profiles. Create one to reuse across multiple profiles.`,"cookieTemplates.required":`required`,"cookieTemplates.dialog.delete.title":`Delete "{{name}}"?`,"cookieTemplates.dialog.delete.message":`This cookie template will be permanently removed. Profiles linked to it will lose their cookie definitions.`,"cookieTemplates.editor.title.new":`New Cookie Template`,"cookieTemplates.editor.title.edit":`Edit Cookie Template`,"cookieTemplates.editor.name":`Template Name`,"cookieTemplates.editor.namePlaceholder":`e.g. Google Analytics + Ads`,"cookieTemplates.editor.nameRequired":`Template name is required.`,"cookieTemplates.editor.definitions":`Cookie Definitions`,"cookieTemplates.editor.empty":`No cookies defined yet. Add one above.`,"cookieTemplates.editor.addCookie":`+ Add Cookie`,"cookieTemplates.editor.error.allIds":`All cookies must have an ID.`,"cookieTemplates.editor.error.uniqueIds":`Cookie IDs must be unique.`,"cookieTemplates.editor.error.expiry":`Expiry must be at least 1 day.`,"cookieTemplates.editor.error.failed":`Failed to save template.`,"cookieTemplates.editor.error.notFound":`Template not found.`,"cookieTemplates.editor.action.create":`Create Template`,"cookieTemplates.editor.action.save":`Save Template`,"cookieTemplates.editor.showTcf":`TCF Vendors`,"cookieTemplates.editor.showCpra":`CPRA Category`,"cookieTemplates.editor.infoHint":`Click a column header to learn more`,"cookieTemplates.editor.infoUsage":`Usage`,"cookieTemplates.editor.infoLaws":`Regulatory guidance`,"cookieTemplates.editor.infoExamples":`Examples`,"cookieTemplates.editor.gpcMandatoryTitle":`Mandatory cookies are never auto-denied by GPC`,"cookieTemplates.editor.loadDefaultsPrompt":`Start from scratch, or load a sensible default list of cookies`,"cookieTemplates.editor.loadDefaultsBtn":`Load Defaults`,"cookieTemplates.editor.confirmUpdate.title":`Update template used by {{n}} profiles?`,"cookieTemplates.editor.confirmUpdate.titleSingular":`Update template used by 1 profile?`,"cookieTemplates.editor.confirmUpdate.message":`Profiles: {{names}}.
2
-
3
- Saving will update cookie definitions for all profiles using this template. Continue?`,"cookieTemplates.editor.legalBasis.mandatoryUsage":`Mandatory (Strictly Necessary): The cookie is always granted — the visitor cannot turn it off. Use only for cookies genuinely required for the site to function (session tokens, CSRF, load balancing).`,"cookieTemplates.editor.legalBasis.mandatoryLawName":`ePrivacy Dir. Recital 25`,"cookieTemplates.editor.legalBasis.mandatoryLawText":`"Strictly necessary" cookies are exempt from consent. Do not mark analytics or advertising cookies as Mandatory.`,"cookieTemplates.editor.legalBasis.examples":`Consent: analytics_storage · ad_storage · Legitimate Interest: server-side analytics · Mandatory: session · csrf_token · load_balancer_id`,"cookieTemplates.col.id":`Cookie ID`,"cookieTemplates.col.idShort":`ID / Name`,"cookieTemplates.col.legalBasis":`Legal Basis`,"cookieTemplates.col.mandatory":`Mandatory (Always Granted)`,"cookieTemplates.col.mandatoryShort":`Mandatory`,"cookieTemplates.col.gpc":`Honor GPC Signal`,"cookieTemplates.col.gpcShort":`GPC`,"cookieTemplates.col.expiry":`Re-consent Interval (days)`,"cookieTemplates.col.expiryShort":`Expiry`,"cookieTemplates.col.tcfVendor":`TCF Vendor IDs`,"cookieTemplates.col.cpraCategory":`CPRA Data Category`,"cookieTemplates.col.tcfVendorShort":`TCF Vendor`,"cookieTemplates.col.cpraCategoryShort":`CPRA Category`,_section_uiTemplates:`── UI Templates ─────────────────────────────────`,"uiTemplates.title":`UI Templates`,"uiTemplates.count":`{{n}} templates`,"uiTemplates.countSingular":`{{n}} template`,"uiTemplates.new":`+ New UI Template`,"uiTemplates.empty.title":`No UI templates yet.`,"uiTemplates.empty.hint":`UI templates define the visual configuration — positions, buttons, categories — for your consent banners and modals.`,"uiTemplates.mainBanner":`Main banner:`,"uiTemplates.gpcBanner":`GPC banner:`,"uiTemplates.modal":`Modal:`,"uiTemplates.categories":`{{n}} categories`,"uiTemplates.dialog.delete.title":`Delete "{{name}}"?`,"uiTemplates.dialog.delete.message":`This UI template will be permanently removed. Profiles linked to it will lose their UI settings.`,"uiTemplates.editor.title.new":`New UI Template`,"uiTemplates.editor.title.edit":`Edit UI Template`,"uiTemplates.editor.name":`Template Name`,"uiTemplates.editor.nameRequired":`Template name is required.`,"uiTemplates.editor.namePlaceholder":`e.g. Standard GDPR Layout`,"uiTemplates.editor.loading":`Loading template…`,"uiTemplates.editor.tabMain":`Main Banner`,"uiTemplates.editor.tabGpc":`GPC Banner`,"uiTemplates.editor.tabModal":`Preference Modal`,"uiTemplates.editor.mainBannerHint":`Shown on first visit when no consent has been recorded.`,"uiTemplates.editor.gpcBannerHint":`Shown instead of the main banner when a GPC signal is detected (autoHonorGPC enabled).`,"uiTemplates.editor.error.notFound":`Template not found.`,"uiTemplates.editor.error.buttons":`All buttons must have a label.`,"uiTemplates.editor.error.customButtons":`All "custom" action buttons must have cookies selected.`,"uiTemplates.editor.error.catIds":`All category IDs are required.`,"uiTemplates.editor.error.uniqueCatIds":`Category IDs must be unique.`,"uiTemplates.editor.error.catCookies":`Each category must include at least one cookie.`,"uiTemplates.editor.error.failed":`Failed to save template.`,"uiTemplates.editor.action.create":`Create Template`,"uiTemplates.editor.action.save":`Save Template`,"uiTemplates.editor.loadDefaultsPrompt":`Start from scratch, or load a sensible default structure (buttons, categories, positions).`,"uiTemplates.editor.loadDefaultsBtn":`Load Defaults`,"uiTemplates.editor.confirmUpdate.title":`Update template used by {{n}} profiles?`,"uiTemplates.editor.confirmUpdate.titleSingular":`Update template used by 1 profile?`,"uiTemplates.editor.confirmUpdate.message":`Profiles: {{names}}.
4
-
5
- Saving will apply UI changes to all profiles using this template. Continue?`,"uiTemplates.editor.wizard.stepOf":`Step {{step}} of {{total}}`,"uiTemplates.editor.wizard.next":`Next`,"uiTemplates.editor.wizard.back":`Back`,_section_sites:`── Sites / Tenants ───────────────────────────────`,"sites.title":`Sites / Tenants`,"sites.createNew":`Create new site`,"sites.namePlaceholder":`Site name`,"sites.slugPlaceholder":`slug (e.g. site-a)`,"sites.col.name":`Name`,"sites.col.slug":`Slug`,"sites.col.id":`ID`,"sites.col.created":`Created`,"sites.empty":`No sites yet.`,"sites.dialog.delete.title":`Delete "{{name}}"?`,"sites.dialog.delete.message":`This site and all associated data will be permanently removed. This cannot be undone.`,_section_vendors:`── TCF Vendors ───────────────────────────────────`,"vendors.title":`TCF Vendor List`,"vendors.info.title":`What is the TCF Vendor List?`,"vendors.searchPlaceholder":`Search vendors…`,"vendors.gvlMeta":`GVL v{{version}} · {{total}} vendors`,"vendors.loading":`Loading vendor list…`,"vendors.noResults":`No vendors found.`,"vendors.col.id":`ID`,"vendors.col.name":`Name`,"vendors.col.purposes":`Purposes`,"vendors.col.liPurposes":`LI Purposes`,"vendors.col.specialPurposes":`Special Purposes`,"vendors.pagination":`Page {{page}} of {{totalPages}} · {{total}} vendors total`,"vendors.prev":`← Prev`,"vendors.next":`Next →`,_section_audit:`── Audit Log ─────────────────────────────────────`,"audit.title":`Audit Log`,"audit.empty":`No audit events yet.`,"audit.col.time":`Time`,"audit.col.action":`Action`,"audit.col.resource":`Resource`,"audit.col.resourceId":`Resource ID`,"audit.col.actor":`Actor`,"audit.actor.system":`system`,_section_apiConfig:`── API Configuration ─────────────────────────`,"apiConfig.title":`API Configuration`,"apiConfig.origins.heading":`Allowed Origins`,"apiConfig.origins.hint":`Only requests from these origins will receive consent data. Use * to allow all (not recommended for production).`,"apiConfig.origins.placeholder":`https://example.com`,"apiConfig.origins.empty":`No origins configured — all origins are currently allowed.`,"apiConfig.origins.errorDuplicate":`Already in the list.`,"apiConfig.origins.errorSave":`Failed to save. Please try again.`,"apiConfig.origins.remove":`Remove`,"apiConfig.tokens.heading":`Admin API Tokens`,"apiConfig.tokens.hint":`Bearer tokens for server-side and CI/CD access to the Consenti admin API. Pass as Authorization: Bearer <token>. Never expose in client-side code — these grant full admin access.`,"apiConfig.tokens.created":`Token created — copy it now, it won't be shown again.`,"apiConfig.tokens.placeholder":`Token name (e.g. CI deploy)`,"apiConfig.tokens.empty":`No tokens yet.`,"apiConfig.tokens.errorName":`Name is required`,"apiConfig.tokens.errorCreate":`Failed to create token`,"apiConfig.tokens.col.name":`Name`,"apiConfig.tokens.col.status":`Status`,"apiConfig.tokens.col.created":`Created`,"apiConfig.tokens.status.active":`Active`,"apiConfig.tokens.status.revoked":`Revoked`,"apiConfig.tokens.dialog.title":`Revoke this API token?`,"apiConfig.tokens.dialog.message":`Any application using this token will immediately lose access.`,_section_settings:`── Settings ──────────────────────────────────────`,"settings.title":`Settings`,"settings.account.heading":`Account`,"settings.account.email":`Email:`,"settings.account.roles":`Roles:`,"settings.account.id":`ID:`,"settings.account.changePassword":`Change Password`,"settings.export.heading":`Export Data`,"settings.export.hint":`Download all consent records or audit logs.`,"settings.export.consentCsv":`Consent CSV`,"settings.export.consentXlsx":`Consent XLSX`,"settings.export.consentJson":`Consent JSON`,"settings.export.auditCsv":`Audit CSV`,"settings.about.heading":`About`,"settings.about.text":`Consenti v0.1.0 — Open-source GDPR-compliant Consent Management Platform.`,"settings.about.license":`Apache 2.0 License.`,_section_changePassword:`── Change Password ───────────────────────────`,"changePassword.title":`Change Password`,"changePassword.hint":`Choose a strong password of at least 12 characters.`,"changePassword.success":`Password updated successfully.`,"changePassword.newPassword":`New Password`,"changePassword.newPasswordPlaceholder":`Min. 12 characters`,"changePassword.confirmPassword":`Confirm New Password`,"changePassword.confirmPasswordPlaceholder":`Repeat new password`,"changePassword.submit":`Update Password`,"changePassword.submitting":`Saving…`,"changePassword.error.minLength":`Password must be at least 12 characters.`,"changePassword.error.mismatch":`Passwords do not match.`,"changePassword.error.failed":`Failed to update password.`,_section_howItWorks:`── How Consenti Works ───────────────────────────────`,"nav.howItWorks":`How Consenti Works`,"howItWorks.title":`How Consenti Works`,"howItWorks.intro":`Consenti is an open-source, GDPR-compliant Consent Management Platform. It handles cookie consent collection, storage, and reporting for your websites. This guide walks you through the main workflow and describes every section of the dashboard.`,"howItWorks.workflow.heading":`Core Workflow`,"howItWorks.workflow.step1.title":`Define Cookie Categories`,"howItWorks.workflow.step1.desc":`Go to Consent Banners → Cookie Templates and create a template that lists every cookie category your site uses (e.g. analytics, marketing). Set the legal basis and expiry for each.`,"howItWorks.workflow.step2.title":`Design the Consent UI`,"howItWorks.workflow.step2.desc":`Go to Consent Banners → UI Templates and configure the visual layout of your banner and preference modal — button labels, colours, layout style, and category display.`,"howItWorks.workflow.step3.title":`Create a Consent Profile`,"howItWorks.workflow.step3.desc":`Go to Consent Banners → Profiles and combine a Cookie Template with a UI Template. Add translated text for every locale you support, enable the required regulations (GDPR, CCPA, DPDPA), and publish.`,"howItWorks.workflow.step4.title":`Embed the Widget`,"howItWorks.workflow.step4.desc":`Copy your API key from API → Config and add the Consenti script tag to your website. The widget fetches your published profile and shows the consent banner automatically.`,"howItWorks.workflow.step5.title":`Monitor and Audit`,"howItWorks.workflow.step5.desc":`Use the Consents and Visitors pages to review live consent records. Use the Audit Log for a tamper-evident history of all administrative actions for compliance evidence.`,"howItWorks.features.heading":`Dashboard Features`,"howItWorks.features.dashboard.title":`Dashboard`,"howItWorks.features.dashboard.desc":`The home screen shows real-time KPIs — total consents, acceptance rate, rejection rate, and a time-series chart. Use it to spot trends and gauge the impact of banner changes.`,"howItWorks.features.cookieTemplates.title":`Cookie Templates`,"howItWorks.features.cookieTemplates.desc":`Reusable lists of cookie categories. Each category has an ID, legal basis (consent, legitimate interest, necessary), GPC signal handling, expiry, and optional TCF vendor or CPRA category mapping.`,"howItWorks.features.uiTemplates.title":`UI Templates`,"howItWorks.features.uiTemplates.desc":`Controls the look and feel of the consent banner, GPC notice, and preference modal. Configure button sets, heading tags, overlay opacity, and category display order.`,"howItWorks.features.profiles.title":`Profiles`,"howItWorks.features.profiles.desc":`A Profile is the deployable unit. It binds a Cookie Template + UI Template together, stores multi-locale content, and tracks a version number so you can roll back. Only one profile per domain can be active at a time.`,"howItWorks.features.consents.title":`Consents`,"howItWorks.features.consents.desc":`A searchable, filterable log of every individual consent record submitted by visitors. Each record shows the visitor ID, profile used, locale, GPC signal, consent choices, and timestamp.`,"howItWorks.features.visitors.title":`Visitors`,"howItWorks.features.visitors.desc":`A list of unique visitor identifiers seen across your sites, with their country, first-seen date, and last-seen date. Visitor IDs are pseudonymous UUIDs stored without raw IP addresses.`,"howItWorks.features.users.title":`Users`,"howItWorks.features.users.desc":`Manage the admin accounts that can log into this dashboard. Assign roles, activate or deactivate accounts, and restrict users to specific sites in multi-tenant deployments.`,"howItWorks.features.roles.title":`Roles`,"howItWorks.features.roles.desc":`Define named permission sets (e.g. Viewer, Editor, Admin). Assign granular permissions such as consent:view, profile:edit, or audit:view to each role, then assign roles to users.`,"howItWorks.features.vendors.title":`Vendors`,"howItWorks.features.vendors.desc":`Browse the IAB Global Vendor List (GVL) to look up TCF vendor IDs, declared purposes, and legitimate-interest purposes. Use these IDs when configuring cookie categories in your templates.`,"howItWorks.features.audit.title":`Audit Log`,"howItWorks.features.audit.desc":`An append-only, tamper-evident log of every administrative action — profile saves, user changes, API key creation, and more. Required for GDPR accountability obligations.`,"howItWorks.features.api.title":`API & Keys`,"howItWorks.features.api.desc":`Generate and revoke API tokens, configure allowed CORS origins for the public consent API, and browse the interactive OpenAPI reference to understand every endpoint.`,"howItWorks.features.settings.title":`Settings`,"howItWorks.features.settings.desc":`View your account details, change your password, and export consent or audit data as CSV, XLSX, or JSON for offline analysis or regulatory submission.`,"howItWorks.docs.heading":`Full Documentation`,"howItWorks.docs.text":`Detailed guides, configuration references, integration examples, and a live playground are available on the Consenti documentation site.`,"howItWorks.docs.link":`Open consenti.dev/docs →`,"howItWorks.consentFlow.heading":`End-to-End Consent Flow`,"howItWorks.consentFlow.step1.title":`Widget Initializes`,"howItWorks.consentFlow.step1.desc":`The Consenti script loads in the visitor's browser and reads your configuration (API key, compliance.type). If a valid, unexpired consent cookie already exists, the widget silently exits — no banner is shown.`,"howItWorks.consentFlow.step2.title":`Jurisdiction Detected`,"howItWorks.consentFlow.step2.desc":`If compliance.type is 'auto', the widget calls GET /resolve-profile passing the visitor's timezone, Accept-Language header, and IP address. The server maps these signals to a complianceGroup using the built-in country → compliance map.`,"howItWorks.consentFlow.step3.title":`Profile Fetched`,"howItWorks.consentFlow.step3.desc":`The widget fetches the active profile for the resolved complianceGroup and the visitor's locale. The response is a flat JSON object with all banner text, cookie categories, UI settings, and regulation flags — ready to render.`,"howItWorks.consentFlow.step4.title":`Banner Rendered`,"howItWorks.consentFlow.step4.desc":`The widget renders the banner or preference modal using the profile's UI template. Mandatory categories are pre-checked and cannot be deselected. Optional categories show their legal basis (consent or legitimate interest).`,"howItWorks.consentFlow.step5.title":`Consent Submitted`,"howItWorks.consentFlow.step5.desc":`When the visitor acts (Accept All, Reject All, or Save Preferences), the widget POSTs a consent record to the API with the visitor ID, profile version, per-category status (granted/denied/objected), GPC signal, timestamp, and locale.`,"howItWorks.consentFlow.step6.title":`Stored and Audited`,"howItWorks.consentFlow.step6.desc":`The API validates the payload, stores the consent record, and appends an entry to the append-only audit log. The visitor record is upserted with country and first/last-seen dates. The widget writes the consent cookie so future visits skip the banner.`,"howItWorks.profileResolution.heading":`Profile Resolution Algorithm`,"howItWorks.profileResolution.intro":`When a visitor arrives, Consenti resolves which consent profile to show in five steps.`,"howItWorks.profileResolution.step1.title":`Geo Signals Collected`,"howItWorks.profileResolution.step1.desc":`The widget sends three signals to GET /resolve-profile: the browser's Intl.DateTimeFormat timezone, the Accept-Language header (or lang query param), and the server-side IP address.`,"howItWorks.profileResolution.step2.title":`Country Determined`,"howItWorks.profileResolution.step2.desc":`The server tries in order: (1) IP geolocation via the configured geoDataProvider; (2) timezone → country table lookup; (3) language tag → country heuristic (e.g. 'de' → DE). The first non-empty match wins.`,"howItWorks.profileResolution.step3.title":`Compliance Group Mapped`,"howItWorks.profileResolution.step3.desc":`The ISO-3166-1 alpha-2 country code (plus optional region/state) is looked up in the embedded COUNTRY → COMPLIANCE_GROUP map. A region override (e.g. US/CA → optOutCalifornia) takes precedence over the country default.`,"howItWorks.profileResolution.step4.title":`Active Profile Located`,"howItWorks.profileResolution.step4.desc":`The system queries the database for the active profile whose complianceGroup matches the resolved group. Only one profile per complianceGroup may be active at a time. If none exists, a 404 is returned and the widget may fall back to a profileOverride.`,"howItWorks.profileResolution.step5.title":`Locale Resolved`,"howItWorks.profileResolution.step5.desc":`The best locale is picked by: (1) exact match with the widget's requested locale; (2) language-prefix match (e.g. 'de-AT' → 'de'); (3) geo-resolved locale from the provider; (4) the profile's defaultLocale. The resolved JSON is served from a static file (published profiles) or directly from the database (previews).`,"howItWorks.complianceGroups.heading":`Compliance Groups`,"howItWorks.complianceGroups.intro":`Every country in the world maps to one of eight compliance groups. Each group determines what consent model the widget must follow.`,"howItWorks.complianceGroups.optIn.title":`optIn — GDPR / ePrivacy Strict Opt-In`,"howItWorks.complianceGroups.optIn.desc":`Prior consent is required before any non-essential cookie is set. Visitors must be given a genuine choice to reject, withdrawal must be as easy as giving consent, and granular per-category choices are mandatory.`,"howItWorks.complianceGroups.optIn.laws":`GDPR, ePrivacy Directive, UK GDPR, PECR, revFADP (CH), KVKK (TR), PDPA (TH), and other strict national laws`,"howItWorks.complianceGroups.optIn.countries":`All EU member states, UK, Switzerland, Turkey, Thailand, Iceland, Liechtenstein, Norway, Guernsey, Gibraltar, and other countries with strict ePrivacy rules`,"howItWorks.complianceGroups.optInDPDPA.title":`optInDPDPA — India DPDPA`,"howItWorks.complianceGroups.optInDPDPA.desc":`India's Digital Personal Data Protection Act 2023 requires explicit opt-in consent. Additional obligations include naming a Data Fiduciary, providing a dedicated consent notice, and supporting Data Principal rights. Set the dpdpaDataFiduciary extra field in your profile.`,"howItWorks.complianceGroups.optInDPDPA.laws":`Digital Personal Data Protection Act 2023 (DPDPA)`,"howItWorks.complianceGroups.optInDPDPA.countries":`India (IN)`,"howItWorks.complianceGroups.optInChina.title":`optInChina — China Multi-Law Stack`,"howItWorks.complianceGroups.optInChina.desc":`China's data governance requires explicit consent under PIPL, combined with obligations from the Data Security Law (DSL) and Cybersecurity Law (CSL). Additional requirements apply to cross-border data transfers and data classification.`,"howItWorks.complianceGroups.optInChina.laws":`Personal Information Protection Law (PIPL), Data Security Law (DSL), Cybersecurity Law (CSL)`,"howItWorks.complianceGroups.optInChina.countries":`China (CN)`,"howItWorks.complianceGroups.optOutCalifornia.title":`optOutCalifornia — California CCPA / CPRA`,"howItWorks.complianceGroups.optOutCalifornia.desc":`Data may be collected by default but consumers must be provided with a clear 'Do Not Sell or Share My Personal Information' opt-out. The Global Privacy Control (GPC) browser signal must be honoured as a valid opt-out.`,"howItWorks.complianceGroups.optOutCalifornia.laws":`CCPA, CPRA (California Consumer Privacy Act / California Privacy Rights Act)`,"howItWorks.complianceGroups.optOutCalifornia.countries":`United States — California (US/CA)`,"howItWorks.complianceGroups.optOutUSState.title":`optOutUSState — Other US State Laws`,"howItWorks.complianceGroups.optOutUSState.desc":`Modelled on California's opt-out framework. Consumers can opt out of targeted advertising and the sale of personal data. Several states require GPC to be honoured. Covered businesses must provide clear opt-out mechanisms.`,"howItWorks.complianceGroups.optOutUSState.laws":`CDPA (VA), CPA (CO), CTDPA (CT), UCPA (UT), TDPSA (TX), DPDPA (DE), NJDPA (NJ), OCPA (OR), MCDPA (MN), MODPA (MD), KCDPA (KY), TIPA (TN), NDPA (NE), ICDPA (IA/IN), MCDPA (MT), NHPA (NH), RIDTPA (RI)`,"howItWorks.complianceGroups.optOutUSState.countries":`United States — VA, CO, CT, UT, TX, DE, NJ, OR, MN, MD, KY, TN, NE, IA, IN, MT, NH, RI`,"howItWorks.complianceGroups.generalPrivacyConsent.title":`generalPrivacyConsent — General Privacy / Consent`,"howItWorks.complianceGroups.generalPrivacyConsent.desc":`A general privacy law applies but does not impose a strict PECR/ePrivacy-style cookie banner requirement. Best practice is to offer a consent choice for non-essential cookies and a clear privacy notice, but the legal threshold is lower than GDPR opt-in.`,"howItWorks.complianceGroups.generalPrivacyConsent.laws":`PIPEDA / Law 25 (CA), LGPD (BR — use hybridBrazil), POPIA (ZA), APPI (JP), Privacy Act (AU/NZ), PDPA-SG, PDPA-MY, PIPA-KR, PDPD-VN, DPA-PH, PDP-ID and many others`,"howItWorks.complianceGroups.generalPrivacyConsent.countries":`Canada, Australia, New Zealand, Japan, South Korea, Singapore, Malaysia, South Africa, and many LatAm, African, and Asian countries`,"howItWorks.complianceGroups.hybridBrazil.title":`hybridBrazil — Brazil LGPD`,"howItWorks.complianceGroups.hybridBrazil.desc":`Brazil's LGPD is broadly similar to GDPR but analytics and advertising cookies may be treated under the legitimate interest legal basis depending on the data controller's assessment. The banner is shown, but the category-level legal basis can be more nuanced than strict GDPR opt-in.`,"howItWorks.complianceGroups.hybridBrazil.laws":`Lei Geral de Proteção de Dados (LGPD)`,"howItWorks.complianceGroups.hybridBrazil.countries":`Brazil (BR)`,"howItWorks.complianceGroups.noticeOnly.title":`noticeOnly — Privacy Notice Only`,"howItWorks.complianceGroups.noticeOnly.desc":`No dedicated cookie regulation applies, or the existing regime requires only a privacy notice — not an opt-in or opt-out banner. Displaying a consent banner is still recommended for transparency, but is not strictly mandated by law.`,"howItWorks.complianceGroups.noticeOnly.laws":`Varies — countries with no dedicated cookie / ePrivacy regulation`,"howItWorks.complianceGroups.noticeOnly.countries":`Many countries in Africa, Central Asia, the Caribbean, and Pacific regions not covered by the above groups`,"howItWorks.enums.heading":`Key Values Reference`,"howItWorks.enums.legalBasis.heading":`legalBasis (cookie category)`,"howItWorks.enums.legalBasis.mandatory":`mandatory — Category is always active regardless of consent (e.g. session, authentication). Never blocked by GPC or opt-out signals.`,"howItWorks.enums.legalBasis.consent":`consent — Requires explicit opt-in from the visitor. Blocked by default; blocked by GPC in all opt-in jurisdictions.`,"howItWorks.enums.legalBasis.legitimateInterest":`legitimate_interest — Relies on the controller's legitimate interest. Active by default; visitor can object. Soft-blocked by GPC in some jurisdictions (EU, UK).`,"howItWorks.enums.consentStatus.heading":`ConsentStatus (per category record)`,"howItWorks.enums.consentStatus.granted":`granted — Visitor gave explicit consent for this category.`,"howItWorks.enums.consentStatus.denied":`denied — Visitor explicitly refused consent for this category.`,"howItWorks.enums.consentStatus.objected":`objected — Visitor objected to a legitimate-interest category (opt-out, not a refusal of consent).`,"howItWorks.enums.geoProvider.heading":`geoDataProvider options`,"howItWorks.enums.geoProvider.default":`default / timezone — Uses the browser timezone (Intl.DateTimeFormat) to infer country, falling back to Accept-Language. No extra dependency.`,"howItWorks.enums.geoProvider.language":`language — Derives country from Accept-Language only (e.g. 'de' → DE, 'pt' → BR). Fast but imprecise.`,"howItWorks.enums.geoProvider.geoip":`geoip — Uses the geoip-lite npm package with a bundled MaxMind Lite database. Requires: npm install geoip-lite.`,"howItWorks.enums.geoProvider.hostedGeoipLite":`hosted-geoip-lite — Calls ipinfo.io via built-in HTTPS (zero extra dependency). Adds ~50–200 ms per first-visit request.`,"howItWorks.enums.geoProvider.maxmind":`maxmind — Uses the maxmind npm package with a local GeoLite2-City.mmdb file. Most accurate. Requires MAXMIND_DB_PATH env var and npm install maxmind.`,"howItWorks.enums.geoProvider.custom":`custom function — Pass a CountryResolverFn to compliance.geoDataProvider to integrate any geo-IP or CDN provider.`};function Pn(e,t,n){let r=e[t]??t;if(!n)return r;for(let[e,t]of Object.entries(n))r=r.split(`{{${e}}}`).join(String(t));return r}var Fn=`modulepreload`,In=function(e){return`/consenti/`+e},Ln={},Rn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=In(t,n),t=s(t),t in Ln)return;Ln[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Fn,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},zn={en:`English (en)`,es:`Español (es)`,fr:`Français (fr)`,de:`Deutsch (de)`,ja:`日本語 (ja)`,"zh-CN":`中文 (zh-CN)`},Bn=Object.keys(zn),Vn={es:()=>Rn(()=>import(`./es-Dq88TWkB.js`).then(e=>e.default),[]),fr:()=>Rn(()=>import(`./fr-o_Pyg8eR.js`).then(e=>e.default),[]),de:()=>Rn(()=>import(`./de-DwE2aQfW.js`).then(e=>e.default),[]),ja:()=>Rn(()=>import(`./ja-CwgXYmpD.js`).then(e=>e.default),[]),"zh-CN":()=>Rn(()=>import(`./zh-CN-ety9KoQ0.js`).then(e=>e.default),[])},Hn={en:Nn};function Un(e){if(Hn[e])return Promise.resolve(Hn[e]);let t=Vn[e];return t?t().then(t=>(Hn[e]=t,t)):Promise.resolve(Nn)}var Wn=de({locale:`en`,setLocale:()=>{},t:e=>e});function Gn({children:e}){let[t,n]=R(()=>{try{let e=localStorage.getItem(`dashboard-locale`);return e&&Bn.includes(e)?e:`en`}catch{return`en`}}),[r,i]=R(Hn[t]??Nn);return z(()=>{t!==`en`&&!Hn[t]&&Un(t).then(i)},[]),W(Wn.Provider,{value:{locale:t,setLocale:e=>{if(e!==t){n(e);try{localStorage.setItem(`dashboard-locale`,e)}catch{}Hn[e]?i(Hn[e]):Un(e).then(i)}},t:(e,t)=>Pn(r,e,t)},children:e})}var Kn=()=>Te(Wn),J=()=>Te(Wn).t,qn=Kt;function Jn(){let{locale:e,setLocale:t,t:n}=Kn();return W(`div`,{class:`flex items-center gap-1`,title:n(`locale.switcherAria`),children:[W(qn,{size:13,className:`text-gray-400 dark:text-gray-500 shrink-0`,"aria-hidden":`true`}),W(`select`,{value:e,onChange:e=>t(e.target.value),"aria-label":n(`locale.switcherAria`),disabled:Bn.length<=1,class:`text-xs text-gray-600 dark:text-gray-300 bg-transparent border-none outline-none cursor-pointer hover:text-gray-900 dark:hover:text-white appearance-none disabled:cursor-default`,children:Bn.map(e=>W(`option`,{value:e,children:zn[e]},e))})]})}var Yn=`${window.__CONSENTI_CONFIG__?.basePath??`/consenti`}/admin`;function Xn(){return localStorage.getItem(`consenti_token`)}var Zn=class extends Error{constructor(e,t){super(t),this.status=e}};async function Y(e,t){let n=Xn(),r=await fetch(`${Yn}${e}`,{...t,headers:{"Content-Type":`application/json`,...n?{Authorization:`Bearer ${n}`}:{},...t?.headers}});if(r.status===401)throw localStorage.removeItem(`consenti_token`),window.location.hash=`#/login`,new Zn(401,`Unauthorized`);if(!r.ok){let e=await r.text().catch(()=>r.statusText);throw new Zn(r.status,e)}if(r.status!==204)return r.json()}function Qn(e){let t=Xn(),n=`${Yn}${e}`,r=document.createElement(`a`);r.href=t?`${n}${n.includes(`?`)?`&`:`?`}_t=${encodeURIComponent(t)}`:n,r.style.display=`none`,document.body.appendChild(r),r.click(),document.body.removeChild(r)}var $n=Gt,er=Wt;function tr(){let{login:e}=G(),{appName:t,appLogoPath:n,hidePoweredBy:r}=Ue(),i=J(),[a,o]=R(``),[s,c]=R(``),[l,u]=R(!1),[d,f]=R(``),[p,m]=R(!1),h=async(t,n)=>{f(``),m(!0);try{let{token:r}=await Y(`/auth/login`,{method:`POST`,body:JSON.stringify({email:t,password:n})});e(r),window.location.hash=`#/`}catch{f(i(`login.error.invalid`))}finally{m(!1)}};return W(`div`,{class:`min-h-screen bg-gray-50 flex flex-col items-center justify-center p-4`,style:{background:`linear-gradient(135deg, rgb(2, 6, 23) 0%, rgb(26, 52, 96) 40%, rgb(21, 101, 192) 75%, rgb(67, 160, 71) 100%)`},children:[n?W(`img`,{src:n,alt:t,class:`h-14 w-auto mx-auto mb-3 object-contain`}):null,W(`div`,{class:`bg-white rounded-xl shadow-sm border border-gray-200 p-8 w-full max-w-sm`,children:[W(`div`,{class:`mb-6 text-center`,children:[W(`h1`,{class:`text-xl font-bold text-gray-900`,children:i(`login.title`,{appName:t})}),W(`p`,{class:`text-sm text-gray-500 mt-1`,children:i(`login.subtitle`)})]}),W(`form`,{onSubmit:e=>{e.preventDefault(),h(a,s)},class:`space-y-4`,children:[W(`div`,{children:[W(`label`,{for:`login-email`,class:`block text-sm font-medium text-gray-700 mb-1`,children:i(`login.email`)}),W(`input`,{id:`login-email`,type:`email`,required:!0,value:a,onInput:e=>o(e.target.value),class:`w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,placeholder:i(`login.emailPlaceholder`),autocomplete:`email`})]}),W(`div`,{children:[W(`label`,{for:`login-password`,class:`block text-sm font-medium text-gray-700 mb-1`,children:i(`login.password`)}),W(`div`,{class:`relative`,children:[W(`input`,{id:`login-password`,type:l?`text`:`password`,required:!0,value:s,onInput:e=>c(e.target.value),class:`w-full border border-gray-300 rounded-lg px-3 py-2 pr-10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,autocomplete:`current-password`}),W(`button`,{type:`button`,onClick:()=>u(e=>!e),"aria-label":i(l?`login.hidePassword`:`login.showPassword`),class:`absolute inset-y-0 right-0 flex items-center px-3 text-gray-400 hover:text-gray-600`,children:W(l?er:$n,{size:16})})]})]}),d&&W(`p`,{role:`alert`,class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:d}),W(`button`,{type:`submit`,disabled:p,class:`w-full bg-blue-600 text-white rounded-lg px-4 py-2.5 text-sm font-medium hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:i(p?`login.submitting`:`login.submit`)})]}),!1,r||W(`p`,{class:`mt-5 text-center text-[11px] text-gray-400`,children:[i(`layout.poweredBy`),` `,W(`a`,{href:`https://consenti.dev`,target:`_blank`,rel:`noopener noreferrer`,class:`hover:text-blue-500 transition-colors`,children:`Consenti`})]})]})]})}var nr=[{key:`nav.dashboard`,hash:`#/`,Icon:Zt},{type:`group`,key:`nav.consentBanners`,baseHash:`#/banners`,Icon:wn,children:[{key:`nav.cookieTemplates`,hash:`#/banners/cookie-templates`,Icon:Bt},{key:`nav.uiTemplates`,hash:`#/banners/ui-templates`,Icon:on},{key:`nav.profiles`,hash:`#/banners/profiles`,Icon:Rt}]},{key:`nav.consents`,hash:`#/consents`,Icon:vn},{key:`nav.visitors`,hash:`#/visitors`,Icon:An},{key:`nav.users`,hash:`#/users`,Icon:Xt,perm:`user:view`},{key:`nav.roles`,hash:`#/roles`,Icon:yn,perm:`role:view`},{key:`nav.sites`,hash:`#/tenants`,Icon:Kt,perm:`settings:update`,superadminOnly:!0},{key:`nav.vendors`,hash:`#/vendors`,Icon:pn,perm:`consent:view`},{key:`nav.audit`,hash:`#/audit`,Icon:hn,perm:`audit:view`},{type:`group`,key:`nav.api`,baseHash:`#/api`,Icon:cn,superadminOnly:!0,children:[{key:`nav.apiConfig`,hash:`#/api/config`,Icon:bn},{key:`nav.apiDocs`,hash:`#/api/docs`,Icon:Ot}]},{key:`nav.settings`,hash:`#/settings`,Icon:_n},{key:`nav.howItWorks`,hash:`#/how-it-works`,Icon:Lt}];function rr({current:e,collapsed:t,onToggle:n}){let{user:r,logout:i}=G(),{appName:a,appLogoPath:o,poweredBy:s}=Ue(),c=J(),[l,u]=R(()=>{let t=new Set;for(let n of nr)`type`in n&&n.type===`group`&&e.startsWith(n.baseHash)&&t.add(n.baseHash);return t}),d=e=>{u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},f=t=>e===t||t!==`#/`&&e.startsWith(t),p=t=>e.startsWith(t.baseHash),m=r?.roles.includes(`superadmin`)??!1,h=(e,t)=>(!t||m)&&(!e||r?.permissions.includes(e));return W(`aside`,{class:`${t?`w-14`:`w-56`} min-h-screen bg-gray-900 text-gray-100 flex flex-col transition-[width] duration-200 ease-in-out overflow-hidden shrink-0 border-r border-gray-700`,"aria-label":c(`nav.adminDashboard`),children:[W(`div`,{class:`px-3 py-5 border-b border-gray-700 flex items-center gap-2`,children:t?W(`div`,{class:`w-full flex justify-center`,children:o?W(`img`,{src:o,alt:a,class:`h-7 w-7 object-contain rounded`}):W(`img`,{src:`/icon.svg`,alt:a,class:`h-7 w-7`})}):W(`div`,{class:`min-w-0`,children:[o?W(`img`,{src:o,alt:a,class:`h-7 w-auto object-contain`}):W(`img`,{src:`/logo-dark.svg`,alt:a,class:`h-7 w-auto`}),W(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:c(`nav.adminDashboard`)})]})}),W(`nav`,{class:`flex-1 py-4 overflow-y-auto`,"aria-label":c(`nav.adminDashboard`),children:nr.filter(e=>h(e.perm,e.superadminOnly)).map(e=>{if(`type`in e&&e.type===`group`){let n=!t&&l.has(e.baseHash),r=p(e),i=e.children.filter(e=>h(e.perm));if(i.length===0)return null;let a=c(e.key);return W(`div`,{children:[W(`button`,{type:`button`,onClick:()=>{t?window.location.hash=i[0].hash:d(e.baseHash)},"aria-expanded":t?void 0:n,"aria-label":t?a:void 0,title:t?a:void 0,class:`w-full flex items-center gap-3 px-3 py-2.5 text-sm transition-colors ${t?`justify-center`:`justify-between`} ${r?`text-white bg-gray-800`:`text-gray-300 hover:bg-gray-800 hover:text-white`}`,children:[W(`div`,{class:`flex items-center gap-3 ${t?``:`min-w-0`}`,children:[W(e.Icon,{size:16,className:`shrink-0`,"aria-hidden":`true`}),!t&&W(`span`,{class:`truncate`,children:a})]}),!t&&W(Mt,{size:13,className:`shrink-0 text-gray-500 transition-transform ${n?`rotate-180`:``}`,"aria-hidden":`true`})]}),n&&W(`div`,{class:`bg-gray-950/30`,children:i.map(e=>{let t=f(e.hash),n=c(e.key);return W(`a`,{href:e.hash,"aria-current":t?`page`:void 0,class:`flex items-center gap-3 pl-8 pr-3 py-2 text-sm transition-colors ${t?`bg-blue-600 text-white`:`text-gray-400 hover:bg-gray-800 hover:text-white`}`,children:[W(e.Icon,{size:14,className:`shrink-0`,"aria-hidden":`true`}),n]},e.hash)})})]},e.baseHash)}let n=e,r=f(n.hash),i=c(n.key);return W(`a`,{href:n.hash,"aria-current":r?`page`:void 0,"aria-label":t?i:void 0,title:t?i:void 0,class:`flex items-center gap-3 px-3 py-2.5 text-sm transition-colors ${t?`justify-center`:``} ${r?`bg-blue-600 text-white`:`text-gray-300 hover:bg-gray-800 hover:text-white`}`,children:[W(n.Icon,{size:16,className:`shrink-0`,"aria-hidden":`true`}),!t&&i]},n.hash)})}),W(`div`,{class:`px-3 py-4 border-t border-gray-700 ${t?`flex justify-center`:``}`,children:[!t&&W(C,{children:[W(`p`,{class:`text-xs text-gray-400 truncate`,children:r?.email}),s&&W(`p`,{class:`text-[10px] text-gray-600 mt-2`,children:[c(`layout.poweredBy`),` `,W(`a`,{href:`https://consenti.dev`,target:`_blank`,rel:`noopener noreferrer`,class:`hover:text-gray-400 transition-colors`,children:`Consenti`})]})]}),t&&W(`button`,{onClick:i,"aria-label":c(`layout.signOut`),title:c(`layout.signOut`),class:`w-8 h-8 flex items-center justify-center rounded hover:bg-gray-700 text-gray-400 hover:text-white transition-colors`,children:W(tn,{size:16,"aria-hidden":`true`})})]})]})}var ir=an,ar=Sn;function or({collapsed:e}){let{theme:t,toggle:n}=Re(),r=J(),i=t===`dark`,a=r(i?`layout.toggleLight`:`layout.toggleDark`);return e?W(`button`,{onClick:n,"aria-label":a,title:a,class:`w-8 h-8 flex items-center justify-center rounded hover:bg-gray-700 text-gray-400 hover:text-white transition-colors`,children:i?W(ir,{size:16,className:`text-cyan-400`}):W(ar,{size:16,className:`text-gray-400`})}):W(`button`,{onClick:n,"aria-label":a,title:a,"aria-pressed":i,class:`relative flex items-center w-8 h-6 rounded-full px-0.5 transition-all duration-300 ${i?`bg-gray-900 ring-2 ring-cyan-400`:`bg-gray-600`}`,children:W(`span`,{class:`w-5 h-5 rounded-full flex items-center justify-center transition-all duration-300 ${i?`translate-x-2 bg-gray-800`:`translate-x-0 bg-white shadow`}`,children:i?W(ir,{size:11,className:`text-cyan-400`}):W(ar,{size:11,className:`text-amber-500`})})})}var sr=tn,cr=Pt,lr=Nt;function ur(){return typeof window<`u`&&window.innerWidth<768}function X({children:e,title:t,current:n}){let[r,i]=R(()=>ur()),a=()=>i(e=>!e),{logout:o}=G(),s=J();return z(()=>{let e=()=>{ur()&&i(!0)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),W(`div`,{class:`flex h-screen overflow-hidden dark:bg-gray-900`,children:[W(`div`,{class:`relative shrink-0`,children:[W(rr,{current:n,collapsed:r,onToggle:a}),W(`button`,{onClick:a,"aria-label":s(r?`layout.expandSidebar`:`layout.collapseSidebar`),title:s(r?`layout.expandSidebar`:`layout.collapseSidebar`),class:`absolute top-5 -right-3.5 z-20 w-7 h-7 flex items-center justify-center bg-gray-800 border border-gray-600 rounded-full text-gray-300 hover:text-white hover:bg-gray-700 shadow-md transition-colors`,children:W(r?cr:lr,{size:13})})]}),W(`div`,{class:`flex-1 flex flex-col min-w-0 overflow-hidden`,children:[W(`header`,{class:`shrink-0 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-6 py-3 flex items-center justify-between min-h-[56px]`,children:[t?W(`h1`,{class:`text-xl font-semibold text-gray-800 dark:text-gray-100`,children:t}):W(`span`,{}),W(`div`,{class:`flex items-center gap-3`,children:[W(or,{}),W(Jn,{}),W(`button`,{onClick:o,"aria-label":s(`layout.signOut`),title:s(`layout.signOut`),class:`flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400 hover:text-gray-800 dark:hover:text-white transition-colors`,children:[W(sr,{size:14,"aria-hidden":`true`}),s(`layout.signOut`)]})]})]}),W(`main`,{class:`flex-1 overflow-y-auto`,children:W(`div`,{class:`p-6`,children:e})})]})]})}var dr={overview:()=>Y(`/stats/overview`),categories:()=>Y(`/stats/categories`),timeline:(e=30)=>Y(`/stats/timeline?days=${e}`),countries:()=>Y(`/stats/countries`),gpc:()=>Y(`/stats/gpc`)};function fr({label:e,value:t,sub:n}){return W(`div`,{class:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-5`,children:[W(`p`,{class:`text-sm text-gray-500 dark:text-gray-400`,children:e}),W(`p`,{class:`text-3xl font-bold text-gray-900 dark:text-gray-100 mt-1`,children:t}),n&&W(`p`,{class:`text-xs text-gray-400 dark:text-gray-500 mt-1`,children:n})]})}function pr({data:e,ariaLabel:t,noDataLabel:n}){if(e.length===0)return W(`p`,{class:`text-sm text-gray-400`,children:n});let r=Math.max(...e.map(e=>e.count),1),i=552/Math.max(e.length-1,1),a=e.map((e,t)=>({x:24+t*i,y:96-e.count/r*72,label:e.date.slice(5),count:e.count})),o=a.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `),s=`${o} L ${a[a.length-1].x} 96 L ${a[0].x} 96 Z`;return W(`svg`,{viewBox:`0 0 600 120`,class:`w-full`,role:`img`,"aria-label":t,children:[W(`defs`,{children:W(`linearGradient`,{id:`tl-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[W(`stop`,{offset:`0%`,"stop-color":`#6366f1`,"stop-opacity":`0.3`}),W(`stop`,{offset:`100%`,"stop-color":`#6366f1`,"stop-opacity":`0.02`})]})}),W(`path`,{d:s,fill:`url(#tl-grad)`}),W(`path`,{d:o,fill:`none`,stroke:`#6366f1`,"stroke-width":`2`,"stroke-linejoin":`round`}),a.map((t,n)=>W(`g`,{children:[W(`circle`,{cx:t.x,cy:t.y,r:`3`,fill:`#6366f1`}),n%Math.max(Math.floor(e.length/6),1)===0&&W(`text`,{x:t.x,y:116,"text-anchor":`middle`,"font-size":`8`,fill:`#9ca3af`,children:t.label})]},n))]})}function mr({data:e,noDataLabel:t}){if(e.length===0)return W(`p`,{class:`text-sm text-gray-400`,children:t});let n=e.slice(0,8),r=Math.max(...n.map(e=>e.count),1);return W(`div`,{class:`space-y-2`,children:n.map(e=>W(`div`,{class:`flex items-center gap-2`,children:[W(`span`,{class:`text-xs text-gray-500 w-8 text-right`,children:e.country}),W(`div`,{class:`flex-1 bg-gray-100 rounded h-3 overflow-hidden`,children:W(`div`,{class:`h-full bg-indigo-500 rounded`,style:{width:`${e.count/r*100}%`},"aria-hidden":`true`})}),W(`span`,{class:`text-xs text-gray-600 w-8`,children:e.count})]},e.country))})}function hr({data:e,label:t,sub:n}){let r=2*Math.PI*36,i=e.rate/100*r;return W(`div`,{class:`flex items-center gap-4`,children:[W(`svg`,{width:`88`,height:`88`,viewBox:`0 0 88 88`,role:`img`,"aria-label":`${t}: ${e.rate}%`,children:[W(`circle`,{cx:`44`,cy:`44`,r:36,fill:`none`,stroke:`#e5e7eb`,"stroke-width":`8`}),W(`circle`,{cx:`44`,cy:`44`,r:36,fill:`none`,stroke:`#6366f1`,"stroke-width":`8`,"stroke-dasharray":`${i} ${r}`,"stroke-linecap":`round`,transform:`rotate(-90 44 44)`}),W(`text`,{x:`44`,y:`49`,"text-anchor":`middle`,"font-size":`16`,"font-weight":`bold`,fill:`currentColor`,class:`text-gray-800 dark:text-gray-100`,"aria-hidden":`true`,children:[e.rate,`%`]})]}),W(`div`,{children:[W(`p`,{class:`text-sm font-medium text-gray-700`,children:t}),W(`p`,{class:`text-xs text-gray-500`,children:n})]})]})}function gr({current:e}){let t=J(),[n,r]=R(null),[i,a]=R([]),[o,s]=R([]),[c,l]=R(null),[u,d]=R(!0);return z(()=>{Promise.all([dr.overview().then(r).catch(()=>{}),dr.timeline(30).then(a).catch(()=>{}),dr.countries().then(s).catch(()=>{}),dr.gpc().then(l).catch(()=>{})]).finally(()=>d(!1))},[]),W(X,{title:t(`dashboard.title`),current:e,children:u?W(`p`,{role:`status`,"aria-live":`polite`,class:`text-gray-400 text-sm`,children:t(`common.loading`)}):W(`div`,{class:`space-y-6`,children:[n&&W(`div`,{class:`grid grid-cols-2 lg:grid-cols-4 gap-4`,children:[W(fr,{label:t(`dashboard.stats.totalConsents`),value:n.totalConsents}),W(fr,{label:t(`dashboard.stats.totalVisitors`),value:n.totalVisitors}),W(fr,{label:t(`dashboard.stats.accepted`),value:`${n.acceptedPct}%`,sub:t(`dashboard.stats.acceptedSub`)}),W(fr,{label:t(`dashboard.stats.rejected`),value:`${n.rejectedPct}%`,sub:t(`dashboard.stats.rejectedSub`)})]}),W(`div`,{class:`grid grid-cols-1 lg:grid-cols-2 gap-6`,children:[W(`div`,{class:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-5`,children:[W(`p`,{class:`text-sm font-medium text-gray-700 dark:text-gray-300 mb-3`,children:t(`dashboard.chart.timeline`)}),W(pr,{data:i,ariaLabel:t(`dashboard.chart.timelineAria`),noDataLabel:t(`dashboard.chart.noData`)})]}),W(`div`,{class:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-5`,children:[W(`p`,{class:`text-sm font-medium text-gray-700 dark:text-gray-300 mb-3`,children:t(`dashboard.chart.countries`)}),W(mr,{data:o,noDataLabel:t(`dashboard.chart.noCountryData`)})]})]}),c&&W(`div`,{class:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-5`,children:W(hr,{data:c,label:t(`dashboard.gpc.label`),sub:t(`dashboard.gpc.sub`,{detected:c.detected,total:c.total})})})]})})}function _r({columns:e,rows:t,keyFn:n,loading:r,emptyText:i}){let a=J(),o=i??a(`common.noData`);return r?W(`div`,{role:`status`,"aria-live":`polite`,class:`flex items-center justify-center py-12 text-gray-400 dark:text-gray-500 text-sm`,children:a(`common.loading`)}):W(`div`,{class:`overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800`,children:W(`table`,{class:`min-w-full text-sm`,children:[W(`thead`,{children:W(`tr`,{class:`bg-gray-50 dark:bg-gray-700/50 border-b border-gray-200 dark:border-gray-700`,children:e.map(e=>W(`th`,{scope:`col`,class:`px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide`,children:e.label},e.key))})}),W(`tbody`,{children:t.length===0?W(`tr`,{children:W(`td`,{colSpan:e.length,class:`px-4 py-8 text-center text-gray-400 dark:text-gray-500`,children:o})}):t.map(t=>W(`tr`,{class:`border-b border-gray-100 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700/40 transition-colors`,children:e.map(e=>W(`td`,{class:`px-4 py-3 text-gray-700 dark:text-gray-300`,children:e.render?e.render(t):String(t[e.key]??``)},e.key))},n(t)))})]})})}function vr({perm:e,children:t,fallback:n=null}){let{user:r}=G();return r?.permissions.includes(e)?W(C,{children:t}):W(C,{children:n})}var yr=`confirm-dialog-title`;function br({open:e,title:t,message:n,confirmLabel:r,cancelLabel:i,danger:a=!0,onConfirm:o,onCancel:s}){let c=J(),l=B(null),u=B(null),d=r??c(`common.confirm`),f=i??c(`common.cancel`);return z(()=>{if(!e)return;l.current?.focus();let t=e=>{if(e.key===`Escape`){s();return}if(e.key!==`Tab`)return;let t=u.current;if(!t)return;let n=Array.from(t.querySelectorAll(`button, [href], input, [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`));if(!n.length)return;let r=n[0],i=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),i.focus()):document.activeElement===i&&(e.preventDefault(),r.focus())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e,s]),e?at(W(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[W(`div`,{class:`absolute inset-0 bg-black/40`,onClick:s,"aria-hidden":`true`}),W(`div`,{ref:u,role:`dialog`,"aria-modal":`true`,"aria-labelledby":yr,class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-sm mx-4`,children:[W(`div`,{class:`flex items-start gap-4`,children:[a&&W(`div`,{class:`shrink-0 w-10 h-10 rounded-full bg-red-100 flex items-center justify-center`,"aria-hidden":`true`,children:W(Dn,{size:20,className:`text-red-600`})}),W(`div`,{class:`flex-1 min-w-0`,children:[W(`h3`,{id:yr,class:`text-sm font-semibold text-gray-900`,children:t}),n&&W(`p`,{class:`text-sm text-gray-500 mt-1`,children:n})]})]}),W(`div`,{class:`flex justify-end gap-3 mt-5`,children:[W(`button`,{ref:l,type:`button`,onClick:s,class:`px-4 py-2 text-sm text-gray-600 hover:bg-gray-100 rounded-lg transition-colors`,children:f}),W(`button`,{type:`button`,onClick:o,class:`px-4 py-2 text-sm font-medium rounded-lg transition-colors text-white ${a?`bg-red-600 hover:bg-red-700`:`bg-blue-600 hover:bg-blue-700`}`,children:d})]})]})]}),document.body):null}function xr(){let[e,t]=R(null);return{requestConfirm:e=>new Promise(n=>t({opts:e,resolve:n})),dialog:W(br,{open:!!e,title:e?.opts.title??``,message:e?.opts.message,confirmLabel:e?.opts.confirmLabel,cancelLabel:e?.opts.cancelLabel,danger:e?.opts.danger,onConfirm:()=>{e?.resolve(!0),t(null)},onCancel:()=>{e?.resolve(!1),t(null)}})}}function Sr({content:e,children:t}){let[n,r]=R(!1);return W(`span`,{class:`relative inline-flex items-center`,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onFocus:()=>r(!0),onBlur:()=>r(!1),children:[t,n&&W(`span`,{role:`tooltip`,class:`absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 z-50 min-w-max max-w-xs bg-gray-900 text-white text-xs rounded px-2.5 py-1.5 shadow-lg pointer-events-none`,children:[e,W(`span`,{class:`absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-gray-900`})]})]})}var Z={list:()=>Y(`/profiles`),listSummary:()=>Y(`/profiles?summary=1`),get:e=>Y(`/profiles/${e}`),create:e=>Y(`/profiles`,{method:`POST`,body:JSON.stringify(e)}),update:(e,t)=>Y(`/profiles/${e}`,{method:`PUT`,body:JSON.stringify(t)}),validateCompliance:e=>Y(`/profiles/validate`,{method:`POST`,body:JSON.stringify(e)}),delete:e=>Y(`/profiles/${e}`,{method:`DELETE`}),activate:(e,t)=>Y(`/profiles/${e}/activate`,{method:`POST`,...t?{body:JSON.stringify(t)}:{}}),deactivate:e=>Y(`/profiles/${e}/deactivate`,{method:`POST`}),listVersions:e=>Y(`/profiles/${e}/versions`),getVersion:(e,t,n=`default`)=>Y(`/profiles/${e}/versions/${t}?locale=${encodeURIComponent(n)}`),previewUrl:e=>`/consenti/api/profiles/preview?draft=${encodeURIComponent(JSON.stringify(e))}`},Cr={"opt-out-strict":{label:`Opt-out Strict (CPRA / California)`,description:`California CPRA: opt-out with sale/sharing/sensitive categories required. GPC must be honored. Stricter than general US state laws.`,compliances:[`cpra`],defaultGpc:`honor`,gpcAutoHonor:!0,allowsLegitimateInterest:!1,allowsTcf:!1,requiresCpraCategory:!0,requiresDpdpaDisclosure:!1},"opt-out":{label:`Opt-out (US State Laws)`,description:`US state privacy laws. Collect first, allow opt-out of sale/share. Covers CCPA and all state-level equivalents.`,compliances:[`ccpa`,`vcdpa`,`cpa-co`,`ctdpa`,`ucpa`,`icdpa-ia`,`icdpa-in`,`tipa`,`mcdpa-mt`,`mcdpa-mn`,`ocpa`,`tdpsa`,`dpdpa-de`,`njdpa`,`nhpa`,`ndpa-ne`,`modpa`,`kcdpa`,`ridtpa`],defaultGpc:`honor`,gpcAutoHonor:!0,allowsLegitimateInterest:!1,allowsTcf:!1,requiresCpraCategory:!1,requiresDpdpaDisclosure:!1},"notice-only":{label:`Notice Only`,description:`A privacy notice is generally sufficient. No dedicated cookie banner law is encoded for this jurisdiction.`,compliances:[`privacy-fj`,`privacy-pg`],defaultGpc:`ignore`,gpcAutoHonor:!1,allowsLegitimateInterest:!0,allowsTcf:!1,requiresCpraCategory:!1,requiresDpdpaDisclosure:!1},"opt-in":{label:`Standard Opt-in (GDPR)`,description:`GDPR / ePrivacy style: prior consent required before non-essential cookies. Granular consent, easy reject, easy withdrawal.`,compliances:[`gdpr`,`eprivacy`,`uk-gdpr`,`pecr`,`revfadp`,`kvkk`,`pdpa-th`,`pdpl-sa`,`uae-pdpl`,`difc-dpl`,`adgm-dpr`,`qpdl-qa`,`pdpl-bh`,`pdpl-om`,`law25`],defaultGpc:`ignore`,gpcAutoHonor:!1,allowsLegitimateInterest:!0,allowsTcf:!0,requiresCpraCategory:!1,requiresDpdpaDisclosure:!1},"opt-in-dpdpa":{label:`Opt-in (India DPDPA)`,description:`India's Digital Personal Data Protection Act. Opt-in consent with data fiduciary disclosure. No legitimate interest basis.`,compliances:[`dpdpa`],defaultGpc:`ignore`,gpcAutoHonor:!1,allowsLegitimateInterest:!1,allowsTcf:!1,requiresCpraCategory:!1,requiresDpdpaDisclosure:!0},"opt-in-china":{label:`Opt-in (China PIPL / DSL)`,description:`China PIPL + DSL + CSL: strict opt-in with purpose specification, data minimisation, and cross-border transfer controls.`,compliances:[`pipl`,`dsl-cn`,`csl-cn`],defaultGpc:`ignore`,gpcAutoHonor:!1,allowsLegitimateInterest:!1,allowsTcf:!1,requiresCpraCategory:!1,requiresDpdpaDisclosure:!1},"opt-in-brazil":{label:`Opt-in (Brazil LGPD)`,description:`Brazil LGPD: opt-in consent required. Legitimate interest is a valid basis. Analytics and advertising may differ in treatment.`,compliances:[`lgpd`],defaultGpc:`ignore`,gpcAutoHonor:!1,allowsLegitimateInterest:!0,allowsTcf:!1,requiresCpraCategory:!1,requiresDpdpaDisclosure:!1},"general-privacy-consent":{label:`General Privacy Consent`,description:`Privacy notice or consent rules exist but the jurisdiction does not have a GDPR/PECR-style strict cookie banner law. Documenting legal basis is best practice.`,compliances:`pipeda.popia.appi.pipa-kr.pdpa-sg.pdpa-my.dpa-ph.pdp-id.pdpd-vn.privacy-au.privacy-nz.pdpl-hk.pdpa-mo.pdpl-tw.privacy-bn.privacy-lk.privacy-np.privacy-kw.privacy-il.ndpa-ng.dpa-ke.dpa-gh.dpa-ug.dpa-rw.dpa-mu.dpa-bw.dpa-zm.dpa-zw.dpa-eg.dpa-ma.dpa-tn.dpa-dz.lfpdppp.lpdp-ar.lpdp-pe.law1581-co.law18331-uy.law19628-cl.lopdp-ec.lpdp-cr.data-protection-pa.data-protection-do`.split(`.`),defaultGpc:`ignore`,gpcAutoHonor:!1,allowsLegitimateInterest:!0,allowsTcf:!1,requiresCpraCategory:!1,requiresDpdpaDisclosure:!1}},wr=[{value:`ignore`,label:`Ignore`,description:`Do not check or respond to the GPC browser signal.`},{value:`honor`,label:`Honor`,description:`Respect GPC as a valid opt-out signal. Show GPC variant banner once.`},{value:`strict`,label:`Strict`,description:`Silently deny all non-mandatory cookies when GPC is detected. No banner shown.`}],Tr={version:`2026-07`,countries:{AT:{name:`Austria`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Austria (GDPR)`,locales:[`de-AT`]},BE:{name:`Belgium`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Belgium (GDPR)`,locales:[`nl-BE`,`fr-BE`]},BG:{name:`Bulgaria`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Bulgaria (GDPR)`,locales:[`bg-BG`]},HR:{name:`Croatia`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Croatia (GDPR)`,locales:[`hr-HR`]},CY:{name:`Cyprus`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Cyprus (GDPR)`,locales:[`el-CY`]},CZ:{name:`Czechia`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Czechia (GDPR)`,locales:[`cs-CZ`]},DK:{name:`Denmark`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Denmark (GDPR)`,locales:[`da-DK`]},EE:{name:`Estonia`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Estonia (GDPR)`,locales:[`et-EE`]},FI:{name:`Finland`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Finland (GDPR)`,locales:[`fi-FI`]},FR:{name:`France`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`France (GDPR)`,locales:[`fr-FR`]},DE:{name:`Germany`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Germany (GDPR)`,locales:[`de-DE`]},GR:{name:`Greece`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Greece (GDPR)`,locales:[`el-GR`]},HU:{name:`Hungary`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Hungary (GDPR)`,locales:[`hu-HU`]},IE:{name:`Ireland`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Ireland (GDPR)`,locales:[`en`]},IT:{name:`Italy`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Italy (GDPR)`,locales:[`it-IT`]},LV:{name:`Latvia`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Latvia (GDPR)`,locales:[`lv-LV`]},LT:{name:`Lithuania`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Lithuania (GDPR)`,locales:[`lt-LT`]},LU:{name:`Luxembourg`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Luxembourg (GDPR)`,locales:[`fr-LU`,`de-LU`]},MT:{name:`Malta`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Malta (GDPR)`,locales:[`mt-MT`,`en`]},NL:{name:`Netherlands`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Netherlands (GDPR)`,locales:[`nl-NL`]},PL:{name:`Poland`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Poland (GDPR)`,locales:[`pl-PL`]},PT:{name:`Portugal`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Portugal (GDPR)`,locales:[`pt-PT`]},RO:{name:`Romania`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Romania (GDPR)`,locales:[`ro-RO`]},SK:{name:`Slovakia`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Slovakia (GDPR)`,locales:[`sk-SK`]},SI:{name:`Slovenia`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Slovenia (GDPR)`,locales:[`sl-SI`]},ES:{name:`Spain`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Spain (GDPR)`,locales:[`es-ES`]},SE:{name:`Sweden`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Sweden (GDPR)`,locales:[`sv-SE`]},IS:{name:`Iceland`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Iceland (GDPR via EEA)`,locales:[`is-IS`]},LI:{name:`Liechtenstein`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Liechtenstein (GDPR via EEA)`,locales:[`de-LI`]},NO:{name:`Norway`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Norway (GDPR via EEA)`,locales:[`nb-NO`]},AD:{name:`Andorra`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Andorra (GDPR-aligned)`,locales:[`ca-AD`]},AL:{name:`Albania`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Albania (GDPR-aligned)`,locales:[`sq-AL`]},BA:{name:`Bosnia and Herzegovina`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Bosnia and Herzegovina (GDPR-aligned)`,locales:[`bs-BA`,`sr-Latn-BA`]},GG:{name:`Guernsey`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Guernsey (DPA based on GDPR)`,locales:[`en`]},GI:{name:`Gibraltar`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Gibraltar (DPA based on UK GDPR)`,locales:[`en`]},GL:{name:`Greenland`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Greenland (Danish GDPR implementation)`,locales:[`da-GL`]},MC:{name:`Monaco`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Monaco (GDPR-aligned)`,locales:[`fr-MC`]},ME:{name:`Montenegro`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Montenegro (GDPR-aligned)`,locales:[`sr-Latn-ME`]},MK:{name:`North Macedonia`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`North Macedonia (GDPR-aligned)`,locales:[`mk-MK`]},RS:{name:`Serbia`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Serbia (GDPR-aligned)`,locales:[`sr-RS`]},SM:{name:`San Marino`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`San Marino (GDPR-aligned)`,locales:[`it-SM`]},TR:{name:`Türkiye`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Türkiye (KVKK)`,locales:[`tr-TR`]},CA:{name:`Canada`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Canada (PIPEDA / Law 25)`,locales:[`en`,`fr-CA`],overriddenRegions:{QC:{name:`Quebec`,type:`region`,complianceGroup:`opt-in`,description:`Quebec — Law 25 (GDPR-style opt-in)`}}},US:{name:`United States`,type:`country`,complianceGroup:`opt-out`,default:`opt-out-strict`,description:`United States — opt-out-strict (CPRA) used when state cannot be detected`,locales:[`en`,`es-US`],overriddenRegions:{CA:{name:`California`,type:`region`,complianceGroup:`opt-out-strict`,description:`California — CPRA/CCPA`},VA:{name:`Virginia`,type:`region`,complianceGroup:`opt-out`,description:`Virginia — VCDPA`},CO:{name:`Colorado`,type:`region`,complianceGroup:`opt-out`,description:`Colorado — CPA`},CT:{name:`Connecticut`,type:`region`,complianceGroup:`opt-out`,description:`Connecticut — CTDPA`},UT:{name:`Utah`,type:`region`,complianceGroup:`opt-out`,description:`Utah — UCPA`},TX:{name:`Texas`,type:`region`,complianceGroup:`opt-out`,description:`Texas — TDPSA`},DE:{name:`Delaware`,type:`region`,complianceGroup:`opt-out`,description:`Delaware — DPDPA`},NJ:{name:`New Jersey`,type:`region`,complianceGroup:`opt-out`,description:`New Jersey — NJDPA`},OR:{name:`Oregon`,type:`region`,complianceGroup:`opt-out`,description:`Oregon — OCPA`},MN:{name:`Minnesota`,type:`region`,complianceGroup:`opt-out`,description:`Minnesota — MCDPA`},MD:{name:`Maryland`,type:`region`,complianceGroup:`opt-out`,description:`Maryland — MODPA`},KY:{name:`Kentucky`,type:`region`,complianceGroup:`opt-out`,description:`Kentucky — KCDPA`},TN:{name:`Tennessee`,type:`region`,complianceGroup:`opt-out`,description:`Tennessee — TIPA`},NE:{name:`Nebraska`,type:`region`,complianceGroup:`opt-out`,description:`Nebraska — NDPA`},IA:{name:`Iowa`,type:`region`,complianceGroup:`opt-out`,description:`Iowa — ICDPA`},IN:{name:`Indiana`,type:`region`,complianceGroup:`opt-out`,description:`Indiana — ICDPA`},MT:{name:`Montana`,type:`region`,complianceGroup:`opt-out`,description:`Montana — MCDPA`},NH:{name:`New Hampshire`,type:`region`,complianceGroup:`opt-out`,description:`New Hampshire — NHPA`},RI:{name:`Rhode Island`,type:`region`,complianceGroup:`opt-out`,description:`Rhode Island — RIDTPA`}}},AR:{name:`Argentina`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Argentina (LPDP)`,locales:[`es-AR`]},BO:{name:`Bolivia`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Bolivia`,locales:[`es-BO`]},BR:{name:`Brazil`,type:`country`,complianceGroup:`opt-in-brazil`,default:`opt-in-brazil`,description:`Brazil (LGPD)`,locales:[`pt-BR`]},CL:{name:`Chile`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Chile (Law 19.628)`,locales:[`es-CL`]},CO:{name:`Colombia`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Colombia (Law 1581)`,locales:[`es-CO`]},CR:{name:`Costa Rica`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Costa Rica (LPDP)`,locales:[`es-CR`]},DO:{name:`Dominican Republic`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Dominican Republic`,locales:[`es-DO`]},EC:{name:`Ecuador`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Ecuador (LOPDP)`,locales:[`es-EC`]},GF:{name:`French Guiana`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`French Guiana`,locales:[`fr-GF`]},GT:{name:`Guatemala`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Guatemala`,locales:[`es-GT`]},GY:{name:`Guyana`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Guyana`,locales:[`en`]},HN:{name:`Honduras`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Honduras`,locales:[`es-HN`]},HT:{name:`Haiti`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Haiti`,locales:[`fr-HT`]},JM:{name:`Jamaica`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Jamaica`,locales:[`en`]},MX:{name:`Mexico`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Mexico (LFPDPPP)`,locales:[`es-MX`]},NI:{name:`Nicaragua`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Nicaragua`,locales:[`es-NI`]},PA:{name:`Panama`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Panama`,locales:[`es-PA`]},PE:{name:`Peru`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Peru (LPDP)`,locales:[`es-PE`]},PY:{name:`Paraguay`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Paraguay`,locales:[`es-PY`]},SR:{name:`Suriname`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Suriname`,locales:[`nl-SR`]},SV:{name:`El Salvador`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`El Salvador`,locales:[`es-SV`]},TT:{name:`Trinidad and Tobago`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Trinidad and Tobago`,locales:[`en`]},UY:{name:`Uruguay`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Uruguay (Law 18.331)`,locales:[`es-UY`]},VE:{name:`Venezuela`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Venezuela`,locales:[`es-VE`]},AG:{name:`Antigua and Barbuda`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Antigua and Barbuda`,locales:[`en`]},BB:{name:`Barbados`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Barbados`,locales:[`en`]},BL:{name:`Saint Barthélemy`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Saint Barthélemy`,locales:[`fr-BL`]},BM:{name:`Bermuda`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Bermuda`,locales:[`en`]},BS:{name:`Bahamas`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Bahamas`,locales:[`en`]},CU:{name:`Cuba`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Cuba`,locales:[`es-CU`]},DM:{name:`Dominica`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Dominica`,locales:[`en`]},GD:{name:`Grenada`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Grenada`,locales:[`en`]},KN:{name:`Saint Kitts and Nevis`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Saint Kitts and Nevis`,locales:[`en`]},LC:{name:`Saint Lucia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Saint Lucia`,locales:[`en`]},PM:{name:`Saint Pierre and Miquelon`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Saint Pierre and Miquelon`,locales:[`fr-PM`]},PR:{name:`Puerto Rico`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Puerto Rico`,locales:[`es-PR`,`en`]},VC:{name:`Saint Vincent and the Grenadines`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Saint Vincent and the Grenadines`,locales:[`en`]},IN:{name:`India`,type:`country`,complianceGroup:`opt-in-dpdpa`,default:`opt-in-dpdpa`,description:`India (DPDPA)`,locales:[`hi-IN`,`en`,`bn-IN`,`ta-IN`]},CN:{name:`China`,type:`country`,complianceGroup:`opt-in-china`,default:`opt-in-china`,description:`China (PIPL + DSL + CSL)`,locales:[`zh-CN`]},BN:{name:`Brunei`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Brunei (Personal Data Protection Order)`,locales:[`ms-BN`,`en`]},ID:{name:`Indonesia`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Indonesia (PDP Law)`,locales:[`id-ID`]},KH:{name:`Cambodia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Cambodia`,locales:[`km-KH`]},LA:{name:`Laos`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Laos`,locales:[`lo-LA`]},MM:{name:`Myanmar`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Myanmar`,locales:[`my-MM`]},MY:{name:`Malaysia`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Malaysia (PDPA)`,locales:[`ms-MY`,`zh-MY`,`en`]},PH:{name:`Philippines`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Philippines (DPA)`,locales:[`fil-PH`,`en`]},SG:{name:`Singapore`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Singapore (PDPA)`,locales:[`zh-SG`,`ms-SG`,`ta-SG`,`en`]},TH:{name:`Thailand`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Thailand (PDPA — GDPR-style opt-in)`,locales:[`th-TH`]},TL:{name:`Timor-Leste`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Timor-Leste`,locales:[`pt-TL`]},VN:{name:`Vietnam`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Vietnam (PDPD)`,locales:[`vi-VN`]},HK:{name:`Hong Kong`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Hong Kong SAR (PDPO)`,locales:[`zh-HK`]},JP:{name:`Japan`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Japan (APPI)`,locales:[`ja-JP`]},KP:{name:`North Korea`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`North Korea`,locales:[`ko-KP`]},KR:{name:`South Korea`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`South Korea (PIPA)`,locales:[`ko-KR`]},MN:{name:`Mongolia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Mongolia`,locales:[`mn-MN`]},MO:{name:`Macau`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Macau SAR (PDPA)`,locales:[`zh-MO`,`pt-MO`]},TW:{name:`Taiwan`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Taiwan (PDPL)`,locales:[`zh-TW`]},AF:{name:`Afghanistan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Afghanistan`,locales:[`fa-AF`]},BD:{name:`Bangladesh`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Bangladesh`,locales:[`bn-BD`]},BT:{name:`Bhutan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Bhutan`,locales:[`dz-BT`]},IO:{name:`British Indian Ocean Territory`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`British Indian Ocean Territory`,locales:[`en`]},LK:{name:`Sri Lanka`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Sri Lanka`,locales:[`si-LK`,`ta-LK`]},MV:{name:`Maldives`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Maldives`,locales:[`dv-MV`]},NP:{name:`Nepal`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Nepal`,locales:[`ne-NP`]},PK:{name:`Pakistan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Pakistan`,locales:[`ur-PK`,`en`]},AM:{name:`Armenia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Armenia`,locales:[`hy-AM`]},AZ:{name:`Azerbaijan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Azerbaijan`,locales:[`az-AZ`]},GE:{name:`Georgia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Georgia`,locales:[`ka-GE`]},KG:{name:`Kyrgyzstan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Kyrgyzstan`,locales:[`ky-KG`,`ru-KG`]},KZ:{name:`Kazakhstan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Kazakhstan`,locales:[`kk-KZ`,`ru-KZ`]},TJ:{name:`Tajikistan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Tajikistan`,locales:[`tg-TJ`]},TM:{name:`Turkmenistan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Turkmenistan`,locales:[`tk-TM`]},UZ:{name:`Uzbekistan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Uzbekistan`,locales:[`uz-UZ`]},AE:{name:`United Arab Emirates`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`United Arab Emirates (UAE PDPL / DIFC DPL / ADGM DPR)`,locales:[`ar-AE`]},BH:{name:`Bahrain`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Bahrain (PDPL)`,locales:[`ar-BH`]},IL:{name:`Israel`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Israel (Privacy Protection Law)`,locales:[`he-IL`,`ar-IL`]},IQ:{name:`Iraq`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Iraq`,locales:[`ar-IQ`]},IR:{name:`Iran`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Iran`,locales:[`fa-IR`]},JO:{name:`Jordan`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Jordan`,locales:[`ar-JO`]},KW:{name:`Kuwait`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Kuwait`,locales:[`ar-KW`]},LB:{name:`Lebanon`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Lebanon`,locales:[`ar-LB`]},OM:{name:`Oman`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Oman (PDPL)`,locales:[`ar-OM`]},PS:{name:`Palestine`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Palestine`,locales:[`ar-PS`]},QA:{name:`Qatar`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Qatar (PDPL)`,locales:[`ar-QA`]},SA:{name:`Saudi Arabia`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Saudi Arabia (PDPL)`,locales:[`ar-SA`]},SY:{name:`Syria`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Syria`,locales:[`ar-SY`]},YE:{name:`Yemen`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Yemen`,locales:[`ar-YE`]},BF:{name:`Burkina Faso`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Burkina Faso`,locales:[`fr-BF`]},BJ:{name:`Benin`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Benin`,locales:[`fr-BJ`]},CI:{name:`Côte d'Ivoire`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Côte d'Ivoire`,locales:[`fr-CI`]},CM:{name:`Cameroon`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Cameroon`,locales:[`fr-CM`,`en`]},CV:{name:`Cabo Verde`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Cabo Verde`,locales:[`pt-CV`]},GA:{name:`Gabon`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Gabon`,locales:[`fr-GA`]},GH:{name:`Ghana`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Ghana (DPA)`,locales:[`en`]},GM:{name:`Gambia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Gambia`,locales:[`en`]},GN:{name:`Guinea`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Guinea`,locales:[`fr-GN`]},GQ:{name:`Equatorial Guinea`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Equatorial Guinea`,locales:[`es-GQ`,`fr-GQ`]},GW:{name:`Guinea-Bissau`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Guinea-Bissau`,locales:[`pt-GW`]},LR:{name:`Liberia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Liberia`,locales:[`en`]},ML:{name:`Mali`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Mali`,locales:[`fr-ML`]},MR:{name:`Mauritania`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Mauritania`,locales:[`ar-MR`]},NE:{name:`Niger`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Niger`,locales:[`fr-NE`]},NG:{name:`Nigeria`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Nigeria (NDPA)`,locales:[`en`]},SL:{name:`Sierra Leone`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Sierra Leone`,locales:[`en`]},SN:{name:`Senegal`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Senegal`,locales:[`fr-SN`]},TG:{name:`Togo`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Togo`,locales:[`fr-TG`]},BI:{name:`Burundi`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Burundi`,locales:[`fr-BI`]},DJ:{name:`Djibouti`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Djibouti`,locales:[`fr-DJ`,`ar-DJ`]},ER:{name:`Eritrea`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Eritrea`,locales:[`ti-ER`]},ET:{name:`Ethiopia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Ethiopia`,locales:[`am-ET`]},KE:{name:`Kenya`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Kenya (DPA)`,locales:[`sw-KE`,`en`]},KM:{name:`Comoros`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Comoros`,locales:[`ar-KM`,`fr-KM`]},MG:{name:`Madagascar`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Madagascar`,locales:[`fr-MG`]},MU:{name:`Mauritius`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Mauritius (DPA)`,locales:[`en`,`fr-MU`]},MW:{name:`Malawi`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Malawi`,locales:[`en`]},MZ:{name:`Mozambique`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Mozambique`,locales:[`pt-MZ`]},RW:{name:`Rwanda`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Rwanda (DPA)`,locales:[`rw-RW`,`en`]},SC:{name:`Seychelles`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Seychelles`,locales:[`fr-SC`,`en`]},SO:{name:`Somalia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Somalia`,locales:[`so-SO`]},SS:{name:`South Sudan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`South Sudan`,locales:[`en`]},ST:{name:`São Tomé and Príncipe`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`São Tomé and Príncipe`,locales:[`pt-ST`]},TZ:{name:`Tanzania`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Tanzania`,locales:[`sw-TZ`,`en`]},UG:{name:`Uganda`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Uganda (DPA)`,locales:[`en`]},AO:{name:`Angola`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Angola`,locales:[`pt-AO`]},BW:{name:`Botswana`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Botswana (DPA)`,locales:[`en`]},LS:{name:`Lesotho`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Lesotho`,locales:[`en`]},NA:{name:`Namibia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Namibia`,locales:[`en`]},SZ:{name:`Eswatini`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Eswatini`,locales:[`en`]},ZA:{name:`South Africa`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`South Africa (POPIA)`,locales:[`en`,`af-ZA`]},ZM:{name:`Zambia`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Zambia (DPA)`,locales:[`en`]},ZW:{name:`Zimbabwe`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Zimbabwe (DPA)`,locales:[`en`]},DZ:{name:`Algeria`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Algeria`,locales:[`ar-DZ`,`fr-DZ`]},EG:{name:`Egypt`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Egypt (DPA)`,locales:[`ar-EG`]},LY:{name:`Libya`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Libya`,locales:[`ar-LY`]},MA:{name:`Morocco`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Morocco`,locales:[`ar-MA`,`fr-MA`]},SD:{name:`Sudan`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Sudan`,locales:[`ar-SD`]},TN:{name:`Tunisia`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Tunisia (DPA)`,locales:[`ar-TN`,`fr-TN`]},CD:{name:`DR Congo`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`DR Congo`,locales:[`fr-CD`]},CF:{name:`Central African Republic`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Central African Republic`,locales:[`fr-CF`]},CG:{name:`Republic of Congo`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Republic of Congo`,locales:[`fr-CG`]},TD:{name:`Chad`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Chad`,locales:[`fr-TD`,`ar-TD`]},BY:{name:`Belarus`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Belarus`,locales:[`be-BY`,`ru-BY`]},MD:{name:`Moldova`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Moldova`,locales:[`ro-MD`]},RU:{name:`Russia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Russia`,locales:[`ru-RU`]},UA:{name:`Ukraine`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Ukraine`,locales:[`uk-UA`]},VA:{name:`Holy See`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Holy See`,locales:[`it-VA`]},AU:{name:`Australia`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`Australia (Privacy Act)`,locales:[`en`]},FJ:{name:`Fiji`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Fiji`,locales:[`en`]},FM:{name:`Micronesia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Micronesia`,locales:[`en`]},KI:{name:`Kiribati`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Kiribati`,locales:[`en`]},MH:{name:`Marshall Islands`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Marshall Islands`,locales:[`en`]},MP:{name:`Northern Mariana Islands`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Northern Mariana Islands`,locales:[`en`]},NC:{name:`New Caledonia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`New Caledonia`,locales:[`fr-NC`]},NF:{name:`Norfolk Island`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Norfolk Island`,locales:[`en`]},NR:{name:`Nauru`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Nauru`,locales:[`en`]},NU:{name:`Niue`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Niue`,locales:[`en`]},NZ:{name:`New Zealand`,type:`country`,complianceGroup:`general-privacy-consent`,default:`general-privacy-consent`,description:`New Zealand (Privacy Act)`,locales:[`en`]},PF:{name:`French Polynesia`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`French Polynesia`,locales:[`fr-PF`]},PG:{name:`Papua New Guinea`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Papua New Guinea`,locales:[`en`]},PW:{name:`Palau`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Palau`,locales:[`en`]},SB:{name:`Solomon Islands`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Solomon Islands`,locales:[`en`]},TO:{name:`Tonga`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Tonga`,locales:[`en`]},TV:{name:`Tuvalu`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Tuvalu`,locales:[`en`]},VU:{name:`Vanuatu`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Vanuatu`,locales:[`fr-VU`,`en`]},WS:{name:`Samoa`,type:`country`,complianceGroup:`notice-only`,default:`notice-only`,description:`Samoa`,locales:[`en`]},UK:{name:`United Kingdom`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`United Kingdom (UK GDPR + PECR)`,locales:[`en`]},CH:{name:`Switzerland`,type:`country`,complianceGroup:`opt-in`,default:`opt-in`,description:`Switzerland (revFADP)`,locales:[`de-CH`,`fr-CH`,`it-CH`]}}};Object.entries(Tr.countries).reduce(function(e,[t,n]){return e[t]=n.name,e},{}),Object.values(Tr.countries).reduce(function(e,t){return t.locales.forEach(n=>{e[n]=t.name}),e},{});function Er({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(!0),[o,s]=R(null),[c,l]=R(null),[u,d]=R(null),[f,p]=R(null),[m,h]=R(null),{requestConfirm:g,dialog:_}=xr(),v=e=>{navigator.clipboard.writeText(e).then(()=>{l(e),setTimeout(()=>l(t=>t===e?null:t),1500)}).catch(()=>{})},y=()=>{a(!0),Z.listSummary().then(r).catch(()=>{}).finally(()=>a(!1))};z(()=>{y()},[]);let b=async(e,n)=>{await g({title:t(`profiles.dialog.delete.title`,{name:n}),message:t(`profiles.dialog.delete.message`)})&&(await Z.delete(e).catch(()=>{}),y())},x=async e=>{if(await g({title:t(`profiles.dialog.copy.title`,{name:e.name}),message:t(`profiles.dialog.copy.message`)})){s(e.id);try{let t=await Z.get(e.id),{isActive:n,...r}=t.profileJson;await Z.create({name:`Copy of ${e.name}`,defaultLocale:t.defaultLocale,profileJson:{...r,isActive:!1},choice:`inactive`}),y()}catch{}finally{s(null)}}},S=async(e,t)=>{d(e);try{let n=await Z.activate(e,t?{choice:t}:void 0);if(n.requiresChoice){h(e),p(n.conflict);return}y()}catch{}finally{d(t=>t===e?null:t)}},C=async()=>{let e=m;p(null),h(null),e&&await S(e,`deactivate`)},w=async e=>{if(e.isActive){if(!await g({title:`Deactivate profile "${e.name}"?`,message:`This will remove the profile JSON files for this compliance group.`}))return;d(e.id);try{await Z.deactivate(e.id),y()}catch{}finally{d(null)}}else await S(e.id)},T=n.length,E=t(T===1?`profiles.countSingular`:`profiles.count`,{n:T});return W(X,{title:t(`profiles.title`),current:e,children:[_,f&&at(W(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[W(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>{p(null),h(null)},"aria-hidden":`true`}),W(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[W(`h3`,{class:`text-sm font-semibold text-gray-900`,children:t(`profileEditor.conflict.title`)}),W(`p`,{class:`text-sm text-gray-600`,children:t(`profileEditor.conflict.message`,{name:f.name})}),W(`div`,{class:`flex flex-col gap-2 pt-1`,children:[W(`button`,{type:`button`,onClick:C,class:`w-full bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:t(`profileEditor.conflict.deactivate`,{name:f.name})}),W(`button`,{type:`button`,onClick:()=>{p(null),h(null)},class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:t(`common.cancel`)})]})]})]}),document.body),W(`div`,{class:`flex justify-between items-center mb-4`,children:[W(`p`,{class:`text-sm text-gray-500`,children:E}),W(vr,{perm:`profile:create`,children:W(`a`,{href:`#/banners/profiles/new`,class:`bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:t(`profiles.newProfile`)})})]}),W(_r,{loading:i,keyFn:e=>e.id,rows:n,columns:[{key:`name`,label:t(`profiles.col.name`),render:e=>{let n=e;return W(`div`,{children:[W(`div`,{class:`font-medium text-sm text-gray-900`,children:n.name}),W(`div`,{class:`flex items-center gap-1 mt-0.5`,children:[W(`span`,{class:`text-xs text-gray-400 font-mono`,children:n.id}),W(`button`,{onClick:e=>{e.stopPropagation(),v(n.id)},class:`text-gray-400 hover:text-gray-600 transition-colors`,"aria-label":t(`profiles.action.copyId`),title:t(`profiles.action.copyId`),children:c===n.id?W(jt,{size:11,className:`text-green-500`,"aria-hidden":`true`}):W(Vt,{size:11,"aria-hidden":`true`})})]})]})}},{key:`defaultLocale`,label:t(`profiles.col.defaultLocale`)},{key:`complianceGroup`,label:`Compliance Group`,render:e=>{let t=e;if(!t.complianceGroup)return W(`span`,{class:`text-xs text-gray-400`,children:`—`});let n=Cr[t.complianceGroup],r=n?.label??t.complianceGroup,i=n?.compliances??[];return W(`div`,{class:`flex items-center gap-1.5`,children:[W(`span`,{class:`text-sm text-gray-700`,children:r}),i.length>0&&W(Sr,{content:W(`div`,{class:`space-y-0.5`,children:i.map(e=>W(`div`,{class:`text-xs`,children:e},e))}),children:W(Jt,{size:13,className:`text-gray-400 cursor-help`,"aria-hidden":`true`})})]})}},{key:`isActive`,label:`Status`,render:e=>{let t=e;return W(`span`,{class:`text-xs font-medium px-2 py-0.5 rounded-full ${t.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:t.isActive?`Active`:`Inactive`})}},{key:`version`,label:t(`profiles.col.version`),render:e=>W(`span`,{class:`text-xs font-mono text-gray-600`,children:[`v`,e.version]})},{key:`templates`,label:t(`profiles.col.templates`),render:e=>{let t=e;return W(`div`,{class:`text-xs text-gray-500 space-y-0.5`,children:[t.cookieTemplateName&&W(`div`,{children:[`Cookie: `,W(`span`,{class:`text-gray-700`,children:t.cookieTemplateName})]}),t.uiTemplateName&&W(`div`,{children:[`UI: `,W(`span`,{class:`text-gray-700`,children:t.uiTemplateName})]}),!t.cookieTemplateName&&!t.uiTemplateName&&W(`span`,{class:`text-gray-300`,children:`—`})]})}},{key:`createdAt`,label:t(`profiles.col.created`),render:e=>{let t=e;return W(`div`,{class:`text-xs text-gray-500`,children:[W(`div`,{children:new Date(t.createdAt).toLocaleDateString()}),t.updatedAt&&t.updatedAt!==t.createdAt&&W(`div`,{class:`text-gray-400`,children:[`upd `,new Date(t.updatedAt).toLocaleDateString()]})]})}},{key:`actions`,label:``,render:e=>{let n=e;return W(`div`,{class:`flex gap-2 items-center`,children:[W(`a`,{href:`#/banners/profiles/${n.id}`,class:`text-blue-600 hover:text-blue-800 text-xs`,title:t(`common.edit`),"aria-label":t(`common.edit`),children:W(xn,{size:14,"aria-hidden":`true`})}),W(`a`,{href:`#/banners/profiles/${n.id}/history`,class:`text-gray-500 hover:text-gray-700 text-xs`,title:`Version history`,"aria-label":`Version history`,children:W(qt,{size:14,"aria-hidden":`true`})}),W(vr,{perm:`profile:update`,children:W(`button`,{onClick:()=>w(n),disabled:u===n.id,class:`text-xs disabled:opacity-50 ${n.isActive?`text-amber-500 hover:text-amber-700`:`text-green-600 hover:text-green-800`}`,title:n.isActive?`Deactivate`:`Activate`,"aria-label":n.isActive?`Deactivate`:`Activate`,children:n.isActive?W(un,{size:14,"aria-hidden":`true`}):W(dn,{size:14,"aria-hidden":`true`})})}),W(vr,{perm:`profile:create`,children:W(`button`,{onClick:()=>x(n),disabled:o===n.id,class:`text-gray-500 hover:text-blue-600 text-xs disabled:opacity-50`,title:t(`common.duplicate`),"aria-label":t(`common.duplicate`),children:o===n.id?`…`:W(Dt,{size:14,"aria-hidden":`true`})})}),W(vr,{perm:`profile:delete`,children:W(`button`,{onClick:()=>b(n.id,n.name),class:`text-red-500 hover:text-red-700 text-xs`,title:t(`common.delete`),"aria-label":t(`common.delete`),children:W(En,{size:14,"aria-hidden":`true`})})})]})}}],emptyText:t(`profiles.empty`)})]})}function Dr({options:e,value:t,onChange:n,placeholder:r=`Select…`,searchable:i,disabled:a,id:o,class:s}){let[c,l]=R(!1),[u,d]=R(``),f=B(null),p=B(null),m=e.find(e=>e.value===t),h=u?e.filter(e=>e.label.toLowerCase().includes(u.toLowerCase())||e.value.toLowerCase().includes(u.toLowerCase())):e;return z(()=>{c&&i&&setTimeout(()=>p.current?.focus(),10),c||d(``)},[c,i]),z(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&l(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),W(`div`,{ref:f,class:`relative ${s??``}`,children:[W(`button`,{id:o,type:`button`,disabled:a,onClick:()=>l(e=>!e),onKeyDown:e=>{e.key===`Escape`&&l(!1),e.key===`Enter`&&!c&&l(!0)},class:`w-full flex items-center justify-between gap-2 border border-gray-300 rounded px-3 py-2 text-sm bg-white text-left ${a?`opacity-50 cursor-not-allowed`:`cursor-pointer hover:border-gray-400`}`,"aria-haspopup":`listbox`,"aria-expanded":c,children:[W(`span`,{class:m?`text-gray-900`:`text-gray-400`,children:m?.label??r}),W(Mt,{size:14,className:`shrink-0 text-gray-400 transition-transform ${c?`rotate-180`:``}`,"aria-hidden":`true`})]}),c&&W(`div`,{class:`absolute z-50 mt-1 w-full bg-white border border-gray-200 rounded shadow-lg max-h-56 flex flex-col`,role:`listbox`,children:[i&&W(`div`,{class:`px-2 pt-2 pb-1 border-b border-gray-100`,children:W(`div`,{class:`flex items-center gap-1.5 border border-gray-300 rounded px-2 py-1`,children:[W(gn,{size:12,className:`text-gray-400 shrink-0`,"aria-hidden":`true`}),W(`input`,{ref:p,type:`text`,class:`flex-1 text-sm outline-none bg-transparent`,placeholder:`Search…`,value:u,onInput:e=>d(e.target.value),"aria-label":`Search options`})]})}),W(`ul`,{class:`overflow-y-auto flex-1`,children:[h.length===0&&W(`li`,{class:`px-3 py-2 text-sm text-gray-400`,children:`No results`}),h.map(e=>W(`li`,{role:`option`,"aria-selected":e.value===t,onClick:()=>{n(e.value),l(!1)},class:`px-3 py-2 text-sm cursor-pointer transition-colors ${e.value===t?`bg-blue-50 text-blue-700 font-medium`:`hover:bg-gray-50 text-gray-700`}`,children:e.label},e.value))]})]})]})}var Or=[{value:`en`,label:`en — English`},{value:`en-US`,label:`en-US — English (United States)`},{value:`en-GB`,label:`en-GB — English (United Kingdom)`},{value:`en-AU`,label:`en-AU — English (Australia)`},{value:`en-CA`,label:`en-CA — English (Canada)`},{value:`en-IN`,label:`en-IN — English (India)`},{value:`ar`,label:`ar — Arabic`},{value:`ar-SA`,label:`ar-SA — Arabic (Saudi Arabia)`},{value:`bg-BG`,label:`bg-BG — Bulgarian (Bulgaria)`},{value:`bs-BA`,label:`bs-BA — Bosnian (Bosnia)`},{value:`ca-AD`,label:`ca-AD — Catalan (Andorra)`},{value:`cs-CZ`,label:`cs-CZ — Czech (Czech Republic)`},{value:`da-DK`,label:`da-DK — Danish (Denmark)`},{value:`de`,label:`de — German`},{value:`de-AT`,label:`de-AT — German (Austria)`},{value:`de-CH`,label:`de-CH — German (Switzerland)`},{value:`de-DE`,label:`de-DE — German (Germany)`},{value:`de-LI`,label:`de-LI — German (Liechtenstein)`},{value:`de-LU`,label:`de-LU — German (Luxembourg)`},{value:`el-CY`,label:`el-CY — Greek (Cyprus)`},{value:`el-GR`,label:`el-GR — Greek (Greece)`},{value:`es`,label:`es — Spanish`},{value:`es-ES`,label:`es-ES — Spanish (Spain)`},{value:`es-MX`,label:`es-MX — Spanish (Mexico)`},{value:`es-AR`,label:`es-AR — Spanish (Argentina)`},{value:`et-EE`,label:`et-EE — Estonian (Estonia)`},{value:`fi-FI`,label:`fi-FI — Finnish (Finland)`},{value:`fr`,label:`fr — French`},{value:`fr-BE`,label:`fr-BE — French (Belgium)`},{value:`fr-CH`,label:`fr-CH — French (Switzerland)`},{value:`fr-FR`,label:`fr-FR — French (France)`},{value:`fr-LU`,label:`fr-LU — French (Luxembourg)`},{value:`fr-MC`,label:`fr-MC — French (Monaco)`},{value:`he`,label:`he — Hebrew`},{value:`hi`,label:`hi — Hindi`},{value:`hi-IN`,label:`hi-IN — Hindi (India)`},{value:`hr-HR`,label:`hr-HR — Croatian (Croatia)`},{value:`hu-HU`,label:`hu-HU — Hungarian (Hungary)`},{value:`id`,label:`id — Indonesian`},{value:`is-IS`,label:`is-IS — Icelandic (Iceland)`},{value:`it`,label:`it — Italian`},{value:`it-IT`,label:`it-IT — Italian (Italy)`},{value:`ja`,label:`ja — Japanese`},{value:`ko`,label:`ko — Korean`},{value:`lt-LT`,label:`lt-LT — Lithuanian (Lithuania)`},{value:`lv-LV`,label:`lv-LV — Latvian (Latvia)`},{value:`mk-MK`,label:`mk-MK — Macedonian (North Macedonia)`},{value:`mt-MT`,label:`mt-MT — Maltese (Malta)`},{value:`nb-NO`,label:`nb-NO — Norwegian Bokmål (Norway)`},{value:`nl`,label:`nl — Dutch`},{value:`nl-BE`,label:`nl-BE — Dutch (Belgium)`},{value:`nl-NL`,label:`nl-NL — Dutch (Netherlands)`},{value:`pl-PL`,label:`pl-PL — Polish (Poland)`},{value:`pt`,label:`pt — Portuguese`},{value:`pt-BR`,label:`pt-BR — Portuguese (Brazil)`},{value:`pt-PT`,label:`pt-PT — Portuguese (Portugal)`},{value:`ro-RO`,label:`ro-RO — Romanian (Romania)`},{value:`ru`,label:`ru — Russian`},{value:`sk-SK`,label:`sk-SK — Slovak (Slovakia)`},{value:`sl-SI`,label:`sl-SI — Slovenian (Slovenia)`},{value:`sq-AL`,label:`sq-AL — Albanian (Albania)`},{value:`sr-Latn-BA`,label:`sr-Latn-BA — Serbian Latin (Bosnia)`},{value:`sr-Latn-ME`,label:`sr-Latn-ME — Serbian Latin (Montenegro)`},{value:`sv-SE`,label:`sv-SE — Swedish (Sweden)`},{value:`th`,label:`th — Thai`},{value:`tr`,label:`tr — Turkish`},{value:`uk`,label:`uk — Ukrainian`},{value:`vi`,label:`vi — Vietnamese`},{value:`zh`,label:`zh — Chinese (Simplified)`},{value:`zh-TW`,label:`zh-TW — Chinese (Traditional)`},{value:`zh-HK`,label:`zh-HK — Chinese (Hong Kong)`}];function kr({value:e,onChange:t,placeholder:n=`Select locale…`,disabled:r,id:i,class:a}){return W(Dr,{options:Or,value:e,onChange:t,placeholder:n,searchable:!0,...r===void 0?{}:{disabled:r},...i===void 0?{}:{id:i},...a===void 0?{}:{class:a}})}function Ar({locales:e,defaultLocale:t,activeLocale:n,onSelect:r,onAdd:i}){let a=J(),[o,s]=R(!1);return W(`div`,{class:`flex flex-wrap items-center gap-1 border-b border-gray-200 mb-4 pb-0`,children:[e.map(e=>W(`button`,{onClick:()=>r(e),class:`px-3 py-2 text-sm font-medium border-b-2 transition-colors -mb-px ${e===n?`border-blue-500 text-blue-600`:`border-transparent text-gray-500 hover:text-gray-700`}`,children:[e.toUpperCase(),e===t&&W(`span`,{class:`ml-1 text-xs text-gray-400`,children:a(`profileEditor.content.defaultLocaleLabel`)})]},e)),o?W(`div`,{class:`flex items-center gap-1.5 ml-2 relative z-10`,children:[W(kr,{value:``,onChange:t=>{t&&!e.includes(t)&&i(t),s(!1)},placeholder:a(`profileEditor.content.selectLocale`),class:`w-52`}),W(`button`,{onClick:()=>s(!1),class:`text-xs text-gray-400 hover:underline px-1`,children:a(`common.cancel`)})]}):W(`button`,{onClick:()=>s(!0),class:`px-2 py-2 text-xs text-gray-400 hover:text-blue-600 transition-colors -mb-px border-b-2 border-transparent`,children:a(`profileEditor.content.addLocale`)})]})}function jr(e){if(!e||!e.trim())return[];let t=e.trim();if(t.startsWith(`[`))try{return JSON.parse(t)}catch{}return Fr(e)}function Mr(e){return e.length?JSON.stringify(e):``}function Nr(e){return e.map(Pr).join(``)}function Pr(e){return e.t===`text`?Rr(e.v):e.t===`br`?`<br>`:e.t===`a`?`<a href="${zr(e.href)}">${e.c.map(Pr).join(``)}</a>`:`<${e.t}>${e.c.map(Pr).join(``)}</${e.t}>`}function Fr(e){return!e||!e.trim()?[]:Ir([...new DOMParser().parseFromString(e,`text/html`).body.childNodes])}function Ir(e){let t=[];for(let n of e)if(n.nodeType===Node.TEXT_NODE){let e=n.textContent??``;e&&t.push({t:`text`,v:e})}else n.nodeType===Node.ELEMENT_NODE&&t.push(...Lr(n));return t}function Lr(e){let t=e.tagName.toLowerCase(),n=Ir([...e.childNodes]);switch(t){case`br`:return[{t:`br`}];case`b`:case`strong`:return[{t:`b`,c:n}];case`i`:case`em`:return[{t:`i`,c:n}];case`u`:return[{t:`u`,c:n}];case`ul`:return[{t:`ul`,c:n}];case`ol`:return[{t:`ol`,c:n}];case`li`:return[{t:`li`,c:n}];case`a`:return[{t:`a`,href:e.getAttribute(`href`)??``,c:n}];case`p`:case`div`:case`h1`:case`h2`:case`h3`:case`h4`:case`h5`:case`h6`:return n.length===1&&`c`in n[0]&&(n[0].t===`p`||n[0].t===`ul`||n[0].t===`ol`)?n:[{t:`p`,c:n}];case`span`:{let t=e.style,r=n;return t.textDecoration?.includes(`underline`)&&(r=[{t:`u`,c:r}]),t.fontStyle===`italic`&&(r=[{t:`i`,c:r}]),(t.fontWeight===`bold`||t.fontWeight>=`700`)&&(r=[{t:`b`,c:r}]),r}default:return n}}function Rr(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function zr(e){return e.replace(/"/g,`&quot;`).replace(/</g,`&lt;`)}function Br({value:e,onChange:t,placeholder:n,rows:r=4,label:i,required:a,hint:o}){let[s,c]=R(`rich`),l=B(null),u=B(e),[d,f]=R(()=>Nr(jr(e))),p=e=>Nr(jr(e)),m=e=>{let n=Mr(Fr(e));u.current=n,t(n)};z(()=>{if(e===u.current)return;u.current=e;let t=p(e);s===`rich`&&l.current&&(l.current.innerHTML=t),f(t)},[e]),z(()=>{s===`rich`&&l.current&&(l.current.innerHTML=d)},[s]);let h=()=>{if(l.current){let e=l.current.innerHTML;m(e),f(e)}c(`code`)},g=()=>c(`rich`),_=(e,t)=>{l.current?.focus(),document.execCommand(e,!1,t??``),l.current&&m(l.current.innerHTML)},v=()=>{let e=window.prompt(`Enter URL:`);e&&_(`createLink`,e)},y=!e||!jr(e).length;return W(`div`,{children:[i&&W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[i,a&&W(`span`,{class:`text-red-500 ml-0.5`,children:`*`}),o&&W(`span`,{class:`ml-1.5 text-gray-400 font-normal`,children:o})]}),W(`div`,{class:`border border-gray-300 rounded-lg overflow-hidden focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-400 transition-shadow`,children:[W(`div`,{class:`flex items-center border-b border-gray-200 bg-gray-50 min-h-[33px]`,children:[W(`div`,{class:`flex shrink-0 border-r border-gray-200`,children:[W(Vr,{active:s===`rich`,onClick:g,children:`Text`}),W(Vr,{active:s===`code`,onClick:h,icon:W(zt,{size:11}),children:`Code`})]}),s===`rich`&&W(`div`,{class:`flex items-center gap-px px-1.5`,children:[W(Hr,{title:`Bold`,onAct:()=>_(`bold`),children:W(Et,{size:12})}),W(Hr,{title:`Italic`,onAct:()=>_(`italic`),children:W(Yt,{size:12})}),W(Ur,{}),W(Hr,{title:`Bullet list`,onAct:()=>_(`insertUnorderedList`),children:W(en,{size:12})}),W(Hr,{title:`Numbered list`,onAct:()=>_(`insertOrderedList`),children:W($t,{size:12})}),W(Ur,{}),W(Hr,{title:`Add link`,onAct:v,children:W(Qt,{size:12})}),W(Hr,{title:`Remove link`,onAct:()=>_(`unlink`),children:W(On,{size:12})})]})]}),W(`div`,{ref:l,contentEditable:!0,class:`px-3 py-2.5 text-sm text-gray-800 bg-white focus:outline-none prose prose-sm max-w-none ${s===`code`?`hidden`:``}`,style:{minHeight:`${r*1.625}rem`},onInput:()=>l.current&&m(l.current.innerHTML),"data-placeholder":y&&s===`rich`?n??``:``}),s===`code`&&W(`textarea`,{class:`w-full px-3 py-2 text-sm font-mono resize-y focus:outline-none bg-white`,style:{minHeight:`${r*1.625}rem`},value:d,onInput:e=>{let t=e.target.value;f(t),m(t)},placeholder:n,spellcheck:!1})]}),a&&y&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`This field is required`})]})}function Vr({active:e,onClick:t,children:n,icon:r}){return W(`button`,{type:`button`,onClick:t,class:`flex items-center gap-1 text-xs px-3 py-1.5 transition-colors ${e?`bg-white text-gray-800 font-medium border-b-2 border-blue-500 -mb-px`:`text-gray-500 hover:text-gray-700`}`,children:[r,n]})}function Hr({title:e,onAct:t,children:n}){return W(`button`,{type:`button`,title:e,onMouseDown:e=>{e.preventDefault(),t()},class:`p-1 text-gray-500 hover:text-gray-800 hover:bg-gray-200 rounded transition-colors`,children:n})}function Ur(){return W(`div`,{class:`w-px h-3.5 bg-gray-200 mx-0.5`})}function Wr(e){let t=e.trim().toLowerCase();try{if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=new URL(t);return e.port?`${e.hostname}:${e.port}`:e.hostname}}catch{}return t}function Gr(e){let t=e.startsWith(`*.`)?e.slice(2):e;if(/^localhost(:\d{1,5})?$/.test(t))return!0;let[n,r]=t.split(`:`);return r!==void 0&&!/^\d{1,5}$/.test(r)?!1:/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$/.test(n??``)}function Kr(e){return e.split(/[\s,\n]+/).map(Wr).filter(e=>e.length>0)}function qr({value:e,onChange:t,placeholder:n,disabled:r}){let[i,a]=R(``),[o,s]=R(!1),c=n=>{let r=Kr(n);if(r.filter(e=>!Gr(e)).length>0){s(!0);return}s(!1),t([...new Set([...e,...r])]),a(``)},l=n=>t(e.filter(e=>e!==n)),u=e=>{a(e),s(!1)};return W(`div`,{class:`space-y-1`,children:[W(`div`,{class:`flex flex-wrap gap-1.5 border rounded px-3 py-2 min-h-[42px] focus-within:ring-1 transition-colors ${o?`border-red-400 focus-within:ring-red-400`:`border-gray-300 focus-within:ring-blue-500 focus-within:border-blue-500`} ${r?`bg-gray-50`:`bg-white`}`,children:[e.map(e=>W(`span`,{class:`inline-flex items-center gap-1 bg-blue-50 text-blue-700 text-xs px-2 py-0.5 rounded-full border border-blue-200 font-mono`,children:[e,!r&&W(`button`,{type:`button`,onClick:()=>l(e),class:`text-blue-400 hover:text-blue-700 leading-none ml-0.5`,"aria-label":`Remove ${e}`,children:W(Mn,{size:10})})]},e)),!r&&W(`input`,{type:`text`,value:i,class:`outline-none flex-1 min-w-[200px] text-sm bg-transparent`,placeholder:e.length===0?n??`example.com, *.staging.example.com`:``,onInput:e=>u(e.target.value),onKeyDown:n=>{n.key===`Enter`||n.key===`,`?(n.preventDefault(),i.trim()&&c(i)):n.key===`Backspace`&&!i&&e.length>0&&t(e.slice(0,-1))},onBlur:()=>{i.trim()&&c(i)},onPaste:e=>{e.preventDefault();let t=e.clipboardData?.getData(`text`)??``;t.trim()&&c(t)}})]}),o&&W(`p`,{class:`flex items-center gap-1 text-xs text-red-600`,children:[W(It,{size:12}),`Invalid domain. Use `,W(`code`,{class:`font-mono bg-red-50 px-1 rounded`,children:`example.com`}),` or `,W(`code`,{class:`font-mono bg-red-50 px-1 rounded`,children:`*.example.com`}),`. Full URLs are accepted and normalized automatically.`]})]})}var Jr='"use strict";var Consenti=(()=>{var W=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var Ke=Object.prototype.hasOwnProperty;var ce=(i,e)=>()=>(i&&(e=i(i=0)),e);var J=(i,e)=>{for(var t in e)W(i,t,{get:e[t],enumerable:!0})},$e=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of je(e))!Ke.call(i,o)&&o!==t&&W(i,o,{get:()=>e[o],enumerable:!(n=Ue(e,o))||n.enumerable});return i};var qe=i=>$e(W({},"__esModule",{value:!0}),i);var X={};J(X,{signValue:()=>ge,verifyValue:()=>We});async function Fe(i){let e=new TextEncoder().encode(i);return crypto.subtle.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!1,["sign","verify"])}async function ge(i,e){let t=await Fe(e),n=new TextEncoder().encode(i),o=await crypto.subtle.sign("HMAC",t,n);return Array.from(new Uint8Array(o)).map(a=>a.toString(16).padStart(2,"0")).join("")}async function We(i,e,t){return await ge(i,t)===e}var ee=ce(()=>{"use strict"});var te={};J(te,{httpRequest:()=>L});async function L(i,e={},t){let n={"Content-Type":"application/json",...e.headers};t&&(n.Authorization=`Bearer ${t}`);let o=await fetch(i,{...e,headers:n});if(!o.ok)throw new Error(`[Consenti] HTTP ${o.status} ${o.statusText} \\u2014 ${i}`);return o.json()}var I=ce(()=>{"use strict"});var vt={};J(vt,{ConsentScript:()=>$,ConsentiPlugin:()=>j,ConsentiProfile:()=>K,ConsentiSetup:()=>U,CookieTrigger:()=>q});var Z="#consenti-root{position:relative}.consenti-d-none{display:none}:root{--consenti-color-bg: #ffffff;--consenti-color-text: #1a2e4a;--consenti-color-primary: #1565c0;--consenti-color-primary-text: #ffffff;--consenti-color-secondary: #f0f4f8;--consenti-color-secondary-text: #1a2e4a;--consenti-color-border: #dbe4ee;--consenti-color-secondary-border: #1a2e4a;--consenti-color-overlay: rgba(26, 52, 96, 0.55);--consenti-color-accent: #d32f2f;--consenti-color-accent-text: #ffffff;--consenti-font-family: system-ui, -apple-system, sans-serif;--consenti-font-size-base: 14px;--consenti-font-size-heading: 16px;--consenti-font-weight-heading: 600;--consenti-line-height: 1.5;--consenti-spacing-sm: 8px;--consenti-spacing-md: 16px;--consenti-spacing-lg: 24px;--consenti-border-radius: 8px;--consenti-border-radius-btn: 0;--consenti-shadow: 0 4px 24px rgba(21, 101, 192, 0.14);--consenti-toggle-bg-on: #43a047;--consenti-toggle-bg-off: #9ca3af;--consenti-toggle-knob: #ffffff;--consenti-toggle-width: 52px;--consenti-toggle-height: 28px;--consenti-z-banner: 9999;--consenti-z-overlay: 9998;--consenti-z-modal: 10000}.consenti-root--dark{--consenti-color-bg: #1e2535;--consenti-color-text: #e2e8f0;--consenti-color-primary: #4a9eff;--consenti-color-primary-text: #ffffff;--consenti-color-secondary: #2a3447;--consenti-color-secondary-text: #cbd5e1;--consenti-color-border: #374151;--consenti-color-overlay: rgba(0, 0, 0, 0.65);--consenti-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);--consenti-toggle-bg-off: #6b7280}.consenti-overlay{position:fixed;inset:0;background:var(--consenti-color-overlay);z-index:var(--consenti-z-overlay)}.consenti-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--consenti-spacing-sm) var(--consenti-spacing-md);border:none;border-radius:var(--consenti-border-radius-btn);font-family:var(--consenti-font-family);font-size:var(--consenti-font-size-base);font-weight:500;line-height:1;cursor:pointer;text-decoration:none;transition:opacity .15s ease}.consenti-btn:focus-visible{outline:2px solid var(--consenti-color-primary);outline-offset:2px}.consenti-btn:hover{opacity:.9}.consenti-btn--primary{background:var(--consenti-color-primary);color:var(--consenti-color-primary-text)}.consenti-btn--secondary{background:var(--consenti-color-secondary);color:var(--consenti-color-primary);border:1px solid var(--consenti-color-primary)}.consenti-btn--secondary:hover{background:var(--consenti-color-primary);color:var(--consenti-color-secondary);border:1px solid var(--consenti-color-secondary)}.consenti-btn--text{background:rgba(0,0,0,0);color:var(--consenti-color-primary);padding-left:0;padding-right:0;text-decoration:underline;text-underline-offset:4px}.consenti-btn--accent{background:var(--consenti-color-accent);color:var(--consenti-color-accent-text)}.consenti-btn--close{background:rgba(0,0,0,0);color:var(--consenti-color-text);font-size:20px;line-height:1;padding:4px 8px;border-radius:50%}.consenti-btn--close:hover{background:var(--consenti-color-secondary);opacity:1}.consenti-banner{position:fixed;left:0;right:0;z-index:var(--consenti-z-banner);background:var(--consenti-color-bg);color:var(--consenti-color-text);font-family:var(--consenti-font-family);font-size:var(--consenti-font-size-base);line-height:var(--consenti-line-height);box-shadow:var(--consenti-shadow);padding:var(--consenti-spacing-lg);display:flex;flex-wrap:wrap;align-items:center;gap:var(--consenti-spacing-md)}.consenti-banner--top{top:0;border-bottom:1px solid var(--consenti-color-border)}@media(prefers-reduced-motion: no-preference){.consenti-banner--top{animation:consenti-slide-down .2s ease-out}}.consenti-banner--bottom{bottom:0;border-top:1px solid var(--consenti-color-border)}@media(prefers-reduced-motion: no-preference){.consenti-banner--bottom{animation:consenti-slide-up .2s ease-out}}.consenti-banner--middle{top:50%;transform:translateY(-50%);left:50%;right:auto;transform:translate(-50%, -50%);width:min(600px,90vw);border-radius:var(--consenti-border-radius)}.consenti-banner--left-bottom{bottom:var(--consenti-spacing-lg);left:var(--consenti-spacing-lg);right:auto;width:min(400px,90vw);border-radius:var(--consenti-border-radius)}.consenti-banner--right-bottom{bottom:var(--consenti-spacing-lg);right:var(--consenti-spacing-lg);left:auto;width:min(400px,90vw);border-radius:var(--consenti-border-radius)}.consenti-banner__text-container{flex:1;min-width:500px}.consenti-banner__heading{font-size:var(--consenti-font-size-heading);font-weight:var(--consenti-font-weight-heading);margin:0 0 var(--consenti-spacing-sm);width:100%}.consenti-banner__text{margin:0}.consenti-banner__links{display:flex;flex-wrap:wrap;gap:var(--consenti-spacing-sm);margin-top:var(--consenti-spacing-sm)}.consenti-banner__link{font-size:.85em}.consenti-banner__controls{position:absolute;top:var(--consenti-spacing-sm);right:var(--consenti-spacing-sm);display:flex;align-items:center;gap:4px}.consenti-banner__buttons{display:flex;flex-wrap:wrap;gap:var(--consenti-spacing-sm);align-items:center;margin-block:var(--consenti-spacing-md)}.consenti-banner__powered-by{position:absolute;right:10px;bottom:2px;opacity:.2;color:var(--consenti-color-primary)}@media(max-width: 576px){.consenti-banner{padding:var(--consenti-spacing-md);gap:var(--consenti-spacing-sm)}.consenti-banner--left-bottom,.consenti-banner--right-bottom{left:0;right:0;bottom:0;width:100%;border-radius:0;border-top:1px solid var(--consenti-color-border)}.consenti-banner--middle{width:95vw}.consenti-banner__buttons{width:100%;flex-direction:row;align-items:stretch;margin-bottom:var(--consenti-spacing-md)}.consenti-banner__text-container{min-width:0;width:100%}}@keyframes consenti-slide-up{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes consenti-slide-down{from{transform:translateY(-100%)}to{transform:translateY(0)}}.consenti-modal{position:fixed;inset:0;z-index:var(--consenti-z-modal);display:flex;font-family:var(--consenti-font-family);font-size:var(--consenti-font-size-base);color:var(--consenti-color-text);line-height:var(--consenti-line-height)}.consenti-modal--passthrough{pointer-events:none}.consenti-modal--passthrough .consenti-modal__container{pointer-events:auto}.consenti-modal--center{align-items:center;justify-content:center}.consenti-modal--left{align-items:stretch;justify-content:flex-start}.consenti-modal--left .consenti-modal__container{border-radius:0 var(--consenti-border-radius) var(--consenti-border-radius) 0;height:100%;max-height:100vh}.consenti-modal--right{align-items:stretch;justify-content:flex-end}.consenti-modal--right .consenti-modal__container{border-radius:0;height:100%;max-height:100vh}.consenti-modal--fullscreen{align-items:flex-start;justify-content:flex-start}.consenti-modal--fullscreen .consenti-modal__container{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;margin:0}.consenti-modal__overlay{position:absolute;inset:0;background:var(--consenti-color-overlay)}.consenti-modal__container{position:relative;z-index:1;background:var(--consenti-color-bg);border-radius:var(--consenti-border-radius);box-shadow:var(--consenti-shadow);width:min(560px,90vw);max-height:85vh;display:flex;flex-direction:column;overflow:hidden}@media(prefers-reduced-motion: no-preference){.consenti-modal__container{animation:consenti-fade-in .15s ease-out}}.consenti-modal__header{display:flex;justify-content:space-between;padding:var(--consenti-spacing-md) var(--consenti-spacing-lg);border-bottom:1px solid var(--consenti-color-border);flex-shrink:0;position:relative;flex-direction:column}.consenti-modal__heading{font-size:var(--consenti-font-size-heading);font-weight:var(--consenti-font-weight-heading);margin:0;flex:1}.consenti-modal__header-controls{display:flex;align-items:center;gap:4px;flex-shrink:0;position:absolute;right:15px;top:10px}.consenti-modal__close{flex-shrink:0}.consenti-modal__links{display:flex;flex-wrap:wrap;gap:var(--consenti-spacing-sm);padding:var(--consenti-spacing-sm) var(--consenti-spacing-lg)}.consenti-modal__link{font-size:.85em;text-decoration:underline;text-underline-offset:2px}.consenti-modal__subheading{padding-top:var(--consenti-spacing-sm);margin:0;color:#6b7280;font-size:13px}.consenti-modal__text{padding:var(--consenti-spacing-sm) 0}.consenti-modal__body{overflow-y:auto;flex:1;padding:var(--consenti-spacing-sm) var(--consenti-spacing-lg);position:relative}.consenti-modal__categories{display:flex;flex-direction:column;gap:var(--consenti-spacing-md);padding:var(--consenti-spacing-md) 0}.consenti-modal__buttons{display:flex;flex-wrap:wrap;gap:var(--consenti-spacing-sm);padding:var(--consenti-spacing-md);border-top:1px solid var(--consenti-color-border);flex-shrink:0}.consenti-modal__receipt-option{padding-top:var(--consenti-spacing-md);border-top:1px solid var(--consenti-color-border);flex-shrink:0}.consenti-modal__receipt-label{display:flex;align-items:center;gap:var(--consenti-spacing-sm);font-size:var(--consenti-font-size-base);cursor:pointer}.consenti-modal__receipt-checkbox{width:16px;height:16px;flex-shrink:0;cursor:pointer}.consenti-modal__receipt-desc{margin:4px 0 0 24px;font-size:12px;color:#6b7280}.consenti-modal__powered-by{opacity:.5;color:var(--consenti-color-primary)}@keyframes consenti-fade-in{from{opacity:0;transform:scale(0.97)}to{opacity:1;transform:scale(1)}}.consenti-category{padding:var(--consenti-spacing-md) 0;border-bottom:1px solid var(--consenti-color-border)}.consenti-category:last-child{border-bottom:none}.consenti-category--mandatory .consenti-category__toggle{opacity:.6;cursor:default}.consenti-category__header{display:flex;align-items:center;justify-content:space-between;gap:var(--consenti-spacing-md);margin-bottom:var(--consenti-spacing-sm)}.consenti-category__heading{font-size:var(--consenti-font-size-heading);font-weight:var(--consenti-font-weight-heading);margin:0}.consenti-category__text{color:#949dab;font-size:13px;margin:0}.consenti-category__li-desc{margin:var(--consenti-spacing-sm) 0 0;font-size:12px;color:#6b7280;font-style:italic}.consenti-category__toggle{flex-shrink:0;position:relative;width:var(--consenti-toggle-width);height:var(--consenti-toggle-height);border-radius:calc(var(--consenti-toggle-height)/2);background:var(--consenti-toggle-bg-off);border:none;cursor:pointer;transition:background .2s ease;padding:0}.consenti-category__toggle:focus-visible{outline:2px solid var(--consenti-color-primary);outline-offset:2px}.consenti-category__toggle[aria-checked=true]{background:var(--consenti-toggle-bg-on)}.consenti-category__toggle--mandatory{cursor:default}.consenti-category__toggle-icon{position:absolute;top:50%;transform:translateY(-50%);width:10px;height:10px;display:flex;align-items:center;justify-content:center;pointer-events:none;transition:opacity .15s ease;color:hsla(0,0%,100%,.9)}.consenti-category__toggle-icon svg{width:10px;height:10px;overflow:visible}.consenti-category__toggle-icon--check{left:8px;opacity:0}[aria-checked=true] .consenti-category__toggle-icon--check{opacity:1}.consenti-category__toggle-icon--cross{right:8px;opacity:1}[aria-checked=true] .consenti-category__toggle-icon--cross{opacity:0}.consenti-category__toggle-knob{position:absolute;top:2px;left:2px;width:calc(var(--consenti-toggle-height) - 4px);height:calc(var(--consenti-toggle-height) - 4px);border-radius:50%;background:var(--consenti-toggle-knob);transition:transform .2s ease;display:block}[aria-checked=true] .consenti-category__toggle-knob{transform:translateX(calc(var(--consenti-toggle-width) - var(--consenti-toggle-height)))}.consenti-locale-switcher{position:relative;display:inline-flex}.consenti-locale-switcher__btn{font-size:1rem;line-height:1;cursor:pointer}.consenti-locale-switcher__list{position:absolute;top:calc(100% + 4px);right:0;z-index:calc(var(--consenti-z-modal) + 1);background:var(--consenti-color-bg);border:1px solid var(--consenti-color-border);border-radius:var(--consenti-border-radius);box-shadow:var(--consenti-shadow);list-style:none;margin:0;padding:4px 0;min-width:80px}.consenti-locale-switcher__list li{display:block}.consenti-locale-switcher__option{display:block;width:100%;padding:6px 12px;text-align:left;font-size:var(--consenti-font-size-base);color:var(--consenti-color-text);background:none;border:none;cursor:pointer}.consenti-locale-switcher__option:hover{background:var(--consenti-color-secondary)}.consenti-locale-switcher__option--active{font-weight:600;color:var(--consenti-color-primary)}.consenti-locale-switcher--modal .consenti-locale-switcher__list{right:0}";var l=()=>typeof window<"u"&&typeof document<"u",le=()=>l()?window:null;var pe=()=>l()&&typeof navigator<"u"?navigator:null;var A=["error"];function de(i){A=i}var b={info:(...i)=>{A.includes("info")&&console.info("[Consenti]",...i)},log:(...i)=>{A.includes("log")&&console.log("[Consenti]",...i)},warn:(...i)=>{A.includes("warning")&&console.warn("[Consenti]",...i)},error:(...i)=>{A.includes("error")&&console.error("[Consenti]",...i)}};var E=class{constructor(){this.channel=null}get isSupported(){return l()&&typeof BroadcastChannel<"u"}connect(e){this.isSupported&&(this.onMessageCallback=e,this.channel=new BroadcastChannel("consenti"),this.channel.onmessage=t=>{t.data?.type&&e(t.data)},this.channel.onmessageerror=()=>{b.warn("BroadcastChannel message error \\u2014 ignoring")})}send(e){this.channel?.postMessage(e)}disconnect(){this.channel?.close(),this.channel=null,this.onMessageCallback=void 0}};function ue(i){let e={version:"1.0",issuedAt:new Date().toISOString(),visitorId:i.visitorId,profileId:i.profileId,profileVersion:i.profileVersion,locale:i.locale,consent:i.consent};return i.signature&&(e.signature=i.signature),e}function me(i){if(typeof window>"u"||typeof document>"u")return;let e=JSON.stringify(i,null,2),t=new Blob([e],{type:"application/json"}),n=URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download=`consenti-receipt-${i.issuedAt.slice(0,10)}.json`,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(n),1e3)}function ye(i){if(!l())return null;let e=document.cookie.match(new RegExp(`(?:^|;\\\\s*)${Ye(i)}=([^;]*)`));return e?decodeURIComponent(e[1]??""):null}function Q(i,e,t={}){if(!l())return;let n=t.secure??(typeof window<"u"&&typeof window.location<"u"&&window.location.protocol==="https:"),o=[`${encodeURIComponent(i)}=${encodeURIComponent(e)}`,`Path=${t.path??"/"}`,`SameSite=${t.sameSite??"Lax"}`,t.maxAge!=null?`Max-Age=${t.maxAge}`:"",n?"Secure":"",t.domain?`Domain=${t.domain}`:""];document.cookie=o.filter(Boolean).join("; ")}function fe(i,e={}){Q(i,"",{...e,maxAge:0})}function Ye(i){return i.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}var D=class{constructor(e){this.mode=e;e==="localStorage"&&l()&&typeof localStorage>"u"&&(b.warn("localStorage is not available, falling back to cookie storage"),this.mode="cookie")}read(e){return l()?this.mode==="localStorage"?localStorage.getItem(e):ye(e):null}write(e,t,n={}){l()&&(this.mode==="localStorage"?localStorage.setItem(e,t):Q(e,t,n))}remove(e,t={}){l()&&(this.mode==="localStorage"?localStorage.removeItem(e):fe(e,t))}};function Je(i){return i.map(t=>t.expiry??365).reduce((t,n)=>Math.min(t,n),365)*24*60*60}var be="consenti";function Ze(i,e){return`${be}_${i}_${e}`}function he(i){let e=Math.floor(Date.now()/1e3),t=Object.entries(i).map(([n,o])=>`${n}:${o}`).join("|");return`t:${e}::${t}`}function ve(i){let e=i.split("::");if(e.length<2)return null;let t=e[0]??"",n;if(t.startsWith("t:")){let c=t.slice(2),u=parseInt(c,10);if(!c||isNaN(u))return null;n=new Date(u*1e3).toISOString()}else if(t.startsWith("ConsentTimestamp:")){if(n=t.replace("ConsentTimestamp:",""),!n)return null}else return null;let o=e[1]??"",a=e[2],r={};for(let c of o.split("|")){let u=c.indexOf(":");if(u===-1)return null;let d=c.slice(0,u),f=c.slice(u+1);if(!d||f!=="granted"&&f!=="denied"&&f!=="objected")return null;r[d]=f}let s={timestamp:n,consent:r};return a?.startsWith("sig:")&&(s.signature=a.slice(4)),s}var T=class i{constructor(e,t,n,o){this.userId=e;this.profileId=t;this.cookieDomains=o;this.cachedConsent=null;this.cachedTimestamp=null;this.cookies=[];this.storage=new D(n)}setProfileCookies(e){this.cookies=e}get cookieName(){return Ze(this.userId,this.profileId)}read(){let e=this.storage.read(this.cookieName);if(!e)return null;let t=ve(e);return t&&(this.cachedConsent=t.consent,this.cachedTimestamp=t.timestamp),t}async readAndVerify(e){let t=this.storage.read(this.cookieName);if(!t)return null;let n=t.split("::");if(n.length<2)return null;let o=ve(t);if(!o)return null;if(n.length===3&&(n[2]??"").startsWith("sig:")){let{verifyValue:r}=await Promise.resolve().then(()=>(ee(),X)),s=(n[0]??"")+"::"+(n[1]??""),c=(n[2]??"").slice(4);if(!await r(s,c,e))return b.warn("Cookie signature mismatch \\u2014 consent cleared and banner will re-appear"),this.delete(),null}return this.cachedConsent=o.consent,this.cachedTimestamp=o.timestamp,o}write(e,t){let n=he(e);t&&(n=`${n}::sig:${t}`);let o=this.buildCookieOpts();this.storage.write(this.cookieName,n,o),this.cachedConsent=e,this.cachedTimestamp=new Date().toISOString()}async writeAndSign(e,t){let{signValue:n}=await Promise.resolve().then(()=>(ee(),X)),o=he(e),a=await n(o,t),r=`${o}::sig:${a}`,s=this.buildCookieOpts();return this.storage.write(this.cookieName,r,s),this.cachedConsent=e,this.cachedTimestamp=new Date().toISOString(),a}delete(){let e=this.buildCookieOpts();this.storage.remove(this.cookieName,e),this.cachedConsent=null,this.cachedTimestamp=null}hasConsent(){return this.cachedConsent?!0:this.read()!==null}getConsent(){return this.cachedConsent?this.cachedConsent:this.read()?.consent??null}getConsentDate(){if(this.cachedTimestamp)return new Date(this.cachedTimestamp);let e=this.read();return e?new Date(e.timestamp):!1}setInMemory(e){this.cachedConsent=e,this.cachedTimestamp=new Date().toISOString()}clearInMemory(){this.cachedConsent=null,this.cachedTimestamp=null}static getOrCreateUserId(e,t){if(typeof document>"u")return crypto.randomUUID();let n=`${be}_`,o=`_${e}`,a=t==="localStorage"?i._localStorageKeys():i._cookieNames();for(let r of a)if(r.startsWith(n)&&r.endsWith(o)){let s=r.slice(n.length,r.length-o.length);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s))return s}return crypto.randomUUID()}static _cookieNames(){return document.cookie.split(";").map(e=>e.split("=")[0]?.trim()??"")}static _localStorageKeys(){return typeof localStorage>"u"?[]:Object.keys(localStorage)}buildCookieOpts(){let e={path:"/",sameSite:"Lax",maxAge:this.cookies.length>0?Je(this.cookies):31536e3};if(this.cookieDomains){let t=this.cookieDomains.split(",")[0]?.trim();t&&(e.domain=t)}return e}};var R=class{constructor(e,t){this.profileId=e;this.gtmConfig=t}dispatch(e,t={}){if(!l())return;let n=new CustomEvent(e,{detail:t,bubbles:!0});window.dispatchEvent(n),this.pushToGTM(e,t)}pushToGTM(e,t){let n=this.gtmConfig;if(!n)return;let o=le();if(!o)return;let a=n.dataLayer??"dataLayer",r=o[a];if(!(!Array.isArray(r)||!(!n.events||n.events.length===0||n.events.includes(e)))&&(r.push({event:e,consenti:{profileId:this.profileId,consent:t.consent,consentId:t.consentId,consentAction:t.consentAction}}),e==="consenti:consentSubmitted"&&this.hasGtag(o)&&(n.urlPassthrough&&r.push({url_passthrough:!0}),n.adsDataRedaction))){let c=t.consent?.ad_storage!=="granted";r.push({ads_data_redaction:c})}}hasGtag(e){return typeof e.gtag=="function"||typeof e.google_tag_manager<"u"}};I();function Ce(i,e,t){let n=i[t];if(!n)throw new Error(`[Consenti] No translations found for defaultLocale "${t}"`);if(i[e])return x(n,i[e]);let o=e.split("-")[0]??"";return o!==e&&i[o]?x(n,i[o]):n}function x(i,e){let t={...i};for(let n in e){let o=e[n];if(o==null)continue;let a=t[n];typeof o=="object"&&!Array.isArray(o)&&typeof a=="object"&&a!==null&&!Array.isArray(a)?t[n]=x(a,o):t[n]=o}return t}function ne(){return{tz:Intl.DateTimeFormat().resolvedOptions().timeZone,lang:navigator.language,langs:Array.from(navigator.languages)}}var we=["opt-in","opt-out","opt-out-strict","opt-in-dpdpa","opt-in-china","opt-in-brazil","general-privacy-consent","notice-only"];var B={version:"2026-07",countries:{AT:{name:"Austria",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Austria (GDPR)",locales:["de-AT"]},BE:{name:"Belgium",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Belgium (GDPR)",locales:["nl-BE","fr-BE"]},BG:{name:"Bulgaria",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Bulgaria (GDPR)",locales:["bg-BG"]},HR:{name:"Croatia",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Croatia (GDPR)",locales:["hr-HR"]},CY:{name:"Cyprus",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Cyprus (GDPR)",locales:["el-CY"]},CZ:{name:"Czechia",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Czechia (GDPR)",locales:["cs-CZ"]},DK:{name:"Denmark",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Denmark (GDPR)",locales:["da-DK"]},EE:{name:"Estonia",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Estonia (GDPR)",locales:["et-EE"]},FI:{name:"Finland",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Finland (GDPR)",locales:["fi-FI"]},FR:{name:"France",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"France (GDPR)",locales:["fr-FR"]},DE:{name:"Germany",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Germany (GDPR)",locales:["de-DE"]},GR:{name:"Greece",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Greece (GDPR)",locales:["el-GR"]},HU:{name:"Hungary",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Hungary (GDPR)",locales:["hu-HU"]},IE:{name:"Ireland",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Ireland (GDPR)",locales:["en"]},IT:{name:"Italy",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Italy (GDPR)",locales:["it-IT"]},LV:{name:"Latvia",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Latvia (GDPR)",locales:["lv-LV"]},LT:{name:"Lithuania",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Lithuania (GDPR)",locales:["lt-LT"]},LU:{name:"Luxembourg",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Luxembourg (GDPR)",locales:["fr-LU","de-LU"]},MT:{name:"Malta",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Malta (GDPR)",locales:["mt-MT","en"]},NL:{name:"Netherlands",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Netherlands (GDPR)",locales:["nl-NL"]},PL:{name:"Poland",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Poland (GDPR)",locales:["pl-PL"]},PT:{name:"Portugal",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Portugal (GDPR)",locales:["pt-PT"]},RO:{name:"Romania",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Romania (GDPR)",locales:["ro-RO"]},SK:{name:"Slovakia",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Slovakia (GDPR)",locales:["sk-SK"]},SI:{name:"Slovenia",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Slovenia (GDPR)",locales:["sl-SI"]},ES:{name:"Spain",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Spain (GDPR)",locales:["es-ES"]},SE:{name:"Sweden",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Sweden (GDPR)",locales:["sv-SE"]},IS:{name:"Iceland",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Iceland (GDPR via EEA)",locales:["is-IS"]},LI:{name:"Liechtenstein",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Liechtenstein (GDPR via EEA)",locales:["de-LI"]},NO:{name:"Norway",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Norway (GDPR via EEA)",locales:["nb-NO"]},AD:{name:"Andorra",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Andorra (GDPR-aligned)",locales:["ca-AD"]},AL:{name:"Albania",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Albania (GDPR-aligned)",locales:["sq-AL"]},BA:{name:"Bosnia and Herzegovina",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Bosnia and Herzegovina (GDPR-aligned)",locales:["bs-BA","sr-Latn-BA"]},GG:{name:"Guernsey",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Guernsey (DPA based on GDPR)",locales:["en"]},GI:{name:"Gibraltar",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Gibraltar (DPA based on UK GDPR)",locales:["en"]},GL:{name:"Greenland",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Greenland (Danish GDPR implementation)",locales:["da-GL"]},MC:{name:"Monaco",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Monaco (GDPR-aligned)",locales:["fr-MC"]},ME:{name:"Montenegro",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Montenegro (GDPR-aligned)",locales:["sr-Latn-ME"]},MK:{name:"North Macedonia",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"North Macedonia (GDPR-aligned)",locales:["mk-MK"]},RS:{name:"Serbia",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Serbia (GDPR-aligned)",locales:["sr-RS"]},SM:{name:"San Marino",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"San Marino (GDPR-aligned)",locales:["it-SM"]},TR:{name:"T\\xFCrkiye",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"T\\xFCrkiye (KVKK)",locales:["tr-TR"]},CA:{name:"Canada",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Canada (PIPEDA / Law 25)",locales:["en","fr-CA"],overriddenRegions:{QC:{name:"Quebec",type:"region",complianceGroup:"opt-in",description:"Quebec \\u2014 Law 25 (GDPR-style opt-in)"}}},US:{name:"United States",type:"country",complianceGroup:"opt-out",default:"opt-out-strict",description:"United States \\u2014 opt-out-strict (CPRA) used when state cannot be detected",locales:["en","es-US"],overriddenRegions:{CA:{name:"California",type:"region",complianceGroup:"opt-out-strict",description:"California \\u2014 CPRA/CCPA"},VA:{name:"Virginia",type:"region",complianceGroup:"opt-out",description:"Virginia \\u2014 VCDPA"},CO:{name:"Colorado",type:"region",complianceGroup:"opt-out",description:"Colorado \\u2014 CPA"},CT:{name:"Connecticut",type:"region",complianceGroup:"opt-out",description:"Connecticut \\u2014 CTDPA"},UT:{name:"Utah",type:"region",complianceGroup:"opt-out",description:"Utah \\u2014 UCPA"},TX:{name:"Texas",type:"region",complianceGroup:"opt-out",description:"Texas \\u2014 TDPSA"},DE:{name:"Delaware",type:"region",complianceGroup:"opt-out",description:"Delaware \\u2014 DPDPA"},NJ:{name:"New Jersey",type:"region",complianceGroup:"opt-out",description:"New Jersey \\u2014 NJDPA"},OR:{name:"Oregon",type:"region",complianceGroup:"opt-out",description:"Oregon \\u2014 OCPA"},MN:{name:"Minnesota",type:"region",complianceGroup:"opt-out",description:"Minnesota \\u2014 MCDPA"},MD:{name:"Maryland",type:"region",complianceGroup:"opt-out",description:"Maryland \\u2014 MODPA"},KY:{name:"Kentucky",type:"region",complianceGroup:"opt-out",description:"Kentucky \\u2014 KCDPA"},TN:{name:"Tennessee",type:"region",complianceGroup:"opt-out",description:"Tennessee \\u2014 TIPA"},NE:{name:"Nebraska",type:"region",complianceGroup:"opt-out",description:"Nebraska \\u2014 NDPA"},IA:{name:"Iowa",type:"region",complianceGroup:"opt-out",description:"Iowa \\u2014 ICDPA"},IN:{name:"Indiana",type:"region",complianceGroup:"opt-out",description:"Indiana \\u2014 ICDPA"},MT:{name:"Montana",type:"region",complianceGroup:"opt-out",description:"Montana \\u2014 MCDPA"},NH:{name:"New Hampshire",type:"region",complianceGroup:"opt-out",description:"New Hampshire \\u2014 NHPA"},RI:{name:"Rhode Island",type:"region",complianceGroup:"opt-out",description:"Rhode Island \\u2014 RIDTPA"}}},AR:{name:"Argentina",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Argentina (LPDP)",locales:["es-AR"]},BO:{name:"Bolivia",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Bolivia",locales:["es-BO"]},BR:{name:"Brazil",type:"country",complianceGroup:"opt-in-brazil",default:"opt-in-brazil",description:"Brazil (LGPD)",locales:["pt-BR"]},CL:{name:"Chile",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Chile (Law 19.628)",locales:["es-CL"]},CO:{name:"Colombia",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Colombia (Law 1581)",locales:["es-CO"]},CR:{name:"Costa Rica",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Costa Rica (LPDP)",locales:["es-CR"]},DO:{name:"Dominican Republic",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Dominican Republic",locales:["es-DO"]},EC:{name:"Ecuador",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Ecuador (LOPDP)",locales:["es-EC"]},GF:{name:"French Guiana",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"French Guiana",locales:["fr-GF"]},GT:{name:"Guatemala",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Guatemala",locales:["es-GT"]},GY:{name:"Guyana",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Guyana",locales:["en"]},HN:{name:"Honduras",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Honduras",locales:["es-HN"]},HT:{name:"Haiti",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Haiti",locales:["fr-HT"]},JM:{name:"Jamaica",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Jamaica",locales:["en"]},MX:{name:"Mexico",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Mexico (LFPDPPP)",locales:["es-MX"]},NI:{name:"Nicaragua",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Nicaragua",locales:["es-NI"]},PA:{name:"Panama",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Panama",locales:["es-PA"]},PE:{name:"Peru",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Peru (LPDP)",locales:["es-PE"]},PY:{name:"Paraguay",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Paraguay",locales:["es-PY"]},SR:{name:"Suriname",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Suriname",locales:["nl-SR"]},SV:{name:"El Salvador",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"El Salvador",locales:["es-SV"]},TT:{name:"Trinidad and Tobago",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Trinidad and Tobago",locales:["en"]},UY:{name:"Uruguay",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Uruguay (Law 18.331)",locales:["es-UY"]},VE:{name:"Venezuela",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Venezuela",locales:["es-VE"]},AG:{name:"Antigua and Barbuda",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Antigua and Barbuda",locales:["en"]},BB:{name:"Barbados",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Barbados",locales:["en"]},BL:{name:"Saint Barth\\xE9lemy",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Saint Barth\\xE9lemy",locales:["fr-BL"]},BM:{name:"Bermuda",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Bermuda",locales:["en"]},BS:{name:"Bahamas",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Bahamas",locales:["en"]},CU:{name:"Cuba",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Cuba",locales:["es-CU"]},DM:{name:"Dominica",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Dominica",locales:["en"]},GD:{name:"Grenada",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Grenada",locales:["en"]},KN:{name:"Saint Kitts and Nevis",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Saint Kitts and Nevis",locales:["en"]},LC:{name:"Saint Lucia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Saint Lucia",locales:["en"]},PM:{name:"Saint Pierre and Miquelon",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Saint Pierre and Miquelon",locales:["fr-PM"]},PR:{name:"Puerto Rico",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Puerto Rico",locales:["es-PR","en"]},VC:{name:"Saint Vincent and the Grenadines",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Saint Vincent and the Grenadines",locales:["en"]},IN:{name:"India",type:"country",complianceGroup:"opt-in-dpdpa",default:"opt-in-dpdpa",description:"India (DPDPA)",locales:["hi-IN","en","bn-IN","ta-IN"]},CN:{name:"China",type:"country",complianceGroup:"opt-in-china",default:"opt-in-china",description:"China (PIPL + DSL + CSL)",locales:["zh-CN"]},BN:{name:"Brunei",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Brunei (Personal Data Protection Order)",locales:["ms-BN","en"]},ID:{name:"Indonesia",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Indonesia (PDP Law)",locales:["id-ID"]},KH:{name:"Cambodia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Cambodia",locales:["km-KH"]},LA:{name:"Laos",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Laos",locales:["lo-LA"]},MM:{name:"Myanmar",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Myanmar",locales:["my-MM"]},MY:{name:"Malaysia",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Malaysia (PDPA)",locales:["ms-MY","zh-MY","en"]},PH:{name:"Philippines",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Philippines (DPA)",locales:["fil-PH","en"]},SG:{name:"Singapore",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Singapore (PDPA)",locales:["zh-SG","ms-SG","ta-SG","en"]},TH:{name:"Thailand",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Thailand (PDPA \\u2014 GDPR-style opt-in)",locales:["th-TH"]},TL:{name:"Timor-Leste",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Timor-Leste",locales:["pt-TL"]},VN:{name:"Vietnam",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Vietnam (PDPD)",locales:["vi-VN"]},HK:{name:"Hong Kong",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Hong Kong SAR (PDPO)",locales:["zh-HK"]},JP:{name:"Japan",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Japan (APPI)",locales:["ja-JP"]},KP:{name:"North Korea",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"North Korea",locales:["ko-KP"]},KR:{name:"South Korea",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"South Korea (PIPA)",locales:["ko-KR"]},MN:{name:"Mongolia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Mongolia",locales:["mn-MN"]},MO:{name:"Macau",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Macau SAR (PDPA)",locales:["zh-MO","pt-MO"]},TW:{name:"Taiwan",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Taiwan (PDPL)",locales:["zh-TW"]},AF:{name:"Afghanistan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Afghanistan",locales:["fa-AF"]},BD:{name:"Bangladesh",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Bangladesh",locales:["bn-BD"]},BT:{name:"Bhutan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Bhutan",locales:["dz-BT"]},IO:{name:"British Indian Ocean Territory",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"British Indian Ocean Territory",locales:["en"]},LK:{name:"Sri Lanka",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Sri Lanka",locales:["si-LK","ta-LK"]},MV:{name:"Maldives",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Maldives",locales:["dv-MV"]},NP:{name:"Nepal",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Nepal",locales:["ne-NP"]},PK:{name:"Pakistan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Pakistan",locales:["ur-PK","en"]},AM:{name:"Armenia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Armenia",locales:["hy-AM"]},AZ:{name:"Azerbaijan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Azerbaijan",locales:["az-AZ"]},GE:{name:"Georgia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Georgia",locales:["ka-GE"]},KG:{name:"Kyrgyzstan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Kyrgyzstan",locales:["ky-KG","ru-KG"]},KZ:{name:"Kazakhstan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Kazakhstan",locales:["kk-KZ","ru-KZ"]},TJ:{name:"Tajikistan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Tajikistan",locales:["tg-TJ"]},TM:{name:"Turkmenistan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Turkmenistan",locales:["tk-TM"]},UZ:{name:"Uzbekistan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Uzbekistan",locales:["uz-UZ"]},AE:{name:"United Arab Emirates",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"United Arab Emirates (UAE PDPL / DIFC DPL / ADGM DPR)",locales:["ar-AE"]},BH:{name:"Bahrain",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Bahrain (PDPL)",locales:["ar-BH"]},IL:{name:"Israel",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Israel (Privacy Protection Law)",locales:["he-IL","ar-IL"]},IQ:{name:"Iraq",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Iraq",locales:["ar-IQ"]},IR:{name:"Iran",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Iran",locales:["fa-IR"]},JO:{name:"Jordan",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Jordan",locales:["ar-JO"]},KW:{name:"Kuwait",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Kuwait",locales:["ar-KW"]},LB:{name:"Lebanon",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Lebanon",locales:["ar-LB"]},OM:{name:"Oman",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Oman (PDPL)",locales:["ar-OM"]},PS:{name:"Palestine",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Palestine",locales:["ar-PS"]},QA:{name:"Qatar",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Qatar (PDPL)",locales:["ar-QA"]},SA:{name:"Saudi Arabia",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Saudi Arabia (PDPL)",locales:["ar-SA"]},SY:{name:"Syria",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Syria",locales:["ar-SY"]},YE:{name:"Yemen",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Yemen",locales:["ar-YE"]},BF:{name:"Burkina Faso",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Burkina Faso",locales:["fr-BF"]},BJ:{name:"Benin",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Benin",locales:["fr-BJ"]},CI:{name:"C\\xF4te d\'Ivoire",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"C\\xF4te d\'Ivoire",locales:["fr-CI"]},CM:{name:"Cameroon",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Cameroon",locales:["fr-CM","en"]},CV:{name:"Cabo Verde",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Cabo Verde",locales:["pt-CV"]},GA:{name:"Gabon",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Gabon",locales:["fr-GA"]},GH:{name:"Ghana",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Ghana (DPA)",locales:["en"]},GM:{name:"Gambia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Gambia",locales:["en"]},GN:{name:"Guinea",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Guinea",locales:["fr-GN"]},GQ:{name:"Equatorial Guinea",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Equatorial Guinea",locales:["es-GQ","fr-GQ"]},GW:{name:"Guinea-Bissau",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Guinea-Bissau",locales:["pt-GW"]},LR:{name:"Liberia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Liberia",locales:["en"]},ML:{name:"Mali",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Mali",locales:["fr-ML"]},MR:{name:"Mauritania",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Mauritania",locales:["ar-MR"]},NE:{name:"Niger",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Niger",locales:["fr-NE"]},NG:{name:"Nigeria",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Nigeria (NDPA)",locales:["en"]},SL:{name:"Sierra Leone",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Sierra Leone",locales:["en"]},SN:{name:"Senegal",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Senegal",locales:["fr-SN"]},TG:{name:"Togo",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Togo",locales:["fr-TG"]},BI:{name:"Burundi",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Burundi",locales:["fr-BI"]},DJ:{name:"Djibouti",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Djibouti",locales:["fr-DJ","ar-DJ"]},ER:{name:"Eritrea",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Eritrea",locales:["ti-ER"]},ET:{name:"Ethiopia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Ethiopia",locales:["am-ET"]},KE:{name:"Kenya",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Kenya (DPA)",locales:["sw-KE","en"]},KM:{name:"Comoros",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Comoros",locales:["ar-KM","fr-KM"]},MG:{name:"Madagascar",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Madagascar",locales:["fr-MG"]},MU:{name:"Mauritius",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Mauritius (DPA)",locales:["en","fr-MU"]},MW:{name:"Malawi",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Malawi",locales:["en"]},MZ:{name:"Mozambique",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Mozambique",locales:["pt-MZ"]},RW:{name:"Rwanda",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Rwanda (DPA)",locales:["rw-RW","en"]},SC:{name:"Seychelles",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Seychelles",locales:["fr-SC","en"]},SO:{name:"Somalia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Somalia",locales:["so-SO"]},SS:{name:"South Sudan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"South Sudan",locales:["en"]},ST:{name:"S\\xE3o Tom\\xE9 and Pr\\xEDncipe",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"S\\xE3o Tom\\xE9 and Pr\\xEDncipe",locales:["pt-ST"]},TZ:{name:"Tanzania",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Tanzania",locales:["sw-TZ","en"]},UG:{name:"Uganda",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Uganda (DPA)",locales:["en"]},AO:{name:"Angola",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Angola",locales:["pt-AO"]},BW:{name:"Botswana",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Botswana (DPA)",locales:["en"]},LS:{name:"Lesotho",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Lesotho",locales:["en"]},NA:{name:"Namibia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Namibia",locales:["en"]},SZ:{name:"Eswatini",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Eswatini",locales:["en"]},ZA:{name:"South Africa",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"South Africa (POPIA)",locales:["en","af-ZA"]},ZM:{name:"Zambia",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Zambia (DPA)",locales:["en"]},ZW:{name:"Zimbabwe",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Zimbabwe (DPA)",locales:["en"]},DZ:{name:"Algeria",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Algeria",locales:["ar-DZ","fr-DZ"]},EG:{name:"Egypt",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Egypt (DPA)",locales:["ar-EG"]},LY:{name:"Libya",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Libya",locales:["ar-LY"]},MA:{name:"Morocco",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Morocco",locales:["ar-MA","fr-MA"]},SD:{name:"Sudan",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Sudan",locales:["ar-SD"]},TN:{name:"Tunisia",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Tunisia (DPA)",locales:["ar-TN","fr-TN"]},CD:{name:"DR Congo",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"DR Congo",locales:["fr-CD"]},CF:{name:"Central African Republic",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Central African Republic",locales:["fr-CF"]},CG:{name:"Republic of Congo",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Republic of Congo",locales:["fr-CG"]},TD:{name:"Chad",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Chad",locales:["fr-TD","ar-TD"]},BY:{name:"Belarus",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Belarus",locales:["be-BY","ru-BY"]},MD:{name:"Moldova",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Moldova",locales:["ro-MD"]},RU:{name:"Russia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Russia",locales:["ru-RU"]},UA:{name:"Ukraine",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Ukraine",locales:["uk-UA"]},VA:{name:"Holy See",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Holy See",locales:["it-VA"]},AU:{name:"Australia",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"Australia (Privacy Act)",locales:["en"]},FJ:{name:"Fiji",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Fiji",locales:["en"]},FM:{name:"Micronesia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Micronesia",locales:["en"]},KI:{name:"Kiribati",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Kiribati",locales:["en"]},MH:{name:"Marshall Islands",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Marshall Islands",locales:["en"]},MP:{name:"Northern Mariana Islands",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Northern Mariana Islands",locales:["en"]},NC:{name:"New Caledonia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"New Caledonia",locales:["fr-NC"]},NF:{name:"Norfolk Island",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Norfolk Island",locales:["en"]},NR:{name:"Nauru",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Nauru",locales:["en"]},NU:{name:"Niue",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Niue",locales:["en"]},NZ:{name:"New Zealand",type:"country",complianceGroup:"general-privacy-consent",default:"general-privacy-consent",description:"New Zealand (Privacy Act)",locales:["en"]},PF:{name:"French Polynesia",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"French Polynesia",locales:["fr-PF"]},PG:{name:"Papua New Guinea",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Papua New Guinea",locales:["en"]},PW:{name:"Palau",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Palau",locales:["en"]},SB:{name:"Solomon Islands",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Solomon Islands",locales:["en"]},TO:{name:"Tonga",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Tonga",locales:["en"]},TV:{name:"Tuvalu",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Tuvalu",locales:["en"]},VU:{name:"Vanuatu",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Vanuatu",locales:["fr-VU","en"]},WS:{name:"Samoa",type:"country",complianceGroup:"notice-only",default:"notice-only",description:"Samoa",locales:["en"]},UK:{name:"United Kingdom",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"United Kingdom (UK GDPR + PECR)",locales:["en"]},CH:{name:"Switzerland",type:"country",complianceGroup:"opt-in",default:"opt-in",description:"Switzerland (revFADP)",locales:["de-CH","fr-CH","it-CH"]}}},Ut=Object.entries(B.countries).reduce(function(i,[e,t]){return i[e]=t.name,i},{}),jt=Object.values(B.countries).reduce(function(i,e){return e.locales.forEach(t=>{i[t]=e.name}),i},{});var Qe={id:0,version:1,defaultLocale:"en",complianceGroup:"general-privacy-consent",gpcMode:"honor",cookies:[{id:"necessary",legalBasis:"mandatory"},{id:"analytics",legalBasis:"consent",listenGpc:!0,expiry:365},{id:"marketing",legalBasis:"consent",listenGpc:!0,expiry:365},{id:"functional",legalBasis:"consent",expiry:365}],mainBanner:{position:"bottom",heading:"We value your privacy",htmlText:\'We use cookies and similar technologies to enhance your browsing experience, personalise content and ads, and analyse our traffic. By clicking <strong>Accept All</strong>, you consent to our use of these technologies. You can change your preferences at any time. See our <a href="/privacy-policy">Privacy Policy</a> for more information.\',buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject Optional",cookies:"!",style:"secondary",action:"custom"},{text:"Manage Preferences",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"Your Privacy Preference Has Been Recognized",htmlText:"Your browser sent a Global Privacy Control (GPC) signal indicating you prefer to limit data collection. We have applied your preference. You can review or update your choices at any time.",buttons:[{text:"Review Preferences",style:"primary",action:"manage"},{text:"Continue",style:"secondary",action:"submit"}]},preferenceModal:{position:"right",heading:"Cookie Preferences",subheading:"Choose which types of cookies you allow us to use. You can change these settings at any time.",htmlText:"We use different types of cookies to optimise your experience on our website. Click on the different category headings to find out more and change your default settings. Note that blocking some types of cookies may impact your experience of the site and the services we are able to offer.",showClose:!0,overlayOpacity:50,categories:[{id:"cat-necessary",heading:"Strictly Necessary",htmlText:"These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions you have taken such as setting your privacy preferences, logging in, or filling in forms.",mandatory:!0,cookies:["necessary"]},{id:"cat-functional",heading:"Functional",htmlText:"These cookies enable enhanced functionality and personalisation. They may be set by us or by third parties whose services we have added to our pages.",cookies:["functional"]},{id:"cat-analytics",heading:"Analytics",htmlText:"These cookies help us understand how our website is being used, or how effective our marketing campaigns are. All information these cookies collect is aggregated and therefore anonymous.",cookies:["analytics"]},{id:"cat-marketing",heading:"Marketing",htmlText:"These cookies are used by our advertising partners to build a profile of your interests and show you relevant advertisements on other sites. They work by uniquely identifying your browser and device. If you do not allow these cookies, you will not experience targeted advertising.",cookies:["marketing"]}],buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject Optional",cookies:"!",style:"secondary",action:"custom"},{text:"Save My Choices",style:"text",action:"submit"}]}},Pe=Qe;var Xe={id:0,version:1,defaultLocale:"en",complianceGroup:"notice-only",gpcMode:"ignore",cookies:[{id:"necessary",legalBasis:"mandatory"},{id:"analytics",legalBasis:"legitimate_interest",expiry:365},{id:"functional",legalBasis:"legitimate_interest",expiry:365}],mainBanner:{position:"bottom",heading:"Cookie Notice",htmlText:\'This website uses cookies and similar technologies to ensure it works correctly and to improve your experience. By continuing to browse this site, you acknowledge the use of these technologies. For more information, please read our <a href="/privacy-policy">Privacy Policy</a> and <a href="/cookie-policy">Cookie Policy</a>.\',buttons:[{text:"Got It",style:"primary",action:"submit"},{text:"Learn More",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"Cookie Notice",htmlText:\'This site uses cookies necessary for its operation and for improving your experience. No consent is required in this jurisdiction. See our <a href="/privacy-policy">Privacy Policy</a> for details.\',buttons:[{text:"Acknowledge",style:"primary",action:"submit"}]},preferenceModal:{position:"right",heading:"Cookie Information",subheading:"This notice explains how and why we use cookies on this website.",htmlText:"This website uses cookies to function correctly and to improve your experience. In the jurisdiction where you are located, explicit consent for cookies may not be required. However, we believe in transparency and provide this information so you understand how we use cookies. Some cookies are strictly necessary for the site to work.",showClose:!0,overlayOpacity:40,categories:[{id:"cat-necessary",heading:"Strictly Necessary",htmlText:"These cookies are required for the website to function correctly. Without these cookies, some parts of the website will not work as intended. They cannot be disabled.",mandatory:!0,cookies:["necessary"]},{id:"cat-functional",heading:"Functional and Analytics",htmlText:"These cookies help us deliver a better experience by remembering your preferences and measuring how the site is used. They are used under a legitimate interest basis and do not require your consent in this jurisdiction.",type:"legitimate_interest",legitimateInterest:{enabled:!0,description:"We use functional and analytics cookies under a legitimate interest basis to improve our service and to understand how users interact with our website. This data is anonymised and does not identify you personally."},cookies:["functional","analytics"]}],buttons:[{text:"Acknowledge",style:"primary",action:"submit"},{text:"Close",style:"text",action:"close"}]}},ke=Xe;var et={id:0,version:1,defaultLocale:"en",complianceGroup:"opt-in",gpcMode:"honor",cookies:[{id:"necessary",legalBasis:"mandatory"},{id:"analytics",legalBasis:"consent",listenGpc:!0,expiry:395},{id:"marketing",legalBasis:"consent",listenGpc:!0,expiry:395},{id:"functional",legalBasis:"consent",expiry:395}],mainBanner:{position:"bottom",heading:"We use cookies",htmlText:\'We and our partners use cookies and similar technologies to provide you with a better browsing experience, to analyse site traffic, and to personalise content and advertisements. Please give your consent to our use of cookies as described in our <a href="/privacy-policy">Privacy Policy</a>. You may withdraw your consent at any time.\',buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject All",cookies:"!",style:"secondary",action:"custom"},{text:"Manage Preferences",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"Your Privacy Preference Has Been Detected",htmlText:"Your browser or device has sent a Global Privacy Control (GPC) signal indicating you prefer to limit the sale or sharing of your personal data. As required under applicable law, we have applied your preference. You can review or update your choices at any time.",buttons:[{text:"Manage Preferences",style:"primary",action:"manage"},{text:"Continue",style:"secondary",action:"submit"}]},preferenceModal:{position:"right",heading:"Privacy Preferences",subheading:"Manage your cookie preferences below. Strictly necessary cookies cannot be disabled.",htmlText:"We use different types of cookies to optimise your experience on our website. You can choose which categories to allow. Your choices are saved for the duration indicated for each category and can be changed at any time.",showClose:!0,overlayOpacity:50,categories:[{id:"cat-necessary",heading:"Strictly Necessary",htmlText:"These cookies are essential for the website to function and cannot be disabled. They are set in response to actions you take such as logging in, filling in forms, or setting privacy preferences. They do not store personally identifiable information.",mandatory:!0,cookies:["necessary"]},{id:"cat-functional",heading:"Functional",htmlText:"These cookies enable enhanced functionality and personalisation, such as remembering your language preference or region. They may be set by us or by third-party providers whose services we have added to our pages.",cookies:["functional"]},{id:"cat-analytics",heading:"Analytics",htmlText:"These cookies help us understand how visitors interact with our site by collecting and reporting information anonymously. This data helps us improve our content and navigation. No personally identifiable information is collected.",cookies:["analytics"]},{id:"cat-marketing",heading:"Marketing",htmlText:"These cookies track your online activity to help advertisers deliver more relevant advertising to you, or to limit how many times you see an advertisement. They may be shared with other organisations or advertisers. Declining these cookies will not reduce the number of advertisements you see.",cookies:["marketing"]}],buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject All",cookies:"!",style:"secondary",action:"custom"},{text:"Save My Choices",style:"text",action:"submit"}]}},xe=et;var tt={id:0,version:1,defaultLocale:"en",complianceGroup:"opt-in-brazil",gpcMode:"honor",cookies:[{id:"necessary",legalBasis:"mandatory"},{id:"analytics",legalBasis:"consent",listenGpc:!0,expiry:365},{id:"marketing",legalBasis:"consent",listenGpc:!0,expiry:365},{id:"functional",legalBasis:"consent",expiry:365}],mainBanner:{position:"bottom",heading:"Your Privacy Matters \\u2014 LGPD Notice",htmlText:\'In accordance with the Lei Geral de Prote\\xE7\\xE3o de Dados (LGPD \\u2014 Brazilian General Data Protection Law), we request your consent before collecting and processing personal data beyond what is strictly necessary. As a data subject (titular), you have the right to access, correct, delete, and withdraw consent at any time. Read our <a href="/privacy-policy">Privacy Policy</a> for full details.\',buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject All",cookies:"!",style:"secondary",action:"custom"},{text:"Manage Preferences",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"Your Privacy Signal Was Detected",htmlText:"A Global Privacy Control (GPC) signal was detected from your browser. We have applied your preference in accordance with applicable data protection law. You may manage your choices at any time.",buttons:[{text:"Manage Preferences",style:"primary",action:"manage"},{text:"Continue",style:"secondary",action:"submit"}]},preferenceModal:{position:"right",heading:"Privacy Preferences \\u2014 LGPD",subheading:"Under the LGPD, you have the right to give, manage, or withdraw consent for each purpose of personal data processing. You may update your choices at any time.",htmlText:"As a titular (data subject) under the Lei Geral de Prote\\xE7\\xE3o de Dados (LGPD), you have the right to: confirm the existence of processing, access your data, correct incomplete or inaccurate data, anonymise or delete unnecessary data, and withdraw consent. Use the controls below to set your preferences.",showClose:!0,overlayOpacity:50,categories:[{id:"cat-necessary",heading:"Strictly Necessary",htmlText:"Processing under this purpose is indispensable for the operation of our services. This is based on the legal bases of contract performance and legal obligation under Article 7 of the LGPD.",mandatory:!0,cookies:["necessary"]},{id:"cat-functional",heading:"Functional",htmlText:"These cookies allow us to remember your preferences and provide a personalised experience. Your consent enables this functionality.",cookies:["functional"]},{id:"cat-analytics",heading:"Analytics",htmlText:"With your consent, we collect statistical data about your use of our services to improve our offering. Data is anonymised where possible and is not used to identify you.",cookies:["analytics"]},{id:"cat-marketing",heading:"Marketing",htmlText:"With your consent, we and our partners process your personal data to deliver personalised advertising content. You may withdraw this consent at any time, and withdrawal will not affect the lawfulness of prior processing.",cookies:["marketing"]}],buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject All",cookies:"!",style:"secondary",action:"custom"},{text:"Save My Choices",style:"text",action:"submit"}]}},Ge=tt;var nt={id:0,version:1,defaultLocale:"en",complianceGroup:"opt-in-china",gpcMode:"ignore",cookies:[{id:"necessary",legalBasis:"mandatory"},{id:"analytics",legalBasis:"consent",expiry:365},{id:"marketing",legalBasis:"consent",expiry:365},{id:"functional",legalBasis:"consent",expiry:365}],mainBanner:{position:"bottom",heading:"Personal Information Processing Notice",htmlText:`In accordance with the Personal Information Protection Law of the People\'s Republic of China (PIPL), we hereby inform you of the types of personal information we collect, the purposes for which it is used, and your rights as a personal information subject. Your consent is required before we may process your personal information beyond what is strictly necessary. Please read our <a href="/privacy-policy">Privacy Policy</a> carefully.`,buttons:[{text:"Agree to All",cookies:"*",style:"primary",action:"custom"},{text:"Reject Non-Necessary",cookies:"!",style:"secondary",action:"custom"},{text:"Manage Preferences",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"Privacy Notice",htmlText:"We have detected a privacy preference signal. We have applied your preferences for the processing of your personal information. You may review and update your choices at any time.",buttons:[{text:"Manage Preferences",style:"primary",action:"manage"},{text:"Continue",style:"secondary",action:"submit"}]},preferenceModal:{position:"right",heading:"Personal Information Processing Preferences",subheading:"Under the PIPL, you have the right to know, decide, access, copy, correct, delete, and withdraw consent for the processing of your personal information. Please select your preferences.",htmlText:"We process personal information lawfully, legitimately, and necessarily in accordance with the PIPL. Your personal information is stored and processed within the territory of China. Cross-border transfer of your data, if any, is handled in accordance with Chapter III of the PIPL. You may withdraw your consent at any time by updating these settings.",showClose:!0,overlayOpacity:50,categories:[{id:"cat-necessary",heading:"Strictly Necessary",htmlText:"Processing under this purpose is required for the normal functioning of our services as requested by you. This is processed under the legitimate basis of contract performance and legal obligation under the PIPL.",mandatory:!0,cookies:["necessary"]},{id:"cat-functional",heading:"Functional",htmlText:"These cookies allow us to remember your preferences and settings to provide you with an enhanced experience. Your consent allows us to personalise our service for you.",cookies:["functional"]},{id:"cat-analytics",heading:"Statistical Analysis",htmlText:"With your consent, we collect usage data to analyse how our services are used, enabling us to improve performance and user experience. Data is anonymised where possible.",cookies:["analytics"]},{id:"cat-marketing",heading:"Marketing and Commercial Purposes",htmlText:"With your consent, we use your personal information to deliver personalised commercial information and advertisements. You may withdraw this consent at any time.",cookies:["marketing"]}],buttons:[{text:"Agree and Continue",cookies:"*",style:"primary",action:"custom"},{text:"Only Necessary",cookies:"!",style:"secondary",action:"custom"},{text:"Save My Choices",style:"text",action:"submit"}]}},Se=nt;var ot={id:0,version:1,defaultLocale:"en",complianceGroup:"opt-in-dpdpa",gpcMode:"honor",cookies:[{id:"necessary",legalBasis:"mandatory"},{id:"analytics",legalBasis:"consent",listenGpc:!0,expiry:365},{id:"marketing",legalBasis:"consent",listenGpc:!0,expiry:365},{id:"functional",legalBasis:"consent",expiry:365}],mainBanner:{position:"bottom",heading:"We Need Your Consent",htmlText:\'In accordance with the Digital Personal Data Protection Act, 2023 (DPDPA) of India, we require your explicit consent before collecting and processing your personal data. You have the right to withdraw consent at any time and to access, correct, or erase your data. Please review our <a href="/privacy-policy">Privacy Policy</a> for details.\',buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject All",cookies:"!",style:"secondary",action:"custom"},{text:"Manage Preferences",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"Privacy Preference Detected",htmlText:"A privacy preference signal was detected from your browser. We have applied your opt-out preference in accordance with applicable privacy regulations. You may review and update your consent choices at any time.",buttons:[{text:"Manage Preferences",style:"primary",action:"manage"},{text:"Continue",style:"secondary",action:"submit"}]},preferenceModal:{position:"right",heading:"Consent Preferences \\u2014 DPDPA",subheading:"Under the Digital Personal Data Protection Act (DPDPA), you have the right to give, withdraw, or manage your consent for each purpose of data processing. Please select your preferences below.",htmlText:"As a Data Principal under the DPDPA, you have the right to access, correct, erase, and withdraw consent for your personal data. This notice is provided by the Data Fiduciary as required under Section 5 of the DPDPA. You can update your preferences at any time.",showClose:!0,overlayOpacity:50,categories:[{id:"cat-necessary",heading:"Necessary Processing",htmlText:"Processing your personal data under this purpose is necessary for the delivery of the service you have requested. This processing is exempt from consent requirements under Section 7(a) of the DPDPA.",mandatory:!0,cookies:["necessary"]},{id:"cat-functional",heading:"Functional Enhancements",htmlText:"We process limited personal data to remember your preferences and settings, improving your experience on return visits. Your consent enables this personalisation.",cookies:["functional"]},{id:"cat-analytics",heading:"Analytics and Improvement",htmlText:"With your consent, we collect data about how you use our services in order to improve them. The data is anonymised where possible and is not shared with third parties for commercial purposes.",cookies:["analytics"]},{id:"cat-marketing",heading:"Marketing and Personalised Advertising",htmlText:"With your consent, we and our advertising partners process your personal data to deliver advertisements tailored to your interests. You may withdraw this consent at any time without affecting the lawfulness of prior processing.",cookies:["marketing"]}],buttons:[{text:"Give Consent to All",cookies:"*",style:"primary",action:"custom"},{text:"Withdraw All Consent",cookies:"!",style:"secondary",action:"custom"},{text:"Save My Choices",style:"text",action:"submit"}]}},Ae=ot;var it={id:0,version:1,defaultLocale:"en",complianceGroup:"opt-out",gpcMode:"honor",cookies:[{id:"necessary",legalBasis:"mandatory"},{id:"analytics",legalBasis:"consent",listenGpc:!0,expiry:365},{id:"marketing",legalBasis:"consent",listenGpc:!0,expiry:365,cpraCategory:"sale"},{id:"functional",legalBasis:"consent",expiry:365}],mainBanner:{position:"bottom",heading:"Your Privacy Choices",htmlText:\'We use cookies and similar technologies on this site. Some help us operate the site, while others are used for analytics and advertising purposes. You may opt out of the sale or sharing of your personal information at any time. See our <a href="/privacy-policy">Privacy Policy</a> for more information.\',buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Do Not Sell or Share My Personal Information",cookies:"!",style:"secondary",action:"custom"},{text:"Manage Preferences",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"Your Opt-Out Preference Has Been Applied",htmlText:"We detected a Global Privacy Control (GPC) signal from your browser. In compliance with applicable privacy law, we have opted you out of the sale and sharing of your personal information. You can review or update your preferences below.",buttons:[{text:"Manage Preferences",style:"primary",action:"manage"},{text:"Continue",style:"secondary",action:"submit"}]},preferenceModal:{position:"right",heading:"Privacy Preferences",subheading:"You have the right to opt out of the sale and sharing of your personal information. Toggle the categories below to set your preferences.",htmlText:"We use different types of cookies and tracking technologies. Strictly necessary cookies are always active. For all other categories, you can choose to opt out at any time.",showClose:!0,overlayOpacity:50,categories:[{id:"cat-necessary",heading:"Strictly Necessary",htmlText:"These cookies are required for the website to operate. They include cookies that enable you to log in, use shopping carts, and access secure areas of the website.",mandatory:!0,cookies:["necessary"]},{id:"cat-functional",heading:"Functional",htmlText:"These cookies allow the website to remember choices you make (such as your user name, language, or the region you are in) and provide enhanced, more personal features.",cookies:["functional"]},{id:"cat-analytics",heading:"Analytics",htmlText:"These cookies collect information about how visitors use our website, such as which pages they visit most often. This data helps us improve the site and your experience.",cookies:["analytics"]},{id:"cat-marketing",heading:"Sale / Sharing of Personal Information",htmlText:\'These cookies and trackers are used to deliver targeted advertising to you, and may constitute a "sale" or "sharing" of personal information under the California Consumer Privacy Act (CCPA). You have the right to opt out of this activity.\',cookies:["marketing"]}],buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Opt Out of Sale/Sharing",cookies:"!",style:"secondary",action:"custom"},{text:"Save My Choices",style:"text",action:"submit"}]}},Te=it;var at={id:0,version:1,defaultLocale:"en",complianceGroup:"opt-out-strict",gpcMode:"strict",cookies:[{id:"necessary",legalBasis:"mandatory"},{id:"analytics",legalBasis:"consent",listenGpc:!0,expiry:365},{id:"marketing",legalBasis:"consent",listenGpc:!0,expiry:365,cpraCategory:"sale"},{id:"sensitive",legalBasis:"consent",listenGpc:!0,expiry:365,cpraCategory:"sensitive"},{id:"functional",legalBasis:"consent",expiry:365}],mainBanner:{position:"bottom",heading:"Your Privacy Rights (CPRA)",htmlText:\'Under the California Privacy Rights Act (CPRA), you have the right to opt out of the sale, sharing, and use of your sensitive personal information. We also honor Global Privacy Control (GPC) signals automatically. See our <a href="/privacy-policy">Privacy Policy</a> and <a href="/do-not-sell">Do Not Sell or Share My Personal Information</a> page.\',buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Opt Out of Sale, Sharing & Sensitive Use",cookies:"!",style:"secondary",action:"custom"},{text:"Manage Preferences",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"GPC Signal Detected \\u2014 Opt-Out Applied",htmlText:"A Global Privacy Control (GPC) opt-out signal was detected. As required by CPRA, we have automatically applied your opt-out of the sale and sharing of your personal information and the use of your sensitive personal information. Your preference has been saved.",buttons:[{text:"Manage Preferences",style:"primary",action:"manage"},{text:"Acknowledge",style:"secondary",action:"submit"}]},preferenceModal:{position:"right",heading:"Privacy Preferences (CPRA)",subheading:"Manage your privacy choices. You may opt out of the sale, sharing, and sensitive use of your personal information at any time.",htmlText:"The California Privacy Rights Act (CPRA) provides you with additional rights over your personal information. GPC signals are honored automatically. You can update your choices below.",showClose:!0,overlayOpacity:50,categories:[{id:"cat-necessary",heading:"Strictly Necessary",htmlText:"These cookies are essential for the website to function and are always active. They are exempt from CPRA opt-out requirements.",mandatory:!0,cookies:["necessary"]},{id:"cat-functional",heading:"Functional",htmlText:"These cookies personalise your experience (e.g. language, region preferences). They do not involve the sale or sharing of personal information.",cookies:["functional"]},{id:"cat-analytics",heading:"Analytics",htmlText:"These cookies measure site performance and visitor behaviour. Data is used internally to improve our services. Opting out stops this collection.",cookies:["analytics"]},{id:"cat-marketing",heading:"Sale and Sharing of Personal Information",htmlText:\'These technologies may constitute a "sale" or "sharing" of your personal information under CPRA, including cross-context behavioural advertising. You have the right to opt out.\',cookies:["marketing"]},{id:"cat-sensitive",heading:"Use of Sensitive Personal Information",htmlText:"Some technologies may use sensitive personal information as defined by CPRA (e.g. precise geolocation, health data). You have the right to limit such use.",cookies:["sensitive"]}],buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Opt Out of All Non-Necessary",cookies:"!",style:"secondary",action:"custom"},{text:"Save My Choices",style:"text",action:"submit"}]}},_e=at;var rt={"general-privacy-consent":Pe,"notice-only":ke,"opt-in":xe,"opt-in-brazil":Ge,"opt-in-china":Se,"opt-in-dpdpa":Ae,"opt-out":Te,"opt-out-strict":_e},Me=new Map;function Ee(i,e){Me.set(String(i),e)}var re={id:0,version:1,defaultLocale:"en",gpcMode:"honor",cookies:[{id:"functionality_storage",mandatory:!0},{id:"analytics_storage",listenGpc:!0,expiry:365},{id:"ad_storage",listenGpc:!0,expiry:365},{id:"ad_user_data",listenGpc:!0,expiry:365},{id:"ad_personalization",listenGpc:!0,expiry:365}],mainBanner:{position:"bottom",heading:"We value your privacy",htmlText:"We use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking <strong>Accept All</strong> you consent to our use of cookies. You may change your preferences at any time.",buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject Optional",cookies:"!",style:"primary",action:"custom"},{text:"Customize",style:"text",action:"manage"}]},gpcBanner:{position:"bottom",heading:"Your Privacy Preference Has Been Recognized",htmlText:"Your browser has sent a Global Privacy Control (GPC) signal. We\'ve applied your privacy preference where required by applicable law. You can review or update your cookie choices at any time.",buttons:[{text:"Review Preferences",style:"primary",action:"manage"},{text:"Continue",style:"secondary",action:"submit"}]},preferenceModal:{heading:"Cookie Preferences",subheading:"Choose which cookies you allow us to use.",htmlText:"We use different types of cookies to optimise your experience. You can choose to enable or disable each category below. Necessary cookies cannot be disabled as they are required for core site functionality.",showClose:!0,overlayOpacity:50,categories:[{id:"cat-necessary",heading:"Strictly Necessary",htmlText:"These cookies are essential for the website to function correctly. They include authentication, security, and accessibility features. They cannot be disabled.",mandatory:!0,cookies:["functionality_storage"]},{id:"cat-analytics",heading:"Analytics",htmlText:"These cookies help us understand how visitors interact with our website by collecting and reporting information anonymously. (e.g. Google Analytics)",cookies:["analytics_storage"]},{id:"cat-advertising",heading:"Advertising",htmlText:"These cookies are used to deliver advertisements more relevant to you and your interests. (e.g. Google Ads, Meta Pixel)",cookies:["ad_storage","ad_user_data","ad_personalization"]}],buttons:[{text:"Accept All",cookies:"*",style:"primary",action:"custom"},{text:"Reject Optional",cookies:"!",style:"primary",action:"custom"},{text:"Save Selection",style:"secondary",action:"submit"}]}};function oe(i){let e;return i.gpcMode===!0?e="honor":i.gpcMode===!1?e="ignore":i.gpcMode&&(e=i.gpcMode),{id:0,profileUuid:i.id,version:i.version,defaultLocale:i.defaultLocale,locales:i.locales,cookies:i.cookies,mainBanner:i.mainBanner,preferenceModal:i.preferenceModal,...i.gpcBanner?{gpcBanner:i.gpcBanner}:{},...e?{gpcMode:e}:{},...i.darkMode!==void 0?{darkMode:i.darkMode}:{},...i.complianceGroup?{complianceGroup:i.complianceGroup}:{},...i.complianceConfig?{complianceConfig:i.complianceConfig}:{}}}var De="__consenti_resolved_",st=3600*1e3;function ct(i,e,t){if(!t)return null;let n=`${De}${i}_${e}`;try{let o=sessionStorage.getItem(n);if(!o)return null;let a=JSON.parse(o);return Date.now()>a.expiresAt?(sessionStorage.removeItem(n),null):a}catch{return null}}function lt(i,e,t,n){if(!t)return;let o=`${De}${i}_${e}`;try{sessionStorage.setItem(o,JSON.stringify({...n,expiresAt:Date.now()+st}))}catch{}}function ie(i,e){if(e)return!0;let t=i.allowedOrigins;if(!t||t.length===0)return!0;let n=window.location.origin;return t.some(o=>o===n||o==="*")}function Re(i){return rt[i]??null}function Le(i,e){let t=e.core.usePrebuiltProfiles??"all";return t==="all"?!0:t.includes(i)}function pt(i,e){let t=e.replace(/_/g,"-").split("-"),n=t.length>=2?t[t.length-1]?.toUpperCase():void 0,o=n&&/^[A-Z]{2}$/.test(n)?n:void 0;if(o){let r=B.countries[o];if(r?.default)return r.default}let a=i.split("/");if(a[0]==="Europe")return"opt-in";if(a[0]==="America"){let r=a[1]??"";if(["Los_Angeles","Denver","Chicago","New_York","Phoenix","Anchorage","Honolulu"].includes(r))return"opt-out"}return"opt-in"}function se(i){let e=i.core.locale;return!e||e==="auto"?navigator.language:e}function Ie(i){return i.api?.tenantId??i.core.tenantId??"default"}function dt(i){return we.includes(i)}async function _(i,e){try{return await L(i,{},e)}catch{return null}}async function S(i){let{tz:e,lang:t}=ne(),n=pt(e,t);if(Le(n,i)){let o=Re(n);if(o)return o}return re}async function ae(i,e){if(Le(i,e)){let t=Re(i);if(t)return t}return re}async function Be(i){let e=se(i),t=Ie(i),n=i.core.cacheResolvedProfiles!==!1,o=i.api?.baseUrl??window.location.origin,a=i.api?.trustDomain??!1,r=ct(t,e,n);if(r){let m=await _(r.filePath,i.api?.authToken);if(m)return ie(m,a)?oe(m):(b.error(`Domain ${window.location.origin} is not in allowedOrigins for this profile. Falling back to pre-built profile.`),S(i))}let{tz:s,lang:c}=ne(),u=`${o}/consenti/api/v1/resolve-profile?tz=${encodeURIComponent(s)}&lang=${encodeURIComponent(c)}&locale=${encodeURIComponent(e)}&tenantId=${encodeURIComponent(t)}`,d,f,y;try{let m=await L(u,{},i.api?.authToken);m.warning==="locale_not_found"&&b.info("Locale not found; using default locale."),d=m.filePath,f=m.complianceGroup,y=m.version,lt(t,e,n,{filePath:d,version:y,complianceGroup:f,tenantId:t,locale:e})}catch{return b.warn("resolve-profile failed; falling back to pre-built profile."),S(i)}let p=await _(d,i.api?.authToken)??await _(`${o}/consenti/api/v1/profiles/${t}/${f}/default.json`,i.api?.authToken);return p?ie(p,a)?oe(p):(b.error(`Domain ${window.location.origin} is not in allowedOrigins for this profile. Falling back to pre-built profile.`),S(i)):(b.warn("Profile fetch failed; falling back to pre-built profile."),S(i))}async function ut(i,e){let t=se(e),n=Ie(e),o=e.api?.baseUrl??window.location.origin,a=e.api?.trustDomain??!1,r=e.api?.complianceGroup??i,s=await _(`${o}/consenti/api/v1/profiles/${n}/${r}/${encodeURIComponent(t)}.json`,e.api?.authToken)??await _(`${o}/consenti/api/v1/profiles/${n}/${r}/default.json`,e.api?.authToken);return s?ie(s,a)?oe(s):(b.error(`Domain ${window.location.origin} is not in allowedOrigins for this profile. Falling back to pre-built profile.`),ae(r,e)):(b.warn(`Could not fetch profile for ${r}; falling back to pre-built.`),ae(r,e))}async function mt(i,e){e.api?.enabled&&b.warn("Local profile used instead of server profile. Check compliance.type config.");let t=se(e),n=Array.from(Me.values()).find(o=>o.complianceGroup===i);if(n){let o=Ce(n.translations??{},t,n.defaultLocale);return{id:0,version:1,defaultLocale:n.defaultLocale,locales:Object.keys(n.translations??{}),cookies:n.cookies??[],mainBanner:o.mainBanner,...o.gpcBanner?{gpcBanner:o.gpcBanner}:{},preferenceModal:o.preferenceModal,...n.darkMode!==void 0?{darkMode:n.darkMode}:{},...n.complianceGroup?{complianceGroup:n.complianceGroup}:{}}}return e.api?.enabled?Be(e):S(e)}async function Ne(i){let e=i.compliance?.type??"auto",t=i.api?.enabled??!1;try{return e==="auto"?t?await Be(i):await S(i):dt(e)?t?await ut(e,i):await ae(e,i):await mt(e,i)}catch{return re}}function M(){let i=pe();return i?"globalPrivacyControl"in i&&i.globalPrivacyControl===!0:!1}function Oe(i,e,t){if(!t||!M())return{...e};let n={...e};for(let o of i)o.mandatory||o.listenGpc&&(n[o.id]=o.type==="legitimate_interest"?"objected":"denied");for(let o of i)o.mandatory&&(n[o.id]="granted");return n}function N(i,e){let t=document.createElement("button");return t.type="button",t.className=`consenti-btn consenti-btn--${i.style}`,t.textContent=i.text,t.addEventListener("click",()=>{switch(i.action){case"custom":{let n=i.cookies;n==="*"?e.onGrantAll():n==="!"?e.onDenyAll():Array.isArray(n)&&n.length>0&&e.onGrantSpecific(n);break}case"submit":e.onSubmit();break;case"manage":e.onManage();break;case"close":e.onClose();break}}),t}function O(i,e){let t=document.createElement("div");return t.className="consenti-overlay",t.style.opacity=String(i/100),t.setAttribute("aria-hidden","true"),e&&t.addEventListener("click",e),t}var H=class{constructor(){this.el=null;this.overlayEl=null}build(e,t,n,o,a,r,s=!1){let c=document.createElement("div");c.id="consenti-banner",c.className=`consenti-banner consenti-banner--${e.position}`,c.setAttribute("role","region"),c.setAttribute("aria-label","Cookie consent"),c.setAttribute("aria-live","polite");let u=document.createElement("div");u.className="consenti-banner__text-container";let d=document.createElement("div");if(d.className="consenti-banner__links",e.heading){let h=e.headingTag??"h2",C=document.createElement(h);C.id="consenti-banner-heading",C.className="consenti-banner__heading",C.textContent=e.heading,u.appendChild(C)}let f=document.createElement("div");if(f.className="consenti-banner__text",f.innerHTML=e.htmlText,n){let h=document.createElement("a");h.href=n,h.className="consenti-banner__link consenti-banner__link--privacy consenti-btn consenti-btn--text",h.textContent="Privacy Policy",h.setAttribute("target","_blank"),h.setAttribute("rel","noopener noreferrer"),d.appendChild(h)}u.appendChild(f);let y=e.buttons.filter(h=>h.action==="link");if(y.length>0)for(let h of y){if(!h.url)continue;let C=document.createElement("a");C.href=h.url,C.className=`consenti-banner__link consenti-btn consenti-btn--${h.style??"text"}`,C.textContent=h.text,C.setAttribute("target","_blank"),C.setAttribute("rel","noopener noreferrer"),d.appendChild(C)}(y.length>0||n)&&u.appendChild(d),c.appendChild(u);let p=e.buttons.filter(h=>h.action!=="link");if(p.length>0){let h=document.createElement("div");h.className="consenti-banner__buttons";for(let C of p)h.appendChild(N(C,t));c.appendChild(h)}let m=e.showClose,P=e.showLocaleSwitcher&&o&&o.length>1;if(m||P){let h=document.createElement("div");if(h.className="consenti-banner__controls",P&&o&&r&&h.appendChild(yt(o,a,r)),m){let C=document.createElement("button");C.type="button",C.className="consenti-banner__close consenti-btn consenti-btn--close",C.setAttribute("aria-label","Close cookie banner"),C.textContent="\\xD7",C.addEventListener("click",t.onClose),h.appendChild(C)}c.appendChild(h)}e.overlayOpacity&&e.overlayOpacity>0&&(this.overlayEl=O(e.overlayOpacity));let w=document.createElement("a");return w.href="https://consenti.dev",w.className="consenti-banner__powered-by",w.textContent="Powered by Consenti",w.setAttribute("target","_blank"),w.setAttribute("rel","noopener noreferrer"),s&&w.classList.add("consenti-d-none"),c.appendChild(w),this.el=c,c}getOverlay(){return this.overlayEl}show(){this.el&&(this.el.style.display=""),this.overlayEl&&(this.overlayEl.style.display="")}hide(){this.el&&(this.el.style.display="none"),this.overlayEl&&(this.overlayEl.style.display="none")}remove(){this.el?.remove(),this.overlayEl?.remove(),this.el=null,this.overlayEl=null}};function yt(i,e,t){let n=document.createElement("div");n.className="consenti-locale-switcher";let o=document.createElement("button");o.type="button",o.className="consenti-locale-switcher__btn consenti-btn consenti-btn--close",o.setAttribute("aria-label","Switch language"),o.setAttribute("aria-haspopup","listbox"),o.textContent="\\u{1F310}";let a=document.createElement("ul");a.className="consenti-locale-switcher__list",a.setAttribute("role","listbox"),a.setAttribute("aria-label","Select language"),a.hidden=!0;for(let r of i){let s=document.createElement("li");s.setAttribute("role","option"),s.setAttribute("aria-selected",String(r===e));let c=document.createElement("button");c.type="button",c.className=`consenti-locale-switcher__option${r===e?" consenti-locale-switcher__option--active":""}`,c.textContent=r,c.addEventListener("click",u=>{u.stopPropagation(),a.hidden=!0,r!==e&&t(r)}),s.appendChild(c),a.appendChild(s)}return o.addEventListener("click",r=>{r.stopPropagation(),a.hidden=!a.hidden}),document.addEventListener("click",()=>{a.hidden=!0},{capture:!0,once:!1}),n.appendChild(o),n.appendChild(a),n}var ft=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",\'[tabindex]:not([tabindex="-1"])\',\'[contenteditable="true"]\'].join(", ");function He(i){let e=()=>Array.from(i.querySelectorAll(ft)).filter(o=>!o.closest(\'[aria-hidden="true"]\')),t=o=>{if(o.key!=="Tab")return;let a=e();if(a.length===0)return;let r=a[0],s=a[a.length-1];o.shiftKey?(document.activeElement===r||document.activeElement===i)&&(o.preventDefault(),s.focus()):document.activeElement===s&&(o.preventDefault(),r.focus())},n=o=>{o.key==="Escape"&&i.dispatchEvent(new CustomEvent("consenti:closeRequest",{bubbles:!0}))};return document.addEventListener("keydown",t),document.addEventListener("keydown",n),e()[0]?.focus(),()=>{document.removeEventListener("keydown",t),document.removeEventListener("keydown",n)}}var z=class{constructor(){this.el=null;this.triggerEl=null;this.trapCleanup=null;this.toggleMap=new Map;this.receiptCheckbox=null;this.toggleState=new Map;this.passthrough=!1;this.mobileBreakpoint=576;this.savedBodyOverflow=void 0}build(e,t,n,o,a,r,s,c,u=!1){this.mobileBreakpoint=e.mobileFullScreenBreakpoint??576;let d=e.position??"center",f=document.createElement("div");f.id="consenti-modal",f.className=`consenti-modal consenti-modal--${d}`,f.setAttribute("role","dialog"),f.setAttribute("aria-modal","true");let y=e.overlayOpacity??50;if(this.passthrough=y===0,y>0){let g=e.persistent?void 0:()=>n.onClose(),v=O(y,g);v.className="consenti-modal__overlay",f.appendChild(v)}else f.classList.add("consenti-modal--passthrough");let p=document.createElement("div");p.className="consenti-modal__container";let m=document.createElement("div");m.className="consenti-modal__header";let P=document.createElement("div");if(P.className="consenti-modal__body",e.heading){let g=e.headingTag??"h2",v=document.createElement(g);v.id="consenti-modal-heading",v.className="consenti-modal__heading",v.textContent=e.heading,m.appendChild(v),f.setAttribute("aria-labelledby","consenti-modal-heading")}if(e.subheading){let g=document.createElement("p");g.className="consenti-modal__subheading",g.textContent=e.subheading,m.appendChild(g)}let w=e.showClose!==!1,h=e.showLocaleSwitcher&&r&&r.length>1;if(h||w){let g=document.createElement("div");if(g.className="consenti-modal__header-controls",h&&r&&c&&g.appendChild(gt(r,s,c)),w){let v=document.createElement("button");v.type="button",v.className="consenti-modal__close consenti-btn consenti-btn--close",v.setAttribute("aria-label","Close preference modal"),v.textContent="\\xD7",v.addEventListener("click",n.onClose),g.appendChild(v)}m.appendChild(g)}if(p.appendChild(m),e.htmlText){let g=document.createElement("div");g.className="consenti-modal__text",g.innerHTML=e.htmlText,P.appendChild(g)}let C=e.buttons.filter(g=>g.action==="link");if(C.length>0){let g=document.createElement("div");g.className="consenti-modal__links";for(let v of C){if(!v.url)continue;let k=document.createElement("a");k.href=v.url,k.className=`consenti-modal__link consenti-btn consenti-btn--${v.style??"text"}`,k.textContent=v.text,k.setAttribute("target","_blank"),k.setAttribute("rel","noopener noreferrer"),g.appendChild(k)}p.appendChild(g)}let Y=document.createElement("div");Y.className="consenti-modal__categories";for(let g of e.categories){let v=this.buildCategory(g,t);Y.appendChild(v)}if(P.appendChild(Y),p.appendChild(P),o&&P.appendChild(this.buildReceiptOption()),a){let g=document.createElement("div");g.className="consenti-modal__dpdpa-notice";let v=Ve=>Ve.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#x27;"),k=a.grievanceEmail.includes("@")&&!a.grievanceEmail.toLowerCase().startsWith("javascript:")?a.grievanceEmail:"";g.innerHTML=[`<strong>Data Fiduciary:</strong> ${v(a.dataFiduciary)}.`,a.purposeDescription?` <strong>Purpose:</strong> ${v(a.purposeDescription)}.`:""," You may withdraw consent at any time or contact our Grievance Officer at",k?` <a href="mailto:${v(k)}">${v(k)}</a>.`:"."].join(""),p.appendChild(g)}let F=document.createElement("div");F.className="consenti-modal__buttons";for(let g of e.buttons.filter(v=>v.action!=="link"))F.appendChild(N(g,n));p.appendChild(F);let G=document.createElement("a");G.href="https://consenti.dev",G.className="consenti-modal__powered-by",G.textContent="Powered by Consenti",G.setAttribute("target","_blank"),G.setAttribute("rel","noopener noreferrer"),u&&G.classList.add("consenti-d-none"),P.appendChild(G),f.appendChild(p),f.addEventListener("consenti:closeRequest",()=>n.onClose()),this.el=f}buildCategory(e,t){let n=e.type==="legitimate_interest",o=e.mandatory===!0,a;o?a=!0:n?a=t[e.cookies[0]??""]!=="objected":a=t[e.cookies[0]??""]==="granted",this.toggleState.set(e.id,a);let r=document.createElement("div");r.className=`consenti-category${o?" consenti-category--mandatory":""}`;let s=document.createElement("div");s.className="consenti-category__header";let c=e.headingTag??"h3",u=document.createElement(c);u.id=`consenti-cat-${e.id}-heading`,u.className="consenti-category__heading",u.textContent=e.heading,s.appendChild(u);let d=document.createElement("button");d.type="button",d.className=`consenti-category__toggle${o?" consenti-category__toggle--mandatory":""}`,d.setAttribute("role","switch"),d.setAttribute("aria-checked",String(a)),d.setAttribute("aria-labelledby",`consenti-cat-${e.id}-heading`),o&&d.setAttribute("aria-disabled","true");let f=document.createElement("span");f.className="consenti-category__toggle-icon consenti-category__toggle-icon--check",f.setAttribute("aria-hidden","true"),f.innerHTML=\'<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 5L4 7.5L8.5 2.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>\',d.appendChild(f);let y=document.createElement("span");y.className="consenti-category__toggle-icon consenti-category__toggle-icon--cross",y.setAttribute("aria-hidden","true"),y.innerHTML=\'<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 2L8 8M8 2L2 8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>\',d.appendChild(y);let p=document.createElement("span");p.className="consenti-category__toggle-knob",p.setAttribute("aria-hidden","true"),d.appendChild(p),o||d.addEventListener("click",()=>{let w=!(this.toggleState.get(e.id)??!1);this.toggleState.set(e.id,w),d.setAttribute("aria-checked",String(w))}),this.toggleMap.set(e.id,d),s.appendChild(d),r.appendChild(s);let m=document.createElement("div");if(m.className="consenti-category__text",m.innerHTML=e.htmlText,r.appendChild(m),n&&e.legitimateInterest?.description){let P=document.createElement("p");P.className="consenti-category__li-desc",P.textContent=e.legitimateInterest.description,r.appendChild(P)}return r}buildReceiptOption(){let e=document.createElement("div");e.className="consenti-modal__receipt-option";let t=document.createElement("label");t.className="consenti-modal__receipt-label";let n=document.createElement("input");n.type="checkbox",n.className="consenti-modal__receipt-checkbox",n.id="consenti-receipt-checkbox",n.setAttribute("aria-describedby","consenti-receipt-desc"),this.receiptCheckbox=n,t.appendChild(n),t.append(" Get a copy of my consent choices (JSON)"),e.appendChild(t);let o=document.createElement("p");return o.id="consenti-receipt-desc",o.className="consenti-modal__receipt-desc",o.textContent="A JSON file will be downloaded to your device when you save your preferences.",e.appendChild(o),e}open(e){if(!this.el)return;this.triggerEl=e??document.activeElement,this.receiptCheckbox&&(this.receiptCheckbox.checked=!1);let t=this.mobileBreakpoint>0&&window.innerWidth<=this.mobileBreakpoint;t?this.el.classList.add("consenti-modal--fullscreen"):this.el.classList.remove("consenti-modal--fullscreen"),document.body.appendChild(this.el),(!this.passthrough||t)&&(this.savedBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden"),this.passthrough||(this.trapCleanup=He(this.el))}close(){this.trapCleanup?.(),this.trapCleanup=null,this.savedBodyOverflow!==void 0&&(document.body.style.overflow=this.savedBodyOverflow,this.savedBodyOverflow=void 0),this.el?.remove(),this.triggerEl?.focus(),this.triggerEl=null}isOpen(){return this.el?.isConnected===!0}isReceiptRequested(){return this.receiptCheckbox?.checked??!1}getToggleConsent(e){let t={};for(let n of e){let o=n.type==="legitimate_interest",a=n.mandatory===!0,r=this.toggleState.get(n.id)??!1;for(let s of n.cookies)a?t[s]="granted":o?t[s]=r?"granted":"objected":t[s]=r?"granted":"denied"}return t}destroy(){this.trapCleanup?.(),this.savedBodyOverflow!==void 0&&(document.body.style.overflow=this.savedBodyOverflow,this.savedBodyOverflow=void 0),this.el?.remove(),this.el=null,this.toggleMap.clear(),this.toggleState.clear(),this.receiptCheckbox=null}};function gt(i,e,t){let n=document.createElement("div");n.className="consenti-locale-switcher consenti-locale-switcher--modal";let o=document.createElement("button");o.type="button",o.className="consenti-locale-switcher__btn consenti-btn consenti-btn--close",o.setAttribute("aria-label","Switch language"),o.setAttribute("aria-haspopup","listbox"),o.textContent="\\u{1F310}";let a=document.createElement("ul");a.className="consenti-locale-switcher__list",a.setAttribute("role","listbox"),a.setAttribute("aria-label","Select language"),a.hidden=!0;for(let r of i){let s=document.createElement("li");s.setAttribute("role","option"),s.setAttribute("aria-selected",String(r===e));let c=document.createElement("button");c.type="button",c.className=`consenti-locale-switcher__option${r===e?" consenti-locale-switcher__option--active":""}`,c.textContent=r,c.addEventListener("click",u=>{u.stopPropagation(),a.hidden=!0,r!==e&&t(r)}),s.appendChild(c),a.appendChild(s)}return o.addEventListener("click",r=>{r.stopPropagation(),a.hidden=!a.hidden}),document.addEventListener("click",()=>{a.hidden=!0},{capture:!0,once:!1}),n.appendChild(o),n.appendChild(a),n}var ze="consenti-root",V=class{constructor(){this.root=null;this.styleEl=null}mount(e){if(!l())throw new Error("[Consenti] Renderer.mount() called in SSR context");if(this.root)return this.root;if(e!==void 0){if(typeof e=="string"){let n=document.querySelector(e);if(!n)throw new Error(`[Consenti] rootEl selector "${e}" did not match any element.`);this.root=n}else{if(!document.contains(e))throw new Error("[Consenti] rootEl element is not attached to the document.");this.root=e}return this.root}let t=document.getElementById(ze);return t||(t=document.createElement("div"),t.id=ze,document.body.appendChild(t)),this.root=t,t}injectStyles(e){if(!l()||this.styleEl)return;let t=document.createElement("style");t.id="consenti-styles",t.textContent=e,document.head.appendChild(t),this.styleEl=t}unmount(){this.root?.remove(),this.styleEl?.remove(),this.root=null,this.styleEl=null}announceToScreenReader(e){if(!l())return;let t=document.getElementById("consenti-announcer");t||(t=document.createElement("div"),t.id="consenti-announcer",t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.cssText="position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;",document.body.appendChild(t)),t.textContent="",requestAnimationFrame(()=>{t&&(t.textContent=e)})}};var U=class{constructor(e){this.config=e;this.initialized=!1;this.initializing=!1;this.profile=null;this.resolvedBase=null;this.consentStore=null;this.eventBus=null;this.banner=null;this.modal=null;this.renderer=null;this.broadcastChannel=new E;this.plugins=[];this._bannerVariant=null;this._eventHandlers=new Map;this.readyPromise=new Promise(t=>{this.readyResolve=t}),l()&&(de(e.core.console??["error"]),e.api?.enabled&&e.core.storage==="localStorage"&&(b.warn("localStorage storage mode cannot be used with API mode (API sets cookies via Set-Cookie header). Falling back to cookie storage."),e.core.storage="cookie"),e.autoInit!==!1&&this.init().catch(t=>b.warn("Init error:",t)))}profileId(){return this.profile?.id??0}async init(){if(l()&&!this.initializing){this.initializing=!0,this.initialized=!1,this.readyPromise=new Promise(e=>{this.readyResolve=e});try{let e=this.config.core.storage??"cookie",t=this.config.core.userId??T.getOrCreateUserId(this.profileId(),e),n=await Ne(this.config);this.resolvedBase=n,this.config.darkMode!==void 0&&(n.darkMode=this.config.darkMode);let o=this.config.profileOverride?x(n,this.config.profileOverride):n;this.profile=o,this.eventBus=new R(this.profileId(),this.config.utils?.gtm),this.consentStore=new T(t,this.profileId(),e,this.config.core.cookieDomains),this.consentStore.setProfileCookies(o.cookies),this.renderer=new V,!this.config.core.disableCssTemplate&&Z&&this.renderer.injectStyles(Z),this.banner=new H,this.modal=new z,this.applyTheme(),this.applyDarkMode(),this.broadcastChannel.connect(p=>this.handleBroadcastMessage(p)),await this.runPlugins();let a=o.cookieSigningKey??this.config.core.cookieSigningKey,s=(a?await this.consentStore.readAndVerify(a):this.consentStore.read())!==null;this.eventBus.dispatch("consenti:bannerInitialized",{profileId:this.profileId(),hasExistingConsent:s});let c=o.gpcMode,u=this.config.core.autoHonorGPC!==void 0?this.config.core.autoHonorGPC:c==="strict"?"strict":c==="honor";if(u&&M()){let p=Oe(o.cookies,{},u);if(u==="strict"){await this.submitConsent(p,!0),this.initialized=!0,this.readyResolve();return}if(!s){let m=o.cookieSigningKey??this.config.core.cookieSigningKey;m&&this.consentStore?this.lastSignature=await this.consentStore.writeAndSign(p,m):this.consentStore?.write(p),this.broadcastChannel.send({type:"consentUpdated",consent:p,profileId:this.profileId()}),this.eventBus?.dispatch("consenti:consentSubmitted",{consent:p,gpcDetected:!0,consentId:crypto.randomUUID(),consentAction:this.deriveAction(p,!1),pageUrl:window.location.href}),this.showBanner(!0),this.initialized=!0,this.readyResolve();return}}let d=o.complianceGroup??"",f=d==="opt-out",y=d==="opt-out-strict";if(f&&!s){let p={};for(let P of o.cookies)p[P.id]="granted";let m=o.cookieSigningKey??this.config.core.cookieSigningKey;m?await this.consentStore.writeAndSign(p,m):this.consentStore.write(p),this.initialized=!0,this.readyResolve();return}if(y&&!s){let p=this.config.core.autoHonorGPC&&M(),m={};for(let w of o.cookies){if(w.mandatory){m[w.id]="granted";continue}w.cpraCategory==="sensitive"||p&&(w.cpraCategory==="sale"||w.cpraCategory==="sharing")?m[w.id]="denied":m[w.id]="granted"}let P=o.cookieSigningKey??this.config.core.cookieSigningKey;P?await this.consentStore.writeAndSign(m,P):this.consentStore.write(m),this.initialized=!0,this.readyResolve();return}s||this.showBanner(),this.initialized=!0,this.readyResolve()}finally{this.initializing=!1}}}applyDarkMode(){if(!this.renderer)return;let e=this.config.darkMode??this.profile?.darkMode??!1,t=this.renderer.mount(this.config.rootEl);e?t.classList.add("consenti-root--dark"):t.classList.remove("consenti-root--dark")}applyTheme(){let e=this.config.core.theme;if(!e||!this.renderer)return;let t={"--consenti-color-bg":e.bgColor,"--consenti-color-text":e.textColor,"--consenti-color-primary":e.primaryColor,"--consenti-color-primary-text":e.primaryTextColor,"--consenti-color-secondary":e.secondaryColor,"--consenti-color-secondary-text":e.secondaryTextColor,"--consenti-color-border":e.borderColor,"--consenti-font-family":e.fontFamily,"--consenti-font-size-base":e.fontSizeBase,"--consenti-font-size-heading":e.fontSizeHeading,"--consenti-border-radius":e.borderRadius,"--consenti-border-radius-btn":e.buttonBorderRadius,"--consenti-toggle-bg-on":e.toggleBgOn,"--consenti-toggle-bg-off":e.toggleBgOff,"--consenti-color-accent":e.accentColor,"--consenti-color-accent-text":e.accentTextColor},n=this.renderer.mount(this.config.rootEl);for(let[o,a]of Object.entries(t))a!==void 0&&n.style.setProperty(o,a);if(e.fontSizeMultiplier){let o=parseFloat(e.fontSizeMultiplier);if(!isNaN(o)){let a=parseFloat(getComputedStyle(n).getPropertyValue("--consenti-font-size-base")||"14"),r=parseFloat(getComputedStyle(n).getPropertyValue("--consenti-font-size-heading")||"16");n.style.setProperty("--consenti-font-size-base",`${Math.round(a*o)}px`),n.style.setProperty("--consenti-font-size-heading",`${Math.round(r*o)}px`)}}}async runPlugins(){this.plugins=this.config.plugins??[];for(let e of this.plugins)try{await e.initialize(this)}catch(t){b.warn("Plugin initialize error:",t)}}async callPluginHook(e){for(let t of this.plugins)try{await e(t,this)}catch(n){b.warn("Plugin hook failed:",n)}}_buildGrantAllConsent(e=!1){let t={};for(let n of this.profile?.cookies??[])t[n.id]=e&&!n.mandatory?"denied":"granted";return t}_buildDenyAllConsent(e=!1){let t={};for(let n of this.profile?.cookies??[])t[n.id]=!e&&n.mandatory?"granted":"denied";return t}buildHandlers(e){return{onGrantAll:()=>{this.submitConsent(this._buildGrantAllConsent()),e==="banner"&&(this.banner?.hide(),this._bannerVariant=null)},onDenyAll:()=>{this.submitConsent(this._buildDenyAllConsent()),e==="banner"&&(this.banner?.hide(),this._bannerVariant=null)},onSubmit:()=>{if(e==="modal"&&this.modal&&this.profile){let t=this.modal.getToggleConsent(this.profile.preferenceModal.categories);this.submitConsent(t),this.hideModal()}else{let t={};for(let n of this.profile?.cookies??[])n.mandatory&&(t[n.id]="granted");this.submitConsent(t),e==="banner"&&(this.banner?.hide(),this._bannerVariant=null)}},onManage:()=>{this.showModal()},onClose:()=>{e==="modal"?this.hideModal():(this.banner?.hide(),this._bannerVariant=null,this.broadcastChannel.send({type:"bannerClosed"}),this.eventBus?.dispatch("consenti:bannerVisibility",{show:!1,action:!0}),this.callPluginHook(t=>t.onBannerHide?.()))},onGrantSpecific:t=>{let n={};for(let o of this.profile?.cookies??[])o.mandatory||t.includes(o.id)?n[o.id]="granted":n[o.id]="denied";this.submitConsent(n),e==="banner"&&this.hideBanner()}}}deriveAction(e,t){if(t)return"update";let n=this.profile?.cookies.filter(r=>!r.mandatory)??[];if(n.length===0)return"custom";let o=n.every(r=>e[r.id]==="granted"),a=n.every(r=>e[r.id]==="denied"||e[r.id]==="objected");return o?"accept_all":a?"reject_all":"custom"}handleBroadcastMessage(e){switch(e.type){case"consentUpdated":if(e.profileId!==this.profileId())return;this.consentStore?.setInMemory(e.consent),this.banner?.hide(),this.modal?.isOpen()&&this.modal.close(),this.eventBus?.dispatch("consenti:consentSubmitted",{consent:e.consent,fromBroadcast:!0});break;case"bannerClosed":this.banner?.hide(),this._bannerVariant=null;break;case"consentDeleted":this.consentStore?.clearInMemory();break}}hasConsent(){return l()?this.consentStore?.hasConsent()??!1:!1}getConsent(){return l()?this.consentStore?.getConsent()??null:null}getConsentDate(){return l()?this.consentStore?.getConsentDate()??!1:!1}getGTMConsent(){let e=this.getConsent();if(!e)return null;let t=["ad_storage","analytics_storage","ad_user_data","ad_personalization","functionality_storage","personalization_storage","security_storage"],n={};for(let o of t){let a=e[o];if(a==="granted")n[o]="granted";else if(a==="denied"||a==="objected")n[o]="denied";else{let r=o==="functionality_storage"||o==="security_storage"?"granted":"denied";n[o]=r}}return n}async submitConsent(e,t=!1){if(!l()||!this.profile||!this.consentStore)return;let n=this.profile.complianceGroup??"",o=this.consentStore.hasConsent(),a=crypto.randomUUID(),r=window.location.href,s={};for(let y of this.profile.cookies)if(y.mandatory)s[y.id]="granted";else if(n==="opt-out-strict"){let p=y.cpraCategory==="sensitive"?"denied":"granted";s[y.id]=e[y.id]??p}else{let p=n!=="opt-out"&&n!=="notice-only";s[y.id]=e[y.id]??(p?"denied":"granted")}let c=this.deriveAction(s,o);this.eventBus?.dispatch("consenti:consentBeingSubmitted",{consent:s,consentId:a});let u;if(this.config.api?.enabled)try{let y=this.config.api.baseUrl??window.location.origin,{httpRequest:p}=await Promise.resolve().then(()=>(I(),te));u=await p(`${y}/consenti/api/v1/consent`,{method:"POST",body:JSON.stringify({profileId:this.profileId(),profileUuid:this.profile?.profileUuid,consent:s,locale:this.config.core.locale??"en",gpcDetected:t||M(),consentId:a,action:c,pageUrl:r})},this.config.api.authToken)}catch(y){b.warn("API consent submission failed:",y)}let d=this.profile.cookieSigningKey??this.config.core.cookieSigningKey;if(d?this.lastSignature=await this.consentStore.writeAndSign(s,d):this.consentStore.write(s),(this.modal?.isReceiptRequested()??!1)&&this.config.core.allowReceipt){let m={visitorId:this.consentStore.cookieName.split("_").slice(1,-1).join("_"),profileId:this.profileId(),profileVersion:this.profile.version,locale:this.config.core.locale??"en",consent:s,...this.lastSignature?{signature:this.lastSignature}:{}},P=ue(m);me(P)}this.broadcastChannel.send({type:"consentUpdated",consent:s,profileId:this.profileId()}),this.eventBus?.dispatch("consenti:consentSubmitted",{consent:s,apiResponse:u,gpcDetected:t,consentId:a,consentAction:c,pageUrl:r}),await this.callPluginHook(y=>y.onConsentSubmit?.(s)),this.renderer?.announceToScreenReader("Your cookie preferences have been saved."),this.hideBanner(),this.modal?.isOpen()&&this.hideModal()}bannerVisibility(){return this._bannerVariant??!1}modalVisibility(){return this.modal?.isOpen()?"preference":!1}showBanner(e=!1){if(!l()||!this.profile||!this.banner||!this.renderer)return;let t=e&&this.profile.gpcBanner?"gpc":"main";if(this._bannerVariant===t)return;let n=t==="gpc"?this.profile.gpcBanner:this.profile.mainBanner,o=this.renderer.mount(this.config.rootEl),a=this.buildHandlers("banner");this.banner.remove();let r=this.profile.locales,s=this.config.core.locale??"en",c=this.banner.build(n,a,void 0,r,s,d=>this.switchLocale(d),this.config.hidePoweredBy??!1);o.appendChild(c);let u=this.banner.getOverlay();u&&o.appendChild(u),this._bannerVariant=t,this.eventBus?.dispatch("consenti:bannerVisibility",{show:!0,action:!1}),this.callPluginHook(d=>d.onBannerShow?.())}hideBanner(){this._bannerVariant!==null&&(this.banner?.hide(),this._bannerVariant=null,this.broadcastChannel.send({type:"bannerClosed"}),this.eventBus?.dispatch("consenti:bannerVisibility",{show:!1,action:!0}),this.renderer?.announceToScreenReader("Cookie banner dismissed."),this.callPluginHook(e=>e.onBannerHide?.()))}showModal(e){if(!l()||!this.profile||!this.modal||this.modal.isOpen())return;let t=this.buildHandlers("modal"),n=this.consentStore?.getConsent()??{},o=this.profile.complianceGroup==="opt-in-dpdpa"?this.profile.dpdpa:void 0,a=this.profile.locales,r=this.config.core.locale??"en";this.modal.build(this.profile.preferenceModal,n,t,this.config.core.allowReceipt??!1,o,a,r,c=>{this.hideModal(),this.switchLocale(c)},!(this.config.hidePoweredBy??!1)),this.banner?.hide(),this.modal.open(e);let s=this.config.darkMode??this.profile?.darkMode??!1;document.getElementById("consenti-modal")?.classList.toggle("consenti-root--dark",s),this.eventBus?.dispatch("consenti:modalVisibility",{show:!0,action:!0}),this.callPluginHook(c=>c.onModalShow?.())}hideModal(){this.modal?.isOpen()&&(this.modal.close(),this.eventBus?.dispatch("consenti:modalVisibility",{show:!1,action:!0}),this.callPluginHook(e=>e.onModalHide?.()),!this.consentStore?.hasConsent()&&this._bannerVariant!==null?this.banner?.show():this.consentStore?.hasConsent()||this.showBanner())}onReady(e){this.initialized?e():this.readyPromise.then(e)}get ready(){return this.readyPromise}async deleteConsent(){if(!(!l()||!this.consentStore)){if(this.config.api?.enabled)try{let e=this.config.api.baseUrl??window.location.origin,t=this.consentStore.cookieName,{httpRequest:n}=await Promise.resolve().then(()=>(I(),te));await n(`${e}/consenti/api/v1/consent/${t}`,{method:"DELETE"},this.config.api?.authToken)}catch(e){b.warn("API consent deletion failed:",e)}this.consentStore.delete(),this.broadcastChannel.send({type:"consentDeleted"})}}async reConsent(){await this.deleteConsent(),this.showBanner()}getProfile(){return this.profile}getRootElement(){return l()?this.config.rootEl?typeof this.config.rootEl=="string"?document.querySelector(this.config.rootEl):this.config.rootEl:document.getElementById("consenti-root"):null}getBannerElement(){return l()?document.getElementById("consenti-banner"):null}getModalElement(){return l()?document.getElementById("consenti-modal"):null}switchLocale(e){l()&&(this.config.core.locale=e,this.banner?.remove(),this.modal?.isOpen()&&this.modal.close(),this._bannerVariant=null,this.profile=null,this.initialized=!1,this.readyPromise=new Promise(t=>{this.readyResolve=t}),this.init().catch(t=>b.warn("Locale switch error:",t)))}isCookieGranted(e,t=!1){if(!l())return!1;let n=this.getConsent()?.[e];return t?n??!1:n==="granted"}isCategoryGranted(e,t=!1){if(!l()||!this.profile)return t?[]:!1;let n=this.profile.preferenceModal.categories.find(a=>a.id===e);if(!n)return t?[]:!1;let o=this.getConsent();return t?n.cookies.map(a=>({[a]:o?.[a]??"denied"})):n.cookies.every(a=>o?.[a]==="granted")}async grantAll(e=!1){!l()||!this.profile||await this.submitConsent(this._buildGrantAllConsent(e))}async denyAll(e=!1){!l()||!this.profile||(e&&b.warn("denyAll called with includingMandatory=true \\u2014 mandatory cookies will be denied. Ensure this is intentional."),await this.submitConsent(this._buildDenyAllConsent(e)))}on(e,t){if(!l())return;let n=e.startsWith("consenti:")?e:`consenti:${e}`,o=r=>t(r.detail),a=this._eventHandlers.get(t)??[];a.push({name:n,wrapped:o}),this._eventHandlers.set(t,a),window.addEventListener(n,o)}off(e,t){if(!l())return;let n=e.startsWith("consenti:")?e:`consenti:${e}`,o=this._eventHandlers.get(t);if(!o)return;let a=o.findIndex(s=>s.name===n);if(a===-1)return;let r=o[a];r&&window.removeEventListener(n,r.wrapped),o.splice(a,1),o.length===0&&this._eventHandlers.delete(t)}version(){return{package:"0.2.0",profileVersion:this.profile?.version??null,consentVersion:1}}setDarkMode(e){if(!l())return;this.config.darkMode=e===void 0?!this.config.darkMode:e,this.applyDarkMode();let t=this.config.darkMode??!1;document.getElementById("consenti-modal")?.classList.toggle("consenti-root--dark",t)}setTheme(e){l()&&(this.config.core.theme=Object.assign({},this.config.core.theme,e),this.applyTheme())}setConfig(e){this.config=x(this.config,e),l()&&(this.applyTheme(),this.applyDarkMode())}setProfile(e){if(!l()||!this.resolvedBase)return;this.config.profileOverride=this.config.profileOverride?x(this.config.profileOverride,e):e,this.profile=x(this.resolvedBase,this.config.profileOverride);let t=this.modal?.isOpen()??!1;if(t&&this.modal?.close(),this._bannerVariant!==null){let n=this._bannerVariant==="gpc";this._bannerVariant=null,this.showBanner(n)}t&&this.showModal()}destroy(){for(let e of this.plugins)try{e.destroy()}catch{}if(this.modal?.destroy(),this.renderer?.unmount(),this.broadcastChannel.disconnect(),l()){for(let e of this._eventHandlers.values())for(let{name:t,wrapped:n}of e)window.removeEventListener(t,n);this._eventHandlers.clear()}this.banner=null,this.modal=null,this.renderer=null,this.consentStore=null,this.eventBus=null,this.initialized=!1}};var j=class{};var ht=1e3,K=class{constructor(e){this.config=e;this.id=ht++,Ee(this.id,e)}getId(){return this.id}toJSON(){return this.config}};var $=class{constructor(e){this.options=e;this.scriptEl=null;this.handler=()=>this.evaluate(),l()&&(e.bind!==!1&&window.addEventListener("consenti:consentSubmitted",this.handler),this.evaluate())}evaluate(){let t=this.options.widget.getConsent()?.[this.options.cookieId]==="granted";t&&!this.scriptEl?this.inject():!t&&this.scriptEl&&this.revoke()}inject(){let e=document.createElement("script");if(this.options.src){let t=this.options.src.trim();if(/^javascript:/i.test(t)){b.warn("ConsentScript: rejected src with javascript: protocol");return}e.src=t}this.options.unsafeInnerHTML&&(e.innerHTML=this.options.unsafeInnerHTML);for(let[t,n]of Object.entries(this.options.attributes??{})){if(/^on/i.test(t)){b.warn(`ConsentScript: rejected attribute "${t}" (inline event handlers are not allowed)`);continue}e.setAttribute(t,n)}document.head.appendChild(e),this.scriptEl=e,this.options.onLoad?.()}revoke(){this.scriptEl?.remove(),this.scriptEl=null,this.options.onRevoke?.()}destroy(){l()&&(this.options.bind!==!1&&window.removeEventListener("consenti:consentSubmitted",this.handler),this.revoke())}};var q=class{constructor(e){let t=e.action??"modal";if(this.clickHandler=()=>{t==="modal"?e.widget.showModal():e.widget.showBanner()},e.el)if(typeof e.el=="string"){if(!l()){this.el=document.createElement("span"),this.created=!1;return}let n=document.querySelector(e.el);if(!n)throw new Error(`[Consenti] CookieTrigger: element not found for selector "${e.el}"`);this.el=n,this.created=!1}else this.el=e.el,this.created=!1;else{let n=document.createElement("button");n.type="button",n.className="consenti-btn consenti-btn--text consenti-cookie-trigger",n.textContent=e.label??"Cookie Settings",n.setAttribute("aria-label",e.label??"Open cookie settings"),this.el=n,this.created=!0}this.el.addEventListener("click",this.clickHandler)}getElement(){return this.el}destroy(){this.el.removeEventListener("click",this.clickHandler),this.created&&this.el.remove()}};return qe(vt);})();\n//# sourceMappingURL=index.umd.js.map',Yr=`#consenti-root{position:relative}.consenti-d-none{display:none}:root{--consenti-color-bg: #ffffff;--consenti-color-text: #1a2e4a;--consenti-color-primary: #1565c0;--consenti-color-primary-text: #ffffff;--consenti-color-secondary: #f0f4f8;--consenti-color-secondary-text: #1a2e4a;--consenti-color-border: #dbe4ee;--consenti-color-secondary-border: #1a2e4a;--consenti-color-overlay: rgba(26, 52, 96, 0.55);--consenti-color-accent: #d32f2f;--consenti-color-accent-text: #ffffff;--consenti-font-family: system-ui, -apple-system, sans-serif;--consenti-font-size-base: 14px;--consenti-font-size-heading: 16px;--consenti-font-weight-heading: 600;--consenti-line-height: 1.5;--consenti-spacing-sm: 8px;--consenti-spacing-md: 16px;--consenti-spacing-lg: 24px;--consenti-border-radius: 8px;--consenti-border-radius-btn: 0;--consenti-shadow: 0 4px 24px rgba(21, 101, 192, 0.14);--consenti-toggle-bg-on: #43a047;--consenti-toggle-bg-off: #9ca3af;--consenti-toggle-knob: #ffffff;--consenti-toggle-width: 52px;--consenti-toggle-height: 28px;--consenti-z-banner: 9999;--consenti-z-overlay: 9998;--consenti-z-modal: 10000}.consenti-root--dark{--consenti-color-bg: #1e2535;--consenti-color-text: #e2e8f0;--consenti-color-primary: #4a9eff;--consenti-color-primary-text: #ffffff;--consenti-color-secondary: #2a3447;--consenti-color-secondary-text: #cbd5e1;--consenti-color-border: #374151;--consenti-color-overlay: rgba(0, 0, 0, 0.65);--consenti-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);--consenti-toggle-bg-off: #6b7280}.consenti-overlay{position:fixed;inset:0;background:var(--consenti-color-overlay);z-index:var(--consenti-z-overlay)}.consenti-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--consenti-spacing-sm) var(--consenti-spacing-md);border:none;border-radius:var(--consenti-border-radius-btn);font-family:var(--consenti-font-family);font-size:var(--consenti-font-size-base);font-weight:500;line-height:1;cursor:pointer;text-decoration:none;transition:opacity .15s ease}.consenti-btn:focus-visible{outline:2px solid var(--consenti-color-primary);outline-offset:2px}.consenti-btn:hover{opacity:.9}.consenti-btn--primary{background:var(--consenti-color-primary);color:var(--consenti-color-primary-text)}.consenti-btn--secondary{background:var(--consenti-color-secondary);color:var(--consenti-color-primary);border:1px solid var(--consenti-color-primary)}.consenti-btn--secondary:hover{background:var(--consenti-color-primary);color:var(--consenti-color-secondary);border:1px solid var(--consenti-color-secondary)}.consenti-btn--text{background:rgba(0,0,0,0);color:var(--consenti-color-primary);padding-left:0;padding-right:0;text-decoration:underline;text-underline-offset:4px}.consenti-btn--accent{background:var(--consenti-color-accent);color:var(--consenti-color-accent-text)}.consenti-btn--close{background:rgba(0,0,0,0);color:var(--consenti-color-text);font-size:20px;line-height:1;padding:4px 8px;border-radius:50%}.consenti-btn--close:hover{background:var(--consenti-color-secondary);opacity:1}.consenti-banner{position:fixed;left:0;right:0;z-index:var(--consenti-z-banner);background:var(--consenti-color-bg);color:var(--consenti-color-text);font-family:var(--consenti-font-family);font-size:var(--consenti-font-size-base);line-height:var(--consenti-line-height);box-shadow:var(--consenti-shadow);padding:var(--consenti-spacing-lg);display:flex;flex-wrap:wrap;align-items:center;gap:var(--consenti-spacing-md)}.consenti-banner--top{top:0;border-bottom:1px solid var(--consenti-color-border)}@media(prefers-reduced-motion: no-preference){.consenti-banner--top{animation:consenti-slide-down .2s ease-out}}.consenti-banner--bottom{bottom:0;border-top:1px solid var(--consenti-color-border)}@media(prefers-reduced-motion: no-preference){.consenti-banner--bottom{animation:consenti-slide-up .2s ease-out}}.consenti-banner--middle{top:50%;transform:translateY(-50%);left:50%;right:auto;transform:translate(-50%, -50%);width:min(600px,90vw);border-radius:var(--consenti-border-radius)}.consenti-banner--left-bottom{bottom:var(--consenti-spacing-lg);left:var(--consenti-spacing-lg);right:auto;width:min(400px,90vw);border-radius:var(--consenti-border-radius)}.consenti-banner--right-bottom{bottom:var(--consenti-spacing-lg);right:var(--consenti-spacing-lg);left:auto;width:min(400px,90vw);border-radius:var(--consenti-border-radius)}.consenti-banner__text-container{flex:1;min-width:500px}.consenti-banner__heading{font-size:var(--consenti-font-size-heading);font-weight:var(--consenti-font-weight-heading);margin:0 0 var(--consenti-spacing-sm);width:100%}.consenti-banner__text{margin:0}.consenti-banner__links{display:flex;flex-wrap:wrap;gap:var(--consenti-spacing-sm);margin-top:var(--consenti-spacing-sm)}.consenti-banner__link{font-size:.85em}.consenti-banner__controls{position:absolute;top:var(--consenti-spacing-sm);right:var(--consenti-spacing-sm);display:flex;align-items:center;gap:4px}.consenti-banner__buttons{display:flex;flex-wrap:wrap;gap:var(--consenti-spacing-sm);align-items:center;margin-block:var(--consenti-spacing-md)}.consenti-banner__powered-by{position:absolute;right:10px;bottom:2px;opacity:.2;color:var(--consenti-color-primary)}@media(max-width: 576px){.consenti-banner{padding:var(--consenti-spacing-md);gap:var(--consenti-spacing-sm)}.consenti-banner--left-bottom,.consenti-banner--right-bottom{left:0;right:0;bottom:0;width:100%;border-radius:0;border-top:1px solid var(--consenti-color-border)}.consenti-banner--middle{width:95vw}.consenti-banner__buttons{width:100%;flex-direction:row;align-items:stretch;margin-bottom:var(--consenti-spacing-md)}.consenti-banner__text-container{min-width:0;width:100%}}@keyframes consenti-slide-up{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes consenti-slide-down{from{transform:translateY(-100%)}to{transform:translateY(0)}}.consenti-modal{position:fixed;inset:0;z-index:var(--consenti-z-modal);display:flex;font-family:var(--consenti-font-family);font-size:var(--consenti-font-size-base);color:var(--consenti-color-text);line-height:var(--consenti-line-height)}.consenti-modal--passthrough{pointer-events:none}.consenti-modal--passthrough .consenti-modal__container{pointer-events:auto}.consenti-modal--center{align-items:center;justify-content:center}.consenti-modal--left{align-items:stretch;justify-content:flex-start}.consenti-modal--left .consenti-modal__container{border-radius:0 var(--consenti-border-radius) var(--consenti-border-radius) 0;height:100%;max-height:100vh}.consenti-modal--right{align-items:stretch;justify-content:flex-end}.consenti-modal--right .consenti-modal__container{border-radius:0;height:100%;max-height:100vh}.consenti-modal--fullscreen{align-items:flex-start;justify-content:flex-start}.consenti-modal--fullscreen .consenti-modal__container{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;margin:0}.consenti-modal__overlay{position:absolute;inset:0;background:var(--consenti-color-overlay)}.consenti-modal__container{position:relative;z-index:1;background:var(--consenti-color-bg);border-radius:var(--consenti-border-radius);box-shadow:var(--consenti-shadow);width:min(560px,90vw);max-height:85vh;display:flex;flex-direction:column;overflow:hidden}@media(prefers-reduced-motion: no-preference){.consenti-modal__container{animation:consenti-fade-in .15s ease-out}}.consenti-modal__header{display:flex;justify-content:space-between;padding:var(--consenti-spacing-md) var(--consenti-spacing-lg);border-bottom:1px solid var(--consenti-color-border);flex-shrink:0;position:relative;flex-direction:column}.consenti-modal__heading{font-size:var(--consenti-font-size-heading);font-weight:var(--consenti-font-weight-heading);margin:0;flex:1}.consenti-modal__header-controls{display:flex;align-items:center;gap:4px;flex-shrink:0;position:absolute;right:15px;top:10px}.consenti-modal__close{flex-shrink:0}.consenti-modal__links{display:flex;flex-wrap:wrap;gap:var(--consenti-spacing-sm);padding:var(--consenti-spacing-sm) var(--consenti-spacing-lg)}.consenti-modal__link{font-size:.85em;text-decoration:underline;text-underline-offset:2px}.consenti-modal__subheading{padding-top:var(--consenti-spacing-sm);margin:0;color:#6b7280;font-size:13px}.consenti-modal__text{padding:var(--consenti-spacing-sm) 0}.consenti-modal__body{overflow-y:auto;flex:1;padding:var(--consenti-spacing-sm) var(--consenti-spacing-lg);position:relative}.consenti-modal__categories{display:flex;flex-direction:column;gap:var(--consenti-spacing-md);padding:var(--consenti-spacing-md) 0}.consenti-modal__buttons{display:flex;flex-wrap:wrap;gap:var(--consenti-spacing-sm);padding:var(--consenti-spacing-md);border-top:1px solid var(--consenti-color-border);flex-shrink:0}.consenti-modal__receipt-option{padding-top:var(--consenti-spacing-md);border-top:1px solid var(--consenti-color-border);flex-shrink:0}.consenti-modal__receipt-label{display:flex;align-items:center;gap:var(--consenti-spacing-sm);font-size:var(--consenti-font-size-base);cursor:pointer}.consenti-modal__receipt-checkbox{width:16px;height:16px;flex-shrink:0;cursor:pointer}.consenti-modal__receipt-desc{margin:4px 0 0 24px;font-size:12px;color:#6b7280}.consenti-modal__powered-by{opacity:.5;color:var(--consenti-color-primary)}@keyframes consenti-fade-in{from{opacity:0;transform:scale(0.97)}to{opacity:1;transform:scale(1)}}.consenti-category{padding:var(--consenti-spacing-md) 0;border-bottom:1px solid var(--consenti-color-border)}.consenti-category:last-child{border-bottom:none}.consenti-category--mandatory .consenti-category__toggle{opacity:.6;cursor:default}.consenti-category__header{display:flex;align-items:center;justify-content:space-between;gap:var(--consenti-spacing-md);margin-bottom:var(--consenti-spacing-sm)}.consenti-category__heading{font-size:var(--consenti-font-size-heading);font-weight:var(--consenti-font-weight-heading);margin:0}.consenti-category__text{color:#949dab;font-size:13px;margin:0}.consenti-category__li-desc{margin:var(--consenti-spacing-sm) 0 0;font-size:12px;color:#6b7280;font-style:italic}.consenti-category__toggle{flex-shrink:0;position:relative;width:var(--consenti-toggle-width);height:var(--consenti-toggle-height);border-radius:calc(var(--consenti-toggle-height)/2);background:var(--consenti-toggle-bg-off);border:none;cursor:pointer;transition:background .2s ease;padding:0}.consenti-category__toggle:focus-visible{outline:2px solid var(--consenti-color-primary);outline-offset:2px}.consenti-category__toggle[aria-checked=true]{background:var(--consenti-toggle-bg-on)}.consenti-category__toggle--mandatory{cursor:default}.consenti-category__toggle-icon{position:absolute;top:50%;transform:translateY(-50%);width:10px;height:10px;display:flex;align-items:center;justify-content:center;pointer-events:none;transition:opacity .15s ease;color:hsla(0,0%,100%,.9)}.consenti-category__toggle-icon svg{width:10px;height:10px;overflow:visible}.consenti-category__toggle-icon--check{left:8px;opacity:0}[aria-checked=true] .consenti-category__toggle-icon--check{opacity:1}.consenti-category__toggle-icon--cross{right:8px;opacity:1}[aria-checked=true] .consenti-category__toggle-icon--cross{opacity:0}.consenti-category__toggle-knob{position:absolute;top:2px;left:2px;width:calc(var(--consenti-toggle-height) - 4px);height:calc(var(--consenti-toggle-height) - 4px);border-radius:50%;background:var(--consenti-toggle-knob);transition:transform .2s ease;display:block}[aria-checked=true] .consenti-category__toggle-knob{transform:translateX(calc(var(--consenti-toggle-width) - var(--consenti-toggle-height)))}.consenti-locale-switcher{position:relative;display:inline-flex}.consenti-locale-switcher__btn{font-size:1rem;line-height:1;cursor:pointer}.consenti-locale-switcher__list{position:absolute;top:calc(100% + 4px);right:0;z-index:calc(var(--consenti-z-modal) + 1);background:var(--consenti-color-bg);border:1px solid var(--consenti-color-border);border-radius:var(--consenti-border-radius);box-shadow:var(--consenti-shadow);list-style:none;margin:0;padding:4px 0;min-width:80px}.consenti-locale-switcher__list li{display:block}.consenti-locale-switcher__option{display:block;width:100%;padding:6px 12px;text-align:left;font-size:var(--consenti-font-size-base);color:var(--consenti-color-text);background:none;border:none;cursor:pointer}.consenti-locale-switcher__option:hover{background:var(--consenti-color-secondary)}.consenti-locale-switcher__option--active{font-weight:600;color:var(--consenti-color-primary)}.consenti-locale-switcher--modal .consenti-locale-switcher__list{right:0}`,Xr=nn,Zr=rn,Qr={main:`Main Banner`,gpc:`GPC Banner`,modal:`Modal`};function $r(e){let t={text:e.text,style:e.type,action:e.action};return e.cookies!==void 0&&(t.cookies=e.cookies),e.url!==void 0&&(t.url=e.url),t}function ei(e){if(!e)return;let t=e.buttons;return{...e,buttons:(t??[]).map($r)}}function ti(e){return e?.showLocaleSwitcher===!0}function ni(e,t,n){let r=e,i=r.translations,a=r.defaultLocale??`en`,o=i?.[a],s=ei(o?.mainBanner),c=ei(o?.gpcBanner),l=ei(o?.preferenceModal),u={defaultLocale:a,...ti(o?.mainBanner)||ti(o?.gpcBanner)||ti(o?.preferenceModal)?{locales:[`en`,`fr`]}:{},cookies:r.cookies,mainBanner:s,gpcBanner:c,preferenceModal:l},d=JSON.stringify(u);return`<!DOCTYPE html>
6
- <html lang="en"${t?` class="dark"`:``}>
7
- <head>
8
- <meta charset="UTF-8">
9
- <meta name="viewport" content="width=device-width,initial-scale=1">
10
- <style>${Yr}</style>
11
- <style>body{margin:0;font-family:sans-serif;background:${t?`#111827`:`#f5f5f5`}}</style>
12
- </head>
13
- <body>
14
- <script>${Jr}<\/script>
15
- <script>
16
- const { ConsentiSetup } = window.Consenti
17
- const w = new ConsentiSetup({
18
- darkMode: ${t},
19
- core: { profileId: 0 },
20
- profileOverride: ${d},
21
- })
22
- ${n===`modal`?`w.onReady(function() { w.showModal() })`:n===`gpc`?`w.onReady(function() { w.deleteConsent().then(function() { w.showBanner(true) }) })`:`w.onReady(function() { w.deleteConsent().then(function() { w.showBanner() }) })`}
23
-
24
- window.addEventListener('message', function(e) {
25
- if (!e.data || typeof e.data.type !== 'string') return
26
- var type = e.data.type
27
- if (type === 'preview:main') {
28
- if (w.modalVisibility()) w.hideModal()
29
- w.showBanner(false)
30
- } else if (type === 'preview:gpc') {
31
- if (w.modalVisibility()) w.hideModal()
32
- w.showBanner(true)
33
- } else if (type === 'preview:modal') {
34
- if (!w.modalVisibility()) w.showModal()
35
- }
36
- })
37
- <\/script>
38
- </body>
39
- </html>`}function ri({draft:e,debounceMs:t=600,expandable:n=!1,height:r=`360px`,previewMode:i}){let{theme:a}=Re(),o=a===`dark`,[s,c]=R(!1),l=i!==void 0,[u,d]=R(`main`),f=l?i:u,[p,m]=R(()=>ni(e,o,f)),[h,g]=R(0),_=B(null),v=B(f),y=B(f);return y.current=f,z(()=>{v.current!==f&&(v.current=f,_.current?.contentWindow?.postMessage({type:`preview:${f}`},`*`))},[f]),z(()=>{let n=setTimeout(()=>{let t=y.current;m(ni(e,o,t)),g(e=>e+1),v.current=t},t);return()=>clearTimeout(n)},[e,t,o]),z(()=>(s?document.body.style.overflow=`hidden`:document.body.style.overflow=``,()=>{document.body.style.overflow=``}),[s]),W(`div`,{class:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden bg-gray-50 dark:bg-gray-900${s?` shadow-2xl`:``}`,style:s?{position:`fixed`,inset:0,zIndex:9999,display:`flex`,flexDirection:`column`}:{},children:[W(`div`,{class:`px-4 py-2.5 bg-gray-100 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between shrink-0 gap-3`,children:[W(`div`,{class:`flex items-center gap-3 min-w-0`,children:[W(`div`,{class:`shrink-0`,children:[W(`span`,{class:`text-sm font-medium text-gray-700 dark:text-gray-300`,children:`Live Preview`}),W(`span`,{class:`text-xs text-gray-400 dark:text-gray-500 ml-2`,children:`Updates after you stop typing`})]}),!l&&W(`div`,{class:`flex items-center gap-1`,children:Object.keys(Qr).map(e=>W(`button`,{type:`button`,onClick:()=>d(e),class:`px-2.5 py-0.5 text-xs rounded-full transition-colors ${u===e?`bg-blue-600 text-white`:`text-gray-500 hover:text-gray-700 hover:bg-gray-200 dark:hover:bg-gray-700 dark:hover:text-gray-300`}`,children:Qr[e]},e))})]}),n&&W(`button`,{type:`button`,onClick:()=>c(e=>!e),class:`text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1 shrink-0`,children:s?W(C,{children:[W(Zr,{size:12}),` Collapse`]}):W(C,{children:[W(Xr,{size:12}),` Expand`]})})]}),W(`iframe`,{ref:_,srcdoc:p,class:`w-full border-none block`,style:s?{flex:1,minHeight:0}:{height:r},sandbox:`allow-scripts allow-same-origin`,title:`Banner preview`},h)]})}var Q={list:()=>Y(`/cookie-templates`),get:e=>Y(`/cookie-templates/${e}`),create:e=>Y(`/cookie-templates`,{method:`POST`,body:JSON.stringify(e)}),update:(e,t)=>Y(`/cookie-templates/${e}`,{method:`PUT`,body:JSON.stringify(t)}),delete:e=>Y(`/cookie-templates/${e}`,{method:`DELETE`}),copy:(e,t)=>Y(`/cookie-templates/${e}/copy`,{method:`POST`,body:JSON.stringify({name:t})}),profileUsage:e=>Y(`/cookie-templates/${e}/profile-usage`)},$={list:()=>Y(`/ui-templates`),get:e=>Y(`/ui-templates/${e}`),create:e=>Y(`/ui-templates`,{method:`POST`,body:JSON.stringify(e)}),update:(e,t)=>Y(`/ui-templates/${e}`,{method:`PUT`,body:JSON.stringify(t)}),delete:e=>Y(`/ui-templates/${e}`,{method:`DELETE`}),copy:(e,t)=>Y(`/ui-templates/${e}/copy`,{method:`POST`,body:JSON.stringify({name:t})}),profileUsage:e=>Y(`/ui-templates/${e}/profile-usage`)};function ii(e,t,n,r,i){let a=(e,t,n)=>e[t]||n;return{locale:e,mainBanner:{heading:t.mainBanner.heading,htmlText:Nr(jr(t.mainBanner.htmlText)),buttons:n.buttons.map((e,n)=>a(t.mainBanner.buttonLabels,n,e.text))},gpcBanner:{heading:t.gpcBanner.heading,htmlText:Nr(jr(t.gpcBanner.htmlText)),buttons:r.buttons.map((e,n)=>a(t.gpcBanner.buttonLabels,n,e.text))},preferenceModal:{heading:t.preferenceModal.heading,subheading:t.preferenceModal.subheading,htmlText:Nr(jr(t.preferenceModal.htmlText)),buttons:i.buttons.map((e,n)=>a(t.preferenceModal.buttonLabels,n,e.text)),categories:t.preferenceModal.categories.map(e=>({id:e.id,heading:e.heading,htmlText:Nr(jr(e.htmlText))}))}}}function ai(e,t,n,r,i){let a=ii(e,t,n,r,i),o=[[`field`,`value`]],s=e=>`"${e.replace(/"/g,`""`)}"`;return o.push([`mainBanner.heading`,s(a.mainBanner.heading)]),o.push([`mainBanner.htmlText`,s(a.mainBanner.htmlText)]),a.mainBanner.buttons.forEach((e,t)=>o.push([`mainBanner.button.${t}`,s(e)])),o.push([`gpcBanner.heading`,s(a.gpcBanner.heading)]),o.push([`gpcBanner.htmlText`,s(a.gpcBanner.htmlText)]),a.gpcBanner.buttons.forEach((e,t)=>o.push([`gpcBanner.button.${t}`,s(e)])),o.push([`preferenceModal.heading`,s(a.preferenceModal.heading)]),o.push([`preferenceModal.subheading`,s(a.preferenceModal.subheading)]),o.push([`preferenceModal.htmlText`,s(a.preferenceModal.htmlText)]),a.preferenceModal.buttons.forEach((e,t)=>o.push([`preferenceModal.button.${t}`,s(e)])),a.preferenceModal.categories.forEach(e=>{o.push([`category.${e.id}.heading`,s(e.heading)]),o.push([`category.${e.id}.htmlText`,s(e.htmlText)])}),o.map(e=>e.join(`,`)).join(`
40
- `)}function oi(e){return Mr(Fr(e))}function si(e,t){return{mainBanner:{heading:String(e.mainBanner?.heading??t.mainBanner.heading),htmlText:oi(String(e.mainBanner?.htmlText??``)),buttonLabels:(e.mainBanner?.buttons??[]).map(String)},gpcBanner:{heading:String(e.gpcBanner?.heading??t.gpcBanner.heading),htmlText:oi(String(e.gpcBanner?.htmlText??``)),buttonLabels:(e.gpcBanner?.buttons??[]).map(String)},preferenceModal:{heading:String(e.preferenceModal?.heading??t.preferenceModal.heading),subheading:String(e.preferenceModal?.subheading??t.preferenceModal.subheading),htmlText:oi(String(e.preferenceModal?.htmlText??``)),buttonLabels:(e.preferenceModal?.buttons??[]).map(String),categories:t.preferenceModal.categories.map(t=>{let n=e.preferenceModal?.categories?.find(e=>e.id===t.id);return n?{id:t.id,heading:String(n.heading),htmlText:oi(String(n.htmlText??``))}:t})}}}function ci(e,t){let n={};e.split(/\r?\n/).slice(1).forEach(e=>{if(!e.trim())return;let t=e.match(/^([^,]+),(.*)$/);if(!t)return;let r=t[1].trim(),i=t[2].trim();i.startsWith(`"`)&&i.endsWith(`"`)&&(i=i.slice(1,-1).replace(/""/g,`"`)),n[r]=i});let r=structuredClone(t);n[`mainBanner.heading`]&&(r.mainBanner.heading=n[`mainBanner.heading`]),n[`mainBanner.htmlText`]!==void 0&&(r.mainBanner.htmlText=oi(n[`mainBanner.htmlText`])),n[`gpcBanner.heading`]&&(r.gpcBanner.heading=n[`gpcBanner.heading`]),n[`gpcBanner.htmlText`]!==void 0&&(r.gpcBanner.htmlText=oi(n[`gpcBanner.htmlText`])),n[`preferenceModal.heading`]&&(r.preferenceModal.heading=n[`preferenceModal.heading`]),n[`preferenceModal.subheading`]!==void 0&&(r.preferenceModal.subheading=n[`preferenceModal.subheading`]),n[`preferenceModal.htmlText`]!==void 0&&(r.preferenceModal.htmlText=oi(n[`preferenceModal.htmlText`]));let i=(e,t)=>{let r=[...t];for(let t=0;;t++){let i=`${e}.button.${t}`;if(n[i]===void 0)break;r[t]=n[i]}return r};return r.mainBanner.buttonLabels=i(`mainBanner`,r.mainBanner.buttonLabels),r.gpcBanner.buttonLabels=i(`gpcBanner`,r.gpcBanner.buttonLabels),r.preferenceModal.buttonLabels=i(`preferenceModal`,r.preferenceModal.buttonLabels),r.preferenceModal.categories=r.preferenceModal.categories.map(e=>{let t=`category.${e.id}.heading`,r=`category.${e.id}.htmlText`;return{...e,heading:n[t]??e.heading,htmlText:n[r]===void 0?e.htmlText:oi(n[r])}}),r}function li(e,t,n,r){let i={};for(let[a,o]of Object.entries(e))i[a]=ii(a,o,t,n,r);return JSON.stringify(i,null,2)}var ui=/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/i;function di(e,t){let n=JSON.parse(e);if(!n||typeof n!=`object`||Array.isArray(n))throw Error(`Invalid JSON`);let r=n;if(typeof r.locale==`string`){let e=r,n=e.locale;return ui.test(n)?{locales:{[n]:si(e,t)},skipped:[]}:{locales:{},skipped:[n]}}let i={},a=[];for(let[e,n]of Object.entries(r)){if(!ui.test(e)||!n||typeof n!=`object`||Array.isArray(n)){a.push(e);continue}try{i[e]=si(n,t)}catch{a.push(e)}}return{locales:i,skipped:a}}function fi(e,t,n){let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,a.style.display=`none`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}function pi(e){return e.replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim()}function mi(e){return(e.match(/[.!?]+/g)??[]).length||1}function hi(e){return e.split(/\s+/).filter(Boolean)}function gi(e){let t=[];if(e.heading&&e.heading.length>80&&t.push({field:`heading`,code:`heading_too_long`,value:e.heading.length}),e.htmlText){let n=pi(e.htmlText),r=hi(n),i=mi(n),a=r.length/i;a>25&&t.push({field:`htmlText`,code:`avg_sentence_too_long`,value:Math.round(a)}),r.length>150&&t.push({field:`htmlText`,code:`total_words_too_long`,value:r.length})}return t}function _i(e,t){let n=t===`opt-out`||t===`opt-out-strict`;return e.action===`custom`?e.cookies===`*`?n?`Allow All`:`Accept All`:e.cookies===`!`?n?`Opt Out`:`Reject All`:`Select`:e.action===`submit`?`Save Preferences`:e.action===`manage`?`Manage Preferences`:e.action===`close`?`Close`:e.action===`link`?`Learn More`:e.action}var vi={necessary:{heading:`Strictly Necessary`,htmlText:`Essential cookies required for core website functionality. Cannot be disabled.`},essential:{heading:`Essential`,htmlText:`Required for the website to function properly. Cannot be disabled.`},functional:{heading:`Functional`,htmlText:`Remember your preferences and settings to enhance your experience.`},preferences:{heading:`Preferences`,htmlText:`Store your personalisation choices and settings.`},analytics:{heading:`Analytics`,htmlText:`Help us understand how visitors interact with our site using anonymous statistics.`},statistics:{heading:`Statistics`,htmlText:`Collect anonymous data on how visitors use our website.`},marketing:{heading:`Marketing`,htmlText:`Deliver relevant advertisements and measure campaign effectiveness.`},advertising:{heading:`Advertising`,htmlText:`Show personalised ads based on your browsing interests.`},social:{heading:`Social Media`,htmlText:`Enable sharing content and interacting with social media platforms.`},performance:{heading:`Performance`,htmlText:`Help us measure and improve the performance and speed of our website.`}};function yi(e){let t=e.toLowerCase().replace(/[^a-z]/g,``);for(let[e,n]of Object.entries(vi))if(t.includes(e)||e.includes(t))return n;return{heading:e,htmlText:`Used to enable specific functionality on this website.`}}var bi={"opt-in":{mainBanner:{heading:`We use cookies`,htmlText:`We and our partners use cookies and similar technologies to personalise content, analyse traffic, and show targeted advertising. You can accept all, reject non-essential cookies, or manage your preferences.`},gpcBanner:{heading:`Global Privacy Control Detected`,htmlText:`We have recognised your Global Privacy Control (GPC) signal and applied your opt-out preference. You can review your settings at any time.`},preferenceModal:{heading:`Privacy Preferences`,subheading:`Manage your cookie settings`,htmlText:`Choose which types of cookies you allow. You can change your settings at any time by revisiting this panel.`}},"opt-out":{mainBanner:{heading:`Privacy Notice`,htmlText:`We use cookies and similar technologies on this site. Under applicable US state privacy laws, you have the right to opt out of the sale or sharing of your personal data. Review our Privacy Policy or manage your preferences below.`},gpcBanner:{heading:`Your Privacy Preference Recognised`,htmlText:`We detected a Global Privacy Control (GPC) signal from your browser and applied your opt-out of sale and sharing, as required under applicable US state privacy laws.`},preferenceModal:{heading:`Privacy Preferences`,subheading:`Your US privacy rights`,htmlText:`Manage your choices under US state privacy laws. You may opt out of the sale or sharing of your personal data at any time.`}},"opt-out-strict":{mainBanner:{heading:`Your California Privacy Rights`,htmlText:`Under the California Privacy Rights Act (CPRA), you have the right to opt out of the sale, sharing, and use of sensitive personal information. Manage your choices below.`},gpcBanner:{heading:`California Privacy Rights — GPC Recognised`,htmlText:`We have recognised your Global Privacy Control (GPC) signal and applied your opt-out of sale and sharing as required under the California Privacy Rights Act (CPRA).`},preferenceModal:{heading:`California Privacy Preferences`,subheading:`Manage your CPRA rights`,htmlText:`Exercise your CPRA rights: opt out of the sale of personal data, sharing for targeted advertising, and use of sensitive personal information.`}},"opt-in-dpdpa":{mainBanner:{heading:`We request your consent`,htmlText:`Under India's Digital Personal Data Protection Act (DPDPA), we ask for your consent before processing your personal data. You may withdraw consent at any time.`},gpcBanner:{heading:`Privacy Preference Noted`,htmlText:`Your privacy preference has been noted. Under the DPDPA, you have the right to withdraw consent for data processing at any time.`},preferenceModal:{heading:`Consent Preferences`,subheading:`Manage your data processing choices`,htmlText:`Review and provide consent for each purpose below. You have the right to withdraw consent at any time by contacting our Data Fiduciary.`}},"opt-in-china":{mainBanner:{heading:`We need your consent`,htmlText:`In accordance with China's Personal Information Protection Law (PIPL), Data Security Law (DSL), and Cybersecurity Law (CSL), we ask for your explicit consent before collecting and processing personal information.`},gpcBanner:{heading:`Privacy Preference Noted`,htmlText:`Your privacy preference has been recorded. You can review and manage your consent choices at any time.`},preferenceModal:{heading:`Personal Information Preferences`,subheading:`Manage your processing choices`,htmlText:`Please review the purposes for which we process your personal information and provide or withdraw consent as you see fit.`}},"opt-in-brazil":{mainBanner:{heading:`We use cookies`,htmlText:`In accordance with Brazil's Lei Geral de Proteção de Dados (LGPD), we ask for your consent to use non-essential cookies and process your personal data for the purposes below.`},gpcBanner:{heading:`Privacy Signal Recognised`,htmlText:`Your privacy preference signal has been recognised. Your choices will be applied in accordance with the LGPD.`},preferenceModal:{heading:`Privacy Preferences`,subheading:`Manage your LGPD rights`,htmlText:`Manage your data processing preferences. You have the right to withdraw consent at any time under Brazil's LGPD.`}},"general-privacy-consent":{mainBanner:{heading:`We use cookies`,htmlText:`We use cookies and similar tracking technologies to improve your browsing experience. By continuing to use this site, you acknowledge our use of cookies as described in our Privacy Policy.`},gpcBanner:{heading:`Privacy Signal Noted`,htmlText:`We have noted your privacy preference signal. You can manage your cookie choices at any time.`},preferenceModal:{heading:`Cookie Preferences`,subheading:`Manage your settings`,htmlText:`Manage your cookie preferences below. You may change your choices at any time.`}},"notice-only":{mainBanner:{heading:`Cookie Notice`,htmlText:`This website uses cookies to ensure you get the best experience. By continuing to browse, you agree to our use of cookies as described in our Privacy Policy.`},gpcBanner:{heading:`Privacy Preference Noted`,htmlText:`Your privacy preference has been noted. You can review our cookie settings below.`},preferenceModal:{heading:`Cookie Settings`,subheading:`Cookie information`,htmlText:`This site uses cookies. You can review details about the cookies we use below.`}}},xi={mainBanner:{heading:`We use cookies`,htmlText:`We use cookies to improve your experience on our website. Please review your privacy preferences below.`},gpcBanner:{heading:`Global Privacy Control Detected`,htmlText:`We have recognised your Global Privacy Control (GPC) signal and applied your preference.`},preferenceModal:{heading:`Privacy Preferences`,subheading:`Manage your cookie settings`,htmlText:`Choose which cookies you want to allow. You can change your settings at any time.`}};function Si(e,t){let n=bi[e]??xi;return{mainBanner:{heading:n.mainBanner.heading,htmlText:n.mainBanner.htmlText,buttonLabels:t.mainBanner.buttons.map(t=>_i(t,e))},gpcBanner:{heading:n.gpcBanner.heading,htmlText:n.gpcBanner.htmlText,buttonLabels:t.gpcBanner.buttons.map(t=>_i(t,e))},preferenceModal:{heading:n.preferenceModal.heading,subheading:n.preferenceModal.subheading,htmlText:n.preferenceModal.htmlText,buttonLabels:t.preferenceModal.buttons.map(t=>_i(t,e)),categories:t.preferenceModal.categories.map(e=>({id:e.id,...yi(e.id)}))}}}function Ci({step:e,labels:t,disabledSteps:n=[]}){return W(`div`,{class:`flex items-center gap-0 mb-6`,children:t.map((r,i)=>{let a=i+1,o=n.includes(a),s=e>a&&!o,c=e===a;return W(`div`,{class:`flex items-center flex-1 last:flex-none`,children:[W(`div`,{class:`flex items-center gap-2 shrink-0`,children:[W(`div`,{class:`w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold transition-colors ${o?`bg-gray-100 text-gray-300`:s?`bg-green-500 text-white`:c?`bg-blue-600 text-white`:`bg-gray-200 text-gray-500`}`,children:s?W(jt,{size:14}):a}),W(`span`,{class:`text-sm font-medium hidden sm:block ${o?`text-gray-300 line-through`:c?`text-blue-600`:s?`text-green-600`:`text-gray-400`}`,children:r})]}),i<t.length-1&&W(`div`,{class:`h-px flex-1 mx-3 ${e>a?`bg-green-400`:`bg-gray-200`}`})]},a)})})}function wi(e){return{mainBanner:{heading:``,htmlText:``,buttonLabels:e.mainBanner.buttons.map(e=>e.text)},gpcBanner:{heading:``,htmlText:``,buttonLabels:e.gpcBanner.buttons.map(e=>e.text)},preferenceModal:{heading:``,subheading:``,htmlText:``,buttonLabels:e.preferenceModal.buttons.map(e=>e.text),categories:e.preferenceModal.categories.map(e=>({id:e.id,heading:``,htmlText:``}))}}}function Ti(e,t){return{...e,mainBanner:{...e.mainBanner,buttonLabels:t.mainBanner.buttons.map((t,n)=>e.mainBanner.buttonLabels[n]??t.text)},gpcBanner:{...e.gpcBanner,buttonLabels:t.gpcBanner.buttons.map((t,n)=>e.gpcBanner.buttonLabels[n]??t.text)},preferenceModal:{...e.preferenceModal,buttonLabels:t.preferenceModal.buttons.map((t,n)=>e.preferenceModal.buttonLabels[n]??t.text),categories:t.preferenceModal.categories.map(t=>({id:t.id,heading:e.preferenceModal.categories.find(e=>e.id===t.id)?.heading??``,htmlText:e.preferenceModal.categories.find(e=>e.id===t.id)?.htmlText??``}))}}}function Ei(e,t,n,r){let i=r[n]??wi(t);return{cookies:e.cookies,defaultLocale:n,translations:{[n]:{mainBanner:{position:t.mainBanner.position,overlayOpacity:t.mainBanner.overlayOpacity,showClose:t.mainBanner.showClose,showLocaleSwitcher:t.mainBanner.showLocaleSwitcher,headingTag:t.mainBanner.headingTag,heading:i.mainBanner.heading,htmlText:i.mainBanner.htmlText,buttons:t.mainBanner.buttons.map((e,t)=>({text:i.mainBanner.buttonLabels[t]??e.text,type:e.type,action:e.action,...e.cookies==null?{}:{cookies:e.cookies},...e.url==null?{}:{url:e.url}}))},gpcBanner:{position:t.gpcBanner.position,overlayOpacity:t.gpcBanner.overlayOpacity,showClose:t.gpcBanner.showClose,showLocaleSwitcher:t.gpcBanner.showLocaleSwitcher,headingTag:t.gpcBanner.headingTag,heading:i.gpcBanner.heading,htmlText:i.gpcBanner.htmlText,buttons:t.gpcBanner.buttons.map((e,t)=>({text:i.gpcBanner.buttonLabels[t]??e.text,type:e.type,action:e.action,...e.cookies==null?{}:{cookies:e.cookies},...e.url==null?{}:{url:e.url}}))},preferenceModal:{position:t.preferenceModal.position,overlayOpacity:t.preferenceModal.overlayOpacity,showClose:t.preferenceModal.showClose,showLocaleSwitcher:t.preferenceModal.showLocaleSwitcher,persistent:t.preferenceModal.persistent,headingTag:t.preferenceModal.headingTag,heading:i.preferenceModal.heading,...t.preferenceModal.hasSubheading&&i.preferenceModal.subheading?{subheading:i.preferenceModal.subheading}:{},...i.preferenceModal.htmlText?{htmlText:i.preferenceModal.htmlText}:{},buttons:t.preferenceModal.buttons.map((e,t)=>({text:i.preferenceModal.buttonLabels[t]??e.text,type:e.type,action:e.action,...e.cookies==null?{}:{cookies:e.cookies},...e.url==null?{}:{url:e.url}})),categories:t.preferenceModal.categories.map(e=>{let t=i.preferenceModal.categories.find(t=>t.id===e.id);return{id:e.id,heading:t?.heading||e.id,headingTag:e.headingTag,htmlText:t?.htmlText??``,mandatory:e.mandatory,type:e.type,...e.liEnabled?{legitimateInterest:{enabled:!0}}:{},cookies:e.cookies}})}}}}}var Di={heading_too_long:`readability.headingTooLong`,avg_sentence_too_long:`readability.avgSentenceLong`,total_words_too_long:`readability.totalWordsLong`};function Oi({heading:e,htmlText:t}){let n=J(),r=gi({...e===void 0?{}:{heading:e},...t===void 0?{}:{htmlText:t}});return r.length?W(`div`,{class:`mt-1 space-y-0.5`,children:r.map((e,t)=>W(`p`,{class:`text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1`,children:n(Di[e.code]??`readability.headingTooLong`,{n:e.value})},t))}):null}function ki({cookies:e,labels:t}){return e.length?W(`div`,{class:`overflow-x-auto`,children:W(`table`,{class:`w-full text-xs`,children:[W(`thead`,{children:W(`tr`,{class:`text-left text-gray-500 border-b border-gray-200`,children:[W(`th`,{scope:`col`,class:`pb-2 pr-3 pl-1 font-medium`,children:t.id}),W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium`,children:t.legalBasis}),W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium text-center`,children:t.gpc}),W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium`,children:t.expiry}),W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium`,children:t.tcfVendor}),W(`th`,{scope:`col`,class:`pb-2 font-medium`,children:t.cpraCategory})]})}),W(`tbody`,{children:e.map(e=>W(`tr`,{class:`border-b border-gray-100 last:border-0`,children:[W(`td`,{class:`py-1.5 pr-3 pl-1 font-mono text-gray-800`,children:e.id}),W(`td`,{class:`py-1.5 pr-3 text-gray-600`,children:e.legalBasis??e.type??`consent`}),W(`td`,{class:`py-1.5 pr-3 text-center text-gray-600`,children:e.listenGpc?`✓`:`–`}),W(`td`,{class:`py-1.5 pr-3 text-gray-600`,children:e.expiry==null?`–`:`${e.expiry}d`}),W(`td`,{class:`py-1.5 pr-3 text-gray-600`,children:e.tcfVendorId??`–`}),W(`td`,{class:`py-1.5 text-gray-600`,children:e.cpraCategory??`–`})]},e.id))})]})}):W(`p`,{class:`text-xs text-gray-400 italic`,children:t.noNoCookies})}function Ai({id:e,current:t}){let n=J(),r=!e||e===`new`,[i,a]=R(``),[o,s]=R(`en`),[c,l]=R([]),[u,d]=R([]),[f,p]=R(``),[m,h]=R(``),[g,_]=R(!1),[v,y]=R(!1),[b,x]=R(!1),[S,w]=R(``),[T,E]=R(``),[D,O]=R(``),[k,ee]=R([]),[te,ne]=R([]),[A,j]=R(``),[re,ie]=R(null),[ae,oe]=R(``),[M,se]=R(null),[N,ce]=R(`en`),[P,F]=R({}),[le,ue]=R(``),[de,fe]=R([]),[I,pe]=R([]),me=B(null),[he,ge]=R([]),[L,_e]=R([]),[ve,ye]=R(!1),[be,xe]=R(null),[Se,Ce]=R(null),[we,V]=R(1),[Te,Ee]=R(!r),[De,Oe]=R(!1),[H,U]=R(``),ke=B(r);z(()=>{Promise.all([Q.list(),$.list()]).then(([e,t])=>{ee(e),ne(t)}).catch(()=>{})},[]),z(()=>{r||Z.get(e).then(e=>{let t=e;a(t.name),s(t.defaultLocale),ce(t.defaultLocale);let n=t.profileJson;Array.isArray(n.regulations)?d(n.regulations):typeof n.regulation==`string`&&n.regulation&&d([n.regulation]),Array.isArray(n.allowedOrigins)&&l(n.allowedOrigins),typeof n.complianceGroup==`string`&&p(n.complianceGroup),n.gpcMode!==void 0&&h(String(n.gpcMode)),n.darkMode===!0&&_(!0),n.hidePoweredBy===!0&&y(!0),n.allowReceipt===!0&&x(!0),n.localeContents&&typeof n.localeContents==`object`&&F(n.localeContents),n.dpdpa&&(w(n.dpdpa.dataFiduciary??``),E(n.dpdpa.grievanceEmail??``),O(n.dpdpa.purposeDescription??``));let r=n.cookieTemplateId,i=n.uiTemplateId;r&&(j(r),Q.get(r).then(ie).catch(()=>{})),i&&(oe(i),$.get(i).then(se).catch(()=>{}))}).catch(()=>U(n(`profileEditor.error.load`))).finally(()=>{Ee(!1),ke.current=!0})},[e,r]),z(()=>{if(!ke.current)return;if(!f){h(``);return}let e=Cr[f];e&&(h(e.defaultGpc),x(f.startsWith(`opt-in`)))},[f]);let Ae=e=>{if(j(e),!e){ie(null);return}Q.get(e).then(ie).catch(()=>ie(null))},je=e=>{if(oe(e),!e){se(null);return}$.get(e).then(e=>{se(e),F(t=>{let n=Object.keys(t),r=n.length?n:[o],i={};for(let n of r)i[n]=t[n]?Ti(t[n],e):wi(e);return i})}).catch(()=>se(null))},Me=e=>{F(t=>({...t,[e]:M?wi(M):{mainBanner:{heading:``,htmlText:``,buttonLabels:[]},gpcBanner:{heading:``,htmlText:``,buttonLabels:[]},preferenceModal:{heading:``,subheading:``,htmlText:``,buttonLabels:[],categories:[]}}})),ce(e)},Ne=(e,t,n)=>{F(r=>({...r,[N]:{...r[N],[e]:{...r[N][e],[t]:n}}}))},Pe=(e,t)=>{F(n=>({...n,[N]:{...n[N],preferenceModal:{...n[N].preferenceModal,[e]:t}}}))},Fe=(e,t,n)=>{F(r=>{let i=[...r[N]?.preferenceModal.categories??[]];return i[e]={...i[e],[t]:n},{...r,[N]:{...r[N],preferenceModal:{...r[N].preferenceModal,categories:i}}}})},G=(e,t,n)=>{F(r=>{let i=r[N],a=[...i[e].buttonLabels??[]];return a[t]=n,{...r,[N]:{...i,[e]:{...i[e],buttonLabels:a}}}})},Ie=e=>{if(!M)return;let t=Si(f,M);F(n=>{let r=n[N]??wi(M);return{...n,[N]:{...r,[e]:t[e]}}})},Le=()=>{!M||!Object.keys(P).length||fi(li(P,M.mainBanner,M.gpcBanner,M.preferenceModal),`locales.json`,`application/json`)},Re=()=>{let e=P[N];!e||!M||fi(ai(N,e,M.mainBanner,M.gpcBanner,M.preferenceModal),`locale-${N}.csv`,`text/csv`)},ze=e=>{ue(``),fe([]),pe([]);let t=new FileReader;t.onload=t=>{let r=t.target?.result;try{let t=P[o]??P[N]??(M?wi(M):{mainBanner:{heading:``,htmlText:``,buttonLabels:[]},gpcBanner:{heading:``,htmlText:``,buttonLabels:[]},preferenceModal:{heading:``,subheading:``,htmlText:``,buttonLabels:[],categories:[]}});if(e.name.endsWith(`.csv`)){let e=ci(r,P[N]??t);F(t=>({...t,[N]:e})),fe([N])}else{let{locales:e,skipped:n}=di(r,t);F(t=>({...t,...e}));let i=Object.keys(e);fe(i),pe(n);let a=i.find(e=>!Object.keys(P).includes(e))??i[0];a&&ce(a)}}catch{ue(n(`profileEditor.content.importError`))}},t.readAsText(e)},Be=re&&M?Ei(re,M,o,P):null,Ve=e=>{let t=(u.includes(`dpdpa`)||Cr[f]?.requiresDpdpaDisclosure)&&S.trim()&&T.trim()?{dataFiduciary:S.trim(),grievanceEmail:T.trim(),...D.trim()?{purposeDescription:D.trim()}:{}}:void 0;return{name:i,defaultLocale:o,...e?{choice:e}:{},profileJson:{cookieTemplateId:A,uiTemplateId:ae,defaultLocale:o,...u.length>0?{regulations:u}:{},...f?{complianceGroup:f}:{},...m?{gpcMode:m===`true`?!0:m===`false`?!1:m}:{},...c.length>0?{allowedOrigins:c}:{},...t?{dpdpa:t}:{},...g?{darkMode:!0}:{},...v?{hidePoweredBy:!0}:{},...b?{allowReceipt:!0}:{},localeContents:P}}},He=async t=>{Oe(!0),U(``);try{let n=Ve(t),i=r?await Z.create(n):await Z.update(e,n);if(i.requiresChoice){Ce(n),xe(i.conflict);return}window.location.hash=`#/banners/profiles`}catch{U(n(`profileEditor.error.failed`))}finally{Oe(!1)}},Ue=async()=>{if(!i.trim()){U(n(`profileEditor.error.nameRequired`)),V(1);return}if(!A){U(n(`profileEditor.error.cookieRequired`)),V(2);return}if(!ae){U(n(`profileEditor.error.uiRequired`)),V(2);return}await He()},We=async e=>{xe(null),Ce(null),await He(e)},Ge=m===`ignore`||m===``&&(!f||Cr[f]?.defaultGpc===`ignore`),Ke=u.includes(`dpdpa`)||Cr[f]?.requiresDpdpaDisclosure===!0,K=P[N],qe=N===o?void 0:P[o],Je=Object.keys(P).length?Object.keys(P):[o],Ye={noNoCookies:n(`profileEditor.table.noNoCookies`),id:n(`profileEditor.table.id`),legalBasis:n(`profileEditor.table.legalBasis`),gpc:n(`profileEditor.table.gpc`),expiry:n(`profileEditor.table.expiry`),tcfVendor:n(`profileEditor.table.tcfVendor`),cpraCategory:n(`profileEditor.table.cpraCategory`)};if(Te)return W(X,{title:n(`profileEditor.title.loading`),current:t,children:W(`p`,{class:`text-gray-400 text-sm`,role:`status`,"aria-live":`polite`,children:n(`common.loading`)})});let Xe=[n(`profileEditor.step.config`),n(`profileEditor.step.templates`),n(`profileEditor.step.mainBanner`),n(`profileEditor.step.gpcBanner`),n(`profileEditor.step.prefModal`)],Ze=({showImportExport:e,section:t})=>W(`div`,{class:`flex flex-wrap items-start justify-between gap-3 mb-4`,children:[W(Ar,{locales:Je,defaultLocale:o,activeLocale:N,onSelect:ce,onAdd:Me}),W(`div`,{class:`flex items-center gap-1.5 shrink-0`,children:[W(`button`,{type:`button`,onClick:()=>Ie(t),disabled:!M,class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-purple-300 rounded hover:bg-purple-50 text-purple-700 transition-colors disabled:opacity-40`,title:n(`profileEditor.content.loadDefaultsTitle`),children:[W(jn,{size:12,"aria-hidden":`true`}),` `,n(`profileEditor.content.loadDefaults`)]}),e&&W(C,{children:[W(`button`,{type:`button`,onClick:Le,disabled:!M,class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-gray-300 rounded hover:bg-gray-50 text-gray-600 transition-colors disabled:opacity-40`,title:n(`profileEditor.export.jsonTitle`),children:[W(Ht,{size:12,"aria-hidden":`true`}),` `,n(`profileEditor.export.json`)]}),W(`button`,{type:`button`,onClick:Re,disabled:!M,class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-gray-300 rounded hover:bg-gray-50 text-gray-600 transition-colors disabled:opacity-40`,title:n(`profileEditor.export.csvTitle`),children:[W(Ht,{size:12,"aria-hidden":`true`}),` `,n(`profileEditor.export.csv`)]}),W(`label`,{class:`flex items-center gap-1 text-xs px-2.5 py-1.5 border border-blue-300 rounded hover:bg-blue-50 text-blue-600 cursor-pointer transition-colors`,title:n(`profileEditor.export.importTitle`),children:[W(kn,{size:12,"aria-hidden":`true`}),` `,n(`profileEditor.export.import`),W(`input`,{ref:me,type:`file`,accept:`.json,.csv`,class:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&ze(t),e.target.value=``}})]})]})]})]});return W(X,{title:n(r?`profileEditor.title.new`:`profileEditor.title.edit`),current:t,children:[be&&at(W(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[W(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>xe(null),"aria-hidden":`true`}),W(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[W(`h3`,{class:`text-sm font-semibold text-gray-900`,children:n(`profileEditor.conflict.title`)}),W(`p`,{class:`text-sm text-gray-600`,children:n(`profileEditor.conflict.message`,{name:be.name})}),W(`div`,{class:`flex flex-col gap-2 pt-1`,children:[W(`button`,{type:`button`,onClick:()=>We(`deactivate`),class:`w-full bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:n(`profileEditor.conflict.deactivate`,{name:be.name})}),W(`button`,{type:`button`,onClick:()=>We(`inactive`),class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:n(`profileEditor.conflict.saveInactive`)}),W(`button`,{type:`button`,onClick:()=>{xe(null),Ce(null)},class:`w-full text-gray-400 px-4 py-1.5 text-sm hover:text-gray-600 transition-colors`,children:n(`common.cancel`)})]})]})]}),document.body),W(Ci,{step:we,labels:Xe,disabledSteps:Ge?[4]:[]}),we===1&&W(`div`,{class:`space-y-5`,children:[W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5 space-y-4`,children:[W(`div`,{class:`grid grid-cols-2 gap-4`,children:[W(`div`,{children:[W(`label`,{for:`profile-name`,class:`block text-sm font-medium text-gray-700 mb-1`,children:[n(`profileEditor.config.profileName`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{id:`profile-name`,class:`w-full border rounded px-3 py-2 text-sm ${!i.trim()&&H?`border-red-400`:`border-gray-300`}`,value:i,onInput:e=>a(e.target.value),placeholder:n(`profileEditor.config.profileNamePlaceholder`),required:!0,"aria-required":`true`})]}),W(`div`,{children:[W(`label`,{for:`default-locale`,class:`block text-sm font-medium text-gray-700 mb-1`,children:n(`profileEditor.config.defaultLocale`)}),W(kr,{id:`default-locale`,value:o,onChange:s,placeholder:n(`profileEditor.config.selectDefaultLocale`)})]})]}),W(`div`,{children:[W(`label`,{class:`block text-sm font-medium text-gray-700 mb-1`,children:[n(`profileEditor.config.allowedDomains`),W(`span`,{class:`ml-1.5 text-xs font-normal text-gray-400`,children:n(`profileEditor.config.allowedDomainsHint`)})]}),W(qr,{value:c,onChange:l})]}),W(`div`,{children:[W(`label`,{class:`block text-sm font-medium text-gray-700 mb-2`,children:[n(`profileEditor.config.complianceGroup`),W(`span`,{class:`ml-1.5 text-xs font-normal text-gray-400`,children:[`(`,n(`common.optional`),`)`]})]}),W(`div`,{class:`grid md:grid-cols-2 lg:grid-cols-3 gap-2`,children:[Object.entries(Cr).map(([e,t])=>W(`label`,{class:`flex flex-col gap-1 p-3 border rounded-lg cursor-pointer transition-colors select-none ${f===e?`border-blue-400 bg-blue-50`:`border-gray-200 hover:border-gray-300 bg-white`}`,children:[W(`div`,{class:`flex items-center gap-2`,children:[W(`input`,{type:`radio`,name:`complianceGroup`,class:`accent-blue-600 shrink-0`,checked:f===e,onChange:()=>p(f===e?``:e)}),W(`span`,{class:`text-sm font-medium text-gray-700 leading-tight`,children:t.label})]}),W(`div`,{class:`ml-5 flex flex-wrap gap-1`,children:[W(`p`,{class:`text-[11px] text-gray-500 py-2`,children:t.description}),t.compliances.map(e=>W(`span`,{class:`text-[10px] bg-gray-100 text-gray-400 px-1.5 py-0.5 rounded font-mono`,children:e},e))]})]},e)),W(`label`,{class:`flex items-center gap-2 p-3 border rounded-lg cursor-pointer transition-colors select-none ${f?`border-gray-200 hover:border-gray-300 bg-white`:`border-gray-400 bg-gray-50`}`,children:[W(`input`,{type:`radio`,name:`complianceGroup`,class:`accent-gray-600 shrink-0`,checked:!f,onChange:()=>p(``)}),W(`span`,{class:`text-sm font-medium text-gray-600`,children:n(`profileEditor.config.complianceGroupNone`)})]})]})]}),W(`hr`,{class:`my-7 text-gray-300`}),W(`div`,{class:`grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3`,children:[W(`div`,{children:[W(`label`,{for:`gpc-mode`,class:`block text-sm font-medium text-gray-700 mb-1`,children:[n(`profileEditor.config.gpcMode`),W(`span`,{class:`ml-1.5 text-xs font-normal text-gray-400`,children:[`(`,n(`common.optional`),`)`]})]}),W(Dr,{id:`gpc-mode`,options:[{value:``,label:n(`profileEditor.config.gpcModeDefault`)},...wr.map(e=>({value:e.value,label:`${e.label} — ${e.description}`}))],value:m,onChange:h,placeholder:n(`profileEditor.config.gpcModePlaceholder`)})]}),[{checked:g,onChange:_,label:n(`profileEditor.config.darkMode`),hint:n(`profileEditor.config.darkModeHint`)},{checked:v,onChange:y,label:n(`profileEditor.config.hidePoweredBy`),hint:n(`profileEditor.config.hidePoweredByHint`)},{checked:b,onChange:x,label:n(`profileEditor.config.allowReceipt`),hint:n(`profileEditor.config.allowReceiptHint`)}].map(({checked:e,onChange:t,label:n,hint:r})=>W(`label`,{class:`flex items-start gap-2.5 p-3 border border-gray-200 rounded-lg cursor-pointer hover:border-gray-300 bg-white select-none`,children:[W(`input`,{type:`checkbox`,class:`mt-2 accent-blue-600 shrink-0`,checked:e,onChange:e=>t(e.target.checked)}),W(`div`,{children:[W(`span`,{class:`text-sm font-medium text-gray-700`,children:n}),W(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:r})]})]},n))]}),Ke&&W(`div`,{class:`border border-amber-200 bg-amber-50 rounded-lg p-4 space-y-3`,children:[W(`p`,{class:`text-xs font-semibold text-amber-800`,children:n(`profileEditor.config.dpdpa.heading`)}),W(`div`,{class:`grid grid-cols-2 gap-3`,children:[W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-700 mb-1`,children:[n(`profileEditor.config.dpdpa.fiduciary`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:S,onInput:e=>w(e.target.value),placeholder:n(`profileEditor.config.dpdpa.fiduciaryPlaceholder`)})]}),W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-700 mb-1`,children:[n(`profileEditor.config.dpdpa.grievanceEmail`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{type:`email`,class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:T,onInput:e=>E(e.target.value),placeholder:n(`profileEditor.config.dpdpa.grievanceEmailPlaceholder`)})]})]}),W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-700 mb-1`,children:n(`profileEditor.config.dpdpa.purpose`)}),W(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:D,onInput:e=>O(e.target.value),placeholder:n(`profileEditor.config.dpdpa.purposePlaceholder`)})]})]})]}),H&&W(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:H}),W(`div`,{class:`flex justify-between`,children:[W(`a`,{href:`#/banners/profiles`,class:`px-5 py-2 rounded-lg text-sm text-red-600 hover:bg-red-100 transition-colors`,children:n(`common.cancel`)}),W(`button`,{type:`button`,onClick:()=>{if(!i.trim()){U(n(`profileEditor.error.nameRequiredContinue`));return}U(``),V(2)},class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[n(`profileEditor.nav.nextTemplates`),` `,W(Pt,{size:14,"aria-hidden":`true`})]})]})]}),we===2&&W(`div`,{class:`space-y-5`,children:[W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[W(`div`,{class:`flex items-start justify-between gap-4 mb-3`,children:[W(`div`,{children:[W(`h3`,{class:`text-sm font-semibold text-gray-700`,children:n(`profileEditor.templates.cookieTemplate`)}),W(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:n(`profileEditor.templates.cookieTemplateHint`)})]}),W(`a`,{href:`#/banners/cookie-templates/new`,class:`text-xs text-blue-600 hover:underline whitespace-nowrap shrink-0`,target:`_blank`,children:n(`profileEditor.newLink`)})]}),W(`select`,{class:`border border-gray-300 rounded px-3 py-2 text-sm w-full max-w-sm mb-4`,value:A,onChange:e=>Ae(e.target.value),children:[W(`option`,{value:``,children:n(`profileEditor.templates.selectCookie`)}),k.map(e=>W(`option`,{value:e.id,children:[e.name,` (`,e.cookies.length,` cookie`,e.cookies.length===1?``:`s`,`)`]},e.id))]}),re?W(ki,{cookies:re.cookies,labels:Ye}):W(`p`,{class:`text-xs text-gray-400 italic`,children:n(`profileEditor.templates.noTemplate`)})]}),W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[W(`div`,{class:`flex items-start justify-between gap-4 mb-3`,children:[W(`div`,{children:[W(`h3`,{class:`text-sm font-semibold text-gray-700`,children:n(`profileEditor.templates.uiTemplate`)}),W(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:n(`profileEditor.templates.uiTemplateHint`)})]}),W(`a`,{href:`#/banners/ui-templates/new`,class:`text-xs text-blue-600 hover:underline whitespace-nowrap shrink-0`,target:`_blank`,children:n(`profileEditor.newLink`)})]}),W(`select`,{class:`border border-gray-300 rounded px-3 py-2 text-sm w-full max-w-sm mb-4`,value:ae,onChange:e=>je(e.target.value),children:[W(`option`,{value:``,children:n(`profileEditor.templates.selectUi`)}),te.map(e=>W(`option`,{value:e.id,children:e.name},e.id))]}),M&&W(`div`,{class:`flex flex-wrap gap-3 text-xs text-gray-500`,children:[W(`span`,{children:[n(`uiTemplates.mainBanner`),` `,W(`strong`,{class:`text-gray-700`,children:M.mainBanner.position})]}),W(`span`,{children:[n(`uiTemplates.gpcBanner`),` `,W(`strong`,{class:`text-gray-700`,children:M.gpcBanner.position})]}),W(`span`,{children:[n(`uiTemplates.modal`),` `,W(`strong`,{class:`text-gray-700`,children:M.preferenceModal.position})]}),W(`span`,{children:[W(`strong`,{class:`text-gray-700`,children:M.preferenceModal.categories.length}),` `,n(`profileEditor.templates.categoriesCount`)]}),W(`span`,{children:[W(`strong`,{class:`text-gray-700`,children:M.mainBanner.buttons.length+M.preferenceModal.buttons.length}),` `,n(`profileEditor.templates.buttonsTotal`)]})]})]}),Be?W(ri,{draft:Be,expandable:!0}):W(`div`,{class:`bg-gray-50 border border-dashed border-gray-300 rounded-lg p-6 text-center text-xs text-gray-400`,children:n(`profileEditor.templates.previewPrompt`)}),H&&W(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:H}),he.length>0&&W(`div`,{class:`bg-red-50 border border-red-200 rounded-lg px-4 py-3 space-y-1`,children:[W(`p`,{class:`text-xs font-semibold text-red-700`,children:n(`profileEditor.compliance.errors.heading`)}),he.map((e,t)=>W(`p`,{class:`text-xs text-red-600`,children:[`• [`,e.cookieId,`] `,e.message]},t))]}),L.length>0&&W(`div`,{class:`bg-amber-50 border border-amber-200 rounded-lg px-4 py-3 space-y-2`,children:[W(`p`,{class:`text-xs font-semibold text-amber-800`,children:n(`profileEditor.compliance.warnings.heading`)}),L.map((e,t)=>W(`p`,{class:`text-xs text-amber-700`,children:[`• [`,e.cookieId,`] `,e.message]},t)),W(`label`,{class:`flex items-center gap-2 mt-1 cursor-pointer`,children:[W(`input`,{type:`checkbox`,class:`accent-amber-700`,checked:ve,onChange:e=>ye(e.target.checked)}),W(`span`,{class:`text-xs text-amber-800 font-medium`,children:n(`profileEditor.compliance.warnings.acknowledge`)})]})]}),W(`div`,{class:`flex justify-between`,children:[W(`button`,{type:`button`,onClick:()=>{U(``),V(1)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[W(Nt,{size:14,"aria-hidden":`true`}),` `,n(`common.back`)]}),W(`button`,{type:`button`,onClick:async()=>{if(!A){U(n(`profileEditor.error.cookieContinue`));return}if(!ae){U(n(`profileEditor.error.uiContinue`));return}if(f&&re)try{let e=await Z.validateCompliance({complianceGroup:f,cookies:re.cookies});if(ge(e.errors??[]),_e(e.warnings??[]),!e.valid&&(e.errors??[]).length>0||(e.warnings??[]).length>0&&!ve)return}catch{}!P[o]&&M&&F(e=>({...e,[o]:wi(M)})),ce(o),U(``),V(3)},class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[n(`profileEditor.nav.nextMainBanner`),` `,W(Pt,{size:14,"aria-hidden":`true`})]})]})]}),we===3&&W(`div`,{class:`space-y-5`,children:[W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[W(Ze,{showImportExport:!0,section:`mainBanner`}),le&&W(`p`,{class:`text-xs text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2 mb-3`,children:le}),de.length>0&&W(`p`,{class:`text-xs text-green-700 bg-green-50 border border-green-200 rounded px-3 py-2 mb-3`,children:n(de.length===1?`profileEditor.import.importedSingular`:`profileEditor.import.imported`,{n:de.length,list:de.join(`, `)})}),I.length>0&&W(`p`,{class:`text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-3 py-2 mb-3`,children:n(I.length===1?`profileEditor.import.skippedSingular`:`profileEditor.import.skipped`,{n:I.length,list:I.join(`, `)})}),W(`p`,{class:`text-xs text-purple-600 bg-purple-50 border border-purple-100 rounded px-3 py-1.5 mb-4`,children:n(`profileEditor.content.loadDefaultsNotice`)}),K&&M?W(`div`,{class:`space-y-3`,children:[W(`h4`,{class:`text-xs font-semibold text-gray-700 uppercase tracking-wide`,children:n(`profileEditor.content.mainBanner`)}),W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[n(`profileEditor.content.heading`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:K.mainBanner.heading,onInput:e=>Ne(`mainBanner`,`heading`,e.target.value),placeholder:qe?.mainBanner.heading||n(`profileEditor.content.mainBannerHeadingPlaceholder`)}),W(Oi,{heading:K.mainBanner.heading})]}),W(Br,{label:n(`profileEditor.content.bodyText`),value:K.mainBanner.htmlText,onChange:e=>Ne(`mainBanner`,`htmlText`,e),placeholder:n(`profileEditor.content.mainBannerBodyPlaceholder`),rows:4}),W(Oi,{htmlText:K.mainBanner.htmlText}),M.mainBanner.buttons.length>0&&W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1.5`,children:n(`profileEditor.content.buttonLabels`)}),W(`div`,{class:`grid grid-cols-3 gap-3`,children:M.mainBanner.buttons.map((e,t)=>W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-400 mb-1`,children:[e.action,` `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-sm`,value:K.mainBanner.buttonLabels[t]??``,onInput:e=>G(`mainBanner`,t,e.target.value),placeholder:e.text})]},t))})]})]}):W(`p`,{class:`text-xs text-gray-400 italic py-4 text-center`,children:n(ae&&!M?`profileEditor.content.loadingTemplate`:`profileEditor.content.noContent`)})]}),Be&&W(ri,{draft:Be,expandable:!0,previewMode:`main`}),H&&W(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:H}),W(`div`,{class:`flex justify-between`,children:[W(`button`,{type:`button`,onClick:()=>{U(``),V(2)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[W(Nt,{size:14,"aria-hidden":`true`}),` `,n(`common.back`)]}),W(`button`,{type:`button`,onClick:()=>{U(``),V(Ge?5:4)},class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[n(Ge?`profileEditor.nav.nextPrefModal`:`profileEditor.nav.nextGpcBanner`),` `,W(Pt,{size:14,"aria-hidden":`true`})]})]})]}),we===4&&W(`div`,{class:`space-y-5`,children:[W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[W(Ze,{section:`gpcBanner`}),W(`p`,{class:`text-xs text-purple-600 bg-purple-50 border border-purple-100 rounded px-3 py-1.5 mb-4`,children:n(`profileEditor.content.loadDefaultsNotice`)}),K&&M?W(`div`,{class:`space-y-3`,children:[W(`h4`,{class:`text-xs font-semibold text-gray-700 uppercase tracking-wide`,children:n(`profileEditor.content.gpcBanner`)}),W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:n(`profileEditor.content.heading`)}),W(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:K.gpcBanner.heading,onInput:e=>Ne(`gpcBanner`,`heading`,e.target.value),placeholder:qe?.gpcBanner.heading||n(`profileEditor.content.gpcHeadingPlaceholder`)}),W(Oi,{heading:K.gpcBanner.heading})]}),W(Br,{label:n(`profileEditor.content.bodyText`),value:K.gpcBanner.htmlText,onChange:e=>Ne(`gpcBanner`,`htmlText`,e),rows:3}),W(Oi,{htmlText:K.gpcBanner.htmlText}),M.gpcBanner.buttons.length>0&&W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1.5`,children:n(`profileEditor.content.buttonLabels`)}),W(`div`,{class:`grid grid-cols-3 gap-3`,children:M.gpcBanner.buttons.map((e,t)=>W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-400 mb-1`,children:[e.action,` `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-sm`,value:K.gpcBanner.buttonLabels[t]??``,onInput:e=>G(`gpcBanner`,t,e.target.value),placeholder:e.text})]},t))})]})]}):W(`p`,{class:`text-xs text-gray-400 italic py-4 text-center`,children:n(ae&&!M?`profileEditor.content.loadingTemplate`:`profileEditor.content.noContent`)})]}),Be&&W(ri,{draft:Be,expandable:!0,previewMode:`gpc`}),H&&W(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:H}),W(`div`,{class:`flex justify-between`,children:[W(`button`,{type:`button`,onClick:()=>{U(``),V(3)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[W(Nt,{size:14,"aria-hidden":`true`}),` `,n(`common.back`)]}),W(`button`,{type:`button`,onClick:()=>{U(``),V(5)},class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors flex items-center gap-1`,children:[n(`profileEditor.nav.nextPrefModal`),` `,W(Pt,{size:14,"aria-hidden":`true`})]})]})]}),we===5&&W(`div`,{class:`space-y-5`,children:[W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[W(Ze,{section:`preferenceModal`}),W(`p`,{class:`text-xs text-purple-600 bg-purple-50 border border-purple-100 rounded px-3 py-1.5 mb-4`,children:n(`profileEditor.content.loadDefaultsNotice`)}),K&&M?W(`div`,{class:`space-y-3`,children:[W(`h4`,{class:`text-xs font-semibold text-gray-700 uppercase tracking-wide`,children:n(`profileEditor.content.prefModal`)}),W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[n(`profileEditor.content.heading`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:K.preferenceModal.heading,onInput:e=>Pe(`heading`,e.target.value),placeholder:qe?.preferenceModal.heading||n(`profileEditor.content.prefHeadingPlaceholder`)}),W(Oi,{heading:K.preferenceModal.heading})]}),M.preferenceModal.hasSubheading&&W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:n(`profileEditor.content.subheading`)}),W(`input`,{class:`w-full border border-gray-300 rounded px-3 py-1.5 text-sm`,value:K.preferenceModal.subheading,onInput:e=>Pe(`subheading`,e.target.value),placeholder:qe?.preferenceModal.subheading||n(`profileEditor.content.prefSubheadingPlaceholder`)})]}),W(Br,{label:n(`profileEditor.content.introText`),value:K.preferenceModal.htmlText,onChange:e=>Pe(`htmlText`,e),placeholder:n(`profileEditor.content.prefIntroPlaceholder`),rows:3}),M.preferenceModal.buttons.length>0&&W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1.5`,children:n(`profileEditor.content.buttonLabels`)}),W(`div`,{class:`grid grid-cols-3 gap-3`,children:M.preferenceModal.buttons.map((e,t)=>W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-400 mb-1`,children:[e.action,` `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-sm`,value:K.preferenceModal.buttonLabels[t]??``,onInput:e=>G(`preferenceModal`,t,e.target.value),placeholder:e.text})]},t))})]}),K.preferenceModal.categories.map((e,t)=>{let r=M.preferenceModal.categories.find(t=>t.id===e.id);return W(`div`,{class:`border border-gray-100 rounded p-3 bg-gray-50 space-y-2`,children:[W(`div`,{class:`flex items-center gap-2`,children:[W(`span`,{class:`text-xs font-semibold text-gray-700`,children:e.id||n(`profileEditor.content.categoryFallback`,{n:String(t+1)})}),r?.mandatory&&W(`span`,{class:`text-xs bg-blue-100 text-blue-700 px-1.5 py-0.5 rounded-full`,children:n(`common.mandatory`)}),r?.type===`legitimate_interest`&&W(`span`,{class:`text-xs bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full`,children:`LI`})]}),W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-0.5`,children:[n(`profileEditor.content.categoryHeading`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:e.heading,onInput:e=>Fe(t,`heading`,e.target.value),placeholder:qe?.preferenceModal.categories.find(t=>t.id===e.id)?.heading||e.id})]}),W(Br,{label:n(`profileEditor.content.categoryDesc`),value:e.htmlText,onChange:e=>Fe(t,`htmlText`,e),placeholder:n(`profileEditor.content.categoryDescPlaceholder`),rows:3})]},e.id)})]}):W(`p`,{class:`text-xs text-gray-400 italic py-4 text-center`,children:n(ae&&!M?`profileEditor.content.loadingTemplate`:`profileEditor.content.noContent`)})]}),Be&&W(ri,{draft:Be,expandable:!0,previewMode:`modal`}),H&&W(`p`,{class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:H}),W(`div`,{class:`flex justify-between`,children:[W(`button`,{type:`button`,onClick:()=>{U(``),V(Ge?3:4)},class:`px-5 py-2 rounded-lg text-sm text-gray-600 hover:bg-gray-100 transition-colors flex items-center gap-1`,children:[W(Nt,{size:14,"aria-hidden":`true`}),` `,n(`common.back`)]}),W(`button`,{type:`button`,onClick:Ue,disabled:De,class:`bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:n(De?`common.saving`:r?`profileEditor.action.create`:`profileEditor.action.save`)})]})]})]})}function ji({id:e,current:t}){let[n,r]=R([]),[i,a]=R(null),[o,s]=R(`default`),[c,l]=R(null),[u,d]=R(!0),[f,p]=R(!1),[m,h]=R(``);z(()=>{Promise.all([Z.get(e),Z.listVersions(e)]).then(([e,t])=>{if(h(e.name),r(t),t.length>0){let e=t[t.length-1];e&&a(e.version)}}).catch(()=>{}).finally(()=>d(!1))},[e]),z(()=>{i!==null&&(p(!0),Z.getVersion(e,i,o).then(e=>l(JSON.stringify(e,null,2))).catch(()=>l(null)).finally(()=>p(!1)))},[e,i,o]);let g=n.find(e=>e.version===i),_=g?[`default`,...g.locales.filter(e=>e!=="default")].map(e=>({value:e,label:e})):[{value:`default`,label:`default`}];return W(X,{title:`Version History — ${m||e}`,current:t,children:[W(`div`,{class:`mb-4`,children:W(`a`,{href:`#/banners/profiles/${e}`,class:`inline-flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700 transition-colors`,children:[W(Nt,{size:14,"aria-hidden":`true`}),`Back to profile`]})}),u?W(`div`,{class:`text-sm text-gray-400`,children:`Loading…`}):n.length===0?W(`div`,{class:`text-sm text-gray-400`,children:`No version files found. Versions are written when a profile is saved with file storage enabled.`}):W(`div`,{class:`flex gap-0 h-[calc(100vh-10rem)] border border-gray-200 rounded-lg overflow-hidden`,children:[W(`aside`,{class:`w-32 shrink-0 border-r border-gray-200 bg-gray-50 overflow-y-auto`,children:[W(`div`,{class:`px-3 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wide border-b border-gray-200`,children:`Versions`}),W(`ul`,{children:[...n].reverse().map(e=>W(`li`,{children:W(`button`,{type:`button`,onClick:()=>{a(e.version),s(`default`)},class:`w-full text-left px-3 py-2.5 text-sm transition-colors ${i===e.version?`bg-blue-600 text-white`:`text-gray-700 hover:bg-gray-100`}`,children:[W(`div`,{class:`font-mono font-semibold`,children:[`v`,e.version]}),W(`div`,{class:`text-[10px] mt-0.5 ${i===e.version?`text-blue-200`:`text-gray-400`}`,children:new Date(e.createdAt).toLocaleDateString()})]})},e.version))})]}),W(`div`,{class:`flex-1 flex flex-col overflow-hidden`,children:[i!==null&&W(`div`,{class:`flex items-center gap-3 px-4 py-2.5 border-b border-gray-200 bg-white`,children:[W(`span`,{class:`text-sm font-medium text-gray-700`,children:[`v`,i]}),W(`div`,{class:`w-48`,children:W(Dr,{options:_,value:o,onChange:e=>s(e),placeholder:`Select locale…`})})]}),W(`div`,{class:`flex-1 overflow-auto bg-gray-950 p-4`,children:f?W(`span`,{class:`text-gray-400 text-sm`,children:`Loading…`}):c===null?W(`span`,{class:`text-gray-500 text-sm`,children:`File not found for this version/locale.`}):W(`pre`,{class:`text-xs text-green-300 whitespace-pre-wrap font-mono leading-relaxed`,children:c})})]})]})]})}function Mi({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(!0),[o,s]=R(null),[c,l]=R(null),{requestConfirm:u,dialog:d}=xr(),f=()=>{a(!0),Q.list().then(r).catch(()=>r([])).finally(()=>a(!1))};z(()=>{f()},[]);let p=async(e,n)=>{if(await u({title:t(`cookieTemplates.dialog.delete.title`,{name:n}),message:t(`cookieTemplates.dialog.delete.message`)}))try{await Q.delete(e),f()}catch(e){if(e instanceof Zn&&e.status===422)try{let t=JSON.parse(e.message);if(t.profiles?.length){s(t.profiles);return}}catch{}}},m=async(e,t)=>{try{let n=await Q.profileUsage(e);if(n.length>0){l({id:e,name:t,profiles:n.map(e=>({id:e.id,name:e.name,isActive:e.isActive??!1}))});return}}catch{}window.location.hash=`#/banners/cookie-templates/${e}`},h=async(e,t)=>{await Q.copy(e,`${t} (Copy)`).catch(()=>null),f()},g=n.length,_=t(g===1?`cookieTemplates.countSingular`:`cookieTemplates.count`,{n:g});return W(X,{title:t(`cookieTemplates.title`),current:e,children:[d,o&&at(W(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[W(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>s(null),"aria-hidden":`true`}),W(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[W(`h3`,{class:`text-sm font-semibold text-gray-900`,children:`Cannot delete template`}),W(`p`,{class:`text-sm text-gray-600`,children:`This cookie template is used by the following profiles. Delete or reassign those profiles first:`}),W(`ul`,{class:`space-y-1 max-h-48 overflow-y-auto`,children:o.map(e=>W(`li`,{class:`flex items-center gap-2 text-sm`,children:[W(`span`,{class:`text-xs px-1.5 py-0.5 rounded-full font-medium ${e.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:e.isActive?`Active`:`Inactive`}),W(`a`,{href:`#/banners/profiles/${e.id}`,class:`text-blue-600 hover:underline`,onClick:()=>s(null),children:e.name})]},e.id))}),W(`button`,{type:`button`,onClick:()=>s(null),class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:t(`common.close`)})]})]}),document.body),c&&at(W(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[W(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>l(null),"aria-hidden":`true`}),W(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[W(`h3`,{class:`text-sm font-semibold text-gray-900`,children:`Template used in profiles`}),W(`p`,{class:`text-sm text-gray-600`,children:`This template is used in the following profiles. After editing, open and save each profile for changes to take effect in their JSON files:`}),W(`ul`,{class:`space-y-1 max-h-48 overflow-y-auto`,children:c.profiles.map(e=>W(`li`,{class:`flex items-center gap-2 text-sm`,children:[W(`span`,{class:`text-xs px-1.5 py-0.5 rounded-full font-medium ${e.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:e.isActive?`Active`:`Inactive`}),W(`span`,{class:`text-gray-700`,children:e.name})]},e.id))}),W(`div`,{class:`flex flex-col gap-2`,children:[W(`button`,{type:`button`,onClick:()=>{let e=c.id;l(null),window.location.hash=`#/banners/cookie-templates/${e}`},class:`w-full bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:`Continue to edit`}),W(`button`,{type:`button`,onClick:()=>l(null),class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:t(`common.cancel`)})]})]})]}),document.body),W(`div`,{class:`flex justify-between items-center mb-4`,children:[W(`p`,{class:`text-sm text-gray-500`,children:_}),W(`a`,{href:`#/banners/cookie-templates/new`,class:`bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:t(`cookieTemplates.new`)})]}),i&&W(`p`,{class:`text-sm text-gray-400`,role:`status`,"aria-live":`polite`,children:t(`common.loading`)}),!i&&n.length===0&&W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-8 text-center`,children:[W(`p`,{class:`text-gray-500 text-sm mb-2`,children:t(`cookieTemplates.empty.title`)}),W(`p`,{class:`text-gray-400 text-xs`,children:t(`cookieTemplates.empty.hint`)})]}),!i&&n.length>0&&W(`div`,{class:`space-y-3`,children:n.map(e=>W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-4 flex items-center justify-between gap-4`,children:[W(`div`,{class:`flex-1 min-w-0`,children:[W(`p`,{class:`font-medium text-sm text-gray-900`,children:e.name}),W(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:[e.cookies.length,` `,(e.cookies.length,t(`cookieTemplates.col.id`).toLowerCase()),` — `,e.cookies.filter(e=>e.legalBasis===`mandatory`).length,` `,t(`common.mandatory`),` · `,t(`common.updated`),` `,new Date(e.updatedAt).toLocaleDateString()]}),W(`div`,{class:`flex flex-wrap gap-1 mt-2`,children:e.cookies.map(e=>W(`span`,{class:`text-xs px-2 py-0.5 rounded-full ${e.legalBasis===`mandatory`?`bg-blue-100 text-blue-700`:`bg-gray-100 text-gray-600`}`,children:[e.id,e.legalBasis===`mandatory`?` (${t(`cookieTemplates.required`)})`:``,e.tcfVendorId?` TCF:${e.tcfVendorId}`:``,e.cpraCategory?` CPRA:${e.cpraCategory}`:``]},e.id))})]}),W(`div`,{class:`flex items-center gap-3 shrink-0`,children:[W(`button`,{onClick:()=>h(e.id,e.name),class:`text-gray-400 hover:text-blue-600 transition-colors`,title:t(`common.duplicate`),"aria-label":t(`common.duplicate`),children:W(Vt,{size:14,"aria-hidden":`true`})}),W(`button`,{onClick:()=>m(e.id,e.name),class:`text-blue-600 hover:text-blue-800 transition-colors`,title:t(`common.edit`),"aria-label":t(`common.edit`),children:W(xn,{size:14,"aria-hidden":`true`})}),W(`button`,{onClick:()=>p(e.id,e.name),class:`text-red-400 hover:text-red-600 transition-colors`,title:t(`common.delete`),"aria-label":t(`common.delete`),children:W(En,{size:14,"aria-hidden":`true`})})]})]},e.id))})]})}function Ni(e,t){let n;return function(...r){n!==void 0&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}}function Pi({vendorId:e,vendorName:t,onSelect:n,disabled:r}){let[i,a]=R(``),[o,s]=R([]),[c,l]=R(!1),[u,d]=R(!1),f=B(null);z(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&l(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let p=e=>{if(!e.trim()){s([]);return}d(!0),Y(`/tcf/vendors?q=${encodeURIComponent(e)}&limit=20`).then(e=>s(e.vendors)).catch(()=>s([])).finally(()=>d(!1))},m=Ni(e=>{a(e),l(!0),p(e)},500),h=e=>{n(e),a(``),s([]),l(!1)};return e&&!i?W(`div`,{class:`flex items-center gap-1 text-xs`,children:[W(`span`,{class:`font-mono text-blue-700 bg-blue-50 border border-blue-200 px-1.5 py-0.5 rounded`,children:e}),W(`span`,{class:`text-gray-600 truncate max-w-[100px]`,title:t,children:t??`Vendor ${e}`}),!r&&W(`button`,{type:`button`,onClick:()=>{n(null),a(``),s([])},class:`text-gray-400 hover:text-red-500 ml-1 leading-none`,title:`Clear vendor`,children:`✕`})]}):W(`div`,{class:`relative`,ref:f,children:[W(`input`,{type:`text`,value:i,placeholder:`Search vendor…`,disabled:r,onChange:e=>m(e.target.value),onFocus:()=>{i&&l(!0)},class:`border border-gray-300 rounded px-2 py-1 text-xs w-36 disabled:bg-gray-50`}),c&&(u||o.length>0)&&W(`div`,{class:`absolute z-50 top-full left-0 mt-0.5 w-64 bg-white border border-gray-200 rounded shadow-lg max-h-48 overflow-y-auto text-xs`,children:[u&&W(`p`,{class:`px-3 py-2 text-gray-400`,children:`Searching…`}),!u&&o.map(e=>W(`button`,{type:`button`,onMouseDown:()=>h(e),class:`w-full text-left px-3 py-2 hover:bg-blue-50 flex items-center justify-between gap-2`,children:[W(`span`,{class:`font-medium text-gray-800 truncate`,children:e.name}),W(`span`,{class:`shrink-0 font-mono text-gray-400`,children:[`#`,e.id]})]},e.id)),!u&&o.length===0&&i&&W(`p`,{class:`px-3 py-2 text-gray-400`,children:`No vendors found`})]})]})}var Fi=[{id:1,name:`Store and/or access information on a device`},{id:2,name:`Select basic ads`},{id:3,name:`Create a personalised ads profile`},{id:4,name:`Select personalised ads`},{id:5,name:`Create a personalised content profile`},{id:6,name:`Select personalised content`},{id:7,name:`Measure ad performance`},{id:8,name:`Measure content performance`},{id:9,name:`Apply market research to generate audience insights`},{id:10,name:`Develop and improve products`},{id:11,name:`Use limited data to select content`}];function Ii({selected:e,onChange:t}){let[n,r]=R(!1),i=B(null);z(()=>{let e=e=>{i.current&&!i.current.contains(e.target)&&r(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let a=n=>{t(e.includes(n)?e.filter(e=>e!==n).sort((e,t)=>e-t):[...e,n].sort((e,t)=>e-t))},o=e.length===0?`None selected`:e.length<=3?e.map(e=>`P${e}`).join(`, `):`${e.length} purposes`;return W(`div`,{class:`relative mt-1`,ref:i,children:[W(`button`,{type:`button`,onClick:()=>r(e=>!e),class:`flex items-center justify-between gap-1.5 w-full border rounded px-2 py-1 text-xs transition-colors ${n?`border-blue-400 ring-1 ring-blue-200`:`border-gray-300 hover:border-gray-400`} ${e.length>0?`text-blue-700 bg-blue-50`:`text-gray-500 bg-white`}`,children:[W(`span`,{class:`truncate`,children:o}),W(`svg`,{class:`shrink-0 w-3 h-3 text-gray-400 transition-transform ${n?`rotate-180`:``}`,viewBox:`0 0 12 12`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,children:W(`path`,{d:`M2 4l4 4 4-4`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})]}),n&&W(`div`,{class:`absolute z-50 top-full left-0 mt-0.5 w-64 bg-white border border-gray-200 rounded shadow-lg`,children:[W(`div`,{class:`flex items-center justify-between px-3 py-1.5 border-b border-gray-100`,children:[W(`span`,{class:`text-xs font-semibold text-gray-500 uppercase tracking-wide`,children:`Purposes`}),e.length>0&&W(`button`,{type:`button`,class:`text-xs text-gray-400 hover:text-red-500 transition-colors`,onClick:()=>t([]),children:`Clear all`})]}),W(`ul`,{class:`max-h-52 overflow-y-auto py-1`,children:Fi.map(t=>{let n=e.includes(t.id);return W(`li`,{children:W(`label`,{class:`flex items-start gap-2 px-3 py-1.5 cursor-pointer hover:bg-gray-50 transition-colors ${n?`bg-blue-50/60`:``}`,children:[W(`input`,{type:`checkbox`,class:`mt-0.5 accent-blue-600 shrink-0`,checked:n,onChange:()=>a(t.id)}),W(`span`,{class:`text-xs text-gray-700 leading-snug`,children:[W(`span`,{class:`font-semibold text-blue-700 mr-1`,children:[`P`,t.id]}),t.name]})]})},t.id)})})]})]})}function Li({cookie:e,idx:t,onChange:n,onRemove:r,duplicateIds:i,tcfEnabled:a,showCpra:o}){let s=J(),c=(t,r)=>n({...e,[t]:r}),l=!e.id.trim(),u=!l&&(i?.has(e.id.trim())??!1),d=l?`Required`:u?`Duplicate ID`:``,f=e.expiry<1?`Must be ≥ 1`:``,p=e.legalBasis===`mandatory`;return W(`tr`,{class:`border-b align-top text-xs ${t===void 0||t%2==0?`bg-white`:`bg-gray-50/50`}`,children:[W(`td`,{class:`py-2.5 pr-3 pl-1`,children:[W(`input`,{class:`border rounded px-2 py-1.5 w-60 font-mono ${d?`border-red-400 bg-red-50`:`border-gray-300`}`,value:e.id,onInput:e=>c(`id`,e.target.value),placeholder:`analytics_storage`}),d&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:d})]}),W(`td`,{class:`py-2.5 pr-3`,children:W(`select`,{class:`border border-gray-300 rounded pl-2 pr-4 py-1.5 text-xs w-40`,value:e.legalBasis,onChange:e=>c(`legalBasis`,e.target.value),children:[W(`option`,{value:`consent`,children:`Consent`}),W(`option`,{value:`legitimate_interest`,children:`Legitimate Interest`}),W(`option`,{value:`mandatory`,children:s(`cookieTemplates.col.mandatoryShort`)})]})}),W(`td`,{class:`py-2.5 pr-3 text-center`,children:W(`input`,{type:`checkbox`,class:`w-4 h-4 accent-blue-600`,checked:e.listenGpc,disabled:p,onChange:e=>c(`listenGpc`,e.target.checked),title:p?s(`cookieTemplates.editor.gpcMandatoryTitle`):``})}),W(`td`,{class:`py-2.5 pr-3`,children:[W(`div`,{class:`flex items-center gap-1`,children:[W(`input`,{type:`number`,min:`1`,max:`3650`,class:`border rounded px-2 py-1.5 w-16 ${f?`border-red-400 bg-red-50`:`border-gray-300`}`,value:e.expiry,onInput:e=>c(`expiry`,parseInt(e.target.value)||1)}),W(`span`,{class:`text-gray-400 text-xs`,children:`days`})]}),f&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:f})]}),a&&W(`td`,{class:`py-2.5 pr-3 min-w-[160px]`,children:[W(Pi,{vendorId:e.tcfVendorId,vendorName:e.tcfVendorName,onSelect:t=>n({...e,tcfVendorId:t?.id??void 0,tcfVendorName:t?.name??void 0,tcfPurposes:t?.purposes??void 0})}),e.tcfVendorId!=null&&W(Ii,{selected:e.tcfPurposes??[],onChange:e=>c(`tcfPurposes`,e.length>0?e:void 0)})]}),o&&W(`td`,{class:`py-2.5 pr-3`,children:W(`select`,{class:`border border-gray-300 rounded pl-2 pr-4 py-1.5 text-xs w-28`,value:e.cpraCategory??``,onChange:e=>{let t=e.target.value;c(`cpraCategory`,t||void 0)},children:[W(`option`,{value:``,children:`—`}),W(`option`,{value:`sale`,children:`Sale`}),W(`option`,{value:`sharing`,children:`Sharing`}),W(`option`,{value:`sensitive`,children:`Sensitive`})]})}),W(`td`,{class:`py-2.5 text-center`,children:W(`button`,{type:`button`,onClick:r,class:`text-red-400 hover:text-red-600 text-lg leading-none px-1`,title:`Remove`,children:`✕`})})]})}function Ri(){return[{id:`necessary`,legalBasis:`mandatory`,listenGpc:!1,expiry:365},{id:`analytics_storage`,legalBasis:`consent`,listenGpc:!0,expiry:365},{id:`ad_storage`,legalBasis:`consent`,listenGpc:!0,expiry:365},{id:`ad_user_data`,legalBasis:`consent`,listenGpc:!0,expiry:365},{id:`ad_personalization`,legalBasis:`consent`,listenGpc:!0,expiry:365}]}function zi(){return{mainBanner:{position:`bottom`,overlayOpacity:0,showClose:!1,headingTag:`h2`,buttons:[{text:`Accept All`,type:`primary`,action:`custom`,cookies:`*`},{text:`Reject Optional`,type:`accent`,action:`custom`,cookies:`!`},{text:`Customize`,type:`secondary`,action:`manage`}]},gpcBanner:{position:`bottom`,overlayOpacity:0,showClose:!1,headingTag:`h2`,buttons:[{text:`Accept All`,type:`primary`,action:`custom`,cookies:`*`},{text:`Continue with GPC`,type:`accent`,action:`custom`,cookies:`!`}]},preferenceModal:{position:`right`,overlayOpacity:50,showClose:!0,persistent:!1,headingTag:`h2`,hasSubheading:!0,buttons:[{text:`Save Preferences`,type:`primary`,action:`submit`},{text:`Accept All`,type:`secondary`,action:`custom`,cookies:`*`}],categories:[{id:`necessary`,headingTag:`h3`,mandatory:!0,type:`consent`,liEnabled:!1,cookies:[`necessary`]},{id:`analytics`,headingTag:`h3`,mandatory:!1,type:`consent`,liEnabled:!1,cookies:[`analytics_storage`]},{id:`marketing`,headingTag:`h3`,mandatory:!1,type:`consent`,liEnabled:!1,cookies:[`ad_storage`,`ad_user_data`,`ad_personalization`]}]}}}function Bi(e,t){let n={necessary:{heading:`Necessary`,htmlText:`Essential cookies required for the website to function properly. These cannot be disabled.`},analytics:{heading:`Analytics`,htmlText:`Cookies that help us understand how visitors interact with our website.`},marketing:{heading:`Marketing`,htmlText:`Cookies used for advertising and tracking across websites.`}};return{mainBanner:{heading:`We value your privacy`,htmlText:`We use cookies to improve your experience, analyze site usage, and for marketing. Please accept or manage your preferences.`,buttonLabels:t?.mainBanner.buttons.map(e=>e.text)??[]},gpcBanner:{heading:`Global Privacy Control Detected`,htmlText:`We detected a GPC signal from your browser. Your preferences have been automatically adjusted.`,buttonLabels:t?.gpcBanner.buttons.map(e=>e.text)??[]},preferenceModal:{heading:`Privacy Preferences`,subheading:`Manage your cookie preferences below.`,htmlText:``,buttonLabels:t?.preferenceModal.buttons.map(e=>e.text)??[],categories:e.map(e=>({id:e.id,heading:n[e.id]?.heading??e.id,htmlText:n[e.id]?.htmlText??``}))}}}function Vi(e,t,n,r,i,a,o,s){let c={};for(let[e,n]of Object.entries(r))c[e]={mainBanner:{position:t.mainBanner.position,overlayOpacity:t.mainBanner.overlayOpacity,showClose:t.mainBanner.showClose,...t.mainBanner.showLocaleSwitcher?{showLocaleSwitcher:!0}:{},headingTag:t.mainBanner.headingTag,heading:n.mainBanner.heading,htmlText:n.mainBanner.htmlText,buttons:t.mainBanner.buttons.map((e,t)=>({...e,text:n.mainBanner.buttonLabels[t]||e.text}))},gpcBanner:{position:t.gpcBanner.position,overlayOpacity:t.gpcBanner.overlayOpacity,showClose:t.gpcBanner.showClose,...t.gpcBanner.showLocaleSwitcher?{showLocaleSwitcher:!0}:{},headingTag:t.gpcBanner.headingTag,heading:n.gpcBanner.heading,htmlText:n.gpcBanner.htmlText,buttons:t.gpcBanner.buttons.map((e,t)=>({...e,text:n.gpcBanner.buttonLabels[t]||e.text}))},preferenceModal:{position:t.preferenceModal.position,overlayOpacity:t.preferenceModal.overlayOpacity,showClose:t.preferenceModal.showClose,...t.preferenceModal.showLocaleSwitcher?{showLocaleSwitcher:!0}:{},persistent:t.preferenceModal.persistent,headingTag:t.preferenceModal.headingTag,heading:n.preferenceModal.heading,...t.preferenceModal.hasSubheading&&n.preferenceModal.subheading?{subheading:n.preferenceModal.subheading}:{},...n.preferenceModal.htmlText?{htmlText:n.preferenceModal.htmlText}:{},buttons:t.preferenceModal.buttons.map((e,t)=>({...e,text:n.preferenceModal.buttonLabels[t]||e.text})),categories:t.preferenceModal.categories.map(e=>{let t=n.preferenceModal.categories.find(t=>t.id===e.id);return{id:e.id,heading:t?.heading??e.id,headingTag:e.headingTag,htmlText:t?.htmlText??``,mandatory:e.mandatory,type:e.type,...e.liEnabled?{legitimateInterest:{enabled:!0}}:{},cookies:e.cookies}})}};return{_meta:i,cookies:e,defaultLocale:n,translations:c,...a&&a.length>0?{allowedOrigins:a}:{},...o&&o.length>0?{regulations:o}:{},...s?{dpdpa:s}:{}}}function Hi(){return{id:``,legalBasis:`consent`,listenGpc:!0,expiry:365}}function Ui(e){return[{field:`ID`,label:`Cookie ID`,Icon:Cn,description:`A unique machine-readable identifier for this cookie or tracking purpose.`,usage:`Must match exactly what your frontend widget references (e.g. analytics_storage, ad_storage). Used in GTM / Google Consent Mode v2 consent states.`,laws:[{name:`GDPR`,text:`Each processing purpose must be clearly identified and disclosed in your privacy notice (Art. 13/14).`},{name:`ePrivacy`,text:`Non-essential cookies require prior informed consent. ID is what links consent to a specific purpose.`}],examples:`necessary · analytics_storage · ad_storage · ad_user_data · ad_personalization · functional`},{field:`Legal Basis`,label:`Legal Basis`,Icon:mn,description:`The legal ground under which you process data associated with this cookie.`,usage:[`Consent (default): The user actively opts in. Required for advertising, most analytics, and non-essential cookies. Show the banner before any processing.`,`Legitimate Interest: You may process on a compelling business need, but must pass a 3-part balancing test, document it, and provide an easy objection mechanism.`,e(`cookieTemplates.editor.legalBasis.mandatoryUsage`)],laws:[{name:`GDPR Art. 6(1)(a)`,text:`Consent as a lawful basis. Must be freely given, specific, informed, and unambiguous.`},{name:`GDPR Art. 6(1)(f)`,text:`Legitimate interests. Cannot override fundamental rights/freedoms of data subjects.`},{name:`ePrivacy Dir. Art. 5(3)`,text:`For cookies: consent is the default rule. LI is generally NOT available for tracking cookies under ePrivacy.`},{name:e(`cookieTemplates.editor.legalBasis.mandatoryLawName`),text:e(`cookieTemplates.editor.legalBasis.mandatoryLawText`)}],examples:e(`cookieTemplates.editor.legalBasis.examples`)},{field:`Listen GPC`,label:`Honor GPC Signal`,Icon:Kt,description:`When enabled, this cookie is automatically denied if the visitor's browser sends a Global Privacy Control signal.`,usage:`GPC is signalled via the Sec-GPC: 1 HTTP header or navigator.globalPrivacyControl. When honored, non-essential cookies are pre-denied before showing any banner.`,laws:[{name:`CCPA / CPRA (California)`,text:`Legally required to honor GPC as a valid opt-out of sale/sharing. CA AG has enforced this.`},{name:`Colorado CPA`,text:`Must honor universal opt-out signals including GPC from July 2024.`},{name:`Connecticut CTDPA`,text:`Must honor GPC from 2024.`},{name:`GDPR`,text:`No legal obligation, but highly recommended as a privacy-friendly practice.`}],examples:`Enable for all non-mandatory cookies. Disable only for strictly necessary (mandatory) cookies.`},{field:`Expiry`,label:`Re-consent Interval (days)`,Icon:At,description:`How many days until this consent expires and the user is asked again.`,usage:`After this period, the consent cookie is treated as expired and the banner is shown again on next visit.`,laws:[{name:`CNIL (France)`,text:`Consent must be renewed at least every 13 months (397 days). Recommends 6 months for good practice.`},{name:`ICO (UK)`,text:`No specific maximum set, but recommends reviewing at least annually. Best practice: 6–12 months.`},{name:`GDPR`,text:`No prescribed expiry, but consent must remain freely revocable and valid. Stale consent may not remain valid.`}],examples:`180 days (6 months) — CNIL best practice · 365 days (1 year) — standard · 395 days — CNIL maximum`},{field:`TCF Vendors`,label:`TCF Vendor IDs`,Icon:kt,description:`Links this cookie purpose to one or more IAB-registered ad-tech vendor IDs from the Global Vendor List (GVL). Required to generate a valid TC String.`,usage:[`Enable the "TCF Vendors" column to expose a vendor ID input per cookie row.`,`Enter the numeric GVL ID(s) for every ad-tech vendor that processes data under this purpose (e.g. 755 for Google, 32 for AppNexus).`,`Consenti encodes these IDs along with the accepted purposes into a Base64 TC String, which ad platforms read from the cookie to determine which vendors are authorised to fire.`,`Without vendor IDs, the TC String will be invalid and compliant ad platforms will refuse to fire their tags.`],laws:[{name:`IAB TCF v2.2`,text:`A TC String must encode both purpose consents and vendor consents. Each vendor must be explicitly listed by its GVL ID — blanket consent is not permitted.`},{name:`GDPR Art. 6(1)(a)`,text:`Consent must be specific to each vendor and each purpose. Bundling all vendors into one consent decision is invalid.`},{name:`GDPR Art. 13/14`,text:`Your privacy notice must name every processor. TCF vendor IDs correspond to the processors you must disclose.`},{name:`ePrivacy Dir.`,text:`TCF is the standard mechanism for obtaining valid ad-tech consent under ePrivacy across the EU/EEA.`}],examples:`755 (Google Advertising Products) · 32 (AppNexus) · 91 (Criteo) · 52 (IAB Europe) — look up IDs on the TCF Vendors page`,link:{url:`#/vendors`,label:`nav.vendors`}},{field:`CPRA Category`,label:`CPRA Data Category`,Icon:vn,description:`Maps this cookie to a California Privacy Rights Act (CPRA) data category. Required to correctly scope Do Not Sell / Share opt-out rights and Sensitive PI restrictions.`,usage:[`Enable the "CPRA Category" column to assign a data category to each cookie row.`,`"Personal Information" (PI): standard consumer data subject to the right to opt-out of sale/sharing.`,`"Sensitive Personal Information" (SPI): a restricted subset (precise geolocation, race, health, biometrics, etc.) that triggers additional opt-out and use-limitation rights. Consumers can direct you to limit use to what is necessary for providing the service.`,`"Non-PI": data that does not meet CCPA's definition of personal information — no opt-out required.`],laws:[{name:`CPRA / CCPA § 1798.100`,text:`Consumers have the right to know what personal information is collected and to opt-out of its sale or sharing.`},{name:`CPRA § 1798.121`,text:`Consumers have the right to limit the use and disclosure of sensitive personal information. Businesses must provide a clear "Limit Use of My SPI" link.`},{name:`CPRA § 1798.140(ae)`,text:`Sensitive PI includes precise geolocation, racial/ethnic origin, religious beliefs, genetic data, biometric data, health data, sexual orientation, and contents of communications.`},{name:`CPRA / GPC`,text:`A GPC signal constitutes a valid opt-out of sale and sharing for PI. Pairing CPRA Category with the "Honor GPC" flag ensures the correct cookies are denied automatically.`}],examples:`analytics_storage → PersonalInfo · ad_storage → PersonalInfo · precise_location → SensitivePI · session → Non-PI`}]}function Wi({id:e,current:t}){let n=J(),r=Ui(n),i=!e||e===`new`,[a,o]=R(``),[s,c]=R(``),[l,u]=R([]),[d,f]=R(``),[p,m]=R(0),[h,g]=R(!1),[_,v]=R(!1),[y,b]=R(!1),[x,S]=R(!i),{requestConfirm:C,dialog:w}=xr();z(()=>{!i&&e&&Q.get(e).then(e=>{o(e.name),u(e.cookies)}).catch(()=>f(n(`cookieTemplates.editor.error.notFound`))).finally(()=>S(!1))},[e,i]);let T=l.reduce((e,t)=>{let n=t.id.trim();return n&&(e[n]=(e[n]??0)+1),e},{}),E=new Set(Object.entries(T).filter(([,e])=>e>1).map(([e])=>e)),D=async()=>{let t=!0;if(a.trim()||(c(n(`cookieTemplates.editor.nameRequired`)),t=!1),l.some(e=>!e.id.trim())&&(f(n(`cookieTemplates.editor.error.allIds`)),t=!1),E.size>0&&(f(n(`cookieTemplates.editor.error.uniqueIds`)),t=!1),l.some(e=>e.expiry<1)&&(f(n(`cookieTemplates.editor.error.expiry`)),t=!1),t){if(!i&&e){let t=await Q.profileUsage(e).catch(()=>[]);if(t.length>0){let e=t.map(e=>`"${e.name}"`).join(`, `);if(!await C({title:n(t.length===1?`cookieTemplates.editor.confirmUpdate.titleSingular`:`cookieTemplates.editor.confirmUpdate.title`,{n:t.length}),message:n(`cookieTemplates.editor.confirmUpdate.message`,{names:e})}))return}}f(``),c(``),b(!0);try{i?await Q.create({name:a,cookies:l}):await Q.update(e,{name:a,cookies:l}),window.location.hash=`#/banners/cookie-templates`}catch{f(n(`cookieTemplates.editor.error.failed`))}finally{b(!1)}}},O=r[p];return W(X,{title:n(i?`cookieTemplates.editor.title.new`:`cookieTemplates.editor.title.edit`),current:t,children:[w,x&&W(`p`,{class:`text-sm text-gray-400`,role:`status`,"aria-live":`polite`,children:n(`common.loading`)}),!x&&W(`div`,{class:`space-y-5`,children:W(`div`,{class:`grid grid-cols-1 xl:grid-cols-[2fr_1fr] gap-5 items-start`,children:[W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[W(`div`,{class:`flex`}),W(`div`,{class:`py-5`,children:[W(`label`,{for:`template-name`,class:`block text-sm font-medium text-gray-700 mb-1`,children:[n(`cookieTemplates.editor.name`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{id:`template-name`,class:`w-full border rounded px-3 py-2 text-sm ${s?`border-red-400 bg-red-50`:`border-gray-300`}`,value:a,onInput:e=>{o(e.target.value),c(``)},placeholder:n(`cookieTemplates.editor.namePlaceholder`),required:!0,"aria-required":`true`}),s&&W(`p`,{role:`alert`,class:`text-xs text-red-500 mt-1`,children:s})]}),i&&l.length===0&&W(`div`,{class:`bg-amber-50 border border-amber-200 rounded-lg p-4 flex items-center justify-between gap-4`,children:[W(`p`,{class:`text-sm text-amber-800`,children:n(`cookieTemplates.editor.loadDefaultsPrompt`)}),W(`button`,{type:`button`,onClick:()=>u(Ri()),class:`shrink-0 bg-amber-700 text-white text-xs px-3 py-1.5 rounded hover:bg-amber-800 transition-colors`,children:n(`cookieTemplates.editor.loadDefaultsBtn`)})]}),W(`div`,{class:`flex items-center justify-between my-4`,children:[W(`div`,{children:[W(`h3`,{class:`text-sm font-semibold text-gray-700`,children:n(`cookieTemplates.editor.definitions`)}),W(`p`,{class:`text-xs text-gray-500 mt-0.5`,children:[`IDs must match what the frontend widget uses (e.g. `,W(`code`,{class:`font-mono bg-gray-100 px-1 rounded`,children:`analytics_storage`}),`).`]})]}),W(`div`,{class:`flex items-center gap-3`,children:[W(`label`,{class:`flex items-center gap-1.5 text-xs text-gray-600 cursor-pointer select-none`,children:[W(`input`,{type:`checkbox`,class:`accent-blue-600`,checked:h,onChange:e=>g(e.target.checked)}),n(`cookieTemplates.editor.showTcf`)]}),W(`label`,{class:`flex items-center gap-1.5 text-xs text-gray-600 cursor-pointer select-none`,children:[W(`input`,{type:`checkbox`,class:`accent-blue-600`,checked:_,onChange:e=>v(e.target.checked)}),n(`cookieTemplates.editor.showCpra`)]}),W(`button`,{type:`button`,onClick:()=>u(e=>[...e,Hi()]),class:`text-sm text-blue-600 hover:underline shrink-0`,children:n(`cookieTemplates.editor.addCookie`)})]})]}),W(`div`,{class:`overflow-x-auto`,children:W(`table`,{class:`w-full text-xs`,children:[W(`thead`,{children:W(`tr`,{class:`text-left text-gray-500 border-b border-gray-200`,children:[W(`th`,{scope:`col`,class:`pb-2 pr-3 pl-1 font-medium`,children:W(`button`,{type:`button`,class:`hover:text-blue-600 transition-colors`,onClick:()=>m(0),children:[n(`cookieTemplates.col.idShort`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]})}),W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium`,children:W(`button`,{type:`button`,class:`hover:text-blue-600 transition-colors`,onClick:()=>m(1),children:n(`cookieTemplates.col.legalBasis`)})}),W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium text-center`,children:W(`button`,{type:`button`,class:`hover:text-blue-600 transition-colors`,onClick:()=>m(2),children:n(`cookieTemplates.col.gpcShort`)})}),W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium`,children:W(`button`,{type:`button`,class:`hover:text-blue-600 transition-colors`,onClick:()=>m(3),children:n(`cookieTemplates.col.expiryShort`)})}),h&&W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium text-blue-700`,children:n(`cookieTemplates.col.tcfVendorShort`)}),_&&W(`th`,{scope:`col`,class:`pb-2 pr-3 font-medium text-purple-700`,children:n(`cookieTemplates.col.cpraCategoryShort`)}),W(`th`,{scope:`col`,class:`pb-2 text-center font-medium`})]})}),W(`tbody`,{children:l.map((e,t)=>W(Li,{cookie:e,idx:t,onChange:e=>u(n=>n.map((n,r)=>r===t?e:n)),onRemove:()=>u(e=>e.filter((e,n)=>n!==t)),duplicateIds:E,tcfEnabled:h,showCpra:_},t))})]})}),l.length===0&&W(`p`,{class:`text-sm text-gray-400 text-center py-4`,children:[n(`cookieTemplates.editor.empty`),W(`br`,{}),` `,W(`br`,{}),W(`button`,{type:`button`,onClick:()=>u(e=>[...e,Hi()]),class:`text-sm text-blue-600 hover:underline shrink-0`,children:n(`cookieTemplates.editor.addCookie`)})]}),W(`div`,{className:`mt-7`,children:[d&&W(`p`,{role:`alert`,class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:d}),W(`div`,{class:`flex justify-between`,children:[W(`a`,{href:`#/banners/cookie-templates`,class:`px-5 py-2 rounded-lg text-sm text-red-600 hover:bg-red-100 transition-colors`,children:n(`common.cancel`)}),W(`button`,{type:`button`,onClick:D,disabled:y,class:`bg-blue-600 text-white px-5 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:n(y?`common.saving`:i?`cookieTemplates.editor.action.create`:`cookieTemplates.editor.action.save`)})]})]})]}),W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5 xl:sticky xl:top-4`,children:[W(`p`,{class:`text-xs text-gray-400 mb-3 uppercase tracking-wide font-semibold`,children:n(`cookieTemplates.editor.infoHint`)}),W(`div`,{class:`flex flex-wrap gap-1.5 mb-4`,children:r.map((e,t)=>W(`button`,{type:`button`,onClick:()=>m(t),class:`text-xs px-2.5 py-1 rounded-full border transition-colors ${p===t?`bg-blue-600 text-white border-blue-600`:`border-gray-300 text-gray-600 hover:border-blue-400`}`,children:e.field},t))}),O&&W(`div`,{class:`space-y-3`,children:[W(`div`,{class:`flex items-center gap-2`,children:[W(O.Icon,{size:18,className:`text-gray-600 shrink-0`}),W(`h4`,{class:`font-semibold text-gray-800 text-sm`,children:O.label}),W(`a`,{href:O.link?.url,target:O.link?.url?.startsWith(`http`)?`_blank`:void 0,class:`text-xs text-blue-600 hover:underline whitespace-nowrap shrink-0 ml-auto`,children:n(O.link?.label)})]}),W(`p`,{class:`text-xs text-gray-600 leading-relaxed`,children:O.description}),W(`div`,{class:`bg-blue-50 border border-blue-100 rounded p-3`,children:[W(`p`,{class:`text-xs font-semibold text-blue-700 mb-1`,children:n(`cookieTemplates.editor.infoUsage`)}),Array.isArray(O.usage)?W(`ul`,{class:`list-decimal list-inside`,children:O.usage.map((e,t)=>W(`li`,{class:`text-xs text-blue-800 leading-relaxed whitespace-pre-line`,children:e},t))}):W(`p`,{class:`text-xs text-blue-800 leading-relaxed whitespace-pre-line`,children:O.usage})]}),W(`div`,{children:[W(`p`,{class:`text-xs font-semibold text-gray-600 mb-2`,children:n(`cookieTemplates.editor.infoLaws`)}),W(`div`,{class:`space-y-2`,children:O.laws.map((e,t)=>W(`div`,{class:`bg-amber-50 border border-amber-100 rounded p-2.5`,children:[W(`span`,{class:`text-xs font-bold text-amber-700`,children:[e.name,` `]}),W(`span`,{class:`text-xs text-amber-800`,children:e.text})]},t))})]}),W(`div`,{class:`bg-gray-50 border border-gray-200 rounded p-2.5`,children:[W(`p`,{class:`text-xs font-semibold text-gray-600 mb-1`,children:n(`cookieTemplates.editor.infoExamples`)}),W(`p`,{class:`text-xs text-gray-500 font-mono leading-relaxed`,children:O.examples})]})]})]})]})})]})}function Gi({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(!0),[o,s]=R(null),[c,l]=R(null),{requestConfirm:u,dialog:d}=xr(),f=()=>{a(!0),$.list().then(r).catch(()=>r([])).finally(()=>a(!1))};z(()=>{f()},[]);let p=async(e,n)=>{if(await u({title:t(`uiTemplates.dialog.delete.title`,{name:n}),message:t(`uiTemplates.dialog.delete.message`)}))try{await $.delete(e),f()}catch(e){if(e instanceof Zn&&e.status===422)try{let t=JSON.parse(e.message);if(t.profiles?.length){s(t.profiles);return}}catch{}}},m=async(e,t)=>{try{let n=await $.profileUsage(e);if(n.length>0){l({id:e,name:t,profiles:n.map(e=>({id:e.id,name:e.name,isActive:e.isActive??!1}))});return}}catch{}window.location.hash=`#/banners/ui-templates/${e}`},h=async(e,t)=>{await $.copy(e,`${t} (Copy)`).catch(()=>null),f()},g=n.length,_=t(g===1?`uiTemplates.countSingular`:`uiTemplates.count`,{n:g});return W(X,{title:t(`uiTemplates.title`),current:e,children:[d,o&&at(W(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[W(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>s(null),"aria-hidden":`true`}),W(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[W(`h3`,{class:`text-sm font-semibold text-gray-900`,children:`Cannot delete template`}),W(`p`,{class:`text-sm text-gray-600`,children:`This UI template is used by the following profiles. Delete or reassign those profiles first:`}),W(`ul`,{class:`space-y-1 max-h-48 overflow-y-auto`,children:o.map(e=>W(`li`,{class:`flex items-center gap-2 text-sm`,children:[W(`span`,{class:`text-xs px-1.5 py-0.5 rounded-full font-medium ${e.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:e.isActive?`Active`:`Inactive`}),W(`a`,{href:`#/banners/profiles/${e.id}`,class:`text-blue-600 hover:underline`,onClick:()=>s(null),children:e.name})]},e.id))}),W(`button`,{type:`button`,onClick:()=>s(null),class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:t(`common.close`)})]})]}),document.body),c&&at(W(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[W(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>l(null),"aria-hidden":`true`}),W(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 space-y-4`,children:[W(`h3`,{class:`text-sm font-semibold text-gray-900`,children:`Template used in profiles`}),W(`p`,{class:`text-sm text-gray-600`,children:`This template is used in the following profiles. After editing, open and save each profile for changes to take effect in their JSON files:`}),W(`ul`,{class:`space-y-1 max-h-48 overflow-y-auto`,children:c.profiles.map(e=>W(`li`,{class:`flex items-center gap-2 text-sm`,children:[W(`span`,{class:`text-xs px-1.5 py-0.5 rounded-full font-medium ${e.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:e.isActive?`Active`:`Inactive`}),W(`span`,{class:`text-gray-700`,children:e.name})]},e.id))}),W(`div`,{class:`flex flex-col gap-2`,children:[W(`button`,{type:`button`,onClick:()=>{let e=c.id;l(null),window.location.hash=`#/banners/ui-templates/${e}`},class:`w-full bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:`Continue to edit`}),W(`button`,{type:`button`,onClick:()=>l(null),class:`w-full border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50 transition-colors`,children:t(`common.cancel`)})]})]})]}),document.body),W(`div`,{class:`flex justify-between items-center mb-4`,children:[W(`p`,{class:`text-sm text-gray-500`,children:_}),W(`a`,{href:`#/banners/ui-templates/new`,class:`bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:t(`uiTemplates.new`)})]}),i&&W(`p`,{class:`text-sm text-gray-400`,role:`status`,"aria-live":`polite`,children:t(`common.loading`)}),!i&&n.length===0&&W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-8 text-center`,children:[W(`p`,{class:`text-gray-500 text-sm mb-2`,children:t(`uiTemplates.empty.title`)}),W(`p`,{class:`text-gray-400 text-xs`,children:t(`uiTemplates.empty.hint`)})]}),!i&&n.length>0&&W(`div`,{class:`space-y-3`,children:n.map(e=>W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-4 flex items-center justify-between gap-4`,children:[W(`div`,{class:`flex-1 min-w-0`,children:[W(`p`,{class:`font-medium text-sm text-gray-900`,children:e.name}),W(`div`,{class:`flex flex-wrap gap-3 mt-1 text-xs text-gray-500`,children:[W(`span`,{children:[t(`uiTemplates.mainBanner`),` `,W(`span`,{class:`text-gray-700`,children:e.mainBanner.position})]}),W(`span`,{children:[t(`uiTemplates.gpcBanner`),` `,W(`span`,{class:`text-gray-700`,children:e.gpcBanner.position})]}),W(`span`,{children:[t(`uiTemplates.modal`),` `,W(`span`,{class:`text-gray-700`,children:e.preferenceModal.position})]}),W(`span`,{children:t(`uiTemplates.categories`,{n:e.preferenceModal.categories.length})}),W(`span`,{children:[t(`common.updated`),` `,new Date(e.updatedAt).toLocaleDateString()]})]}),W(`div`,{class:`flex flex-wrap gap-1 mt-2`,children:e.mainBanner.buttons.map((e,t)=>W(`span`,{class:`text-xs px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full`,children:[e.type,`: `,e.text]},t))})]}),W(`div`,{class:`flex items-center gap-3 shrink-0`,children:[W(`button`,{onClick:()=>h(e.id,e.name),class:`text-gray-400 hover:text-blue-600 transition-colors`,title:t(`common.duplicate`),"aria-label":t(`common.duplicate`),children:W(Vt,{size:14,"aria-hidden":`true`})}),W(`button`,{onClick:()=>m(e.id,e.name),class:`text-blue-600 hover:text-blue-800 transition-colors`,title:t(`common.edit`),"aria-label":t(`common.edit`),children:W(xn,{size:14,"aria-hidden":`true`})}),W(`button`,{onClick:()=>p(e.id,e.name),class:`text-red-400 hover:text-red-600 transition-colors`,title:t(`common.delete`),"aria-label":t(`common.delete`),children:W(En,{size:14,"aria-hidden":`true`})})]})]},e.id))})]})}var Ki=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function qi(e){return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e)}function Ji({value:e,onChange:t,label:n=`Heading Tag`,required:r}){let[i,a]=R(()=>!Ki.includes(e)),[o,s]=R(``);z(()=>{Ki.includes(e)&&a(!1)},[e]);let c=n=>{a(n),s(``),n||t(Ki.includes(e)?e:`h2`)},l=e=>{t(e),s(e&&!qi(e)?`Invalid HTML tag name (letters, digits, hyphens only)`:``)};return W(`div`,{children:[W(`div`,{class:`flex items-center justify-between mb-1`,children:[W(`label`,{class:`text-xs font-medium text-gray-600`,children:[n,r&&W(`span`,{class:`text-red-500 ml-0.5`,children:`*`})]}),W(`label`,{class:`flex items-center gap-1.5 text-xs text-gray-500 cursor-pointer select-none`,children:[W(`input`,{type:`checkbox`,class:`w-3.5 h-3.5`,checked:i,onChange:e=>c(e.target.checked)}),`Custom tag`]})]}),i?W(`div`,{children:[W(`input`,{class:`w-full border rounded px-2 py-1.5 text-sm font-mono ${o?`border-red-400 bg-red-50`:`border-gray-300`}`,value:e,onInput:e=>l(e.target.value),placeholder:`e.g. p, div, span`}),o&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:o})]}):W(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm font-mono`,value:Ki.includes(e)?e:`h2`,onChange:e=>t(e.target.value),children:Ki.map(e=>W(`option`,{value:e,children:e},e))})]})}function Yi({value:e,onChange:t}){return W(`div`,{class:`flex items-center gap-3`,children:[W(`input`,{type:`range`,min:`0`,max:`100`,class:`flex-1 h-1.5 rounded-full appearance-none bg-gray-200 accent-blue-600 cursor-pointer`,value:e,onInput:e=>t(parseInt(e.target.value))}),W(`span`,{class:`text-sm font-mono text-gray-700 w-10 text-right shrink-0`,children:[e,`%`]})]})}function Xi(e){return e===`*`?`* — Accept all cookies`:e===`!`?`! — Deny non mandatory cookies`:Array.isArray(e)&&e.length>0?e.join(`, `):``}function Zi({value:e,onChange:t,showSpecial:n=!0,extraCookies:r,disabled:i=!1,placeholder:a=`Select cookies…`}){let[o,s]=R(!1),[c,l]=R(null),[u,d]=R([]),f=B(null),p=B(null);z(()=>{Q.list().then(d).catch(()=>{})},[]),z(()=>{let e=e=>{let t=f.current?.contains(e.target),n=p.current?.contains(e.target);!t&&!n&&s(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),z(()=>{if(!o)return;let e=e=>{p.current?.contains(e.target)||s(!1)};return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),()=>window.removeEventListener(`scroll`,e,!0)},[o]);let m=()=>{if(!i){if(!o&&f.current){let e=f.current.getBoundingClientRect();window.innerHeight-e.bottom>=280?l({top:e.bottom+4,left:e.left}):l({bottom:window.innerHeight-e.top+4,left:e.left})}s(e=>!e)}},h=u.flatMap(e=>e.cookies.map(t=>({id:t.id,source:e.name}))),g=[...r??[],...h].filter((e,t,n)=>n.findIndex(t=>t.id===e.id)===t),_=t=>t===`*`?e===`*`:t===`!`?e===`!`:Array.isArray(e)&&e.includes(t),v=n=>{if(n===`*`){t(e===`*`?void 0:`*`);return}if(n===`!`){t(e===`!`?void 0:`!`);return}let r=Array.isArray(e)?[...e]:[],i=r.includes(n)?r.filter(e=>e!==n):[...r,n];t(i.length?i:void 0)},y=Xi(e),b={position:`fixed`,zIndex:9999,left:`${c?.left??0}px`,width:`288px`,...c?.top===void 0?{bottom:`${c?.bottom??0}px`}:{top:`${c.top}px`}};return W(`div`,{class:`relative`,ref:f,children:[W(`button`,{type:`button`,disabled:i,onClick:m,class:`w-full text-left border rounded px-2 py-1.5 text-xs flex items-center justify-between gap-1 ${i?`bg-gray-50 text-gray-400 border-gray-200 cursor-not-allowed`:`bg-white border-gray-300 hover:border-blue-400 cursor-pointer transition-colors`}`,children:[W(`span`,{class:y?`font-mono text-gray-800`:`text-gray-400`,children:y||a}),W(`span`,{class:`text-gray-400 shrink-0 ml-1`,children:W(o?Ft:Mt,{size:12})})]}),o&&c&&at(W(`div`,{ref:p,style:b,class:`bg-white border border-gray-200 rounded-lg shadow-xl max-h-64 overflow-y-auto`,children:[n&&W(`div`,{class:`border-b border-gray-100`,children:[W(`p`,{class:`text-xs font-semibold text-gray-400 px-3 pt-2 pb-1 uppercase tracking-wide`,children:`Special`}),[{id:`*`,label:`Accept all cookies`,sub:`Grants every cookie in this profile`},{id:`!`,label:`Reject non mandatory cookies`,sub:`Denies non mandatory cookies in this profile`}].map(e=>W(`button`,{type:`button`,class:`w-full text-left flex items-center gap-2.5 px-3 py-2 hover:bg-gray-50 ${_(e.id)?`bg-blue-50`:``}`,onClick:()=>v(e.id),children:[W(`span`,{class:`w-4 h-4 rounded border flex-shrink-0 flex items-center justify-center text-xs ${_(e.id)?`bg-blue-600 border-blue-600 text-white`:`border-gray-300`}`,children:_(e.id)?W(jt,{size:10}):null}),W(`div`,{class:`min-w-0`,children:[W(`span`,{class:`font-mono text-xs font-semibold text-gray-700`,children:e.id}),W(`span`,{class:`text-xs text-gray-400 ml-1.5`,children:e.label}),W(`p`,{class:`text-xs text-gray-400`,children:e.sub})]})]},e.id))]}),W(`div`,{children:[W(`p`,{class:`text-xs font-semibold text-gray-400 px-3 pt-2 pb-1 uppercase tracking-wide`,children:`Cookie IDs`}),g.length===0?W(`p`,{class:`text-xs text-gray-400 px-3 pb-3`,children:[`No cookies defined yet.`,` `,W(`a`,{href:`#/banners/cookie-templates/new`,class:`text-blue-600 hover:underline`,target:`_blank`,children:`Create a template ↗`})]}):g.map(e=>W(`button`,{type:`button`,class:`w-full text-left flex items-center gap-2.5 px-3 py-1.5 hover:bg-gray-50 ${_(e.id)?`bg-blue-50`:``}`,onClick:()=>v(e.id),children:[W(`span`,{class:`w-4 h-4 rounded border flex-shrink-0 flex items-center justify-center text-xs ${_(e.id)?`bg-blue-600 border-blue-600 text-white`:`border-gray-300`}`,children:_(e.id)?W(jt,{size:10}):null}),W(`div`,{class:`min-w-0 flex items-baseline gap-1.5`,children:[W(`span`,{class:`font-mono text-xs text-gray-800`,children:e.id}),e.source&&W(`span`,{class:`text-xs text-gray-400 truncate`,children:[`· `,e.source]})]})]},e.id))]})]}),document.body)]})}var Qi=[`primary`,`secondary`,`accent`,`text`],$i=[`custom`,`submit`,`manage`,`close`,`link`],ea={primary:`Primary`,secondary:`Secondary`,accent:`Accent`,text:`Text`},ta={custom:`Custom (grant/deny)`,submit:`Submit (save toggles)`,manage:`Manage (open modal)`,close:`Close (dismiss)`,link:`Link (open URL)`};function na({btn:e,onChange:t,onRemove:n,extraCookies:r}){let i=(n,r)=>t({...e,[n]:r}),a=!e.text.trim(),o=e.action===`link`&&!e.url?.trim();return W(`div`,{class:`border border-gray-100 rounded p-2.5 bg-gray-50 space-y-2`,children:W(`div`,{class:`grid grid-cols-[1fr_1fr_1fr_2fr_auto] gap-2 items-start`,children:[W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:[`Label `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(`input`,{class:`w-full border rounded px-2 py-1 text-xs ${a?`border-red-300 bg-red-50`:`border-gray-300`}`,value:e.text,onInput:e=>i(`text`,e.target.value),placeholder:`Button text`}),a&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`Required`})]}),W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:`Style`}),W(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-xs`,value:e.type,onChange:e=>i(`type`,e.target.value),children:Qi.map(e=>W(`option`,{value:e,children:ea[e]},e))})]}),W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:`Action`}),W(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-xs`,value:e.action,onChange:n=>{let r=n.target.value;t({...e,action:r,cookies:r===`custom`?e.cookies??`*`:void 0,url:r===`link`?e.url??``:void 0,type:r===`link`&&e.type!==`text`?`text`:e.type})},children:$i.map(e=>W(`option`,{value:e,children:ta[e]},e))})]}),e.action===`custom`?W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:[`Cookies to grant/deny `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(Zi,{value:e.cookies,onChange:e=>i(`cookies`,e),showSpecial:!0,extraCookies:r}),!e.cookies&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`Required for custom action`})]}):e.action===`link`?W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:[`URL `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(`input`,{type:`url`,class:`w-full border rounded px-2 py-1 text-xs ${o?`border-red-300 bg-red-50`:`border-gray-300`}`,value:e.url??``,onInput:e=>i(`url`,e.target.value),placeholder:`https://example.com/privacy`}),o&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`Required for link action`})]}):W(`div`,{}),W(`div`,{class:`flex items-end pb-0.5`,children:W(`button`,{type:`button`,onClick:n,class:`text-red-400 hover:text-red-600 text-lg leading-none p-0.5`,title:`Remove button`,children:`✕`})})]})})}function ra({buttons:e,onChange:t,cookieOptions:n}){return W(`div`,{class:`space-y-2`,children:[e.map((r,i)=>W(na,{btn:r,onChange:n=>t(e.map((e,t)=>t===i?n:e)),onRemove:()=>t(e.filter((e,t)=>t!==i)),extraCookies:n},i)),W(`button`,{type:`button`,onClick:()=>t([...e,{text:``,type:`primary`,action:`custom`,cookies:`*`}]),class:`text-xs text-blue-600 hover:underline`,children:`+ Add Button`})]})}var ia=[`top`,`bottom`,`middle`,`left-bottom`,`right-bottom`];function aa({label:e,value:t,onChange:n,cookieOptions:r}){let i=(e,r)=>n({...t,[e]:r});return W(`div`,{class:`space-y-5`,children:[e&&W(`p`,{class:`text-xs text-gray-500 italic`,children:e}),W(`div`,{class:`grid grid-cols-2 lg:grid-cols-3 gap-4`,children:[W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[`Position `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:t.position,onChange:e=>i(`position`,e.target.value),children:ia.map(e=>W(`option`,{value:e,children:e},e))})]}),W(Ji,{value:t.headingTag,onChange:e=>i(`headingTag`,e)}),W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:`Overlay opacity`}),W(Yi,{value:t.overlayOpacity,onChange:e=>i(`overlayOpacity`,e)}),W(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:`0% = transparent (page still interactive) · 100% = darkened`})]}),W(`div`,{class:`flex items-end pb-1`,children:W(`label`,{class:`flex items-center gap-2 text-xs font-medium text-gray-600 cursor-pointer`,children:[W(`input`,{type:`checkbox`,class:`w-4 h-4`,checked:t.showClose,onChange:e=>i(`showClose`,e.target.checked)}),`Show `,W(Mn,{size:10,className:`inline-block mx-0.5`}),` close button`]})}),W(`div`,{class:`flex items-end pb-1`,children:W(`label`,{class:`flex items-center gap-2 text-xs font-medium text-gray-600 cursor-pointer`,children:[W(`input`,{type:`checkbox`,class:`w-4 h-4`,checked:t.showLocaleSwitcher??!1,onChange:e=>i(`showLocaleSwitcher`,e.target.checked)}),`🌐 Show locale switcher`]})})]}),W(`div`,{children:[W(`h4`,{class:`text-xs font-semibold text-gray-600 mb-2 uppercase tracking-wide`,children:`Buttons`}),W(ra,{buttons:t.buttons,onChange:e=>i(`buttons`,e),cookieOptions:r})]})]})}function oa({cat:e,onChange:t,onRemove:n,cookieOptions:r}){let i=!e.id.trim();return W(`div`,{class:`border rounded-lg p-3 bg-gray-50 ${i?`border-red-200`:`border-gray-200`}`,children:W(`div`,{class:`grid grid-cols-2 lg:grid-cols-[1fr_1fr_1fr_auto] gap-3`,children:[W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:[`Category ID `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(`input`,{class:`w-full border rounded px-2 py-1 font-mono text-xs ${i?`border-red-300 bg-red-50`:`border-gray-300`}`,value:e.id,onInput:e=>t({id:e.target.value}),placeholder:`analytics`}),i&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`Required`})]}),W(Ji,{value:e.headingTag,onChange:e=>t({headingTag:e}),label:`Heading Tag`}),W(`div`,{children:[W(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:`Legal Basis`}),W(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1 text-xs`,value:e.type,onChange:e=>t({type:e.target.value}),children:[W(`option`,{value:`consent`,children:`Consent`}),W(`option`,{value:`legitimate_interest`,children:`Legitimate Interest`})]})]}),W(`div`,{class:`flex items-start`,children:W(`button`,{type:`button`,onClick:n,class:`text-red-400 hover:text-red-600 text-lg leading-none p-1`,title:`Remove category`,children:`✕`})}),W(`div`,{class:`col-span-2`,children:[W(`label`,{class:`block text-xs text-gray-500 mb-0.5`,children:[`Cookies in this category `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(Zi,{value:e.cookies.length?e.cookies:void 0,onChange:e=>t({cookies:Array.isArray(e)?e:[]}),showSpecial:!1,extraCookies:r}),!e.cookies.length&&W(`p`,{class:`text-xs text-red-500 mt-0.5`,children:`Select at least one cookie`})]}),W(`div`,{class:`flex items-end gap-4 pb-2`,children:[W(`label`,{class:`flex items-center gap-1.5 text-xs text-gray-600 cursor-pointer`,children:[W(`input`,{type:`checkbox`,checked:e.mandatory,onChange:e=>t({mandatory:e.target.checked})}),`Mandatory`]}),W(`label`,{class:`flex items-center gap-1.5 text-xs text-gray-600 cursor-pointer ${e.type===`legitimate_interest`?``:`opacity-40`}`,children:[W(`input`,{type:`checkbox`,checked:e.liEnabled,disabled:e.type!==`legitimate_interest`,onChange:e=>t({liEnabled:e.target.checked})}),`LI active`]})]})]})})}var sa=[`left`,`right`,`center`];function ca({value:e,onChange:t,cookieOptions:n,onCategoriesChange:r}){let i=(n,r)=>t({...e,[n]:r}),a=(n,r)=>{let i=e.categories.map((e,t)=>t===n?{...e,...r}:e);t({...e,categories:i})},o=()=>{let n=[...e.categories,{id:``,headingTag:`h3`,mandatory:!1,type:`consent`,liEnabled:!1,cookies:[]}];t({...e,categories:n}),r?.(n)},s=n=>{let i=e.categories.filter((e,t)=>t!==n);t({...e,categories:i}),r?.(i)};return W(`div`,{class:`space-y-5`,children:[W(`div`,{class:`grid grid-cols-2 lg:grid-cols-3 gap-4`,children:[W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:[`Position `,W(`span`,{class:`text-red-500`,children:`*`})]}),W(`select`,{class:`w-full border border-gray-300 rounded px-2 py-1.5 text-sm`,value:e.position,onChange:e=>i(`position`,e.target.value),children:sa.map(e=>W(`option`,{value:e,children:e},e))})]}),W(Ji,{value:e.headingTag,onChange:e=>i(`headingTag`,e)}),W(`div`,{children:[W(`label`,{class:`block text-xs font-medium text-gray-600 mb-1`,children:`Overlay opacity`}),W(Yi,{value:e.overlayOpacity,onChange:e=>i(`overlayOpacity`,e)}),W(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:`0% = transparent (page still interactive) · 100% = darkened`})]}),[[`showClose`,W(`span`,{class:`flex items-center gap-1`,children:[`Show `,W(Mn,{size:10}),` close button`]})],[`showLocaleSwitcher`,`🌐 Show locale switcher`],[`persistent`,`Persistent (block outside-click dismiss)`],[`hasSubheading`,`Include subheading field`]].map(([t,n])=>W(`label`,{class:`flex items-center gap-2 text-xs font-medium text-gray-600 cursor-pointer`,children:[W(`input`,{type:`checkbox`,class:`w-4 h-4`,checked:e[t],onChange:e=>i(t,e.target.checked)}),n]},t))]}),W(`div`,{children:[W(`h4`,{class:`text-xs font-semibold text-gray-600 mb-2 uppercase tracking-wide`,children:`Buttons`}),W(ra,{buttons:e.buttons,onChange:e=>i(`buttons`,e),cookieOptions:n})]}),W(`div`,{children:[W(`div`,{class:`flex items-center justify-between mb-2`,children:W(`h4`,{class:`text-xs font-semibold text-gray-600 uppercase tracking-wide`,children:`Consent Categories`})}),W(`p`,{class:`text-xs text-gray-400 mb-3`,children:`Each category groups cookies shown as a toggle in the preference modal. Category ID must be unique.`}),W(`div`,{class:`space-y-3`,children:e.categories.map((e,t)=>W(oa,{cat:e,onChange:e=>a(t,e),onRemove:()=>s(t),cookieOptions:n},t))}),W(`button`,{type:`button`,onClick:o,class:`text-xs text-blue-600 hover:underline mt-3 block`,children:`+ Add Category`})]})]})}var la={position:`bottom`,overlayOpacity:.5,showClose:!0,headingTag:`h2`,buttons:[]},ua={position:`center`,overlayOpacity:.5,showClose:!0,persistent:!1,headingTag:`h2`,hasSubheading:!1,buttons:[],categories:[]};function da(e,t,n){return e.buttons.length===0&&t.buttons.length===0&&n.buttons.length===0&&n.categories.length===0}function fa({id:e,current:t}){let n=J(),r=!e||e===`new`,[i,a]=R(``),[o,s]=R(``),[c,l]=R(`main`),[u,d]=R(r?la:zi().mainBanner),[f,p]=R(r?la:zi().gpcBanner),[m,h]=R(r?ua:zi().preferenceModal),[g,_]=R(``),[v,y]=R(!1),[b,x]=R(!r),{requestConfirm:S,dialog:C}=xr();z(()=>{!r&&e&&$.get(e).then(e=>{a(e.name),d(e.mainBanner),p(e.gpcBanner),h(e.preferenceModal)}).catch(()=>_(n(`uiTemplates.editor.error.notFound`))).finally(()=>x(!1))},[e,r]);let w=Vi(Ri(),{mainBanner:u,gpcBanner:f,preferenceModal:m},`en`,{en:Bi(m.categories,{mainBanner:u,gpcBanner:f,preferenceModal:m})},{}),T=async()=>{let t=!0;i.trim()?s(``):(s(n(`uiTemplates.editor.nameRequired`)),t=!1);let a=[...u.buttons,...f.buttons,...m.buttons];if(a.some(e=>!e.text.trim())){_(n(`uiTemplates.editor.error.buttons`));return}if(a.some(e=>e.action===`custom`&&!e.cookies)){_(n(`uiTemplates.editor.error.customButtons`));return}let o=m.categories,c=o.map(e=>e.id.trim());if(o.some(e=>!e.id.trim())){_(n(`uiTemplates.editor.error.catIds`));return}if(new Set(c).size!==c.length){_(n(`uiTemplates.editor.error.uniqueCatIds`));return}if(o.some(e=>!e.cookies.length)){_(n(`uiTemplates.editor.error.catCookies`));return}if(t){if(!r&&e){let t=await $.profileUsage(e).catch(()=>[]);if(t.length>0){let e=t.map(e=>`"${e.name}"`).join(`, `);if(!await S({title:n(t.length===1?`uiTemplates.editor.confirmUpdate.titleSingular`:`uiTemplates.editor.confirmUpdate.title`,{n:t.length}),message:n(`uiTemplates.editor.confirmUpdate.message`,{names:e})}))return}}_(``),y(!0);try{r?await $.create({name:i,mainBanner:u,gpcBanner:f,preferenceModal:m}):await $.update(e,{name:i,mainBanner:u,gpcBanner:f,preferenceModal:m}),window.location.hash=`#/banners/ui-templates`}catch{_(n(`uiTemplates.editor.error.failed`))}finally{y(!1)}}},E=[{key:`main`,label:n(`uiTemplates.editor.tabMain`)},{key:`gpc`,label:n(`uiTemplates.editor.tabGpc`)},{key:`modal`,label:n(`uiTemplates.editor.tabModal`)}],D=E.findIndex(e=>e.key===c),O=D===0,k=D===E.length-1;return b?W(X,{title:n(`uiTemplates.editor.title.edit`),current:t,children:W(`p`,{class:`text-sm text-gray-400`,role:`status`,"aria-live":`polite`,children:n(`uiTemplates.editor.loading`)})}):W(X,{title:n(r?`uiTemplates.editor.title.new`:`uiTemplates.editor.title.edit`),current:t,children:[C,W(`div`,{class:`space-y-5`,children:[W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-5`,children:[W(`label`,{for:`ui-template-name`,class:`block text-sm font-medium text-gray-700 mb-1`,children:[n(`uiTemplates.editor.name`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{id:`ui-template-name`,class:`w-full border rounded px-3 py-2 text-sm ${o?`border-red-400 bg-red-50`:`border-gray-300`}`,value:i,onInput:e=>{a(e.target.value),s(``)},placeholder:n(`uiTemplates.editor.namePlaceholder`),required:!0,"aria-required":`true`}),o&&W(`p`,{role:`alert`,class:`text-xs text-red-500 mt-1`,children:o})]}),r&&da(u,f,m)&&W(`div`,{class:`bg-amber-50 border border-amber-200 rounded-lg p-4 flex items-center justify-between gap-4`,children:[W(`p`,{class:`text-sm text-amber-800`,children:n(`uiTemplates.editor.loadDefaultsPrompt`)}),W(`button`,{type:`button`,onClick:()=>{let e=zi();d(e.mainBanner),p(e.gpcBanner),h(e.preferenceModal)},class:`shrink-0 bg-amber-700 text-white text-xs px-3 py-1.5 rounded hover:bg-amber-800 transition-colors`,children:n(`uiTemplates.editor.loadDefaultsBtn`)})]}),W(`div`,{class:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:[W(`div`,{class:`flex items-center border-b border-gray-200 px-5 py-3 gap-2`,children:[E.map((e,t)=>W(`div`,{class:`flex items-center gap-2`,children:[W(`span`,{class:`flex items-center justify-center w-6 h-6 rounded-full text-xs font-bold ${t===D?`bg-blue-600 text-white`:t<D?`bg-blue-100 text-blue-600`:`bg-gray-100 text-gray-400`}`,children:t+1}),W(`span`,{class:`text-sm font-medium ${t===D?`text-blue-600`:t<D?`text-blue-400`:`text-gray-400`}`,children:e.label}),t<E.length-1&&W(`span`,{class:`mx-1 text-gray-300 text-xs select-none`,children:`›`})]},e.key)),W(`span`,{class:`ml-auto text-xs text-gray-400`,children:n(`uiTemplates.editor.wizard.stepOf`,{step:D+1,total:E.length})})]}),W(`div`,{class:`p-5`,children:[c===`main`&&W(aa,{label:n(`uiTemplates.editor.mainBannerHint`),value:u,onChange:d}),c===`gpc`&&W(aa,{label:n(`uiTemplates.editor.gpcBannerHint`),value:f,onChange:p}),c===`modal`&&W(ca,{value:m,onChange:h})]}),g&&W(`div`,{class:`px-5 pb-4`,children:W(`p`,{role:`alert`,class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2`,children:g})}),W(`div`,{class:`flex items-center justify-between border-t border-gray-100 px-5 py-4`,children:[W(`div`,{class:`flex gap-2`,children:[!O&&W(`button`,{type:`button`,onClick:()=>{O||l(E[D-1].key)},class:`px-4 py-2 rounded-lg text-sm text-gray-600 border border-gray-300 hover:bg-gray-50 transition-colors`,children:n(`uiTemplates.editor.wizard.back`)}),W(`a`,{href:`#/banners/ui-templates`,class:`px-4 py-2 rounded-lg text-sm text-gray-500 hover:bg-gray-100 transition-colors`,children:n(`common.cancel`)})]}),W(`div`,{children:k?W(`button`,{type:`button`,onClick:T,disabled:v,class:`bg-blue-600 text-white px-5 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:n(v?`common.saving`:r?`uiTemplates.editor.action.create`:`uiTemplates.editor.action.save`)}):W(`button`,{type:`button`,onClick:()=>{k||l(E[D+1].key)},class:`bg-blue-600 text-white px-5 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:n(`uiTemplates.editor.wizard.next`)})})]})]}),W(ri,{draft:w,expandable:!0,previewMode:c})]})]})}function pa({page:e,hasMore:t,onPage:n}){let r=J();return W(`nav`,{"aria-label":`Pagination`,class:`flex items-center gap-2 mt-4`,children:[W(`button`,{onClick:()=>n(e-1),disabled:e<=1,"aria-label":r(`common.prev`),class:`px-3 py-1.5 text-sm rounded border border-gray-300 disabled:opacity-40 hover:bg-gray-50 transition-colors flex items-center gap-1`,children:[W(Nt,{size:14,"aria-hidden":`true`}),` `,r(`common.prev`)]}),W(`span`,{class:`text-sm text-gray-600`,"aria-current":`page`,children:r(`common.page`,{n:e})}),W(`button`,{onClick:()=>n(e+1),disabled:!t,"aria-label":r(`common.next`),class:`px-3 py-1.5 text-sm rounded border border-gray-300 disabled:opacity-40 hover:bg-gray-50 transition-colors flex items-center gap-1`,children:[r(`common.next`),` `,W(Pt,{size:14,"aria-hidden":`true`})]})]})}var ma={list:e=>{let t=new URLSearchParams;return e?.profileId&&t.set(`profileId`,e.profileId),e?.page&&t.set(`page`,String(e.page)),e?.from&&t.set(`from`,e.from),e?.to&&t.set(`to`,e.to),Y(`/consents?${t}`)},get:e=>Y(`/consents/${e}`),history:e=>Y(`/consents/${e}/history`)};function ha({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(1),[o,s]=R(!0),[c,l]=R(``),[u,d]=R(``),[f,p]=R(!1),m=e=>{s(!0),ma.list({page:e,from:c||void 0,to:u||void 0}).then(e=>{let t=f?e.filter(e=>e.gpcDetected):e;r(t)}).catch(()=>{}).finally(()=>s(!1))};z(()=>{m(i)},[i,c,u,f]);let h=()=>{let e=new URLSearchParams({format:`csv`});return c&&e.set(`from`,c),u&&e.set(`to`,u),`/export/consents?${e.toString()}`};return W(X,{title:t(`consents.title`),current:e,children:[W(`div`,{class:`flex flex-wrap gap-3 items-center mb-4`,children:[W(`label`,{class:`flex items-center gap-1 text-sm text-gray-600`,children:[t(`consents.filterFrom`),W(`input`,{type:`date`,value:c,onInput:e=>{l(e.target.value),a(1)},class:`ml-1 border border-gray-300 rounded px-2 py-1 text-xs`})]}),W(`label`,{class:`flex items-center gap-1 text-sm text-gray-600`,children:[t(`consents.filterTo`),W(`input`,{type:`date`,value:u,onInput:e=>{d(e.target.value),a(1)},class:`ml-1 border border-gray-300 rounded px-2 py-1 text-xs`})]}),W(`label`,{class:`flex items-center gap-1 text-sm text-gray-600`,children:[W(`input`,{type:`checkbox`,checked:f,onChange:e=>{p(e.target.checked),a(1)}}),t(`consents.filterGpc`)]}),W(`div`,{class:`ml-auto flex items-center gap-3`,children:[W(`span`,{class:`text-sm text-gray-500`,children:t(`consents.records`,{n:n.length})}),W(`button`,{onClick:()=>Qn(h()),class:`text-sm text-blue-600 hover:underline`,children:t(`common.exportCsv`)})]})]}),W(_r,{loading:o,keyFn:e=>e.id,rows:n,columns:[{key:`visitorId`,label:t(`consents.col.visitorId`),render:e=>W(`span`,{class:`font-mono text-xs`,children:[e.visitorId.slice(0,12),`…`]})},{key:`profileId`,label:t(`consents.col.profile`),render:e=>W(`span`,{class:`font-mono text-xs`,children:e.profileId.slice(0,8)})},{key:`locale`,label:t(`consents.col.locale`)},{key:`gpcDetected`,label:t(`consents.col.gpc`),render:e=>e.gpcDetected?W(`span`,{class:`text-amber-600 font-medium text-xs`,children:t(`consents.gpcYes`)}):``},{key:`ageVerified`,label:t(`consents.col.age`),render:e=>e.ageVerified?W(`span`,{class:`text-green-600 font-medium text-xs`,children:t(`consents.ageVerified`)}):``},{key:`source`,label:t(`consents.col.source`)},{key:`createdAt`,label:t(`consents.col.created`),render:e=>new Date(e.createdAt).toLocaleString()}],emptyText:t(`consents.empty`)}),W(pa,{page:i,hasMore:n.length===50,onPage:a})]})}var ga={list:e=>{let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),Y(`/visitors?${t}`)}};function _a({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(1),[o,s]=R(!0),c=e=>{s(!0),ga.list({page:e}).then(r).catch(()=>{}).finally(()=>s(!1))};return z(()=>{c(i)},[i]),W(X,{title:t(`visitors.title`),current:e,children:[W(_r,{loading:o,keyFn:e=>e.id,rows:n,columns:[{key:`visitorId`,label:t(`visitors.col.visitorId`),render:e=>W(`span`,{class:`font-mono text-xs`,children:[e.visitorId.slice(0,16),`…`]})},{key:`country`,label:t(`visitors.col.country`),render:e=>e.country??`—`},{key:`firstSeen`,label:t(`visitors.col.firstSeen`),render:e=>new Date(e.firstSeen).toLocaleDateString()},{key:`lastSeen`,label:t(`visitors.col.lastSeen`),render:e=>new Date(e.lastSeen).toLocaleDateString()}],emptyText:t(`visitors.empty`)}),W(pa,{page:i,hasMore:n.length===50,onPage:a})]})}var va={list:()=>Y(`/users`),get:e=>Y(`/users/${e}`),create:e=>Y(`/users`,{method:`POST`,body:JSON.stringify(e)}),update:(e,t)=>Y(`/users/${e}`,{method:`PUT`,body:JSON.stringify(t)}),delete:e=>Y(`/users/${e}`,{method:`DELETE`}),assignRole:(e,t)=>Y(`/users/${e}/roles`,{method:`POST`,body:JSON.stringify({roleId:t})}),revokeRole:(e,t)=>Y(`/users/${e}/roles/${t}`,{method:`DELETE`})},ya={list:()=>Y(`/roles`),permissions:e=>Y(`/roles/${e}/permissions`),allPermissions:()=>Y(`/permissions`),create:e=>Y(`/roles`,{method:`POST`,body:JSON.stringify(e)}),update:(e,t)=>Y(`/roles/${e}`,{method:`PUT`,body:JSON.stringify(t)}),delete:e=>Y(`/roles/${e}`,{method:`DELETE`}),assignPermission:(e,t)=>Y(`/roles/${e}/permissions`,{method:`POST`,body:JSON.stringify({permissionId:t})}),revokePermission:(e,t)=>Y(`/roles/${e}/permissions/${t}`,{method:`DELETE`})};function ba({current:e}){let{user:t}=G(),n=J(),[r,i]=R([]),[a,o]=R([]),[s,c]=R([]),[l,u]=R(!0),[d,f]=R(!1),[p,m]=R({name:``,email:``,password:``,confirmPassword:``,roleId:``,allowedTenants:[]}),[h,g]=R(!1),[_,v]=R(!1),[y,b]=R(``),[x,S]=R(null),[C,w]=R([]),[T,E]=R(``),{requestConfirm:D,dialog:O}=xr(),k=()=>{u(!0),Promise.all([va.list(),ya.list(),Y(`/tenants`).catch(()=>[])]).then(([e,t,n])=>{i(e),o(t),c(n)}).catch(()=>{}).finally(()=>u(!1))};z(k,[]);let ee=e=>{m(t=>({...t,allowedTenants:t.allowedTenants.includes(e)?t.allowedTenants.filter(t=>t!==e):[...t.allowedTenants,e]}))},te=async e=>{if(e.preventDefault(),p.password!==p.confirmPassword){b(n(`users.createForm.passwordMismatch`));return}b(``);try{await va.create({name:p.name,email:p.email,password:p.password,roleId:p.roleId||void 0,...p.allowedTenants.length>0?{allowedTenants:p.allowedTenants}:{}}),f(!1),m({name:``,email:``,password:``,confirmPassword:``,roleId:``,allowedTenants:[]}),g(!1),v(!1),k()}catch{b(n(`users.createForm.error`))}},ne=async(e,t)=>{await D({title:n(`users.dialog.delete.title`,{name:t}),message:n(`users.dialog.delete.message`)})&&(await va.delete(e).catch(()=>{}),k())},A=async e=>{await va.update(e.id,{isActive:!e.isActive}).catch(()=>{}),k()},j=e=>{S(e),w(e.allowedTenants??[]),E(``)},re=async()=>{if(x)try{await va.update(x.id,{allowedTenants:C}),S(null),k()}catch{E(n(`users.edit.error.save`))}},ie=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])};return W(X,{title:n(`users.title`),current:e,children:[O,W(`div`,{class:`flex justify-between items-center mb-4`,children:[W(`p`,{class:`text-sm text-gray-500`,children:n(`users.count`,{n:r.length})}),W(vr,{perm:`user:create`,children:W(`button`,{onClick:()=>f(!d),class:`bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors`,children:n(d?`common.cancel`:`users.newUser`)})})]}),x&&W(`div`,{class:`fixed inset-0 z-50 flex items-center justify-center`,children:[W(`div`,{class:`absolute inset-0 bg-black/40`,onClick:()=>S(null),"aria-hidden":`true`}),W(`div`,{class:`relative bg-white rounded-xl shadow-2xl p-6 w-full max-w-sm mx-4 space-y-4`,children:[W(`h3`,{class:`text-sm font-semibold text-gray-900`,children:n(`users.edit.title`,{name:x.name})}),s.length>0&&W(`div`,{children:[W(`p`,{class:`text-xs font-medium text-gray-700 mb-1.5`,children:[n(`users.allowedSites`),W(`span`,{class:`ml-1.5 font-normal text-gray-400`,children:n(`users.allowedSitesHint`)})]}),W(`div`,{class:`flex flex-wrap gap-2`,children:s.map(e=>W(`label`,{class:`flex items-center gap-1.5 px-2.5 py-1.5 border rounded text-xs cursor-pointer select-none transition-colors ${C.includes(e.id)?`border-blue-400 bg-blue-50 text-blue-700`:`border-gray-200 text-gray-600 hover:border-gray-300`}`,children:[W(`input`,{type:`checkbox`,class:`accent-blue-600`,checked:C.includes(e.id),onChange:()=>ie(e.id)}),e.name||e.slug]},e.id))})]}),T&&W(`p`,{class:`text-xs text-red-600`,children:T}),W(`div`,{class:`flex justify-end gap-2 pt-1`,children:[W(`button`,{type:`button`,onClick:()=>S(null),class:`px-4 py-2 text-sm text-gray-600 hover:bg-gray-100 rounded-lg transition-colors`,children:`Cancel`}),W(`button`,{type:`button`,onClick:re,class:`px-4 py-2 text-sm font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors`,children:`Save`})]})]})]}),d&&W(`form`,{onSubmit:te,class:`bg-white border border-gray-200 rounded-lg p-5 mb-4 space-y-3`,children:[W(`h3`,{class:`text-sm font-semibold text-gray-700`,children:n(`users.createForm.title`)}),W(`div`,{class:`grid grid-cols-2 gap-3`,children:[W(`input`,{class:`border border-gray-300 rounded px-3 py-2 text-sm`,placeholder:n(`users.createForm.namePlaceholder`),"aria-label":n(`common.name`),required:!0,value:p.name,onInput:e=>m(t=>({...t,name:e.target.value}))}),W(`input`,{class:`border border-gray-300 rounded px-3 py-2 text-sm`,placeholder:n(`users.createForm.emailPlaceholder`),"aria-label":n(`common.email`),type:`email`,required:!0,value:p.email,onInput:e=>m(t=>({...t,email:e.target.value}))}),W(`div`,{class:`relative`,children:[W(`input`,{class:`w-full border border-gray-300 rounded px-3 py-2 pr-9 text-sm`,placeholder:n(`users.createForm.passwordPlaceholder`),"aria-label":n(`users.createForm.passwordPlaceholder`),type:h?`text`:`password`,required:!0,value:p.password,onInput:e=>m(t=>({...t,password:e.target.value}))}),W(`button`,{type:`button`,class:`absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600`,onClick:()=>g(e=>!e),"aria-label":n(h?`common.hidePassword`:`common.showPassword`),title:n(h?`common.hidePassword`:`common.showPassword`),children:W(h?Wt:Gt,{size:15,"aria-hidden":`true`})})]}),W(`div`,{class:`relative`,children:[W(`input`,{class:`w-full border rounded px-3 py-2 pr-9 text-sm ${p.confirmPassword&&p.password!==p.confirmPassword?`border-red-300 bg-red-50`:`border-gray-300`}`,placeholder:n(`users.createForm.confirmPasswordPlaceholder`),"aria-label":n(`users.createForm.confirmPasswordPlaceholder`),type:_?`text`:`password`,required:!0,value:p.confirmPassword,onInput:e=>m(t=>({...t,confirmPassword:e.target.value}))}),W(`button`,{type:`button`,class:`absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600`,onClick:()=>v(e=>!e),"aria-label":n(_?`common.hidePassword`:`common.showPassword`),title:n(_?`common.hidePassword`:`common.showPassword`),children:W(_?Wt:Gt,{size:15,"aria-hidden":`true`})})]}),W(`select`,{class:`border border-gray-300 rounded px-3 py-2 text-sm col-span-2`,value:p.roleId,"aria-label":n(`common.roles`),onChange:e=>m(t=>({...t,roleId:e.target.value})),children:[W(`option`,{value:``,children:n(`users.createForm.selectRole`)}),a.map(e=>W(`option`,{value:e.id,children:e.name},e.id))]})]}),s.length>0&&W(`div`,{children:[W(`p`,{class:`text-xs font-medium text-gray-700 mb-1.5`,children:[n(`users.allowedSites`),W(`span`,{class:`ml-1.5 font-normal text-gray-400`,children:n(`users.allowedSitesHint`)})]}),W(`div`,{class:`flex flex-wrap gap-2`,children:s.map(e=>W(`label`,{class:`flex items-center gap-1.5 px-2.5 py-1.5 border rounded text-xs cursor-pointer select-none transition-colors ${p.allowedTenants.includes(e.id)?`border-blue-400 bg-blue-50 text-blue-700`:`border-gray-200 text-gray-600 hover:border-gray-300`}`,children:[W(`input`,{type:`checkbox`,class:`accent-blue-600`,checked:p.allowedTenants.includes(e.id),onChange:()=>ee(e.id)}),e.name||e.slug]},e.id))})]}),p.confirmPassword&&p.password!==p.confirmPassword&&W(`p`,{role:`alert`,class:`text-xs text-red-600`,children:n(`users.createForm.passwordMismatch`)}),y&&W(`p`,{role:`alert`,class:`text-sm text-red-600`,children:y}),W(`button`,{type:`submit`,class:`bg-blue-600 text-white px-4 py-2 rounded text-sm`,children:n(`common.create`)})]}),W(_r,{loading:l,keyFn:e=>e.id,rows:r,columns:[{key:`name`,label:n(`common.name`)},{key:`email`,label:n(`common.email`)},{key:`isActive`,label:n(`users.col.status`),render:e=>{let t=e;return W(`span`,{class:`text-xs font-medium px-2 py-0.5 rounded-full ${t.isActive?`bg-green-100 text-green-700`:`bg-gray-100 text-gray-500`}`,children:t.isActive?n(`users.status.active`):n(`users.status.inactive`)})}},{key:`createdAt`,label:n(`common.created`),render:e=>new Date(e.createdAt).toLocaleDateString()},{key:`actions`,label:``,render:e=>{let r=e;return r.id===t?.sub?W(`span`,{class:`text-xs text-gray-400`,children:n(`common.you`)}):W(`div`,{class:`flex gap-2`,children:[W(vr,{perm:`user:update`,children:[W(`button`,{onClick:()=>j(r),class:`text-xs text-gray-600 hover:underline`,children:n(`common.edit`)}),W(`button`,{onClick:()=>A(r),class:`text-xs text-blue-600 hover:underline`,children:r.isActive?n(`users.action.deactivate`):n(`users.action.activate`)})]}),W(vr,{perm:`user:delete`,children:W(`button`,{onClick:()=>ne(r.id,r.name),class:`text-xs text-red-500 hover:underline`,children:n(`common.delete`)})})]})}}]})]})}function xa(e){let t={};for(let n of e){let e=n.name.includes(`:`)?n.name.split(`:`)[0]:`other`;(t[e]??=[]).push(n)}return Object.entries(t).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({group:e,items:t}))}function Sa({initial:e,onSave:t,onCancel:n,saving:r}){let i=J(),[a,o]=R(e?.name??``),[s,c]=R(e?.description??``),l=!a.trim();return W(`form`,{onSubmit:e=>{e.preventDefault(),!l&&t(a.trim(),s.trim())},class:`border border-blue-200 bg-blue-50 rounded-lg p-3 space-y-2`,children:[W(`div`,{children:[W(`label`,{for:`role-name`,class:`block text-xs font-medium text-gray-600 mb-0.5`,children:[i(`roles.form.roleNameLabel`),` `,W(`span`,{class:`text-red-500`,"aria-hidden":`true`,children:`*`})]}),W(`input`,{id:`role-name`,class:`w-full border rounded px-2 py-1.5 text-sm ${l?`border-red-300 bg-red-50`:`border-gray-300 bg-white`}`,value:a,onInput:e=>o(e.target.value),placeholder:i(`roles.form.roleNamePlaceholder`),autoFocus:!0,required:!0,"aria-required":`true`,"aria-invalid":l}),l&&W(`p`,{role:`alert`,class:`text-xs text-red-500 mt-0.5`,children:i(`common.required`)})]}),W(`div`,{children:[W(`label`,{for:`role-desc`,class:`block text-xs font-medium text-gray-600 mb-0.5`,children:i(`roles.form.descriptionLabel`)}),W(`input`,{id:`role-desc`,class:`w-full border border-gray-300 bg-white rounded px-2 py-1.5 text-sm`,value:s,onInput:e=>c(e.target.value),placeholder:i(`roles.form.descriptionPlaceholder`)})]}),W(`div`,{class:`flex gap-2 pt-1`,children:[W(`button`,{type:`submit`,disabled:r||l,class:`flex items-center gap-1.5 px-3 py-1.5 bg-blue-600 text-white text-xs font-medium rounded hover:bg-blue-700 disabled:opacity-50 transition-colors`,children:[W(jt,{size:12,"aria-hidden":`true`}),` `,i(r?`common.saving`:`common.save`)]}),W(`button`,{type:`button`,onClick:n,class:`flex items-center gap-1.5 px-3 py-1.5 text-xs text-gray-600 hover:bg-gray-100 rounded transition-colors`,children:[W(Mn,{size:12,"aria-hidden":`true`}),` `,i(`common.cancel`)]})]})]})}function Ca({current:e}){let t=J(),[n,r]=R([]),[i,a]=R([]),[o,s]=R(null),[c,l]=R([]),[u,d]=R(!0),[f,p]=R(!1),[m,h]=R(null),[g,_]=R(!1),[v,y]=R(``),{requestConfirm:b,dialog:x}=xr(),S=()=>{d(!0),Promise.all([ya.list(),ya.allPermissions()]).then(([e,t])=>{r(e),a(t)}).catch(()=>y(t(`roles.error.load`))).finally(()=>d(!1))};z(S,[]);let C=e=>{m!==e.id&&(s(e),ya.permissions(e.id).then(l).catch(()=>{}))},w=async e=>{if(!o)return;let n=c.some(t=>t.id===e.id);try{n?(await ya.revokePermission(o.id,e.id),l(t=>t.filter(t=>t.id!==e.id))):(await ya.assignPermission(o.id,e.id),l(t=>[...t,e]))}catch{y(t(`roles.error.perm`))}},T=async(e,n)=>{_(!0),y(``);try{let t=await ya.create({name:e,description:n||void 0});p(!1),S(),s(t),ya.permissions(t.id).then(l).catch(()=>{})}catch{y(t(`roles.error.create`))}finally{_(!1)}},E=async(e,n,r)=>{_(!0),y(``);try{await ya.update(e,{name:n,description:r||void 0}),h(null),S(),o?.id===e&&s(e=>e&&{...e,name:n,description:r})}catch{y(t(`roles.error.update`))}finally{_(!1)}},D=async e=>{if(await b({title:t(`roles.dialog.delete.title`,{name:e.name}),message:t(`roles.dialog.delete.message`)}))try{await ya.delete(e.id),o?.id===e.id&&(s(null),l([])),S()}catch{y(t(`roles.error.delete`))}},O=xa(i);return W(X,{title:t(`roles.title`),current:e,children:[x,v&&W(`p`,{role:`alert`,class:`text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2 mb-4`,children:v}),u?W(`p`,{role:`status`,"aria-live":`polite`,class:`text-gray-400 text-sm`,children:t(`common.loading`)}):W(`div`,{class:`grid grid-cols-1 md:grid-cols-[280px_1fr] gap-6 items-start`,children:[W(`div`,{children:[W(`div`,{class:`flex items-center justify-between mb-2`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700`,children:t(`roles.list.heading`)}),W(`button`,{onClick:()=>{p(!0),h(null)},class:`flex items-center gap-1 text-xs text-blue-600 hover:underline`,children:[W(ln,{size:12,"aria-hidden":`true`}),` `,t(`common.newRole`)]})]}),W(`div`,{class:`space-y-2`,children:[f&&W(Sa,{onSave:T,onCancel:()=>p(!1),saving:g}),n.map(e=>{let n=o?.id===e.id;return m===e.id?W(Sa,{initial:{name:e.name,description:e.description??``},onSave:(t,n)=>E(e.id,t,n),onCancel:()=>h(null),saving:g},e.id):W(`div`,{class:`group flex items-start gap-2 px-3 py-2.5 rounded-lg border text-sm transition-colors cursor-pointer ${n?`border-blue-500 bg-blue-50`:`border-gray-200 bg-white hover:border-gray-300`}`,onClick:()=>C(e),role:`button`,tabIndex:0,onKeyDown:t=>t.key===`Enter`&&C(e),"aria-pressed":n,children:[W(`div`,{class:`flex-1 min-w-0`,children:[W(`p`,{class:`font-medium ${n?`text-blue-700`:`text-gray-700`}`,children:e.name}),e.description&&W(`p`,{class:`text-xs text-gray-400 mt-0.5 truncate`,children:e.description})]}),W(`div`,{class:`flex gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity mt-0.5`,children:[W(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),h(e.id),p(!1)},class:`p-1 text-gray-400 hover:text-blue-600 rounded transition-colors`,"aria-label":t(`roles.aria.editRole`),title:t(`roles.aria.editRole`),children:W(sn,{size:13,"aria-hidden":`true`})}),W(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),D(e)},class:`p-1 text-gray-400 hover:text-red-600 rounded transition-colors`,"aria-label":t(`roles.aria.deleteRole`),title:t(`roles.aria.deleteRole`),children:W(Tn,{size:13,"aria-hidden":`true`})})]})]},e.id)}),n.length===0&&!f&&W(`p`,{class:`text-sm text-gray-400 text-center py-6`,children:t(`roles.list.empty`)})]})]}),W(`div`,{children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-2`,children:o?t(`roles.perms.heading`,{name:o.name}):t(`roles.perms.selectPrompt`)}),o?W(`div`,{class:`space-y-4`,children:[O.map(({group:e,items:n})=>W(`div`,{class:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:[W(`div`,{class:`px-4 py-2 bg-gray-50 border-b border-gray-200 flex items-center justify-between`,children:[W(`span`,{class:`text-xs font-semibold text-gray-600 uppercase tracking-wide`,children:e}),W(`div`,{class:`flex gap-2`,children:W(`button`,{type:`button`,class:`text-xs text-blue-600 hover:underline`,onClick:()=>{(n.every(e=>c.some(t=>t.id===e.id))?n.filter(e=>c.some(t=>t.id===e.id)):n.filter(e=>!c.some(t=>t.id===e.id))).forEach(e=>w(e))},children:n.every(e=>c.some(t=>t.id===e.id))?t(`common.revokeAll`):t(`common.grantAll`)})})]}),W(`div`,{class:`divide-y divide-gray-50`,children:n.map(e=>{let n=c.some(t=>t.id===e.id);return W(`label`,{class:`flex items-center gap-3 px-4 py-2.5 hover:bg-gray-50 cursor-pointer transition-colors`,children:[W(`input`,{type:`checkbox`,checked:n,onChange:()=>w(e),class:`w-4 h-4 accent-blue-600 rounded shrink-0`}),W(`div`,{class:`min-w-0`,children:[W(`p`,{class:`text-sm font-medium text-gray-700 font-mono`,children:e.name}),e.description&&W(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:e.description})]}),n&&W(`span`,{class:`ml-auto shrink-0 text-xs text-green-600 bg-green-50 px-1.5 py-0.5 rounded-full`,children:t(`common.granted`)})]},e.id)})})]},e)),i.length===0&&W(`p`,{class:`text-sm text-gray-400`,children:t(`roles.perms.noPerms`)})]}):W(`div`,{class:`bg-white border border-gray-200 rounded-lg p-8 text-center`,children:W(`p`,{class:`text-sm text-gray-400`,children:t(`roles.perms.clickPrompt`)})})]})]})]})}function wa({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(!0),[o,s]=R(!1),[c,l]=R(``),[u,d]=R(``),{requestConfirm:f,dialog:p}=xr(),m=()=>{a(!0),Y(`/tenants`).then(r).catch(()=>{}).finally(()=>a(!1))};z(()=>{m()},[]);let h=async()=>{if(!(!c.trim()||!u.trim())){s(!0);try{await Y(`/tenants`,{method:`POST`,body:JSON.stringify({name:c.trim(),slug:u.trim()})}),l(``),d(``),m()}catch{}finally{s(!1)}}},g=async(e,n)=>{await f({title:t(`sites.dialog.delete.title`,{name:n}),message:t(`sites.dialog.delete.message`)})&&(await Y(`/tenants/${e}`,{method:`DELETE`}).catch(()=>{}),m())};return W(X,{title:t(`sites.title`),current:e,children:[p,W(`div`,{class:`mb-4 bg-white rounded-lg border border-gray-200 p-4`,children:[W(`p`,{class:`text-sm font-medium text-gray-700 mb-3`,children:t(`sites.createNew`)}),W(`div`,{class:`flex gap-2 flex-wrap`,children:[W(`input`,{type:`text`,placeholder:t(`sites.namePlaceholder`),value:c,onInput:e=>l(e.target.value),class:`border border-gray-300 rounded px-3 py-1.5 text-sm w-40`,"aria-label":t(`sites.namePlaceholder`)}),W(`input`,{type:`text`,placeholder:t(`sites.slugPlaceholder`),value:u,onInput:e=>d(e.target.value),class:`border border-gray-300 rounded px-3 py-1.5 text-sm w-40`,"aria-label":t(`sites.slugPlaceholder`)}),W(`button`,{onClick:h,disabled:o,class:`bg-blue-600 text-white text-sm px-3 py-1.5 rounded hover:bg-blue-700 disabled:opacity-50`,children:t(`common.create`)})]})]}),W(_r,{loading:i,keyFn:e=>e.id,rows:n,columns:[{key:`name`,label:t(`sites.col.name`)},{key:`slug`,label:t(`sites.col.slug`),render:e=>W(`span`,{class:`font-mono text-xs`,children:e.slug})},{key:`id`,label:t(`sites.col.id`),render:e=>W(`span`,{class:`font-mono text-xs text-gray-400`,children:e.id})},{key:`createdAt`,label:t(`sites.col.created`),render:e=>new Date(e.createdAt).toLocaleDateString()},{key:`actions`,label:``,render:e=>{let n=e;return n.id==="default"?W(`span`,{class:`text-xs text-gray-400`,children:t(`common.default`)}):W(`button`,{onClick:()=>g(n.id,n.name),class:`text-xs text-red-500 hover:underline`,children:t(`common.delete`)})}}],emptyText:t(`sites.empty`)})]})}function Ta(){let e=window.location.hash.match(/[?&]page=(\d+)/);return e?Math.max(1,parseInt(e[1],10)):1}function Ea(e){if(!Number.isFinite(e)||e<1)return;let t=(window.location.hash.split(`?`)[0]??`/vendors`).replace(/^#/,``);window.location.hash=e===1?t:`${t}?page=${e}`}function Da({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(0),[o,s]=R(0),[c,l]=R(Ta),[u,d]=R(1),[f,p]=R(``),[m,h]=R(!0),[g,_]=R(``),v=(e,t)=>{h(!0),_(``);let n=new URLSearchParams;e&&n.set(`q`,e),n.set(`page`,String(t)),n.set(`limit`,`25`),Y(`/tcf/vendors?${n.toString()}`).then(e=>{r(e.vendors),a(e.total),s(e.vendorListVersion),d(e.totalPages),l(Number.isFinite(e.page)&&e.page>=1?e.page:1)}).catch(e=>{_(e instanceof Error?e.message:`GVL not available. Enable tcf.enabled in server config.`)}).finally(()=>h(!1))};z(()=>{v(f,c)},[]);let y=Ni(e=>{p(e),l(1),Ea(1),v(e,1)},500),b=e=>{l(e),Ea(e),v(f,e)};return W(X,{title:t(`vendors.title`),current:e,children:[W(`div`,{class:`mb-5 p-4 bg-blue-50 border border-blue-200 rounded-lg text-sm text-blue-900 space-y-2`,children:[W(`p`,{class:`font-semibold`,children:t(`vendors.info.title`)}),W(`p`,{children:[`The `,W(`strong`,{children:`IAB Transparency & Consent Framework (TCF)`}),` is an industry standard used by ad-tech platforms across Europe. The `,W(`strong`,{children:`Global Vendor List (GVL)`}),` is a public registry — maintained by the IAB — of every registered ad-tech vendor (Google, Meta, etc.) and the "purposes" they require consent for (e.g. Purpose 1 = store/access info, Purpose 3 = create personalised ads).`]}),W(`p`,{children:[`When TCF is enabled on a profile, Consenti generates a `,W(`strong`,{children:`TC String`}),` alongside the normal consent record. Ad platforms read this string from the cookie to know which vendors and purposes the visitor accepted. Without a valid TC String, compliant ad platforms will not fire their tags.`]}),W(`p`,{children:[`This list is `,W(`strong`,{children:`read-only reference data`}),` — it is fetched automatically from the IAB and refreshed every 7 days. You do not need to sync or edit it manually. Use it to look up a vendor's numeric ID and the purpose IDs they need, then attach those IDs to the relevant cookie in your profile config.`]}),W(`p`,{class:`text-xs text-blue-700`,children:`TCF is only relevant if your site runs IAB-registered ad-tech vendors and you need to pass a TC String to their tags. If you only need GDPR / CCPA consent for your own first-party cookies, you can ignore this page.`})]}),W(`div`,{class:`mb-4 flex items-center gap-3`,children:[W(`input`,{type:`text`,placeholder:t(`vendors.searchPlaceholder`),"aria-label":t(`vendors.searchPlaceholder`),value:f,onChange:e=>y(e.target.value),class:`border border-gray-300 rounded px-3 py-1.5 text-sm w-64`}),o>0&&W(`span`,{class:`text-xs text-gray-500`,children:t(`vendors.gvlMeta`,{version:o,total:i})})]}),g&&W(`div`,{role:`alert`,class:`p-4 bg-amber-50 border border-amber-200 rounded text-sm text-amber-800`,children:g}),m&&W(`p`,{role:`status`,"aria-live":`polite`,class:`text-sm text-gray-500`,children:t(`vendors.loading`)}),!m&&!g&&n.length===0&&W(`p`,{class:`text-sm text-gray-500`,children:t(`vendors.noResults`)}),!m&&n.length>0&&W(C,{children:[W(`div`,{class:`max-h-[60vh] overflow-y-auto rounded border border-gray-200`,children:W(`table`,{class:`w-full text-xs`,children:[W(`thead`,{class:`bg-gray-50`,children:W(`tr`,{children:[W(`th`,{scope:`col`,class:`text-left px-3 py-2 text-gray-600`,children:t(`vendors.col.id`)}),W(`th`,{scope:`col`,class:`text-left px-3 py-2 text-gray-600`,children:t(`vendors.col.name`)}),W(`th`,{scope:`col`,class:`text-left px-3 py-2 text-gray-600`,children:t(`vendors.col.purposes`)}),W(`th`,{scope:`col`,class:`text-left px-3 py-2 text-gray-600`,children:t(`vendors.col.liPurposes`)}),W(`th`,{scope:`col`,class:`text-left px-3 py-2 text-gray-600`,children:t(`vendors.col.specialPurposes`)})]})}),W(`tbody`,{children:n.map(e=>W(`tr`,{class:`border-t border-gray-100 hover:bg-gray-50`,children:[W(`td`,{class:`px-3 py-2 font-mono text-gray-500`,children:e.id}),W(`td`,{class:`px-3 py-2 font-medium text-gray-800`,children:e.name}),W(`td`,{class:`px-3 py-2 text-gray-600`,children:(e.purposes??[]).join(`, `)||`—`}),W(`td`,{class:`px-3 py-2 text-gray-600`,children:(e.legIntPurposes??[]).join(`, `)||`—`}),W(`td`,{class:`px-3 py-2 text-gray-600`,children:(e.specialPurposes??[]).join(`, `)||`—`})]},e.id))})]})}),W(`nav`,{"aria-label":`Vendor list pagination`,class:`mt-3 flex items-center justify-between text-xs text-gray-500`,children:[W(`span`,{children:t(`vendors.pagination`,{page:c,totalPages:u,total:i})}),W(`div`,{class:`flex items-center gap-1`,children:[W(`button`,{onClick:()=>b(c-1),disabled:c<=1,"aria-label":t(`common.prev`),class:`px-2 py-1 border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed`,children:t(`vendors.prev`)}),Array.from({length:Math.min(5,u)},(e,t)=>{let n=Math.max(1,Math.min(c-2,u-4))+t;return W(`button`,{onClick:()=>b(n),"aria-current":n===c?`page`:void 0,class:`px-2 py-1 border rounded ${n===c?`border-blue-500 bg-blue-50 text-blue-700 font-medium`:`border-gray-300 hover:bg-gray-50`}`,children:n},n)}),W(`button`,{onClick:()=>b(c+1),disabled:c>=u,"aria-label":t(`common.next`),class:`px-2 py-1 border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed`,children:t(`vendors.next`)})]})]})]})]})}var Oa={list:e=>{let t=new URLSearchParams;return e?.action&&t.set(`action`,e.action),e?.page&&t.set(`page`,String(e.page)),Y(`/audit?${t}`)}};function ka({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(1),[o,s]=R(!0),c=e=>{s(!0),Oa.list({page:e}).then(r).catch(()=>{}).finally(()=>s(!1))};return z(()=>{c(i)},[i]),W(X,{title:t(`audit.title`),current:e,children:[W(`div`,{class:`flex justify-end mb-4`,children:W(`button`,{onClick:()=>Qn(`/export/audit?format=csv`),class:`text-sm text-blue-600 hover:underline`,children:t(`common.exportCsv`)})}),W(_r,{loading:o,keyFn:e=>e.id,rows:n,columns:[{key:`createdAt`,label:t(`audit.col.time`),render:e=>new Date(e.createdAt).toLocaleString()},{key:`action`,label:t(`audit.col.action`)},{key:`resourceType`,label:t(`audit.col.resource`)},{key:`resourceId`,label:t(`audit.col.resourceId`),render:e=>{let t=e.resourceId;return t?W(`span`,{class:`font-mono text-xs`,children:[t.slice(0,12),`…`]}):`—`}},{key:`userId`,label:t(`audit.col.actor`),render:e=>{let n=e.userId;return n?W(`span`,{class:`font-mono text-xs`,children:n.slice(0,8)}):W(`span`,{class:`text-gray-400`,children:t(`audit.actor.system`)})}}],emptyText:t(`audit.empty`)}),W(pa,{page:i,hasMore:n.length===50,onPage:a})]})}function Aa({current:e}){let{user:t}=G(),n=J(),[r]=R(!0);return z(()=>{},[]),W(X,{title:n(`settings.title`),current:e,children:W(`div`,{class:`max-w-2xl space-y-4`,children:[W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-3`,children:n(`settings.account.heading`)}),W(`div`,{class:`space-y-2 text-sm text-gray-600`,children:[W(`p`,{children:[W(`span`,{class:`font-medium`,children:n(`settings.account.email`)}),` `,t?.email]}),W(`p`,{children:[W(`span`,{class:`font-medium`,children:n(`settings.account.roles`)}),` `,t?.roles.join(`, `)]}),W(`p`,{children:[W(`span`,{class:`font-medium`,children:n(`settings.account.id`)}),` `,W(`span`,{class:`font-mono`,children:t?.sub})]})]}),W(`div`,{class:`mt-4 pt-4 border-t border-gray-100`,children:W(`a`,{href:`#/settings/change-password`,class:`text-sm text-blue-600 hover:underline`,children:n(`settings.account.changePassword`)})})]}),W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-2`,children:n(`settings.export.heading`)}),W(`p`,{class:`text-xs text-gray-500 mb-3`,children:n(`settings.export.hint`)}),W(`div`,{class:`flex flex-wrap gap-3`,children:[W(`button`,{onClick:()=>Qn(`/export/consents?format=csv`),class:`text-sm text-blue-600 hover:underline`,children:n(`settings.export.consentCsv`)}),W(`button`,{onClick:()=>Qn(`/export/consents/xlsx`),class:`text-sm text-blue-600 hover:underline`,children:n(`settings.export.consentXlsx`)}),W(`button`,{onClick:()=>Qn(`/export/consents?format=json`),class:`text-sm text-blue-600 hover:underline`,children:n(`settings.export.consentJson`)}),W(`button`,{onClick:()=>Qn(`/export/audit?format=csv`),class:`text-sm text-blue-600 hover:underline`,children:n(`settings.export.auditCsv`)})]})]}),W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-2`,children:n(`settings.about.heading`)}),W(`p`,{class:`text-xs text-gray-500`,children:[n(`settings.about.text`),W(`br`,{}),n(`settings.about.license`)]})]})]})})}function ja({current:e}){let{user:t}=G(),n=J(),[r,i]=R(``),[a,o]=R(``),[s,c]=R(null),[l,u]=R(!1),[d,f]=R(!1),p=()=>r.length<12?n(`changePassword.error.minLength`):r===a?null:n(`changePassword.error.mismatch`);return W(X,{title:n(`changePassword.title`),current:e,children:W(`div`,{class:`max-w-md`,children:W(`div`,{class:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-6`,children:[W(`p`,{class:`text-sm text-gray-500 dark:text-gray-400 mb-5`,children:n(`changePassword.hint`)}),l&&W(`div`,{role:`status`,"aria-live":`polite`,class:`mb-4 p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg text-sm text-green-700 dark:text-green-400`,children:n(`changePassword.success`)}),s&&W(`div`,{role:`alert`,class:`mb-4 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg text-sm text-red-700 dark:text-red-400`,children:s}),W(`form`,{onSubmit:async e=>{e.preventDefault(),c(null),u(!1);let a=p();if(a){c(a);return}if(t?.sub){f(!0);try{await va.update(t.sub,{password:r}),u(!0),i(``),o(``)}catch(e){c(e instanceof Error?e.message:n(`changePassword.error.failed`))}finally{f(!1)}}},class:`space-y-4`,children:[W(`div`,{children:[W(`label`,{for:`new-password`,class:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:n(`changePassword.newPassword`)}),W(`input`,{id:`new-password`,type:`password`,value:r,onInput:e=>i(e.target.value),minLength:12,required:!0,autocomplete:`new-password`,class:`w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg text-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500`,placeholder:n(`changePassword.newPasswordPlaceholder`)})]}),W(`div`,{children:[W(`label`,{for:`confirm-password`,class:`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1`,children:n(`changePassword.confirmPassword`)}),W(`input`,{id:`confirm-password`,type:`password`,value:a,onInput:e=>o(e.target.value),required:!0,autocomplete:`new-password`,class:`w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg text-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500`,placeholder:n(`changePassword.confirmPasswordPlaceholder`)})]}),W(`div`,{class:`flex items-center gap-3 pt-1`,children:[W(`button`,{type:`submit`,disabled:d,class:`bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors`,children:n(d?`changePassword.submitting`:`changePassword.submit`)}),W(`a`,{href:`#/settings`,class:`text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200`,children:n(`common.cancel`)})]})]})]})})})}function Ma({current:e}){let t=J(),[n,r]=R([]),[i,a]=R(``),[o,s]=R(!1),[c,l]=R(``),[u,d]=R([]),[f,p]=R(``),[m,h]=R(null),[g,_]=R(!1),[v,y]=R(``),[b,x]=R(!1),[S,C]=R(!0),{requestConfirm:w,dialog:T}=xr();z(()=>{Y(`/settings`).then(e=>r(e.allowedOrigins??[])).catch(()=>{}),Y(`/apikeys`).then(d).catch(()=>{}).finally(()=>C(!1))},[]);let E=async e=>{s(!0),l(``);try{await Y(`/settings`,{method:`PATCH`,body:JSON.stringify({allowedOrigins:e})}),r(e)}catch{l(t(`apiConfig.origins.errorSave`))}finally{s(!1)}},D=async()=>{let e=i.trim().replace(/\/$/,``);if(e){if(n.includes(e)){l(t(`apiConfig.origins.errorDuplicate`));return}a(``),await E([...n,e])}},O=async e=>{await E(n.filter(t=>t!==e))},k=()=>{Y(`/apikeys`).then(d).catch(()=>{})},ee=async()=>{if(!f.trim()){y(t(`apiConfig.tokens.errorName`));return}y(``);try{let e=await Y(`/apikeys`,{method:`POST`,body:JSON.stringify({name:f.trim()})});h(e),x(!1),_(!1),p(``),d(t=>[...t,{id:e.id,name:e.name,isActive:!0,createdAt:e.createdAt}])}catch(e){y(e instanceof Error?e.message:t(`apiConfig.tokens.errorCreate`))}},te=async e=>{if(await w({title:t(`apiConfig.tokens.dialog.title`),message:t(`apiConfig.tokens.dialog.message`),danger:!0}))try{await Y(`/apikeys/${e}`,{method:`DELETE`}),d(t=>t.map(t=>t.id===e?{...t,isActive:!1}:t)),k()}catch{}};return W(X,{title:t(`apiConfig.title`),current:e,children:[T,W(`div`,{class:`max-w-2xl space-y-6`,children:[W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-1`,children:t(`apiConfig.origins.heading`)}),W(`p`,{class:`text-xs text-gray-500 mb-4`,children:t(`apiConfig.origins.hint`)}),W(`div`,{class:`flex gap-2 mb-3`,children:[W(`input`,{type:`text`,placeholder:t(`apiConfig.origins.placeholder`),"aria-label":t(`apiConfig.origins.placeholder`),value:i,onInput:e=>{a(e.target.value),l(``)},onKeyDown:e=>e.key===`Enter`&&D(),class:`flex-1 border border-gray-300 rounded px-3 py-1.5 text-sm`}),W(`button`,{onClick:D,disabled:o||!i.trim(),class:`px-3 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700 disabled:opacity-50`,children:t(`common.add`)})]}),c&&W(`p`,{role:`alert`,class:`text-xs text-red-600 mb-2`,children:c}),n.length===0?W(`p`,{class:`text-xs text-gray-400 py-3 text-center`,children:t(`apiConfig.origins.empty`)}):W(`ul`,{class:`border border-gray-200 rounded divide-y divide-gray-100 text-sm`,children:n.map(e=>W(`li`,{class:`flex items-center justify-between px-3 py-2 group`,children:[W(`span`,{class:`font-mono text-gray-700 text-xs`,children:e}),W(`button`,{onClick:()=>O(e),disabled:o,"aria-label":`${t(`apiConfig.origins.remove`)} ${e}`,title:t(`apiConfig.origins.remove`),class:`text-gray-400 hover:text-red-600 opacity-0 group-hover:opacity-100 transition-opacity disabled:opacity-30`,children:W(Tn,{size:13,"aria-hidden":`true`})})]},e))})]}),W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-1`,children:t(`apiConfig.tokens.heading`)}),W(`p`,{class:`text-xs text-gray-500 mb-4`,children:t(`apiConfig.tokens.hint`)}),m&&W(`div`,{class:`mb-4 p-3 bg-green-50 border border-green-200 rounded`,children:[W(`p`,{class:`text-xs font-medium text-green-800 mb-2`,children:t(`apiConfig.tokens.created`)}),W(`div`,{class:`flex items-center gap-2`,children:[W(`code`,{class:`flex-1 text-xs font-mono text-green-700 break-all ${b?``:`blur-sm select-none`}`,children:m.key}),W(`button`,{type:`button`,onClick:()=>x(e=>!e),"aria-label":t(b?`common.hide`:`common.show`),title:t(b?`common.hide`:`common.show`),class:`shrink-0 text-gray-500 hover:text-gray-700`,children:W(b?Wt:Gt,{size:14,"aria-hidden":`true`})}),W(`button`,{type:`button`,onClick:()=>{m&&navigator.clipboard.writeText(m.key).then(()=>{_(!0),setTimeout(()=>_(!1),2e3)})},"aria-label":t(`common.copyToClipboard`),title:t(`common.copyToClipboard`),class:`shrink-0 text-gray-500 hover:text-green-700`,children:g?W(jt,{size:14,className:`text-green-600`,"aria-hidden":`true`}):W(Vt,{size:14,"aria-hidden":`true`})})]})]}),W(`div`,{class:`flex gap-2 mb-4`,children:[W(`input`,{type:`text`,placeholder:t(`apiConfig.tokens.placeholder`),"aria-label":t(`apiConfig.tokens.placeholder`),value:f,onInput:e=>p(e.target.value),onKeyDown:e=>e.key===`Enter`&&ee(),class:`flex-1 border border-gray-300 rounded px-3 py-1.5 text-sm`}),W(`button`,{onClick:ee,class:`px-3 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700`,children:t(`common.create`)})]}),v&&W(`p`,{role:`alert`,class:`text-xs text-red-600 mb-2`,children:v}),!S&&u.length===0&&W(`p`,{class:`text-xs text-gray-400 py-3 text-center`,children:t(`apiConfig.tokens.empty`)}),u.length>0&&W(`table`,{class:`w-full text-xs border border-gray-200 rounded overflow-hidden`,children:[W(`thead`,{class:`bg-gray-50`,children:W(`tr`,{children:[W(`th`,{scope:`col`,class:`text-left px-3 py-2 text-gray-600 font-medium`,children:t(`apiConfig.tokens.col.name`)}),W(`th`,{scope:`col`,class:`text-left px-3 py-2 text-gray-600 font-medium`,children:t(`apiConfig.tokens.col.status`)}),W(`th`,{scope:`col`,class:`text-left px-3 py-2 text-gray-600 font-medium`,children:t(`apiConfig.tokens.col.created`)}),W(`th`,{scope:`col`,class:`px-3 py-2`})]})}),W(`tbody`,{class:`divide-y divide-gray-100`,children:u.map(e=>W(`tr`,{children:[W(`td`,{class:`px-3 py-2 font-mono`,children:e.name}),W(`td`,{class:`px-3 py-2`,children:W(`span`,{class:`font-medium ${e.isActive?`text-green-600`:`text-gray-400`}`,children:e.isActive?t(`apiConfig.tokens.status.active`):t(`apiConfig.tokens.status.revoked`)})}),W(`td`,{class:`px-3 py-2 text-gray-500`,children:new Date(e.createdAt).toLocaleDateString()}),W(`td`,{class:`px-3 py-2 text-right`,children:e.isActive&&W(`button`,{onClick:()=>te(e.id),class:`text-red-500 hover:underline`,children:t(`common.revoke`)})})]},e.id))})]})]})]})]})}var Na=`/consenti/admin/docs`;function Pa({current:e}){let[t,n]=R(0);return W(X,{title:`Endpoint Docs`,current:e,children:[W(`div`,{class:`flex items-center justify-between mb-3`,children:[W(`p`,{class:`text-xs text-gray-500`,children:`Interactive OpenAPI documentation for the Consenti Admin API.`}),W(`div`,{class:`flex items-center gap-3`,children:[W(`button`,{onClick:()=>n(e=>e+1),class:`flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700`,title:`Reload`,children:[W(fn,{size:13}),` Reload`]}),W(`a`,{href:Na,target:`_blank`,rel:`noopener noreferrer`,class:`flex items-center gap-1.5 text-xs text-blue-600 hover:underline`,children:[`Open in new tab `,W(Ut,{size:12})]})]})]}),W(`div`,{class:`rounded-lg border border-gray-200 overflow-hidden bg-white`,style:`height: calc(100vh - 200px)`,children:W(`iframe`,{src:Na,class:`w-full h-full border-0`,title:`API Documentation`},t)})]})}var Fa=[`howItWorks.workflow.step1`,`howItWorks.workflow.step2`,`howItWorks.workflow.step3`,`howItWorks.workflow.step4`,`howItWorks.workflow.step5`],Ia=[`howItWorks.consentFlow.step1`,`howItWorks.consentFlow.step2`,`howItWorks.consentFlow.step3`,`howItWorks.consentFlow.step4`,`howItWorks.consentFlow.step5`,`howItWorks.consentFlow.step6`],La=[`howItWorks.profileResolution.step1`,`howItWorks.profileResolution.step2`,`howItWorks.profileResolution.step3`,`howItWorks.profileResolution.step4`,`howItWorks.profileResolution.step5`],Ra=[{key:`optIn`,color:`bg-blue-100 text-blue-800`},{key:`optInDPDPA`,color:`bg-violet-100 text-violet-800`},{key:`optInChina`,color:`bg-red-100 text-red-800`},{key:`optOutCalifornia`,color:`bg-orange-100 text-orange-800`},{key:`optOutUSState`,color:`bg-amber-100 text-amber-800`},{key:`generalPrivacyConsent`,color:`bg-green-100 text-green-800`},{key:`hybridBrazil`,color:`bg-emerald-100 text-emerald-800`},{key:`noticeOnly`,color:`bg-gray-100 text-gray-600`}],za=[`mandatory`,`consent`,`legitimateInterest`],Ba=[`granted`,`denied`,`objected`],Va=[`default`,`language`,`geoip`,`hostedGeoipLite`,`maxmind`,`custom`],Ha=[`dashboard`,`cookieTemplates`,`uiTemplates`,`profiles`,`consents`,`visitors`,`users`,`roles`,`vendors`,`audit`,`api`,`settings`];function Ua({current:e}){let t=J();return W(X,{title:t(`howItWorks.title`),current:e,children:W(`div`,{class:`space-y-4`,children:[W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:W(`p`,{class:`text-sm text-gray-600 leading-relaxed`,children:t(`howItWorks.intro`)})}),W(`div`,{class:`grid md:grid-cols-2 gap-4`,children:[W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-4`,children:t(`howItWorks.workflow.heading`)}),W(`ol`,{class:`space-y-4`,children:Fa.map((e,n)=>W(`li`,{class:`flex gap-4`,children:[W(`span`,{class:`flex-shrink-0 w-7 h-7 rounded-full bg-blue-600 text-white text-xs font-bold flex items-center justify-center mt-0.5`,children:n+1}),W(`div`,{children:[W(`p`,{class:`text-sm font-semibold text-gray-800`,children:t(`${e}.title`)}),W(`p`,{class:`text-xs text-gray-500 mt-0.5 leading-relaxed`,children:t(`${e}.desc`)})]})]},e))})]}),W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-4`,children:t(`howItWorks.consentFlow.heading`)}),W(`ol`,{class:`space-y-4`,children:Ia.map((e,n)=>W(`li`,{class:`flex gap-4`,children:[W(`span`,{class:`flex-shrink-0 w-7 h-7 rounded-full bg-indigo-600 text-white text-xs font-bold flex items-center justify-center mt-0.5`,children:n+1}),W(`div`,{children:[W(`p`,{class:`text-sm font-semibold text-gray-800`,children:t(`${e}.title`)}),W(`p`,{class:`text-xs text-gray-500 mt-0.5 leading-relaxed`,children:t(`${e}.desc`)})]})]},e))})]})]}),W(`div`,{class:`grid md:grid-cols-2 gap-4`,children:[W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-1`,children:t(`howItWorks.profileResolution.heading`)}),W(`p`,{class:`text-xs text-gray-500 mb-4 leading-relaxed`,children:t(`howItWorks.profileResolution.intro`)}),W(`ol`,{class:`space-y-4`,children:La.map((e,n)=>W(`li`,{class:`flex gap-4`,children:[W(`span`,{class:`flex-shrink-0 w-7 h-7 rounded-full bg-teal-600 text-white text-xs font-bold flex items-center justify-center mt-0.5`,children:n+1}),W(`div`,{children:[W(`p`,{class:`text-sm font-semibold text-gray-800`,children:t(`${e}.title`)}),W(`p`,{class:`text-xs text-gray-500 mt-0.5 leading-relaxed`,children:t(`${e}.desc`)})]})]},e))})]}),W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-4`,children:t(`howItWorks.enums.heading`)}),W(`div`,{class:`space-y-5`,children:[W(`div`,{children:[W(`p`,{class:`text-xs font-semibold text-gray-600 uppercase tracking-wide mb-2`,children:t(`howItWorks.enums.legalBasis.heading`)}),W(`ul`,{class:`space-y-1.5`,children:za.map(e=>W(`li`,{class:`text-xs text-gray-500 leading-relaxed pl-3 border-l-2 border-gray-200`,children:t(`howItWorks.enums.legalBasis.${e}`)},e))})]}),W(`div`,{children:[W(`p`,{class:`text-xs font-semibold text-gray-600 uppercase tracking-wide mb-2`,children:t(`howItWorks.enums.consentStatus.heading`)}),W(`ul`,{class:`space-y-1.5`,children:Ba.map(e=>W(`li`,{class:`text-xs text-gray-500 leading-relaxed pl-3 border-l-2 border-gray-200`,children:t(`howItWorks.enums.consentStatus.${e}`)},e))})]}),W(`div`,{children:[W(`p`,{class:`text-xs font-semibold text-gray-600 uppercase tracking-wide mb-2`,children:t(`howItWorks.enums.geoProvider.heading`)}),W(`ul`,{class:`space-y-1.5`,children:Va.map(e=>W(`li`,{class:`text-xs text-gray-500 leading-relaxed pl-3 border-l-2 border-gray-200`,children:t(`howItWorks.enums.geoProvider.${e}`)},e))})]})]})]})]}),W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-1`,children:t(`howItWorks.complianceGroups.heading`)}),W(`p`,{class:`text-xs text-gray-500 mb-4 leading-relaxed`,children:t(`howItWorks.complianceGroups.intro`)}),W(`div`,{class:`space-y-4 grid md:grid-cols-2 gap-4`,children:Ra.map(({key:e,color:n})=>W(`div`,{class:`border border-gray-100 rounded-md p-4`,children:W(`div`,{class:`flex items-start gap-3`,children:W(`div`,{class:`min-w-0`,children:[W(`span`,{class:`flex-shrink-0 text-xs font-mono font-semibold px-2 py-0.5 rounded ${n}`,children:e}),W(`p`,{class:`text-sm font-semibold text-gray-800`,children:t(`howItWorks.complianceGroups.${e}.title`)}),W(`p`,{class:`text-xs text-gray-500 mt-1 leading-relaxed`,children:t(`howItWorks.complianceGroups.${e}.desc`)}),W(`p`,{class:`text-xs text-gray-400 mt-2`,children:[W(`span`,{class:`font-medium text-gray-500`,children:`Laws: `}),t(`howItWorks.complianceGroups.${e}.laws`)]}),W(`p`,{class:`text-xs text-gray-400 mt-0.5`,children:[W(`span`,{class:`font-medium text-gray-500`,children:`Countries: `}),t(`howItWorks.complianceGroups.${e}.countries`)]})]})})},e))})]}),W(`div`,{class:`bg-white rounded-lg border border-gray-200 p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-gray-700 mb-4`,children:t(`howItWorks.features.heading`)}),W(`div`,{class:`divide-y divide-gray-100 grid md:grid-cols-2 gap-8`,children:Ha.map(e=>W(`div`,{class:`py-3 first:pt-0 last:pb-0`,children:[W(`p`,{class:`text-sm font-semibold text-gray-800`,children:t(`howItWorks.features.${e}.title`)}),W(`p`,{class:`text-xs text-gray-500 mt-0.5 leading-relaxed`,children:t(`howItWorks.features.${e}.desc`)})]},e))})]}),W(`div`,{class:`bg-blue-50 border border-blue-200 rounded-lg p-5`,children:[W(`h2`,{class:`text-sm font-semibold text-blue-800 mb-1`,children:t(`howItWorks.docs.heading`)}),W(`p`,{class:`text-xs text-blue-700 mb-3 leading-relaxed`,children:t(`howItWorks.docs.text`)}),W(`a`,{href:`https://consenti.dev/docs`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1 text-sm font-medium text-blue-600 hover:text-blue-800 hover:underline transition-colors`,children:[t(`howItWorks.docs.link`),W(`svg`,{class:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,children:[W(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),W(`polyline`,{points:`15 3 21 3 21 9`}),W(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})]})]})]})})}function Wa(){return window.location.hash||`#/`}function Ga(){let{user:e}=G(),[t,n]=R(Wa);if(z(()=>{let e=()=>n(Wa());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),!e)return t!==`#/login`&&(window.location.hash=`#/login`),W(tr,{});if(t===`#/login`)return window.location.hash=`#/`,null;if(t===`#/`||t===`#`)return W(gr,{current:t});if(t===`#/banners/profiles`)return W(Er,{current:t});if(t===`#/banners/profiles/new`)return W(Ai,{current:t});{let e=t.match(/^#\/banners\/profiles\/([^/]+)\/history$/);if(e)return W(ji,{id:e[1],current:t})}return t.startsWith(`#/banners/profiles/`)?W(Ai,{id:t.slice(19),current:t}):t===`#/banners/cookie-templates`?W(Mi,{current:t}):t===`#/banners/cookie-templates/new`?W(Wi,{current:t}):t.startsWith(`#/banners/cookie-templates/`)?W(Wi,{id:t.slice(27),current:t}):t===`#/banners/ui-templates`?W(Gi,{current:t}):t===`#/banners/ui-templates/new`?W(fa,{current:t}):t.startsWith(`#/banners/ui-templates/`)?W(fa,{id:t.slice(23),current:t}):t===`#/consents`?W(ha,{current:t}):t===`#/visitors`?W(_a,{current:t}):t===`#/users`?W(ba,{current:t}):t===`#/roles`?W(Ca,{current:t}):t===`#/tenants`?W(wa,{current:t}):t===`#/vendors`||t.startsWith(`#/vendors?`)?W(Da,{current:t}):t===`#/audit`?W(ka,{current:t}):t===`#/api/config`?W(Ma,{current:t}):t===`#/api/docs`?W(Pa,{current:t}):t===`#/settings`?W(Aa,{current:t}):t===`#/settings/change-password`?W(ja,{current:t}):t===`#/how-it-works`?W(Ua,{current:t}):W(gr,{current:`#/`})}function Ka(){return W(Le,{children:W(He,{children:W(Gn,{children:W(Fe,{children:W(Ga,{})})})})})}ue(W(Ka,{}),document.getElementById(`app`));