@onemrvapublic/design-system-demos 22.6.0 → 22.7.0-develop.1

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.
@@ -0,0 +1,5 @@
1
+ (function(){"use strict";let xe,Be;var Q,Je,Ke,pe,C,Ye,Y,Xe,Qe,Ze,et,me,se,tt,Ae,Ee,Te,nt,fe={},he=[],Bt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ce=Array.isArray;function G(n,e){for(var t in e)n[t]=e[t];return n}function Me(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function ye(n,e,t,o,r){var i={type:n,props:e,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Ye,__i:-1,__u:0};return r==null&&C.vnode!=null&&C.vnode(i),i}function ve(n){return n.children}function ge(n,e){this.props=n,this.context=e}function re(n,e){if(e==null)return n.__?re(n.__,n.__i+1):null;for(var t;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null)return t.__e;return typeof n.type=="function"?re(n):null}function Le(n){(!n.__d&&(n.__d=!0)&&Y.push(n)&&!be.__r++||Xe!=C.debounceRendering)&&((Xe=C.debounceRendering)||Qe)(be)}function be(){try{for(var n,e=1;Y.length;)Y.length>e&&Y.sort(Ze),n=Y.shift(),e=Y.length,(function(t){if(t.__P&&t.__d){var o=t.__v,r=o.__e,i=[],l=[],s=G({},o);s.__v=o.__v+1,C.vnode&&C.vnode(s),Ue(t.__P,s,o,t.__n,t.__P.namespaceURI,32&o.__u?[r]:null,i,r??re(o),!!(32&o.__u),l),s.__v=o.__v,s.__.__k[s.__i]=s,lt(i,s,l),o.__e=o.__=null,s.__e!=r&&(function u(p){if((p=p.__)!=null&&p.__c!=null)return p.__e=p.__c.base=null,p.__k.some(function(_){if(_!=null&&_.__e!=null)return p.__e=p.__c.base=_.__e}),u(p)})(s)}})(n)}finally{Y.length=be.__r=0}}function ot(n,e,t,o,r,i,l,s,u,p,_){var a,m,f,P,g,A,b,w=o&&o.__k||he,B=e.length;for(u=(function(j,k,v,S,$){var y,d,N,W,J,D=v.length,U=D,K=0;for(j.__k=Array($),y=0;y<$;y++)(d=k[y])!=null&&typeof d!="boolean"&&typeof d!="function"?(typeof d=="string"||typeof d=="number"||typeof d=="bigint"||d.constructor==String?d=j.__k[y]=ye(null,d,null,null,null):ce(d)?d=j.__k[y]=ye(ve,{children:d},null,null,null):d.constructor===void 0&&d.__b>0?d=j.__k[y]=ye(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):j.__k[y]=d,W=y+K,d.__=j,d.__b=j.__b+1,N=null,(J=d.__i=(function(F,O,h,z){var E,H,T,q=F.key,oe=F.type,L=O[h],I=L!=null&&(2&L.__u)==0;if(L===null&&q==null||I&&q==L.key&&oe==L.type)return h;if(z>+!!I){for(E=h-1,H=h+1;E>=0||H<O.length;)if((L=O[T=E>=0?E--:H++])!=null&&(2&L.__u)==0&&q==L.key&&oe==L.type)return T}return-1})(d,v,W,U))!=-1&&(U--,(N=v[J])&&(N.__u|=2)),N==null||N.__v==null?(J==-1&&($>D?K--:$<D&&K++),typeof d.type!="function"&&(d.__u|=4)):J!=W&&(J==W-1?K--:J==W+1?K++:(J>W?K--:K++,d.__u|=4))):j.__k[y]=null;if(U)for(y=0;y<D;y++)(N=v[y])!=null&&(2&N.__u)==0&&(N.__e==S&&(S=re(N)),(function F(O,h,z){var E,H;if(C.unmount&&C.unmount(O),(E=O.ref)&&(E.current&&E.current!=O.__e||Oe(E,null,h)),(E=O.__c)!=null){if(E.componentWillUnmount)try{E.componentWillUnmount()}catch(T){C.__e(T,h)}E.base=E.__P=null}if(E=O.__k)for(H=0;H<E.length;H++)E[H]&&F(E[H],h,z||typeof O.type!="function");z||Me(O.__e),O.__c=O.__=O.__e=void 0})(N,N));return S})(t,e,w,u,B),a=0;a<B;a++)(f=t.__k[a])!=null&&(m=f.__i!=-1&&w[f.__i]||fe,f.__i=a,A=Ue(n,f,m,r,i,l,s,u,p,_),P=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&Oe(m.ref,null,f),_.push(f.ref,f.__c||P,f)),g==null&&P!=null&&(g=P),(b=!!(4&f.__u))||m.__k===f.__k?(u=(function j(k,v,S,$){var y,d;if(typeof k.type=="function"){for(y=k.__k,d=0;y&&d<y.length;d++)y[d]&&(y[d].__=k,v=j(y[d],v,S,$));return v}k.__e!=v&&($&&(v&&k.type&&!v.parentNode&&(v=re(k)),S.insertBefore(k.__e,v||null)),v=k.__e);do v=v&&v.nextSibling;while(v!=null&&v.nodeType==8);return v})(f,u,n,b),b&&m.__e&&(m.__e=null)):typeof f.type=="function"&&A!==void 0?u=A:P&&(u=P.nextSibling),f.__u&=-7);return t.__e=g,u}function rt(n,e,t){e[0]=="-"?n.setProperty(e,t??""):n[e]=t==null?"":typeof t!="number"||Bt.test(e)?t:t+"px"}function je(n,e,t,o,r){var i,l;e:if(e=="style")if(typeof t=="string")n.style.cssText=t;else{if(typeof o=="string"&&(n.style.cssText=o=""),o)for(e in o)t&&e in t||rt(n.style,e,"");if(t)for(e in t)o&&t[e]==o[e]||rt(n.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(tt,"$1")),e=(l=e.toLowerCase())in n||e=="onFocusOut"||e=="onFocusIn"?l.slice(2):e.slice(2),n.l||(n.l={}),n.l[e+i]=t,t?o?t[se]=o[se]:(t[se]=Ae,n.addEventListener(e,i?Te:Ee,i)):n.removeEventListener(e,i?Te:Ee,i);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in n)try{n[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?n.removeAttribute(e):n.setAttribute(e,e=="popover"&&t==1?"":t))}}function it(n){return function(e){if(this.l){var t=this.l[e.type+n];if(e[me]==null)e[me]=Ae++;else if(e[me]<t[se])return;return t(C.event?C.event(e):e)}}}function Ue(n,e,t,o,r,i,l,s,u,p){var _,a,m,f,P,g,A,b,w,B,j,k,v,S,$,y=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(u=!!(32&t.__u),i=[s=e.__e=t.__e]),(_=C.__b)&&_(e);e:if(typeof y=="function")try{if(b=e.props,w=y.prototype&&y.prototype.render,B=(_=y.contextType)&&o[_.__c],j=_?B?B.props.value:_.__:o,t.__c?A=(a=e.__c=t.__c).__=a.__E:(w?e.__c=a=new y(b,j):(e.__c=a=new ge(b,j),a.constructor=y,a.render=At),B&&B.sub(a),a.state||(a.state={}),a.__n=o,m=a.__d=!0,a.__h=[],a._sb=[]),w&&a.__s==null&&(a.__s=a.state),w&&y.getDerivedStateFromProps!=null&&(a.__s==a.state&&(a.__s=G({},a.__s)),G(a.__s,y.getDerivedStateFromProps(b,a.__s))),f=a.props,P=a.state,a.__v=e,m)w&&y.getDerivedStateFromProps==null&&a.componentWillMount!=null&&a.componentWillMount(),w&&a.componentDidMount!=null&&a.__h.push(a.componentDidMount);else{if(w&&y.getDerivedStateFromProps==null&&b!==f&&a.componentWillReceiveProps!=null&&a.componentWillReceiveProps(b,j),e.__v==t.__v||!a.__e&&a.shouldComponentUpdate!=null&&a.shouldComponentUpdate(b,a.__s,j)===!1){e.__v!=t.__v&&(a.props=b,a.state=a.__s,a.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(d){d&&(d.__=e)}),he.push.apply(a.__h,a._sb),a._sb=[],a.__h.length&&l.push(a);break e}a.componentWillUpdate!=null&&a.componentWillUpdate(b,a.__s,j),w&&a.componentDidUpdate!=null&&a.__h.push(function(){a.componentDidUpdate(f,P,g)})}if(a.context=j,a.props=b,a.__P=n,a.__e=!1,k=C.__r,v=0,w)a.state=a.__s,a.__d=!1,k&&k(e),_=a.render(a.props,a.state,a.context),he.push.apply(a.__h,a._sb),a._sb=[];else do a.__d=!1,k&&k(e),_=a.render(a.props,a.state,a.context),a.state=a.__s;while(a.__d&&++v<25);a.state=a.__s,a.getChildContext!=null&&(o=G(G({},o),a.getChildContext())),w&&!m&&a.getSnapshotBeforeUpdate!=null&&(g=a.getSnapshotBeforeUpdate(f,P)),S=_!=null&&_.type===ve&&_.key==null?(function d(N){return typeof N!="object"||N==null||N.__b>0?N:ce(N)?N.map(d):N.constructor!==void 0?null:G({},N)})(_.props.children):_,s=ot(n,ce(S)?S:[S],e,t,o,r,i,l,s,u,p),a.base=e.__e,e.__u&=-161,a.__h.length&&l.push(a),A&&(a.__E=a.__=null)}catch(d){if(e.__v=null,u||i!=null)if(d.then){for(e.__u|=u?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,e.__e=s}else{for($=i.length;$--;)Me(i[$]);Se(e)}else e.__e=t.__e,e.__k=t.__k,d.then||Se(e);C.__e(d,e,t)}else i==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):s=e.__e=(function(d,N,W,J,D,U,K,F,O){var h,z,E,H,T,q,oe,L=W.props||fe,I=N.props,R=N.type;if(R=="svg"?D="http://www.w3.org/2000/svg":R=="math"?D="http://www.w3.org/1998/Math/MathML":D||(D="http://www.w3.org/1999/xhtml"),U!=null){for(h=0;h<U.length;h++)if((T=U[h])&&"setAttribute"in T==!!R&&(R?T.localName==R:T.nodeType==3)){d=T,U[h]=null;break}}if(d==null){if(R==null)return document.createTextNode(I);d=document.createElementNS(D,R,I.is&&I),F&&(C.__m&&C.__m(N,U),F=!1),U=null}if(R==null)L===I||F&&d.data==I||(d.data=I);else{if(U=R=="textarea"&&I.defaultValue!=null?null:U&&pe.call(d.childNodes),!F&&U!=null)for(L={},h=0;h<d.attributes.length;h++)L[(T=d.attributes[h]).name]=T.value;for(h in L)T=L[h],h=="dangerouslySetInnerHTML"?E=T:h=="children"||h in I||h=="value"&&"defaultValue"in I||h=="checked"&&"defaultChecked"in I||je(d,h,null,T,D);for(h in I)T=I[h],h=="children"?H=T:h=="dangerouslySetInnerHTML"?z=T:h=="value"?q=T:h=="checked"?oe=T:F&&typeof T!="function"||L[h]===T||je(d,h,T,L[h],D);if(z)F||E&&(z.__html==E.__html||z.__html==d.innerHTML)||(d.innerHTML=z.__html),N.__k=[];else if(E&&(d.innerHTML=""),ot(N.type=="template"?d.content:d,ce(H)?H:[H],N,W,J,R=="foreignObject"?"http://www.w3.org/1999/xhtml":D,U,K,U?U[0]:W.__k&&re(W,0),F,O),U!=null)for(h=U.length;h--;)Me(U[h]);F&&R!="textarea"||(h="value",R=="progress"&&q==null?d.removeAttribute("value"):q==null||q===d[h]&&(R!="progress"||q)&&(R!="option"||q==L[h])||je(d,h,q,L[h],D),h="checked",oe!=null&&oe!=d[h]&&je(d,h,oe,L[h],D))}return d})(t.__e,e,t,o,r,i,l,u,p);return(_=C.diffed)&&_(e),128&e.__u?void 0:s}function Se(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(Se))}function lt(n,e,t){for(var o=0;o<t.length;o++)Oe(t[o],t[++o],t[++o]);C.__c&&C.__c(e,n),n.some(function(r){try{n=r.__h,r.__h=[],n.some(function(i){i.call(r)})}catch(i){C.__e(i,r.__v)}})}function Oe(n,e,t){try{if(typeof n=="function"){var o=typeof n.__u=="function";o&&n.__u(),o&&e==null||(n.__u=n(e))}else n.current=e}catch(r){C.__e(r,t)}}function At(n,e,t){return this.constructor(n,t)}function at(n,e,t){var o,r,i,l;e==document&&(e=document.documentElement),C.__&&C.__(n,e),r=(o=typeof t=="function")?null:t&&t.__k||e.__k,i=[],l=[],Ue(e,n=(!o&&t||e).__k=(function(s,u,p){var _,a,m,f={};for(m in u)m=="key"?_=u[m]:m=="ref"?a=u[m]:f[m]=u[m];if(arguments.length>2&&(f.children=arguments.length>3?pe.call(arguments,2):p),typeof s=="function"&&s.defaultProps!=null)for(m in s.defaultProps)f[m]===void 0&&(f[m]=s.defaultProps[m]);return ye(s,f,_,a,null)})(ve,null,[n]),r||fe,fe,e.namespaceURI,!o&&t?[t]:r?null:e.firstChild?pe.call(e.childNodes):null,i,!o&&t?t:r?r.__e:e.firstChild,o,l),lt(i,n,l)}pe=he.slice,C={__e:function(n,e,t,o){for(var r,i,l;e=e.__;)if((r=e.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(n)),l=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(n,o||{}),l=r.__d),l)return r.__E=r}catch(s){n=s}throw n}},Ye=0,ge.prototype.setState=function(n,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=G({},this.state),typeof n=="function"&&(n=n(G({},t),this.props)),n&&G(t,n),n!=null&&this.__v&&(e&&this._sb.push(e),Le(this))},ge.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),Le(this))},ge.prototype.render=ve,Y=[],Qe=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ze=function(n,e){return n.__v.__b-e.__v.__b},be.__r=0,me="__d"+(et=Math.random().toString(8)),se="__a"+et,tt=/(PointerCapture)$|Capture$/i,Ae=0,Ee=it(!1),Te=it(!0),nt=0;var Et=0;function c(n,e,t,o,r,i){e||(e={});var l,s,u=e;if("ref"in u)for(s in u={},e)s=="ref"?l=e[s]:u[s]=e[s];var p={type:n,props:u,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Et,__i:-1,__u:0,__source:r,__self:i};if(typeof n=="function"&&(l=n.defaultProps))for(s in l)u[s]===void 0&&(u[s]=l[s]);return C.vnode&&C.vnode(p),p}var Z,x,De,st,ue=0,ct=[],M=C,ut=M.__b,_t=M.__r,dt=M.diffed,pt=M.__c,mt=M.unmount,ft=M.__;function _e(n,e){M.__h&&M.__h(x,n,ue||e),ue=0;var t=x.__H||(x.__H={__:[],__h:[]});return n>=t.__.length&&t.__.push({}),t.__[n]}function we(n){return ue=1,(function(e,t){var o=_e(Z++,2);if(o.t=e,!o.__c&&(o.__=[vt(void 0,t),function(s){var u=o.__N?o.__N[0]:o.__[0],p=o.t(u,s);u!==p&&(o.__N=[p,o.__[1]],o.__c.setState({}))}],o.__c=x,!x.__f)){var r=function(s,u,p){if(!o.__c.__H)return!0;var _=o.__c.__H.__.filter(function(m){return m.__c});if(_.every(function(m){return!m.__N}))return!i||i.call(this,s,u,p);var a=o.__c.props!==s;return _.some(function(m){if(m.__N){var f=m.__[0];m.__=m.__N,m.__N=void 0,f!==m.__[0]&&(a=!0)}}),i&&i.call(this,s,u,p)||a};x.__f=!0;var i=x.shouldComponentUpdate,l=x.componentWillUpdate;x.componentWillUpdate=function(s,u,p){if(this.__e){var _=i;i=void 0,r(s,u,p),i=_}l&&l.call(this,s,u,p)},x.shouldComponentUpdate=r}return o.__N||o.__})(vt,n)}function ie(n,e){var t=_e(Z++,3);!M.__s&&He(t.__H,e)&&(t.__=n,t.u=e,x.__H.__h.push(t))}function ht(n,e){var t=_e(Z++,4);!M.__s&&He(t.__H,e)&&(t.__=n,t.u=e,x.__h.push(t))}function le(n){var e,t,o;return ue=5,e=function(){return{current:n}},t=[],He((o=_e(Z++,7)).__H,t)&&(o.__=e(),o.__H=t,o.__h=e),o.__}function Ce(n){var e=x.context[n.__c],t=_e(Z++,9);return t.c=n,e?(t.__==null&&(t.__=!0,e.sub(x)),e.props.value):n.__}function Tt(){for(var n;n=ct.shift();){var e=n.__H;if(n.__P&&e)try{e.__h.some(Ne),e.__h.some(Ie),e.__h=[]}catch(t){e.__h=[],M.__e(t,n.__v)}}}M.__b=function(n){x=null,ut&&ut(n)},M.__=function(n,e){n&&e.__k&&e.__k.__m&&(n.__m=e.__k.__m),ft&&ft(n,e)},M.__r=function(n){_t&&_t(n),Z=0;var e=(x=n.__c).__H;e&&(De===x?(e.__h=[],x.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(Ne),e.__h.some(Ie),e.__h=[],Z=0)),De=x},M.diffed=function(n){dt&&dt(n);var e=n.__c;e&&e.__H&&(e.__H.__h.length&&(ct.push(e)!==1&&st===M.requestAnimationFrame||((st=M.requestAnimationFrame)||function(t){var o,r=function(){clearTimeout(i),yt&&cancelAnimationFrame(o),setTimeout(t)},i=setTimeout(r,35);yt&&(o=requestAnimationFrame(r))})(Tt)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),De=x=null},M.__c=function(n,e){e.some(function(t){try{t.__h.some(Ne),t.__h=t.__h.filter(function(o){return!o.__||Ie(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],M.__e(o,t.__v)}}),pt&&pt(n,e)},M.unmount=function(n){mt&&mt(n);var e,t=n.__c;t&&t.__H&&(t.__H.__.some(function(o){try{Ne(o)}catch(r){e=r}}),t.__H=void 0,e&&M.__e(e,t.__v))};var yt=typeof requestAnimationFrame=="function";function Ne(n){var e=x,t=n.__c;typeof t=="function"&&(n.__c=void 0,t()),x=e}function Ie(n){var e=x;n.__c=n.__(),x=e}function He(n,e){return!n||n.length!==e.length||e.some(function(t,o){return t!==n[o]})}function vt(n,e){return typeof e=="function"?e(n):e}let Mt={privacyPolicyUrl:"",forceModal:!1,forceBanner:!1,translations:{},purposes:[]},Re=n=>n.flatMap(e=>"purposes"in e?Re(e.purposes):[e]),$e=(n,e)=>!!n.length&&n.every(e),gt=(n,e)=>n.filter(t=>!e.includes(t)),Fe=n=>Object.fromEntries(n.map(({id:e})=>[e,!0])),bt=n=>Object.fromEntries(n.map(({id:e})=>[e,!1])),jt=(n,e)=>$e(n,({id:t})=>e?.[t]),wt=(n,e)=>$e(n,({id:t,isMandatory:o})=>o||!e?.[t]);var ee=(function(n){function e(t){var o,r;return this.getChildContext||(o=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&o.forEach(function(l){l.__e=!0,Le(l)})},this.sub=function(i){o.add(i);var l=i.componentWillUnmount;i.componentWillUnmount=function(){o&&o.delete(i),l&&l.call(i)}}),t.children}return e.__c="__cC"+nt++,e.__=n,e.Provider=e.__l=(e.Consumer=function(t,o){return t.children(o)}).contextType=e,e})({});let We='a[href], button:not([disabled]):not([aria-hidden]), [tabindex]:not([tabindex^="-"])',Pe=(n,e,t)=>{let o=(Number(n.dataset.translation)||0)+e*t;Math.sign(o)===Math.sign(t)?(n.dataset.translation=o.toString(),n.style.transform=`translateY(${o}px)`):(delete n.dataset.translation,n.style.transform="")},qe=n=>(n.offsetParent instanceof HTMLElement?qe(n.offsetParent):0)+(parseInt(window.getComputedStyle(n).zIndex,10)||0),de=()=>{let{config:n}=Ce(ee);return n},X=()=>{let{translations:n}=de();return n},ae=()=>{let{config:n}=Ce(ee);return n.theme},te=()=>{let{manager:n}=Ce(ee),[e,t]=we(0);return ie(()=>{let o=()=>{t(e+1)};return n.on("update",o),()=>{n.off("update",o)}}),n},ne=(n,e)=>typeof n!="string"?[]:n.split(/\{(?!\{)([\w\d]+)\}(?!\})/gi).filter(t=>!!t).map(t=>t in e?e[t]:t);var Ct=({isHidden:n,needsUpdate:e,purposeTitles:t,privacyPolicyUrl:o,logo:r,onAccept:i,onDecline:l,onConfigure:s})=>{var u;let p=le(),_=X();return ie(()=>{let a=m=>{((f,P)=>{let g,A,b;if(!P||f.contains(P)||qe(P)>qe(f))return Pe(f,0);let w=(A=P.getBoundingClientRect(),b=(g=window.getComputedStyle(f).getPropertyValue("--orejime-collision-padding")).length?parseInt(g,10):16,{top:A.top+b,right:A.right+b,bottom:A.bottom+b,left:A.left+b}),B=f.getBoundingClientRect();if(!(B.left<w.right&&B.right>w.left))return Pe(f,0);let j=B.top+B.height/2>window.innerHeight/2?1:-1,k=j>0?w.bottom-B.top:B.bottom-w.top;if(!(B.top<w.bottom&&B.bottom>w.top))return Pe(f,k,j);let v=document.documentElement,S=j>0?Math.abs(v.scrollHeight-v.clientHeight-v.scrollTop):v.scrollTop;window.scrollBy({top:k*j}),k>S&&Pe(f,k-S,j)})(u.current,m.target instanceof HTMLElement?m.target:null)};return document.addEventListener("focusin",a),()=>{document.removeEventListener("focusin",a)}},[u=p]),c("div",{"aria-hidden":n,className:"orejime-Banner",ref:p,"data-testid":"orejime-banner",children:c("div",{className:"orejime-Banner-body",children:[r&&c("div",{className:"orejime-Banner-logoContainer",children:c("img",{className:"orejime-Banner-logo",...typeof r=="string"?{src:r,alt:""}:{src:"",alt:"",...r}})}),c("div",{className:"orejime-Banner-text",children:[_.banner.title&&c("h1",{className:"orejime-Banner-title",id:"orejime-Banner-title",children:_.banner.title}),c("p",{className:"orejime-Banner-description",children:ne(_.banner.description,{purposes:c("strong",{className:"orejime-Banner-purposes",children:t.join(", ")},"purposes"),privacyPolicy:c("a",{className:"orejime-Banner-privacyPolicyLink",href:o,children:_.banner.privacyPolicyLabel},"privacyPolicyLink")})})]}),e&&c("p",{className:"orejime-Banner-changes",children:_.misc.updateNeeded}),c("ul",{className:"orejime-Banner-actions orejime-ButtonList",children:[c("li",{className:"orejime-ButtonList-item orejime-Banner-actionItem orejime-Banner-actionItem--save",children:c("button",{className:"orejime-Button orejime-Button--save orejime-Banner-button orejime-Banner-saveButton",type:"button",title:_.banner.acceptTitle,onClick:i,"data-testid":"orejime-banner-accept",children:_.banner.accept})}),c("li",{className:"orejime-ButtonList-item orejime-Banner-actionItem orejime-Banner-actionItem--decline",children:c("button",{className:"orejime-Button orejime-Button--decline orejime-Banner-button orejime-Banner-declineButton",type:"button",title:_.banner.declineTitle,onClick:l,"data-testid":"orejime-banner-decline",children:_.banner.decline})}),c("li",{className:"orejime-ButtonList-item orejime-Banner-actionItem orejime-Banner-actionItem--info",children:c("button",{type:"button",className:"orejime-Button orejime-Button--info orejime-Banner-learnMoreButton",title:_.banner.configureTitle,onClick:s,"data-testid":"orejime-banner-configure",children:_.banner.configure})})]})]})})};let Lt=({title:n})=>c("svg",{role:"img",className:"orejime-CloseIcon","aria-label":n,viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[c("title",{children:n}),c("line",{x1:"1",y1:"11",x2:"11",y2:"1","stroke-linecap":"round"}),c("line",{x1:"1",y1:"1",x2:"11",y2:"11","stroke-linecap":"round"})]});var Nt=({isAlert:n=!1,label:e,labelId:t,className:o,portalClassName:r,overlayClassName:i,htmlClassName:l,handleScrollPosition:s=!0,onRequestClose:u,children:p})=>{let[_,a]=we(null),m=le(),f=le(),P=g=>{g.target===g.currentTarget&&u()};return ht(()=>{_===null&&a(window.pageYOffset)}),ie(()=>{_!==null&&setTimeout(()=>{s&&window.scrollTo(window.pageXOffset,_),a(null)},0)}),ie(()=>(f.current=document.activeElement,l&&document.documentElement.classList.add(l),m.current.querySelector(We)?.focus(),()=>{l&&document.documentElement.classList.remove(l),setTimeout(()=>{f.current instanceof HTMLElement&&f.current.focus()},0)}),[]),c("div",{ref:m,className:r,children:c("div",{className:i,tabIndex:-1,onMouseUp:n?null:P,onTouchEnd:n?null:P,onFocusOut:g=>{let A=g.relatedTarget;if(!(A instanceof HTMLElement)||m.current.contains(A))return;let b=m.current.querySelectorAll(We),w=m.current.compareDocumentPosition(A)&Node.DOCUMENT_POSITION_FOLLOWING?0:b.length-1;b.item(w).focus()},onKeyDown:g=>{g.key==="Escape"&&u()},children:c("div",{className:o,role:n?"alertdialog":"dialog","aria-modal":"true","aria-label":e,"aria-labelledby":t,children:p})})})},Ut=({className:n})=>{let e=X();return c("a",{className:n,title:`${e.misc.poweredBy} (${e.misc.newWindowTitle})`,href:"https://orejime.boscop.fr",target:"_blank",children:e.misc.poweredBy})},V=((Q={})[Q.declined=0]="declined",Q[Q.accepted=1]="accepted",Q[Q.partial=2]="partial",Q);function ke(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)o!=="__proto__"&&(n[o]=t[o])}return n}var ze=(function n(e,t){function o(r,i,l){if("u">typeof document){typeof(l=ke({},t,l)).expires=="number"&&(l.expires=new Date(Date.now()+864e5*l.expires)),l.expires&&(l.expires=l.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var u in l)l[u]&&(s+="; "+u,l[u]!==!0&&(s+="="+l[u].split(";")[0]));return document.cookie=r+"="+e.write(i,r)+s}}return Object.create({set:o,get:function(r){if("u">typeof document&&(!arguments.length||r)){for(var i=document.cookie?document.cookie.split("; "):[],l={},s=0;s<i.length;s++){var u=i[s].split("="),p=u.slice(1).join("=");try{var _=decodeURIComponent(u[0]);if(_ in l||(l[_]=e.read(p,_)),r===_)break}catch{}}return r?l[r]:l}},remove:function(r,i){o(r,"",ke({},i,{expires:-1}))},withAttributes:function(r){return n(this.converter,ke({},this.attributes,r))},withConverter:function(r){return n(ke({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})})({read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});let Pt=(n,e="/",t)=>{(t?[t]:(o=>{let r=o.split("."),i=r.slice(-2),l=r.slice(0,-2),s=[i];for(let u=0;u<l.length;u++)s.push(l.slice(u).concat(i));return s.map(u=>u.join("."))})(location.hostname)).forEach(o=>{ze.remove(n,{path:e,domain:o})})};class St{#e;constructor(e={}){this.#e={name:"eu-consent",domain:void 0,duration:120,sameSite:"strict",parse:JSON.parse,stringify:JSON.stringify,...e}}read(){let{name:e,parse:t}=this.#e,o=ze.get(e);return o?t(o):{}}write(e){let{name:t,domain:o,duration:r,sameSite:i,stringify:l}=this.#e;((s,u="",p=0,_,a)=>{ze.set(s,u,{expires:p,domain:_,sameSite:a})})(t,l(e),r,o,i)}clear(){Pt(this.#e.name)}}var Ot=n=>{let e=document.cookie.split(";").reduce((t,o)=>{let[r]=o.split("=",2);return r?t.concat(r.trim()):t},[]);n.forEach(t=>{let o,r;t instanceof Array&&([t,o,r]=t);let i=(l=>{if(l instanceof RegExp)return l;if(l.startsWith("/")){let u=/^\/(.*)\/(i?)$/.exec(l);if(u)try{return new RegExp(u[1],u[2])}catch{}}let s=l.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return RegExp(`^${s}$`)})(t);e.filter(l=>i.test(l)).forEach(l=>{Pt(l,o,r)})})};class Dt{#e;constructor(e){this.#e=((t,o)=>Object.fromEntries(t.map(r=>[r[o],r])))(e,"id")}apply(e){Object.entries(e).filter(([t,o])=>!o).map(([t])=>this.#e[t].cookies).filter(t=>t?.length).forEach(Ot)}}class It{#e;#o;#t;constructor(e,t){this.#e=t,this.#o=Object.fromEntries(e.map(({id:o,runsOnce:r})=>[o,!!r])),this.#t=Object.fromEntries(e.map(({id:o})=>[o,!1]))}apply(e){Object.entries(e).filter(([t,o])=>!o||!this.#o[t]||!this.#t?.[t]).forEach(([t,o])=>{this.#e(t,o),this.#t[t]=!0})}}class Ht{#e;constructor(){this.#e={}}on(e,t){e in this.#e||(this.#e[e]=[]),this.#e[e].push(t)}off(e,t){if(!(e in this.#e))return;let o=this.#e[e].findIndex(r=>r===t);o>=0&&this.#e[e].splice(o,1)}emit(e,...t){e in this.#e&&this.#e[e].forEach(o=>{o(...t)})}}let kt=(n,e)=>Object.keys(n).reduce((t,o)=>({...t,[o]:e[o]??n[o]}),{});class Ge extends Ht{#e;#o;#t;#r;#i;#n;constructor(e,t={}){super(),this.#r=e.filter(o=>!(({id:r,isExempt:i,isMandatory:l},s)=>!!i||(l?s?.[r]:r in s))(o,t)).map(({id:o})=>o),this.#t=(o=>Object.fromEntries(o.map(({id:r,isMandatory:i,default:l})=>[r,i||!!l])))(e),this.#o=Fe(e.filter(({isMandatory:o})=>o)),this.#e=e,this.#n=kt(this.#t,t),this.#i=Object.keys(t).length>0&&this.#r.length>0}clone(){return new Ge(this.#e,this.getAllConsents())}isDirty(){return this.#r.length>0}needsUpdate(){return this.#i}areAllPurposesMandatory(){return $e(this.#e,({isMandatory:e})=>e)}areAllPurposesEnabled(){return jt(this.#e,this.#n)}areAllPurposesDisabled(){return wt(this.#e,this.#n)}getConsent(e){return this.#n?.[e]}getAllConsents(){return{...this.#n}}acceptAll(){this.setConsents(Fe(this.#e))}declineAll(){this.setConsents(bt(this.#e))}setConsent(e,t){this.setConsents({[e]:t})}setConsents(e){this.#l(e),this.#a(gt(this.#r,Object.keys(e)))}clearConsents(){this.#l({...this.#t}),this.#a(gt(this.#e.map(({id:e})=>e),Object.keys(this.#o))),this.emit("clear")}#l(e){let t,o=kt(e,this.#o),r=(t=this.#n,Object.entries(o).reduce((i,[l,s])=>s===t?.[l]?i:{...i,[l]:s},{}));this.#n={...this.#n,...o},this.emit("update",r,{...this.#n})}#a(e){this.#r=e,this.#r.length===0&&(this.#i=!1),this.emit("dirty",this.isDirty())}}var Rt=(n,e)=>{e?document.querySelectorAll(`template[data-purpose="${n}"]:not([data-active])`).forEach(t=>{t.dataset.active="active",Array.from(t.content.cloneNode(!0).children).forEach(o=>{o.dataset.purpose=t.dataset.purpose,t.insertAdjacentElement("afterend",o)})}):document.querySelectorAll(`[data-purpose="${n}"]`).forEach(t=>{t.nodeName==="TEMPLATE"?delete t.dataset.active:t.remove()})},$t=({purposes:n,children:e,...t})=>{let o,[r,i,l,s]=[jt(n,(o=te()).getAllConsents()),wt(n,o.getAllConsents()),()=>{o.setConsents(Fe(n))},()=>{o.setConsents(bt(n))}],{Purpose:u}=ae();return c(u,{...t,consent:r?V.accepted:i?V.declined:V.partial,onChange:p=>p?l():s(),children:e})},Ft=n=>{var e;let t,[o,r]=(e=n.id,[(t=te()).getConsent(e),t.setConsent.bind(t,e)]),{Purpose:i}=ae();return c(i,{...n,consent:o?V.accepted:V.declined,onChange:r})};let xt=({purposes:n})=>{let{PurposeList:e}=ae();return c(e,{children:n.map(t=>"purposes"in t?c($t,{...t,children:c(xt,{purposes:t.purposes})},t.id):c(Ft,{...t},t.id))})};function Wt({children:n,onCommit:e}){let{manager:t,...o}=Ce(ee),{current:r}=le(t.clone());return c(ee.Provider,{value:{...o,manager:r},children:n(()=>{t.setConsents(r.getAllConsents()),e()})})}var qt=()=>{let n=te(),{GlobalConsent:e}=ae();return c(e,{isEnabled:n.areAllPurposesEnabled(),isDisabled:n.areAllPurposesDisabled(),acceptAll:()=>n.acceptAll(),declineAll:()=>n.declineAll()})},zt=({apiRef:n})=>{var e;let t,o,r=de(),i=te(),l=(t=de(),o=te(),!t.forceModal&&!!o.isDirty()),[s,u,p]=(()=>{let g=de(),A=te(),b=()=>g.forceModal&&A.isDirty(),[w,B]=we(b());return[w,()=>{B(!0)},()=>{B(b())}]})(),{Banner:_,Modal:a,ModalBanner:m}=ae(),f=le(),P=r.forceBanner?m:_;return e=()=>({openModal:u}),ue=6,ht(function(){if(typeof n=="function"){var g=n(e());return function(){n(null),g&&typeof g=="function"&&g()}}if(n)return n.current=e(),function(){return n.current=null}},void 0),ie(()=>{var g;l&&!s&&f.current&&(g=f.current.querySelector(We))&&(()=>{try{return window.self===window.top}catch{return!0}})()&&g?.focus()},[l]),c("div",{className:"orejime-Main orejime-Env",children:[l?c("div",{ref:f,children:c(P,{isHidden:s,needsUpdate:i.needsUpdate(),purposeTitles:r.purposes.map(({title:g})=>g),privacyPolicyUrl:r.privacyPolicyUrl,logo:r.logo,onConfigure:u,onAccept:()=>{i.acceptAll(),p()},onDecline:()=>{i.declineAll(),p()}},"banner")}):null,s?c(Wt,{onCommit:p,children:g=>c(a,{isForced:r.forceModal&&i.isDirty(),needsUpdate:i.needsUpdate(),privacyPolicyUrl:r.privacyPolicyUrl,onClose:p,onSave:g,children:[i.areAllPurposesMandatory()?null:c(qt,{}),c(xt,{purposes:r.purposes})]},"modal")}):null]})},Gt=({purposeId:n,titleLevel:e,isEnabled:t})=>{let o=de(),r=te(),i=X(),{ContextualNotice:l}=ae(),[s,u]=we(!1);if(!t&&!s)return null;let p=Re(o.purposes).find(({id:_})=>_===n);return p?c("div",{className:"orejime-Env",children:t?c(l,{purpose:p,titleLevel:e,privacyPolicyUrl:o.privacyPolicyUrl,onAccept:()=>{r.setConsent(p.id,!0),u(!0)}}):s?c("div",{id:`orejime-ContextualNotice-placeholder--${p.id}`,className:"orejime-ContextualNotice-placeholder",title:ne(i.contextual.accepted,{purpose:p.title}).join(""),tabIndex:-1,ref:_=>{_?.focus()},onFocusOut:()=>{u(!1)},"data-testid":"orejime-contextual-notice-placeholder"}):null}):null};class Vt{#e;#o;#t;constructor(e,t){this.#e=e,this.#o=t,this.#t=new WeakMap}apply(e){Object.entries(e).forEach(([t,o])=>{document.querySelectorAll(`template[data-contextual][data-purpose="${t}"]`).forEach(r=>{this.#r(r,!o)})})}#r(e,t){at(c(ee.Provider,{value:{config:this.#e,manager:this.#o},children:c(Gt,{...this.#i(e.dataset),isEnabled:t})}),this.#n(e))}#i(e){return{purposeId:e.purpose,titleLevel:Math.min(Math.max(parseInt(e.titleLevel,10)||this.#e?.contextual?.defaultTitleLevel||6,1),6)}}#n(e){if(!this.#t.has(e)){let t=document.createElement("div");t.style.display="contents",e.insertAdjacentElement("beforebegin",t),this.#t.set(e,t)}return this.#t.get(e)}}let Ve=(...n)=>n.reduce((e,t)=>(Object.keys(t).forEach(o=>{let r=e[o],i=t[o];Array.isArray(r)&&Array.isArray(i)?e[o]=r.concat(...i):r&&typeof r=="object"&&i&&typeof i=="object"?e[o]=Ve(r,i):e[o]=i}),e),{});Je={Banner:Ct,ContextualNotice:({purpose:n,titleLevel:e,onAccept:t,privacyPolicyUrl:o})=>{let r=X(),i=`h${e}`,l={purpose:n.title,privacyPolicy:c("a",{href:o,children:r.contextual.privacyPolicyLabel},"privacyPolicyUrl")};return c("div",{className:"orejime-ContextualNotice","data-testid":"orejime-contextual-notice",children:[c(i,{className:"orejime-ContextualNotice-title","data-testid":"orejime-contextual-notice-title",children:ne(r.contextual.title,l)}),c("p",{className:"orejime-ContextualNotice-description",children:ne(r.contextual.description,l)}),c("button",{className:"orejime-ContextualNotice-button orejime-Button",title:r.contextual.acceptTitle?ne(r.contextual.acceptTitle,l).join(""):null,onClick:t,"data-testid":"orejime-contextual-notice-accept",children:ne(r.contextual.accept,l)})]})},GlobalConsent:({isEnabled:n,isDisabled:e,acceptAll:t,declineAll:o})=>{let r=X();return c("ul",{className:"orejime-PurposeToggles orejime-ButtonList",children:[c("li",{className:"orejime-ButtonList-item",children:c("button",{type:"button",className:"orejime-Button orejime-Button--info orejime-PurposeToggles-button orejime-PurposeToggles-enableAll","aria-disabled":n,onClick:t,"data-testid":"orejime-modal-enable-all",children:r.modal.acceptAll})}),c("li",{className:"orejime-ButtonList-item",children:c("button",{type:"button",className:"orejime-Button orejime-Button--info orejime-PurposeToggles-button orejime-PurposeToggles-disableAll","aria-disabled":e,onClick:o,"data-testid":"orejime-modal-disable-all",children:r.modal.declineAll})})]})},Modal:({isForced:n,needsUpdate:e,privacyPolicyUrl:t,onClose:o,onSave:r,children:i})=>{let l=X();return c(Nt,{isAlert:n,labelId:"orejime-modal-title",overlayClassName:"orejime-ModalOverlay",className:"orejime-ModalWrapper",onRequestClose:o,children:c("div",{className:"orejime-Modal","data-testid":"orejime-modal",children:[c("div",{className:"orejime-Modal-header",children:[n?null:c("button",{title:l.modal.closeTitle,className:"orejime-Modal-closeButton",type:"button",onClick:o,"data-testid":"orejime-modal-close",children:c(Lt,{title:l.modal.close})}),c("h1",{className:"orejime-Modal-title",id:"orejime-modal-title",children:l.modal.title}),c("p",{className:"orejime-Modal-description",children:[n&&e?c("p",{className:"orejime-Modal-description",children:c("strong",{className:"orejime-Modal-changes",children:l.misc.updateNeeded})}):null,ne(l.modal.description,{privacyPolicy:c("a",{className:"orejime-Modal-privacyPolicyLink",onClick:s=>{o()},href:t,children:l.modal.privacyPolicyLabel},"privacyPolicyLink")})]})]}),c("form",{className:"orejime-Modal-form",onSubmit:s=>{s.preventDefault(),r()},onKeyDown:s=>{s.target.nodeName==="INPUT"&&s.target.type==="checkbox"&&s.key==="Enter"&&s.preventDefault()},children:[c("div",{className:"orejime-Modal-body",children:i}),c("div",{className:"orejime-Modal-footer",children:[c("button",{className:"orejime-Button orejime-Button--save orejime-Modal-saveButton",title:l.modal.saveTitle,"data-testid":"orejime-modal-save",children:l.modal.save}),c(Ut,{className:"orejime-Modal-poweredByLink"})]})]})]})})},ModalBanner:n=>c(Nt,{overlayClassName:"orejime-BannerOverlay",className:"orejime-BannerWrapper",label:X().banner.title,isAlert:!0,children:c(Ct,{...n})}),Purpose:({id:n,title:e,description:t,isMandatory:o,isExempt:r,consent:i,children:l,onChange:s})=>{let u=X(),p=`orejime-purpose-${n}`,_=le();return ie(()=>{_.current&&(_.current.indeterminate=i===V.partial)},[i]),c("div",{className:"orejime-Purpose",children:[c("input",{id:p,ref:_,className:"orejime-Purpose-input","aria-describedby":t?`${p}-description`:null,disabled:o,checked:i===V.accepted,type:"checkbox",onChange:a=>{s(a.target.checked)},"data-testid":p}),c("label",{htmlFor:p,className:"orejime-Purpose-label",...o?{tabIndex:0}:{},children:[c("span",{id:`${p}-title`,className:"orejime-Purpose-title",children:e})," ",o?c("span",{className:"orejime-Purpose-attribute orejime-Purpose-attribute--mandatory",title:u.purpose.mandatoryTitle,children:u.purpose.mandatory}):null," ",r?c("span",{className:"orejime-Purpose-attribute orejime-Purpose-attribute--exempt",title:u.purpose.exemptTitle,children:u.purpose.exempt}):null," ",c("span",{className:"orejime-Purpose-attribute orejime-Purpose-attribute--state","aria-hidden":"true",children:i===V.accepted?u.purpose.enabled:i===V.declined?u.purpose.disabled:u.purpose.partial})]}),t?c("p",{id:`${p}-description`,className:"orejime-Purpose-description",dangerouslySetInnerHTML:{__html:t}}):null,(function a(m,f){return f=f||[],m==null||typeof m=="boolean"||(ce(m)?m.some(function(P){a(P,f)}):f.push(m)),f})(l).length?c("div",{className:"orejime-Purpose-children",role:"group","aria-labelledby":`${p}-title`,children:l}):null]})},PurposeList:({children:n})=>c("ul",{className:"orejime-PurposeList",children:n.map(e=>c("li",{className:"orejime-PurposeList-item",children:e}))})},Ke={banner:{title:null,description:`We collect and process your personal information for the following purposes: {purposes}.
2
+ To learn more, please read our {privacyPolicy}.
3
+ `,privacyPolicyLabel:"privacy policy",accept:"Accept",acceptTitle:"Accept all cookies",decline:"Decline",declineTitle:"Decline optional cookies",configure:"Configure",configureTitle:"Configure cookies"},modal:{title:"Information that we collect",description:`Here you can see and customize the information that we collect about you.
4
+ To learn more, please read our {privacyPolicy}.
5
+ `,privacyPolicyLabel:"privacy policy",close:"Close",closeTitle:"Close preferences",globalPreferences:"Global preferences",acceptAll:"Accept all apps",declineAll:"Decline all apps",save:"Save",saveTitle:"Save my configuration on collected information"},contextual:{title:'"{purpose}" is inactive',description:"Allow cookies to access this functionality.",privacyPolicyLabel:"privacy policy",accept:"Allow",accepted:'"{purpose}" is now allowed.'},purpose:{mandatory:"always required",mandatoryTitle:"This application is always required",exempt:"opt-out",exemptTitle:"This app is loaded by default (but you can opt out)",showMore:"Show more details",accept:"Accept",decline:"Decline",enabled:"enabled",disabled:"disabled",partial:"partial"},misc:{newWindowTitle:"new window",updateNeeded:"There were changes since your last visit, please update your consent.",poweredBy:"Powered by Orejime"}},xe=n=>{let e=(t=>{var o,r,i,l,s,u,p;let _,a,m,f,P,g,A,b,w,B,j,k,v=Ve(Mt,t);if(!Object.keys(v.purposes).length)throw Error("Orejime config: you must define `purposes`");if(!v.privacyPolicyUrl.length)throw Error("Orejime config: you must define `privacyPolicyUrl`");let S=(o=Re(v.purposes),r={cookie:v.cookie},b=new It(o,Rt),w=new Dt(o),k=(j=new Ge(o,(B=new St(r?.cookie)).read())).getAllConsents(),j.on("update",(y,d)=>{b.apply(y),w.apply(y),B.write(d)}),j.on("clear",()=>{B.clear()}),b.apply(k),w.apply(k),j),{openModal:$}=(i=v,l=S,f=((_=((s=i.orejimeElement)?typeof s=="string"?document.querySelector(s):s:u)||document.createElement("div")).classList.contains("orejime-Root")||_.classList.add("orejime-Root"),_.parentNode||document.body.insertBefore(_,document.body.firstChild),_),P={current:null},g=(p=()=>{at(c(ee.Provider,{value:{config:i,manager:l},children:c(zt,{apiRef:P})}),f)},m=!1,()=>(m||(a=p(),m=!0),a)),A=new Vt(i,l),l.on("update",y=>{A.apply(y)}),A.apply(l.getAllConsents()),l.on("dirty",y=>{y&&g()}),l.isDirty()&&g(),{openModal:()=>{g(),P.current.openModal()}});return{config:v,manager:S,prompt:$}})(Ve({translations:Ke},{...n,theme:Je}));return"u">typeof CustomEvent&&document.dispatchEvent(new CustomEvent("orejime.loaded",{detail:e})),e},Be=async()=>{window.loadOrejime=xe,window.orejimeConfig!==void 0&&window.orejime===void 0&&(window.orejime=xe(window.orejimeConfig))},document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Be):Be()})();