File "1366.58b82552e3ddab74038c.js"
Full path: /home/satkhirabarta/public_html/wp-content/plugins/complianz-gdpr/settings/build/1366.58b82552e3ddab74038c.js
File
size: 7.58 B (7.58 KB bytes)
MIME-type: text/plain
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[1366,9091,9758],{99091:(e,t,n)=>{n.r(t),n.d(t,{UseCookieScanData:()=>o});var r=n(81621),a=n(9588);const o=(0,r.vt)(((e,t)=>({initialLoadCompleted:!1,setInitialLoadCompleted:t=>e({initialLoadCompleted:t}),iframeLoaded:!1,loading:!1,nextPage:!1,progress:0,cookies:[],lastLoadedIframe:"",setIframeLoaded:t=>e({iframeLoaded:t}),setLastLoadedIframe:t=>e((e=>({lastLoadedIframe:t}))),setProgress:t=>e({progress:t}),fetchProgress:()=>(e({loading:!0}),a.doAction("get_scan_progress",{}).then((t=>(e({initialLoadCompleted:!0,loading:!1,nextPage:t.next_page,progress:t.progress,cookies:t.cookies}),t))))})))},79758:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(86087),a=n(9588),o=n(4219),s=n(52043),c=n(56427),i=n(99091),l=n(32828);const d=(0,r.memo)((({type:e="action",style:t="tertiary",label:n,onClick:d,href:u="",target:m="",disabled:p,action:f,field:b,children:h})=>{if(!n&&!h)return null;const g=(b&&b.button_text?b.button_text:n)||h,{fetchFieldsData:k,showSavedSettingsNotice:v}=(0,o.default)(),{setInitialLoadCompleted:E,setProgress:_}=(0,i.UseCookieScanData)(),{setProgressLoaded:y}=(0,l.default)(),{selectedSubMenuItem:C}=(0,s.default)(),[N,I]=(0,r.useState)(!1),w=`button cmplz-button button--${t} button-${e}`,x=async e=>{await a.doAction(b.action,{}).then((e=>{e.success&&(k(C),"reset_settings"===e.id&&(E(!1),_(0),y(!1)),v(e.message))}))},A=b&&b.warn?b.warn:"";return"action"===e?(0,r.createElement)(r.Fragment,null,c.__experimentalConfirmDialog&&(0,r.createElement)(c.__experimentalConfirmDialog,{isOpen:N,onConfirm:async()=>{I(!1),await x()},onCancel:()=>{I(!1)}},A),(0,r.createElement)("button",{className:w,onClick:async t=>{if("action"!==e||!d)return"action"===e&&f?c.__experimentalConfirmDialog?void(b&&b.warn?I(!0):await x()):void await x():void(window.location.href=b.url);d(t)},disabled:p},g)):"link"===e?(0,r.createElement)("a",{className:w,href:u,target:m},g):void 0}))},81366:(e,t,n)=>{n.r(t),n.d(t,{default:()=>A});var r=n(86087),a=n(58168),o=n(51609),s=n(91071),c=n(62133),i=n(9957),l=n(81351),d=n(85357),u=n(31769),m=n(7971),p=n(12579);const f="Checkbox",[b,h]=(0,c.A)(f),[g,k]=b(f),v=(0,o.forwardRef)(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:c,defaultChecked:d,required:u,disabled:m,value:f="on",onCheckedChange:b,...h}=e,[k,v]=(0,o.useState)(null),C=(0,s.s)(t,(e=>v(e))),N=(0,o.useRef)(!1),I=!k||Boolean(k.closest("form")),[w=!1,x]=(0,l.i)({prop:c,defaultProp:d,onChange:b}),A=(0,o.useRef)(w);return(0,o.useEffect)((()=>{const e=null==k?void 0:k.form;if(e){const t=()=>x(A.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[k,x]),(0,o.createElement)(g,{scope:n,state:w,disabled:m},(0,o.createElement)(p.sG.button,(0,a.A)({type:"button",role:"checkbox","aria-checked":_(w)?"mixed":w,"aria-required":u,"data-state":y(w),"data-disabled":m?"":void 0,disabled:m,value:f},h,{ref:C,onKeyDown:(0,i.m)(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:(0,i.m)(e.onClick,(e=>{x((e=>!!_(e)||!e)),I&&(N.current=e.isPropagationStopped(),N.current||e.stopPropagation())}))})),I&&(0,o.createElement)(E,{control:k,bubbles:!N.current,name:r,value:f,checked:w,required:u,disabled:m,style:{transform:"translateX(-100%)"}}))})),E=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,c=(0,o.useRef)(null),i=(0,d.Z)(n),l=(0,u.X)(t);return(0,o.useEffect)((()=>{const e=c.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=_(n),a.call(e,!_(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),(0,o.createElement)("input",(0,a.A)({type:"checkbox","aria-hidden":!0,defaultChecked:!_(n)&&n},s,{tabIndex:-1,ref:c,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function _(e){return"indeterminate"===e}function y(e){return _(e)?"indeterminate":e?"checked":"unchecked"}const C=v,N=(0,o.forwardRef)(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,c=k("CheckboxIndicator",n);return(0,o.createElement)(m.C,{present:r||_(c.state)||!0===c.state},(0,o.createElement)(p.sG.span,(0,a.A)({"data-state":y(c.state),"data-disabled":c.disabled?"":void 0},s,{ref:t,style:{pointerEvents:"none",...e.style}})))}));var I=n(27723),w=n(45111),x=n(79758);const A=(0,r.memo)((({indeterminate:e,label:t,value:n,id:a,onChange:o,required:s,disabled:c,options:i={}})=>{const[l,d]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1);let p=n;Array.isArray(p)||(p=""===p?[]:[p]),(0,r.useEffect)((()=>{let e=1===Object.keys(i).length&&"true"===Object.keys(i)[0];d(e)}),[]),e&&(n=!0);const f=p;let b=!1;Object.keys(i).length>10&&(b=!0);const h=e=>l?n:f.includes(""+e)||f.includes(parseInt(e)),g=()=>{m(!u)};let k=c&&!Array.isArray(c);return 0===Object.keys(i).length?(0,r.createElement)(r.Fragment,null,(0,I.__)("No options found","complianz-gdpr")):(0,r.createElement)("div",{className:"cmplz-checkbox-group"},Object.entries(i).map((([i,d],m)=>(0,r.createElement)("div",{key:i,className:"cmplz-checkbox-group__item"+(!u&&m>9?" cmplz-hidden":"")},(0,r.createElement)(C,{className:"cmplz-checkbox-group__checkbox",id:a+"_"+i,checked:h(i),"aria-label":t,disabled:k||Array.isArray(c)&&c.includes(i),required:s,onCheckedChange:e=>((e,t)=>{if(l)o(!n);else{const e=f.includes(""+t)||f.includes(parseInt(t))?f.filter((e=>e!==""+t&&e!==parseInt(t))):[...f,t];o(e)}})(0,i)},(0,r.createElement)(N,{className:"cmplz-checkbox-group__indicator"},(0,r.createElement)(w.default,{name:e?"indeterminate":"check",size:14,color:"dark-blue"}))),(0,r.createElement)("label",{className:"cmplz-checkbox-group__label",htmlFor:a+"_"+i},d)))),!u&&b&&(0,r.createElement)(x.default,{onClick:()=>g()},(0,I.__)("Show more","complianz-gdpr")),u&&b&&(0,r.createElement)(x.default,{onClick:()=>g()},(0,I.__)("Show less","complianz-gdpr")))}))},7971:(e,t,n)=>{n.d(t,{C:()=>c});var r=n(51609),a=n(75795),o=n(91071),s=n(88200);const c=e=>{const{present:t,children:n}=e,c=function(e){const[t,n]=(0,r.useState)(),o=(0,r.useRef)({}),c=(0,r.useRef)(e),l=(0,r.useRef)("none"),d=e?"mounted":"unmounted",[u,m]=function(e,t){return(0,r.useReducer)(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,r.useEffect)((()=>{const e=i(o.current);l.current="mounted"===u?e:"none"}),[u]),(0,s.N)((()=>{const t=o.current,n=c.current;if(n!==e){const r=l.current,a=i(t);e?m("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?m("UNMOUNT"):m(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),c.current=e}}),[e,m]),(0,s.N)((()=>{if(t){const e=e=>{const n=i(o.current).includes(e.animationName);e.target===t&&n&&(0,a.flushSync)((()=>m("ANIMATION_END")))},n=e=>{e.target===t&&(l.current=i(o.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}m("ANIMATION_END")}),[t,m]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:(0,r.useCallback)((e=>{e&&(o.current=getComputedStyle(e)),n(e)}),[])}}(t),l="function"==typeof n?n({present:c.isPresent}):r.Children.only(n),d=(0,o.s)(c.ref,l.ref);return"function"==typeof n||c.isPresent?(0,r.cloneElement)(l,{ref:d}):null};function i(e){return(null==e?void 0:e.animationName)||"none"}c.displayName="Presence"},85357:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(51609);function a(e){const t=(0,r.useRef)({value:e,previous:e});return(0,r.useMemo)((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}}}]);