@c15t/browser 3.0.0-alpha.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.
- package/AGENTS.md +64 -0
- package/CHANGELOG.md +27 -0
- package/README.md +128 -0
- package/dist/861.js +1079 -0
- package/dist/925.js +649 -0
- package/dist/c15t.css +213 -0
- package/dist/c15t.devtools.js +1 -0
- package/dist/c15t.headless.js +1 -0
- package/dist/c15t.iab.css +190 -0
- package/dist/c15t.iab.js +221 -0
- package/dist/c15t.js +30 -0
- package/dist/devtools.js +11 -0
- package/dist/headless.js +17 -0
- package/dist/iab.js +784 -0
- package/dist/index.js +17 -0
- package/dist-types/auto-init.d.ts +42 -0
- package/dist-types/client.d.ts +51 -0
- package/dist-types/deferred.d.ts +13 -0
- package/dist-types/devtools.d.ts +32 -0
- package/dist-types/entries/cdn-devtools.d.ts +13 -0
- package/dist-types/entries/cdn-headless.d.ts +8 -0
- package/dist-types/entries/cdn-iab.d.ts +1 -0
- package/dist-types/entries/cdn.d.ts +8 -0
- package/dist-types/gated-scripts.d.ts +35 -0
- package/dist-types/generated/iab-styles.d.ts +144 -0
- package/dist-types/generated/styles.d.ts +137 -0
- package/dist-types/global.d.ts +112 -0
- package/dist-types/headless.d.ts +41 -0
- package/dist-types/iab/mount.d.ts +8 -0
- package/dist-types/iab/preferences.d.ts +9 -0
- package/dist-types/iab/styles.d.ts +2 -0
- package/dist-types/iab/surface.d.ts +4 -0
- package/dist-types/iab/vendor-disclosures.d.ts +14 -0
- package/dist-types/iab.d.ts +20 -0
- package/dist-types/index.d.ts +43 -0
- package/dist-types/transports/manifest.d.ts +62 -0
- package/dist-types/transports/offline.d.ts +18 -0
- package/dist-types/types.d.ts +290 -0
- package/dist-types/ui/actions.d.ts +29 -0
- package/dist-types/ui/banner.d.ts +13 -0
- package/dist-types/ui/branding.d.ts +25 -0
- package/dist-types/ui/copy.d.ts +28 -0
- package/dist-types/ui/dialog.d.ts +14 -0
- package/dist-types/ui/dom.d.ts +48 -0
- package/dist-types/ui/mount.d.ts +27 -0
- package/dist-types/ui/surface.d.ts +43 -0
- package/dist-types/ui/trigger.d.ts +14 -0
- package/dist-types/ui/widget.d.ts +27 -0
- package/dist-types/version.d.ts +1 -0
- package/docs/README.md +64 -0
- package/docs/frameworks/javascript/script-loader.md +47 -0
- package/docs/frameworks/javascript/script-tag.md +375 -0
- package/docs/integrations/adobe-analytics.md +294 -0
- package/docs/integrations/ahrefs-analytics.md +291 -0
- package/docs/integrations/amplitude.md +292 -0
- package/docs/integrations/building-integrations.md +47 -0
- package/docs/integrations/clearbit.md +291 -0
- package/docs/integrations/cloudflare-web-analytics.md +292 -0
- package/docs/integrations/crisp.md +294 -0
- package/docs/integrations/databuddy.md +311 -0
- package/docs/integrations/fathom-analytics.md +293 -0
- package/docs/integrations/google-maps.md +384 -0
- package/docs/integrations/google-tag-manager.md +306 -0
- package/docs/integrations/google-tag.md +305 -0
- package/docs/integrations/heap.md +292 -0
- package/docs/integrations/hightouch.md +293 -0
- package/docs/integrations/hotjar.md +292 -0
- package/docs/integrations/intercom.md +285 -0
- package/docs/integrations/linkedin-insights.md +291 -0
- package/docs/integrations/logrocket.md +293 -0
- package/docs/integrations/matomo-analytics.md +316 -0
- package/docs/integrations/meta-pixel.md +285 -0
- package/docs/integrations/microsoft-clarity.md +292 -0
- package/docs/integrations/microsoft-uet.md +291 -0
- package/docs/integrations/mixpanel-analytics.md +295 -0
- package/docs/integrations/openai-pixel.md +441 -0
- package/docs/integrations/overview.md +111 -0
- package/docs/integrations/pirsch.md +295 -0
- package/docs/integrations/plausible-analytics.md +295 -0
- package/docs/integrations/posthog.md +397 -0
- package/docs/integrations/promptwatch.md +291 -0
- package/docs/integrations/reddit-pixel.md +294 -0
- package/docs/integrations/rudderstack.md +328 -0
- package/docs/integrations/rybbit-analytics.md +296 -0
- package/docs/integrations/segment.md +292 -0
- package/docs/integrations/snapchat-pixel.md +293 -0
- package/docs/integrations/tiktok-pixel.md +291 -0
- package/docs/integrations/umami-analytics.md +295 -0
- package/docs/integrations/vercel-analytics.md +293 -0
- package/docs/integrations/x-pixel.md +291 -0
- package/docs/integrations/youtube.md +405 -0
- package/package.json +117 -0
- package/readme.json +44 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e;let t,n,i,o,r,s,a,c=function(e){return!(!e||"object"!=typeof e||Array.isArray(e))},l=function(e,t){let n={};for(let i of["cookieBanner","consentManagerDialog","common","consentTypes","frame","legalLinks","iab","rights"]){let o=e[i],r=t[i];(o||r)&&(n[i]=function e(t,n){if(!t&&!n)return{};let i={};if(t)for(let e of Object.keys(t))i[e]=t[e];if(!n)return i;for(let o of Object.keys(n)){let r=n[o];if(void 0===r)continue;let s=t?t[o]:void 0;c(s)&&c(r)?i[o]=e(s,r):i[o]=r}return i}(o,r))}return t.common?.acknowledge===void 0&&t.common?.dismiss!==void 0&&n.common&&(n.common.acknowledge=t.common.dismiss),n},u=function(e){if(!e)return[];let t=e.split(",").map((e,t)=>{let[n,...i]=e.split(";"),o=n?.trim().toLowerCase();if(!o)return null;let r=1;for(let e of i){let t=e.trim().toLowerCase();if(!t.startsWith("q="))continue;let n=Number.parseFloat(t.slice(2));Number.isFinite(n)&&(r=n);break}return{code:o.split("-")[0]??o,index:t,quality:r}}).filter(e=>!!e).sort((e,t)=>t.quality!==e.quality?t.quality-e.quality:e.index-t.index),n=new Set,i=[];for(let e of t)n.has(e.code)||(n.add(e.code),i.push(e.code));return i},d=function(e,t){let n=t?.fallback??"en";if(!e.length)return n;for(let n of u(t?.header))if(e.includes(n))return n;return n},p=["x-c15t-country","cf-ipcountry","x-vercel-ip-country","x-amz-cf-ipcountry","x-country-code","x-country"],f=["x-c15t-region","cf-region-code","x-vercel-ip-country-region","x-region-code"],g=["x-c15t-gpc","sec-gpc"],m=[...p,...f,"accept-language",...g],y=function(e,t){return"function"==typeof e.get?e.get(t)??void 0:e[t]??e[t.toLowerCase()]},h=function(e,t){for(let n of t){let t=y(e,n);if(t)return t}},v=function(e,t={}){var n;let i=y(e,"accept-language");return{country:t.country??h(e,p),gpc:t.gpc??("1"===(n=h(e,g))||"0"!==n&&void 0),language:t.language??u(i)[0],region:t.region??h(e,f)}},b=function(){if("u"<typeof window)return!1;try{let e=window.navigator.globalPrivacyControl;return!0===e}catch{return!1}},w=/^https?:\/\//u,k=function(e){let t=e.toString();return t.endsWith("/")?t.slice(0,-1):t},A=function(e){let t={};return e?.gpc!==void 0&&(t["x-c15t-gpc"]=e.gpc?"1":"0"),e?.country&&(t["x-c15t-country"]=e.country),e?.region&&(t["x-c15t-region"]=e.region),e?.language&&(t["accept-language"]=e.language),t},I=function(e){try{let t="/"===e?e:e.endsWith("/")?e.slice(0,-1):e;if(w.test(t))return k(new URL(t));if(!t.startsWith("/"))return;return k(new URL(t,window.location.origin))}catch{return}},j=function(e){let t=I(e.backendURL);if(!t)return;let n=b();return{backendURL:t,country:e.overrides?.country,credentials:e.credentials??"include",gpc:e.overrides?.gpc??("boolean"==typeof n&&n),language:e.overrides?.language,region:e.overrides?.region}},S="__c15tInitialDataPromises",C=function(){if(!("u"<typeof window))return window},P=function(e){let t=C();if(!t)return;let n=j({backendURL:e.backendURL,credentials:e.credentials,overrides:e.overrides});if(!n)return;let i=Object.values(t[S]??{}).filter(e=>{let{requestContext:t}=e;return!!t&&t.backendURL===n.backendURL&&t.gpc===n.gpc&&(void 0===n.country||t.country===n.country)&&(void 0===n.region||t.region===n.region)&&(void 0===n.language||t.language===n.language)&&(void 0===t.credentials||t.credentials===n.credentials)&&t.country===(n.country??null)&&t.region===(n.region??null)&&t.language===(n.language??null)});return 1===i.length?i[0]:void 0},O=function(e){return e.toLowerCase().split("-")[0]??e.toLowerCase()},x=function(e,t){let n;return e.policyResolution?.status==="matched"?{policyId:n}=e.policyResolution:e.policyResolution?.status==="no-match"&&(n=null),{country:e.location.countryCode,fingerprint:e.policyResolution?.status==="matched"?e.policyResolution.fingerprints.policy:void 0,gpc:t,language:e.translations.language,policyId:n,region:e.location.regionCode}},D=function(e,t){let n=e.decisionInputs??t;if(!e.policySnapshotToken&&n&&void 0!==n.policyId&&(null===n.policyId||n.policyId&&n.fingerprint))return{country:n.country,fingerprint:n.fingerprint,gpc:n.gpc,language:n.language,policyId:n.policyId,region:n.region}},$=function(e){let t=e?.["x-c15t-gpc"]??e?.["sec-gpc"];return"1"===t||"0"!==t&&void 0},R=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},E=(e,t)=>Object.getOwnPropertyNames(e).every(e=>t.includes(e)),T=e=>Array.isArray(e)&&e.every(e=>"string"==typeof e),L=(e,t)=>void 0===e||t(e),M=e=>"boolean"==typeof e,U=e=>"strict"===e||"permissive"===e,q=e=>R(e)&&E(e,["allowedActions","primaryActions","layout","direction"])&&L(e.allowedActions,T)&&L(e.primaryActions,T)&&L(e.direction,e=>"row"===e||"column"===e)&&L(e.layout,e=>Array.isArray(e)&&e.every(e=>"string"==typeof e||T(e))),_=e=>R(e)&&E(e,["categories","expiryDays","gpc","preselectedCategories","scopeMode"])&&L(e.categories,T)&&L(e.preselectedCategories,T)&&L(e.scopeMode,U)&&L(e.expiryDays,e=>"number"==typeof e&&Number.isFinite(e))&&L(e.gpc,M),N=e=>R(e)&&E(e,["storeIp","storeUserAgent","storeLanguage"])&&L(e.storeIp,M)&&L(e.storeUserAgent,M)&&L(e.storeLanguage,M),F=e=>R(e)&&E(e,["mode","banner","dialog"])&&L(e.mode,e=>"none"===e||"banner"===e||"dialog"===e)&&L(e.banner,q)&&L(e.dialog,q),B=["necessary","functionality","experience","measurement","marketing"],z=["experience","functionality","marketing","measurement"],G=["opt-in","opt-out","iab","none"],V=["choice","notice","none"],H=["disclosure","preferences","opt-out"],W={iab:["choice"],none:["none"],"opt-in":["choice"],"opt-out":["choice","notice","none"]},J=new Set(z),K=new Set(G),Y=new Set(V),X=new Set(["accept","reject","customize"]),Q=new Set(H),Z=["legacyMaterial","id","match","model","prompt","categories","scopeMode","preselectedCategories","actions","rights","validity","privacySignals","copyRevision","i18n","proof","review"],ee=["countries","regions","regionFallbacks","isDefault","fallback"],et=["country","region"],en=["choiceDays","noticeDays"],ei=["gpc"],eo=["denyCategories"],er=["language","messageProfile"],es=["storeIp","storeUserAgent","storeLanguage"],ea=["status","reviewedOn","reviewBy","sources","assumptions"],ec=function(e){return J.has(e)},el=function(e){return"string"==typeof e&&K.has(e)},eu=function(e){return"string"==typeof e&&Y.has(e)},ed=function(e){return"string"==typeof e&&Q.has(e)},ep=function(e,t){return W[e].includes(t)},ef=function(e){return[...new Set(e)].sort((e,t)=>e.localeCompare(t))},eg=function(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},em=function(e,t){return Object.hasOwn(e,t)?e[t]:void 0},ey=function(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)},eh=function(e,t){return"string"==typeof e&&e.trim()?`'${e.trim()}'`:`at index ${t}`},ev=function(e,t,n,i){for(let o of Object.getOwnPropertyNames(t).filter(e=>!n.includes(e)))e.errors.push(`Policy ${e.label} ${i} has unknown field "${o}".`)},eb=function(e){let{errors:t,label:n,rule:i}=e,o=em(i,"model"),r=em(i,"prompt");el(o)?eu(r)?ep(o,r)||t.push(`Policy ${n} model "${o}" allows prompts [${W[o].join(", ")}], received "${r}".`):t.push(`Policy ${n} prompt must be one of ${V.join(", ")}.`):t.push(`Policy ${n} model must be one of ${G.join(", ")}.`)},ew=function(e,t,n){let{errors:i,label:o,rule:r}=e,s=em(r,t);if(void 0!==s){if(!ey(s))return void i.push(`Policy ${o} ${t} must be an array of strings.`);for(let e of s){let r=e.trim();"necessary"===r||n.allowWildcard&&"*"===r||ec(r)||i.push(`Policy ${o} ${t} has unknown category "${e}". Known categories: ${B.join(", ")}.`)}}},ek=function(e){if(!ey(e))return[...z];let t=e.map(e=>e.trim());if(t.includes("*"))return[...z];let n=ef(t.filter(ec));return n.length>0?n:[...z]},eA=function(e){let{errors:t,label:n,rule:i}=e;ew(e,"categories",{allowWildcard:!0});let o=em(i,"scopeMode");void 0===o&&ek(em(i,"categories")).length<z.length&&t.push(`Policy ${n} must set scopeMode to "strict" or "permissive" when categories selects only part of the optional categories.`),void 0!==o&&"strict"!==o&&"permissive"!==o&&t.push(`Policy ${n} scopeMode must be "strict" or "permissive".`);let r=em(i,"preselectedCategories"),s=em(i,"model");if("iab"===s||"none"===s){void 0!==r&&t.push(`Policy ${n} uses model "${s}" and cannot define preselectedCategories.`);return}if(ew(e,"preselectedCategories",{allowWildcard:!1}),ey(r)){let e=ek(em(i,"categories"));for(let i of r){let o=i.trim();ec(o)&&!e.includes(o)&&t.push(`Policy ${n} preselectedCategories "${o}" is outside the policy scope.`)}}},eI=function(e){let{errors:t,label:n,rule:i}=e,o=em(i,"actions");if(void 0!==o){if("choice"!==em(i,"prompt"))return void t.push(`Policy ${n} actions can only be configured for prompt "choice".`);if(!ey(o))return void t.push(`Policy ${n} actions must be an array of strings.`);for(let e of o)X.has(e)||t.push(`Policy ${n} actions has unknown action "${e}". Choice prompts accept accept, reject, customize.`);for(let e of["accept","reject"])o.includes(e)||t.push(`Policy ${n} actions must include "${e}". A choice prompt cannot drop it.`)}},ej=function(e){let{errors:t,label:n,rule:i}=e,o=em(i,"rights");if(void 0!==o){if(!ey(o))return void t.push(`Policy ${n} rights must be an array of strings.`);for(let e of o)ed(e)||t.push(`Policy ${n} rights has unknown right "${e}". Known rights: ${H.join(", ")}.`)}},eS=function(e){let{errors:t,label:n,rule:i}=e,o=em(i,"validity");if(void 0!==o){if(!eg(o))return void t.push(`Policy ${n} validity must be an object.`);for(let i of(ev(e,o,en,"validity"),en)){let e=em(o,i);void 0===e||"number"==typeof e&&Number.isFinite(e)&&e>0&&Number.isSafeInteger(Math.round(864e5*e))&&864e5*e<=Number.MAX_SAFE_INTEGER||t.push(`Policy ${n} validity.${i} must be a finite number of days greater than zero.`)}}},eC=function(e){let{errors:t,label:n,rule:i}=e,o=em(i,"privacySignals");if(void 0===o)return;if(!eg(o))return void t.push(`Policy ${n} privacySignals must be an object.`);ev(e,o,ei,"privacySignals");let r=em(o,"gpc");if(void 0===r)return;if(!eg(r))return void t.push(`Policy ${n} privacySignals.gpc must be an object.`);ev(e,r,eo,"privacySignals.gpc");let s=em(r,"denyCategories");if(!ey(s))return void t.push(`Policy ${n} privacySignals.gpc.denyCategories must be an array of category names.`);let a=ek(em(i,"categories")),c=new Set;for(let e of s){if("necessary"===e){t.push(`Policy ${n} privacySignals.gpc.denyCategories cannot deny "necessary".`);continue}if(!ec(e)){t.push(`Policy ${n} privacySignals.gpc.denyCategories has unknown category "${e}".`);continue}if(c.has(e)){t.push(`Policy ${n} privacySignals.gpc.denyCategories repeats "${e}".`);continue}c.add(e),a.includes(e)||t.push(`Policy ${n} privacySignals.gpc.denyCategories "${e}" is outside the policy scope.`)}},eP=function(e,t,n,i){let{errors:o,label:r,rule:s}=e,a=em(s,t);if(void 0!==a){if(!eg(a))return void o.push(`Policy ${r} ${t} must be an object.`);for(let s of(ev(e,a,n,t),n)){let e=em(a,s);void 0!==e&&typeof e!==i&&o.push(`Policy ${r} ${t}.${s} must be a ${i}.`)}}},eO=function(e){let{errors:t,label:n,rule:i}=e,o=em(i,"review");if(void 0===o)return;if(!eg(o))return void t.push(`Policy ${n} review must be an object.`);ev(e,o,ea,"review");let r=em(o,"status");for(let e of("pending"!==r&&"reviewed"!==r&&t.push(`Policy ${n} review.status must be "pending" or "reviewed".`),["reviewedOn","reviewBy"])){let i=em(o,e);void 0!==i&&"string"!=typeof i&&t.push(`Policy ${n} review.${e} must be a string.`)}for(let e of["sources","assumptions"]){let i=em(o,e);void 0===i||ey(i)||t.push(`Policy ${n} review.${e} must be an array of strings.`)}},ex=function(e){let{errors:t,label:n,rule:i}=e,o=em(i,"copyRevision");void 0!==o&&"string"!=typeof o&&t.push(`Policy ${n} copyRevision must be a string.`),eP(e,"i18n",er,"string"),eP(e,"proof",es,"boolean"),eO(e);let r=em(e.rule,"legacyMaterial");void 0===r||(e=>{if(!R(e)||!E(e,["input","policyFingerprint"])||"string"!=typeof e.policyFingerprint||!e.policyFingerprint)return!1;let{input:t}=e;return R(t)&&E(t,["model","consent","proof","ui"])&&"string"==typeof t.model&&["opt-in","opt-out","iab","none"].includes(t.model)&&L(t.consent,_)&&L(t.proof,N)&&L(t.ui,F)})(r)||e.errors.push(`Policy ${e.label} legacyMaterial must contain a frozen input and policyFingerprint.`)},eD=function(e,t){let{errors:n,label:i}=e;if(void 0!==t){if(!Array.isArray(t))return void n.push(`Policy ${i} match.regions must be an array.`);t.forEach((t,o)=>{if(!eg(t))return void n.push(`Policy ${i} match.regions[${o}] must be an object.`);for(let r of(ev(e,t,et,`match.regions[${o}]`),et)){let e=em(t,r);"string"==typeof e&&e.trim()||n.push(`Policy ${i} match.regions[${o}].${r} must be a non-empty string.`)}})}},e$=function(e){let t=em(e,"countries"),n=em(e,"regions"),i=em(e,"regionFallbacks");return Array.isArray(t)&&t.length>0||Array.isArray(n)&&n.length>0||Array.isArray(i)&&i.length>0},eR=function(e){let{errors:t,label:n,rule:i}=e,o=em(i,"match");if(!eg(o))return void t.push(`Policy ${n} is missing the required 'match' object.`);for(let i of(ev(e,o,ee,"match"),["countries","regionFallbacks"])){let e=em(o,i);void 0!==e&&(ey(e)?e.some(e=>!e.trim())&&t.push(`Policy ${n} match.${i} cannot contain empty codes.`):t.push(`Policy ${n} match.${i} must be an array of strings.`))}for(let i of(eD(e,em(o,"regions")),["isDefault","fallback"])){let e=em(o,i);void 0!==e&&"boolean"!=typeof e&&t.push(`Policy ${n} match.${i} must be a boolean.`)}!0===em(o,"isDefault")||!0===em(o,"fallback")||e$(o)||t.push(`Policy ${n} has no matcher. Add countries or regions, or set match.isDefault=true.`)},eE=function(e,t){if(!eg(e))return[`Policy at index ${t} must be a plain object.`];let n=em(e,"id"),i=eh(n,t),o={errors:[],label:i,rule:e};return ev(o,e,Z,"rule"),"string"==typeof n&&n.trim()||o.errors.push(`Policy ${i} is missing a non-empty id.`),eR(o),eb(o),eA(o),eI(o),ej(o),eS(o),eC(o),ex(o),o.errors},eT=function(e){let t=em(e,"match");return eg(t)?t:{}},eL=function(e,t){let n=[];e.filter(e=>!0===em(eT(e),"isDefault")).length>1&&n.push("Only one default policy is allowed"),e.filter(e=>!0===em(eT(e),"fallback")).length>1&&n.push("Only one fallback policy is allowed"),e.some(e=>"iab"===em(e,"model"))&&t&&!0!==t.iabEnabled&&n.push('Policies using model="iab" require top-level iab.enabled=true');let i=new Map;return e.forEach((e,t)=>{let o=em(e,"id"),r="string"==typeof o?o.trim():"";if(!r)return;let s=i.get(r);void 0===s?i.set(r,t):n.push(`Policy IDs must be unique. Duplicate id '${r}' found at indexes ${s} and ${t}.`)}),n},eM=function(e,t){let n=new Map,i=new Map;e.forEach((e,o)=>{let r=eT(e),s=em(e,"id"),a="string"==typeof s&&s.trim()?s.trim():`policy_index_${o}`,c=em(r,"countries");if(ey(c))for(let e of c){let i=e.trim().toUpperCase(),o=n.get(i);o?t.add(`Country matcher '${i}' appears in multiple policies (${o} and '${a}'). First match wins by array order.`):n.set(i,`'${a}'`)}let l=em(r,"regions");if(Array.isArray(l))for(let e of l){if(!eg(e))continue;let n=em(e,"country"),o=em(e,"region");if("string"!=typeof n||"string"!=typeof o)continue;let r=`${n.trim().toUpperCase()}-${o.trim().toUpperCase()}`,s=i.get(r);s?t.add(`Region matcher '${r}' appears in multiple policies (${s} and '${a}'). First match wins by array order.`):i.set(r,`'${a}'`)}})},eU=function(e){if(0===e.length)return[];let t=new Set,n=e.map(e=>eT(e));return n.some(e=>!0===em(e,"isDefault"))||t.add("No default policy configured. Requests that do not match region/country resolve to no-match and use the safe opt-in choice fallback."),n.some(e=>!0===em(e,"fallback"))||t.add("No fallback policy configured. If geo-location fails, resolution fails and uses the safe opt-in choice fallback. Mark a strict policy with match.fallback=true."),e.forEach((e,i)=>{let o=n[i]??{};!0===em(o,"isDefault")&&e$(o)&&t.add(`Policy ${eh(em(e,"id"),i)} is marked as default and also defines explicit matchers. Explicit matchers are ignored for default resolution.`)}),eM(e,t),[...t]},eq=function(e,t){if(!Array.isArray(e))return{errors:["Policy rules must be an array of policy objects."],warnings:[]};let n=e.flatMap((e,t)=>eE(e,t)),i=e.filter(eg);return i.length===e.length&&n.push(...eL(i,t)),{errors:n,warnings:eU(i)}},e_=function(e,t){return"choice"===e?{allowed:ef([...t?[...t]:["accept","reject","customize"],"accept","reject"]),equivalent:[["accept","reject"]],required:["accept","reject"]}:"notice"===e?{allowed:["dismiss"],equivalent:[],required:["dismiss"]}:{allowed:[],equivalent:[],required:[]}},eN=function(e){if("none"===e)return[];let t=["disclosure","preferences"];return"opt-out"===e&&t.push("opt-out"),ef(t)},eF=function(e){if(e.i18n&&(e.i18n.language||e.i18n.messageProfile))return{...e.i18n.language&&{language:e.i18n.language},...e.i18n.messageProfile&&{messageProfile:e.i18n.messageProfile}}},eB=function(e,t){let n=new Set(e),i=new Set(t);return n.size===i.size&&[...n].every(e=>i.has(e))},ez=function(e){return new Set(e).size!==e.length},eG=function(e){let t=[],n=e_(e.prompt),{allowed:i,equivalent:o,required:r}=e.actions;return(ez(i)||ez(r))&&t.push("actions must not repeat an action"),eB(r,n.required)||t.push(`prompt "${e.prompt}" requires actions [${n.required.join(", ")}]`),r.every(e=>i.includes(e))||t.push("actions.allowed must include every required action"),"choice"===e.prompt?(i.every(e=>X.has(e))||t.push("choice prompts allow only accept, reject and customize"),1===o.length&&eB(o[0]??[],["accept","reject"])||t.push("choice prompts require the accept/reject equivalence group")):(eB(i,n.allowed)||t.push(`prompt "${e.prompt}" allows actions [${n.allowed.join(", ")}]`),0!==o.length&&t.push(`prompt "${e.prompt}" has no equivalence groups`)),t},eV=function(e){return Number.isFinite(e)&&e>0&&e<=Number.MAX_SAFE_INTEGER},eH=function(e){let t=[];e.id.trim()||t.push("id must be a non-empty string"),ep(e.model,e.prompt)||t.push(`model "${e.model}" does not allow prompt "${e.prompt}"`),ez(e.scope)&&t.push("scope must not repeat a category"),ez(e.preselectedCategories)&&t.push("preselectedCategories must not repeat a category"),("iab"===e.model||"none"===e.model)&&e.preselectedCategories.length>0&&t.push(`${e.model} rules cannot preselect categories`),e.preselectedCategories.every(t=>e.scope.includes(t))||t.push("preselectedCategories must be inside scope"),t.push(...eG(e)),ez(e.rights)&&t.push("rights must not repeat a right");let n=eN(e.model);n.every(t=>e.rights.includes(t))||t.push(`model "${e.model}" requires rights [${n.join(", ")}]`),eV(e.validity.choiceMs)&&eV(e.validity.noticeMs)||t.push("validity must be finite, positive and within the safe range");let i=e.privacySignals.gpc.denyCategories;return ez(i)&&t.push("privacySignals.gpc.denyCategories must not repeat a category"),i.every(t=>e.scope.includes(t))||t.push("privacySignals.gpc.denyCategories must be inside scope"),null===e.copyRevision||e.copyRevision.trim()||t.push("copyRevision must be null or a non-empty string"),t},eW=function(e){let t=eE(e,0);if(t.length>0)throw TypeError(t[0]);let n=e.copyRevision?.trim()||null,i=eF(e),o={actions:e_(e.prompt,e.actions),copyRevision:n,id:e.id.trim(),model:e.model,preselectedCategories:"iab"!==e.model&&"none"!==e.model&&e.preselectedCategories?ef(e.preselectedCategories.map(e=>e.trim()).filter(ec)):[],privacySignals:{gpc:{denyCategories:ef((e.privacySignals?.gpc?.denyCategories??[]).filter(ec))}},prompt:e.prompt,proof:{storeIp:e.proof?.storeIp===!0,storeLanguage:e.proof?.storeLanguage===!0,storeUserAgent:e.proof?.storeUserAgent===!0},rights:ef([...eN(e.model),...e.rights??[]]),scope:ek(e.categories),scopeMode:e.scopeMode??"permissive",validity:{choiceMs:(e.validity?.choiceDays??365)*864e5,noticeMs:(e.validity?.noticeDays??365)*864e5}};i&&(o.i18n=i);let r=eH(o);if(r.length>0)throw TypeError(`Policy '${o.id}': ${r[0]}`);return o},eJ=function e(t){if(null===t||"object"!=typeof t)return JSON.stringify(t);if(Array.isArray(t))return`[${t.map(t=>e(t)).join(",")}]`;let n=Object.entries(t).filter(([,e])=>void 0!==e).sort(([e],[t])=>e.localeCompare(t));return`{${n.map(([t,n])=>`${JSON.stringify(t)}:${e(n)}`).join(",")}}`},eK=function(e){let t=new TextEncoder().encode(e),n=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),i=8*t.length,o=64*Math.ceil((t.length+9)/64),r=new Uint8Array(o);r.set(t),r[t.length]=128;let s=new DataView(r.buffer);s.setUint32(o-8,Math.floor(i/0x100000000),!1),s.setUint32(o-4,i%0x100000000,!1);let a=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),c=new Uint32Array(64),l=e=>e>>>0,u=(e,t)=>e>>>t,d=(e,t)=>e>>>t|e<<32-t,p=(e,t)=>e&t,f=(e,t,n=0)=>(e^t^n)>>>0,g=(e,t)=>{let n=e[t];if(void 0===n)throw RangeError(`SHA-256 word ${t} is out of bounds`);return n};for(let e=0;e<o;e+=64){for(let t=0;t<16;t+=1)c[t]=s.getUint32(e+4*t,!1);for(let e=16;e<64;e+=1){let t=g(c,e-15),n=g(c,e-2),i=f(d(t,7),d(t,18),u(t,3)),o=f(d(n,17),d(n,19),u(n,10));c[e]=l(g(c,e-16)+i+g(c,e-7)+o)}let t=g(a,0),i=g(a,1),o=g(a,2),r=g(a,3),m=g(a,4),y=g(a,5),h=g(a,6),v=g(a,7);for(let e=0;e<64;e+=1){let s=l(v+f(d(m,6),d(m,11),d(m,25))+f(p(m,y),p(0xffffffff-m,h))+g(n,e)+g(c,e)),a=l(f(d(t,2),d(t,13),d(t,22))+f(p(t,i),p(t,o),p(i,o)));v=h,h=y,y=m,m=l(r+s),r=o,o=i,i=t,t=l(s+a)}a[0]=l(g(a,0)+t),a[1]=l(g(a,1)+i),a[2]=l(g(a,2)+o),a[3]=l(g(a,3)+r),a[4]=l(g(a,4)+m),a[5]=l(g(a,5)+y),a[6]=l(g(a,6)+h),a[7]=l(g(a,7)+v)}return Array.from(a).map(e=>e.toString(16).padStart(8,"0")).join("")},eY=function(e){return eK(eJ(e))},eX=function(e){return eY({consent:e.consent?{categories:e.consent.categories,expiryDays:e.consent.expiryDays,gpc:e.consent.gpc,preselectedCategories:e.consent.preselectedCategories,scopeMode:e.consent.scopeMode}:void 0,model:e.model,proof:e.proof?{storeIp:e.proof.storeIp,storeLanguage:e.proof.storeLanguage,storeUserAgent:e.proof.storeUserAgent}:void 0,ui:e.ui?{banner:e.ui.banner?{allowedActions:e.ui.banner.allowedActions,direction:e.ui.banner.direction,layout:e.ui.banner.layout,primaryActions:e.ui.banner.primaryActions}:void 0,dialog:e.ui.dialog?{allowedActions:e.ui.dialog.allowedActions,direction:e.ui.dialog.direction,layout:e.ui.dialog.layout,primaryActions:e.ui.dialog.primaryActions}:void 0,mode:e.ui.mode}:void 0})},eQ=function(e,t){var n;let i=eY({actions:{allowed:ef((n=e).actions.allowed),equivalent:n.actions.equivalent.map(e=>ef(e)).sort((e,t)=>e.join(",").localeCompare(t.join(","))),required:ef(n.actions.required)},copyRevision:n.copyRevision,domain:"policy",model:n.model,preselectedCategories:ef(n.preselectedCategories),privacySignals:{gpc:{denyCategories:ef(n.privacySignals.gpc.denyCategories)}},prompt:n.prompt,proof:{storeIp:n.proof.storeIp,storeLanguage:n.proof.storeLanguage,storeUserAgent:n.proof.storeUserAgent},rights:ef(n.rights),scope:ef(n.scope),scopeMode:n.scopeMode,validity:{choiceMs:n.validity.choiceMs,noticeMs:n.validity.noticeMs},version:1});return{choice:eY({copyRevision:e.copyRevision,domain:"choice",model:e.model,privacySignals:{gpc:{denyCategories:ef(e.privacySignals.gpc.denyCategories)}},prompt:e.prompt,requiredActions:ef(e.actions.required),rights:ef(e.rights),scope:ef(e.scope),scopeMode:e.scopeMode,validityMs:e.validity.choiceMs,version:1}),notice:eY({copyRevision:e.copyRevision,domain:"notice",model:e.model,privacySignals:{gpc:{denyCategories:ef(e.privacySignals.gpc.denyCategories)}},prompt:e.prompt,requiredActions:ef(e.actions.required),rights:ef(e.rights),scope:ef(e.scope),scopeMode:e.scopeMode,validityMs:e.validity.noticeMs,version:1}),policy:i,...t&&{legacyMaterial:i===t.policyFingerprint?eX(t.input):`policy-changed:${i}`}}},eZ=function(e){return"string"!=typeof e?null:e.trim().toUpperCase()||null},e0=function(e){return"string"!=typeof e?null:(e.includes("-")?e.split("-").pop():e)?.trim().toUpperCase()||null},e1=function(e,t){let n=e.findIndex(e=>e.match.regionFallbacks?.some(e=>eZ(e)===t));if(-1!==n)return{index:n,matchedBy:"fallback",status:"matched"};if(!e.some(e=>e.match.regions?.some(e=>eZ(e.country)===t)))return null;let i=e.findIndex(e=>!0===e.match.fallback);return -1===i?{status:"insufficient-inputs"}:{index:i,matchedBy:"fallback",status:"matched"}},e2=function(e){let{entries:t}=e,n=eZ(e.countryCode),i=e0(e.regionCode);if(n&&i){let e=t.findIndex(e=>(e.match.regions??[]).some(e=>eZ(e.country)===n&&e0(e.region)===i));if(-1!==e)return{index:e,matchedBy:"region",status:"matched"}}if(n){let e=t.findIndex(e=>(e.match.countries??[]).some(e=>eZ(e)===n));if(-1!==e)return{index:e,matchedBy:"country",status:"matched"};if(!i){let e=e1(t,n);if(e)return e}}let o=t.findIndex(e=>!0===e.match.fallback),r=t.findIndex(e=>!0===e.match.isDefault);return n||-1===o?-1!==r?{index:r,matchedBy:"default",status:"matched"}:n?{status:"no-match"}:{status:"insufficient-inputs"}:{index:o,matchedBy:"fallback",status:"matched"}},e5={policy:null,reason:"invalid-configuration",status:"failed"},e3=function(e){if(void 0===e.rules)return{policy:null,status:"unconfigured"};let{errors:t}=eq(e.rules,void 0===e.iabEnabled?void 0:{iabEnabled:e.iabEnabled});if(t.length>0||!Array.isArray(e.rules))return e5;let n=e.rules;if(0===n.length)return{policy:null,status:"no-match"};try{let t=e2({countryCode:e.countryCode,entries:n,regionCode:e.regionCode});if("insufficient-inputs"===t.status)return{policy:null,reason:"insufficient-inputs",status:"failed"};if("no-match"===t.status)return{policy:null,status:"no-match"};let i=n[t.index];if(!i)return e5;let o=eW(i);return{fingerprints:eQ(o,i.legacyMaterial),matchedBy:t.matchedBy,policy:o,policyId:o.id,status:"matched"}}catch{return e5}},e6=function(e){return{...e,version:1}},e8=new Set(["region","country","default","fallback"]),e4=new Set(["invalid-configuration","insufficient-inputs","transport","unsupported-contract","invalid-payload"]),e7=new Set(["accept","reject","customize","dismiss"]),e9=["version","status","policy","reason","policyId","matchedBy","fingerprints"],te=["id","model","prompt","scope","scopeMode","preselectedCategories","actions","rights","validity","privacySignals","copyRevision","i18n","proof"],tt=["allowed","required","equivalent"],tn=["choiceMs","noticeMs"],ti=["gpc"],to=["denyCategories"],tr=["storeIp","storeUserAgent","storeLanguage"],ts=["language","messageProfile"],ta=["policy","choice","notice","legacyMaterial"];class tc extends Error{constructor(e,t){var n,i;super(t),i=void 0,(n="reason")in this?Object.defineProperty(this,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):this[n]=i,this.name="WireProblem",this.reason=e}}let tl=function(e){return new tc("invalid-payload",e)},tu=function(e){return new tc("unsupported-contract",e)},td=function(e,t){return Object.hasOwn(e,t)?e[t]:void 0},tp=function(e,t,n){if(!eg(e))throw tl(`${t} must be a plain object`);for(let i of Object.getOwnPropertyNames(e))if(!n.includes(i))throw tu(`${t} has unknown field "${i}"`);return e},tf=function(e,t,n){if(!Array.isArray(e))throw tl(`${t} must be an array`);let i=[];for(let o of e){if("string"!=typeof o)throw tl(`${t} must contain strings`);if(!n(o))throw tu(`${t} has unknown value "${o}"`);if(i.includes(o))throw tl(`${t} repeats "${o}"`);i.push(o)}return i.sort((e,t)=>e.localeCompare(t))},tg=function(e){return e7.has(e)},tm=function(e){return ed(e)},ty=function(e){return ec(e)},th=function(e,t){if("number"!=typeof e||!Number.isFinite(e)||e<=0||e>Number.MAX_SAFE_INTEGER)throw tl(`${t} must be a positive number within the safe range`);return e},tv=function(e,t){if("boolean"!=typeof e)throw tl(`${t} must be a boolean`);return e},tb=function(e,t){if(void 0!==e){if("string"!=typeof e)throw tl(`${t} must be a string`);return e}},tw=function(e){let t=td(e,"model"),n=td(e,"prompt"),i=td(e,"scopeMode");if(!el(t))throw tu(`policy.model "${String(t)}" is not supported`);if(!eu(n))throw tu(`policy.prompt "${String(n)}" is not supported`);if("strict"!==i&&"permissive"!==i)throw tu(`policy.scopeMode "${String(i)}" is not supported`);return{model:t,prompt:n,scopeMode:i}},tk=function(e){let t=tp(e,"policy.actions",tt),n=td(t,"equivalent");if(!Array.isArray(n))throw tl("policy.actions.equivalent must be an array");return{allowed:tf(td(t,"allowed"),"policy.actions.allowed",tg),equivalent:n.map((e,t)=>tf(e,`policy.actions.equivalent[${t}]`,tg)),required:tf(td(t,"required"),"policy.actions.required",tg)}},tA=function(e){let t=tp(e,"policy.validity",tn);return{choiceMs:th(td(t,"choiceMs"),"policy.validity.choiceMs"),noticeMs:th(td(t,"noticeMs"),"policy.validity.noticeMs")}},tI=function(e){let t=tp(e,"policy.proof",tr);return{storeIp:tv(td(t,"storeIp"),"policy.proof.storeIp"),storeLanguage:tv(td(t,"storeLanguage"),"policy.proof.storeLanguage"),storeUserAgent:tv(td(t,"storeUserAgent"),"policy.proof.storeUserAgent")}},tj=function(e){let t=tp(e,"policy.privacySignals",ti),n=tp(td(t,"gpc"),"policy.privacySignals.gpc",to);return{gpc:{denyCategories:tf(td(n,"denyCategories"),"policy.privacySignals.gpc.denyCategories",ty)}}},tS=function(e){if(void 0===e)return;let t=tp(e,"policy.i18n",ts),n=tb(td(t,"language"),"policy.i18n.language"),i=tb(td(t,"messageProfile"),"policy.i18n.messageProfile");return{...void 0!==n&&{language:n},...void 0!==i&&{messageProfile:i}}},tC=function(e){let t=tp(e,"policy",te),n=td(t,"id");if("string"!=typeof n||!n.trim())throw tl("policy.id must be a non-empty string");let i=td(t,"copyRevision");if(null!==i&&"string"!=typeof i)throw tl("policy.copyRevision must be a string or null");let o={...tw(t),actions:tk(td(t,"actions")),copyRevision:i,id:n,preselectedCategories:tf(td(t,"preselectedCategories"),"policy.preselectedCategories",ty),privacySignals:tj(td(t,"privacySignals")),proof:tI(td(t,"proof")),rights:tf(td(t,"rights"),"policy.rights",tm),scope:tf(td(t,"scope"),"policy.scope",ty),validity:tA(td(t,"validity"))},r=tS(td(t,"i18n"));r&&(o.i18n=r);let s=eH(o);if(s.length>0)throw tl(`policy: ${s[0]}`);return o},tP=function(e){let t=tp(e,"fingerprints",ta),n=function(e){let n=td(t,e);if("string"!=typeof n||!n)throw tl(`fingerprints.${e} must be a non-empty string`);return n},i=tb(td(t,"legacyMaterial"),"fingerprints.legacyMaterial");return{choice:n("choice"),notice:n("notice"),policy:n("policy"),...void 0!==i&&{legacyMaterial:i}}},tO=function(e){let t=td(e,"policyId"),n=td(e,"matchedBy");if("string"!=typeof t||!t)throw tl("policyId must be a non-empty string");if("string"!=typeof n||!e8.has(n))throw tu(`matchedBy "${String(n)}" is not supported`);let i=tC(td(e,"policy"));if(i.id!==t)throw tl("policyId must equal policy.id");return{fingerprints:tP(td(e,"fingerprints")),matchedBy:n,policy:i,policyId:t,status:"matched"}},tx=function(e){let t=tp(e,"policyResolution",e9);if(!Object.hasOwn(t,"version"))throw tl("policyResolution.version is required");if(1!==td(t,"version"))throw tu(`policy contract version ${String(td(t,"version"))} is not supported`);let n=td(t,"status"),i=td(t,"policy");switch(n){case"unconfigured":case"no-match":if(null!==i)throw tl(`policy must be null when status is "${n}"`);return{policy:null,status:n};case"failed":{let e=td(t,"reason");if(null!==i)throw tl('policy must be null when status is "failed"');if("string"!=typeof e||!e4.has(e))throw tu(`failure reason "${String(e)}" is not supported`);return{policy:null,reason:e,status:"failed"}}case"matched":return tO(t);default:throw tu(`status "${String(n)}" is not supported`)}},tD=function(e){try{return tx(e)}catch(e){if(e instanceof tc)return{policy:null,reason:e.reason,status:"failed"};return{policy:null,reason:"invalid-payload",status:"failed"}}},t$={policy:null,reason:"invalid-payload",status:"failed"},tR={policy:null,reason:"unsupported-contract",status:"failed"},tE=function(e){let t={language:e.translations.language};return e.location.countryCode&&(t.country=e.location.countryCode),e.location.regionCode&&(t.region=e.location.regionCode),t},tT=function(e){let t=e["sec-gpc"];return"1"===t?{gpc:!0}:"0"===t?{gpc:!1}:void 0},tL=function(e,t={}){let n=t.producerContract;return void 0!==n&&1!==n?e6(tR):void 0!==e.policyResolution?e.policyResolution:void 0!==n?e6(t$):e6(tR)},tM=function(e,t,n={}){var i;let o={gvl:e.gvl??null,gvlReference:e.gvlReference,location:e.location,policyResolution:tL(e,n),resolvedOverrides:{...tE(e),...e.resolvedOverrides??{}},translations:e.translations},r=t["x-c15t-gpc"];("1"===r||"0"===r)&&(o.resolvedOverrides={...o.resolvedOverrides,gpc:"1"===r});let s=tT(t)??e.resolvedPrivacySignals;s&&(o.resolvedPrivacySignals=s);let a="none"===(i=e.branding)?void 0:i;return void 0!==a&&(o.branding=a),void 0!==e.policySnapshotToken&&(o.policySnapshotToken=e.policySnapshotToken),void 0!==e.customVendors&&(o.customVendors=e.customVendors),void 0!==e.cmpId&&(o.cmpId=e.cmpId),void 0!==e.subjectId&&null!==e.subjectId&&(o.subjectId=e.subjectId),o},tU=["functionality","experience","measurement","marketing"],tq=function(e){let{choice:t,confirmed:n}=e;if(!t||!n)return;let i={},o=!1;for(let e of Object.keys(n.categories)){let n=t.categories[e];void 0!==n&&(i[e]={basis:"choice-v1"===n.basis.kind?{fingerprint:n.basis.fingerprint,kind:"choice-v1"}:{kind:"legacy-v2",...void 0!==n.basis.materialFingerprint&&{materialFingerprint:n.basis.materialFingerprint}},confirmedAt:n.confirmedAt,value:n.value},o=!0)}return o?{categories:i,version:3}:void 0},t_=function(e){let t={necessary:!0};for(let n of tU){let i=e.categories[n];void 0!==i&&(t[n]=i.value)}return t},tN=function(e,t){let n=tq(e);return{consentAction:e.consentAction,domain:t.domain,externalSubjectId:e.user?.externalId,givenAt:e.confirmed.actionAt,identityProvider:e.user?.identityProvider,jurisdictionModel:e.model??void 0,metadata:e.user?.properties?{userProperties:e.user.properties}:void 0,policySnapshotToken:e.policySnapshotToken??void 0,preferences:t_(e.choice),subjectId:e.subjectId,tcString:e.tcString??void 0,type:"cookie_banner",uiSource:e.uiSource??void 0,...void 0!==n&&{choice:n}}},tF=new Set(tU),tB=function(e){return tF.has(e)},tz=function(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},tG=function(e){return Object.getOwnPropertyNames(e)},tV=function(e,t){return Object.hasOwn(e,t)?e[t]:void 0},tH=function(e,t){return"number"!=typeof e||!Number.isSafeInteger(e)||e<0||e>864e13?"invalid-timestamp":e>t?"future-timestamp":null},tW=function(e){return"string"==typeof e&&e.length>0},tJ=function(e,t,n){if(!tz(e))return n.push({code:"invalid-basis",path:t}),null;let i=tV(e,"kind");if("choice-v1"===i){let o=tV(e,"fingerprint");return tW(o)?{fingerprint:o,kind:i}:(n.push({code:"invalid-fingerprint",path:`${t}.fingerprint`}),null)}if("legacy-v2"===i){let o=tV(e,"materialFingerprint");return void 0===o?{kind:i}:tW(o)?{kind:i,materialFingerprint:o}:(n.push({code:"invalid-fingerprint",path:`${t}.materialFingerprint`}),null)}return n.push({code:"invalid-basis",path:`${t}.kind`}),null},tK=function(e,t,n,i){if(!tz(e))return i.push({code:"not-an-object",path:t}),null;let o=tV(e,"value");"boolean"!=typeof o&&i.push({code:"invalid-boolean",path:`${t}.value`});let r=tV(e,"confirmedAt"),s=tH(r,n);s&&i.push({code:s,path:`${t}.confirmedAt`});let a=tJ(tV(e,"basis"),`${t}.basis`,i);return"boolean"!=typeof o||"number"!=typeof r||s||!a?null:{basis:a,confirmedAt:r,value:o}},tY=function(e,t){let n=[];if(!tz(e))return{issues:[{code:"not-an-object",path:""}],ok:!1};if(3!==tV(e,"version"))return{issues:[{code:"unsupported-version",path:"version"}],ok:!1};let i=tV(e,"categories");if(!tz(i))return{issues:[{code:"not-an-object",path:"categories"}],ok:!1};let o={};for(let e of tG(i)){if(!tB(e)){n.push({code:"unknown-key",path:`categories.${e}`});continue}let r=tK(i[e],`categories.${e}`,t,n);r&&(o[e]=r)}return n.length>0?{issues:n,ok:!1}:{ok:!0,record:{categories:o,version:3}}},tX=function(e,t){if(!tz(e))return{issues:[{code:"not-an-object",path:""}],ok:!1};if(1!==tV(e,"version"))return{issues:[{code:"unsupported-version",path:"version"}],ok:!1};let n=[],i=tV(e,"dismissedAt"),o=tV(e,"fingerprint"),r=tH(i,t);return(r&&n.push({code:r,path:"dismissedAt"}),tW(o)||n.push({code:"invalid-fingerprint",path:"fingerprint"}),n.length>0)?{issues:n,ok:!1}:{ok:!0,record:{dismissedAt:i,fingerprint:o,version:1}}},tQ="cookie_banner",tZ=e=>{let{choice:t}=e;return void 0===t?{kind:"absent"}:null===t||"object"!=typeof t||3!==t.version||"object"!=typeof t.categories||null===t.categories?{kind:"unreadable"}:{categories:t.categories,kind:"receipts"}},t0=e=>e instanceof Date?e.getTime():new Date(e).getTime(),t1=e=>{if(e.type!==tQ||void 0===e.preferences)return;let t=t0(e.givenAt),n={};for(let i of tU)!0===e.preferences[i]&&(n[i]={basis:{kind:"legacy-v2"},confirmedAt:t,value:!0});return n},t2=(e,t)=>{if("gpc"!==e.source||tH(e.recordedAt,t))return;let n=[];for(let t of e.categories){if(!tB(t)||n.includes(t))return;n.push(t)}if(0!==n.length)return{categories:n.sort((e,t)=>e.localeCompare(t)),recordedAt:e.recordedAt,source:"gpc"}},t5=function(e,t){var n;let i,o=void 0===e.subjectChoice?(e=>{let t=new Map;for(let n of[...e].sort((e,t)=>t0(e.givenAt)-t0(t.givenAt))){if(n.type!==tQ)continue;let e=tZ(n);if("unreadable"===e.kind)return null;if("absent"===e.kind)for(let e of tU){let i=t.get(e);i?.value&&i.confirmedAt<=t0(n.givenAt)&&t.delete(e)}let i="receipts"===e.kind?e.categories:t1(n);if(i)for(let e of tU){let n=i[e];if(!n)continue;let o=t.get(e);(void 0===o||n.confirmedAt>=o.confirmedAt)&&t.set(e,n)}}return t.size>0?{categories:Object.fromEntries(t),version:3}:void 0})(e.consents):e.subjectChoice,r=o?tY(o,t.now):void 0,s=[];for(let n of e.privacyDirectives??[]){let e=t2(n,t.now);e&&s.push(e)}return{choice:r?.ok?r.record:null,now:t.now,optOutDirectives:s,subject:(i={subjectId:(n=e.subject).id},"string"==typeof n.externalId&&n.externalId&&(i.externalId=n.externalId,"string"==typeof n.identityProvider&&n.identityProvider&&(i.identityProvider=n.identityProvider)),i)}},t3=function(e){if("object"!=typeof e||null===e||Array.isArray(e))return;let{subject:t,consents:n}=e;if("object"!=typeof t||null===t||"string"!=typeof t.id||!Array.isArray(n))return;let i=e=>e instanceof Date?e:"string"==typeof e||"number"==typeof e?new Date(e):void 0,o=[];for(let e of n){if("object"!=typeof e||null===e)continue;let t=i(e.givenAt);t&&"string"==typeof e.id&&"string"==typeof e.type&&o.push({...e,givenAt:t,isLatestPolicy:!0===e.isLatestPolicy,policyEffectiveDate:i(e.policyEffectiveDate)})}return{...e,consents:o,subject:{...t,createdAt:i(t.createdAt)}}},t6="3.0.0-alpha.0",t8="x-c15t-policy-contract",t4={...{"x-c15t-version":t6},[t8]:String(1)},t7=function(e){let t=e?.get(t8);if(null==t)return;let n=t.trim();return/^\d+$/u.test(n)?Number.parseInt(n,10):null},t9=function(e,t){if(t)return t;if("u">typeof window&&window.location?.hostname)return window.location.hostname;try{return new URL(e).hostname}catch{return"localhost"}},ne=new Set(m),nt=function(e){let t={};if(!e)return t;for(let[n,i]of Object.entries(e)){let e=n.toLowerCase();ne.has(e)&&(t[e]=i)}return t},nn=function(e){let t="object"==typeof e&&null!==e&&"string"==typeof e.subjectId?e.subjectId:void 0;return void 0===t?{ok:!0}:{ok:!0,subjectId:t}},ni=function(e){var t;let n,i,o=(t=e.backendURL).endsWith("/")?t.slice(0,-1):t,r=e.initURL??`${o}/init`,s=e.fetch??globalThis.fetch?.bind(globalThis);if(!s)throw Error("createHostedTransport: no fetch available. Pass `fetch` in options.");let a=nt(e.headers),c=e.credentials??"include",l=t9(o,e.domain),u=e.now??Date.now,d=e.assertDecisionInputs?e.decisionInputs:void 0,p={accept:"application/json","content-type":"application/json",...t4},f=e=>`${o}/subjects/${encodeURIComponent(e)}`,g=async function(e,t){let n=await s(f(t),{body:JSON.stringify({externalId:e.externalId,identityProvider:e.identityProvider}),credentials:c,headers:p,method:"PATCH"});if(!n.ok)throw Error(`c15t hosted transport: /subjects/:id responded ${n.status} ${n.statusText}`)},m=0,{initialData:y}=e,h=async t=>{var i,l,u,p;let f,g=m+=1;e.assertDecisionInputs&&d&&(n?(i=n,l=t.overrides,i.country!==l.country||i.region!==l.region||i.language!==l.language||i.gpc!==l.gpc):(u=d,(p=t.overrides)&&(void 0!==p.country&&p.country!==u.country||void 0!==p.region&&p.region!==u.region||void 0!==p.gpc&&p.gpc!==u.gpc||void 0!==p.language&&O(p.language)!==O(u.language))))&&(d=void 0),n={...t.overrides};let h={...a,...A(t.overrides)},b=y;if(y=void 0,b?f=await b.catch(()=>void 0):e.initURL||(f=await (e=>{let t=P(e),n=C();if(!t||!n)return;let i=n[S];for(let[e,n]of Object.entries(i??{}))n===t&&i&&Reflect.deleteProperty(i,e);return t.promise})({backendURL:o,credentials:c,overrides:{...v(new Headers(h)),...t.overrides}})),f?.init){let t={...h},n=f.metadata?.requestContext?.gpc;void 0!==n&&(t["sec-gpc"]=n?"1":"0"),e.assertDecisionInputs&&g===m&&(d=x(f.init,$(t)));let i=new Headers;return"string"==typeof f.producerPolicyContract&&i.set("x-c15t-policy-contract",f.producerPolicyContract),tM(f.init,t,{producerContract:t7(i)})}let w=await s(r,{credentials:c,headers:{accept:"application/json",...t4,...h},method:"GET"});if(!w.ok)throw Error(`c15t hosted transport: /init responded ${w.status} ${w.statusText}`);let k=await w.json();return e.assertDecisionInputs&&g===m&&(d=x(k,$(h)??k.resolvedPrivacySignals?.gpc??k.resolvedOverrides?.gpc)),tM(k,h,{producerContract:t7(w.headers)})};return{async identify(e,t){t&&await g(e,t)},async init(e){let t=h(e);i=t;try{return await t}finally{i===t&&(i=void 0)}},async loadSubjectRecord(e){let t=await s(f(e),{credentials:c,headers:{accept:"application/json",...t4},method:"GET"});if(404===t.status)return null;if(!t.ok)throw Error(`c15t hosted transport: /subjects/:id responded ${t.status} ${t.statusText}`);let n=t3(await t.json());if(!n)throw Error("c15t hosted transport: /subjects/:id returned an unreadable record");return t5(n,{now:u()})},async recordPrivacyOptOut(e,t){if(!t)return;let n=await s(`${f(t)}/privacy-directives`,{body:JSON.stringify({categories:[...e.categories],recordedAt:e.recordedAt,source:e.source}),credentials:c,headers:p,method:"POST"});if(!n.ok)throw Error(`c15t hosted transport: /subjects/:id/privacy-directives responded ${n.status} ${n.statusText}`)},async save(t){if(e.assertDecisionInputs&&!t.policySnapshotToken&&!t.decisionInputs){let e=i;for(;e;)await e.catch(()=>void 0),e=i;if(!D(t,d))throw Error("c15t hosted transport: cannot save before init resolved a policy decision (assertDecisionInputs is set).")}let n=await s(`${o}/subjects`,{body:JSON.stringify({...tN(t,{domain:l}),...D(t,d)}),credentials:c,headers:p,method:"POST"});if(!n.ok)throw Error(`c15t hosted transport: /subjects responded ${n.status} ${n.statusText}`);return nn(await n.json())}}},no=function(e){return Object.assign(()=>ni({assertDecisionInputs:e.assertDecisionInputs,backendURL:e.url,decisionInputs:e.decisionInputs,domain:e.domain,fetch:e.fetch,headers:e.headers,initURL:e.initURL,initialData:e.initialData}),{kind:"hosted"})},nr=new Set(["hosted","offline","manifest"]),ns=new Set(["light","dark","system"]),na=function(e){if(!e)return;let t=e.split(",").map(e=>e.trim()).filter(Boolean);return t.length>0?t:void 0},nc=function(e,t){let n=e.getAttribute(t);return null!==n&&"false"!==n},nl=function(e){let t={},n=e.getAttribute("data-privacy-policy-url"),i=e.getAttribute("data-cookie-policy-url"),o=e.getAttribute("data-terms-url");return n&&(t.privacyPolicy={href:n}),i&&(t.cookiePolicy={href:i}),o&&(t.termsOfService={href:o}),Object.keys(t).length>0?t:void 0},nu=function(e){let t={},n=e.getAttribute("data-country"),i=e.getAttribute("data-region"),o=e.getAttribute("data-language");return n&&(t.country=n),i&&(t.region=i),o&&(t.language=o),Object.keys(t).length>0?t:void 0},nd=function(e){if(!e)return{};let t={},n=e.getAttribute("data-backend-url")??e.getAttribute("data-backend");n&&(t.backendURL=n);let i=e.getAttribute("data-mode");i&&nr.has(i)&&(t.mode=i);let o=e.getAttribute("data-manifest-url");o&&(t.manifestURL=o);let r=na(e.getAttribute("data-policy-rules"));r&&(t.policyRules=r);let s=na(e.getAttribute("data-categories"));s&&(t.consentCategories=s);let a=nu(e);a&&(t.overrides=a);let c=nl(e);if(c&&(t.legalLinks=c),nc(e,"data-no-ui"))return t.ui=!1,t;let l={},u={};c&&(u.legalLinks=Object.keys(c));let d=e.getAttribute("data-color-scheme");return d&&ns.has(d)&&(l.colorScheme=d),"false"===e.getAttribute("data-shadow")&&(l.shadow=!1),nc(e,"data-trigger")&&(l.trigger=!0),nc(e,"data-hide-branding")&&(u.hideBranding=!0),Object.keys(u).length>0&&(l.banner={...u},l.dialog={...u}),Object.keys(l).length>0&&(t.ui=l),t},np=function(e,t){if(!1===t||!1===e||!(e&&t))return t??e;let n={...e,...t};return"object"==typeof e.banner&&"object"==typeof t.banner&&(n.banner={...e.banner,...t.banner}),"object"==typeof e.dialog&&"object"==typeof t.dialog&&(n.dialog={...e.dialog,...t.dialog}),n},nf=function(e,t){let n={...e,...t,ui:np(e.ui,t.ui)};return void 0===n.ui&&delete n.ui,n},ng=function(e,t=[]){let n=t.reduce((e,t)=>nf(e,t),nd(e));return{manual:null!==e&&nc(e,"data-manual"),options:n}},nm={input:{consent:{expiryDays:365,gpc:!0,scopeMode:"permissive"},model:"opt-in",proof:{storeIp:!0,storeLanguage:!0,storeUserAgent:!0},ui:{banner:{allowedActions:["accept","reject","customize"],direction:"row",layout:[["reject","accept"],["customize"]],primaryActions:["customize"]},dialog:{allowedActions:["accept","reject","customize"],direction:"row",layout:[["reject","accept"],["customize"]],primaryActions:["customize"]},mode:"banner"}},policyFingerprint:"d53c71dde91e3b9600ef910f284726d8b9b5e5d97989b355e016d013b6a12b69"},ny={input:{consent:{expiryDays:365,gpc:!0,scopeMode:"permissive"},model:"opt-out",proof:{storeIp:!0,storeLanguage:!0,storeUserAgent:!0},ui:{mode:"none"}},policyFingerprint:"2add89cb0c497ef5bccaef815bae6277006e37bdc10d4d0e6b1f494aa754c087"},nh={input:{consent:{categories:["*"],expiryDays:365,scopeMode:"permissive"},model:"iab",proof:{storeIp:!0,storeLanguage:!0,storeUserAgent:!0}},policyFingerprint:"cbbf5d147ac468a745e188b4e4681e60a04debcbad2d0d5bc0fc618c31b06dae"},nv={input:{consent:{expiryDays:365,scopeMode:"permissive"},model:"opt-in",proof:{storeIp:!0,storeLanguage:!0,storeUserAgent:!0},ui:{banner:{allowedActions:["accept","reject","customize"],direction:"row",layout:[["reject","accept"],["customize"]],primaryActions:["customize"]},dialog:{allowedActions:["accept","reject","customize"],direction:"row",layout:[["reject","accept"],["customize"]],primaryActions:["customize"]},mode:"banner"}},policyFingerprint:"8aca68633714c54fb0a96eaee313aa415ae0a3137e56764cf629a20793b2f969"},nb={input:{consent:{expiryDays:365,scopeMode:"permissive"},model:"opt-in",proof:{storeIp:!0,storeLanguage:!0,storeUserAgent:!0},ui:{banner:{allowedActions:["accept","reject","customize"],direction:"row",layout:[["reject","accept"],["customize"]],primaryActions:["customize"]},dialog:{allowedActions:["accept","reject","customize"],direction:"row",layout:[["reject","accept"],["customize"]],primaryActions:["customize"]},mode:"banner"}},policyFingerprint:"8aca68633714c54fb0a96eaee313aa415ae0a3137e56764cf629a20793b2f969"},nw={input:{consent:{scopeMode:"permissive"},model:"none",proof:{storeIp:!1,storeLanguage:!1,storeUserAgent:!0},ui:{mode:"none"}},policyFingerprint:"92e599db3379c3b0a47db142ab9bc4d4a33e4b019ce2cd7a524528dee5fa93a4"},nk=function(e){if(e&&0!==e.length)return[...new Set(e)]},nA=["AX","GF","GP","MQ","MF","RE","YT","AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE"],nI=[...nA,"IS","LI","NO"],nj=["GB"],nS=function(e){return e.trim().toUpperCase()},nC=function(e){return{country:nS(e.country),region:e.region.trim().toUpperCase()}},nP=function(e,t){return nk([...e??[],...t.map(e=>nS(e))])??[]},nO=function(e,t){let n=[...e??[],...t.map(e=>nC(e))],i=new Set;return n.filter(e=>{var t,n;let o=(t=e.country,n=e.region,`${t}:${n}`);return!i.has(o)&&(i.add(o),!0)})},nx=function(e,t){t.isDefault&&(e.isDefault=!0),t.fallback&&(e.fallback=!0),t.countries?.length&&(e.countries=nP(e.countries,t.countries)),t.regionFallbacks?.length&&(e.regionFallbacks=nP(e.regionFallbacks,t.regionFallbacks)),t.regions?.length&&(e.regions=nO(e.regions,t.regions))},nD={countries:e=>({countries:nk(e.map(e=>nS(e)))??[]}),default:()=>({isDefault:!0}),eea:()=>({countries:[...nI]}),eu:()=>({countries:[...nA]}),fallback:()=>({fallback:!0}),iab:()=>nD.merge(nD.eea(),nD.uk()),merge(...e){let t={};for(let n of e)nx(t,n);return t},regionFallback:e=>({regionFallbacks:nP([],e)}),regions:e=>({regions:e.map(e=>nC(e))}),uk:()=>({countries:[...nj]})},n$="https://www.w3.org/TR/2026/WD-gpc-20260611/",nR="https://oag.ca.gov/privacy/ccpa",nE="https://ico.org.uk/for-organisations/direct-marketing-and-privacy-and-electronic-communications/guidance-on-the-use-of-storage-and-access-technologies/what-are-the-exceptions/",nT="PDPA sections 2 and 3 govern applicability: commercial transactions, establishment or use of equipment in Malaysia, and the exclusion for overseas processing unless intended for further processing in Malaysia. Visitor location alone neither establishes nor rules out applicability; override the matcher for the actual processing scope.",nL=["365-day choice and notice validity are independent c15t product defaults, not legal requirements.","A refusal in the requested scope suppresses automatic choice prompts, including after policy changes or grant expiry. New, changed or expired opt-in purposes remain denied until the user opens preferences and grants them.","Equivalent default prominence for accept and reject is a c15t product invariant.","The controller owns processing facts, legal basis, copy and legal review; this preset is starter configuration."],nM=function(e,t){return{assumptions:[...t,...nL],reviewBy:"2026-12-15",reviewedOn:"2026-09-08",sources:e,status:"reviewed"}},nU={storeIp:!0,storeLanguage:!0,storeUserAgent:!0},nq=function(e){let t="iab"===e;return{id:t?"europe_iab":"europe_opt_in",match:nD.merge(nD.iab(),nD.countries(["GI"]),nD.fallback()),model:e,prompt:"choice",proof:nU,review:nM([nE,"https://www.edpb.europa.eu/sites/default/files/files/file1/edpb_guidelines_202005_consent_en.pdf","https://www.gra.gi/uploads/documents/data-protection/Documents/Guidance/GN28%20Cookies.pdf"],t?["IAB TCF 2.3 only. No TCF 2.4 claim.","Covers consent-requiring processing in the EEA, UK and Gibraltar, including separately geocoded EU territories. National analytics exemptions need separate scoped configurations.","Used as the geo fallback so an unknown location gets the strictest configured behavior."]:["Optional categories stay denied until an explicit choice; consent is never inferred from inactivity.","Covers consent-requiring processing in the EEA, UK and Gibraltar, including separately geocoded EU territories. National analytics exemptions need separate scoped configurations.","Used as the geo fallback so an unknown location gets the strictest configured behavior."]),validity:{choiceDays:365}}},n_=function(e){let t="opt-out"===e,n={id:t?"california_opt_out":"california_opt_in",match:nD.regions([{country:"US",region:"CA"}]),model:e,privacySignals:{gpc:{denyCategories:["marketing","measurement"]}},prompt:t?"none":"choice",proof:nU,review:nM([nR,n$],["The referenced GPC specification is the W3C Working Draft of 11 June 2026, not a final Recommendation.","A user-enabled GPC signal is honored as an opt-out of sale and sharing; it never creates consent.","Mapping GPC to marketing and measurement is a conservative product default and must be checked against actual processing purposes. Not all measurement is sale or sharing.","Removing the browser signal is not a withdrawal of a recorded opt-out.",t?"No first-layer prompt. Disclosure, preferences and the opt-out right stay reachable without a visible banner.":"Opt-in is an optional deployment choice. It does not establish a general California opt-in mandate."]),validity:{choiceDays:365,noticeDays:365}};return t&&(n.rights=["preferences"]),n},nN=["CA","CO","CT","DE","FL","IA","IN","KY","MD","MN","MT","NE","NH","NJ","OR","RI","TN","TX","UT","VA"],nF=function(e,t){return{...nM(e,t),reviewBy:"2026-12-15",reviewedOn:"2026-09-08"}},nB=function(e,t,n,i){return{id:e,match:nD.countries([t]),model:"opt-in",prompt:"choice",review:nF(n,["Optional categories stay denied until an explicit choice. Use this workflow for consent-based processing; other lawful bases and exemptions need their own configuration.","This country matcher does not determine territorial scope, sensitive-data rules, child protections, recipient-specific consent or cross-border transfer requirements.",...i]),validity:{choiceDays:365}}},nz=function(e){let t="opt-out"===e;return{id:t?"us_privacy_states_opt_out":"us_privacy_states_opt_in",match:nD.regions(nN.map(e=>({country:"US",region:e}))),model:e,privacySignals:{gpc:{denyCategories:["marketing","measurement"]}},prompt:t?"none":"choice",review:nF([nR,"https://coag.gov/resources/colorado-privacy-act/","https://www.flsenate.gov/Laws/Statutes/2025/501.702","https://mgaleg.maryland.gov/mgawebsite/Laws/StatuteText?article=gcl§ion=14-4707&enactments=false","https://www.ag.ky.gov/about/Office-Divisions/ODP/KCDPA/Pages/default.aspx","https://www.in.gov/attorneygeneral/files/Consumer_Data-Bill-of-Rights.pdf","https://webserver.rilegislature.gov/Statutes/TITLE6/6-48.1/INDEX.htm","https://www.legis.la.gov/legis/BillInfo.aspx?b=SB386&s=26RS&sbi=y","https://legislature.vermont.gov/Documents/2026/Docs/ACTS/ACT145/ACT145%20Act%20Summary.pdf","https://portal.ct.gov/ag/sections/privacy/the-connecticut-data-privacy-act",n$],["Curated coverage of 20 states as of 8 September 2026, including the narrower Florida law. Applicability thresholds and exemptions differ; location alone does not determine applicability.","These variants cover ordinary adult, non-sensitive processing. Child protections, sensitive-data consent or prohibitions, assessments and appeal workflows need separate implementation.",t?"No automatic banner. Supply timely disclosures and persistent opt-out controls; an optional notice dismissal records no consent.":"Optional categories stay denied until an explicit choice. Opt-in is a deployment choice, not a claim that every covered state requires it.","GPC denies marketing and measurement across the group as a conservative product mapping, not a claim that every state mandates GPC or all measurement is sale, sharing or targeted advertising.","The referenced GPC specification is a Working Draft, not a final Recommendation. Removing the signal does not withdraw a recorded opt-out.","Maryland collection minimization and sensitive-data/minor prohibitions require separate processing controls. Connecticut prohibits sale and targeted advertising using minors data from 1 July 2026. Consent cannot waive these limits.","Louisiana and Oklahoma start 1 January 2027, Alabama 1 May 2027 and Vermont 1 January 2028. These future laws are excluded from the current group. Nevada sale opt-outs and sector laws also apply outside it."]),validity:t?{choiceDays:365,noticeDays:365}:{choiceDays:365}}},nG=function(e,t,n,i){return{i18n:{messageProfile:"preferences"},id:e,match:nD.countries([t]),model:"opt-out",prompt:"none",review:nF(n,["Only for processing whose reviewed basis permits it before a consent choice. This preset does not establish that basis.","Supply required information before processing and persistent refusal controls. A no-prompt setting does not remove those duties.",...i]),validity:{choiceDays:365}}},nV=function(e){return{...nG("canada_opt_out","CA",["https://www.priv.gc.ca/en/privacy-topics/technology/online-privacy-tracking-cookies/tracking-and-ads/gl_ba_1112/"],["For nonsensitive processing meeting meaningful-consent requirements. The OPC permits opt-out behavioral advertising only with prominent purposes and parties at or before collection, immediate persistent refusal and minimized retention.","Sensitive, unexpected or significantly risky processing requires a separate express-consent assessment. The host must establish federal or provincial applicability.","Quebec is excluded. A missing province must not select this opt-out profile."]),id:"opt-in"===e?"canada_opt_in":"canada_opt_out",match:nD.regions(["AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","SK","YT"].map(e=>({country:"CA",region:e}))),model:e,prompt:"opt-in"===e?"choice":"notice",validity:{choiceDays:365,noticeDays:365}}},nH={australiaOptIn:()=>nB("australia_opt_in","AU",["https://www.oaic.gov.au/privacy/privacy-guidance-for-organisations-and-government-agencies/organisations/tracking-pixels-and-privacy-obligations"],["Use opt-in for consent-based processing. Australian Privacy Principles also permit eligible expected nonsensitive processing with notice and refusal; see australiaOptOut."]),australiaOptOut:()=>nG("australia_opt_out","AU",["https://www.oaic.gov.au/privacy/privacy-guidance-for-organisations-and-government-agencies/organisations/tracking-pixels-and-privacy-obligations","https://www.oaic.gov.au/privacy/australian-privacy-principles/australian-privacy-principles-guidelines/chapter-7-app-7-direct-marketing"],["APP necessity, notice and purpose limits still apply. Expected nonsensitive direct marketing can use the APP 7 opt-out route; sensitive and unexpected third-party uses need separate consent/basis review."]),brazilOptIn:()=>nB("brazil_opt_in","BR",["https://www.gov.br/anpd/pt-br/centrais-de-conteudo/materiais-educativos-e-publicacoes/guia-orientativo-cookies-e-protecao-de-dados-pessoais.pdf/@@display-file/file"],["ANPD cookie guidance recommends consent for uses such as advertising and behavioral profiling; other legal bases need their own assessment. This preset uses consent for optional categories.","Keep consent-based cookies off until choice, disclose specific purposes, make rejection readily available and support withdrawal."]),bruneiOptIn:()=>nB("brunei_opt_in","BN",["https://pdp.aiti.gov.bn/media/tndpduml/s-1_2025-e.pdf"],["The PDPO permits consent, specified deemed-consent routes and exceptions. This preset uses explicit consent for optional processing.","Nonpersonal processing and assessed exceptions can avoid consent requests. Personal-data ad targeting requires consent under PDPC cookie guidance.","Deemed consent by notification requires an assessment and a reasonable opportunity to opt out; it excludes sending direct marketing messages. Dismissing a notice does not implement that route.","The host must notify purposes and honor withdrawal under sections 13 and 17."]),californiaOptIn:()=>({...n_("opt-in"),legacyMaterial:structuredClone(nm)}),californiaOptOut:()=>({...n_("opt-out"),legacyMaterial:structuredClone(ny)}),canadaOptIn:()=>nV("opt-in"),canadaOptOut:()=>nV("opt-out"),chinaOptIn:()=>nB("china_opt_in","CN",["https://en.npc.gov.cn.cdurl.cn/2021-12/29/c_694559.htm","https://en.npc.gov.cn.cdurl.cn/2021-12/29/c_694559_2.htm"],["PIPL Articles 13–17 govern the processing basis, informed consent and withdrawal. This preset covers ordinary optional processing relying on consent.","A category grant does not establish separate consent for provision to other controllers, sensitive information or overseas transfers under Articles 23, 29 and 39. Keep those operations independently gated until their required permissions and transfer conditions are satisfied.","Personalized commercial recommendations need a non-personalized option or convenient refusal under Article 24."]),europeIab:()=>({...nq("iab"),legacyMaterial:structuredClone(nh)}),europeOptIn:()=>({...nq("opt-in"),legacyMaterial:structuredClone(nv)}),indiaOptIn:()=>nB("india_opt_in","IN",["https://www.meity.gov.in/static/uploads/2024/02/Digital-Personal-Data-Protection-Act-2023-1.pdf","https://www.meity.gov.in/static/uploads/2025/11/c56ceae6c383460ca69577428d36828b.pdf","https://www.meity.gov.in/static/uploads/2025/11/53450e6e5dc0bfa85ebd78686cadad39.pdf"],["DPDP commencement is phased, with full enforceability announced for 13 May 2027. This preset is an opt-in product default now, not a claim that every DPDP duty is already in force.","Using c15t does not make a deployment a registered Consent Manager under the DPDP Act."]),indonesiaOptIn:()=>nB("indonesia_opt_in","ID",["https://jdih.komdigi.go.id/produk_hukum/view/id/832/t/undangundang%2Bnomor%2B27%2Btahun%2B2022"],["Law 27/2022 provides several processing bases. This preset uses explicit, recorded consent for disclosed optional purposes, with withdrawal available through preferences.","The controller must supply the required information and retain proof of consent; category settings do not implement transfer safeguards or all data-subject requests."]),japanOptIn:()=>nB("japan_opt_in","JP",["https://www.ppc.go.jp/personalinfo/faq/APPI_QA/"],["APPI treatment depends on whether cookie data is personal information or personal-related information, including how a recipient combines it. Review third-party provision and applicable external-transmission notices separately."]),japanOptOut:()=>nG("japan_opt_out","JP",["https://www.ppc.go.jp/personalinfo/legal/guidelines_tsusoku/","https://laws.e-gov.go.jp/law/359AC0000000086"],["Only where APPI third-party provision, sensitive-data or recipient-matching consent is not triggered. A settings button does not implement the APPI registered third-party-provision opt-out procedure.","Telecommunications Business Act Article 27-12 requires notice or accessible publication for covered telecommunications services, subject to its exemptions. Ordinary corporate and own-retail sites are not automatically covered; APPI still applies. Disclose information sent, recipients and purposes where required."]),laosOptIn:()=>nB("laos_opt_in","LA",["https://lsp.moic.gov.la/?id=289&r=site%2Fdisplaylegal"],["Law on Electronic Data Protection 25/NA applies to electronic data. Article 12 requires purpose information and owner approval for collection of specific data, including personal data.","Article 17 addresses permission for sending or transferring data, including transfers abroad. Generic category consent does not establish a separate transfer permission or satisfy all collection notifications.","No general analytics exemption was verified in the available official translation. Obtain local interpretation before relying on an exception."]),malaysiaOptIn:()=>nB("malaysia_opt_in","MY",["https://www.pdp.gov.my/ppdpv1/en/akta/pdp-act-2010-en/","https://www.pdp.gov.my/ppdpv1/en/akta/personal-data-protection-amendment-act-2024/","https://www.pdp.gov.my/ppdpv1/en/akta/personal-data-protection-general-practice/","https://www.pdp.gov.my/ppdpv1/wp-content/uploads/2026/04/Data-Protection-By-Design-Guideline-DpbD.pdf"],[nT,"PDPA section 6 provides consent and specified exceptions. This preset uses consent for optional processing within the commercial-transactions scope of the Act.","Section 7 requires the written notice in the national language and English. A single automatically selected UI translation does not supply that bilingual notice; the host must provide it.","The General Code describes contextual implied consent, but the 2026 Data Protection by Design guideline recommends opt-in where consent is the basis and gives an essential-cookies-only default example. Do not infer page-load tracking permission from the older Code.","Section 45(2)(c) separately exempts qualifying statistics-only processing. Use malaysiaStatistics only after reviewing all included processing.","Sensitive personal data and international transfers need separate assessment under the amended Act."]),malaysiaStatistics:()=>({...nG("malaysia_statistics","MY",["https://www.pdp.gov.my/ppdpv1/wp-content/uploads/2024/07/UNDANG-UNDANG-MALAYSIA_AKTA_PERLINDUNGAN_DATA_PERIBADI_2010_709_MALAY_AND-ENG_V2022.pdf"],[nT,"PDPA section 45(2)(c) requires processing solely for statistics/research, no other use and nonidentifying published results. Advertising, profiling for other purposes and vendor reuse are excluded.","This is an exemption-based processing configuration, not implied consent obtained by dismissing a banner. Review every included measurement script. Security, Retention and Data Integrity Principles remain applicable."]),categories:["measurement"],scopeMode:"strict"}),philippinesOptIn:()=>nB("philippines_opt_in","PH",["https://privacy.gov.ph/data-privacy-act/","https://privacy.gov.ph/wp-content/uploads/2023/11/NPC-Circular-No.-2023-04_Guidelines-on-Consent_07Nov2023.pdf"],["Sections 12 and 13 distinguish lawful processing bases and sensitive-information conditions. This preset assumes consent for the configured optional purposes, not that consent is the only lawful basis.","Disclose specific purposes and recipients; a broad category label alone is not an informed consent notice."]),quebecOptIn:()=>({...{id:"quebec_opt_in",match:nD.regions([{country:"CA",region:"QC"}]),model:"opt-in",prompt:"choice",proof:nU,review:nM(["https://www.cai.gouv.qc.ca/protection-renseignements-personnels/sujets-et-domaines-dinteret/principaux-changements-loi-25","https://www.cai.gouv.qc.ca/uploads/pdfs/CAI_Criteres_Validite_Consentement.pdf"],["Optional identification, location and profiling functions require prior information and activation under section 8.1. Classify technical operations separately.","The CAI consent guidelines describe validity criteria, including purpose-specific choice and duration; they do not establish a blanket cookie opt-in rule.","The Law 25 highest-privacy-default provision does not apply to cookie privacy settings; this preset makes no blanket opt-in claim from it."]),validity:{choiceDays:365}},legacyMaterial:structuredClone(nb)}),saudiArabiaOptIn:()=>nB("saudi_arabia_opt_in","SA",["https://sdaia.gov.sa/en/SDAIA/about/Documents/ImplementingRegulation.pdf"],["PDPL Article 26 and Implementing Regulation Article 29 require consent for covered marketing, with refusal available afterward. An assessed Article 16 basis may cover expected nonsensitive analytics; this preset uses consent."]),singaporeOptIn:()=>nB("singapore_opt_in","SG",["https://www.pdpc.gov.sg/-/media/files/pdpc/pdf-files/advisory-guidelines/ag-on-selected-topics/advisory-guidelines-on-the-pdpa-for-selected-topics-(revised-may-2024).pdf","https://www.pdpc.gov.sg/-/media/files/pdpc/pdf-files/advisory-guidelines/ag-on-key-concepts/advisory-guidelines-on-key-concepts-in-the-pdpa-17-may-2022.pdf"],["Nonpersonal processing and assessed exceptions can avoid consent requests. Personal-data ad targeting requires consent under PDPC cookie guidance.","Deemed consent by notification requires an assessment and a reasonable opt-out period. This preset uses explicit choice and does not implement that route."]),southKoreaOptIn:()=>nB("south_korea_opt_in","KR",["https://elaw.klri.re.kr/eng_service/lawViewContent.do?hseq=71740"],["PIPA permits multiple processing bases. When relying on consent, purpose disclosures, optional consent and third-party provision need their own assessment; category toggles do not establish those facts."]),switzerlandOptIn:()=>nB("switzerland_opt_in","CH",["https://www.edoeb.admin.ch/en/cookie-guidelines-updated-version"],["Use this variant for optional tracking relying on consent, including highly intrusive or high-risk profiling. FDPIC guidance distinguishes these uses from lower-risk information-and-opt-out cases.","Assess sensitive data, profiling, third-party tracking and transfers separately; the CH matcher alone cannot establish a justification for processing."]),switzerlandOptOutNoPrompt:()=>({i18n:{messageProfile:"preferences"},id:"switzerland_opt_out_no_prompt",match:nD.countries(["CH"]),model:"opt-out",prompt:"none",review:nF(["https://www.edoeb.admin.ch/en/cookie-guidelines-updated-version"],["Only for processing with a reviewed justification that does not require prior consent. Unexpected low-intrusion uses require notice prominent enough that first-time visitors cannot ignore it.","The host must provide the required information before processing and a persistent, accessible way to refuse. No prompt does not mean no disclosure.","Do not use this variant for high-risk profiling, third-party advertising networks or unexpected tracking on political, religious or trade-union sites. This preset excludes these cases; assess them separately and use switzerlandOptIn for lawful consent-based processing.","This preset does not map GPC or establish a US sale-or-sharing right. Use a preferences control labelled for the actual processing."]),rights:["preferences"],validity:{choiceDays:365}}),thailandOptIn:()=>nB("thailand_opt_in","TH",["https://www.etda.or.th/getattachment/e820df2c-848f-4e03-86cb-a9dad38cc713/ENG-Version.aspx"],["PDPA section 19 requires informed, freely given consent and accessible withdrawal when consent is the basis. Sections 24 and 26 provide other bases and sensitive-data conditions.","Describe each consent purpose separately. Optional tracking must not be a condition for unrelated service."]),turkeyOptIn:()=>nB("turkey_opt_in","TR",["https://www.kvkk.gov.tr/Icerik/7595/2022-1358","https://www.kvkk.gov.tr/Icerik/6649/Personal-Data-Protection-Law"],["KVKK decision 2022/1358 requires opt-in for non-essential cookies when another applicable processing condition is absent. Necessary cookies are assessed separately.","This preset relies on consent for optional purposes; disclosures, sensitive-data conditions and overseas transfers require separate assessment."]),uaeOptIn:()=>nB("uae_opt_in","AE",["https://www.uaelegislation.gov.ae/en/legislations/1972/download"],["Federal Decree-Law 45/2021 provides consent and specific exceptions, not a general legitimate-interest basis. The AE location matcher does not select DIFC or ADGM business regimes.","Executive-regulation issuance and the resulting compliance transition were not established in this source review. Verify current federal applicability before deployment."]),ukStatistics:()=>({...nG("uk_statistics","GB",["https://www.legislation.gov.uk/uksi/2003/2426/schedule/A1",nE],["PECR Schedule A1 paragraph 5 requires service-improvement statistics as the sole purpose, limits sharing to assistance with those improvements, and requires information plus a free, simple objection mechanism. Paragraph 5(2) excludes collecting or monitoring automatically emitted device information, such as Wi-Fi probe requests.","ICO guidance limits this route to aggregate service statistics: no advertising, retained individual histories, cross-site tracking or vendor reuse. A provider must act only as a processor for this purpose. Personal-data processing still needs a UK GDPR lawful basis.","Provide clear information and a simple free objection mechanism. Every measurement script must meet these conditions; category membership alone is insufficient."]),categories:["measurement"],scopeMode:"strict"}),usPrivacyStatesOptIn:()=>nz("opt-in"),usPrivacyStatesOptOut:()=>nz("opt-out"),vietnamOptIn:()=>nB("vietnam_opt_in","VN",["https://vanban.chinhphu.vn/?classid=1&docid=214590&pageid=27160&typegroup=","https://datafiles.chinhphu.vn/cpp/files/vbpq/2025/7/91qh.signed.pdf","https://datafiles.chinhphu.vn/cpp/files/vbpq/2026/01/356-nd.signed.pdf"],["Law 91/2025/QH15 and Decree 356/2025 took effect on 1 January 2026. Article 28(8) requires consent before behavioral/personalized advertising; Decree Article 6 rejects default consent and requires evidence.","Keep distinct purposes separately selectable. This category preset does not implement processing impact assessments, transfer duties or platform-specific tracking obligations."]),worldNone:()=>({id:"world_none",match:nD.default(),model:"none",prompt:"none",proof:{storeIp:!1,storeLanguage:!1,storeUserAgent:!1},review:{assumptions:["Applies where no consent law grants the visitor rights over the optional categories, so no prompt, control or acknowledgement is owed.","Matches known locations no other rule covers. The matcher dataset is finite and does not establish that an unlisted location has no privacy law; review the locations your traffic actually comes from.","No GPC mapping; add privacySignals.gpc where the deployment honors the signal anyway.",...nL],reviewBy:"2026-12-15",status:"pending"}}),worldOptOutNoPrompt:()=>({...{i18n:{messageProfile:"preferences"},id:"world_opt_out_no_prompt",match:nD.default(),model:"opt-out",prompt:"none",proof:{storeIp:!1,storeLanguage:!1,storeUserAgent:!0},review:nM([],["Intentional allow-by-default configuration with no first-layer prompt. Disclosure, preferences and the opt-out right stay reachable.","Include this rule explicitly only after reviewing locations not covered by the pack. The matcher dataset is finite and does not establish that an unlisted location has no privacy law.","This is controller configuration, never the runtime fallback for a failed or unmatched resolution.","No GPC mapping; add privacySignals.gpc where the deployment honors the signal."]),rights:["preferences"],validity:{choiceDays:365,noticeDays:365}},legacyMaterial:structuredClone(nw)})},nW=function(e={}){let t=nH.usPrivacyStatesOptOut();return[e.iab?nH.europeIab():nH.europeOptIn(),nH.quebecOptIn(),{...t,match:nD.merge(t.match,nD.regionFallback(["US"]))},nH.worldNone()]},nJ=function(e,t){let{basis:n}=e;return"choice-v1"===n.kind?n.fingerprint===t.choice.fingerprint:void 0===n.materialFingerprint||null===t.legacyMaterialFingerprint||n.materialFingerprint===t.legacyMaterialFingerprint},nK=function(e,t,n){if(!e)return{authority:"absent",expiresAt:null};if(!nJ(e,t))return{authority:"policy-changed",expiresAt:null};let i=null===t.choice.maxAgeMs?null:e.confirmedAt+t.choice.maxAgeMs;return null!==i&&n>=i?{authority:"expired",expiresAt:i}:{authority:"valid",expiresAt:i}},nY=function(e,t,n,i){let o=[];return t?.value===!1&&o.push("explicit-denial"),n||"strict"!==i.policy.scopeMode||o.push("strict-scope"),!0===i.gpc&&i.policy.gpcDenyCategories.includes(e)&&o.push("gpc"),i.optOuts?.some(t=>t.categories.includes(e))&&o.push("opt-out-directive"),o},nX=function(e,t){let{policy:n}=t,i=t.choice?.categories[e],o=n.scope.includes(e),{authority:r,expiresAt:s}=nK(i,n,t.now),a=nY(e,i,o,t),c=o?"opt-out"===n.model||"none"===n.model:"permissive"===n.scopeMode,l="default";return o&&i?.value===!0&&"valid"===r&&(c=!0,l="grant"),a.length>0&&(c=!1,l="restricted"),{authority:r,expiresAt:s,inScope:o,permitted:c,restrictions:a,source:l}},nQ=function(e,t){return{kind:e,reason:t}},nZ=function(e,t){return e.scope.some(e=>t[e].restrictions.length>0)},n0=function(e,t){let{policy:n}=e;if(0===n.scope.length||nZ(n,t))return{kind:"none"};let i=e.choice?.categories;if(!i||0===Object.keys(i).length)return nQ("choice","missing");let o=!1,r=!1;for(let e of n.scope){let n=i[e],{authority:s}=t[e];if("policy-changed"===s)return nQ("choice","policy-changed");n?n.value&&"expired"===s&&(r=!0):o=!0}return o?nQ("choice","missing"):r?nQ("choice","expired"):{kind:"none"}},n1=function(e,t){return null===t.notice.maxAgeMs?null:e.dismissedAt+t.notice.maxAgeMs},n2=function(e){let t=e.noticeDismissal;if(!t)return nQ("notice","missing");if(t.fingerprint!==e.policy.notice.fingerprint)return nQ("notice","policy-changed");let n=n1(t,e.policy);return null!==n&&e.now>=n?nQ("notice","expired"):{kind:"none"}},n5=function(e,t){switch(e.policy.prompt){case"choice":return n0(e,t);case"notice":return n2(e);default:return{kind:"none"}}},n3=function(e,t,n){let{policy:i}=e,o=[],r="choice"===i.prompt&&"none"===n.kind&&!nZ(i,t);for(let n of i.scope){let s=t[n],a=e.choice?.categories[n],c="opt-out"!==i.model&&"none"!==i.model&&0===s.restrictions.length;a?.value===!0&&"valid"===s.authority&&null!==s.expiresAt&&(c||r)&&o.push(s.expiresAt)}let s=e.noticeDismissal;if("notice"===i.prompt&&s&&s.fingerprint===i.notice.fingerprint){let t=n1(s,i);null!==t&&t>e.now&&o.push(t)}let a=o.filter(t=>t>e.now);return 0===a.length?null:Math.min(...a)},n6=function(e){let t={},n={necessary:!0},i={};for(let o of tU){let r=nX(o,e);t[o]=r,n[o]=r.permitted,r.restrictions.length>0&&(i[o]=r.restrictions)}let o=n5(e,t);return{categories:t,nextDeadline:n3(e,t,o),permissions:n,promptRequirement:o,restrictions:i}},n8=function(e,t){if(0===e.length)throw TypeError(`${t} condition cannot be empty`)},n4=function(e,t){if(!(e in t))throw Error(`Consent category "${e}" not found in consent state`);return t[e]||!1},n7=function e(t,n){if("string"==typeof t)return n4(t,n);if("object"==typeof t&&null!==t){if("and"in t){let i=Array.isArray(t.and)?t.and:[t.and];return n8(i,"AND"),i.every(t=>e(t,n))}if("or"in t){let i=Array.isArray(t.or)?t.or:[t.or];return n8(i,"OR"),i.some(t=>e(t,n))}if("not"in t)return!e(t.not,n)}throw TypeError(`Invalid condition structure: ${JSON.stringify(t)}`)},n9=function(e,t){return n7(e,t)},ie=function(e){let t=new Set;return!function e(n){"string"==typeof n?t.add(n):"object"==typeof n&&null!==n&&("and"in n?(Array.isArray(n.and)?n.and:[n.and]).forEach(e):"or"in n?(Array.isArray(n.or)?n.or:[n.or]).forEach(e):"not"in n&&e(n.not))}(e),Array.from(t)},it=function(e,t){if(void 0!==e.vendorId){let n=String(e.vendorId),i=(e.iabLegIntPurposes?.length??0)>0,o=!i||(e.iabPurposes?.length??0)>0;if(i&&(!Object.hasOwn(t.vendorLegitimateInterests,n)||!0!==t.vendorLegitimateInterests[n])||o&&(!Object.hasOwn(t.vendorConsents,n)||!0!==t.vendorConsents[n]))return!1}return(e.iabPurposes??[]).every(e=>Object.hasOwn(t.purposeConsents,e)&&!0===t.purposeConsents[e])&&(e.iabLegIntPurposes??[]).every(e=>Object.hasOwn(t.purposeLegitimateInterests,e)&&!0===t.purposeLegitimateInterests[e])&&(e.iabSpecialFeatures??[]).every(e=>Object.hasOwn(t.specialFeatureOptIns,e)&&!0===t.specialFeatureOptIns[e])},ii=function(e,t=Date.now()){if(null===e.nextDeadline||t<e.nextDeadline)return e;let n=n6({choice:e.explicitChoice,gpc:e.privacySignals.gpc.active,noticeDismissal:e.noticeDismissal,now:t,optOuts:e.optOutDirectives,policy:e.evaluationPolicy});return{effectivePermissions:n.permissions,restrictions:n.restrictions}},io=function(e,t){let{iab:n}=e,i=n?.authority;return!!n?.enabled&&!!i&&"matched"===e.resolution.status&&i.choiceFingerprint===e.evaluationPolicy.choice.fingerprint&&!!i.tcString&&!!Number.isSafeInteger(i.confirmedAt)&&!!Number.isSafeInteger(i.expiresAt)&&!(i.confirmedAt<0)&&!(i.confirmedAt>t)&&!(i.expiresAt<=t)&&!(i.expiresAt<=i.confirmedAt)&&!0},ir=function(e,t,n=Date.now()){let i=ii(t,n);if(void 0!==e.vendorId||e.iabPurposes?.length||e.iabLegIntPurposes?.length||e.iabSpecialFeatures?.length){if("iab"!==t.model)return!1;let{iab:o}=t,r=o?.authority;if(!r||!io(t,n))return!1;for(let t of ie(e.category))if("necessary"!==t&&i.restrictions[t]?.length)return!1;return it(e,r)}return n9(e.category,i.effectivePermissions)},is=Object.freeze({categories:Object.freeze({}),version:3}),ia=function(e,t,n){let i=[],o=tH(n.actionAt,n.now??n.actionAt);if(o&&i.push({code:o,path:"actionAt"}),!tz(t))return i.push({code:"not-an-object",path:""}),{issues:i,ok:!1};let r=[],s=new Map;for(let e of tG(t)){let o=t[e];if("necessary"===e){!0!==o&&i.push({code:"invalid-boolean",path:e});continue}if(!tB(e)){i.push({code:"unknown-key",path:e});continue}if("boolean"!=typeof o){i.push({code:"invalid-boolean",path:e});continue}if(o&&!n.policy.scope.includes(e)){i.push({code:"out-of-scope",path:e});continue}s.set(e,o),r.push(e)}if(i.length>0)return{issues:i,ok:!1};let a=e??is;if(0===s.size)return{choice:a,confirmed:[],ok:!0};let c={...a.categories};for(let[e,t]of s)c[e]={basis:{fingerprint:n.policy.choice.fingerprint,kind:"choice-v1"},confirmedAt:n.actionAt,value:t};return{choice:{categories:c,version:3},confirmed:r,ok:!0}},ic="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",il=function(e,t){let n=BigInt(0);for(let i=0;i<e.length;i+=4)n=n*BigInt(0x100000000)+BigInt(t.getUint32(i,!1));let i=BigInt(0x271f35a0),o="";for(;n>BigInt(0);){let e=Number(n%i);n/=i;let t="";for(let i=0;i<5&&(t=ic.charAt(e%58)+t,e=Math.floor(e/58),n!==BigInt(0)||0!==e);i+=1);o=t+o}for(let t of e){if(0!==t)break;o=ic.charAt(0)+o}return o||ic.charAt(0)},iu=function(){let e=crypto.getRandomValues(new Uint8Array(20)),t=Date.now()-17e11,n=new DataView(e.buffer);return n.setUint32(0,Math.floor(t/0x100000000),!1),n.setUint32(4,t%0x100000000,!1),`sub_${il(e,n)}`},id=function(e){return[...new Set(e)].sort((e,t)=>e.localeCompare(t))},ip=function(e,t){if("opt-in"!==e&&"opt-out"!==e&&"iab"!==e&&"none"!==e)throw TypeError(`Unknown policy model "${e}"`);if("choice"!==t&&"notice"!==t&&"none"!==t)throw TypeError(`Unknown policy prompt "${t}"`);if("none"===e){if("none"!==t)throw TypeError(`Policy model "none" requires prompt "none", received "${t}"`);return}if("opt-out"!==e&&"choice"!==t)throw TypeError(`Policy model "${e}" requires prompt "choice", received "${t}"`)},ig=function(e,t){let{fingerprint:n,maxAgeMs:i}=e;if(!tW(n))throw TypeError(`${t}.fingerprint must be a non-empty string`);if(null!==i&&!(Number.isFinite(i)&&i>=0))throw TypeError(`${t}.maxAgeMs must be null or a finite non-negative number`);return{fingerprint:n,maxAgeMs:i}},im=function(e){for(let t of e)if(!tB(t))throw TypeError(`Scope has unknown category "${t}"`)},iy=function(e,t){let n=new Set;for(let i of e){if("necessary"===i)throw TypeError('GPC mapping cannot deny "necessary"');if(!tB(i))throw TypeError(`GPC mapping has unknown category "${i}"`);if(n.has(i))throw TypeError(`GPC mapping repeats category "${i}"`);if(!t.includes(i))throw TypeError(`GPC mapping category "${i}" is outside the policy scope`);n.add(i)}},ih=function(e){let{model:t,prompt:n,scopeMode:i}=e,o=e.legacyMaterialFingerprint??null;if(ip(t,n),"strict"!==i&&"permissive"!==i)throw TypeError(`Unknown policy scope mode "${i}"`);if(null!==o&&!tW(o))throw TypeError("legacyMaterialFingerprint must be null or a non-empty string");let r=ig(e.choice,"choice"),s=ig(e.notice,"notice");im(e.scope);let a=id(e.scope),c=e.gpcDenyCategories??[];return iy(c,a),{choice:r,gpcDenyCategories:id(c),legacyMaterialFingerprint:o,model:t,notice:s,prompt:n,scope:a,scopeMode:i}},iv=function e(t){if(!("object"!=typeof t||null===t||Object.isFrozen(t)))for(let n of(Object.freeze(t),Object.values(t)))e(n)},ib=e=>{let{rule:t,fingerprints:n}=e;return ih({choice:{fingerprint:n.choice,maxAgeMs:Math.round(t.validity.choiceMs)},gpcDenyCategories:t.privacySignals.gpc.denyCategories,legacyMaterialFingerprint:n.legacyMaterial??null,model:t.model,notice:{fingerprint:n.notice,maxAgeMs:Math.round(t.validity.noticeMs)},prompt:t.prompt,scope:t.scope,scopeMode:t.scopeMode})},iw={fingerprints:{choice:"145fd951c0967e210d905acf5859a93cd03095c0291816b9c424d740048b7a47",notice:"4b563e76133c49a5e14cffd9c0a0cc16885b811d9ff77548165cc01ee94996d7",policy:"caadd5bcf45bf76cbc279b3dfe765f2dcd165c510f489c38994e4c9264d9314f"},policy:{actions:{allowed:["accept","customize","reject"],equivalent:[["accept","reject"]],required:["accept","reject"]},copyRevision:null,id:"c15t_safe_fallback",model:"opt-in",preselectedCategories:[],privacySignals:{gpc:{denyCategories:[]}},prompt:"choice",proof:{storeIp:!1,storeLanguage:!1,storeUserAgent:!1},rights:["disclosure","preferences"],scope:["experience","functionality","marketing","measurement"],scopeMode:"strict",validity:{choiceMs:31536e6,noticeMs:31536e6}}},ik={fingerprints:iw.fingerprints,rule:iw.policy};iv(ik);let iA=ib(ik);iv(iA);let iI=function(e){return"matched"===e.status?{fingerprints:e.fingerprints,rule:e.policy}:ik},ij=function(e){return e===ik?iA:ib(e)},iS=function(e,t){return"iab"===e.model?t?"iab":"opt-in":e.model},iC=function(e){return e.policyPending||"failed"===e.resolution.status||"none"===e.promptRequirement.kind?"none":(e.promptRequirement.kind,"banner")},iP=function(e,t,n){let i={};for(let o of e.scope){let r=t?.[o];if("boolean"==typeof r){i[o]=r;continue}let s=n?.categories[o];if(s){i[o]=s.value;continue}i[o]="opt-out"===e.model||"none"===e.model||e.preselectedCategories.includes(o)}return i},iO=function(e,t){let n={};for(let i of e.scope)n[i]=t;return n},ix=["subjectId","externalId","identityProvider"],iD=new Set(tU),i$=function(e,t){if(!tz(e))return t.push({code:"not-an-object",path:"subject"}),null;let n={},i=!1;for(let o of tG(e)){if(!ix.includes(o)){t.push({code:"unknown-key",path:`subject.${o}`});continue}let r=tV(e,o);if(void 0!==r){if(!tW(r)){t.push({code:"invalid-identifier",path:`subject.${o}`});continue}n[o]=r,i=!0}}return i?n:null},iR=function(e,t,n,i){if(!tz(e))return i.push({code:"not-an-object",path:t}),null;let o=!0;"gpc"!==tV(e,"source")&&(i.push({code:"invalid-basis",path:`${t}.source`}),o=!1);let r=tV(e,"recordedAt"),s=tH(r,n);s&&(i.push({code:s,path:`${t}.recordedAt`}),o=!1);let a=tV(e,"categories"),c=[];if(Array.isArray(a))for(let[e,n]of a.entries()){if("string"!=typeof n||!iD.has(n)){i.push({code:"unknown-key",path:`${t}.categories[${e}]`}),o=!1;continue}c.includes(n)||c.push(n)}else i.push({code:"not-an-object",path:`${t}.categories`}),o=!1;return o?{categories:c.sort(),recordedAt:r,source:"gpc"}:null},iE=function(e,t){let n=[],i={};if(void 0!==e.choice)if(null===e.choice)i.choice=null;else{let o=tY(e.choice,t);!0===o.ok?i.choice=o.record:n.push(...o.issues.map(e=>({...e,path:`choice.${e.path}`})))}if(void 0!==e.subject&&(i.subject=null===e.subject?null:i$(e.subject,n)),void 0!==e.noticeDismissal)if(null===e.noticeDismissal)i.noticeDismissal=null;else{let o=tX(e.noticeDismissal,t);!0===o.ok?i.noticeDismissal=o.record:n.push(...o.issues.map(e=>({...e,path:`noticeDismissal.${e.path}`})))}if(void 0!==e.optOutDirectives)if(Array.isArray(e.optOutDirectives)){let o=[];for(let[i,r]of e.optOutDirectives.entries()){let e=iR(r,`optOutDirectives[${i}]`,t,n);e&&o.push(e)}i.optOutDirectives=o}else n.push({code:"not-an-object",path:"optOutDirectives"});return n.length>0?{issues:n,ok:!1}:{ok:!0,records:i}},iT=function(e,t){if(!e)return t;if(!t)return e;let n={...e.categories};for(let e of tU){let i=t.categories[e],o=n[e];i&&(!o||i.confirmedAt>o.confirmedAt)&&(n[e]=i)}return{categories:n,version:3}},iL=function(e,t,n){let i={now:n};if(void 0!==t.optOutDirectives){let n=[...e.optOutDirectives];for(let e of t.optOutDirectives)n.some(t=>t.source===e.source&&t.recordedAt===e.recordedAt&&t.categories.join(",")===e.categories.join(","))||n.push(e);i.optOutDirectives=n}if(void 0!==t.noticeDismissal){let n=e.noticeDismissal,o=t.noticeDismissal;i.noticeDismissal=o&&(!n||o.dismissedAt>n.dismissedAt)?o:n}return void 0!==t.subject&&(i.subject=t.subject?{...e.subject,...t.subject}:e.subject),i},iM={authority:null,cmpId:null,customVendors:[],enabled:!1,gvl:null,purposeConsents:{},purposeLegitimateInterests:{},specialFeatureOptIns:{},tcString:null,vendorConsents:{},vendorLegitimateInterests:{}},iU=Object.freeze({policy:null,status:"unconfigured"}),iq=iI(iU),i_=ij(iq),iN=Object.freeze([]),iF=Object.freeze({}),iB=Object.freeze({gpc:Object.freeze({active:!1,detected:!1,override:void 0})}),iz=n6({choice:null,noticeDismissal:null,now:0,optOuts:iN,policy:i_});iv(iz);let iG=function(e){if(!e||"object"!=typeof e)return null;let t={},n=!1;for(let i of tU)Object.hasOwn(e,i)&&"boolean"==typeof e[i]&&(t[i]=e[i],n=!0);return n?t:null},iV=function(e){return e?{...e,purposeConsents:{...e.purposeConsents},purposeLegitimateInterests:{...e.purposeLegitimateInterests},specialFeatureOptIns:{...e.specialFeatureOptIns},vendorConsents:{...e.vendorConsents},vendorLegitimateInterests:{...e.vendorLegitimateInterests}}:null},iH=function(e){if(!(!e||Object.isFrozen(e))){for(let t of Object.keys(e.categories)){let n=e.categories[t];n&&(Object.freeze(n.basis),Object.freeze(n))}Object.freeze(e.categories),Object.freeze(e)}},iW=function(e){if(iv(e.iab?.authority),e.effectivePermissions!==iz.permissions&&Object.freeze(e.effectivePermissions),e.overrides!==iF&&Object.freeze(e.overrides),e.promptRequirement!==iz.promptRequirement&&Object.freeze(e.promptRequirement),e.restrictions!==iz.restrictions&&!Object.isFrozen(e.restrictions)){for(let t of Object.values(e.restrictions))Object.freeze(t);Object.freeze(e.restrictions)}if(e.optOutDirectives!==iN){for(let t of e.optOutDirectives)Object.freeze(t.categories),Object.freeze(t);Object.freeze(e.optOutDirectives)}for(let t of(e.privacySignals!==iB&&(Object.freeze(e.privacySignals.gpc),Object.freeze(e.privacySignals)),e.resolution!==iU&&iv(e.resolution),e.policyRule!==iq.rule&&iv(e.policyRule),e.evaluationPolicy!==i_&&iv(e.evaluationPolicy),iH(e.explicitChoice),[e.noticeDismissal,e.subject,e.user,e.translations,e.iab,e.location]))t&&Object.freeze(t);return Object.freeze(e)},iJ=function(e){var t;let n=e.now??e.initialRecords?.now??Date.now(),i=e.initialPolicyResolution??iU,o=iI(i),r=ij(o),s=e.initialPolicyPending??!1,a=e.initialRecords?iE(e.initialRecords,n):null,c=a?.ok===!0?a.records:null,l=c?.choice??null,u=c?.noticeDismissal??null,d=c?.optOutDirectives??iN,p=c?.subject??null,f=(t=e.initialIab)?{...iM,...t,authority:iV(t.authority??null)}:null,g=e.initialOverrides?.gpc,m=e.initialPrivacySignals?.gpc===!0,y=void 0!==g||m?{gpc:{active:g??m,detected:m,override:g}}:iB,h=r===i_&&null===l&&null===u&&0===d.length?iz:n6({choice:l,gpc:y.gpc.active,noticeDismissal:u,now:n,optOuts:d,policy:r});return iW({activeUI:iC({policyPending:s,promptRequirement:h.promptRequirement,resolution:i}),branding:e.initialBranding??null,effectivePermissions:h.permissions,evaluatedAt:n,evaluationPolicy:r,explicitChoice:l,iab:f,location:e.initialLocation?{...e.initialLocation}:null,model:iS(o.rule,f?.enabled??!1),nextDeadline:h.nextDeadline,noticeDismissal:u,optOutDirectives:d,overrides:e.initialOverrides?{...e.initialOverrides}:iF,policyPending:s,policyRule:o.rule,policySnapshotToken:e.initialPolicySnapshotToken??null,privacySignals:y,promptRequirement:h.promptRequirement,resolution:i,restrictions:h.restrictions,revision:0,subject:p,translations:e.initialTranslations?{...e.initialTranslations}:null,user:e.initialUser?{...e.initialUser}:null})},iK=function(e,t,n){var i,o;let r,s={now:n,policyPending:!1};t.resolvedOverrides&&(s.overrides={...e.overrides,...t.resolvedOverrides}),void 0!==t.location&&(s.location=t.location),void 0!==t.translations&&(s.translations=t.translations?(i=e.translations,o=t.translations,i?.translations&&o?.translations&&i.language===o.language?{...o,translations:l(i.translations,o.translations)}:o):t.translations),void 0!==t.branding&&(s.branding=t.branding);let a=Object.hasOwn(t,"policyResolution")?tD(t.policyResolution):{policy:null,reason:"invalid-payload",status:"failed"};if(s.resolution=a,"matched"===a.status?s.policySnapshotToken=t.policySnapshotToken??null:s.policySnapshotToken=null,void 0!==t.gvlReference||void 0!==t.gvl||void 0!==t.customVendors||void 0!==t.cmpId){let n=e.iab??iM;r={...n,cmpId:void 0===t.cmpId?n.cmpId:t.cmpId,customVendors:void 0===t.customVendors?n.customVendors:t.customVendors,gvl:void 0===t.gvl?n.gvl:t.gvl,gvlReference:void 0===t.gvl?n.gvlReference:t.gvlReference},void 0!==t.gvlReference&&(r.gvl=t.gvl??null,r.gvlReference=t.gvlReference),t.gvlReference?r.enabled=!0:null===t.gvl&&(r.enabled=!1)}if("matched"!==a.status){let t=r??e.iab;t?.enabled&&(r={...t,enabled:!1})}void 0!==r&&(s.iab=r),t.resolvedPrivacySignals?.gpc!==void 0&&(s.privacyDetected=!0===t.resolvedPrivacySignals.gpc);let c=null;if(t.records){let i=iE(t.records,n);!0===i.ok?(void 0!==i.records.choice&&(s.explicitChoice=iT(e.explicitChoice,i.records.choice)),Object.assign(s,iL(e,i.records,n))):c=i.issues}if(void 0!==t.subjectId){let n=void 0===s.subject?e.subject:s.subject;s.subject={...n,subjectId:t.subjectId}}return{patch:s,recordIssues:c}},iY="privacy-consent-storage",iX="c15t-v3-pending-consent-saves:v1",iQ=function(e,t){let n=tU.filter(t=>Object.hasOwn(e.confirmed.categories,t)),i=n.filter(t);if(i.length===n.length)return e;if(0===i.length)return null;let o={},r={},s={experience:!1,functionality:!1,marketing:!1,measurement:!1,necessary:!0};for(let t of i){let n=e.choice.categories[t];n&&(o[t]=n.value,r[t]=n,s[t]=e.consents[t])}return{...e,choice:{categories:r,version:3},confirmed:{...e.confirmed,categories:o},consentAction:"custom",consents:s,tcString:null}},iZ=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},i0=function(e){return void 0===e||"string"==typeof e},i1=function(e){var t;return null===e||!!iZ(e)&&"string"==typeof e.externalId&&i0(e.externalIdType)&&i0(e.identityProvider)&&(void 0===e.properties||iZ(t=e.properties)&&Object.values(t).every(e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e))},i2=function(e){if(!iZ(e)||!iZ(e.categories)||"number"!=typeof e.actionAt||!Number.isSafeInteger(e.actionAt)||e.actionAt<0)return!1;let t=new Set(tU);return Object.entries(e.categories).every(([e,n])=>t.has(e)&&"boolean"==typeof n)},i5=function(e){var t,n,i;let o;if(!iZ(e)||!(iZ(t=e.subject)&&i0(t.subjectId)&&i0(t.externalId)&&i0(t.identityProvider))||!(void 0===(o=e.decisionInputs)||iZ(o)&&(null===o.policyId||"string"==typeof o.policyId&&o.policyId.length>0&&"string"==typeof o.fingerprint&&o.fingerprint.length>0)&&(null===o.country||"string"==typeof o.country)&&(null===o.region||"string"==typeof o.region)&&"string"==typeof o.language&&"boolean"==typeof o.gpc)||!i2(e.confirmed)||!tY(e.choice,Date.now()).ok)return!1;let r=null===e.model||"opt-in"===e.model||"opt-out"===e.model||"iab"===e.model||"none"===e.model,s=null===e.uiSource||"none"===e.uiSource||"banner"===e.uiSource||"dialog"===e.uiSource,a="all"===e.consentAction||"necessary"===e.consentAction||"custom"===e.consentAction;return"string"==typeof e.subjectId&&iZ(n=e.consents)&&Object.values(n).every(e=>"boolean"==typeof e)&&iZ(e.overrides)&&i1(e.user)&&r&&s&&a&&(void 0===(i=e.givenAt)||"number"==typeof i&&Number.isFinite(i))&&(null===e.policySnapshotToken||"string"==typeof e.policySnapshotToken)&&(void 0===e.tcString||null===e.tcString||"string"==typeof e.tcString)},i3=function(){if("u"<typeof window)return null;try{return window.localStorage}catch{return null}},i6=function(){if("u"<typeof navigator)return null;try{let{locks:e}=navigator;return e&&"function"==typeof e.request?e:null}catch{return null}},i8=async function(e){let t=i6();if(!t)return e();try{return await t.request(iX,e)}catch{return e()}},i4=function(e,t){try{if(0===t.length)return void e.removeItem(iX);e.setItem(iX,JSON.stringify(t))}catch{}},i7=function(e,t){return e.subjectId!==t.subjectId||e.confirmed.actionAt>t.confirmed.actionAt?e:iQ(e,e=>!Object.hasOwn(t.confirmed.categories,e))},i9=function(e,t){if(!Array.isArray(e))return[];let n=t-6048e5,i=[];for(let t of e)iZ(t)&&i5(t.payload)&&"number"==typeof t.queuedAt&&Number.isFinite(t.queuedAt)&&t.queuedAt>=0&&"number"==typeof t.attempts&&Number.isInteger(t.attempts)&&t.attempts>=0&&!(t.queuedAt<n)&&!(t.attempts>=10)&&i.push(t);return i.sort((e,t)=>e.payload.confirmed.actionAt-t.payload.confirmed.actionAt||e.queuedAt-t.queuedAt),i.flatMap((e,t)=>{let n=e.payload;for(let e of i.slice(t+1))n&&(n=i7(n,e.payload));return n?[{...e,payload:n}]:[]})},oe=function(e){try{let t=e.getItem(iX);if(!t)return[];let n=JSON.parse(t),i=i9(n,Date.now());return JSON.stringify(i)!==JSON.stringify(n)&&i4(e,i),i}catch{return i4(e,[]),[]}},ot=function(e,t){return e.queuedAt===t.queuedAt&&e.attempts===t.attempts&&JSON.stringify(e.payload)===JSON.stringify(t.payload)},on=function(e,t,n){let i=[];for(let o of oe(e)){if(!ot(o,t)){i.push(o);continue}let e=o.attempts+1;!n&&e<10&&i.push({...o,attempts:e})}i4(e,i)},oi=function(e){let t=null,n=async function(t,n){if(!await i8(()=>oe(t).some(e=>ot(e,n))))return null;let i=!1;try{({ok:i}=await e.save(n.payload))}catch{}return await i8(()=>on(t,n,i)),i},i=async function(){let t=i3();if(!t)return!1;for(let i of(await i8(()=>oe(t)))){let o=await n(t,i);null!==o&&e.emit({ok:o,subjectId:i.payload.subjectId,type:"save:replayed"})}return(await i8(()=>oe(t))).length>0};return{discard:async function(e){let t=i3();t&&await i8(()=>{let n=oe(t),i=n.flatMap(t=>{let n=i7(t.payload,e);return n?[{...t,payload:n}]:[]});JSON.stringify(i)!==JSON.stringify(n)&&i4(t,i)})},enqueue:async function(e){let t=i3();t&&await i8(()=>{let n=oe(t);n.push({attempts:0,payload:e,queuedAt:Date.now()}),i4(t,i9(n,Date.now()))})},replay:async function(){if(t)return t;t=i();try{return await t}finally{t=null}}}},oo=function(e,t){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:t},or=function(){return"production"===globalThis.process?.env?.NODE_ENV},os=function(e){if(or())return;let t=null===e?"No retry is scheduled.":`A retry is scheduled in ${e} ms.`;console.warn(`[c15t] Backend/manifest init failed. The consent banner is withheld and optional categories stay denied. ${t}`)},oa=function(e,t){let n={now:t,policySnapshotToken:null,resolution:{policy:null,reason:"transport",status:"failed"}};return e.iab?.enabled&&(n.iab={...e.iab,enabled:!1}),n},oc=function(e,t,n,i){let o=e.policyRule,r=void 0===i?o.scope:o.scope.filter(e=>i.includes(e)),s=e=>void 0===i?e:Object.fromEntries(r.map(t=>[t,e[t]]));return"all"===n||"none"===n?{consentAction:r.length===o.scope.length?"all"===n?"all":"necessary":"custom",values:s(iO(o,"all"===n))}:void 0===n?{consentAction:"custom",values:s(iP(o,t,e.explicitChoice))}:{consentAction:"custom",values:n}},ol=function(e,t){let n={...e.subject,subjectId:t};return e.user?.externalId&&(n.externalId=e.user.externalId,e.user.identityProvider&&(n.identityProvider=e.user.identityProvider)),n},ou=function(e,t,n,i){return!!(null!==e&&"object"==typeof e&&!Array.isArray(e))&&"iab"===t.model&&"matched"===t.resolution.status&&t.iab?.enabled===!0&&"string"==typeof e.tcString&&e.tcString.length>0&&e.choiceFingerprint===t.evaluationPolicy.choice.fingerprint&&e.confirmedAt===n&&"number"==typeof e.expiresAt&&Number.isSafeInteger(e.expiresAt)&&e.expiresAt>i&&e.expiresAt>n&&e.expiresAt<=n+Math.min(t.evaluationPolicy.choice.maxAgeMs??34128e6,34128e6)&&[e.vendorConsents,e.vendorLegitimateInterests,e.purposeConsents,e.purposeLegitimateInterests,e.specialFeatureOptIns].every(e=>null!==e&&"object"==typeof e&&!Array.isArray(e)&&Object.values(e).every(e=>"boolean"==typeof e))},od=function(e,t,n){n&&t.iab&&(e.iab={...t.iab,authority:iV(n),tcString:n.tcString})},op=function(e){let{runtime:t,transport:n,initRetry:i}=e,{getSnapshot:o,commit:r,emit:s}=t,a=!1===i?null:{baseDelayMs:oo(i?.baseDelayMs,1e3),maxAttempts:Math.max(1,Math.floor(oo(i?.maxAttempts,5))),maxDelayMs:oo(i?.maxDelayMs,3e4)},c=n?.save?oi({emit:s,save:n.save}):null,l=!1,u=0,d=!1,p=!1,f=null,g=!1,m=null,y=0,h=function(){return"u"<typeof window?null:window},v=function(){null!==m&&(clearTimeout(m),m=null)},b=function(){p&&!("u"<typeof document)&&"function"==typeof document.removeEventListener&&(document.removeEventListener("visibilitychange",O),p=!1)},w=function(){l||p||"u"<typeof document||"function"!=typeof document.addEventListener||(document.addEventListener("visibilitychange",O),p=!0)},k=function(){return"u"<typeof document||"hidden"!==document.visibilityState},A=async function(){l||!c||await c.replay()&&$()},I=function(e,n=!0){n&&t.reconcilePrivacy(e),t.armDeadlineTimer()},j=function(e){r({now:e,policyPending:!1})&&s({snapshot:o(),type:"init:applied"})},S=async function(e){if(s({type:"command:init:started"}),t.start(),!n?.init){let e=t.now();j(e),I(e);let n={ok:!0};return s({result:n,type:"command:init:completed"}),A(),n}let i=u,c=t.getGeneration(),d=function(e){let t={error:e,ok:!1};return s({result:t,type:"command:init:completed"}),t};try{let e=o(),a={overrides:e.overrides,user:e.user},l=await n.init(a);if(i!==u)return d(Error("c15t: init attempt superseded by a newer init()"));let p=t.now(),g=o(),m=c===t.getGeneration()&&e.subject?.subjectId===g.subject?.subjectId&&e.user===g.user?l:{...l,records:void 0,subjectId:void 0},y=iK(g,m,p);y.recordIssues&&!or()&&console.warn("[c15t] Ignored invalid server records on init.",y.recordIssues),(r(y.patch)||e.policyPending)&&s({snapshot:o(),type:"init:applied"}),I(p,c===t.getGeneration()),v(),f=null,b();let h={ok:!0};return s({result:h,type:"command:init:completed"}),A(),h}catch(y){var p,g;if(i!==u)return d(y);s({command:"init",error:y,type:"command:error"});let n=t.now();r(oa(o(),n)),I(n,c===t.getGeneration());let f=a&&e<a.maxAttempts&&!l?(p=a,g=e,Math.floor(Math.min(p.baseDelayMs*2**(g-1),p.maxDelayMs)*(.5+.5*Math.random()))):null;s({attempt:e,error:y,nextRetryMs:f,type:"init:failed"}),os(f),null!==f&&x(e+1,f);let m={error:y,ok:!1};return s({result:m,type:"command:init:completed"}),m}},C=async function(e){try{await S(e)}finally{g=!1}},P=function(){if(l||g||null===f)return;if(!k())return void w();let e=f;f=null,b(),g=!0,C(e)},O=function(){k()&&P()},x=function(e,t){l||(v(),f=e,$(),m=setTimeout(()=>{m=null,P()},t))},D=function(){l||(A(),null!==f&&(v(),P()))},$=function(){let e=h();l||d||!e||"function"!=typeof e.addEventListener||(e.addEventListener("online",D),d=!0)},R=async function(e,i){if(!n?.loadSubjectRecord||!e)return;let r=t.getGeneration();try{let a=await n.loadSubjectRecord(e),c=i!==y||t.getGeneration()!==r||(o().subject?.subjectId??null)!==e;if(a&&!c){let e=t.mergeServerRecords(a);!1===e.ok&&s({command:"loadSubjectRecord",error:Error("c15t: server record rejected by validation"),type:"command:error"})}}catch(e){s({command:"loadSubjectRecord",error:e,type:"command:error"})}},E=async function(e,i,a,l){let u=()=>{let n=o();return t.getGeneration()!==i||n.user!==l.user||n.evaluationPolicy.choice.fingerprint!==l.evaluationPolicy.choice.fingerprint?null:iQ(e,e=>n.explicitChoice?.categories[e]===l.explicitChoice?.categories[e])},d=n?.save;if(!d)return{confirmed:a,ok:!0,subjectId:e.subjectId};try{await new Promise(e=>{setTimeout(e,0)});let e=u();if(!e)return{confirmed:a,ok:!1};let n=await d(e),i=u();if(!i||(n.ok?await c?.discard(i):(await c?.enqueue(i),$()),!u()))return{...n,confirmed:a};return n.ok&&(n.subjectId&&n.subjectId!==o().subject?.subjectId&&o().explicitChoice===l.explicitChoice&&o().subject?.subjectId===l.subject?.subjectId&&(r({subject:{...o().subject,subjectId:n.subjectId}}),s({snapshot:o(),type:"subject:resolved"})),t.flushPrivacy()),{...n,confirmed:a}}catch(t){s({command:"save",error:t,type:"command:error"});let e=u();return e&&(await c?.enqueue(e),$()),{confirmed:a,ok:!1}}};return{commands:{dismissNotice(){let e=o();if("notice"!==e.promptRequirement.kind)return Promise.resolve({ok:!1,reason:"not-required"});let n=t.now(),i={dismissedAt:n,fingerprint:e.evaluationPolicy.notice.fingerprint,version:1};return r({noticeDismissal:i,now:n}),s({dismissal:i,snapshot:o(),type:"notice:dismissed"}),t.armDeadlineTimer(),Promise.resolve({dismissal:i,ok:!0})},async identify(e){let i=y+=1,a=t.getGeneration(),{subject:c,iab:l}=o(),u=c?.subjectId??null,d={user:{...e}};if(l&&(d.iab={...l,authority:null,tcString:null}),r(d),s({snapshot:o(),type:"user:identified"}),n?.identify)try{await n.identify({...e},u)}catch(e){throw s({command:"identify",error:e,type:"command:error"}),e}i===y&&t.getGeneration()===a&&(o().subject?.subjectId??null)===u&&(t.flushPrivacy(),await R(u,i))},init:()=>(l=!1,t.rearm(),u+=1,v(),f=null,b(),S(1)),async save(e,n){let i=t.now(),a=n?.actionAt===void 0?i:n.actionAt;if(!Number.isSafeInteger(a)||!(a>=0)||!(a<=i))return{issues:[{code:"invalid-timestamp",path:"actionAt"}],ok:!1};if(n?.iabAuthority!==void 0&&!ou(n.iabAuthority,o(),a,i))return{ok:!1};s({type:"command:save:started"});let c=o(),l="none"!==c.evaluationPolicy.model?null:{confirmed:[],ok:!0,subjectId:c.subject?.subjectId};if(l)return s({result:l,type:"command:save:completed"}),l;let u=c.activeUI,{values:d,consentAction:p}=oc(c,t.getDraft(),e,n?.categories),f=ia(c.explicitChoice,d,{actionAt:a,now:i,policy:c.evaluationPolicy});if(!1===f.ok){let e={issues:f.issues,ok:!1};return s({result:e,type:"command:save:completed"}),e}if(0===f.confirmed.length){let e={confirmed:[],ok:!0,subjectId:c.subject?.subjectId};return s({result:e,type:"command:save:completed"}),e}let g=c.subject?.subjectId??iu(),m=ol(c,g);t.setDraft(null);let y={explicitChoice:f.choice,now:i,subject:m};od(y,c,n?.iabAuthority),r(y);let h=o(),v=t.getGeneration(),b={};for(let e of f.confirmed){let t=f.choice.categories[e];t&&(b[e]=t.value)}s({actionAt:a,confirmed:f.confirmed,snapshot:h,type:"choice:recorded"}),t.armDeadlineTimer();let w={choice:f.choice,confirmed:{actionAt:a,categories:b},consentAction:p,consents:h.effectivePermissions,..."no-match"!==h.resolution.status&&"matched"!==h.resolution.status?{}:{decisionInputs:{country:h.location?h.location.countryCode:h.overrides.country??null,fingerprint:"matched"===h.resolution.status?h.resolution.fingerprints.policy:void 0,gpc:h.privacySignals.gpc.active,language:h.translations?.language??h.overrides.language??"en",policyId:"matched"===h.resolution.status?h.resolution.policyId:null,region:h.location?h.location.regionCode:h.overrides.region??null}},givenAt:a,model:h.model,overrides:h.overrides,policySnapshotToken:h.policySnapshotToken,subject:m,subjectId:g,tcString:h.iab?.tcString??null,uiSource:u,user:h.user},k=await E(w,v,f.confirmed,h);return s({result:k,type:"command:save:completed"}),k}},dispose:function(){if(l)return;l=!0,v(),f=null,b(),t.stopTimers();let e=h();d&&e&&"function"==typeof e.removeEventListener&&e.removeEventListener("online",D),d=!1}}},of=function(){let e;return{emit(t){let n=e?.get(t.type);if(n)for(let e of n)e(t)},on(t,n){let i=(e??=new Map).get(t);return i||(i=new Set,e.set(t,i)),i.add(n),()=>{i?.delete(n)}}}},og=function(e,t){return void 0===e?t:e},om=function(e,t){let n=og(t.now,e.evaluatedAt);return!e.iab?.authority&&!(n<e.evaluatedAt)&&!!Number.isFinite(n)&&(null===e.nextDeadline||!(n>=e.nextDeadline))&&og(t.privacyDetected,e.privacySignals.gpc.detected)===e.privacySignals.gpc.detected&&og(t.explicitChoice,e.explicitChoice)===e.explicitChoice&&og(t.noticeDismissal,e.noticeDismissal)===e.noticeDismissal&&og(t.optOutDirectives,e.optOutDirectives)===e.optOutDirectives&&og(t.resolution,e.resolution)===e.resolution&&og(t.subject,e.subject)===e.subject&&og(t.overrides,e.overrides)===e.overrides&&og(t.user,e.user)===e.user&&og(t.location,e.location)===e.location&&og(t.translations,e.translations)===e.translations&&og(t.branding,e.branding)===e.branding&&og(t.policySnapshotToken,e.policySnapshotToken)===e.policySnapshotToken&&og(t.activeUI,e.activeUI)===e.activeUI&&og(t.policyPending,e.policyPending)===e.policyPending&&og(t.iab,e.iab)===e.iab},oy=function(e,t){if(e===t)return!0;for(let n of Object.keys(t))if(e[n]!==t[n])return!1;return Object.keys(e).length===Object.keys(t).length},oh=function(e,t){if(e===t)return!0;for(let n of tU){let i=e[n],o=t[n];if(i!==o&&(!i||!o||i.length!==o.length||i.some((e,t)=>e!==o[t])))return!1}return!0},ov=function(e,t){var n,i,o,r,s,a,c;let l=og(t.resolution,e.resolution),u=l!==e.resolution,d=u?iI(l):null,p=d?d.rule:e.policyRule,f=d?ij(d):e.evaluationPolicy,g=og(t.explicitChoice,e.explicitChoice),m=og(t.noticeDismissal,e.noticeDismissal),y=(n=e.optOutDirectives,void 0===(i=t.optOutDirectives)||i===n||i.length===n.length&&i.every((e,t)=>{let i=n[t];return void 0!==i&&e.source===i.source&&e.recordedAt===i.recordedAt&&e.categories.length===i.categories.length&&e.categories.every((e,t)=>e===i.categories[t])})?n:i),h=og(t.overrides,e.overrides),v=og(t.privacyDetected,e.privacySignals.gpc.detected),b=(o=h.gpc,{gpc:{active:o??v,detected:v,override:o}}),w=(r=e.privacySignals,b.gpc.active===r.gpc.active&&b.gpc.detected===r.gpc.detected&&b.gpc.override===r.gpc.override)?e.privacySignals:b,k=og(t.now,e.evaluatedAt),A=og(t.iab,e.iab);A?.authority&&(!A.enabled||"matched"!==l.status||"iab"!==p.model||A.authority.choiceFingerprint!==f.choice.fingerprint)&&(A={...A,authority:null});let I=f===e.evaluationPolicy&&g===e.explicitChoice&&m===e.noticeDismissal&&y===e.optOutDirectives&&w.gpc.active===e.privacySignals.gpc.active&&k>=e.evaluatedAt&&(null===e.nextDeadline||k<e.nextDeadline)?{nextDeadline:e.nextDeadline,permissions:e.effectivePermissions,promptRequirement:e.promptRequirement,restrictions:e.restrictions}:n6({choice:g,gpc:w.gpc.active,noticeDismissal:m,now:k,optOuts:y,policy:f}),j=oy(e.effectivePermissions,I.permissions)?e.effectivePermissions:I.permissions,S=(s=e.promptRequirement,a=I.promptRequirement,s.kind===a.kind&&("none"===s.kind||"none"===a.kind||s.reason===a.reason))?e.promptRequirement:I.promptRequirement,C=oh(e.restrictions,I.restrictions)?e.restrictions:I.restrictions,P=og(t.policyPending,e.policyPending),O=S!==e.promptRequirement,x=u||P!==e.policyPending,D=void 0!==(c={current:e,derive:O||x,patch:t,policyPending:P,policyRule:p,promptRequirement:S,resolution:l}).patch.activeUI?c.patch.activeUI:c.derive?iC({policyPending:c.policyPending,promptRequirement:c.promptRequirement,resolution:c.resolution}):c.current.activeUI,$=og(t.subject,e.subject);return{activeUI:D,branding:og(t.branding,e.branding),effectivePermissions:j,evaluatedAt:k,evaluationPolicy:f,explicitChoice:g,iab:A,location:og(t.location,e.location),model:iS(p,A?.enabled??!1),nextDeadline:I.nextDeadline,noticeDismissal:m,optOutDirectives:y,overrides:h,policyPending:P,policyRule:p,policySnapshotToken:og(t.policySnapshotToken,e.policySnapshotToken),privacySignals:w,promptRequirement:S,resolution:l,restrictions:C,revision:e.revision+1,subject:$,translations:og(t.translations,e.translations),user:og(t.user,e.user)}},ob=function(e,t){for(let n of Object.keys(t))if("revision"!==n&&"evaluatedAt"!==n&&e[n]!==t[n])return!0;return!1},ow=function(){if("u"<typeof navigator)return!1;try{let e=navigator.globalPrivacyControl;return!0===e}catch{return!1}},ok=function(){return"u">typeof document&&"function"==typeof document.addEventListener&&"function"==typeof document.removeEventListener},oA=function(e){let t,n,i,{emit:o,transport:r}=e,s=e.initialSnapshot,a=e.initialDraft?{fingerprint:s.evaluationPolicy.choice.fingerprint,values:e.initialDraft}:null,c=!1,l=!1,u=0,d=null,p=!1,f=()=>Date.now(),g=function(){if(i)for(let e of i)e(s)},m=function(e){let t=s;if(om(t,e))return!1;let n=ov(t,e);return!!ob(t,n)&&(s=iW(n),g(),s.effectivePermissions!==t.effectivePermissions&&o({previous:t.effectivePermissions,snapshot:s,type:"permissions:changed"}),!0)},y=function(){null!==d&&(clearTimeout(d),d=null)},h=function(){"u">typeof document&&"hidden"!==document.visibilityState&&I()},v=function(){p&&ok()&&document.removeEventListener("visibilitychange",h),p=!1},b=function(){!p&&!l&&ok()&&(document.addEventListener("visibilitychange",h),p=!0)},w=function(){if(y(),l||!c)return;let e=s.nextDeadline;null===e?v():(b(),d=setTimeout(()=>{d=null,I()},Math.min(Math.max(Math.ceil(e-f()),1),0x7fffffff)))},k=async function(e,i,s){let a={},c=u;(n??=new Map).set(s,a);try{await r?.recordPrivacyOptOut?.(e,i),u===c&&(t??=new Set).add(s)}catch(e){o({command:"recordPrivacyOptOut",error:e,type:"command:error"})}finally{n.get(s)===a&&n.delete(s)}},A=function(){let{subject:e,user:i}=s,o=e?.subjectId;if(r?.recordPrivacyOptOut&&o&&i)for(let e of s.optOutDirectives){let i=JSON.stringify([o,`${e.source}:${e.recordedAt}:${e.categories.join(",")}`]);t?.has(i)||n?.has(i)||k(e,o,i)}},I=function(e=f()){return m({now:e}),w(),s},j=function(){l=!1,!c&&(c=!0,ow()&&m({privacyDetected:!0}))},S=function(e,i){let o=e.now??f(),r=iE(e,o);if(!1===r.ok)return r;j();let{choice:a,...c}=r.records,l=i?iL(s,c,o):{...c,now:o};void 0!==a&&(l.explicitChoice=i?iT(s.explicitChoice,a):a);let d=s,p=!i&&(null===a||null===c.subject);p&&s.iab&&(l.iab={...s.iab,authority:null,tcString:null});let g=m(l);return p&&(t?.clear(),n?.clear()),(p||s.explicitChoice!==d.explicitChoice||s.subject!==d.subject)&&(u+=1),w(),{changed:g,ok:!0}};return{armDeadlineTimer:w,commit:m,emit:o,flushPrivacy:A,getDraft:()=>a&&a.fingerprint===s.evaluationPolicy.choice.fingerprint?a.values:null,getGeneration:()=>u,getSnapshot:()=>s,hydrate:function(e){return S(e,!1)},invalidateRecords:()=>{u+=1},isStarted:()=>c,mergeServerRecords:function(e){return S(e,!0)},now:f,rearm(){l=!1},reconcilePrivacy:function(e){if(!c)return;A();let t=s,{gpc:n}=t.privacySignals;if(!(n.active&&n.detected))return;let i=t.policyRule.privacySignals.gpc.denyCategories;if(0===i.length)return;let r=new Set;for(let e of t.optOutDirectives)for(let t of e.categories)r.add(t);if(i.every(e=>r.has(e)))return;let a={categories:[...i],recordedAt:e,source:"gpc"};m({now:e,optOutDirectives:[...t.optOutDirectives,a]}),o({directive:a,snapshot:s,type:"privacy:opt-out"}),A()},refresh:I,setDraft(e){a=e?{fingerprint:s.evaluationPolicy.choice.fingerprint,values:e}:null},start:j,stopTimers:function(){l=!0,y(),v()},subscribe:e=>((i??=new Set).add(e),()=>{i?.delete(e)})}},oI=function(e,t){let n=e??iM,i={...n,...t};void 0!==t.authority&&t.authority!==n.authority&&(i.authority=iV(t.authority));let o=!1;for(let e of Object.keys(i))if(i[e]!==n[e]){o=!0;break}return!e&&t&&(o=!0),{changed:o,next:i}},oj=function(e,t){let n=iG(t);return n?{...e,...n}:e},oS=function(e){let{getSnapshot:t,commit:n,emit:i}=e;return{activeUI(e){n({activeUI:e})},draft(t){e.setDraft(oj(e.getDraft(),t))},iab(e){let{next:o,changed:r}=oI(t().iab,e);r&&n({iab:o})&&i({snapshot:t(),type:"iab:set"})},language(e){let o=t();o.overrides.language!==e&&(n({overrides:{...o.overrides,language:e}}),i({snapshot:t(),type:"overrides:set"}))},overrides(o){let r=t(),s=e.now();n({now:s,overrides:{...r.overrides,...o}}),i({snapshot:t(),type:"overrides:set"}),e.reconcilePrivacy(s),e.armDeadlineTimer()},privacySignals(t){if(void 0===t.gpc)return;let i=e.now();n({now:i,privacyDetected:!0===t.gpc}),e.reconcilePrivacy(i),e.armDeadlineTimer()},subjectId(i){let{subject:o,iab:r}=t(),s=r?{iab:{...r,authority:null,tcString:null}}:{};if((o?.subjectId??null)!==i){if(e.invalidateRecords(),null===i){let{subjectId:e,...t}=o??{};n({subject:Object.keys(t).length>0?t:null,...s});return}n({subject:{...o,subjectId:i},...s})}}}},oC=function(e={}){let{transport:t}=e,n=of(),i=iJ(e),o=oA({emit:n.emit,initialDraft:iG(e.initialDraft),initialSnapshot:i,transport:t}),r=oS(o),s=op({initRetry:e.initRetry,runtime:o,transport:t});return{commands:s.commands,dispose:s.dispose,events:{emit:n.emit,on:n.on},getRecordsGeneration:o.getGeneration,getServerSnapshot:()=>i,getSnapshot:o.getSnapshot,hydrate:o.hydrate,refresh:o.refresh,set:r,subscribe:o.subscribe}},oP=[{defaultValue:!0,description:"These trackers are used for activities that are strictly necessary to operate or deliver the service you requested from us and, therefore, do not require you to consent.",disabled:!0,display:!0,gdprType:1,name:"necessary"},{defaultValue:!1,description:"These trackers enable basic interactions and functionalities that allow you to access selected features of our service and facilitate your communication with us.",display:!1,gdprType:2,name:"functionality"},{defaultValue:!1,description:"These trackers help us to measure traffic and analyze your behavior to improve our service.",display:!1,gdprType:4,name:"measurement"},{defaultValue:!1,description:"These trackers help us to improve the quality of your user experience and enable interactions with external content, networks, and platforms.",display:!1,gdprType:3,name:"experience"},{defaultValue:!1,description:"These trackers help us to deliver personalized ads or marketing content to you, and to measure their performance.",display:!1,gdprType:5,name:"marketing"}].map(e=>e.name),oO=function(e){return{consents:ii(e).effectivePermissions}},ox=function(e){let t=e.getAttribute("data-category");if(t){if(!oP.includes(t))throw Error(`c15t iframe-blocker: invalid data-category "${t}". Must be one of: ${oP.join(", ")}`);return t}},oD=function(e,t){let n=ox(e);if(!n)return;let i=n9(n,t.consents),o=e.getAttribute("data-src");if(i){if(o&&!e.getAttribute("src")){let t;try{t=new URL(o,e.ownerDocument.baseURI)}catch{return}if("http:"!==t.protocol&&"https:"!==t.protocol)return;e.setAttribute("src",t.href),e.removeAttribute("data-src")}return}let r=e.getAttribute("src");r&&(o||e.setAttribute("data-src",r),e.removeAttribute("src"))},o$=function(e){let t=document.querySelectorAll("iframe"),n=oO(e);for(let e of Array.from(t))oD(e,n)},oR=function(e){let{kernel:t}=e,n=!0===e.disableAutomaticBlocking;if(!("u">typeof document&&"u">typeof MutationObserver)){let e=t.subscribe(()=>{});return{dispose(){e()},processAllIframes(){}}}let i=new MutationObserver(e=>{let n=oO(t.getSnapshot());for(let t of e)for(let e of Array.from(t.addedNodes)){if(1!==e.nodeType)continue;e.tagName?.toUpperCase()==="IFRAME"&&oD(e,n);let t=e.querySelectorAll?.("iframe");if(t)for(let e of Array.from(t))oD(e,n)}}),o=function(){o$(t.getSnapshot())};!n&&(o(),document.body&&i.observe(document.body,{childList:!0,subtree:!0}));let r=null,s=null,a=null,c=t.subscribe(e=>{n||(e.effectivePermissions!==r||e.policyRule.scope!==s||e.policyRule.scopeMode!==a)&&(r=e.effectivePermissions,s=e.policyRule.scope,a=e.policyRule.scopeMode,o())});return{dispose(){i.disconnect(),c()},processAllIframes:o}},oE=function(e){return e?e.toUpperCase():"GET"},oT=function(e){try{if(e instanceof URL)return e;if("string"==typeof e){if("u"<typeof window)return null;return new URL(e,window.location?.href)}if("u">typeof Request&&e instanceof Request)return new URL(e.url);return null}catch{return null}},oL=function(e,t){if(!e)return!1;let n=t.domain.trim().toLowerCase(),i=e.trim().toLowerCase();return!!n&&!!i&&(i===n||i.endsWith(`.${n}`))},oM=function(e,t){if(!t.methods||0===t.methods.length)return!0;let n=oE(e);return t.methods.some(e=>oE(e)===n)},oU=function(e,t,n,i){for(let r of n){var o;if(oL(e.hostname,r)){if((o=e.pathname,("string"!=typeof r.pathIncludes||o&&o.includes(r.pathIncludes))&&oM(t,r))&&!ir(r,i))return{rule:r,shouldBlock:!0}}}return{shouldBlock:!1}},oq=function(e){let t=window.fetch.bind(window),n=function(n,i){if(!e.isEnabled())return t(n,i);let o=oE(i?.method??("u">typeof Request&&n instanceof Request?n.method:void 0)),r=oT(n);if(!r)return t(n,i);let s=oU(r,o,e.getRules(),e.getSnapshot());return s.shouldBlock?(e.notifyBlocked({method:o,rule:s.rule,url:r.toString()}),Promise.resolve(new Response(null,{status:451,statusText:"Request blocked by consent"}))):t(n,i)};return window.fetch=n,()=>{window.fetch===n&&(window.fetch=t)}},o_=Symbol("c15t-xhr-method"),oN=Symbol("c15t-xhr-url"),oF=function(e){let t=XMLHttpRequest.prototype.open,n=XMLHttpRequest.prototype.send,i=function(e,n,...i){return this[o_]=oE(e),this[oN]="string"==typeof n?n:n.toString(),t.call(this,e,n,...i)},o=function(t){if(!e.isEnabled())return n.call(this,t);let i=this[o_]??"GET",o=oT(this[oN]??"");if(!o)return n.call(this,t);let r=oU(o,i,e.getRules(),e.getSnapshot());if(!r.shouldBlock)return n.call(this,t);e.notifyBlocked({method:i,rule:r.rule,url:o.toString()}),this.abort();let s="u"<typeof ProgressEvent?{type:"error"}:new ProgressEvent("error");"function"==typeof this.onerror&&this.onerror(s),this.dispatchEvent(s)};return XMLHttpRequest.prototype.open=i,XMLHttpRequest.prototype.send=o,()=>{XMLHttpRequest.prototype.open===i&&(XMLHttpRequest.prototype.open=t),XMLHttpRequest.prototype.send===o&&(XMLHttpRequest.prototype.send=n)}},oB=function(e){let{kernel:t,onRequestBlocked:n}=e,i=e.logBlockedRequests??!0,o=[...e.rules??[]],r=!1!==e.enabled,s=t.getSnapshot(),a=t.subscribe(e=>{s=e});if(!("u">typeof window&&"u">typeof XMLHttpRequest&&"function"==typeof window.fetch))return{dispose(){a()},setEnabled(e){r=e},updateRules(e){o=[...e]}};let c={getRules:()=>o,getSnapshot:()=>s,isEnabled:()=>r,notifyBlocked:function(e){if(i&&console.warn(`[c15t] blocked ${e.method} ${e.url}${e.rule?.id?` (rule: ${e.rule.id})`:""}`),n)try{n(e)}catch{}}},l=oq(c),u=oF(c);return{dispose(){a(),l(),u()},setEnabled(e){r=e},updateRules(e){o=[...e]}}},oz=["subjectId","externalId","identityProvider"],oG=function(e,t){let n={},i=!1;for(let o of oz){let r=tV(e,o);if(void 0!==r){if("string"!=typeof r){t.push({code:"invalid-identifier",path:`consentInfo.${o}`});continue}r.length>0&&(n[o]=r,i=!0)}}return i?n:null},oV=function(e,t){let n=tV(e,"materialPolicyFingerprint");return void 0===n||""===n?{kind:"legacy-v2"}:tW(n)?{kind:"legacy-v2",materialFingerprint:n}:(t.push({code:"invalid-fingerprint",path:"consentInfo.materialPolicyFingerprint"}),{kind:"legacy-v2"})},oH=function(e,t){if(null==e)return{issues:[],ok:!1,reason:"empty"};if(!tz(e))return{issues:[{code:"not-an-object",path:""}],ok:!1,reason:"malformed"};if(Object.hasOwn(e,"version"))return{issues:[{code:"unsupported-version",path:"version"}],ok:!1,reason:"unsupported-version"};let n=tV(e,"consentInfo"),i=tV(e,"consents");if(!tz(n))return{issues:[{code:"not-an-object",path:"consentInfo"}],ok:!1,reason:"malformed"};if("string"==typeof tV(n,"id")&&"string"!=typeof tV(n,"subjectId"))return{issues:[{code:"unsupported-version",path:"consentInfo.id"}],ok:!1,reason:"unsupported-version"};if(!tz(i))return{issues:[{code:"not-an-object",path:"consents"}],ok:!1,reason:"malformed"};let o=[],r=tV(n,"time"),s=tH(r,t.now);s&&o.push({code:s,path:"consentInfo.time"});let a=oG(n,o),c=oV(n,o),l=new Map;for(let e of tG(i)){let t=i[e];if("necessary"===e){"boolean"!=typeof t&&o.push({code:"invalid-boolean",path:`consents.${e}`});continue}if(tB(e)){if("boolean"!=typeof t){o.push({code:"invalid-boolean",path:`consents.${e}`});continue}l.set(e,t)}}if(o.length>0)return{issues:o,ok:!1,reason:"malformed"};let u={};for(let e of tU){let n=l.get(e);if(void 0===n&&"compact"===t.encoding&&(n=!1),void 0===n)continue;let i={basis:{...c},confirmedAt:r,value:n};u[e]=i}return{choice:{categories:u,version:3},ok:!0,subject:a}},oW={consentInfo:"i",consents:"c",externalId:"eid",iabCustomVendorConsents:"icv",iabCustomVendorLegitimateInterests:"icvli",id:"id",identityProvider:"idp",materialPolicyFingerprint:"mpf",subjectId:"sid",time:"t",timestamp:"ts",type:"y"},oJ=Object.entries(oW).reduce((e,[t,n])=>(e[n]=t,e),{}),oK=function(e){let t={};for(let[n,i]of Object.entries(e))t[n.split(".").map(e=>oW[e]||e).join(".")]=i;return t},oY=function(e){let t={};for(let[n,i]of Object.entries(e))t[n.split(".").map(e=>oJ[e]||e).join(".")]=i;return t},oX=function e(t,n=""){let i={};for(let[o,r]of Object.entries(t)){let t=n?`${n}.${o}`:o;null==r?i[t]="":"boolean"==typeof r?r&&(i[t]="1"):"object"!=typeof r||Array.isArray(r)?i[t]=String(r):Object.assign(i,e(r,t))}return i},oQ=function(e){if(!e)return{};let t={};for(let n of e.split(",")){let e=n.indexOf(":");if(-1===e)continue;let i=n.substring(0,e),o=n.substring(e+1);t[i]=o}return t},oZ=function(e){return{crossSubdomain:e?.crossSubdomain??!1,domain:e?.defaultDomain??"",expiryDays:e?.defaultExpiryDays??365,path:"/",sameSite:"Lax",secure:"u">typeof window&&"https:"===window.location.protocol}},o0=function(){if("u"<typeof window)return"";let{hostname:e}=window.location;if("localhost"===e||/^\d+\.\d+\.\d+\.\d+$/u.test(e))return e;let t=e.split(".");return t.length>=2?`.${t.slice(-2).join(".")}`:e},o1=function(e,t){if(!e)return;let n=`${t}=`;for(let t of e.split(";")){let e=t.trim();if(e.startsWith(n))return e.substring(n.length)}},o2=function(e,t,n,i){let o,r;if("u"<typeof document)return{attempted:!1,verified:!1};let s={...oZ(i),...n};s.crossSubdomain&&!n?.domain&&(s.domain=o0());try{var a;a=t,o="string"==typeof a?a:Object.entries(oK(oX(a))).map(([e,t])=>`${e}:${t}`).join(",");let n=new Date;n.setTime(n.getTime()+24*s.expiryDays*36e5);let i=`expires=${n.toUTCString()}`,r=[`${e}=${o}`,i,`path=${s.path}`];s.domain&&r.push(`domain=${s.domain}`),s.secure&&r.push("secure"),s.sameSite&&r.push(`SameSite=${s.sameSite}`),document.cookie=r.join("; ")}catch(e){return{attempted:!1,error:e,verified:!1}}try{r=o1(document.cookie,e)}catch{r=void 0}return{attempted:!0,verified:r===o}},o5=function(e,t){if("u"<typeof document)return t?.(),null;try{return o1(document.cookie,e)??null}catch(n){return console.warn(`Failed to get cookie "${e}":`,n),t?.(),null}},o3=function(e,t,n){if("u"<typeof document)return;let i={...oZ(n),...t};i.crossSubdomain&&!t?.domain&&(i.domain=o0());try{let t=[`${e}=`,"expires=Thu, 01 Jan 1970 00:00:00 GMT",`path=${i.path}`];i.domain&&t.push(`domain=${i.domain}`),document.cookie=t.join("; ")}catch(t){console.warn(`Failed to delete cookie "${e}":`,t)}},o6=function(e,t){let n=t?.storageKey||"c15t";try{"u">typeof window&&window.localStorage&&(window.localStorage.removeItem(n),n!==iY&&window.localStorage.removeItem(iY))}catch(e){console.warn("Failed to remove consent from localStorage:",e)}try{o3(n,e,t),n!==iY&&o3(iY,e,t)}catch(e){console.warn("Failed to remove consent cookie:",e)}},o8={experience:"ex",functionality:"fn",marketing:"mk",measurement:"me"},o4=new Map(Object.entries(o8).map(([e,t])=>[t,e])),o7={externalId:"eid",identityProvider:"idp",subjectId:"sid"},o9=new Map(Object.entries(o7).map(([e,t])=>[t,e])),re={customVendorConsents:"icv",customVendorLegitimateInterests:"icvli"},rt=new Map(Object.entries(re).map(([e,t])=>[t,e])),rn=["subjectId","externalId","identityProvider"],ri=["customVendorConsents","customVendorLegitimateInterests"],ro=/^\d+$/u,rr=function(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},rs=function(e){try{return decodeURIComponent(e)}catch{return null}},ra=function(e,t){if(void 0===e)return;if(!tz(e))return void t.push({code:"not-an-object",path:"subject"});let n={};for(let i of tG(e)){if(!rn.includes(i)){t.push({code:"unknown-key",path:`subject.${i}`});continue}let o=e[i];if(void 0!==o){if(!tW(o)){t.push({code:"invalid-identifier",path:`subject.${i}`});continue}n[i]=o}}return Object.keys(n).length>0?n:void 0},rc=function(e,t,n){if(void 0===e)return;if(!tz(e))return void n.push({code:"not-an-object",path:t});let i={};for(let o of tG(e)){let r=e[o];if("boolean"!=typeof r){n.push({code:"invalid-boolean",path:`${t}.${o}`});continue}rr(i,o,r)}return Object.keys(i).length>0?i:void 0},rl=function(e,t,n,i){let o=rc(e,`${n}.customVendorConsents`,i),r=rc(t,`${n}.customVendorLegitimateInterests`,i);if(!o&&!r)return;let s={};return o&&(s.customVendorConsents=o),r&&(s.customVendorLegitimateInterests=r),s},ru=["version","subject","categories","iab"],rd=function(e,t){let n;if(!tz(e))return{issues:[{code:"not-an-object",path:""}],ok:!1};let i=tY(e,t);if(!1===i.ok)return{issues:i.issues,ok:!1};let o=[];for(let t of tG(e))ru.includes(t)||o.push({code:"unknown-key",path:t});let r=ra(tV(e,"subject"),o),s=tV(e,"iab");if(tz(s)){for(let e of tG(s))ri.includes(e)||o.push({code:"unknown-key",path:`iab.${e}`});n=rl(tV(s,"customVendorConsents"),tV(s,"customVendorLegitimateInterests"),"iab",o)}else void 0!==s&&o.push({code:"not-an-object",path:"iab"});if(o.length>0)return{issues:o,ok:!1};let a={categories:i.record.categories,version:3};return r&&(a.subject=r),n&&(a.iab=n),{ok:!0,record:a}},rp=function(e){var t;return{basis:"choice-v1"===(t=e.basis).kind?{fingerprint:t.fingerprint,kind:"choice-v1"}:void 0===t.materialFingerprint?{kind:"legacy-v2"}:{kind:"legacy-v2",materialFingerprint:t.materialFingerprint},confirmedAt:e.confirmedAt,value:e.value}},rf=function(e){let t={};for(let n of tU){let i=e.categories[n];i&&(t[n]=rp(i))}let n={version:3};return e.subject&&Object.keys(e.subject).length>0&&(n.subject=e.subject),n.categories=t,e.iab&&(n.iab=e.iab),JSON.stringify(n)},rg=function(e){return Object.keys(e).sort().map(t=>`${e[t]?"1":"0"}.${encodeURIComponent(t)}`).join("|")},rm=function(e){let t=["v=3"];for(let n of rn){let i=e.subject?.[n];tW(i)&&t.push(`${o7[n]}=${encodeURIComponent(i)}`)}let n=[],i=new Map,o=[];for(let t of tU){var r;let s=e.categories[t];if(!s)continue;let a="choice-v1"===(r=s.basis).kind?`c${encodeURIComponent(r.fingerprint)}`:void 0===r.materialFingerprint?"l":`l${encodeURIComponent(r.materialFingerprint)}`,c=i.get(a);void 0===c&&(c=n.length,n.push(a),i.set(a,c)),o.push(`${o8[t]}=${s.value?"1":"0"}.${s.confirmedAt}.${c}`)}for(let i of(n.length>0&&t.push(`b=${n.join("|")}`),t.push(...o),ri)){let n=e.iab?.[i];n&&Object.keys(n).length>0&&t.push(`${re[i]}=${rg(n)}`)}return t.join("&")},ry=function(e,t){if(0===e.length)return t.push({code:"malformed-encoding",path:"b"}),null;let n=[];for(let[i,o]of e.split("|").entries()){let e=`b[${i}]`,r=o.charAt(0),s=o.slice(1),a=s.length>0?rs(s):"";if(null===a){t.push({code:"malformed-encoding",path:e});continue}if("c"===r){if(0===a.length){t.push({code:"invalid-fingerprint",path:e});continue}n.push({fingerprint:a,kind:"choice-v1"});continue}if("l"===r){n.push(0===a.length?{kind:"legacy-v2"}:{kind:"legacy-v2",materialFingerprint:a});continue}t.push({code:"invalid-basis",path:e})}return n},rh=function(e,t,n,i,o){let r,s=e.split(".");if(3!==s.length)return o.push({code:"malformed-encoding",path:t}),null;let[a,c,l]=s,u=!0;"0"!==a&&"1"!==a&&(o.push({code:"invalid-boolean",path:`${t}.value`}),u=!1);let d=null;if(ro.test(c)){let e=tH(d=Number(c),i);e&&(o.push({code:e,path:`${t}.confirmedAt`}),u=!1)}else o.push({code:"invalid-timestamp",path:`${t}.confirmedAt`}),u=!1;return(ro.test(l)&&(r=n[Number(l)]),r||(o.push({code:"invalid-basis",path:`${t}.basis`}),u=!1),u&&null!==d&&r)?{basis:r,confirmedAt:d,value:"1"===a}:null},rv=function(e,t,n){if(0===e.length)return n.push({code:"malformed-encoding",path:t}),null;let i={};for(let[o,r]of e.split("|").entries()){let e=`${t}[${o}]`,s=r.indexOf(".");if(-1===s){n.push({code:"malformed-encoding",path:e});continue}let a=r.slice(0,s),c=rs(r.slice(s+1));if("0"!==a&&"1"!==a||null===c||0===c.length){n.push({code:"malformed-encoding",path:e});continue}if(Object.hasOwn(i,c)){n.push({code:"duplicate-key",path:e});continue}rr(i,c,"1"===a)}return i},rb=function(e,t){let n=new Map;for(let i of e.split("&")){let e=i.indexOf("=");if(e<=0)return t.push({code:"malformed-encoding",path:i}),null;let o=i.slice(0,e);if(n.has(o))return t.push({code:"duplicate-key",path:o}),null;n.set(o,i.slice(e+1))}return n},rw=function(e,t){let n=[];if(!("v=3"===e||e.startsWith("v=3&")))return{issues:[{code:"unsupported-version",path:"v"}],ok:!1};let i=rb(e,n);if(!i)return{issues:n,ok:!1};i.delete("v");let o=i.get("b");i.delete("b");let r=void 0===o?[]:ry(o,n),s={},a={},c={};for(let[e,o]of i){let i=o9.get(e);if(i){let t=rs(o);null===t||0===t.length?n.push({code:"invalid-identifier",path:e}):s[i]=t;continue}let l=o4.get(e);if(l){let i=rh(o,e,r??[],t,n);i&&(a[l]=i);continue}let u=rt.get(e);if(u){let t=rv(o,e,n);t&&(c[u]=t);continue}n.push({code:"unknown-key",path:e})}if(n.length>0)return{issues:n,ok:!1};let l={categories:a,version:3};return Object.keys(s).length>0&&(l.subject=s),Object.keys(c).length>0&&(l.iab=c),{ok:!0,record:l}},rk=function(e,t){let n=tX(e,t);return!1===n.ok?{issues:n.issues,ok:!1}:{ok:!0,record:n.record}},rA=["source","categories","recordedAt"],rI=function(e,t,n,i){if(!tz(e))return i.push({code:"not-an-object",path:t}),null;let o=!0;for(let n of tG(e))rA.includes(n)||(i.push({code:"unknown-key",path:`${t}.${n}`}),o=!1);"gpc"!==tV(e,"source")&&(i.push({code:"invalid-basis",path:`${t}.source`}),o=!1);let r=tV(e,"recordedAt"),s=tH(r,n);s&&(i.push({code:s,path:`${t}.recordedAt`}),o=!1);let a=tV(e,"categories"),c=[];if(Array.isArray(a))for(let[e,n]of a.entries()){if("string"!=typeof n||!tB(n)){i.push({code:"unknown-key",path:`${t}.categories[${e}]`}),o=!1;continue}if(c.includes(n)){i.push({code:"duplicate-key",path:`${t}.categories[${e}]`}),o=!1;continue}c.push(n)}else i.push({code:"not-an-object",path:`${t}.categories`}),o=!1;return o?{categories:[...c].sort(),recordedAt:r,source:"gpc"}:null},rj=function(e,t){if(!tz(e))return{issues:[{code:"not-an-object",path:""}],ok:!1};if(1!==tV(e,"version"))return{issues:[{code:"unsupported-version",path:"version"}],ok:!1};let n=[];for(let t of tG(e))"version"!==t&&"directives"!==t&&n.push({code:"unknown-key",path:t});let i=tV(e,"directives");if(!Array.isArray(i))return n.push({code:"not-an-object",path:"directives"}),{issues:n,ok:!1};let o=[];for(let[e,r]of i.entries()){let i=rI(r,`directives[${e}]`,t,n);i&&o.push(i)}return n.length>0?{issues:n,ok:!1}:{ok:!0,record:{directives:o,version:1}}},rS=function(e,t,n){let i=e.split("&");if(i[0]!==t)return n.push({code:"unsupported-version",path:"v"}),null;let o=new Map;for(let e of i.slice(1)){let t=e.indexOf("=");if(t<=0)return n.push({code:"malformed-encoding",path:e}),null;let i=e.slice(0,t);if(o.has(i))return n.push({code:"duplicate-key",path:i}),null;o.set(i,e.slice(t+1))}return o},rC=function(e){return void 0!==e&&/^\d+$/u.test(e)?Number(e):e},rP=function(e,t){let n=[],i=rS(e,"v=1",n);if(!i)return{issues:n,ok:!1};for(let e of i.keys())"t"!==e&&"f"!==e&&n.push({code:"unknown-key",path:e});if(n.length>0)return{issues:n,ok:!1};let o=i.get("f"),r=void 0===o?void 0:rs(o);return null===r?{issues:[{code:"malformed-encoding",path:"f"}],ok:!1}:rk({dismissedAt:rC(i.get("t")),fingerprint:r,version:1},t)},rO=function(e){let t=e.directives.map(e=>[e.source,String(e.recordedAt),[...e.categories].sort().map(e=>o8[e]).join("-")].join(".")),n=["v=1"];return t.length>0&&n.push(`d=${t.join("|")}`),n.join("&")},rx=function(e,t){let n=[],i=rS(e,"v=1",n);if(!i)return{issues:n,ok:!1};for(let e of i.keys())"d"!==e&&n.push({code:"unknown-key",path:e});if(n.length>0)return{issues:n,ok:!1};let o=i.get("d"),r=[];if(void 0!==o&&""!==o)for(let[e,t]of o.split("|").entries()){let[n,i,o,...s]=t.split(".");if(s.length>0||void 0===n||void 0===o)return{issues:[{code:"malformed-encoding",path:`d[${e}]`}],ok:!1};let a=o.split("-").map(e=>o4.get(e)??e);r.push({categories:a,recordedAt:rC(i),source:n})}return rj({directives:r,version:1},t)},rD=function(e){let t=e?.storageKey||"c15t";return{consent:t,legacyConsent:t===iY?null:iY,notice:`${t}-notice`,privacy:`${t}-privacy`}},r$=function(e){try{return JSON.parse(e)}catch{return}},rR=function(e){try{return decodeURIComponent(e)}catch{return null}},rE=new Set(["consents","iabCustomVendorConsents","iabCustomVendorLegitimateInterests"]),rT=/^\d+$/u,rL=function(e,t){let[n,...i]=e;if("consentInfo"===n&&1===i.length&&"time"===i[0])return rT.test(t)?Number(t):t;if(void 0!==n&&rE.has(n)&&1===i.length){if("1"===t)return!0;if("0"===t)return!1}return t},rM=function(e){let t=oY(oQ(e)),n={},i=0;for(let[e,o]of Object.entries(t)){let t=e.split(".");if(0===t.length||t.includes("__proto__"))continue;let r=n;for(let e of t.slice(0,-1))tz(Object.hasOwn(r,e)?r[e]:void 0)||(r[e]={}),r=r[e];let s=t.at(-1);void 0!==s&&(r[s]=rL(t,o),i+=1)}return i>0?n:null},rU=/^v=/u,rq=function(e){let t=e.trim();return 0===t.length?null:rU.test(t)?{kind:"versioned",text:t}:t.startsWith("{")?{kind:"json",text:t}:t.includes(":")?{kind:"legacy-compact",text:t}:null},r_=function(e,t){let n="cookie";if(null==e||""===e)return{key:t,source:n,status:"absent"};let i=rq(e);if(!i&&e.includes("%")){let t=rR(e);null!==t&&(i=rq(t))}if(!i)return{key:t,source:n,status:"unparseable"};if("versioned"===i.kind)return{encoding:"compact",format:"compact-v3",key:t,rawText:i.text,source:n,status:"parsed",value:void 0};if("json"===i.kind){let e=r$(i.text);return tz(e)?{encoding:"json",format:"parsed",key:t,rawText:i.text,source:n,status:"parsed",value:e}:{key:t,source:n,status:"unparseable"}}let o=rM(i.text);return null===o?{key:t,source:n,status:"unparseable"}:{encoding:"compact",format:"parsed",key:t,rawText:i.text,source:n,status:"parsed",value:o}},rN=function(e,t){try{if("u">typeof window&&window.localStorage)return window.localStorage.getItem(e)}catch(e){console.warn("Failed to read consent from localStorage:",e)}return t?.(),null},rF=function(e,t,n){let i=rN(t,n);if(null===i||""===i)return{key:t,source:e,status:"absent"};let o=r$(i);return tz(o)?{encoding:"json",format:"parsed",key:t,rawText:i,source:e,status:"parsed",value:o}:{key:t,source:e,status:"unparseable"}},rB=function(e,t){let n=rD(e),i=[r_(o5(n.consent,t),n.consent),rF("local-storage",n.consent,t)];return n.legacyConsent&&i.push(rF("legacy-local-storage",n.legacyConsent,t)),i},rz=function(e,t,n){let i=oH(e,{encoding:t,now:n});if(!1===i.ok)return{issues:i.issues,ok:!1};let o=[],r=rl(tV(e,"iabCustomVendorConsents"),tV(e,"iabCustomVendorLegitimateInterests"),"iab",o);return o.length>0?{issues:o,ok:!1}:{ok:!0,record:{choice:i.choice,format:"legacy-v2",iab:r??null,subject:i.subject}}},rG=function(e){if(!1===e.ok)return e;let{record:t}=e;return{ok:!0,record:{choice:{categories:t.categories,version:3},format:"v3",iab:t.iab??null,subject:t.subject??null}}},rV=function(e,t){let n,i;if("parsed"!==e.status)return e;let{encoding:o,key:r,source:s}=e;return("compact-v3"===e.format?(n="v3",i=rG(rw(e.rawText,t))):tz(e.value)&&Object.hasOwn(e.value,"version")?(n="v3",i=rG(rd(e.value,t))):(n="legacy-v2",i=rz(e.value,o,t)),!1===i.ok)?{encoding:o,format:n,issues:i.issues,key:r,source:s,status:"invalid"}:{key:r,record:{...i.record,encoding:o,key:r,source:s},source:s,status:"valid"}},rH=function(e,t){let n=[],i=null;for(let o of e){let e=rV(o,t);n.push(e),i||"valid"!==e.status||(i=e.record)}return{candidates:n,selected:i}},rW=function(){return"u">typeof window&&!!window.localStorage},rJ=function(e,t){try{if(rW())return window.localStorage.setItem(e,t),!0}catch(e){console.warn("Failed to save consent to localStorage:",e)}return!1},rK=function(e){try{rW()&&window.localStorage.removeItem(e)}catch(e){console.warn("Failed to remove consent from localStorage:",e)}},rY=function(e,t){let n=rd(e,t.now);if(!1===n.ok)return n;let i=rD(t.config),o=rJ(i.consent,rf(n.record)),r=o2(i.consent,rm(n.record),t.cookie,t.config);return r.attempted||void 0===r.error||console.warn("Failed to save consent to cookie:",r.error),{envelope:n.record,ok:!0,written:{cookie:r.attempted&&r.verified,cookieDetail:r,localStorage:o}}},rX=function(e,t,n){let i=rN(e,n);if(null===i||""===i)return null;let o=r$(i);return void 0===o?{issues:[{code:"malformed-encoding",path:""}],ok:!1}:t(o)},rQ=function(e,t){if(null==e)return null;let n=e.trim();if(""===n)return null;if(n.startsWith("v="))return t(n);if(n.includes("%")){let e=rR(n);if(null!==e&&e.trim().startsWith("v="))return t(e.trim())}return{issues:[{code:"malformed-encoding",path:""}],ok:!1}},rZ=function(e,t,n){let i=rD(e),o=rQ(o5(i.notice,n),e=>rP(e,t));return o?.ok?o:rX(i.notice,e=>rk(e,t),n)??o},r0=function(e,t,n,i){var o,r;let s=rk(e,n);if(!1===s.ok)return s;let a=rD(t),c=rJ(a.notice,JSON.stringify({dismissedAt:(o=s.record).dismissedAt,fingerprint:o.fingerprint,version:1})),l=o2(a.notice,(r=s.record,`v=1&t=${r.dismissedAt}&f=${encodeURIComponent(r.fingerprint)}`),i,t);return{ok:!0,record:s.record,written:{cookie:l.attempted&&l.verified,cookieDetail:l,localStorage:c}}},r1=function(e,t){let n=rD(e);rK(n.notice),o3(n.notice,t,e)},r2=function(e,t,n){let i=rD(e),o=rQ(o5(i.privacy,n),e=>rx(e,t));return o?.ok?o:rX(i.privacy,e=>rj(e,t),n)??o},r5=function(e,t,n,i){let o=rj({directives:e,version:1},n);if(!1===o.ok)return o;let r=rD(t),s=rJ(r.privacy,JSON.stringify({directives:o.record.directives.map(e=>({categories:[...e.categories].sort(),recordedAt:e.recordedAt,source:e.source})),version:1})),a=o2(r.privacy,rO(o.record),i,t);return{ok:!0,record:o.record,written:{cookie:a.attempted&&a.verified,cookieDetail:a,localStorage:s}}},r3=function(e,t){let n=rD(e);rK(n.privacy),o3(n.privacy,t,e)},r6=function(e,t){o6(e,t),r1(t,e),r3(t,e),rK(iX),rK("c15t-iab-authority-v1"),rK("euconsent-v2"),o3("euconsent-v2",e,t),o3("euconsent-v2")},r8=function(e,t,n,i){let{selected:o}=e,r={choice:o?.choice??null,noticeDismissal:t?.ok?t.record:null,now:i,optOutDirectives:n?.ok?[...n.record.directives]:[],subject:o?.subject??null};return{candidates:e.candidates,found:null!==o||t?.ok===!0||n?.ok===!0,iab:o?.iab??null,records:r}},r4=function(e,t){let n=!1,i=!1,o=!1,r=rH(rB(e,()=>{n=!0}),t),s=rZ(e,t,()=>{i=!0}),a=r2(e,t,()=>{o=!0}),c=r8(r,s,a,t);return!r.selected&&n&&(delete c.records.choice,delete c.records.subject),!s?.ok&&i&&delete c.records.noticeDismissal,!a?.ok&&o&&delete c.records.optOutDirectives,c},r7=function(e,t,n){if("u"<typeof document)return null;let i=r4(t,n),o=e.hydrate(i.records);return!1===o.ok&&console.warn("[c15t] Stored consent records were rejected.",o.issues),i},r9=function(e){let t=!1,n=null,i=function(){null!==n&&(clearTimeout(n),n=null),t=!1};return{cancel:i,flush(){t&&(i(),e())},schedule(){t||(t=!0,n=setTimeout(()=>{n=null,t=!1,e()},0))}}},se=function(e,t){if(!e.explicitChoice)return null;let n={categories:e.explicitChoice.categories,version:3};return e.subject&&Object.keys(e.subject).length>0&&(n.subject={...e.subject}),t&&(n.iab=t),n},st=function(e,t,n,i){if("u"<typeof document)return;let o=se(e,t);if(!o)return;let r=rY(o,{config:n,now:i});!1===r.ok&&console.warn("[c15t] Consent record was not written.",r.issues)},sn=function(e,t,n){!("u"<typeof document)&&e.noticeDismissal&&r0(e.noticeDismissal,t,n)},si=function(e,t,n){"u"<typeof document||r5(e.optOutDirectives,t,n)},so=function(e){let{kernel:t,storageConfig:n}=e,i=e.now??(()=>Date.now()),o=null,r=r9(()=>{st(t.getSnapshot(),o,n,i())}),s=r9(()=>{sn(t.getSnapshot(),n,i())}),a=r9(()=>{si(t.getSnapshot(),n,i())}),c=[t.events.on("choice:recorded",()=>{r.schedule()}),t.events.on("subject:resolved",()=>{r.schedule()}),t.events.on("notice:dismissed",()=>{s.schedule()}),t.events.on("privacy:opt-out",()=>{a.schedule()})],l=function(){r.flush(),s.flush(),a.flush()},u=function(){r.cancel(),s.cancel(),a.cancel()},d=function(){l();let e=r7(t,n,i());return!!e&&(void 0!==e.records.choice&&(o=e.iab),e.found)};return e.skipHydration||d(),{clear(){u(),o=null,"u">typeof document&&r6(void 0,n),t.hydrate({choice:null,noticeDismissal:null,now:i(),optOutDirectives:[],subject:null}),t.events.emit({type:"records:cleared"})},dispose(){for(let e of c)e();l()},hydrate:d}},sr=function(e){if("u"<typeof window)return;let t=window.__c15tScriptDebugListeners;if(t)for(let n of t)try{n(e)}catch{}},ss=function(e){let{onDebug:t,emitToV2:n}=e;return function(e){if(t)try{t(e)}catch{}n&&sr(e)}},sa=new WeakMap,sc=0,sl=function(e){return{consents:ii(e).effectivePermissions,iab:e.iab,isIabMode:"iab"===e.model,snapshot:e}},su=function(e,t){let{script:n}=e;if(e.hasIabMeta)return ir(n,t.snapshot);if(e.simpleCategory){if(!(e.simpleCategory in t.consents))throw Error(`Consent category "${e.simpleCategory}" not found in consent state`);return t.consents[e.simpleCategory]||!1}return n9(n.category,t.consents)},sd=function(e,t,n,i,o,r){return{consents:ii(t).effectivePermissions,element:o,elementId:i,error:r,hasConsent:n,id:e.id}},sp=function(e,t,n,i){let o=e[t];if("function"==typeof o)try{o(n),i({action:"callback_invoked",callback:t,elementId:n.elementId,hasConsent:n.hasConsent,message:`Invoked ${String(t)}`,scope:"step",scriptId:e.id,source:"script-loader",timestamp:Date.now()})}catch(o){i({action:"callback_error",callback:t,data:{error:o instanceof Error?o.message:String(o)},elementId:n.elementId,message:`Callback ${String(t)} threw`,scope:"step",scriptId:e.id,source:"script-loader",timestamp:Date.now()})}},sf=function(e,t,n,i,o){if("u"<typeof document)return;let r=e.elementIds.resolve(t);if(e.loadedElements.has(t.id)){if("function"==typeof t.onConsentChange||e.hasDebugListener){let o=e.loadedElements.get(t.id)??void 0,s=sd(t,n,i,r,o);sp(t,"onConsentChange",s,e.emit)}e.emit({action:"already_loaded",elementId:r,hasConsent:i,message:"Script already mounted",scope:"step",scriptId:t.id,source:"script-loader",timestamp:Date.now()});return}if(!0===t.callbackOnly){let o=sd(t,n,i,r,void 0);sp(t,"onBeforeLoad",o,e.emit),sp(t,"onLoad",o,e.emit),e.loadedElements.set(t.id,null),e.emit({action:"loaded",elementId:o.elementId,hasConsent:o.hasConsent,message:"Callback-only script loaded",scope:"lifecycle",scriptId:t.id,source:"script-loader",timestamp:Date.now()});return}if(t.src&&t.textContent)throw Error(`Script '${t.id}' cannot have both 'src' and 'textContent'. Choose one.`);if(!t.src&&!t.textContent)throw Error(`Script '${t.id}' must have either 'src', 'textContent', or 'callbackOnly' set to true.`);let s="function"==typeof document.getElementById?document.getElementById(r):null;if(s){if(e.loadedElements.set(t.id,s),"function"==typeof t.onConsentChange||e.hasDebugListener){let o=sd(t,n,i,r,s);sp(t,"onConsentChange",o,e.emit)}e.emit({action:"already_loaded",elementId:r,hasConsent:i,message:"Script element already exists in DOM; reused it",scope:"step",scriptId:t.id,source:"script-loader",timestamp:Date.now()});return}let a=document.createElement("script");a.id=r,t.src&&(a.src=t.src),t.textContent&&(a.textContent=t.textContent),void 0!==t.async&&(a.async=t.async),void 0!==t.defer&&(a.defer=t.defer);let c=t.nonce??e.nonce;if(c&&(a.nonce=c),t.fetchPriority&&(a.fetchPriority=t.fetchPriority),t.attributes)for(let[e,n]of Object.entries(t.attributes))a.setAttribute(e,"string"==typeof n?n:String(n));let l="function"==typeof t.onBeforeLoad||"function"==typeof t.onLoad||"function"==typeof t.onError||"function"==typeof t.onConsentChange||e.hasDebugListener?sd(t,n,i,r,a):void 0;if(l&&sp(t,"onBeforeLoad",l,e.emit),t.src){let n=()=>a.isConnected&&document.getElementById(r)===a&&(e.loadedElements.get(t.id)===a||e.retainedElements.get(t.id)===a),i=()=>l&&e.retainedElements.get(t.id)===a?sd(t,e.getSnapshot(),!1,r,a):l;a.addEventListener("load",()=>{if(!n())return;let o=i();o&&sp(t,"onLoad",o,e.emit),e.emit({action:"load_completed",elementId:r,message:"Script finished loading",scope:"lifecycle",scriptId:t.id,source:"script-loader",timestamp:Date.now()})}),a.addEventListener("error",()=>{if(!n())return;let o=i();if(o){let n={...o,error:Error(`Failed to load script: ${t.src}`)};sp(t,"onError",n,e.emit)}e.emit({action:"error",elementId:r,message:`Script failed: ${t.src}`,scope:"lifecycle",scriptId:t.id,source:"script-loader",timestamp:Date.now()})})}let u="body"===t.target?document.body:document.head;o?o.push({element:a,elementId:r,hasConsent:i,info:l,script:t,target:u}):(e.loadedElements.set(t.id,a),e.ownedScriptIds.add(t.id),u.appendChild(a),e.loadedElements.get(t.id)===a&&(!t.src&&l&&setTimeout(()=>sp(t,"onLoad",l,e.emit),0),e.emit({action:"loaded",elementId:r,hasConsent:i,message:"Script mounted",scope:"lifecycle",scriptId:t.id,source:"script-loader",timestamp:Date.now()})))},sg=function(e,t,n,i){let o=e.loadedElements.get(t.id);if(void 0===o)return;let r=e.elementIds.resolve(t);if(t.persistAfterConsentRevoked){if(o&&e.retainedElements.set(t.id,o),e.loadedElements.delete(t.id),e.ownedScriptIds.delete(t.id),"function"==typeof t.onConsentChange){let s=sd(t,n,i,r,o??void 0);sp(t,"onConsentChange",s,e.emit)}e.emit({action:"unloaded",data:{retained:!0},elementId:r,message:"Script persisted after consent revoked",scope:"lifecycle",scriptId:t.id,source:"script-loader",timestamp:Date.now()});return}if(e.ownedScriptIds.has(t.id)&&o?.parentNode&&o.parentNode.removeChild(o),e.loadedElements.delete(t.id),e.ownedScriptIds.delete(t.id),"function"==typeof t.onConsentChange){let o=sd(t,n,i,r);sp(t,"onConsentChange",o,e.emit)}e.emit({action:"unloaded",elementId:r,message:"Script unmounted",scope:"lifecycle",scriptId:t.id,source:"script-loader",timestamp:Date.now()})},sm=function(e,t){if(0!==t.length){for(let n of t)e.loadedElements.set(n.script.id,n.element),e.ownedScriptIds.add(n.script.id);if(1===t.length){let e=t[0];if(!e)return;e.target.appendChild(e.element)}else{let n=new Map;for(let e of t){let t=n.get(e.target);t?t.push(e):n.set(e.target,[e])}for(let[t,i]of n){let n=i.filter(({script:t,element:n})=>e.loadedElements.get(t.id)===n).map(({element:e})=>e);if(0===n.length)continue;if(1===n.length){let e=n[0];e&&t.appendChild(e);continue}let o=document.createDocumentFragment();for(let e of n)o.appendChild(e);t.appendChild(o)}}for(let n of t)if(e.loadedElements.get(n.script.id)===n.element){if(!n.script.src&&n.info){let{info:t}=n,{script:i}=n;setTimeout(()=>sp(i,"onLoad",t,e.emit),0)}e.emit({action:"loaded",elementId:n.elementId,hasConsent:n.hasConsent,message:"Script mounted",scope:"lifecycle",scriptId:n.script.id,source:"script-loader",timestamp:Date.now()})}}},sy=new Map,sh=function(e){return e.map(e=>({hasIabMeta:!!(void 0!==e.vendorId||e.iabPurposes&&e.iabPurposes.length>0||e.iabLegIntPurposes&&e.iabLegIntPurposes.length>0||e.iabSpecialFeatures&&e.iabSpecialFeatures.length>0),script:e,simpleCategory:"string"==typeof e.category?e.category:null}))},sv=function(e){let t,n,i,o,r,{kernel:s,onDebug:a}=e,c=e.emitToV2DebugListeners??!0,l=ss({emitToV2:c,onDebug:a}),u=!!a||c,d=new Map,p=new Map,f=sh(e.scripts),g=new Map,m=new Map,y=new Set,h={clear(){},resolve(e){if(!1===e.anonymizeId)return`c15t-script-${e.id}`;let t=sy.get(e.id);if(t)return t;let n=`c15t-${"u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID().replace(/-/gu,"").slice(0,8):Math.random().toString(36).slice(2,10)}`;return sy.set(e.id,n),n}},v=new Map,b=new Map,w={elementIds:h,emit:e=>{d.set(e.scriptId,e),"load_completed"===e.action?p.set(e.scriptId,"loaded"):"loaded"!==e.action||p.has(e.scriptId)?"error"===e.action?p.set(e.scriptId,"error"):"already_loaded"!==e.action||p.has(e.scriptId)?"unloaded"===e.action&&e.data?.retained!==!0&&p.delete(e.scriptId):p.set(e.scriptId,"present"):p.set(e.scriptId,"loading"),l(e),t?.notify(e)},getSnapshot:s.getSnapshot,hasDebugListener:u,loadedElements:g,nonce:e.nonce,ownedScriptIds:y,retainedElements:m},k=null,A=null,I=null,j=null,S=null,C=null,P=null,O=function(e=!1){let n=s.getSnapshot(),i=ii(n),o=i.effectivePermissions!==k;if(!e&&!o&&n.policyRule.scope===A&&n.policyRule.scopeMode===I&&n.iab===j&&i.restrictions===S&&n.model===C&&n.evaluationPolicy===P)return;k=i.effectivePermissions,S=i.restrictions,C=n.model,P=n.evaluationPolicy,A=n.policyRule.scope,I=n.policyRule.scopeMode,j=n.iab;let r=sl(n),a=[];for(let t of f){let{script:i}=t,s=su(t,r),c=!0===i.alwaysLoad||s,l=v.get(i.id),u=b.get(i.id);v.set(i.id,c),b.set(i.id,s),(e||l!==c||u!==s||o&&"function"==typeof i.onConsentChange)&&(c?(m.delete(i.id),sf(w,i,n,s,a)):sg(w,i,n,s))}sm(w,a),t?.notify()};(n=sa.get(s))||(n={listeners:new Set,loaders:new Map},sa.set(s,n)),i=n,o=sc+=1,r=e=>{for(let t of i.listeners)try{t(e)}catch{}},i.loaders.set(o,()=>(e=>f.map(t=>{let{script:n}=t,i=v.get(n.id)??!1,o=h.resolve(n),r=m.get(n.id),a=!i&&r?.isConnected&&"u">typeof document&&document.getElementById(o)===r,c=i?"pending":"blocked";return a?c="retained":g.has(n.id)&&(c=p.get(n.id)??"present",n.src||"loading"!==c||(c="loaded")),{alwaysLoad:n.alwaysLoad??!1,callbackOnly:n.callbackOnly??!1,category:n.category,elementId:o,eligible:i,hasConsent:su(t,sl(s.getSnapshot())),id:n.id,lastEvent:d.get(n.id),loaderId:e,persistAfterConsentRevoked:n.persistAfterConsentRevoked??!1,src:n.src,status:c,vendorId:n.vendorId}}))(o)),r(),t={dispose(){i.loaders.delete(o),r()},notify:r};let x=s.subscribe(()=>O()),D={dispose(){if(x(),t?.dispose(),t=void 0,!("u"<typeof document)){for(let[e,t]of g)y.has(e)&&t?.parentNode&&t.parentNode.removeChild(t);g.clear(),m.clear(),y.clear(),h.clear(),v.clear(),b.clear(),d.clear(),p.clear()}},getLoadedScriptIds:()=>Array.from(g.keys()),updateScripts(e){let t=new Set(e.map(e=>e.id)),n=s.getSnapshot();for(let{script:e}of f)t.has(e.id)||(sg(w,e,n,!1),m.delete(e.id),v.delete(e.id),b.delete(e.id),d.delete(e.id),p.delete(e.id));f=sh(e),O(!0)}};try{O(!0)}catch(e){throw D.dispose(),e}return D},sb={dispose(){}},sw=function(e){if("u"<typeof window)return sb;let t=window,n=Object.freeze({mode:e.mode,pkg:e.pkg,version:t6});try{t.c15t=n}catch{return sb}return{dispose(){if(t.c15t===n)try{delete t.c15t}catch{}}}},sk={common:{acceptAll:"Accept All",acknowledge:"OK",close:"Close",customize:"Customize",dismiss:"Dismiss",rejectAll:"Reject All",save:"Save Settings",securedBy:"Secured by"},consentManagerDialog:{description:"Customize your privacy settings here. You can choose which types of cookies and tracking technologies you allow.",title:"Privacy Settings"},consentTypes:{experience:{description:"These cookies help us provide a better user experience and test new features.",title:"Experience"},functionality:{description:"These cookies enable enhanced functionality and personalization of the website.",title:"Functionality"},marketing:{description:"These cookies are used to deliver relevant advertisements and track their effectiveness.",title:"Marketing"},measurement:{description:"These cookies help us understand how visitors interact with the website and improve its performance.",title:"Analytics"},necessary:{description:"These cookies are essential for the website to function properly and cannot be disabled.",title:"Strictly Necessary"}},cookieBanner:{description:"This site uses cookies to improve your browsing experience, analyze site traffic, and show personalized content.",noticeDescription:"We use cookies and similar technologies to run this site, measure traffic, and personalize content and ads. You can opt out or manage your preferences at any time.",noticeTitle:"Privacy notice",title:"We value your privacy"},frame:{actionButton:"Enable {category} consent",error:"This content could not be loaded.",loading:"Loading content…",policyBlocked:"This content is unavailable under your region's consent policy.",title:"Accept {category} consent to view this content."},iab:{banner:{andMore:"And {count} more...",description:"We and our {partnerCount} partners store and/or access information on your device and process personal data, such as unique identifiers and browsing data, for this website, to:",legitimateInterestNotice:"Some partners claim a legitimate interest to process your data. You have the right to object to this processing, customize your choices, and withdraw your consent at any time.",partnersLink:"{count} partners",scopeGroup:"Your choice applies across our websites in this group.",scopeServiceSpecific:"Your consent applies only to this website and will not affect other services.",title:"Privacy Settings"},common:{acceptAll:"Accept All",clearSelection:"Clear",customPartner:"Custom partner not registered with IAB",customize:"Customize",loading:"Loading...",rejectAll:"Reject All",saveSettings:"Save Settings",showingSelectedVendor:"Showing selected vendor"},preferenceCenter:{description:"Customize your privacy settings here. You can choose which types of cookies and tracking technologies you allow.",footer:{consentStorage:'Consent preferences are stored in a cookie named "euconsent-v2" for 13 months. The storage duration may be refreshed when you update your preferences.'},purposeItem:{examples:"Examples",legitimateInterest:"Legitimate Interest",objectButton:"Object",objected:"Objected",partners:"{count} partners",partnersUsingPurpose:"Partners Using This Purpose",rightToObject:"You have the right to object to processing based on legitimate interest.",vendorsUseLegitimateInterest:"{count} vendors claim legitimate interest",withYourPermission:"With Your Permission"},specialPurposes:{title:"Essential Functions (Required)",tooltip:"These are required for site functionality and security. Per IAB TCF, you cannot object to these special purposes."},tabs:{purposes:"Purposes",vendors:"Vendors"},title:"Privacy Settings",vendorList:{customVendorsHeading:"Custom Partners",customVendorsNotice:"These are custom partners not registered with IAB Transparency & Consent Framework (TCF). They process data based on your consent and may have different privacy practices than IAB-registered vendors.",dataCategories:"Data Categories",features:"Features",iabVendorsHeading:"IAB Registered Vendors",iabVendorsNotice:"These partners are registered with the IAB Transparency & Consent Framework (TCF), an industry standard for managing consent",legitimateInterest:"Leg. Interest",maxAge:"Max Age: {days}d",maxAgeRefreshes:"(refreshes)",noVendorsFound:'No vendors found matching "{searchTerm}"',nonCookieAccess:"Non-Cookie Access",partnerCount:"{count} partners",partnerPlural:"partners",partnerSingular:"partner",privacyPolicy:"Privacy Policy",purposes:"Purposes",requiredNotice:"Required for site functionality, cannot be disabled",retainedDays:"Retained: {days}d",retention:"Retention: {days}d",search:"Search vendors...",showingCount:"{filtered} of {total} vendors",specialFeatures:"Special Features",specialPurposes:"Special Purposes",storageDisclosure:"Storage Disclosure",usesCookies:"Uses Cookies"}}},legalLinks:{cookiePolicy:"Cookie Policy",privacyPolicy:"Privacy Policy",termsOfService:"Terms of Service"},rights:{optOut:"Do not sell or share my data",preferences:"Manage preferences"}},sA={en:sk},sI={language:"en",translations:sA.en},sj=function(e){return e?"externalId"in e?e:{externalId:e.id,identityProvider:e.identityProvider}:void 0},sS=function(e){if(!(e?.messages||e?.locale))return;let t=e.locale??"en"??"en",n=sA.en,i=sA[t]??n;if(!e.messages)return{language:t,translations:i};let o=e.messages[t]??e.messages.en??n;return{language:t,translations:l(i,o)}},sC=e3({countryCode:null,regionCode:null,rules:[{id:"disabled",match:{fallback:!0},model:"opt-out",prompt:"none"}]}),sP=function(e){if(!1===e.persistence)return!1;let{storageConfig:t}=e;return!0===e.persistence||void 0===e.persistence?{storageConfig:t}:{skipHydration:e.persistence.skipHydration,storageConfig:e.persistence.storageConfig??t}},sO=function(e){if("function"!=typeof e.mode)throw Error("c15t v3 ConsentManagerProvider: `mode` is required. Use hosted(), offline(), or custom().");return e.mode},sx=function(e){var t;let n=e.enabled??!0,i=e.prefetch??{},o=sS(e.i18n)??sI,r={consentCategories:e.consentCategories,iabEnabled:!1!==(t=e.iab)&&null!=t&&!1!==t.enabled,policyRules:e.policyRules,prefetch:i,translations:o},s=sO(e)(r);return oC({...i,initialIab:i.initialIab?.gvlReference&&e.iab&&e.iab.vendors?.length?{...i.initialIab,gvlReference:{...i.initialIab.gvlReference,summary:void 0}}:i.initialIab,initialOverrides:{...i.initialOverrides??{},...e.overrides??{}},initialPolicyPending:i.initialPolicyPending??(n&&!i.initialPolicyResolution),initialPolicyResolution:n?i.initialPolicyResolution:sC,initialTranslations:i.initialTranslations??o,initialUser:sj(e.user)??i.initialUser,now:i.now??i.initialRecords?.now??(i.initialRecords?void 0:0),transport:s})},sD=function(e,t){if(!1===t||!t||!1===t.enabled)return null;let n=e.getSnapshot().iab,i=t.cmpId??n?.cmpId;return"number"!=typeof i?null:{cmpId:i,cmpVersion:"string"==typeof t.cmpVersion?Number(t.cmpVersion):t.cmpVersion,customVendors:t.customVendors??n?.customVendors,gvl:t.gvl??n?.gvl??void 0,gvlURL:t.gvlURL,isServiceSpecific:t.isServiceSpecific,publisherCountryCode:t.publisherCountryCode,vendors:t.vendors}},s$=function(e){let t=e.enabled??!0,n=sP(e),i=sx(e),o=e.consentCategories??[],r=null,s=!1,a=!1,c=new Set,l=function(e){for(let t of(r=e,c))t(e)},u=[()=>i.dispose()];u.push((({kernel:e,callbacks:t})=>{let n=[e.events.on("choice:recorded",({type:e,...n})=>t?.onChoiceRecorded?.(n)),e.events.on("permissions:changed",({type:e,...n})=>t?.onPermissionsChanged?.(n)),e.events.on("command:error",({error:e})=>t?.onError?.({error:(e=>{if(e instanceof Error)return e.message;if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}})(e)}))];return()=>{for(let e of n)e()}})({callbacks:e.callbacks,kernel:i}));let d=null,p=async function(){a||await i.commands.init()},f=function(){if(!(t&&n))return;let o=so({kernel:i,skipHydration:n.skipHydration??!!e.prefetch?.initialRecords,storageConfig:n.storageConfig});d=o,u.push(()=>{o.dispose(),d=null})},g=function(){let{createIAB:n}=e;if(!(t&&n&&e.iab))return;let o=!1,r=function(){if(o)return;let t=sD(i,e.iab);if(!t)return;o=!0;let r=n({...t,kernel:i});l(r),u.push(()=>{r.dispose(),o=!1,l(null)})};r(),u.push(i.subscribe(r))};return{clearRecords(){d?d.clear():(i.hydrate({choice:null,noticeDismissal:null,optOutDirectives:[],subject:null}),i.events.emit({type:"records:cleared"}))},get consentCategories(){return o},dispose(){for(let e of(a=!0,s=!1,u.reverse()))e();u.length=0,c.clear(),r=null,d=null},get iab(){return r},async identify(e){let t=sj(e);if(t)try{await i.commands.identify(t)}catch{}},kernel:i,onIABChange:e=>(c.add(e),function(){c.delete(e)}),async reinit(){t&&!a&&await p()},setConsentCategories(e){o=e},setOverrides(e){i.set.overrides(e)},start(){if(!s&&!a&&!("u"<typeof document)){var n;if(s=!0,!1!==e.windowDebug){let t=sw({mode:sO(e).kind,pkg:e.pkg??"@c15t/core"});u.push(()=>t.dispose())}if(f(),t&&(n=e.prefetch,!n?.initialPolicyResolution||!0===n.initialPolicyPending))p();else if(t){i.hydrate({now:i.getServerSnapshot().evaluatedAt});let{gpc:e}=i.getSnapshot().privacySignals;e.detected&&e.active&&i.set.privacySignals({gpc:!0}),i.events.emit({snapshot:i.getSnapshot(),type:"init:applied"})}if(e.scripts&&e.scripts.length>0){let t=sv({kernel:i,nonce:e.nonce,onDebug:e.scriptLoader?.onDebug,scripts:e.scripts});u.push(()=>t.dispose())}if(t&&e.networkBlocker){let t=oB({enabled:e.networkBlocker.enabled,kernel:i,logBlockedRequests:e.networkBlocker.logBlockedRequests,onRequestBlocked:e.networkBlocker.onRequestBlocked,rules:e.networkBlocker.rules});u.push(()=>t.dispose())}if(t&&!1!==e.iframeBlocker){let t=oR({kernel:i,...e.iframeBlocker??{}});u.push(()=>t.dispose())}g()}},get started(){return s}}},sR=function(){let{withResolvers:e}=Promise;if("function"==typeof e)return e.call(Promise);let t=()=>{},n=()=>{};return{promise:new Promise((e,i)=>{t=e,n=i}),reject:n,resolve:t}},sE="data-c15t-category",sT="data-c15t-activated",sL=["src","async","defer","crossorigin","integrity","referrerpolicy","id"],sM=function(e){let t=e.ownerDocument.createElement("script");for(let n of sL){let i=e.getAttribute(n);null!==i&&t.setAttribute(n,i)}for(let n of(t.async=e.hasAttribute("async"),t.nonce=e.nonce,Array.from(e.attributes)))n.name.startsWith("data-")&&n.name!==sT&&t.setAttribute(n.name,n.value);return t.setAttribute(sT,"true"),e.hasAttribute("src")||(t.textContent=e.textContent),t},sU=function(e,t){let n=e.getAttribute(sE);return!!n&&(oP.includes(n)?ir({category:n},t):(console.warn(`@c15t/browser: unknown ${sE} "${n}". Expected one of ${oP.join(", ")}.`),e.setAttribute(sT,"invalid"),!1))},sq=new WeakMap,s_=e=>{let t={subscribers:new Set},{ownerDocument:n}=e,i=()=>{e.removeEventListener("load",i),e.removeEventListener("error",i),sq.delete(n);let o=Array.from(t.subscribers);for(let e of(t.subscribers.clear(),o))e()};return sq.set(n,t),e.addEventListener("load",i),e.addEventListener("error",i),t},sN=function(e,t){let n=!1,i=!1,o=null,r=null,s=()=>{if(n||i)return 0;i=!0;let a=e=>{if(o===e)return;r?.(),o=e;let t=()=>{o===e&&(o=null,r=null,s())};e.subscribers.add(t),r=()=>e.subscribers.delete(t)},c=0;try{let i=`script[type="text/plain"][${sE}]:not([${sT}])`;for(let o of(t??document).querySelectorAll(i)){if(n)break;if(!o.isConnected||!sU(o,e()))continue;let t=o.hasAttribute("src"),i=t&&o.hasAttribute("async"),r=sq.get(o.ownerDocument);if(r&&!i){a(r);continue}let s=sM(o);t&&!i&&a(s_(s)),o.setAttribute(sT,"true"),o.replaceWith(s),c+=1}}finally{i=!1}return c};return{dispose(){n=!0,r?.(),r=null,o=null},scan:s}};new WeakMap;let sF=function(e,t){let n={AU:new Set(["AU"]),BR:new Set(["BR"]),CA:new Set(["CA"]),CA_QC_REGIONS:new Set(["QC"]),CH:new Set(["CH"]),EEA:new Set(["IS","NO","LI"]),EU:new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE"]),JP:new Set(["JP"]),KR:new Set(["KR"]),UK:new Set(["GB"]),US_CCPA_REGIONS:new Set(["CA"])},i="NONE";if(e){let o=e.toUpperCase(),r=t&&"string"==typeof t?(t.includes("-")?((e,t="Expected value to be defined")=>{if(null==e)throw Error(t);return e})(t.split("-").pop()):t).toUpperCase():null;if("US"===o&&r&&n.US_CCPA_REGIONS.has(r))return"CCPA";if("CA"===o&&r&&n.CA_QC_REGIONS.has(r))return"QC_LAW25";for(let{sets:e,code:t}of[{code:"UK_GDPR",sets:[n.UK]},{code:"GDPR",sets:[n.EU,n.EEA]},{code:"CH",sets:[n.CH]},{code:"BR",sets:[n.BR]},{code:"PIPEDA",sets:[n.CA]},{code:"AU",sets:[n.AU]},{code:"APPI",sets:[n.JP]},{code:"PIPA",sets:[n.KR]}])if(e.some(e=>e.has(o))){i=t;break}}return i},sB="default",sz=new Set,sG=function(e,t){return e in t},sV=function(e,t,n,i){!e||sz.has(t)||(sz.add(t),e.warn(n,i))},sH=function(e){if(!e)return;let t=e.split(",")[0]?.split(";")[0]?.trim().toLowerCase();if(t)return t.split("-")[0]??void 0},sW=function(e){let t=e.i18n?.messages,n=e.customTranslations;return t&&Object.keys(t).length>0?(n&&Object.keys(n).length>0&&sV(e.logger,"i18n.customTranslations.ignored","`customTranslations` is deprecated and ignored when `i18n.messages` is configured."),t):n&&Object.keys(n).length>0?(sV(e.logger,"i18n.customTranslations.deprecated","`customTranslations` is deprecated. Use `i18n.messages` instead."),{[sB]:{translations:n}}):{}},sJ=function(e){let t=[{language:e.language,reason:"profile_language"},{language:e.fallbackLanguage,reason:"profile_fallback"}],n=new Set;return t.filter(e=>{let t=e.language;return!n.has(t)&&(n.add(t),!0)})},sK=function(e){var t,n;return t=e.profiles,n=e.profile,Object.keys(t[n]?.translations??{}).sort()},sY=function(e){let t=sH(e.profile?.fallbackLanguage)??"en",n=Object.keys(e.profile?.translations??{}).sort();return n.includes(t)?t:n.includes("en")?"en":n[0]??t},sX=function(e){let t,n=e.policyProfile??e.defaultProfile;return e.profiles[n]?n:(e.policyProfile&&"default"!==(t=e.policyProfile)&&"preferences"!==t&&sV(e.logger,`i18n.profile.missing:${n}`,`Policy i18n profile '${n}' does not exist. Falling back to default profile '${e.defaultProfile}'.`),e.defaultProfile)},sQ=function(e,t,n){let i=n?.baseTranslations??{en:sk},o=sW({customTranslations:t,i18n:n?.i18n,logger:n?.logger}),r=sX({defaultProfile:n?.i18n?.defaultProfile??sB,logger:n?.logger,policyProfile:n?.policyI18n?.messageProfile,profiles:o}),s=Object.keys(o).length>0?sK({profile:r,profiles:o}):Object.keys(i),a=Object.keys(o).length>0?sY({profile:o[r]}):"en",c=sH(n?.policyI18n?.language),u=c??sH(e);!n?.baseTranslations&&u&&"en"!==u&&sV(n?.logger,`i18n.base-translations.missing:${u}`,`Base translations were not provided for '${u}'. Falling back to English translations.`,{requestedLanguage:u});let p=c??d(s,{fallback:a,header:e}),f=sJ({fallbackLanguage:a,language:p}).find(e=>!!o[r]?.translations[e.language]);f&&"profile_language"!==f.reason&&sV(n?.logger,`i18n.fallback:${r}:${p}:${f.language}`,`Policy translation fallback used (${f.reason}).`,{requestedLanguage:p,requestedProfile:r,resolvedLanguage:f.language,resolvedProfile:r});let g=f?.language??p;f||sG(g,i)||(sV(n?.logger,`i18n.base-fallback:${g}`,`No translation found for '${g}'. Falling back to base English translations.`),g="en");let m=sG(g,i)?i[g]??sk:sk,y=f?o[r]?.translations[f.language]:void 0;return{language:g,translations:y?l(m,y):m}},sZ=function(e){let{iab:t,...n}=e;return n},s0=function(e,t){if(2!==e.schemaVersion)return{policy:null,reason:"unsupported-contract",status:"failed"};if(e.policyFailure)return{policy:null,reason:"invalid-configuration",status:"failed"};let n=e.policyPacks;if(void 0===n)return{policy:null,status:"unconfigured"};try{if(!Array.isArray(n))throw TypeError("Invalid packs");let i=n.map(e=>{if(Object.keys(e).some(e=>!["match","rule","fingerprints"].includes(e)))throw TypeError("Unsupported pack field");let t=tD({fingerprints:e.fingerprints,matchedBy:"default",policy:e.rule,policyId:e.rule?.id,status:"matched",version:1});if("matched"!==t.status)throw TypeError("Invalid pack");return{id:t.policy.id,match:e.match}}),o=n.map(e=>({id:e.rule.id,match:e.match,model:e.rule.model,prompt:e.rule.prompt}));if(eq(o,{iabEnabled:e.iab?.enabled}).errors.length)throw TypeError("Invalid matchers");if(0===n.length)return{policy:null,status:"no-match"};let r=e2({...t,entries:i});if("insufficient-inputs"===r.status)return{policy:null,reason:"insufficient-inputs",status:"failed"};if("no-match"===r.status)return{policy:null,status:"no-match"};let s=n[r.index];if(!s)throw TypeError("Invalid match");return tD({fingerprints:s.fingerprints,matchedBy:r.matchedBy,policy:s.rule,policyId:s.rule.id,status:"matched",version:1})}catch{return{policy:null,reason:"invalid-configuration",status:"failed"}}},s1=function(e,t,n){var i;let o={countryCode:t.country??null,regionCode:t.region??null},r=(i={disableGeoLocation:e.defaults?.disableGeoLocation},i?.disableGeoLocation?"GDPR":sF(o.countryCode,o.regionCode)),s=s0(e,o),a="matched"===s.status?s.policy:void 0,c=e.iab?.enabled===!0&&a?.model==="iab",l=sQ(t.language??"en",e.translations?.customTranslations,{baseTranslations:n?.baseTranslations,i18n:e.translations?.i18n,logger:n?.logger,policyI18n:a?.i18n}),u=c?l:{...l,translations:sZ(l.translations)},d=e6(s);return{branding:e.branding,jurisdiction:r,location:o,policyResolution:d,translations:u,...c&&{customVendors:e.iab?.customVendors},...c&&null!==e.cmpId&&void 0!==e.cmpId&&{cmpId:e.cmpId}}},s2=function(e){return e.endsWith("/")?e.slice(0,-1):e},s5=function(e){if(void 0!==e.backendURL)return s2(e.backendURL);if(!e.manifestURL)return;let t=s2(e.manifestURL.split(/[?#]/u)[0]??e.manifestURL);if(t.endsWith("/manifest")){try{let e=new URL(t,"https://c15t.invalid");if(!["http:","https:"].includes(e.protocol)||!e.pathname.endsWith("/manifest"))return}catch{return}return t.slice(0,-9)}},s3=function(e){if(e.defaults?.disableGeoLocation)return!1;let t=e.policyPacks??[];return 0===t.length||t.some(e=>(e.match.countries?.length??0)>0||(e.match.regions?.length??0)>0)},s6=function(){if("u"<typeof navigator)return;let e=navigator.globalPrivacyControl;return"boolean"==typeof e?e:void 0},s8=function(e,t){let n=t.language??e?.language??("u"<typeof navigator?"en":navigator.language);return{country:t.country??e?.country??null,gpc:t.gpc??e?.gpc??s6(),language:n,region:t.region??e?.region??null}},s4={en:sk},s7=function(e){let t;if(!(e.manifest||e.manifestURL))throw Error("@c15t/browser: manifest() needs `manifest` or `manifestURL`.");let n=s5(e);if(void 0===n)throw Error("@c15t/browser: manifest() needs `backendURL` unless `manifestURL` ends in `/manifest`. Pass the consent API URL, or an empty string for this origin.");let i=ni({backendURL:n,fetch:e.fetch}),o=async function(){let t=e.fetch??globalThis.fetch,n=await t(e.manifestURL,{headers:{...t4}});if(!n.ok)throw Error(`@c15t/browser: manifest request failed with ${n.status}`);return await n.json()},r=async function(){if(e.manifest)return e.manifest;t??=o();try{return await t}catch(e){throw t=void 0,e}},s={identify:i.identify,async init(t){let n=await r(),o=s8(e.inputs,t.overrides);return s3(n)&&(!o.country||!o.region&&n.policyPacks?.some(e=>(e.match.regions?.length??0)>0))?i.init(t):tM(s1(n,o,{baseTranslations:s4}),{})},loadSubjectRecord:i.loadSubjectRecord,recordPrivacyOptOut:i.recordPrivacyOptOut,save:i.save};return Object.assign(()=>s,{kind:"custom"})},s9=function(e={}){return Object.assign(t=>({init:({overrides:n})=>Promise.resolve({policyResolution:e6(e3({countryCode:n.country??null,iabEnabled:t.iabEnabled,regionCode:n.region??null,rules:e.policyRules??nW({iab:t.iabEnabled})})),translations:t.translations})}),{kind:"offline"})},ae="data-c15t-action",at=new Set(["accept","reject","customize","close","dismiss","banner"]),an=function(e){if(e)return e.map(e=>{if("string"!=typeof e)return e;let t=Object.hasOwn(nH,e)?nH[e]:void 0;if("function"!=typeof t)throw Error(`@c15t/browser: unknown policy preset "${e}". Expected one of ${Object.keys(nH).join(", ")}.`);return t()})},ai=function(e){if("function"==typeof e.mode){let{kind:t}=e.mode;return{factory:e.mode,name:"hosted"===t||"offline"===t?t:"custom"}}let t=e.mode??(e.manifest||e.manifestURL?"manifest":e.backendURL?"hosted":"offline");if("hosted"===t){if(!e.backendURL)throw Error("@c15t/browser: hosted mode needs `backendURL` (or data-backend-url on the script tag).");return{factory:no({url:e.backendURL}),name:t}}return"manifest"===t?{factory:s7({backendURL:e.backendURL,inputs:e.overrides,manifest:e.manifest,manifestURL:e.manifestURL}),name:t}:{factory:s9({policyRules:an(e.policyRules)}),name:t}},ao=function(e,t){let n=["necessary",...e.policyRule.scope];if(0===t.length)return Array.from(n);let i=new Set(n);return Array.from(new Set(["necessary",...t.filter(e=>i.has(e))]))},ar=function(e,t){"u">typeof document&&document.dispatchEvent(new CustomEvent(`c15t:${e}`,{detail:t}))},as=function(e){if(!(e instanceof Element))return null;let t=e.closest(`[${ae}]`),n=t?.getAttribute(ae);if(n&&at.has(n))return n;let i=e.closest("a[href]");return(i?.getAttribute("href")??"").endsWith("#c15t-preferences")?"customize":null},aa=function(e={},t={}){if(e.iab&&!1!==e.iab.enabled&&!t.createIAB)throw Error("@c15t/browser: IAB requires the @c15t/browser/iab entry.");let n=ai(e),i=e.consentCategories??[],o=s$({callbacks:e.callbacks,consentCategories:e.consentCategories,createIAB:t.createIAB,enabled:e.enabled,i18n:e.i18n,iab:t.createIAB?e.iab??{enabled:!0}:void 0,iframeBlocker:e.iframeBlocker,mode:n.factory,networkBlocker:e.networkBlocker,overrides:e.overrides,pkg:e.pkg??t.pkg??"@c15t/browser",policyRules:an(e.policyRules),prefetch:e.prefetch,presentation:e.presentation,scripts:e.scripts,storageConfig:e.storageConfig,user:e.user,windowDebug:!1}),{kernel:r}=o,s=sN(()=>r.getSnapshot()),a=!1,c=!1,l=[],u={consent:new Set,error:new Set,ready:new Set,ui:new Set},d=function(e,t){for(let n of u[e])n(t);ar(e,t)},p=function(e,t){a||c?l.push(()=>d(e,t)):d(e,t)},f=sR(),g=null,m=function(e){g||(g=e,f.resolve(e),d("ready",e))},y=function(e){a||c?l.push(()=>m(e)):m(e)},h=null,v=!1,b=!1,w=null,k=r.getSnapshot(),A=k.activeUI,I=k.effectivePermissions,j=k.explicitChoice,S=[s.dispose,r.events.on("init:applied",({snapshot:e})=>{y(e)}),r.events.on("command:error",({error:e})=>{p("error",e)}),r.subscribe(e=>{(e.effectivePermissions!==I||e.explicitChoice!==j)&&(I=e.effectivePermissions,j=e.explicitChoice,v&&!a&&s.scan(),p("consent",e)),e.activeUI!==A&&(A=e.activeUI,p("ui",e.activeUI))})],C=function(){return ao(r.getSnapshot(),i)},P=0,O=()=>{P+=1,r.set.activeUI("none")},x=()=>{P+=1,r.set.activeUI("dialog")},D=()=>{P+=1,r.set.activeUI("banner")},$=async e=>{let t=P+=1,n=r.getSnapshot().activeUI,{fingerprint:i}=r.getSnapshot().evaluationPolicy.choice,o=r.commands.save(e,{categories:C()});r.set.activeUI(n);let s=await o;return s.ok&&t===P&&i===r.getSnapshot().evaluationPolicy.choice.fingerprint&&r.set.activeUI("none"===r.getSnapshot().promptRequirement.kind?"none":"banner"),s},R=async e=>{let t=o.iab;if(!t||!r.getSnapshot().iab?.gvl||"iab"!==r.getSnapshot().policyRule.model)return p("error",Error("IAB privacy settings are not ready.")),{ok:!1};let n=P+=1,i=r.getSnapshot();try{!0===e&&t.acceptAll(),!1===e&&t.rejectAll(),await t.save();let o=r.getSnapshot();if(!o.iab?.authority||o.evaluationPolicy.choice.fingerprint!==i.evaluationPolicy.choice.fingerprint)return{ok:!1};return n===P&&r.set.activeUI("none"),{ok:!0}}catch(e){return n===P&&r.set.activeUI(i.activeUI),p("error",e instanceof Error?e:Error(String(e))),{ok:!1}}},E=()=>"iab"===r.getSnapshot().policyRule.model?R(!0):$("all"),T=()=>"iab"===r.getSnapshot().policyRule.model?R(!1):$("none"),L=function(e){let t=as(e.target);if(t)switch(e.preventDefault(),t){case"accept":E();break;case"reject":T();break;case"customize":x();break;case"dismiss":r.commands.dismissNotice();break;case"banner":D();break;default:O()}},M={acceptAll:E,closeDialog:O,get consentCategories(){return C()},dismissNotice:()=>r.commands.dismissNotice(),dispose(){if(!b){for(let e of(b=!0,P+=1,v=!1,w?.(),w=null,h?.destroy(),h=null,S.reverse()))e();S.length=0,o.dispose()}},getSnapshot:()=>r.getSnapshot(),has:e=>ir({category:e},r.getSnapshot()),hasConsented:()=>null!==r.getSnapshot().explicitChoice,async identify(e){await o.identify(e)},kernel:r,mode:n.name,mountUI(n){if(!t.mountUI)throw Error('@c15t/browser: this build is headless. Load c15t.js, or import `mountConsentUI` from "@c15t/browser".');return h?.destroy(),h=t.mountUI(M,n??(!1===e.ui?void 0:e.ui))},on(e,t){let n=u[e];return n.add(t),"ready"===e&&g&&t(g),"ui"===e&&g&&t(r.getSnapshot().activeUI),function(){n.delete(t)}},openDialog:x,options:e,ready:()=>f.promise,rejectAll:T,runtime:o,save(e){if("iab"===r.getSnapshot().policyRule.model)return p("error",Error("Use saveIAB() to confirm IAB preferences.")),Promise.resolve({ok:!1});let t=new Set(C());return $(Object.fromEntries(Object.entries(e).filter(([e])=>t.has(e))))},saveIAB:()=>R(),setLanguage(e){r.set.language(e),r.commands.init()},setOverrides(e){o.setOverrides(e)},showBanner:D,start(){if(v||b||"u"<typeof document)return;v=!0,t.onStart&&!1!==e.enabled&&S.push(t.onStart(e)),a=!0;try{o.start()}finally{a=!1}c=!0;try{for(let e of l){if(b)break;e()}}finally{c=!1,l.length=0}if(b||(s.scan(),b))return;let n=new MutationObserver(()=>s.scan());if(n.observe(document.documentElement,{childList:!0,subtree:!0}),S.push(()=>n.disconnect()),!1===e.enabled&&(y(r.getSnapshot()),b)||(document.addEventListener("click",L),w=()=>{document.removeEventListener("click",L)},!1===e.ui||!t.mountUI))return;let i=function(){b||h||(h=M.mountUI())};document.body?i():(document.addEventListener("DOMContentLoaded",i,{once:!0}),S.push(()=>{document.removeEventListener("DOMContentLoaded",i)}))},get started(){return v},subscribe:e=>r.subscribe(e),get ui(){return h}};return M},ac="c15t";!function(e){if("u"<typeof document)return;let{manual:t}=ng(document.currentScript);t||e.client?e.client:e.init()}(function(e){if("u"<typeof window)return e;let t=window,n=t[ac];if(null!==n&&"object"==typeof n&&"pkg"in n&&"string"==typeof n.pkg&&n.pkg.startsWith("@c15t/browser")&&"init"in n&&"function"==typeof n.init&&"client"in n)return n;if(t[ac]=e,!Array.isArray(n))return e;for(let t of n){let[n,...i]=t,o=e[n];"function"==typeof o&&o(...i)}return e}((e={pkg:"@c15t/browser/headless"},t=nd("u"<typeof document?null:document.currentScript),n=null,i=sR(),o=new Set,r=[],s=function(){if(!n)throw Error("@c15t/browser: call c15t.init() first, or wait for c15t.ready().");return n},a={acceptAll:()=>s().acceptAll(),get client(){return n},closeDialog:()=>{s().closeDialog()},config(e){n?console.warn("@c15t/browser: c15t.config() after init() has no effect; queue it before the tag or pass it to init()."):r.push(e)},custom:function(e){if("setConsent"in e)throw TypeError("c15t: custom() requires a KernelTransport with save(), not endpoint handlers");return Object.assign(()=>e,{kind:"custom"})},devtools:null,dismissNotice:()=>s().dismissNotice(),dispose:()=>{a.devtools?.destroy(),a.devtools=null,n?.dispose(),n=null,i=sR(),o.clear()},getSnapshot:()=>s().getSnapshot(),has:e=>s().has(e),hasConsented:()=>s().hasConsented(),hosted:no,identify:e=>s().identify(e),init(s){if(n)return n;let a=aa((s?[...r,s]:r).reduce(nf,t),e),c=i;for(let e of(n=a,o))e(a);return o.clear(),a.start(),c.resolve(a),a},manifest:s7,get mode(){return n?.mode??null},mountUI:e=>s().mountUI(e),offline:s9,on(e,t){if(n)return n.on(e,t);let i=null,r=function(n){i=n.on(e,t)};return o.add(r),function(){o.delete(r),i?.()}},onInit(e){let t=!1;return async function(){let n=await i.promise;t||e(n)}(),function(){t=!0}},openDialog:()=>{s().openDialog()},pkg:e.pkg??"@c15t/browser",ready:async()=>(await i.promise).ready(),rejectAll:()=>s().rejectAll(),save:e=>s().save(e),saveIAB:()=>s().saveIAB(),setLanguage:e=>{s().setLanguage(e)},showBanner:()=>{s().showBanner()},subscribe:e=>s().subscribe(e),version:"3.0.0-alpha.0"})))})();
|