@1consent/react 0.1.0-beta.1 → 0.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/index.js +1 -1
- package/dist/one-consent.d.ts +7 -4
- package/dist/react-server.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,23 @@ instead of becoming consumer dependencies.
|
|
|
35
35
|
See the 1Consent developer reference for the complete API and integration
|
|
36
36
|
guidance.
|
|
37
37
|
|
|
38
|
+
## Execution timing
|
|
39
|
+
|
|
40
|
+
Pass the framework-associated `fastPathVersions` generated by `1c typegen`
|
|
41
|
+
and load the provider before governed resources. With a valid returning-visitor
|
|
42
|
+
mirror, a complete gate activates when its parse-time resolver runs, without
|
|
43
|
+
waiting for the asynchronous CMP runtime. Inline code runs synchronously when
|
|
44
|
+
no ordinary external dependency is pending. Ordinary external classic scripts
|
|
45
|
+
and their following instructions retain dependency order across gates;
|
|
46
|
+
explicit async/defer/module choices keep their nonblocking semantics.
|
|
47
|
+
|
|
48
|
+
This is an execution-order and consent guarantee, not a universal first-paint
|
|
49
|
+
deadline. Streamed content can paint before a later gate arrives, and permitted
|
|
50
|
+
external downloads can finish after paint. The integration does not hold page
|
|
51
|
+
rendering while waiting for vendors. Missing, expired or stale consent remains
|
|
52
|
+
inert until the CMP establishes current permission. SPA gates activate through
|
|
53
|
+
the inline engine's observer after mounting; they have no initial-paint promise.
|
|
54
|
+
|
|
38
55
|
## Before publication
|
|
39
56
|
|
|
40
57
|
From this repository's root, pack the reviewed artifact into an existing directory:
|
package/dist/index.js
CHANGED
|
@@ -366,7 +366,7 @@ function OneConsent(props) {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// ../react-fastpath/dist/generated/engine-source.js
|
|
369
|
-
var REACT_FASTPATH_SOURCE = '"use strict";(()=>{(()=>{var
|
|
369
|
+
var REACT_FASTPATH_SOURCE = '"use strict";(()=>{function ve(){let o=[],c=!1,E=!1,h,b,F=()=>{var f;if(!(c||E)){for(c=!0;!E&&o.length>0;){let d=o.shift();if(!d)break;if(!d.slot.isConnected||!d.allowed())continue;let s=d.recreate(d.source),a=s.hasAttribute("type")?s.type.trim().toLowerCase():s.getAttribute("language")?`text/${(f=s.getAttribute("language"))==null?void 0:f.trim().toLowerCase()}`:"",H=a===""||/^(?:application|text)\\/(?:x-)?(?:java|ecma)script$/.test(a)||/^text\\/(?:javascript1\\.[0-5]|jscript|livescript)$/.test(a);if(s.src&&H&&!s.hasAttribute("async")&&!s.defer&&!s.noModule){let w=new MutationObserver(()=>{s.isConnected||m()}),m=()=>{h===A&&(A(),c=!1,F())},A=()=>{w.disconnect(),s.removeEventListener("load",m),s.removeEventListener("error",m),h=void 0,b=void 0};h=A,b=()=>{(!s.isConnected||!d.allowed())&&(A(),c=!1)},s.addEventListener("load",m),s.addEventListener("error",m),w.observe(d.slot.ownerDocument,{childList:!0,subtree:!0}),d.slot.replaceWith(s),s.isConnected||m();return}d.slot.replaceWith(s)}c=!1}};return{activate(f,d,s,a){let H=Array.from(f.querySelectorAll("script"),m=>{let A=document.createComment("1c-script");return m.replaceWith(A),{source:m,slot:A,allowed:s,recreate:a}}),w=!c;c=!0,o.push(...H);try{d(f)}finally{w&&(c=!1),F()}},setPaused(f){E=f},recheck(){if(!E){b==null||b();for(let f=o.length-1;f>=0;f--){let d=o[f];d&&(!d.slot.isConnected||!d.allowed())&&o.splice(f,1)}}},flush:F,clear(){o.length=0,h==null||h(),c=!1}}}(()=>{var _e,ye,he,Se,be,Ae,Te,Ee;let o=window,c=document,E=["data-1c-service","data-1c-service-tag","data-1c-tag"],h="data-1c-category",b="data-1c-resolved",F="data-1c-once",f="1consent:config",d=33696e6,s=E.concat(h).map(e=>`template[${e}]:not([${b}])`).join(","),a=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),H=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24))>>>0;return t.toString(36)},w=e=>{var r,i;let t=((r=e.services)!=null?r:[]).map(l=>{var g,u,M;return`${l.id}\\0${(g=l.name)!=null?g:""}\\0${(u=l.tag)!=null?u:""}\\0${(M=l.categoryId)!=null?M:""}\\0${l.essential?1:0}${l.catalogServiceKey?`\\0k\\0${l.catalogServiceKey}`:""}${l.usSensitive?"\\x001":""}`}).sort(),n=((i=e.categories)!=null?i:[]).map(l=>`${l.id}\\0${l.name}\\0${l.essential?1:0}`).sort();return H(`s:${t.join("")}|c:${n.join("")}`)},m=((_e=c.currentScript)==null?void 0:_e.getAttribute("data-1c-app-id"))||"",A=((ye=c.currentScript)==null?void 0:ye.getAttribute("data-1c-framework-versions"))||"{}",q={};try{q=JSON.parse(A)}catch{}let p=o.__1CONSENT_CONFIG__,J=(he=p==null?void 0:p.consentEpoch)!=null?he:0,k=p==null?void 0:p.framework.type,O=p==null?void 0:p.machine,D=(Se=p==null?void 0:p.languages)==null?void 0:Se.primary,j=p!==void 0&&p.appId===m&&(k==="gdpr"||k==="tcf"||k==="us")&&(O==="P"||O==="S"||O==="D")&&typeof D=="string"&&D.length>0&&Number.isSafeInteger(J)&&J>=0,T=j?p:void 0,P=(be=T==null?void 0:T.appId)!=null?be:"",N=(Ae=T==null?void 0:T.framework.id)!=null?Ae:"",V=j&&k!=null?k:"",x=j&&O!=null?O:"",K=j&&D!=null?D:"",ne=a(q)?q[N]:void 0,I=typeof ne=="string"?ne:"",R=j?J:-1,re=JSON.stringify([P,N,V,x,K,I,R]),B=!1,Q=!1,U,X,Y,oe=!1,se=()=>{var e,t;try{let n=o.__1CONSENT_CONFIG__;return B||Q||!n||P.length===0||N.length===0||R<0||n.appId!==P||n.framework.id!==N||n.framework.type!==V||n.machine!==x||((e=n.languages)==null?void 0:e.primary)!==K||((t=n.consentEpoch)!=null?t:0)!==R||I.length===0?!1:((n!==U||n.services!==X||n.categories!==Y)&&(U=n,X=n.services,Y=n.categories,oe=w(n)===I),oe)}catch{return!1}},S=o.__1CONSENT_REACT_FASTPATH__;if(S){try{if(S.runtimeKey===re&&S.supportsPendingConsent===!0&&typeof S.updateConsent=="function"&&typeof S.promote=="function"&&se()&&typeof S.reconcile=="function"&&S.reconcile())return}catch{}try{typeof S.destroy=="function"&&S.destroy()}catch{}o.__1CONSENT_REACT_FASTPATH__===S&&delete o.__1CONSENT_REACT_FASTPATH__}let _=null,y=null,L,ie=!1,v,$=ve(),G,z=()=>{},C=()=>B||Q?!1:se()?!0:(Q=!0,$.clear(),_=null,y=null,v==null||v.disconnect(),z(),o.__1CONSENT_REACT_FASTPATH__===G&&delete o.__1CONSENT_REACT_FASTPATH__,!1),ce=new Set,ae=e=>{if(!e||typeof e!="object")return!1;for(let t of Object.values(e))if(typeof t!="boolean")return!1;return!0},Ce=()=>navigator.globalPrivacyControl===!0;try{let e=localStorage.getItem("1consent");if(e&&P&&N&&I&&R>=0){let t=Date.now(),n=t+d,r=JSON.parse(e),i=a(r)&&a(r.apps)?r.apps[P]:void 0,l=a(i)?i.frameworks:void 0,g=a(l)?l[N]:void 0,u=a(g)?g.fastPath:void 0,M=a(g)?g.consent:void 0,te=a(g)&&"consentEpoch"in g?g.consentEpoch:0,Oe=a(g)&&g.type===V&&g.machine===x&&typeof te=="number"&&Number.isSafeInteger(te)&&te>=R&&g.primaryLanguage===K,Pe=(T==null?void 0:T.framework.type)!=="tcf"||a(M)&&typeof M.tcString=="string"&&((Ee=(Te=o.__1cTcf)==null?void 0:Te.tcData)==null?void 0:Ee.eventStatus)==="tcloaded"&&o.__1cTcf.tcData.tcString===M.tcString;a(r)&&r.schemaVersion===1&&Oe&&a(u)&&u.structuralVersion===I&&typeof u.consentEpoch=="number"&&Number.isSafeInteger(u.consentEpoch)&&u.consentEpoch>=R&&Number.isSafeInteger(t)&&t>=0&&Number.isSafeInteger(n)&&typeof u.expiresAt=="number"&&Number.isSafeInteger(u.expiresAt)&&u.expiresAt>=t&&u.expiresAt<=n&&ae(u.services)&&Pe&&!(u.gpcRevocable===!0&&Ce())&&(L=u.expiresAt,_=u.services,y=ae(u.categories)?u.categories:{})}}catch{}let Ne=e=>{for(let t of E){let n=e.getAttribute(t);if(n!==null)return n}return e.getAttribute(h)},le=e=>{if(ie||L!==void 0&&Date.now()>L)return!1;for(let n of E){let r=e.getAttribute(n);if(r!==null)return _!==null&&_[r]===!0}let t=e.getAttribute(h);return t!==null?y!==null&&y[t]===!0:!1},Re=e=>{let t=c.createElement("script");for(let n of e.attributes)t.setAttribute(n.name,n.value);return e.src?e.hasAttribute("async")||(t.async=!1):t.text=e.text||"",t},W=e=>{if(!C()||e.hasAttribute(b)||!le(e))return!1;e.setAttribute(b,"");let t=e.getAttribute(F);if(t!==null){if(ce.has(t))return!1;ce.add(t)}let n=e.content.cloneNode(!0);return n instanceof DocumentFragment?($.activate(n,r=>e.after(r),()=>e.isConnected&&C()&&le(e),Re),!0):!1},Z=e=>e instanceof HTMLTemplateElement,ue=8,we=()=>new Promise(e=>{let t=o.scheduler;t!=null&&t.postTask?t.postTask(e,{priority:"user-visible"}):setTimeout(e,0)}),ee=e=>{if(!C())return[];let t=[];for(let i of e.querySelectorAll(s))Z(i)&&t.push(i);let n=[],r=0;for(;r<t.length&&r<ue;r++){let i=t[r];if(i&&W(i)){let l=Ne(i);l!==null&&n.push(l)}}return r<t.length&&(async()=>{for(;r<t.length;r++){r%ue===0&&await we();let i=t[r];if(i)try{W(i)}catch{}}})(),n},de=!1,fe=()=>C()?c.readyState!=="loading"?ee(c):(de||(de=!0,c.addEventListener("DOMContentLoaded",()=>ee(c),{once:!0})),[]):[];v=new MutationObserver(e=>{if(!(!C()||c.readyState==="loading"||_===null&&y===null))for(let t of e)for(let n of t.addedNodes)Z(n)?W(n):n instanceof Element&&ee(n)}),v.observe(c.documentElement,{childList:!0,subtree:!0});let pe=()=>{U=void 0,X=void 0,Y=void 0,C()},ke=()=>{B=!0,$.clear(),_=null,y=null,v==null||v.disconnect(),z(),o.__1CONSENT_REACT_FASTPATH__===G&&delete o.__1CONSENT_REACT_FASTPATH__},ge=(e,t,n,r=!1)=>{if(C()){ie=r,$.setPaused(r),L!==void 0&&Date.now()>L&&(_=null,y=null),n!==void 0&&(L=n===0?void 0:n),_=_||{},y=y||{};for(let i of Object.keys(e))_[i]=e[i]===!0;if(t)for(let i of Object.keys(t))y[i]=t[i]===!0;$.recheck()}},me=()=>($.flush(),fe());G={appId:P,frameworkId:N,frameworkType:V,machine:x,primaryLanguage:K,structuralVersion:I,consentEpoch:R,runtimeKey:re,apply(e,t){return ge(e,t),me()},supportsPendingConsent:!0,updateConsent:ge,promote:me,resolve(e){return e!==null&&Z(e)?W(e):!1},reconcile:C,destroy:ke},o.__1CONSENT_REACT_FASTPATH__=G,o.addEventListener(f,pe),z=()=>o.removeEventListener(f,pe),(_!==null||y!==null)&&fe()})();})();';
|
|
370
370
|
|
|
371
371
|
// src/provider.tsx
|
|
372
372
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
package/dist/one-consent.d.ts
CHANGED
|
@@ -16,14 +16,17 @@
|
|
|
16
16
|
* React fastpath. React never reconciles inside `dangerouslySetInnerHTML`
|
|
17
17
|
* content, so the engine can insert promoted nodes there without hydration
|
|
18
18
|
* mismatches. On the server-rendered page the inline call executes at HTML
|
|
19
|
-
* parse time
|
|
20
|
-
* and the engine's MutationObserver promotes the template
|
|
19
|
+
* parse time when the complete gate is encountered; on SPA mounts innerHTML
|
|
20
|
+
* scripts never run and the engine's MutationObserver promotes the template.
|
|
21
|
+
* Parsing may continue after the browser's first paint. Neither streamed
|
|
22
|
+
* gate arrival nor an external download has a universal before-paint deadline.
|
|
21
23
|
*
|
|
22
24
|
* Head placement caveat: the wrapper `<div>` is not valid inside `<head>` —
|
|
23
25
|
* the HTML parser silently ends `<head>` at the div and reparents it (and
|
|
24
26
|
* everything after it) into `<body>`, which triggers a dev-mode hydration
|
|
25
|
-
* mismatch.
|
|
26
|
-
*
|
|
27
|
+
* mismatch. Use body placement with the bootstrap before governed resources.
|
|
28
|
+
* Earlier gate placement reduces activation latency without promising a
|
|
29
|
+
* first-paint deadline.
|
|
27
30
|
*/
|
|
28
31
|
import type { ReactNode } from "react";
|
|
29
32
|
import type { RegisteredCategoryName, RegisteredServiceName } from "./types.js";
|
package/dist/react-server.js
CHANGED
|
@@ -260,7 +260,7 @@ function OneConsent(props) {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
// ../react-fastpath/dist/generated/engine-source.js
|
|
263
|
-
var REACT_FASTPATH_SOURCE = '"use strict";(()=>{(()=>{var
|
|
263
|
+
var REACT_FASTPATH_SOURCE = '"use strict";(()=>{function ve(){let o=[],c=!1,E=!1,h,b,F=()=>{var f;if(!(c||E)){for(c=!0;!E&&o.length>0;){let d=o.shift();if(!d)break;if(!d.slot.isConnected||!d.allowed())continue;let s=d.recreate(d.source),a=s.hasAttribute("type")?s.type.trim().toLowerCase():s.getAttribute("language")?`text/${(f=s.getAttribute("language"))==null?void 0:f.trim().toLowerCase()}`:"",H=a===""||/^(?:application|text)\\/(?:x-)?(?:java|ecma)script$/.test(a)||/^text\\/(?:javascript1\\.[0-5]|jscript|livescript)$/.test(a);if(s.src&&H&&!s.hasAttribute("async")&&!s.defer&&!s.noModule){let w=new MutationObserver(()=>{s.isConnected||m()}),m=()=>{h===A&&(A(),c=!1,F())},A=()=>{w.disconnect(),s.removeEventListener("load",m),s.removeEventListener("error",m),h=void 0,b=void 0};h=A,b=()=>{(!s.isConnected||!d.allowed())&&(A(),c=!1)},s.addEventListener("load",m),s.addEventListener("error",m),w.observe(d.slot.ownerDocument,{childList:!0,subtree:!0}),d.slot.replaceWith(s),s.isConnected||m();return}d.slot.replaceWith(s)}c=!1}};return{activate(f,d,s,a){let H=Array.from(f.querySelectorAll("script"),m=>{let A=document.createComment("1c-script");return m.replaceWith(A),{source:m,slot:A,allowed:s,recreate:a}}),w=!c;c=!0,o.push(...H);try{d(f)}finally{w&&(c=!1),F()}},setPaused(f){E=f},recheck(){if(!E){b==null||b();for(let f=o.length-1;f>=0;f--){let d=o[f];d&&(!d.slot.isConnected||!d.allowed())&&o.splice(f,1)}}},flush:F,clear(){o.length=0,h==null||h(),c=!1}}}(()=>{var _e,ye,he,Se,be,Ae,Te,Ee;let o=window,c=document,E=["data-1c-service","data-1c-service-tag","data-1c-tag"],h="data-1c-category",b="data-1c-resolved",F="data-1c-once",f="1consent:config",d=33696e6,s=E.concat(h).map(e=>`template[${e}]:not([${b}])`).join(","),a=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),H=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24))>>>0;return t.toString(36)},w=e=>{var r,i;let t=((r=e.services)!=null?r:[]).map(l=>{var g,u,M;return`${l.id}\\0${(g=l.name)!=null?g:""}\\0${(u=l.tag)!=null?u:""}\\0${(M=l.categoryId)!=null?M:""}\\0${l.essential?1:0}${l.catalogServiceKey?`\\0k\\0${l.catalogServiceKey}`:""}${l.usSensitive?"\\x001":""}`}).sort(),n=((i=e.categories)!=null?i:[]).map(l=>`${l.id}\\0${l.name}\\0${l.essential?1:0}`).sort();return H(`s:${t.join("")}|c:${n.join("")}`)},m=((_e=c.currentScript)==null?void 0:_e.getAttribute("data-1c-app-id"))||"",A=((ye=c.currentScript)==null?void 0:ye.getAttribute("data-1c-framework-versions"))||"{}",q={};try{q=JSON.parse(A)}catch{}let p=o.__1CONSENT_CONFIG__,J=(he=p==null?void 0:p.consentEpoch)!=null?he:0,k=p==null?void 0:p.framework.type,O=p==null?void 0:p.machine,D=(Se=p==null?void 0:p.languages)==null?void 0:Se.primary,j=p!==void 0&&p.appId===m&&(k==="gdpr"||k==="tcf"||k==="us")&&(O==="P"||O==="S"||O==="D")&&typeof D=="string"&&D.length>0&&Number.isSafeInteger(J)&&J>=0,T=j?p:void 0,P=(be=T==null?void 0:T.appId)!=null?be:"",N=(Ae=T==null?void 0:T.framework.id)!=null?Ae:"",V=j&&k!=null?k:"",x=j&&O!=null?O:"",K=j&&D!=null?D:"",ne=a(q)?q[N]:void 0,I=typeof ne=="string"?ne:"",R=j?J:-1,re=JSON.stringify([P,N,V,x,K,I,R]),B=!1,Q=!1,U,X,Y,oe=!1,se=()=>{var e,t;try{let n=o.__1CONSENT_CONFIG__;return B||Q||!n||P.length===0||N.length===0||R<0||n.appId!==P||n.framework.id!==N||n.framework.type!==V||n.machine!==x||((e=n.languages)==null?void 0:e.primary)!==K||((t=n.consentEpoch)!=null?t:0)!==R||I.length===0?!1:((n!==U||n.services!==X||n.categories!==Y)&&(U=n,X=n.services,Y=n.categories,oe=w(n)===I),oe)}catch{return!1}},S=o.__1CONSENT_REACT_FASTPATH__;if(S){try{if(S.runtimeKey===re&&S.supportsPendingConsent===!0&&typeof S.updateConsent=="function"&&typeof S.promote=="function"&&se()&&typeof S.reconcile=="function"&&S.reconcile())return}catch{}try{typeof S.destroy=="function"&&S.destroy()}catch{}o.__1CONSENT_REACT_FASTPATH__===S&&delete o.__1CONSENT_REACT_FASTPATH__}let _=null,y=null,L,ie=!1,v,$=ve(),G,z=()=>{},C=()=>B||Q?!1:se()?!0:(Q=!0,$.clear(),_=null,y=null,v==null||v.disconnect(),z(),o.__1CONSENT_REACT_FASTPATH__===G&&delete o.__1CONSENT_REACT_FASTPATH__,!1),ce=new Set,ae=e=>{if(!e||typeof e!="object")return!1;for(let t of Object.values(e))if(typeof t!="boolean")return!1;return!0},Ce=()=>navigator.globalPrivacyControl===!0;try{let e=localStorage.getItem("1consent");if(e&&P&&N&&I&&R>=0){let t=Date.now(),n=t+d,r=JSON.parse(e),i=a(r)&&a(r.apps)?r.apps[P]:void 0,l=a(i)?i.frameworks:void 0,g=a(l)?l[N]:void 0,u=a(g)?g.fastPath:void 0,M=a(g)?g.consent:void 0,te=a(g)&&"consentEpoch"in g?g.consentEpoch:0,Oe=a(g)&&g.type===V&&g.machine===x&&typeof te=="number"&&Number.isSafeInteger(te)&&te>=R&&g.primaryLanguage===K,Pe=(T==null?void 0:T.framework.type)!=="tcf"||a(M)&&typeof M.tcString=="string"&&((Ee=(Te=o.__1cTcf)==null?void 0:Te.tcData)==null?void 0:Ee.eventStatus)==="tcloaded"&&o.__1cTcf.tcData.tcString===M.tcString;a(r)&&r.schemaVersion===1&&Oe&&a(u)&&u.structuralVersion===I&&typeof u.consentEpoch=="number"&&Number.isSafeInteger(u.consentEpoch)&&u.consentEpoch>=R&&Number.isSafeInteger(t)&&t>=0&&Number.isSafeInteger(n)&&typeof u.expiresAt=="number"&&Number.isSafeInteger(u.expiresAt)&&u.expiresAt>=t&&u.expiresAt<=n&&ae(u.services)&&Pe&&!(u.gpcRevocable===!0&&Ce())&&(L=u.expiresAt,_=u.services,y=ae(u.categories)?u.categories:{})}}catch{}let Ne=e=>{for(let t of E){let n=e.getAttribute(t);if(n!==null)return n}return e.getAttribute(h)},le=e=>{if(ie||L!==void 0&&Date.now()>L)return!1;for(let n of E){let r=e.getAttribute(n);if(r!==null)return _!==null&&_[r]===!0}let t=e.getAttribute(h);return t!==null?y!==null&&y[t]===!0:!1},Re=e=>{let t=c.createElement("script");for(let n of e.attributes)t.setAttribute(n.name,n.value);return e.src?e.hasAttribute("async")||(t.async=!1):t.text=e.text||"",t},W=e=>{if(!C()||e.hasAttribute(b)||!le(e))return!1;e.setAttribute(b,"");let t=e.getAttribute(F);if(t!==null){if(ce.has(t))return!1;ce.add(t)}let n=e.content.cloneNode(!0);return n instanceof DocumentFragment?($.activate(n,r=>e.after(r),()=>e.isConnected&&C()&&le(e),Re),!0):!1},Z=e=>e instanceof HTMLTemplateElement,ue=8,we=()=>new Promise(e=>{let t=o.scheduler;t!=null&&t.postTask?t.postTask(e,{priority:"user-visible"}):setTimeout(e,0)}),ee=e=>{if(!C())return[];let t=[];for(let i of e.querySelectorAll(s))Z(i)&&t.push(i);let n=[],r=0;for(;r<t.length&&r<ue;r++){let i=t[r];if(i&&W(i)){let l=Ne(i);l!==null&&n.push(l)}}return r<t.length&&(async()=>{for(;r<t.length;r++){r%ue===0&&await we();let i=t[r];if(i)try{W(i)}catch{}}})(),n},de=!1,fe=()=>C()?c.readyState!=="loading"?ee(c):(de||(de=!0,c.addEventListener("DOMContentLoaded",()=>ee(c),{once:!0})),[]):[];v=new MutationObserver(e=>{if(!(!C()||c.readyState==="loading"||_===null&&y===null))for(let t of e)for(let n of t.addedNodes)Z(n)?W(n):n instanceof Element&&ee(n)}),v.observe(c.documentElement,{childList:!0,subtree:!0});let pe=()=>{U=void 0,X=void 0,Y=void 0,C()},ke=()=>{B=!0,$.clear(),_=null,y=null,v==null||v.disconnect(),z(),o.__1CONSENT_REACT_FASTPATH__===G&&delete o.__1CONSENT_REACT_FASTPATH__},ge=(e,t,n,r=!1)=>{if(C()){ie=r,$.setPaused(r),L!==void 0&&Date.now()>L&&(_=null,y=null),n!==void 0&&(L=n===0?void 0:n),_=_||{},y=y||{};for(let i of Object.keys(e))_[i]=e[i]===!0;if(t)for(let i of Object.keys(t))y[i]=t[i]===!0;$.recheck()}},me=()=>($.flush(),fe());G={appId:P,frameworkId:N,frameworkType:V,machine:x,primaryLanguage:K,structuralVersion:I,consentEpoch:R,runtimeKey:re,apply(e,t){return ge(e,t),me()},supportsPendingConsent:!0,updateConsent:ge,promote:me,resolve(e){return e!==null&&Z(e)?W(e):!1},reconcile:C,destroy:ke},o.__1CONSENT_REACT_FASTPATH__=G,o.addEventListener(f,pe),z=()=>o.removeEventListener(f,pe),(_!==null||y!==null)&&fe()})();})();';
|
|
264
264
|
|
|
265
265
|
// src/provider.tsx
|
|
266
266
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|