"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[626,9091,756,2010],{10626:(e,a,t)=>{t.r(a),t.d(a,{default:()=>u});var o=t(86087),n=t(9588),l=t(99091),s=t(27723),c=t(52010),r=t(45111),i=t(15139),d=t(52043),m=t(4219),p=t(80756),_=t(32828);const u=(0,o.memo)((()=>{const{setSyncProgress:e,fetchSyncProgressData:a}=(0,i.default)(),{initialLoadCompleted:t,loading:u,nextPage:g,progress:f,setProgress:b,cookies:k,fetchProgress:h,lastLoadedIframe:z,setLastLoadedIframe:v}=(0,l.UseCookieScanData)(),[E,y]=(0,o.useState)(!1),{addHelpNotice:w,fieldsLoaded:C}=(0,m.default)(),{selectedSubMenuItem:L}=(0,d.default)(),{setProgressLoaded:N}=(0,_.default)();(0,o.useEffect)((()=>{z!==g&&(E||(y(!0),T()))}),[g,z,E]),(0,o.useEffect)((()=>{!E&&!u&&f<100&&h()}),[E,u,f]),(0,o.useEffect)((()=>{C&&(void 0===window.canRunAds&&w("cookie_scan","warning",(0,s.__)("You are using an ad blocker. This will prevent most cookies from being placed. Please run the scan without an adblocker enabled.","complianz-gdpr"),(0,s.__)("Ad Blocker detected.","complianz-gdpr"),null),P()&&w("cookie_scan","warning",(0,s.__)("Your browser has the Do Not Track or Global Privacy Control setting enabled.","complianz-gdpr")+"&nbsp;"+(0,s.__)("This will prevent most cookies from being placed.","complianz-gdpr")+"&nbsp;"+(0,s.__)("Please run the scan with these browser options disabled.","complianz-gdpr"),(0,s.__)("DNT or GPC enabled.","complianz-gdpr"),null))}),[C]);const P=()=>{let e="doNotTrack"in navigator&&"1"===navigator.doNotTrack;return"globalPrivacyControl"in navigator&&navigator.globalPrivacyControl||e},T=()=>{if(!g)return void y(!1);let e=document.getElementById("cmplz_cookie_scan_frame");e||(e=document.createElement("iframe"),e.setAttribute("id","cmplz_cookie_scan_frame"),e.classList.add("hidden")),e.setAttribute("src",g),e.onload=function(e){setTimeout((()=>{y(!1),v(g)}),200)},document.body.appendChild(e)};if("cookie-scan"!==L)return null;let I=k?k.length:0,S="";S=0===I?(0,s.__)("No cookies found on your domain yet.","complianz-gdpr"):1===I?(0,s.__)("The scan found 1 cookie on your domain.","complianz-gdpr"):(0,s.__)("The scan found %s cookies on your domain.","complianz-gdpr").replace("%s",I),f>=100?I>0&&(S+=" "+(0,s.__)("Continue the wizard to categorize cookies and configure consent.","complianz-gdpr")):S+=" "+(0,s.__)("Scanning, %s complete.","complianz-gdpr").replace("%s",Math.round(f)+"%"),t||(S=(0,o.createElement)(r.default,{name:"loading",color:"grey"}));let A=f<100&&f>0;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"cmplz-table-header"},(0,o.createElement)("button",{disabled:A,className:"button button-default",onClick:t=>(async()=>{b(1),await n.doAction("scan",{scan_action:"restart"}),await h(),100===f&&(await a(),k.length>0&&e(1))})()},(0,s.__)("Scan","complianz-gdpr")),(0,o.createElement)("button",{disabled:A,className:"button button-default cmplz-reset-button",onClick:t=>(async()=>{b(1),await n.doAction("scan",{scan_action:"reset"}),await h(),100===f&&(N(!1),await a(),k.length>0&&e(1))})()},(0,s.__)("Clear Cookies","complianz-gdpr"))),(0,o.createElement)("div",{id:"cmplz-scan-progress"},(0,o.createElement)("div",{className:"cmplz-progress-bar",style:Object.assign({},{width:f+"%"})})),(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"cmplz-panel__list"},(0,o.createElement)(c.default,{summary:S,details:(0,p.default)(t,k)}))))}))},99091:(e,a,t)=>{t.r(a),t.d(a,{UseCookieScanData:()=>l});var o=t(81621),n=t(9588);const l=(0,o.vt)(((e,a)=>({initialLoadCompleted:!1,setInitialLoadCompleted:a=>e({initialLoadCompleted:a}),iframeLoaded:!1,loading:!1,nextPage:!1,progress:0,cookies:[],lastLoadedIframe:"",setIframeLoaded:a=>e({iframeLoaded:a}),setLastLoadedIframe:a=>e((e=>({lastLoadedIframe:a}))),setProgress:a=>e({progress:a}),fetchProgress:()=>(e({loading:!0}),n.doAction("get_scan_progress",{}).then((a=>(e({initialLoadCompleted:!0,loading:!1,nextPage:a.next_page,progress:a.progress,cookies:a.cookies}),a))))})))},80756:(e,a,t)=>{t.r(a),t.d(a,{default:()=>n});var o=t(86087);const n=(e,a)=>(0,o.createElement)(o.Fragment,null,e&&a.map(((e,a)=>(0,o.createElement)("div",{key:a},e))))},52010:(e,a,t)=>{t.r(a),t.d(a,{default:()=>l});var o=t(86087),n=t(45111);const l=e=>{const[a,t]=(0,o.useState)(!1);return(0,o.createElement)("div",{className:"cmplz-panel__list__item",style:e.style?e.style:{}},(0,o.createElement)("details",{open:a},(0,o.createElement)("summary",{onClick:e=>(e=>{e.preventDefault(),t(!a)})(e)},e.icon&&(0,o.createElement)(n.default,{name:e.icon}),(0,o.createElement)("h5",{className:"cmplz-panel__list__item__title"},e.summary),(0,o.createElement)("div",{className:"cmplz-panel__list__item__comment"},e.comment),(0,o.createElement)("div",{className:"cmplz-panel__list__item__icons"},e.icons),(0,o.createElement)(n.default,{name:"chevron-down",size:18})),(0,o.createElement)("div",{className:"cmplz-panel__list__item__details"},a&&e.details)))}}}]);