قرینه از
https://github.com/matomo-org/matomo.git
synced 2025-08-22 06:57:53 +00:00

* Add compliance page UI * Update naming * Fix linting problems * revert some unnecessary changes * Update text as per feedback and migrate text to lang files * use translate string for save button * replace table column headers with translate string * link UI into existing APIs * Update CNIL text to be more accurate * Fix vue imports * Build dist files * minor renames and remove excess html * decouple requirement value from onscreen values * made name value on checkbox unique * add pairing label to site selector * Build vue files * clean up API connection * update misnamed property * standardise variable names * renaming variables to be more consistent * PHPCS * Build vue files * Use camel case for compliance store data * Add missing component import * Build dist files # Conflicts: # plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js # plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js * Remove p from inside label * fix broken test * update broken UI tests * Update expected UI test screenshot # Conflicts: # plugins/PrivacyManager/tests/UI/expected-screenshots/PrivacyManager_compliance.png * rename variables to match front end * fix broken test * fix broken UI test * add error handling to API calls * remove workaround for data transformation * replace hardcoded text with translations * add new UI tests to cover CNIL demo * Build vue files * try to fix UI tests * remove extra code which was breaking UI tests * fix broken UI tests with fixed screenshots --------- Co-authored-by: Matt <1169490+caddoo@users.noreply.github.com> Co-authored-by: Michal Kleiner <michal@innocraft.com> Co-authored-by: innocraft-automation <innocraft-automation@users.noreply.github.com>
14 خطوط
102 KiB
JavaScript
Generated
14 خطوط
102 KiB
JavaScript
Generated
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin","SegmentEditor"],t):"object"===typeof exports?exports["PrivacyManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):e["PrivacyManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"],e["SegmentEditor"])})("undefined"!==typeof self?self:this,(function(e,t,n,a){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/PrivacyManager/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},f06f:function(e,t){e.exports=a},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ManageGdpr",(function(){return ie})),n.d(t,"AnonymizeIp",(function(){return he})),n.d(t,"OptOutCustomizer",(function(){return qe})),n.d(t,"AnonymizeLogData",(function(){return _t})),n.d(t,"DoNotTrackPreference",(function(){return wt})),n.d(t,"ReportDeletionSettings",(function(){return Bt})),n.d(t,"DeleteOldLogs",(function(){return qt})),n.d(t,"DeleteOldReports",(function(){return an})),n.d(t,"ScheduleReportDeletion",(function(){return Sn})),n.d(t,"AskingForConsent",(function(){return Ln})),n.d(t,"GdprOverview",(function(){return da})),n.d(t,"PreviousAnonymizations",(function(){return Ea})),n.d(t,"PrivacySettings",(function(){return za})),n.d(t,"Compliance",(function(){return eo})),n.d(t,"UsersOptOut",(function(){return io})),"undefined"!==typeof window){var a=window.document.currentScript,o=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var l=n("8bbf");const i={class:"manageGdpr"},r={class:"intro"},c=Object(l["createElementVNode"])("br",null,null,-1),s=Object(l["createElementVNode"])("br",null,null,-1),d=Object(l["createElementVNode"])("br",null,null,-1),m=Object(l["createElementVNode"])("br",null,null,-1),u=["innerHTML"],b={class:"form-group row"},p={class:"col s12 input-field"},O={for:"gdprsite",class:"siteSelectorLabel"},g={class:"sites_autocomplete"},j={key:0,class:"form-group row segmentFilterGroup"},h={class:"col s12"},y={style:{margin:"8px 0",display:"inline-block"}},v={key:2,class:"dataUnavailable system notification notification-icon notification-info"},V=["innerHTML"],f={key:0,class:"system notification notification-icon notification-info"},S={class:"notification-body"},D=["innerHTML"],E=Object(l["createElementVNode"])("br",null,null,-1),N=Object(l["createElementVNode"])("br",null,null,-1),C=Object(l["createElementVNode"])("br",null,null,-1),k=Object(l["createElementVNode"])("br",null,null,-1),_={class:"checkInclude"},P={colspan:"8"},M=["title"],w={class:"checkInclude"},T=["title"],z={class:"visitId"},B={class:"visitorId"},I=["title","onClick"],A={class:"visitorIp"},L=["title","onClick"],x={class:"userId"},F=["title","onClick"],R=["title"],U=["src"],H=["title"],q=["src"],G=["title"],K=["src"],W=["title"],Y=["src"],J=["onClick"],Q=Object(l["createElementVNode"])("img",{src:"plugins/Live/images/visitorProfileLaunch.png",style:{"margin-right":"3.5px"}},null,-1),X={class:"ui-confirm",id:"confirmDeleteDataSubject",ref:"confirmDeleteDataSubject"},Z=["value"],ee=["value"];function te(e,t,n,a,o,$){const te=Object(l["resolveComponent"])("SiteSelector"),ne=Object(l["resolveComponent"])("SegmentGenerator"),ae=Object(l["resolveComponent"])("SaveButton"),oe=Object(l["resolveComponent"])("ContentBlock"),le=Object(l["resolveComponent"])("Field"),ie=Object(l["resolveDirective"])("content-table");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",i,[Object(l["createVNode"])(oe,{"content-title":e.translate("PrivacyManager_GdprTools")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",r,[Object(l["createElementVNode"])("p",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro1"))+" ",1),c,s,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro2"))+" ",1),d]),Object(l["createElementVNode"])("ol",null,[Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroAccessRight")),1),Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroEraseRight")),1)]),Object(l["createElementVNode"])("p",null,[m,Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.overviewHintText)},null,8,u)])]),Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_SearchForDataSubject")),1),Object(l["createElementVNode"])("div",b,[Object(l["createElementVNode"])("div",p,[Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("label",O,Object(l["toDisplayString"])(e.translate("PrivacyManager_SelectWebsite")),1),Object(l["createElementVNode"])("div",g,[Object(l["createVNode"])(te,{id:"gdprsite",modelValue:e.site,"onUpdate:modelValue":[t[0]||(t[0]=t=>e.site=t),t[1]||(t[1]=t=>e.changeSite(t))],"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),e.isVisitorLogAndProfileEnabled?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",j,[Object(l["createElementVNode"])("div",h,[Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("label",y,Object(l["toDisplayString"])(e.translate("PrivacyManager_FindDataSubjectsBy")),1),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(ne,{modelValue:e.segment_filter,"onUpdate:modelValue":t[2]||(t[2]=t=>e.segment_filter=t),"visit-segments-only":!0,idsite:e.site.id,"show-segment-editor":!0},null,8,["modelValue","idsite"])])])])])):Object(l["createCommentVNode"])("",!0),e.isVisitorLogAndProfileEnabled?(Object(l["openBlock"])(),Object(l["createBlock"])(ae,{key:1,class:"findDataSubjects",value:e.translate("PrivacyManager_FindMatchingDataSubjects"),onConfirm:t[3]||(t[3]=t=>e.findDataSubjects()),disabled:!e.segment_filter,saving:e.isLoading},null,8,["value","disabled","saving"])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",v,[Object(l["createElementVNode"])("strong",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_SiteDataNotAvailable")),1),Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_VisitorLogsProfilesDisabledMessage")),1),Object(l["createElementVNode"])("p",{innerHTML:e.$sanitize(e.siteSettingsTextSingle)},null,8,V)]))]),_:1},8,["content-title"]),e.allWebsitesContainsDisabledSite?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",f,[Object(l["createElementVNode"])("strong",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_SiteDataNotAvailableCertainSites")),1),Object(l["createElementVNode"])("div",S,[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_VisitorLogsProfilesSiteNamesDisabledMessage")),1),Object(l["createElementVNode"])("p",{innerHTML:e.$sanitize(e.siteSettingsText)},null,8,D)])])):Object(l["createCommentVNode"])("",!0),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_NoDataSubjectsFound")),1)],512),[[l["vShow"],!e.dataSubjects.length&&e.hasSearched]]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_MatchingDataSubjects")),1),Object(l["createElementVNode"])("p",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_VisitsMatchedCriteria"))+" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_ExportingNote"))+" ",1),E,Object(l["createTextVNode"])(),N,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_DeletionFromMatomoOnly"))+" ",1),C,k,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_ResultIncludesAllVisits")),1)]),Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("table",null,[Object(l["createElementVNode"])("thead",null,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("th",_,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(le,{uicontrol:"checkbox",name:"activateAll","model-value":e.toggleAll,"onUpdate:modelValue":t[4]||(t[4]=t=>{e.toggleAll=t,e.toggleActivateAll()}),"full-width":!0},null,8,["model-value"])])]),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Website")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_VisitId")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_VisitorID")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_VisitorIP")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_UserId")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Details")),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Action")),513),[[l["vShow"],e.profileEnabled]])])]),Object(l["createElementVNode"])("tbody",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("td",P,Object(l["toDisplayString"])(e.translate("PrivacyManager_ResultTruncated","400")),1)],512),[[l["vShow"],e.dataSubjects.length>400]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.dataSubjects,(t,n)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",{title:`${e.translate("PrivacyManager_LastAction")}: ${t.lastActionDateTime}`,key:n},[Object(l["createElementVNode"])("td",w,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(le,{uicontrol:"checkbox",name:"subject"+t.idVisit,modelValue:e.dataSubjectsActive[n],"onUpdate:modelValue":t=>e.dataSubjectsActive[n]=t,"full-width":!0},null,8,["name","modelValue","onUpdate:modelValue"])])]),Object(l["createElementVNode"])("td",{class:"site",title:`(${e.translate("General_Id")} ${t.idSite})`},Object(l["toDisplayString"])(t.siteName),9,T),Object(l["createElementVNode"])("td",z,Object(l["toDisplayString"])(t.idVisit),1),Object(l["createElementVNode"])("td",B,[Object(l["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIdToSearch"),onClick:n=>e.addFilter("visitorId",t.visitorId)},Object(l["toDisplayString"])(t.visitorId),9,I)]),Object(l["createElementVNode"])("td",A,[Object(l["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIPToSearch"),onClick:n=>e.addFilter("visitIp",t.visitIp)},Object(l["toDisplayString"])(t.visitIp),9,L)]),Object(l["createElementVNode"])("td",x,[Object(l["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddUserIdToSearch"),onClick:n=>e.addFilter("userId",t.userId)},Object(l["toDisplayString"])(t.userId),9,F)]),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("span",{title:`${t.deviceType} ${t.deviceModel}`,style:{"margin-right":"3.5px"}},[Object(l["createElementVNode"])("img",{height:"16",src:t.deviceTypeIcon},null,8,U)],8,R),Object(l["createElementVNode"])("span",{title:t.operatingSystem,style:{"margin-right":"3.5px"}},[Object(l["createElementVNode"])("img",{height:"16",src:t.operatingSystemIcon},null,8,q)],8,H),Object(l["createElementVNode"])("span",{title:`${t.browser} ${t.browserFamilyDescription}`,style:{"margin-right":"3.5px"}},[Object(l["createElementVNode"])("img",{height:"16",src:t.browserIcon},null,8,K)],8,G),Object(l["createElementVNode"])("span",{title:`${t.country} ${t.region||""}`},[Object(l["createElementVNode"])("img",{height:"16",src:t.countryFlag},null,8,Y)],8,W)]),Object(l["withDirectives"])(Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("a",{class:"visitorLogTooltip",title:"View visitor profile",onClick:n=>e.showProfile(t.visitorId,t.idSite)},[Q,Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.translate("Live_ViewVisitorProfile")),1)],8,J)],512),[[l["vShow"],e.profileEnabled]])],8,M))),128))])])),[[ie]]),Object(l["createVNode"])(ae,{class:"exportDataSubjects",style:{"margin-right":"3.5px"},onConfirm:t[5]||(t[5]=t=>e.exportDataSubject()),disabled:!e.hasActiveDataSubjects,value:e.translate("PrivacyManager_ExportSelectedVisits")},null,8,["disabled","value"]),Object(l["createVNode"])(ae,{class:"deleteDataSubjects",onConfirm:t[6]||(t[6]=t=>e.deleteDataSubject()),disabled:!e.hasActiveDataSubjects||e.isDeleting,value:e.translate("PrivacyManager_DeleteSelectedVisits")},null,8,["disabled","value"])],512),[[l["vShow"],e.dataSubjects.length]]),Object(l["createElementVNode"])("div",X,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_DeleteVisitsConfirm")),1),Object(l["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Z),Object(l["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ee)],512)])}var ne=n("19dc"),ae=n("f06f"),oe=n("a5a2"),le=Object(l["defineComponent"])({components:{ContentBlock:ne["ContentBlock"],SiteSelector:ne["SiteSelector"],SegmentGenerator:ae["SegmentGenerator"],SaveButton:oe["SaveButton"],Field:oe["Field"]},directives:{ContentTable:ne["ContentTable"]},data(){return{isLoading:!1,isDeleting:!1,site:{id:"all",name:Object(ne["translate"])("UsersManager_AllWebsites")},segment_filter:"visitId==",dataSubjects:[],toggleAll:!0,hasSearched:!1,profileEnabled:ne["Matomo"].visitorProfileEnabled,dataSubjectsActive:[],isVisitorLogAndProfileEnabled:!0,allWebsitesContainsDisabledSite:!1}},created(){this.changeSite(this.site)},watch:{site(e){"all"!==e.id?(this.allWebsitesContainsDisabledSite=!1,this.isLoading=!0,this.dataSubjects=[],this.hasSearched=!1,ne["AjaxHelper"].fetch({method:"Live.isVisitorProfileEnabled",idSite:e.id}).then(e=>{this.isVisitorLogAndProfileEnabled=e.value}).finally(()=>{this.isLoading=!1})):this.isVisitorLogAndProfileEnabled=!0}},setup(){const e=ne["AjaxHelper"].fetch({method:"SitesManager.getSitesIdWithAdminAccess",filter_limit:"-1"});return{getSites(){return e}}},methods:{changeSite(e){ne["AjaxHelper"].fetch({module:"API",method:"Live.isVisitorProfileEnabled",filter_limit:-1,idSite:e.id},{createErrorNotification:!1}).then(e=>{e.value||"userId=="!==this.segment_filter?e.value&&"visitId=="===this.segment_filter&&(this.segment_filter="userId=="):this.segment_filter="visitId=="}).catch(()=>{this.segment_filter="visitId=="})},showSuccessNotification(e){const t=ne["NotificationsStore"].show({message:e,context:"success",id:"manageGdpr",type:"transient"});setTimeout(()=>{ne["NotificationsStore"].scrollToNotification(t)},200)},linkTo(e,t="PrivacyManager"){return"?"+ne["MatomoUrl"].stringify(Object.assign(Object.assign({},ne["MatomoUrl"].urlParsed.value),{},{module:t,action:e}))},toggleActivateAll(){this.dataSubjectsActive.fill(this.toggleAll)},showProfile(e,t){ne["Matomo"].helper.showVisitorProfilePopup(e,t)},exportDataSubject(){const e=this.activatedDataSubjects;ne["AjaxHelper"].post({module:"API",method:"PrivacyManager.exportDataSubjects",format:"json",filter_limit:-1},{visits:e}).then(e=>{this.showSuccessNotification(Object(ne["translate"])("PrivacyManager_VisitsSuccessfullyExported")),ne["Matomo"].helper.sendContentAsDownload("exported_data_subjects.json",JSON.stringify(e))})},deleteDataSubject(){ne["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteDataSubject,{yes:()=>{this.isDeleting=!0;const e=this.activatedDataSubjects;ne["AjaxHelper"].post({module:"API",method:"PrivacyManager.deleteDataSubjects",filter_limit:-1},{visits:e}).then(()=>{this.dataSubjects=[],this.showSuccessNotification(Object(ne["translate"])("PrivacyManager_VisitsSuccessfullyDeleted")),this.findDataSubjects()}).finally(()=>{this.isDeleting=!1})}})},addFilter(e,t){this.segment_filter+=`,${e}==${t}`,this.findDataSubjects()},findDataSubjects(){this.dataSubjects=[],this.dataSubjectsActive=[],this.isLoading=!0,this.toggleAll=!0,this.hasSearched=!1,this.getSites().then(e=>{let t=this.site.id;"all"!==t||ne["Matomo"].hasSuperUserAccess||(t=e,Array.isArray(e)&&(t=e.join(","))),ne["AjaxHelper"].fetch({method:"Live.isVisitorProfileEnabled",idSite:t}).then(e=>{this.allWebsitesContainsDisabledSite=!e.value}),ne["AjaxHelper"].fetch({idSite:t,module:"API",method:"PrivacyManager.findDataSubjects",segment:this.segment_filter}).then(e=>{this.hasSearched=!0,this.dataSubjectsActive=e.map(()=>!0),this.dataSubjects=e}).finally(()=>{this.isLoading=!1})})}},computed:{hasActiveDataSubjects(){return!!this.activatedDataSubjects.length},activatedDataSubjects(){return this.dataSubjects.filter((e,t)=>this.dataSubjectsActive[t]).map(e=>({idsite:e.idSite,idvisit:e.idVisit}))},overviewHintText(){return Object(ne["translate"])("PrivacyManager_GdprToolsOverviewHint",`<a href="${this.linkTo("gdprOverview")}">`,"</a>")},siteSettingsText(){return Object(ne["translate"])("PrivacyManager_PleaseEnableVisitorLogsProfilesSites",`<a href="${this.linkTo("index","SitesManager")}">`,"</a>")},siteSettingsTextSingle(){return Object(ne["translate"])("PrivacyManager_PleaseEnableVisitorLogsProfiles",`<a href="${this.linkTo("index","SitesManager")}">`,"</a>")}}});le.render=te;var ie=le;const re=Object(l["createElementVNode"])("br",null,null,-1),ce=Object(l["createElementVNode"])("br",null,null,-1),se=Object(l["createElementVNode"])("br",null,null,-1),de=Object(l["createElementVNode"])("br",null,null,-1),me={key:0},ue=Object(l["createElementVNode"])("br",null,null,-1),be=Object(l["createElementVNode"])("br",null,null,-1),pe={class:"alert-warning alert"};function Oe(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("Field"),c=Object(l["resolveComponent"])("SaveButton"),s=Object(l["resolveDirective"])("form");return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeIpSettings",title:e.translate("PrivacyManager_UseAnonymizeIp"),modelValue:e.actualEnabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.actualEnabled=t),"inline-help":e.anonymizeIpEnabledHelp},null,8,["title","modelValue","inline-help"])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"radio",name:"maskLength",title:e.translate("PrivacyManager_AnonymizeIpMaskLengtDescription"),modelValue:e.actualMaskLength,"onUpdate:modelValue":t[1]||(t[1]=t=>e.actualMaskLength=t),options:e.maskLengthOptions,"inline-help":e.translate("PrivacyManager_GeolocationAnonymizeIpNote")},null,8,["title","modelValue","options","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"radio",name:"useAnonymizedIpForVisitEnrichment",title:e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichment"),modelValue:e.actualUseAnonymizedIpForVisitEnrichment,"onUpdate:modelValue":t[2]||(t[2]=t=>e.actualUseAnonymizedIpForVisitEnrichment=t),options:e.useAnonymizedIpForVisitEnrichmentOptions,"inline-help":e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichmentNote")},null,8,["title","modelValue","options","inline-help"])])],512),[[l["vShow"],e.actualEnabled]]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeUserId",title:e.translate("PrivacyManager_PseudonymizeUserId"),modelValue:e.actualAnonymizeUserId,"onUpdate:modelValue":t[3]||(t[3]=t=>e.actualAnonymizeUserId=t)},{"inline-help":Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote"))+" ",1),re,ce,Object(l["createElementVNode"])("em",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote2")),1)]),_:1},8,["title","modelValue"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeOrderId",title:e.translate("PrivacyManager_UseAnonymizeOrderId"),modelValue:e.actualAnonymizeOrderId,"onUpdate:modelValue":t[4]||(t[4]=t=>e.actualAnonymizeOrderId=t),"inline-help":e.translate("PrivacyManager_AnonymizeOrderIdNote")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"forceCookielessTracking",title:e.translate("PrivacyManager_ForceCookielessTracking"),modelValue:e.actualForceCookielessTracking,"onUpdate:modelValue":t[5]||(t[5]=t=>e.actualForceCookielessTracking=t)},{"inline-help":Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription",e.trackerFileName))+" ",1),se,de,Object(l["createElementVNode"])("em",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription2")),1),e.trackerWritable?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",me,[ue,be,Object(l["createElementVNode"])("p",pe,Object(l["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescriptionNotWritable",e.trackerFileName)),1)]))]),_:1},8,["title","modelValue"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"select",name:"anonymizeReferrer",title:e.translate("PrivacyManager_AnonymizeReferrer"),modelValue:e.actualAnonymizeReferrer,"onUpdate:modelValue":t[6]||(t[6]=t=>e.actualAnonymizeReferrer=t),options:e.referrerAnonymizationOptions,"inline-help":e.translate("PrivacyManager_AnonymizeReferrerNote")},null,8,["title","modelValue","options","inline-help"])]),Object(l["createElementVNode"])("div",null,[e.configRandomisationFeatureFlag?(Object(l["openBlock"])(),Object(l["createBlock"])(r,{key:0,uicontrol:"checkbox",name:"randomizeConfigId",title:e.translate("PrivacyManager_UseRandomizeConfigId"),modelValue:e.actualRandomizeConfigId,"onUpdate:modelValue":t[7]||(t[7]=t=>e.actualRandomizeConfigId=t),"inline-help":e.translate("PrivacyManager_RandomizeConfigIdNote")},null,8,["title","modelValue","inline-help"])):Object(l["createCommentVNode"])("",!0)]),Object(l["createVNode"])(c,{onConfirm:t[8]||(t[8]=t=>e.save()),saving:e.isLoading},null,8,["saving"])])),[[s]])}function ge(e){return!0===e||1===e||"1"===e?1:0}var je=Object(l["defineComponent"])({props:{anonymizeIpEnabled:Boolean,anonymizeUserId:Boolean,maskLength:{type:Number,required:!0},useAnonymizedIpForVisitEnrichment:[Boolean,String,Number],anonymizeOrderId:Boolean,forceCookielessTracking:Boolean,anonymizeReferrer:String,maskLengthOptions:{type:Array,required:!0},useAnonymizedIpForVisitEnrichmentOptions:{type:Array,required:!0},trackerFileName:{type:String,required:!0},trackerWritable:{type:Boolean,required:!0},referrerAnonymizationOptions:{type:Object,required:!0},randomizeConfigId:Boolean,configRandomisationFeatureFlag:Boolean},components:{Field:oe["Field"],SaveButton:oe["SaveButton"]},directives:{Form:oe["Form"]},data(){return{isLoading:!1,actualEnabled:this.anonymizeIpEnabled,actualMaskLength:this.maskLength,actualUseAnonymizedIpForVisitEnrichment:ge(this.useAnonymizedIpForVisitEnrichment),actualAnonymizeUserId:!!this.anonymizeUserId,actualAnonymizeOrderId:!!this.anonymizeOrderId,actualForceCookielessTracking:!!this.forceCookielessTracking,actualAnonymizeReferrer:this.anonymizeReferrer,actualRandomizeConfigId:!!this.randomizeConfigId}},methods:{save(){this.isLoading=!0,ne["AjaxHelper"].post({module:"API",method:"PrivacyManager.setAnonymizeIpSettings"},{anonymizeIPEnable:this.actualEnabled?"1":"0",anonymizeUserId:this.actualAnonymizeUserId?"1":"0",anonymizeOrderId:this.actualAnonymizeOrderId?"1":"0",forceCookielessTracking:this.actualForceCookielessTracking?"1":"0",anonymizeReferrer:this.actualAnonymizeReferrer?this.actualAnonymizeReferrer:"",maskLength:this.actualMaskLength,useAnonymizedIpForVisitEnrichment:this.actualUseAnonymizedIpForVisitEnrichment,randomizeConfigId:this.actualRandomizeConfigId?"1":"0"}).then(()=>{const e=ne["NotificationsStore"].show({message:Object(ne["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});ne["NotificationsStore"].scrollToNotification(e)}).finally(()=>{this.isLoading=!1})}},computed:{anonymizeIpEnabledHelp(){const e=Object(ne["translate"])("PrivacyManager_AnonymizeIpInlineHelp"),t=Object(ne["translate"])("PrivacyManager_AnonymizeIpDescription");return`${e} ${t}`}}});je.render=Oe;var he=je;const ye={class:"optOutCustomizer"},ve=["innerHTML"],Ve={key:0,id:"opt-out-styling"},fe=["value"],Se=["value"],De=["value"],Ee=["value"],Ne=Object(l["createStaticVNode"])('<option value="px">px</option><option value="pt">pt</option><option value="em">em</option><option value="rem">rem</option><option value="%">%</option>',5),Ce=[Ne],ke=["value"],_e=["src"],Pe={class:"form-group row"},Me={class:"col s12 m6"},we={for:"codeType1"},Te={for:"codeType2"},ze={key:0},Be={class:"col s12 m6"},Ie=["innerHTML"],Ae={ref:"pre"},Le=["innerHTML"],xe={class:"system notification notification-info optOutTestReminder"},Fe=["innerHTML"];function Re(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("Field"),c=Object(l["resolveDirective"])("copy-to-clipboard");return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("div",ye,[Object(l["createElementVNode"])("p",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("CoreAdminHome_OptOutExplanation"))+" ",1),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.readThisToLearnMore)},null,8,ve)]),Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutAppearance")),1),Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("span",null,[Object(l["createElementVNode"])("label",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("input",{id:"applyStyling",type:"checkbox",name:"applyStyling","onUpdate:modelValue":t[0]||(t[0]=t=>e.applyStyling=t),onKeydown:t[1]||(t[1]=t=>e.updateCode()),onChange:t[2]||(t[2]=t=>e.updateCode())},null,544),[[l["vModelCheckbox"],e.applyStyling]]),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_ApplyStyling")),1)])])]),e.applyStyling?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ve,[Object(l["createElementVNode"])("p",null,[Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_FontColor"))+": ",1),Object(l["createElementVNode"])("input",{type:"color",value:e.fontColor,onKeydown:t[3]||(t[3]=t=>e.onFontColorChange(t)),onChange:t[4]||(t[4]=t=>e.onFontColorChange(t))},null,40,fe)]),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_BackgroundColor"))+": ",1),Object(l["createElementVNode"])("input",{type:"color",value:e.backgroundColor,onKeydown:t[5]||(t[5]=t=>e.onBgColorChange(t)),onChange:t[6]||(t[6]=t=>e.onBgColorChange(t))},null,40,Se)]),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_FontSize"))+": ",1),Object(l["createElementVNode"])("input",{id:"FontSizeInput",type:"number",min:"1",max:"100",value:e.fontSize,onKeydown:t[7]||(t[7]=t=>e.onFontSizeChange(t)),onChange:t[8]||(t[8]=t=>e.onFontSizeChange(t))},null,40,De)]),Object(l["createElementVNode"])("span",null,[Object(l["createElementVNode"])("select",{class:"browser-default",value:e.fontSizeUnit,onKeydown:t[9]||(t[9]=t=>e.onFontSizeUnitChange(t)),onChange:t[10]||(t[10]=t=>e.onFontSizeUnitChange(t))},Ce,40,Ee)]),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_FontFamily"))+": ",1),Object(l["createElementVNode"])("input",{id:"FontFamilyInput",type:"text",value:e.fontFamily,onKeydown:t[11]||(t[11]=t=>e.onFontFamilyChange(t)),onChange:t[12]||(t[12]=t=>e.onFontFamilyChange(t))},null,40,ke)])])])):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("span",null,[Object(l["createElementVNode"])("label",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("input",{id:"showIntro",type:"checkbox",name:"showIntro","onUpdate:modelValue":t[13]||(t[13]=t=>e.showIntro=t),onKeydown:t[14]||(t[14]=t=>e.updateCode()),onChange:t[15]||(t[15]=t=>e.updateCode())},null,544),[[l["vModelCheckbox"],e.showIntro]]),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_ShowIntro")),1)])])]),Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutPreview")),1),Object(l["createElementVNode"])("iframe",{id:"previewIframe",style:{border:"1px solid #333",height:"200px",width:"600px"},src:e.iframeUrl,class:Object(l["normalizeClass"])({withBg:e.withBg})},null,10,_e)]),Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("div",Pe,[Object(l["createElementVNode"])("div",Me,[Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutHtmlCode")),1),Object(l["createElementVNode"])("p",null,[Object(l["createElementVNode"])("label",we,[Object(l["withDirectives"])(Object(l["createElementVNode"])("input",{type:"radio",id:"codeType1",name:"codeType",value:"tracker","onUpdate:modelValue":t[16]||(t[16]=t=>e.codeType=t),onKeydown:t[17]||(t[17]=t=>e.updateCode()),onChange:t[18]||(t[18]=t=>e.updateCode())},null,544),[[l["vModelRadio"],e.codeType]]),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutUseTracker")),1)])]),Object(l["createElementVNode"])("p",null,[Object(l["createElementVNode"])("label",Te,[Object(l["withDirectives"])(Object(l["createElementVNode"])("input",{type:"radio",id:"codeType2",name:"codeType",value:"selfContained","onUpdate:modelValue":t[19]||(t[19]=t=>e.codeType=t),onKeydown:t[20]||(t[20]=t=>e.updateCode()),onChange:t[21]||(t[21]=t=>e.updateCode())},null,544),[[l["vModelRadio"],e.codeType]]),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutUseStandalone")),1)])]),"selfContained"===e.codeType?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",ze,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"select",name:"language",modelValue:e.language,"onUpdate:modelValue":t[22]||(t[22]=t=>e.language=t),title:e.translate("General_Language"),options:e.languageOptions,onKeydown:t[23]||(t[23]=t=>e.updateCode()),onChange:t[24]||(t[24]=t=>e.updateCode())},null,8,["modelValue","title","options"])])])):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("div",Be,[Object(l["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.codeTypeHelp)},null,8,Ie)])])]),Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("pre",Ae,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.codeBox)+"\n ",1)])),[[c,{}]])]),Object(l["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutExplanationIntro)},null,8,Le),Object(l["createElementVNode"])("div",xe,[Object(l["createElementVNode"])("p",null,[Object(l["createElementVNode"])("strong",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTest")),1)]),Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestBody")),1),Object(l["createElementVNode"])("p",null,[Object(l["createElementVNode"])("ul",null,[Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep1")),1),Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep2")),1),Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep3")),1),Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep4")),1)])])]),Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_BuildYourOwn")),1),Object(l["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutCustomOptOutLink)},null,8,Fe)])],64)}function Ue(e){const t=parseInt(e,16),n=t>>16&255,a=t>>8&255,o=255&t;return n>=225&&a>=225&&o>=225}const{$:He}=window;var $e=Object(l["defineComponent"])({props:{currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},matomoUrl:String},components:{Field:oe["Field"]},directives:{CopyToClipboard:ne["CopyToClipboard"]},data(){return{fontSizeUnit:"px",backgroundColor:"#FFFFFF",fontColor:"#000000",fontSize:"12",fontFamily:"Arial",showIntro:!0,applyStyling:!1,codeType:"tracker",code:"",language:this.currentLanguageCode}},created(){this.onFontColorChange=Object(ne["debounce"])(this.onFontColorChange,50),this.onBgColorChange=Object(ne["debounce"])(this.onBgColorChange,50),this.onFontSizeChange=Object(ne["debounce"])(this.onFontSizeChange,50),this.onFontSizeUnitChange=Object(ne["debounce"])(this.onFontSizeUnitChange,50),this.onFontFamilyChange=Object(ne["debounce"])(this.onFontFamilyChange,50),this.matomoUrl&&this.updateCode()},methods:{onFontColorChange(e){this.fontColor=e.target.value,this.updateCode()},onBgColorChange(e){this.backgroundColor=e.target.value,this.updateCode()},onFontSizeChange(e){this.fontSize=e.target.value,this.updateCode()},onFontSizeUnitChange(e){this.fontSizeUnit=e.target.value,this.updateCode()},onFontFamilyChange(e){this.fontFamily=e.target.value,this.updateCode()},updateCode(){let e="CoreAdminHome.getOptOutJSEmbedCode";"selfContained"===this.codeType&&(e="CoreAdminHome.getOptOutSelfContainedEmbedCode"),ne["AjaxHelper"].fetch({method:e,backgroundColor:this.backgroundColor.substr(1),fontColor:this.fontColor.substr(1),fontSize:this.fontSizeWithUnit,fontFamily:this.fontFamily,showIntro:!0===this.showIntro?1:0,applyStyling:!0===this.applyStyling?1:0,matomoUrl:this.matomoUrl,language:"selfContained"===this.codeType?this.language:"auto"}).then(e=>{this.code=e.value||""})}},watch:{codeBox(){const e=this.$refs.pre,t=He(e).queue("fx").length>0;t||He(e).effect("highlight",{},1500)}},computed:{fontSizeWithUnit(){return this.fontSize?`${this.fontSize}${this.fontSizeUnit}`:""},withBg(){return!!this.matomoUrl&&""===this.backgroundColor&&""!==this.fontColor&&Ue(this.fontColor.slice(1))},codeBox(){return this.matomoUrl?this.code:""},iframeUrl(){const e=ne["MatomoUrl"].stringify({module:"CoreAdminHome",action:"optOut",language:this.language,backgroundColor:this.backgroundColor.substr(1),fontColor:this.fontColor.substr(1),fontSize:this.fontSizeWithUnit,fontFamily:this.fontFamily,applyStyling:!0===this.applyStyling?1:0,showIntro:!0===this.showIntro?1:0});return`${this.matomoUrl}index.php?${e}`},readThisToLearnMore(){return Object(ne["translate"])("General_ReadThisToLearnMore",Object(ne["externalLink"])("https://matomo.org/faq/how-to/faq_25918/"),"</a>")},optOutExplanationIntro(){return Object(ne["translate"])("CoreAdminHome_OptOutExplanationIntro",`<a href="${this.iframeUrl}" rel="noreferrer noopener" target="_blank">`,"</a>")},optOutCustomOptOutLink(){const e="https://developer.matomo.org/guides/tracking-javascript-guide#optional-creating-a-custom-opt-out-form";return Object(ne["translate"])("CoreAdminHome_OptOutCustomOptOutLink",Object(ne["externalLink"])(e),"</a>")},codeTypeHelp(){return Object(ne["translate"])("PrivacyManager_OptOutCodeTypeExplanation")}}});$e.render=Re;var qe=$e;const Ge={class:"anonymizeLogData"},Ke={class:"form-group row"},We={class:"col s12 input-field"},Ye={for:"anonymizeSite",class:"siteSelectorLabel"},Je={class:"sites_autocomplete"},Qe={class:"form-group row"},Xe={class:"col s6 input-field"},Ze={for:"anonymizeStartDate",class:"active"},et=["value"],tt={class:"col s6 input-field"},nt={for:"anonymizeEndDate",class:"active"},at=["value"],ot={name:"anonymizeIp"},lt={name:"anonymizeLocation"},it={name:"anonymizeTheUserId"},rt={class:"form-group row"},ct={class:"col s12 m6"},st={for:"visit_columns"},dt={class:"innerFormField",name:"visit_columns"},mt=["onClick","title"],ut={class:"col s12 m6"},bt={class:"form-help"},pt={class:"inline-help"},Ot={class:"form-group row"},gt={class:"col s12"},jt={class:"form-group row"},ht={class:"col s12 m6"},yt={for:"action_columns"},vt={class:"innerFormField",name:"action_columns"},Vt=["onClick","title"],ft={class:"col s12 m6"},St={class:"form-help"},Dt={class:"inline-help"},Et=Object(l["createElementVNode"])("span",{class:"icon-info"},null,-1);function Nt(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("SiteSelector"),c=Object(l["resolveComponent"])("Field"),s=Object(l["resolveComponent"])("SaveButton"),d=Object(l["resolveComponent"])("PasswordConfirmation");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ge,[Object(l["createElementVNode"])("div",Ke,[Object(l["createElementVNode"])("div",We,[Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("label",Ye,Object(l["toDisplayString"])(e.translate("PrivacyManager_AnonymizeSites")),1),Object(l["createElementVNode"])("div",Je,[Object(l["createVNode"])(r,{id:"anonymizeSite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=t=>e.site=t),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(l["createElementVNode"])("div",Qe,[Object(l["createElementVNode"])("div",Xe,[Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("label",Ze,Object(l["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataFrom")),1),Object(l["createElementVNode"])("input",{type:"text",id:"anonymizeStartDate",class:"anonymizeStartDate",ref:"anonymizeStartDate",name:"anonymizeStartDate",value:e.startDate,onKeydown:t[1]||(t[1]=t=>e.onKeydownStartDate(t)),onChange:t[2]||(t[2]=t=>e.onKeydownStartDate(t))},null,40,et)])]),Object(l["createElementVNode"])("div",tt,[Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("label",nt,Object(l["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataTo")),1),Object(l["createElementVNode"])("input",{type:"text",class:"anonymizeEndDate",id:"anonymizeEndDate",ref:"anonymizeEndDate",name:"anonymizeEndDate",value:e.endDate,onKeydown:t[3]||(t[3]=t=>e.onKeydownEndDate(t)),onChange:t[4]||(t[4]=t=>e.onKeydownEndDate(t))},null,40,at)])])]),Object(l["createElementVNode"])("div",ot,[Object(l["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeIp",title:e.translate("PrivacyManager_AnonymizeIp"),modelValue:e.anonymizeIp,"onUpdate:modelValue":t[5]||(t[5]=t=>e.anonymizeIp=t),introduction:e.translate("General_Visit"),"inline-help":e.translate("PrivacyManager_AnonymizeIpHelp")},null,8,["title","modelValue","introduction","inline-help"])]),Object(l["createElementVNode"])("div",lt,[Object(l["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeLocation",title:e.translate("PrivacyManager_AnonymizeLocation"),modelValue:e.anonymizeLocation,"onUpdate:modelValue":t[6]||(t[6]=t=>e.anonymizeLocation=t),"inline-help":e.translate("PrivacyManager_AnonymizeLocationHelp")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",it,[Object(l["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeTheUserId",title:e.translate("PrivacyManager_AnonymizeUserId"),modelValue:e.anonymizeUserId,"onUpdate:modelValue":t[7]||(t[7]=t=>e.anonymizeUserId=t),"inline-help":e.translate("PrivacyManager_AnonymizeUserIdHelp")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",rt,[Object(l["createElementVNode"])("div",ct,[Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("label",st,Object(l["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumns")),1),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.selectedVisitColumns,(t,n)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:Object(l["normalizeClass"])(`selectedVisitColumns selectedVisitColumns${n} multiple valign-wrapper`),key:n},[Object(l["createElementVNode"])("div",dt,[Object(l["createVNode"])(c,{uicontrol:"select",name:"visit_columns","model-value":t.column,"onUpdate:modelValue":n=>{t.column=n,e.onVisitColumnChange()},"full-width":!0,options:e.availableVisitColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"icon-minus valign",onClick:t=>e.removeVisitColumn(n),title:e.translate("General_Remove")},null,8,mt),[[l["vShow"],n+1!==e.selectedVisitColumns.length]])],2))),128))])]),Object(l["createElementVNode"])("div",ut,[Object(l["createElementVNode"])("div",bt,[Object(l["createElementVNode"])("span",pt,Object(l["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumnsHelp")),1)])])]),Object(l["createElementVNode"])("div",Ot,[Object(l["createElementVNode"])("div",gt,[Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("General_Action")),1)])]),Object(l["createElementVNode"])("div",jt,[Object(l["createElementVNode"])("div",ht,[Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("label",yt,Object(l["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumns")),1),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.selectedActionColumns,(t,n)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:Object(l["normalizeClass"])(`selectedActionColumns selectedActionColumns${n} multiple valign-wrapper`),key:n},[Object(l["createElementVNode"])("div",vt,[Object(l["createVNode"])(c,{uicontrol:"select",name:"action_columns","model-value":t.column,"onUpdate:modelValue":n=>{t.column=n,e.onActionColumnChange()},"full-width":!0,options:e.availableActionColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"icon-minus valign",onClick:t=>e.removeActionColumn(n),title:e.translate("General_Remove")},null,8,Vt),[[l["vShow"],n+1!==e.selectedActionColumns.length]])],2))),128))])]),Object(l["createElementVNode"])("div",ft,[Object(l["createElementVNode"])("div",St,[Object(l["createElementVNode"])("span",Dt,Object(l["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumnsHelp")),1)])])]),Object(l["createElementVNode"])("p",null,[Et,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_AnonymizeProcessInfo")),1)]),Object(l["createVNode"])(s,{class:"anonymizePastData",onConfirm:t[8]||(t[8]=t=>e.showPasswordConfirmModal=!0),disabled:e.isAnonymizePastDataDisabled,value:e.translate("PrivacyManager_AnonymizeDataNow")},null,8,["disabled","value"]),Object(l["createVNode"])(d,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[9]||(t[9]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.scheduleAnonymization},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_AnonymizeDataConfirm")),1)]),_:1},8,["modelValue","onConfirmed"])])}function Ct(e){return e<10?"0"+e:e}var kt=Object(l["defineComponent"])({components:{PasswordConfirmation:oe["PasswordConfirmation"],SiteSelector:ne["SiteSelector"],Field:oe["Field"],SaveButton:oe["SaveButton"]},data(){const e=new Date,t=`${e.getFullYear()}-${Ct(e.getMonth()+1)}-${Ct(e.getDay()+1)}`;return{isLoading:!1,isDeleting:!1,anonymizeIp:!1,anonymizeLocation:!1,anonymizeUserId:!1,site:{id:"all",name:"All Websites"},availableVisitColumns:[],availableActionColumns:[],selectedVisitColumns:[{column:""}],selectedActionColumns:[{column:""}],startDate:t,endDate:t,showPasswordConfirmModal:!1}},created(){this.onKeydownStartDate=Object(ne["debounce"])(this.onKeydownStartDate,50),this.onKeydownEndDate=Object(ne["debounce"])(this.onKeydownEndDate,50),ne["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableVisitColumnsToAnonymize"}).then(e=>{this.availableVisitColumns=[],e.forEach(e=>{this.availableVisitColumns.push({key:e.column_name,value:e.column_name})})}),ne["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize"}).then(e=>{this.availableActionColumns=[],e.forEach(e=>{this.availableActionColumns.push({key:e.column_name,value:e.column_name})})}),setTimeout(()=>{const e=ne["Matomo"].getBaseDatePickerOptions(null),t=ne["Matomo"].getBaseDatePickerOptions(null);$(this.$refs.anonymizeStartDate).datepicker(e),$(this.$refs.anonymizeEndDate).datepicker(t)})},methods:{onVisitColumnChange(){const e=this.selectedVisitColumns.every(e=>!(null===e||void 0===e||!e.column));e&&this.addVisitColumn()},addVisitColumn(){this.selectedVisitColumns.push({column:""})},removeVisitColumn(e){if(e>-1){const t=this.selectedVisitColumns.length-1;t===e?this.selectedVisitColumns[e]={column:""}:this.selectedVisitColumns.splice(e,1)}},onActionColumnChange(){const e=this.selectedActionColumns.every(e=>!(null===e||void 0===e||!e.column));e&&this.addActionColumn()},addActionColumn(){this.selectedActionColumns.push({column:""})},removeActionColumn(e){if(e>-1){const t=this.selectedActionColumns.length-1;t===e?this.selectedActionColumns[e]={column:""}:this.selectedActionColumns.splice(e,1)}},scheduleAnonymization(e){let t=`${this.startDate},${this.endDate}`;this.startDate===this.endDate&&(t=this.startDate);const n={date:t};n.idSites=this.site.id,n.anonymizeIp=this.anonymizeIp?"1":"0",n.anonymizeLocation=this.anonymizeLocation?"1":"0",n.anonymizeUserId=this.anonymizeUserId?"1":"0",n.unsetVisitColumns=this.selectedVisitColumns.filter(e=>!(null===e||void 0===e||!e.column)).map(e=>e.column),n.unsetLinkVisitActionColumns=this.selectedActionColumns.filter(e=>!(null===e||void 0===e||!e.column)).map(e=>e.column),n.passwordConfirmation=e,ne["AjaxHelper"].post({method:"PrivacyManager.anonymizeSomeRawData"},n).then(()=>{window.location.reload(!0)})},onKeydownStartDate(e){this.startDate=e.target.value},onKeydownEndDate(e){this.endDate=e.target.value}},computed:{isAnonymizePastDataDisabled(){return!this.anonymizeIp&&!this.anonymizeLocation&&!this.selectedVisitColumns&&!this.selectedActionColumns}}});kt.render=Nt;var _t=kt;function Pt(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("Field"),c=Object(l["resolveComponent"])("SaveButton"),s=Object(l["resolveDirective"])("form");return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"radio",name:"doNotTrack",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.enabled=t),options:e.doNotTrackOptions,"inline-help":e.translate("PrivacyManager_DoNotTrack_Description")},null,8,["modelValue","options","inline-help"])]),Object(l["createVNode"])(c,{onConfirm:t[1]||(t[1]=t=>e.save()),saving:e.isLoading},null,8,["saving"])])),[[s]])}var Mt=Object(l["defineComponent"])({props:{dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0}},components:{Field:oe["Field"],SaveButton:oe["SaveButton"]},directives:{Form:oe["Form"]},data(){return{isLoading:!1,enabled:this.dntSupport?1:0}},methods:{save(){this.isLoading=!0;let e="deactivateDoNotTrack";this.enabled&&"0"!==this.enabled&&(e="activateDoNotTrack"),ne["AjaxHelper"].post({module:"API",method:"PrivacyManager."+e}).then(()=>{const e=ne["NotificationsStore"].show({message:Object(ne["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"transient"});ne["NotificationsStore"].scrollToNotification(e)}).finally(()=>{this.isLoading=!1})}}});Mt.render=Pt;var wt=Mt;function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
|
||
/*!
|
||
* Matomo - free/libre analytics platform
|
||
*
|
||
* @link https://matomo.org
|
||
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||
*/class zt{constructor(){Tt(this,"privateState",Object(l["reactive"])({settings:{},showEstimate:!1,loadingEstimation:!1,estimation:"",isModified:!1})),Tt(this,"state",Object(l["computed"])(()=>Object(l["readonly"])(this.privateState))),Tt(this,"enableDeleteReports",Object(l["computed"])(()=>this.state.value.settings.enableDeleteReports)),Tt(this,"enableDeleteLogs",Object(l["computed"])(()=>this.state.value.settings.enableDeleteLogs)),Tt(this,"currentRequest",void 0)}updateSettings(e){this.initSettings(e),this.privateState.isModified=!0}initSettings(e){this.privateState.settings=Object.assign(Object.assign({},this.privateState.settings),e),this.reloadDbStats()}savePurgeDataSettings(e,t,n){return this.privateState.isModified=!1,ne["AjaxHelper"].post({module:"API",method:e},Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0",passwordConfirmation:n})).then(()=>{const e=ne["NotificationsStore"].show({message:Object(ne["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});ne["NotificationsStore"].scrollToNotification(e)})}isEitherDeleteSectionEnabled(){return this.state.value.settings.enableDeleteLogs||this.state.value.settings.enableDeleteReports}isManualEstimationLinkShowing(){return window.$("#getPurgeEstimateLink").length>0}reloadDbStats(e){if(this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),!e&&(!this.isEitherDeleteSectionEnabled()||this.isManualEstimationLinkShowing()))return;this.privateState.loadingEstimation=!0,this.privateState.estimation="",this.privateState.showEstimate=!1;const{settings:t}=this.privateState,n=Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0"});!0===e&&(n.forceEstimate=1),this.currentRequest=new AbortController,ne["AjaxHelper"].post({module:"PrivacyManager",action:"getDatabaseSize",format:"html"},n,{abortController:this.currentRequest,format:"html"}).then(e=>{this.privateState.estimation=e,this.privateState.showEstimate=!0,this.privateState.loadingEstimation=!1}).finally(()=>{this.currentRequest=void 0,this.privateState.loadingEstimation=!1})}}var Bt=new zt;const It={id:"formDeleteSettings"},At={id:"deleteLogSettingEnabled"},Lt={class:"alert alert-warning deleteOldLogsWarning",style:{width:"50%"}},xt=["href"],Ft={id:"deleteLogSettings"},Rt={key:0},Ut={key:1};function Ht(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("Field"),c=Object(l["resolveComponent"])("SaveButton"),s=Object(l["resolveComponent"])("PasswordConfirmation"),d=Object(l["resolveDirective"])("form");return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",It,[Object(l["createElementVNode"])("div",At,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=t=>{e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteLog"),"inline-help":e.translate("PrivacyManager_DeleteRawDataInfo")},null,8,["model-value","title","inline-help"])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",Lt,[Object(l["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/general/faq_125"),rel:"noreferrer noopener",target:"_blank"},Object(l["toDisplayString"])(e.translate("General_ClickHere")),9,xt)],512),[[l["vShow"],e.enabled]])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",Ft,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"text",name:"deleteOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=t=>{e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastDaysInput","1")},null,8,["model-value","title","inline-help"])])],512),[[l["vShow"],e.enabled]]),Object(l["createVNode"])(c,{onConfirm:t[2]||(t[2]=e=>this.showPasswordConfirmModal=!0),saving:e.isLoading},null,8,["saving"]),Object(l["createVNode"])(s,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[3]||(t[3]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.saveSettings},{default:Object(l["withCtx"])(()=>[e.enabled&&!e.enableDeleteReports?(Object(l["openBlock"])(),Object(l["createElementBlock"])("h2",Rt,Object(l["toDisplayString"])(e.translate("PrivacyManager_DeleteLogsConfirm")),1)):Object(l["createCommentVNode"])("",!0),e.enabled&&e.enableDeleteReports?(Object(l["openBlock"])(),Object(l["createElementBlock"])("h2",Ut,Object(l["toDisplayString"])(e.translate("PrivacyManager_DeleteBothConfirm")),1)):Object(l["createCommentVNode"])("",!0)]),_:1},8,["modelValue","onConfirmed"])])),[[d]])}var $t=Object(l["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{PasswordConfirmation:oe["PasswordConfirmation"],Field:oe["Field"],SaveButton:oe["SaveButton"]},directives:{Form:oe["Form"]},data(){return{isLoading:!1,enabled:1===parseInt(this.deleteData.config.delete_logs_enable,10),deleteOlderThan:this.deleteData.config.delete_logs_older_than,showPasswordConfirmModal:!1}},created(){setTimeout(()=>{Bt.initSettings(this.settings)})},methods:{saveSettings(e){const t="PrivacyManager.setDeleteLogsSettings";this.isLoading=!0,Bt.savePurgeDataSettings(t,this.settings,e).finally(()=>{this.isLoading=!1})},reloadDbStats(){Bt.updateSettings(this.settings)}},computed:{settings(){return{enableDeleteLogs:!!this.enabled,deleteLogsOlderThan:this.deleteOlderThan}},deleteOlderThanTitle(){return`${Object(ne["translate"])("PrivacyManager_DeleteLogsOlderThan")} (${Object(ne["translate"])("Intl_PeriodDays")})`},enableDeleteReports(){return!!Bt.enableDeleteReports.value}}});$t.render=Ht;var qt=$t;const Gt={id:"formDeleteSettings"},Kt={id:"deleteReportsSettingEnabled"},Wt={class:"alert alert-warning",style:{width:"50%"}},Yt=Object(l["createElementVNode"])("br",null,null,-1),Jt=Object(l["createElementVNode"])("br",null,null,-1),Qt={id:"deleteReportsSettings"},Xt={key:0},Zt={key:1};function en(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("Field"),c=Object(l["resolveComponent"])("SaveButton"),s=Object(l["resolveComponent"])("PasswordConfirmation"),d=Object(l["resolveDirective"])("form");return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Gt,[Object(l["createElementVNode"])("div",Kt,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=t=>{e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteReports"),"inline-help":e.translate("PrivacyManager_DeleteAggregateReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",Wt,[Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo2",e.deleteOldLogsText)),1),Yt,Jt,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo3",e.deleteOldLogsText)),1)])],512),[[l["vShow"],e.enabled]])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",Qt,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"text",name:"deleteReportsOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=t=>{e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteReportsOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastMonthsInput","1")},null,8,["model-value","title","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepBasic","model-value":e.keepBasic,"onUpdate:modelValue":t[2]||(t[2]=t=>{e.keepBasic=t,e.reloadDbStats()}),title:e.deleteReportsKeepBasicTitle,"inline-help":e.translate("PrivacyManager_KeepBasicMetricsReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_KeepDataFor")),1),Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepDay","model-value":e.keepDataForDay,"onUpdate:modelValue":t[3]||(t[3]=t=>{e.keepDataForDay=t,e.reloadDbStats()}),title:e.translate("General_DailyReports")},null,8,["model-value","title"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepWeek","model-value":e.keepDataForWeek,"onUpdate:modelValue":t[4]||(t[4]=t=>{e.keepDataForWeek=t,e.reloadDbStats()}),title:e.translate("General_WeeklyReports")},null,8,["model-value","title"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepMonth","model-value":e.keepDataForMonth,"onUpdate:modelValue":t[5]||(t[5]=t=>{e.keepDataForMonth=t,e.reloadDbStats()}),title:`${e.translate("General_MonthlyReports")} (${e.translate("General_Recommended")})`},null,8,["model-value","title"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepYear","model-value":e.keepDataForYear,"onUpdate:modelValue":t[6]||(t[6]=t=>{e.keepDataForYear=t,e.reloadDbStats()}),title:`${e.translate("General_YearlyReports")} (${e.translate("General_Recommended")})`},null,8,["model-value","title"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepRange","model-value":e.keepDataForRange,"onUpdate:modelValue":t[7]||(t[7]=t=>{e.keepDataForRange=t,e.reloadDbStats()}),title:e.translate("General_RangeReports")},null,8,["model-value","title"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepSegments","model-value":e.keepDataForSegments,"onUpdate:modelValue":t[8]||(t[8]=t=>{e.keepDataForSegments=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_KeepReportSegments")},null,8,["model-value","title"])])])],512),[[l["vShow"],e.enabled]]),Object(l["createVNode"])(c,{onConfirm:t[9]||(t[9]=e=>this.showPasswordConfirmModal=!0),saving:e.isLoading},null,8,["saving"]),Object(l["createVNode"])(s,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[10]||(t[10]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.saveSettings},{default:Object(l["withCtx"])(()=>[e.enabled&&!e.enableDeleteLogs?(Object(l["openBlock"])(),Object(l["createElementBlock"])("h2",Xt,Object(l["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsConfirm")),1)):Object(l["createCommentVNode"])("",!0),e.enabled&&e.enableDeleteLogs?(Object(l["openBlock"])(),Object(l["createElementBlock"])("h2",Zt,Object(l["toDisplayString"])(e.translate("PrivacyManager_DeleteBothConfirm")),1)):Object(l["createCommentVNode"])("",!0)]),_:1},8,["modelValue","onConfirmed"])])),[[d]])}function tn(e){return e?"1":"0"}var nn=Object(l["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:oe["Field"],SaveButton:oe["SaveButton"],PasswordConfirmation:oe["PasswordConfirmation"]},directives:{Form:oe["Form"]},data(){return{isLoading:!1,enabled:1===parseInt(this.deleteData.config.delete_reports_enable,10),deleteOlderThan:this.deleteData.config.delete_reports_older_than,keepBasic:1===parseInt(this.deleteData.config.delete_reports_keep_basic_metrics,10),keepDataForDay:1===parseInt(this.deleteData.config.delete_reports_keep_day_reports,10),keepDataForWeek:1===parseInt(this.deleteData.config.delete_reports_keep_week_reports,10),keepDataForMonth:1===parseInt(this.deleteData.config.delete_reports_keep_month_reports,10),keepDataForYear:1===parseInt(this.deleteData.config.delete_reports_keep_year_reports,10),keepDataForRange:1===parseInt(this.deleteData.config.delete_reports_keep_range_reports,10),keepDataForSegments:1===parseInt(this.deleteData.config.delete_reports_keep_segment_reports,10),showPasswordConfirmModal:!1}},created(){setTimeout(()=>{Bt.initSettings(this.settings)})},methods:{saveSettings(e){const t="PrivacyManager.setDeleteReportsSettings";this.isLoading=!0,Bt.savePurgeDataSettings(t,this.settings,e).finally(()=>{this.isLoading=!1})},reloadDbStats(){Bt.updateSettings(this.settings)}},computed:{settings(){return{enableDeleteReports:this.enabled,deleteReportsOlderThan:this.deleteOlderThan,keepBasic:tn(this.keepBasic),keepDay:tn(this.keepDataForDay),keepWeek:tn(this.keepDataForWeek),keepMonth:tn(this.keepDataForMonth),keepYear:tn(this.keepDataForYear),keepRange:tn(this.keepDataForRange),keepSegments:tn(this.keepDataForSegments)}},deleteOldLogsText(){return Object(ne["translate"])("PrivacyManager_UseDeleteLog")},deleteReportsOlderThanTitle(){const e=Object(ne["translate"])("PrivacyManager_DeleteReportsOlderThan");return`${e} (${Object(ne["translate"])("Intl_PeriodMonths")})`},deleteReportsKeepBasicTitle(){const e=Object(ne["translate"])("PrivacyManager_KeepBasicMetrics");return`${e} (${Object(ne["translate"])("General_Recommended")})`},enableDeleteLogs(){return!!Bt.enableDeleteLogs.value}}});nn.render=en;var an=nn;const on={id:"formDeleteSettings"},ln={id:"deleteSchedulingSettings"},rn={id:"deleteSchedulingSettingsInlineHelp",class:"inline-help-node"},cn={key:0},sn=Object(l["createElementVNode"])("br",null,null,-1),dn=Object(l["createElementVNode"])("br",null,null,-1),mn=Object(l["createElementVNode"])("br",null,null,-1),un=Object(l["createElementVNode"])("br",null,null,-1),bn={key:0,id:"deleteDataEstimateSect",class:"form-group row"},pn={class:"col s12",id:"databaseSizeHeadline"},On={class:"col s12 m6"},gn=["innerHTML"],jn={class:"col s12 m6"},hn={key:0,class:"form-help"},yn={class:"ui-confirm",id:"saveSettingsBeforePurge"},vn=["value"];function Vn(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("ActivityIndicator"),c=Object(l["resolveComponent"])("Field"),s=Object(l["resolveComponent"])("SaveButton"),d=Object(l["resolveComponent"])("PasswordConfirmation"),m=Object(l["resolveComponent"])("ContentBlock"),u=Object(l["resolveDirective"])("form");return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",on,[Object(l["withDirectives"])(Object(l["createVNode"])(m,{id:"scheduleSettingsHeadline","content-title":e.translate("PrivacyManager_DeleteSchedulingSettings")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",ln,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(c,{uicontrol:"select",name:"deleteLowestInterval",title:e.translate("PrivacyManager_DeleteDataInterval"),modelValue:e.deleteLowestInterval,"onUpdate:modelValue":t[1]||(t[1]=t=>e.deleteLowestInterval=t),options:e.scheduleDeletionOptions},{"inline-help":Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",rn,[e.deleteData.lastRun?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",cn,[Object(l["createElementVNode"])("strong",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_LastDelete"))+":",1),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.deleteData.lastRunPretty)+" ",1),sn,dn])):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("strong",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_NextDelete"))+":",1),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.deleteData.nextRunPretty)+" ",1),mn,un,Object(l["withDirectives"])(Object(l["createElementVNode"])("a",{id:"purgeDataNowLink",href:"#",onClick:t[0]||(t[0]=Object(l["withModifiers"])(t=>e.executeDataPurge(),["prevent"]))},Object(l["toDisplayString"])(e.translate("PrivacyManager_PurgeNow")),513),[[l["vShow"],e.showPurgeNowLink]]),Object(l["createVNode"])(r,{"loading-message":e.translate("PrivacyManager_PurgingData"),loading:e.loadingDataPurge},null,8,["loading-message","loading"]),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{id:"db-purged-message"},Object(l["toDisplayString"])(e.translate("PrivacyManager_DBPurged")),513),[[l["vShow"],e.dataWasPurged]])])]),_:1},8,["title","modelValue","options"])])]),"1"===e.deleteData.config.enable_database_size_estimate||1===e.deleteData.config.enable_database_size_estimate?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",bn,[Object(l["createElementVNode"])("h3",pn,Object(l["toDisplayString"])(e.translate("PrivacyManager_ReportsDataSavedEstimate")),1),Object(l["createElementVNode"])("div",On,[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",{id:"deleteDataEstimate",innerHTML:e.$sanitize(e.estimation)},null,8,gn),[[l["vShow"],e.showEstimate]]),Object(l["createTextVNode"])(" "),Object(l["createVNode"])(r,{loading:e.loadingEstimation},null,8,["loading"])]),Object(l["createElementVNode"])("div",jn,["1"!==e.deleteData.config.enable_auto_database_size_estimate&&1!==e.deleteData.config.enable_auto_database_size_estimate?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",hn,[Object(l["createElementVNode"])("a",{id:"getPurgeEstimateLink",href:"#",onClick:t[2]||(t[2]=Object(l["withModifiers"])(t=>e.getPurgeEstimate(),["prevent"]))},Object(l["toDisplayString"])(e.translate("PrivacyManager_GetPurgeEstimate")),1)])):Object(l["createCommentVNode"])("",!0)])])):Object(l["createCommentVNode"])("",!0),Object(l["createVNode"])(s,{onConfirm:t[3]||(t[3]=t=>e.showPasswordConfirmModal=!0),saving:e.isLoading},null,8,["saving"]),Object(l["createVNode"])(d,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[4]||(t[4]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.save},null,8,["modelValue","onConfirmed"]),Object(l["createVNode"])(d,{modelValue:e.showPasswordConfirmModalForPurge,"onUpdate:modelValue":t[5]||(t[5]=t=>e.showPasswordConfirmModalForPurge=t),onConfirmed:e.executePurgeNow},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_PurgeNowConfirm")),1)]),_:1},8,["modelValue","onConfirmed"])]),_:1},8,["content-title"]),[[l["vShow"],e.isEitherDeleteSectionEnabled]])])),[[u]]),Object(l["createElementVNode"])("div",yn,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_SaveSettingsBeforePurge")),1),Object(l["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Ok")},null,8,vn)])],64)}var fn=Object(l["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{ContentBlock:ne["ContentBlock"],ActivityIndicator:ne["ActivityIndicator"],Field:oe["Field"],SaveButton:oe["SaveButton"],PasswordConfirmation:oe["PasswordConfirmation"]},directives:{Form:oe["Form"]},data(){return{isLoading:!1,loadingDataPurge:!1,dataWasPurged:!1,showPurgeNowLink:!0,deleteLowestInterval:this.deleteData.config.delete_logs_schedule_lowest_interval,showPasswordConfirmModal:!1,showPasswordConfirmModalForPurge:!1}},methods:{save(e){const t="PrivacyManager.setScheduleReportDeletionSettings";Bt.savePurgeDataSettings(t,{deleteLowestInterval:this.deleteLowestInterval},e)},executeDataPurge(){Bt.state.value.isModified?ne["Matomo"].helper.modalConfirm("#saveSettingsBeforePurge",{yes:()=>null}):this.showPasswordConfirmModalForPurge=!0},getPurgeEstimate(){return Bt.reloadDbStats(!0)},executePurgeNow(e){return this.loadingDataPurge=!0,this.showPurgeNowLink=!1,ne["AjaxHelper"].post({module:"API",method:"PrivacyManager.executeDataPurge"},{passwordConfirmation:e}).then(()=>{Bt.reloadDbStats(),this.dataWasPurged=!0,setTimeout(()=>{this.dataWasPurged=!1,this.showPurgeNowLink=!0},2e3)}).catch(()=>{this.showPurgeNowLink=!0}).finally(()=>{this.loadingDataPurge=!1})}},computed:{showEstimate(){return Bt.state.value.showEstimate},isEitherDeleteSectionEnabled(){return Bt.isEitherDeleteSectionEnabled()},estimation(){return Bt.state.value.estimation},loadingEstimation(){return Bt.state.value.loadingEstimation}}});fn.render=Vn;var Sn=fn;const Dn=["innerHTML"],En=["innerHTML"],Nn=["innerHTML"],Cn=Object(l["createElementVNode"])("br",null,null,-1),kn=Object(l["createElementVNode"])("br",null,null,-1),_n=["innerHTML"],Pn=Object(l["createElementVNode"])("br",null,null,-1),Mn=Object(l["createElementVNode"])("br",null,null,-1),wn=["innerHTML"],Tn=["innerHTML"],zn=Object(l["createElementVNode"])("p",null,null,-1),Bn=["innerHTML"];function In(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("ContentBlock"),c=Object(l["resolveDirective"])("content-intro");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_AskingForConsent")),1),Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_ConsentExplanation")),1)])),[[c]]),e.consentManagerName?(Object(l["openBlock"])(),Object(l["createBlock"])(r,{key:0,"content-title":e.translate("PrivacyManager_ConsentManager"),class:"privacyAskingForConsent"},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",{innerHTML:e.$sanitize(e.consentManagerDetectedText)},null,8,Dn),e.consentManagerIsConnected?(Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.translate("PrivacyManager_ConsentManagerConnected",e.consentManagerName))},null,8,En)):Object(l["createCommentVNode"])("",!0)]),_:1},8,["content-title"])):Object(l["createCommentVNode"])("",!0),Object(l["createVNode"])(r,{"content-title":e.translate("PrivacyManager_WhenDoINeedConsent"),class:"privacyAskingForConsent"},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,[Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded1)},null,8,Nn),Cn,kn,Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded2)},null,8,_n),Pn,Mn,Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded3)},null,8,wn)])]),_:1},8,["content-title"]),Object(l["createVNode"])(r,{"content-title":e.translate("PrivacyManager_HowDoIAskForConsent"),class:"privacyAskingForConsent"},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_HowDoIAskForConsentIntro")),1),Object(l["createElementVNode"])("ul",{innerHTML:e.$sanitize(e.consentManagersList)},null,8,Tn),zn,Object(l["createElementVNode"])("p",{innerHTML:e.$sanitize(e.howDoIAskForConsentOthers)},null,8,Bn)]),_:1},8,["content-title"])])}var An=Object(l["defineComponent"])({props:{consentManagerName:{type:String,required:!0},consentManagerUrl:{type:String,required:!0},consentManagerIsConnected:{type:Boolean,required:!0},consentManagers:{type:Object,required:!0}},components:{ContentBlock:ne["ContentBlock"]},directives:{ContentIntro:ne["ContentIntro"]},computed:{whenConsentIsNeeded1(){return Object(ne["translate"])("PrivacyManager_WhenConsentIsNeededPart1",Object(ne["externalLink"])("https://matomo.org/faq/new-to-piwik/what-is-gdpr/"),"</a>")},whenConsentIsNeeded2(){const e="https://matomo.org/blog/2018/04/lawful-basis-for-processing-personal-data-under-gdpr-with-matomo/";return Object(ne["translate"])("PrivacyManager_WhenConsentIsNeededPart2",Object(ne["externalLink"])(e),"</a>")},whenConsentIsNeeded3(){return Object(ne["translate"])("PrivacyManager_WhenConsentIsNeededPart3",Object(ne["externalLink"])("https://matomo.org/faq/how-to/faq_35661/"),"</a>")},howDoIAskForConsentOthers(){return Object(ne["translate"])("PrivacyManager_HowDoIAskForConsentOutro",Object(ne["externalLink"])("https://developer.matomo.org/guides/tracking-consent"),"</a>")},consentManagersList(){let e="";return Object.entries(this.consentManagers).forEach(([t,n])=>{const a=Object(ne["externalRawLink"])(n);e+=`<li> <a href="${a}" target="_blank" rel="noreferrer noopener"> ${t} ${Object(ne["translate"])("PrivacyManager_ConsentManager")} </a></li>`}),e},consentManagerDetectedText(){return Object(ne["translate"])("PrivacyManager_ConsentManagerDetected",this.consentManagerName,`<a href="${this.consentManagerUrl}" target="_blank" rel="noreferrer noopener">`,"</a>")}}});An.render=In;var Ln=An;const xn={class:"gdprOverview"},Fn=Object(l["createElementVNode"])("br",null,null,-1),Rn=Object(l["createElementVNode"])("br",null,null,-1),Un=Object(l["createElementVNode"])("br",null,null,-1),Hn=Object(l["createElementVNode"])("br",null,null,-1),$n=["innerHTML"],qn=["innerHTML"],Gn=["innerHTML"],Kn=["innerHTML"],Wn=["innerHTML"],Yn=["innerHTML"],Jn=["innerHTML"],Qn=["innerHTML"],Xn=["innerHTML"],Zn=["innerHTML"],ea=["innerHTML"],ta=["innerHTML"],na=["innerHTML"],aa=["innerHTML"],oa=["innerHTML"],la=["innerHTML"],ia=Object(l["createElementVNode"])("br",null,null,-1);function ra(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("VueEntryContainer"),c=Object(l["resolveComponent"])("ContentBlock"),s=Object(l["resolveDirective"])("content-intro");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",xn,[Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_GdprOverview")),1),Object(l["createElementVNode"])("p",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_GdprOverviewIntro1"))+" ",1),Fn,Rn,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_GdprOverviewIntro2")),1)])])),[[s]]),Object(l["createVNode"])(r,{html:e.afterGDPROverviewIntroContent},null,8,["html"]),Object(l["createVNode"])(c,{"content-title":e.translate("PrivacyManager_GdprChecklists")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_GdprChecklistDesc1"))+" ",1),Un,Hn,Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.gdprChecklistDesc2)},null,8,$n)])]),_:1},8,["content-title"]),Object(l["createVNode"])(c,{"content-title":e.translate("PrivacyManager_IndividualsRights")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsIntro")),1),Object(l["createElementVNode"])("ol",null,[Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsInform")),1),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsAccess"))},null,8,qn),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsErasure"))},null,8,Gn),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsRectification"))},null,8,Kn),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsPortability"))},null,8,Wn),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsObject","usersOptOut"))},null,8,Yn),Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsChildren")),1)])]),_:1},8,["content-title"]),Object(l["createVNode"])(c,{"content-title":e.translate("PrivacyManager_AwarenessDocumentation")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationIntro")),1),Object(l["createElementVNode"])("ol",null,[Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationDesc1")),1),Object(l["createElementVNode"])("li",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationDesc2")),1),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.awarenessDocumentationDesc3)},null,8,Jn),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.awarenessDocumentationDesc4)},null,8,Qn)])]),_:1},8,["content-title"]),Object(l["createVNode"])(c,{"content-title":e.translate("PrivacyManager_SecurityProcedures")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_SecurityProceduresIntro")),1),Object(l["createElementVNode"])("ol",null,[Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc1)},null,8,Xn),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc2)},null,8,Zn),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc3)},null,8,ea),Object(l["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc4)},null,8,ta)])]),_:1},8,["content-title"]),Object(l["createVNode"])(c,{"content-title":e.translate("PrivacyManager_DataRetention")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_DataRetentionInMatomo")),1),Object(l["createElementVNode"])("ul",null,[e.deleteLogsEnable?(Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.translate("PrivacyManager_RawDataRemovedAfter",`<strong>${e.rawDataRetention}</strong>`))},null,8,na)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.translate("PrivacyManager_RawDataNeverRemoved"))},null,8,aa)),e.deleteReportsEnable?(Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.translate("PrivacyManager_ReportsRemovedAfter",`<strong>${e.reportRetention}</strong>`))},null,8,oa)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{key:3,innerHTML:e.$sanitize(e.translate("PrivacyManager_ReportsNeverRemoved"))},null,8,la))]),Object(l["createElementVNode"])("p",null,[ia,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_DataRetentionOverall")),1)])]),_:1},8,["content-title"])])}function ca(e,t){return Object(ne["translate"])("PrivacyManager_"+e,Object(ne["externalLink"])(t),"</a>")}var sa=Object(l["defineComponent"])({props:{afterGDPROverviewIntroContent:String,deleteLogsEnable:Boolean,deleteReportsEnable:Boolean,rawDataRetention:null,reportRetention:null},components:{ContentBlock:ne["ContentBlock"],VueEntryContainer:ne["VueEntryContainer"]},directives:{ContentIntro:ne["ContentIntro"]},methods:{rightsLinkText(e,t="gdprTools"){const n="?"+ne["MatomoUrl"].stringify({module:"PrivacyManager",action:t});return Object(ne["translate"])("PrivacyManager_"+e,`<a target="_blank" rel="noreferrer noopener" href="${n}">`,"</a>")}},computed:{gdprChecklistDesc2(){return ca("GdprChecklistDesc2","https://matomo.org/docs/gdpr")},awarenessDocumentationDesc3(){return ca("AwarenessDocumentationDesc3","https://matomo.org/faq/general/faq_18254/")},awarenessDocumentationDesc4(){return ca("AwarenessDocumentationDesc4","https://matomo.org/blog/2018/04/gdpr-how-to-fill-in-the-information-asset-register-when-using-matomo/")},securityProceduresDesc1(){return ca("SecurityProceduresDesc1","https://matomo.org/docs/security/")},securityProceduresDesc2(){return ca("SecurityProceduresDesc2","https://ico.org.uk/for-organisations/guide-to-the-general-data-protection-regulation-gdpr/international-transfers/")},securityProceduresDesc3(){return ca("SecurityProceduresDesc3","https://ico.org.uk/for-organisations/guide-to-the-general-data-protection-regulation-gdpr/personal-data-breaches/")},securityProceduresDesc4(){return ca("SecurityProceduresDesc4","https://www.cnil.fr/en/guidelines-dpia")}}});sa.render=ra;var da=sa;const ma={key:0},ua=Object(l["createElementVNode"])("br",null,null,-1),ba={key:1},pa=Object(l["createElementVNode"])("br",null,null,-1),Oa={key:2},ga={key:3},ja={key:0},ha=["title"],ya={key:1},va=["title"],Va={key:2},fa=["title"];function Sa(e,t,n,a,o,i){const r=Object(l["resolveDirective"])("content-table");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_PreviousRawDataAnonymizations")),1),Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("table",null,[Object(l["createElementVNode"])("thead",null,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_Requester")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_AffectedIDSites")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_AffectedDate")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_Anonymize")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_VisitColumns")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_LinkVisitActionColumns")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1)])]),Object(l["createElementVNode"])("tbody",null,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.anonymizations,(t,n)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",{key:n},[Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(t.requester),1),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(t.sites.join(", ")),1),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(t.date_start)+" - "+Object(l["toDisplayString"])(t.date_end),1),Object(l["createElementVNode"])("td",null,[t.anonymize_ip?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ma,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_IPAddress")),1),ua])):Object(l["createCommentVNode"])("",!0),t.anonymize_location?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ba,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("Overlay_Location")),1),pa])):Object(l["createCommentVNode"])("",!0),t.anonymize_userid?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",Oa,Object(l["toDisplayString"])(e.translate("General_UserId")),1)):Object(l["createCommentVNode"])("",!0),t.anonymize_ip||t.anonymize_location||t.anonymize_userid?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ga,"-"))]),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(t.unset_visit_columns.join(", ")),1),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(t.unset_link_visit_action_columns.join(", ")),1),Object(l["createElementVNode"])("td",null,[t.job_start_date?t.job_start_date&&!t.job_finish_date?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ya,[Object(l["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:`${e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||"")}.\n${e.translate("PrivacyManager_JobStartDate",t.job_start_date)}.\n${e.translate("PrivacyManager_CurrentOutput",t.output)}`},null,8,va),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_InProgress")),1)])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",Va,[Object(l["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:`${e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||"")}.\n${e.translate("PrivacyManager_JobStartDate",t.job_start_date)}.\n${e.translate("PrivacyManager_JobFinishDate",t.job_finish_date)}.\n${e.translate("PrivacyManager_Output",t.output)}`},null,8,fa),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Done")),1)])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ja,[Object(l["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:""+e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||"")},null,8,ha),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_Scheduled")),1)]))])]))),128))])])),[[r]])])}var Da=Object(l["defineComponent"])({props:{anonymizations:{type:Array,required:!0}},directives:{ContentTable:ne["ContentTable"]}});Da.render=Sa;var Ea=Da;const Na=["innerHTML"],Ca=["innerHTML"],ka={key:0},_a=Object(l["createElementVNode"])("a",{name:"anonymizeHistoricalData",id:"anonymizeHistoricalData"},null,-1),Pa={key:1},Ma=Object(l["createElementVNode"])("br",null,null,-1);function wa(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("EnrichedHeadline"),c=Object(l["resolveComponent"])("AnonymizeIp"),s=Object(l["resolveComponent"])("ContentBlock"),d=Object(l["resolveComponent"])("DeleteOldLogs"),m=Object(l["resolveComponent"])("DeleteOldReports"),u=Object(l["resolveComponent"])("ScheduleReportDeletion"),b=Object(l["resolveComponent"])("AnonymizeLogData"),p=Object(l["resolveComponent"])("PreviousAnonymizations"),O=Object(l["resolveDirective"])("content-intro");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("h2",null,[Object(l["createVNode"])(r,{"help-url":e.externalRawLink("https://matomo.org/docs/privacy/")},{default:Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_AnonymizeData")),1)]),_:1},8,["help-url"])]),Object(l["createElementVNode"])("p",null,[Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.teaserHeader),style:{"margin-right":"3.5px"}},null,8,Na),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.seeAlsoOurOfficialGuide)},null,8,Ca)])])),[[O]]),Object(l["createVNode"])(s,{id:"anonymizeIPAnchor","content-title":e.translate("PrivacyManager_UseAnonymizeTrackingData")},{default:Object(l["withCtx"])(()=>[Object(l["createVNode"])(c,{"anonymize-ip-enabled":e.anonymizeIpEnabled,"anonymize-user-id":e.anonymizeUserId,"mask-length":e.maskLength,"use-anonymized-ip-for-visit-enrichment":e.useAnonymizedIpForVisitEnrichment,"anonymize-order-id":e.anonymizeOrderId,"force-cookieless-tracking":e.forceCookielessTracking,"anonymize-referrer":e.anonymizeReferrer,"mask-length-options":e.maskLengthOptions,"use-anonymized-ip-for-visit-enrichment-options":e.useAnonymizedIpForVisitEnrichmentOptions,"tracker-file-name":e.trackerFileName,"tracker-writable":e.trackerWritable,"referrer-anonymization-options":e.referrerAnonymizationOptions,"randomize-config-id":e.randomizeConfigId,"config-randomisation-feature-flag":e.configRandomisationFeatureFlag},null,8,["anonymize-ip-enabled","anonymize-user-id","mask-length","use-anonymized-ip-for-visit-enrichment","anonymize-order-id","force-cookieless-tracking","anonymize-referrer","mask-length-options","use-anonymized-ip-for-visit-enrichment-options","tracker-file-name","tracker-writable","referrer-anonymization-options","randomize-config-id","config-randomisation-feature-flag"])]),_:1},8,["content-title"]),e.isDataPurgeSettingsEnabled?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",ka,[Object(l["createVNode"])(s,{id:"deleteLogsAnchor","content-title":e.translate("PrivacyManager_DeleteOldRawData")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_DeleteDataDescription")),1),Object(l["createVNode"])(d,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])]),_:1},8,["content-title"]),Object(l["createVNode"])(s,{id:"deleteReportsAnchor","content-title":e.translate("PrivacyManager_DeleteOldAggregatedReports")},{default:Object(l["withCtx"])(()=>[Object(l["createVNode"])(m,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])]),_:1},8,["content-title"]),Object(l["createVNode"])(u,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])])):Object(l["createCommentVNode"])("",!0),_a,Object(l["createVNode"])(s,{"content-title":e.translate("PrivacyManager_AnonymizePreviousData"),class:"logDataAnonymizer"},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_AnonymizePreviousDataDescription")),1),e.isSuperUser?(Object(l["openBlock"])(),Object(l["createBlock"])(b,{key:0})):(Object(l["openBlock"])(),Object(l["createElementBlock"])("p",Pa,Object(l["toDisplayString"])(e.translate("PrivacyManager_AnonymizePreviousDataOnlySuperUser")),1)),Ma,Object(l["createVNode"])(p,{anonymizations:e.anonymizations},null,8,["anonymizations"])]),_:1},8,["content-title"])])}var Ta=Object(l["defineComponent"])({props:{anonymizeIpEnabled:Boolean,anonymizeUserId:Boolean,maskLength:{type:Number,required:!0},useAnonymizedIpForVisitEnrichment:[Boolean,String,Number],anonymizeOrderId:Boolean,forceCookielessTracking:Boolean,anonymizeReferrer:String,maskLengthOptions:{type:Array,required:!0},useAnonymizedIpForVisitEnrichmentOptions:{type:Array,required:!0},trackerFileName:{type:String,required:!0},trackerWritable:{type:Boolean,required:!0},referrerAnonymizationOptions:{type:Object,required:!0},isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0},anonymizations:{type:Array,required:!0},isSuperUser:Boolean,randomizeConfigId:Boolean,configRandomisationFeatureFlag:Boolean},components:{AnonymizeIp:he,EnrichedHeadline:ne["EnrichedHeadline"],ContentBlock:ne["ContentBlock"],DeleteOldLogs:qt,DeleteOldReports:an,ScheduleReportDeletion:Sn,AnonymizeLogData:_t,PreviousAnonymizations:Ea},directives:{ContentIntro:ne["ContentIntro"]},computed:{teaserHeader(){return Object(ne["translate"])("PrivacyManager_TeaserHeader",'<a href="#anonymizeIPAnchor">',"</a>",'<a href="#deleteLogsAnchor">',"</a>",'<a href="#anonymizeHistoricalData">',"</a>")},seeAlsoOurOfficialGuide(){return Object(ne["translate"])("PrivacyManager_SeeAlsoOurOfficialGuidePrivacy",Object(ne["externalLink"])("https://matomo.org/privacy/"),"</a>")}}});Ta.render=wa;var za=Ta;const Ba={for:"complianceSite"};function Ia(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("EnrichedHeadline"),c=Object(l["resolveComponent"])("SiteSelector"),s=Object(l["resolveComponent"])("ComplianceOverview");return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("h2",null,[Object(l["createVNode"])(r,null,{default:Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_Compliance")),1)]),_:1})]),Object(l["createElementVNode"])("label",Ba,Object(l["toDisplayString"])(e.translate("PrivacyManager_ComplianceSelectSite")),1),Object(l["createVNode"])(c,{id:"complianceSite","switch-site-on-select":!1,"show-selected-site":!0,modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=t=>e.site=t)},null,8,["modelValue"]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.complianceTypes,t=>(Object(l["openBlock"])(),Object(l["createBlock"])(s,{key:t.id,"id-site":e.siteId,"compliance-type":t.id,title:t.title,description:t.description},null,8,["id-site","compliance-type","title","description"]))),128))],64)}const Aa={key:0,class:"notification system notification-error"},La={key:0,class:"notification system notification-error"};function xa(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("ActivityIndicator"),c=Object(l["resolveComponent"])("ComplianceTable"),s=Object(l["resolveComponent"])("Field"),d=Object(l["resolveComponent"])("SaveButton"),m=Object(l["resolveComponent"])("PasswordConfirmation"),u=Object(l["resolveComponent"])("ContentBlock");return Object(l["openBlock"])(),Object(l["createBlock"])(u,{"content-title":e.title},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",null,Object(l["toDisplayString"])(e.description),1),Object(l["createVNode"])(r,{loading:e.state.loading},null,8,["loading"]),e.state.loading?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:0},[e.state.fetchComplianceError?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Aa,Object(l["toDisplayString"])(e.translate("General_ErrorTryAgain"))+" "+Object(l["toDisplayString"])(e.translate("General_ExceptionContactSupportGeneric",["",""])),1)):(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:1},[Object(l["createVNode"])(c,{results:e.state.complianceRequirements},null,8,["results"]),e.state.saveComplianceError?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",La,Object(l["toDisplayString"])(e.translate("General_ErrorTryAgain"))+" "+Object(l["toDisplayString"])(e.translate("General_ExceptionContactSupportGeneric",["",""])),1)):(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:1},[Object(l["createVNode"])(s,{uicontrol:"checkbox",name:"site-"+e.idSite+"-"+e.complianceType+"-enableFeature",title:e.translate("PrivacyManager_ComplianceEnforceCheckboxIntro"),introduction:e.translate("PrivacyManager_ComplianceEnforceCheckboxTitle"),"inline-help":e.translate("PrivacyManager_ComplianceEnforceCheckboxHelp"),modelValue:e.shouldEnforceComplianceMode,"onUpdate:modelValue":t[0]||(t[0]=t=>e.shouldEnforceComplianceMode=t)},null,8,["name","title","introduction","inline-help","modelValue"]),Object(l["createVNode"])(d,{class:Object(l["normalizeClass"])("site-"+e.idSite+"-"+e.complianceType+"-save"),onConfirm:t[1]||(t[1]=e=>this.showPasswordConfirmation=!0),value:e.translate("General_Save")},null,8,["class","value"]),Object(l["createVNode"])(m,{"model-value":this.showPasswordConfirmation,passwordFieldId:"password"+e.complianceType,onConfirmed:e.saveSettings},null,8,["model-value","passwordFieldId","onConfirmed"])],64))],64))],64))]),_:1},8,["content-title"])}function Fa(e){const t=Object(l["reactive"])({idSite:null,loading:!1,complianceType:e,complianceModeEnforced:!1,complianceRequirements:[],fetchComplianceError:null,saveComplianceError:null});function n(){return ne["AjaxHelper"].fetch({idSite:t.idSite,complianceType:t.complianceType,method:"PrivacyManager.getComplianceStatus"},{createErrorNotification:!1})}function a(e){t.complianceModeEnforced=e.complianceModeEnforced,t.complianceRequirements=e.complianceRequirements}function o(){t.idSite&&t.complianceType&&(t.loading=!0,t.fetchComplianceError=null,n().then(e=>{a(e)}).catch(e=>{t.fetchComplianceError=e.message||e}).finally(()=>{t.loading=!1}))}function i(e){t.idSite=e,o()}function r(e){t.loading=!0,t.saveComplianceError=null,ne["AjaxHelper"].fetch({idSite:t.idSite,complianceType:t.complianceType,enforce:e,method:"PrivacyManager.setComplianceStatus"},{createErrorNotification:!1}).then(()=>{o()}).catch(e=>{t.saveComplianceError=e.message||e}).finally(()=>{t.loading=!1})}const c=Object(l["readonly"])(t);return{state:c,setIdSite:i,saveComplianceStatus:r}}const Ra={class:"card-table dataTable compliance"},Ua={class:"label"},Ha={class:"label"},$a={class:"label"};function qa(e,t,n,a,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("table",Ra,[Object(l["createElementVNode"])("thead",null,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("th",Ua,Object(l["toDisplayString"])(e.translate("PrivacyManager_ComplianceTableSettingName")),1),Object(l["createElementVNode"])("th",Ha,Object(l["toDisplayString"])(e.translate("PrivacyManager_ComplianceTableSettingStatus")),1),Object(l["createElementVNode"])("th",$a,Object(l["toDisplayString"])(e.translate("PrivacyManager_ComplianceTableSettingNotes")),1)])]),Object(l["createElementVNode"])("tbody",null,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.results,(t,n)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",{key:n},[Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(t.name),1),Object(l["createElementVNode"])("td",{class:Object(l["normalizeClass"])(["status",e.getStatusClass(t.value)])},[Object(l["createElementVNode"])("span",{class:Object(l["normalizeClass"])(["icon",e.getIconClass(t.value)])},null,2),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate(e.getStatusText(t.value))),1)],2),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(t.notes),1)]))),128))])])}const Ga={compliant:"compliant",non_compliant:"non-compliant",unknown:"unknown"},Ka={compliant:"icon-ok",non_compliant:"icon-close",unknown:"icon-circle"},Wa={compliant:"PrivacyManager_ComplianceCompliant",non_compliant:"PrivacyManager_ComplianceNonCompliant",unknown:"PrivacyManager_ComplianceComplianceUnknown"};var Ya=Object(l["defineComponent"])({props:{results:{type:Array,required:!0}},methods:{getStatusClass(e){return Ga[e]||Ga.unknown},getIconClass(e){return Ka[e]||Ka.unknown},getStatusText(e){return Wa[e]||Wa.unknown}}});Ya.render=qa;var Ja=Ya,Qa=Object(l["defineComponent"])({props:{idSite:{type:String,required:!0},complianceType:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,required:!0}},components:{PasswordConfirmation:oe["PasswordConfirmation"],SaveButton:oe["SaveButton"],Field:oe["Field"],ActivityIndicator:ne["ActivityIndicator"],ComplianceTable:Ja,ContentBlock:ne["ContentBlock"]},methods:{saveSettings(){this.saveComplianceStatus(this.shouldEnforceComplianceMode),this.showPasswordConfirmation=!1}},setup(e){const t=Fa(e.complianceType);return t.setIdSite(e.idSite),Object(l["watch"])(()=>e.idSite,e=>{e&&t.setIdSite(e)},{immediate:!0}),{state:t.state,saveComplianceStatus:t.saveComplianceStatus,shouldEnforceComplianceMode:t.state.complianceModeEnforced,showPasswordConfirmation:Object(l["ref"])(!1)}}});Qa.render=xa;var Xa=Qa,Za=Object(l["defineComponent"])({components:{EnrichedHeadline:ne["EnrichedHeadline"],ComplianceOverview:Xa,SiteSelector:ne["SiteSelector"]},setup(){var e,t;const n=Object(l["ref"])({id:null!==(e=ne["Matomo"].idSite)&&void 0!==e?e:ne["MatomoUrl"].urlParsed.value.idSite,name:ne["Matomo"].helper.htmlDecode(ne["Matomo"].siteName)}),a=Object(l["ref"])(String(null!==(t=ne["Matomo"].idSite)&&void 0!==t?t:ne["MatomoUrl"].urlParsed.value.idSite));Object(l["watch"])(n,e=>{a.value=null!=(null===e||void 0===e?void 0:e.id)?String(e.id):""});const o=[{id:"cnil",title:Object(ne["translate"])("PrivacyManager_ComplianceCNILTitle"),description:Object(ne["translate"])("PrivacyManager_ComplianceCNILDescription")}];return{site:n,siteId:a,complianceTypes:o}}});Za.render=Ia;var eo=Za;const to={key:0},no=Object(l["createElementVNode"])("br",null,null,-1),ao={key:1};function oo(e,t,n,a,o,i){const r=Object(l["resolveComponent"])("OptOutCustomizer"),c=Object(l["resolveComponent"])("ContentBlock"),s=Object(l["resolveComponent"])("Alert"),d=Object(l["resolveComponent"])("DoNotTrackPreference");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createVNode"])(c,{"content-title":e.translate("PrivacyManager_TrackingOptOut")},{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.prefaceComponentsResolved,(e,t)=>(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e),{key:t}))),128)),Object(l["createVNode"])(r,{"matomo-url":e.matomoUrl,language:e.language,"language-options":e.languageOptions},null,8,["matomo-url","language","language-options"])]),_:1},8,["content-title"]),e.isSuperUser?(Object(l["openBlock"])(),Object(l["createBlock"])(c,{key:0,id:"DNT","content-title":e.translate("PrivacyManager_DoNotTrack_SupportDNTPreference")},{default:Object(l["withCtx"])(()=>[Object(l["createVNode"])(s,{severity:"warning"},{default:Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Deprecated")),1)]),_:1}),Object(l["createElementVNode"])("p",null,[e.dntSupport?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",to,[Object(l["createElementVNode"])("strong",null,Object(l["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Enabled")),1),no,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_EnabledMoreInfo")),1)])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ao,Object(l["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Disabled"))+" "+Object(l["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_DisabledMoreInfo")),1))]),Object(l["createVNode"])(d,{"dnt-support":e.dntSupport,"do-not-track-options":e.doNotTrackOptions},null,8,["dnt-support","do-not-track-options"])]),_:1},8,["content-title"])):Object(l["createCommentVNode"])("",!0)])}var lo=Object(l["defineComponent"])({props:{language:{type:String,required:!0},matomoUrl:String,isSuperUser:Boolean,dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0},languageOptions:{type:Object,required:!0}},components:{Alert:ne["Alert"],ContentBlock:ne["ContentBlock"],DoNotTrackPreference:wt,OptOutCustomizer:qe},data(){return{prefaceComponents:[]}},computed:{prefaceComponentsResolved(){return Object(l["markRaw"])(this.prefaceComponents.map(e=>Object(l["markRaw"])(Object(ne["useExternalPluginComponent"])(e.plugin,e.component))))}},created(){const e=[];ne["Matomo"].postEvent("PrivacyManager.UsersOptOut.preface",e),this.prefaceComponents=e}});lo.render=oo;var io=lo;
|
||
/*!
|
||
* Matomo - free/libre analytics platform
|
||
*
|
||
* @link https://matomo.org
|
||
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||
*/}})}));
|
||
//# sourceMappingURL=PrivacyManager.umd.min.js.map
|