diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml index bfba674c1..eed33523f 100644 --- a/.github/workflows/npm-audit-fix.yml +++ b/.github/workflows/npm-audit-fix.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - branches: ['main', 'master', 'stable30', 'stable29', 'stable28'] + branches: ['main', 'master', 'stable31', 'stable30', 'stable29'] name: npm-audit-fix-${{ matrix.branches }} diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 6134860bc..36bfbff01 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - branches: ['main', 'master', 'stable30', 'stable29', 'stable28'] + branches: ['main', 'master', 'stable31', 'stable30', 'stable29'] name: update-nextcloud-ocp-${{ matrix.branches }} diff --git a/appinfo/info.xml b/appinfo/info.xml index 8c3b44d5d..6ffa812ce 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -10,7 +10,7 @@ Log Reader A log reader for Nextcloud Log reader for Nextcloud - 4.0.0 + 5.0.0-dev.0 agpl Robin Appelman Ferdinand Thiessen @@ -30,7 +30,7 @@ - + diff --git a/js/Splitter-ER5_nMyK.chunk.mjs b/js/Splitter-DD0YieGu.chunk.mjs similarity index 72% rename from js/Splitter-ER5_nMyK.chunk.mjs rename to js/Splitter-DD0YieGu.chunk.mjs index 78de4851d..dcd7be1d9 100644 --- a/js/Splitter-ER5_nMyK.chunk.mjs +++ b/js/Splitter-DD0YieGu.chunk.mjs @@ -1,2 +1,2 @@ /*! third party licenses: js/vendor.LICENSE.txt */ -import{g as h}from"./logreader-main.mjs";var l=function(a){for(var c=0,n=1,o=2,b=3,e=c,s=0,u=null,t=[],r=0;rt in e?mO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_h=(e,t,r)=>(hO(e,typeof t!="symbol"?t+"":t,r),r);class fO{constructor(t){_h(this,"context"),_h(this,"factory"),this.context={},this.factory=t}setApp(t){return this.context.app=t,this}setLogLevel(t){return this.context.level=t,this}setUid(t){return this.context.uid=t,this}detectUser(){const t=dl();return t!==null&&(this.context.uid=t.uid),this}detectLogLevel(){const t=this,r=()=>{var a,n;document.readyState==="complete"||document.readyState==="interactive"?(t.context.level=(n=(a=window._oc_config)==null?void 0:a.loglevel)!=null?n:je.Warn,window._oc_debug&&(t.context.level=je.Debug),document.removeEventListener("readystatechange",r)):document.addEventListener("readystatechange",r)};return r(),this}build(){return this.context.level===void 0&&this.detectLogLevel(),this.factory(this.context)}}function z1(){return new fO(pO)}const Sr=z1().setApp(d4).build();async function gO(e){return H1(await e.text())}async function H1(e){let t;try{t=e.split(` -`).map(Bh)}catch{Sr.debug("falling back to json splitter");const r=(await b2(async()=>{const{default:a}=await import("./Splitter-ER5_nMyK.chunk.mjs").then(n=>n.S);return{default:a}},[],import.meta.url)).default;t=r(e).jsons.map(Bh)}return t.map(Us)}function Us(e){return{...e,exception:nO(e.exception||e.message)}}function Bh(e){try{return JSON.parse(e)}catch(t){if(Sr.debug("Could not simply parse log entry",{error:t,json:e}),e.startsWith('"')&&e.endsWith('"')){let o=e.substring(1,e.length-1);return o.match(/^\{\s*""/)&&(o=o.replace(/""/g,'"')),JSON.parse(o)}const r=e.indexOf('"message":"')+11,a=e.lastIndexOf('","level":'),n=e.substring(0,r),s=e.substring(a),i=e.slice(r,a).replace(/([^\\]|^)["]/g,'$1\\"');return e=n+i+s,JSON.parse(e)}}const pu=oT("logreader-logs",()=>{const e=Rr(),t=oe([]),r=oe(""),a=ne(()=>{if(r.value){const g=r.value.toLowerCase();return t.value.filter(T=>JSON.stringify(T).toLowerCase().includes(g))}return t.value}),n=oe(!0),s=oe(!1),i=oe(!1);async function o(g=!0){if(e.isEnabled&&(i.value=!i.value))try{if(g){const{data:T}=await Um({offset:t.value.length,query:r.value});t.value.push(...T.data.map(Us)),n.value=T.remain}else{const{data:T}=await zm({lastReqId:t.value[0]?.reqId||""});t.value.splice(0,0,...T.map(Us))}}catch(T){Sr.debug(T),Gr(me("logreader","Could not load log entries"))}finally{i.value=!1}}async function l(){if(!e.localFile){Sr.debug("Can not read file, no file was uploaded");return}t.value=await gO(e.localFile),n.value=!1}async function u(g){if(g!=="")try{t.value=await H1(g),e.localFile=new File([],me("logreader","Clipboard")),n.value=!1}catch(T){Gr(me("logreader","Could not parse clipboard content")),Sr.error(T)}}function c(){s.value=!1}function p(){if(s.value)return;const g=async()=>{try{if(e.isEnabled&&r.value===""){const{data:T}=await zm({lastReqId:t.value[0]?.reqId||""});t.value.splice(0,0,...T.map(Us))}}catch(T){Sr.warn("Unexpected error while polling for new log entries",{error:T}),(T.status||0)>=500?Gr(me("logreader","Could not fetch new log entries (server unavailable)")):Gr(me("logreader","Could not fetch new entries"))}finally{s.value&&window.setTimeout(g,Hm)}};s.value=!0,window.setTimeout(g,Hm)}async function m(g=""){const T=r.value;if(r.value=g,g!==T&&e.isEnabled){i.value=!0;try{const{data:E}=await Um({offset:0,query:g});t.value=[...E.data.map(Us)],n.value=E.remain}finally{i.value=!1}}}return{allEntries:t,entries:a,hasRemainingEntries:n,query:r,loadMore:o,loadText:u,loadFile:l,startPolling:p,stopPolling:c,searchLogs:m}}),TO={name:"NcEmptyContent",props:{name:{type:String,default:""},description:{type:String,default:""}},computed:{hasName(){return this.name!==""},hasDescription(){return this.description!==""||this.$slots.description?.[0]}}};var vO=function(){var e=this,t=e._self._c;return t("div",{staticClass:"empty-content",attrs:{role:"note"}},[e.$slots.icon?t("div",{staticClass:"empty-content__icon",attrs:{"aria-hidden":"true"}},[e._t("icon")],2):e._e(),e._t("name",function(){return[e.hasName?t("span",{staticClass:"empty-content__name"},[e._v(" "+e._s(e.name)+" ")]):e._e()]}),e.hasDescription?t("p",{staticClass:"empty-content__description"},[e._t("description",function(){return[e._v(" "+e._s(e.description)+" ")]})],2):e._e(),e.$slots.action?t("div",{staticClass:"empty-content__action"},[e._t("action")],2):e._e()],2)},EO=[],AO=X(TO,vO,EO,!1,null,"fede0c71");const yO=AO.exports;function we(e,t,r,a,n,s,i,o){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),s&&(l._scopeId="data-v-"+s),{exports:e,options:l}}const SO={name:"CogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var DO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon cog-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},FO=[],NO=we(SO,DO,FO,!1,null,null);const wO=NO.exports,bO={name:"FormatListBulletedSquareIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var OO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-list-bulleted-square-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,4H7V8H3V4M9,5V7H21V5H9M3,10H7V14H3V10M9,11V13H21V11H9M3,16H7V20H3V16M9,17V19H21V17H9"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},RO=[],CO=we(bO,OO,RO,!1,null,null);const xO=CO.exports,_O={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var BO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon download-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},kO=[],MO=we(_O,BO,kO,!1,null,null);const LO=MO.exports,PO={name:"UploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var YO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon upload-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},IO=[],ZO=we(PO,YO,IO,!1,null,null);const UO=ZO.exports,zO={__name:"SettingsActions",setup(e){const t=Rr(),r=pu(),a=`${me("logreader","Ctrl")} + v`,n=Ca("/settings/admin/log/download"),s=oe();return{__sfc:!0,settingsStore:t,logStore:r,keyboardShortcutText:a,downloadURL:n,fileinput:s,onFileSelected:async()=>{const i=s.value?.files?.item?.(0);if(i)try{t.localFile=i,await r.loadFile()}catch(o){t.localFile=void 0,Gr(me("logreader","Could not parse local log file")),Sr.debug(o)}},t:me,NcButton:Or,NcNoteCard:yd,IconDownload:LO,IconUpload:UO}}};var HO=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",[t(r.NcNoteCard,{staticClass:"info-note",attrs:{type:"info"}},[t("p",{domProps:{innerHTML:e._s(r.t("logreader","You can also show log entries copied from your clipboard by pasting them on the log view using: {keyboardShortcut}",{keyboardShortcut:r.keyboardShortcutText},void 0,{escape:!1}))}})]),t(r.NcButton,{attrs:{href:r.settingsStore.enabled?r.downloadURL:null,disabled:!r.settingsStore.enabled,download:"nextcloud.log"},scopedSlots:e._u([{key:"icon",fn:function(){return[t(r.IconDownload,{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(r.t("logreader","Download logs"))+" ")]),t(r.NcButton,{on:{click:function(a){r.fileinput?.click()}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(r.IconUpload,{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(r.t("logreader","Show local log file"))+" ")]),t("label",{staticClass:"hidden-visually"},[e._v(" "+e._s(r.t("logreader","Upload local log file to be displayed"))+" "),t("input",{ref:"fileinput",attrs:{type:"file",name:"logfile",accept:".log,.json,.txt,application/json,text/plain"},on:{change:function(a){return a.stopPropagation(),r.onFileSelected.apply(null,arguments)}}})])],1)},GO=[],jO=we(zO,HO,GO,!1,null,"a7bb869e");const $O=jO.exports;function ta(e,t,r=!1){const a=Ql().proxy;return r&&a.$props[e]===void 0&&a.$props.modelValue===void 0&&ge.util.warn(`Missing required prop: "modelValue" or old "${e}"`),ne({get(){return a.$props[e]!==void 0?a.$props[e]:a.$props.modelValue},set(n){a.$emit("update:modelValue",n),a.$emit("update:model-value",n),a.$emit(t,n)}})}st();const VO={name:"CheckboxBlankOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var WO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon checkbox-blank-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},QO=[],KO=X(VO,WO,QO,!1,null,null);const qO=KO.exports,JO={name:"MinusBoxIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var XO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon minus-box-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},eR=[],tR=X(JO,XO,eR,!1,null,null);const rR=tR.exports,aR={name:"CheckboxMarkedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var nR=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon checkbox-marked-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},sR=[],iR=X(aR,nR,sR,!1,null,null);const oR=iR.exports,lR={name:"RadioboxMarkedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var uR=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon radiobox-marked-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},cR=[],dR=X(lR,uR,cR,!1,null,null);const pR=dR.exports,mR={name:"RadioboxBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var hR=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon radiobox-blank-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},fR=[],gR=X(mR,hR,fR,!1,null,null);const TR=gR.exports,vR={name:"ToggleSwitchOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ER=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon toggle-switch-off-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17,7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7M7,15A3,3 0 0,1 4,12A3,3 0 0,1 7,9A3,3 0 0,1 10,12A3,3 0 0,1 7,15Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},AR=[],yR=X(vR,ER,AR,!1,null,null);const SR=yR.exports,DR={name:"ToggleSwitchIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var FR=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon toggle-switch-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17,7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7M17,15A3,3 0 0,1 14,12A3,3 0 0,1 17,9A3,3 0 0,1 20,12A3,3 0 0,1 17,15Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},NR=[],wR=X(DR,FR,NR,!1,null,null);const bR=wR.exports,In="checkbox",Wn="radio",la="switch",ei="button",OR={name:"NcCheckboxContent",components:{NcLoadingIcon:du},props:{id:{type:String,default:null},iconClass:{type:[String,Object],default:null},textClass:{type:[String,Object],default:null},type:{type:String,default:"checkbox",validator:e=>[In,Wn,la,ei].includes(e)},buttonVariant:{type:Boolean,default:!1},isChecked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:Number,default:24}},computed:{isButtonType(){return this.type===ei},checkboxRadioIconElement(){return this.type===Wn?this.isChecked?pR:TR:this.type===la?this.isChecked?bR:SR:this.indeterminate?rR:this.isChecked?oR:qO}}};var RR=function(){var e=this,t=e._self._c;return t("span",{staticClass:"checkbox-content",class:{["checkbox-content-"+e.type]:!0,"checkbox-content--button-variant":e.buttonVariant,"checkbox-content--has-text":!!e.$slots.default},attrs:{id:e.isButtonType?void 0:`${e.id}-label`}},[t("span",{class:{"checkbox-content__icon":!0,"checkbox-content__icon--checked":e.isChecked,[e.iconClass]:!0},attrs:{"aria-hidden":!0,inert:""}},[e._t("icon",function(){return[e.loading?t("NcLoadingIcon"):e.buttonVariant?e._e():t(e.checkboxRadioIconElement,{tag:"component",attrs:{size:e.size}})]},{checked:e.isChecked,loading:e.loading})],2),e.$slots.default?t("span",{class:["checkbox-content__text",e.textClass]},[e._t("default")],2):e._e()])},CR=[],xR=X(OR,RR,CR,!1,null,"38a6f3e5");const _R=xR.exports,BR={name:"NcCheckboxRadioSwitch",components:{NcCheckboxContent:_R},inheritAttrs:!1,model:{prop:"modelValue",event:"update:modelValue"},props:{id:{type:String,default:()=>"checkbox-radio-switch-"+sr(),validator:e=>e.trim()!==""},wrapperId:{type:String,default:null},name:{type:String,default:null},ariaLabel:{type:String,default:""},type:{type:String,default:"checkbox",validator:e=>[In,Wn,la,ei].includes(e)},buttonVariant:{type:Boolean,default:!1},buttonVariantGrouped:{type:String,default:"no",validator:e=>["no","vertical","horizontal"].includes(e)},checked:{type:[Boolean,Array,String],default:void 0},modelValue:{type:[Boolean,Array,String],default:!1},value:{type:String,default:null},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},wrapperElement:{type:String,default:null}},emits:["update:checked","update:modelValue","update:model-value"],setup(){return{model:ta("checked","update:checked")}},computed:{dataAttrs(){return Object.fromEntries(Object.entries(this.$attrs).filter(([e])=>e.startsWith("data-")))},nonDataAttrs(){return Object.fromEntries(Object.entries(this.$attrs).filter(([e])=>!e.startsWith("data-")))},isButtonType(){return this.type===ei},computedWrapperElement(){return this.isButtonType?"button":this.wrapperElement!==null?this.wrapperElement:"span"},listeners(){return this.isButtonType?{click:this.onToggle}:{change:this.onToggle}},size(){return this.type===la?36:24},cssVars(){return{"--icon-size":this.size+"px","--icon-height":(this.type===la?16:this.size)+"px"}},inputType(){return[In,Wn,ei].includes(this.type)?this.type:In},isChecked(){return this.value!==null?Array.isArray(this.model)?[...this.model].indexOf(this.value)>-1:this.model===this.value:this.model===!0},hasIndeterminate(){return[In,Wn].includes(this.inputType)}},mounted(){if(this.name&&this.type===In&&!Array.isArray(this.model))throw new Error("When using groups of checkboxes, the updated value will be an array.");if(this.name&&this.type===la)throw new Error("Switches are not made to be used for data sets. Please use checkboxes instead.");if(typeof this.model!="boolean"&&this.type===la)throw new Error("Switches can only be used with boolean as checked prop.")},methods:{t:ee,n:FN,onToggle(e){if(this.disabled||e.target.tagName.toLowerCase()==="a")return;if(this.type===Wn){this.model=this.value;return}if(this.type===la){this.model=!this.isChecked;return}if(typeof this.model=="boolean"){this.model=!this.model;return}const t=this.getInputsSet().filter(r=>r.checked).map(r=>r.value);t.includes(this.value)?this.model=t.filter(r=>r!==this.value):this.model=[...t,this.value]},getInputsSet(){return[...document.getElementsByName(this.name)]}}};var kR=function(){var e=this,t=e._self._c;return t(e.computedWrapperElement,e._g(e._b({tag:"component",staticClass:"checkbox-radio-switch",class:{["checkbox-radio-switch-"+e.type]:e.type,"checkbox-radio-switch--checked":e.isChecked,"checkbox-radio-switch--disabled":e.disabled,"checkbox-radio-switch--indeterminate":e.hasIndeterminate?e.indeterminate:!1,"checkbox-radio-switch--button-variant":e.buttonVariant,"checkbox-radio-switch--button-variant-v-grouped":e.buttonVariant&&e.buttonVariantGrouped==="vertical","checkbox-radio-switch--button-variant-h-grouped":e.buttonVariant&&e.buttonVariantGrouped==="horizontal","button-vue":e.isButtonType},style:e.cssVars,attrs:{id:e.wrapperId,"aria-label":e.isButtonType&&e.ariaLabel?e.ariaLabel:void 0,type:e.isButtonType?"button":null}},"component",e.isButtonType?e.$attrs:e.dataAttrs,!1),e.isButtonType?e.listeners:null),[e.isButtonType?e._e():t("input",e._g(e._b({staticClass:"checkbox-radio-switch__input",attrs:{id:e.id,"aria-labelledby":!e.isButtonType&&!e.ariaLabel?`${e.id}-label`:null,"aria-label":e.ariaLabel||void 0,disabled:e.disabled,type:e.inputType,required:e.required,name:e.name},domProps:{value:e.value,checked:e.isChecked,indeterminate:e.hasIndeterminate?e.indeterminate:null}},"input",e.nonDataAttrs,!1),e.listeners)),t("NcCheckboxContent",{staticClass:"checkbox-radio-switch__content",attrs:{id:e.id,"icon-class":"checkbox-radio-switch__icon","text-class":"checkbox-radio-switch__text",type:e.type,indeterminate:e.hasIndeterminate?e.indeterminate:!1,"button-variant":e.buttonVariant,"is-checked":e.isChecked,loading:e.loading,size:e.size},nativeOn:{click:function(r){return e.onToggle.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("icon")]},proxy:!0}],null,!0)},[e._t("default")],2)],1)},MR=[],LR=X(BR,kR,MR,!1,null,"194d90ea");const mu=LR.exports,PR={__name:"SettingsLiveView",setup(e){const t=Rr(),r=ne({get:()=>t.enabled?t.liveLog:!1,set:a=>t.setSetting("liveLog",a).catch(n=>{Sr.debug(n),Gr(me("logreader","Could not change live view setting."))})});return{__sfc:!0,settingsStore:t,liveLog:r,t:me,NcCheckboxRadioSwitch:mu,NcNoteCard:yd}}};var YR=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",[r.settingsStore.enabled?e._e():t(r.NcNoteCard,{attrs:{type:"info"}},[e._v(" "+e._s(r.t("logreader","Polling is disabled because server is not configured to log to file"))+" ")]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.liveLog,disabled:!r.settingsStore.enabled},on:{"update:checked":function(a){r.liveLog=a}}},[e._v(" "+e._s(r.t("logreader","Polling (live view)"))+" ")])],1)},IR=[],ZR=we(PR,YR,IR,!1,null,null);const UR=ZR.exports;function zR(e,t=300){let r;return(...a)=>{clearTimeout(r),r=window.setTimeout(()=>{e.apply(this,a)},t)}}const HR={__name:"SettingsLogLevels",setup(e){const t=Rr(),r=ne(()=>t.shownLevels.map(n=>`${n}`)),a=zR(n=>{const s=n.map(i=>parseInt(i));t.setSetting("shownLevels",s).catch(()=>Gr(me("logreader","Could not set logging levels to show")))},200);return{__sfc:!0,settingsStore:t,shownLevels:r,setShowLevels:a,t:me,LOGGING_LEVEL_NAMES:zi,NcCheckboxRadioSwitch:mu}}};var GR=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",[t("fieldset",[t("legend",[e._v(e._s(r.t("logreader","Filter logging levels")))]),e._l(r.LOGGING_LEVEL_NAMES,function(a,n){return t(r.NcCheckboxRadioSwitch,{key:n,attrs:{checked:r.shownLevels,value:`${n}`,name:"logging_level"},on:{"update:checked":r.setShowLevels}},[e._v(" "+e._s(a)+" ")])})],2)])},jR=[],$R=we(HR,GR,jR,!1,null,"bfae3f2f");const VR=$R.exports,WR={__name:"SettingsSetLogLevel",setup(e){const t=Rr(),r=ne(()=>`${t.logLevel}`);return{__sfc:!0,settingsStore:t,logLevel:r,setLogLevel:a=>{const n=parseInt(a);t.setSetting("logLevel",n).catch(s=>{Gr(me("logreader","Could not set logging level")),Sr.error(s)})},t:me,LOGGING_LEVEL_NAMES:zi,NcCheckboxRadioSwitch:mu}}};var QR=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("fieldset",[t("legend",[e._v(e._s(r.t("logreader","Set backend loglevel")))]),e._l(r.LOGGING_LEVEL_NAMES,function(a,n){return t(r.NcCheckboxRadioSwitch,{key:n,attrs:{checked:r.logLevel,value:`${n}`,type:"radio",name:"loglevel"},on:{"update:checked":r.setLogLevel}},[e._v(" "+e._s(a)+" ")])})],2)},KR=[],qR=we(WR,QR,KR,!1,null,"eed977e3");const JR=qR.exports,XR={__name:"SettingsDatetimeFormat",setup(e){const t=Rr(),r=ne(()=>{let s=me("logreader","Time format used for displaying the timestamp");return t.localFile&&(s+=" "+me("logreader",'(Local log files only support the "raw" time format)')),s}),a=ne(()=>t.localFile!==void 0),n=ne(()=>t.dateTimeFormat);return{__sfc:!0,settingsStore:t,fieldsetLegend:r,isLocalLogfile:a,dateTimeFormat:n,setDateTimeFormat:s=>t.setSetting("dateTimeFormat",s).catch(i=>{Sr.debug(i),Gr(me("logreader","Could not change date time format."))}),t:me,NcCheckboxRadioSwitch:mu}}};var eC=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("fieldset",[t("legend",[e._v(e._s(r.fieldsetLegend))]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.dateTimeFormat,value:"raw",name:"timestamp_format",type:"radio"},on:{"update:checked":r.setDateTimeFormat}},[e._v(" "+e._s(r.t("logreader","Raw data"))+" ")]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.dateTimeFormat,disabled:r.isLocalLogfile,value:"local",name:"timestamp_format",type:"radio"},on:{"update:checked":r.setDateTimeFormat}},[e._v(" "+e._s(r.t("logreader","Local time"))+" ")]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.dateTimeFormat,disabled:r.isLocalLogfile,value:"utc",name:"timestamp_format",type:"radio"},on:{"update:checked":r.setDateTimeFormat}},[e._v(" "+e._s(r.t("logreader","UTC time"))+" ")]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.dateTimeFormat,disabled:r.isLocalLogfile,value:"relative",name:"timestamp_format",type:"radio"},on:{"update:checked":r.setDateTimeFormat}},[e._v(" "+e._s(r.t("logreader","Relative"))+" ")])],1)},tC=[],rC=we(XR,eC,tC,!1,null,"e1e4a744");const aC=rC.exports,nC={name:"NcVNodes",props:{vnodes:{type:[Array,Object],default:null}},render(e){return this.vnodes||this.$slots?.default||this.$scopedSlots?.default?.()}},sC=null,iC=null;var oC=X(nC,sC,iC,!1,null,null);const lC=oC.exports,Dd=1024,G1=Dd/2,Dl=e=>document.documentElement.clientWidth{Fd.value=Dl(Dd),uC.value=Dl(G1)},{passive:!0});function cC(){return Pi(Fd)}Pi(Fd);var dc={exports:{}};function kh(e,t=100,r={}){if(typeof e!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");const{immediate:a}=typeof r=="boolean"?{immediate:r}:r;let n,s,i,o,l;function u(){const m=n,g=s;return n=void 0,s=void 0,l=e.apply(m,g),l}function c(){const m=Date.now()-o;m=0?i=setTimeout(c,t-m):(i=void 0,a||(l=u()))}const p=function(...m){if(n&&this!==n&&Object.getPrototypeOf(this)===Object.getPrototypeOf(n))throw new Error("Debounced method called with different contexts of the same prototype.");n=this,s=m,o=Date.now();const g=a&&!i;return i||(i=setTimeout(c,t)),g&&(l=u()),l};return Object.defineProperty(p,"isPending",{get(){return i!==void 0}}),p.clear=()=>{i&&(clearTimeout(i),i=void 0)},p.flush=()=>{i&&p.trigger()},p.trigger=()=>{l=u(),p.clear()},p}dc.exports.debounce=kh,dc.exports=kh;var dC=dc.exports;const j1=xa(dC);st(IN);const pC={name:"NcAppSettingsDialog",components:{NcDialog:kb,NcVNodes:lC},provide(){return{registerSection:this.registerSection,unregisterSection:this.unregisterSection}},props:{open:{type:Boolean,required:!0},showNavigation:{type:Boolean,default:!1},container:{type:String,default:"body"},name:{type:String,default:""},additionalTrapElements:{type:Array,default:()=>[]}},emits:["update:open"],setup(){return{isMobile:cC()}},data(){return{selectedSection:"",linkClicked:!1,addedScrollListener:!1,scroller:null,sections:[]}},computed:{dialogProperties(){return{additionalTrapElements:this.additionalTrapElements,closeOnClickOutside:!0,class:"app-settings",container:this.container,contentClasses:"app-settings__content",size:"large",name:this.name,navigationClasses:"app-settings__navigation"}},hasNavigationIcons(){return this.sections.some(({icon:e})=>!!e)},hasNavigation(){return!(this.isMobile||!this.showNavigation)},settingsNavigationAriaLabel(){return ee("Settings navigation")}},updated(){this.$refs.settingsScroller&&(this.scroller=this.$refs.settingsScroller,this.addedScrollListener||(this.scroller.addEventListener("scroll",this.handleScroll),this.addedScrollListener=!0))},methods:{registerSection(e,t,r){if(this.sections.some(({id:n})=>e===n))throw new Error(`Duplicate section id found: ${e}. Settings navigation sections must have unique section ids.`);this.sections.some(({name:n})=>t===n)&&ge.util.warn(`Duplicate section name found: ${t}. Settings navigation sections must have unique section names.`);const a=[...this.sections,{id:e,name:t,icon:r}];this.sections=a.sort(({id:n},{id:s})=>{const i=o=>this.$slots.default?.findIndex?.(l=>l?.componentOptions?.propsData?.id===o)??-1;return i(n)-i(s)}),this.sections.length===1&&(this.selectedSection=e)},unregisterSection(e){this.sections=this.sections.filter(({id:t})=>e!==t),this.selectedSection===e&&(this.selectedSection=this.sections[0]?.id??"")},handleSettingsNavigationClick(e){this.linkClicked=!0,document.getElementById("settings-section_"+e).scrollIntoView({behavior:"smooth",inline:"nearest"}),this.selectedSection=e,setTimeout(()=>{this.linkClicked=!1},1e3)},handleCloseModal(e){e||(this.$emit("update:open",!1),this.scroller.removeEventListener("scroll",this.handleScroll),this.addedScrollListener=!1,this.scroller.scrollTop=0)},handleScroll(){this.linkClicked||this.unfocusNavigationItem()},unfocusNavigationItem:j1(function(){this.selectedSection="",document.activeElement.className.includes("navigation-list__link")&&document.activeElement.blur()},300)}};var mC=function(){var e=this,t=e._self._c;return e.open?t("NcDialog",e._b({attrs:{"navigation-aria-label":e.settingsNavigationAriaLabel},on:{"update:open":e.handleCloseModal},scopedSlots:e._u([e.hasNavigation?{key:"navigation",fn:function({isCollapsed:r}){return[r?e._e():t("ul",{staticClass:"navigation-list"},e._l(e.sections,function(a){return t("li",{key:a.id},[t("a",{class:{"navigation-list__link":!0,"navigation-list__link--active":a.id===e.selectedSection,"navigation-list__link--icon":e.hasNavigationIcons},attrs:{"aria-current":`${a.id===e.selectedSection}`,href:`#settings-section_${a.id}`,tabindex:"0"},on:{click:function(n){return n.preventDefault(),e.handleSettingsNavigationClick(a.id)},keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.handleSettingsNavigationClick(a.id)}}},[e.hasNavigationIcons?t("div",{staticClass:"navigation-list__link-icon"},[a.icon?t("NcVNodes",{attrs:{vnodes:a.icon}}):e._e()],1):e._e(),t("span",{staticClass:"navigation-list__link-text"},[e._v(" "+e._s(a.name)+" ")])])])}),0)]}}:null],null,!0)},"NcDialog",e.dialogProperties,!1),[t("div",{ref:"settingsScroller"},[e._t("default")],2)]):e._e()},hC=[],fC=X(pC,mC,hC,!1,null,"0674bd2e");const gC=fC.exports,TC={name:"NcAppSettingsSection",inject:["registerSection","unregisterSection"],props:{name:{type:String,required:!0},id:{type:String,required:!0,validator(e){return/^[a-z0-9\-_]+$/.test(e)}}},computed:{htmlId(){return"settings-section_"+this.id}},watch:{id(e,t){this.unregisterSection(t),this.registerSection(e,this.name,this.$slots?.icon)},name(e){this.unregisterSection(this.id),this.registerSection(this.id,e,this.$slots?.icon)}},mounted(){this.registerSection(this.id,this.name,this.$slots?.icon)},beforeDestroy(){this.unregisterSection(this.id)}};var vC=function(){var e=this,t=e._self._c;return t("section",{staticClass:"app-settings-section",attrs:{id:e.htmlId,"aria-labelledby":`${e.htmlId}--label`}},[t("h3",{staticClass:"app-settings-section__name",attrs:{id:`${e.htmlId}--label`}},[e._v(" "+e._s(e.name)+" ")]),e._t("default"),e._e()],2)},EC=[],AC=X(TC,vC,EC,!1,null,"e970c9f7");const yC=AC.exports,SC={__name:"AppSettingsDialog",props:{open:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){return{__sfc:!0,props:e,emit:t,onUpdateOpen:r=>t("update:open",r),t:me,SettingsActions:$O,SettingsLiveView:UR,SettingsLogLevels:VR,SettingsSetLogLevel:JR,SettingsDatetimeFormat:aC,NcAppSettingsDialog:gC,NcAppSettingsSection:yC}}};var DC=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.NcAppSettingsDialog,{attrs:{open:r.props.open,"show-navigation":!0,name:r.t("logreader","Log reader settings")},on:{"update:open":r.onUpdateOpen}},[t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-levels",name:r.t("logreader","Filter log levels")}},[t(r.SettingsLogLevels)],1),t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-set-level",name:r.t("logreader","Set log level")}},[t(r.SettingsSetLogLevel)],1),t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-time",name:r.t("logreader","Time format")}},[t(r.SettingsDatetimeFormat)],1),t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-live-view",name:r.t("logreader","Live view")}},[t(r.SettingsLiveView)],1),t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-actions",name:r.t("logreader","Download/Upload logs")}},[t(r.SettingsActions)],1)],1)},FC=[],NC=we(SC,DC,FC,!1,null,null);const wC=NC.exports,bC={__name:"IntersectionObserver",props:{options:null},emits:["intersection"],setup(e,{emit:t}){const r=e,a=oe(),n=new IntersectionObserver(s=>{s[0].isIntersecting&&t("intersection")},r.options);return Tn(()=>{a.value&&n.observe(a.value)}),gi(()=>n.disconnect()),{__sfc:!0,emit:t,props:r,observable:a,observer:n}}};var OC=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{ref:"observable"},[e._t("default")],2)},RC=[],CC=we(bC,OC,RC,!1,null,null);const xC=CC.exports,Fl=async e=>{try{return await window.navigator.clipboard.writeText(e),!0}catch{window.prompt(me("logreader","Could not copy to clipboard, please copy manually:"),e)}return!1},$1=e=>{const t=Rr(e),r=a=>Intl.DateTimeFormat(Kc(),{dateStyle:"medium",timeStyle:"medium",timeZone:t.dateTimeFormat==="utc"?"UTC":void 0}).format(new Date(a));return{formatTime:r,formatLogEntry:a=>`[${a.app}] ${zi[a.level]}: ${a.message} +`).map(Bh)}catch{Sr.debug("falling back to json splitter");const r=(await b2(async()=>{const{default:a}=await import("./Splitter-DD0YieGu.chunk.mjs").then(n=>n.S);return{default:a}},[],import.meta.url)).default;t=r(e).jsons.map(Bh)}return t.map(Us)}function Us(e){return{...e,exception:nO(e.exception||e.message)}}function Bh(e){try{return JSON.parse(e)}catch(t){if(Sr.debug("Could not simply parse log entry",{error:t,json:e}),e.startsWith('"')&&e.endsWith('"')){let o=e.substring(1,e.length-1);return o.match(/^\{\s*""/)&&(o=o.replace(/""/g,'"')),JSON.parse(o)}const r=e.indexOf('"message":"')+11,a=e.lastIndexOf('","level":'),n=e.substring(0,r),s=e.substring(a),i=e.slice(r,a).replace(/([^\\]|^)["]/g,'$1\\"');return e=n+i+s,JSON.parse(e)}}const pu=oT("logreader-logs",()=>{const e=Rr(),t=oe([]),r=oe(""),a=ne(()=>{if(r.value){const g=r.value.toLowerCase();return t.value.filter(T=>JSON.stringify(T).toLowerCase().includes(g))}return t.value}),n=oe(!0),s=oe(!1),i=oe(!1);async function o(g=!0){if(e.isEnabled&&(i.value=!i.value))try{if(g){const{data:T}=await Um({offset:t.value.length,query:r.value});t.value.push(...T.data.map(Us)),n.value=T.remain}else{const{data:T}=await zm({lastReqId:t.value[0]?.reqId||""});t.value.splice(0,0,...T.map(Us))}}catch(T){Sr.debug(T),Gr(me("logreader","Could not load log entries"))}finally{i.value=!1}}async function l(){if(!e.localFile){Sr.debug("Can not read file, no file was uploaded");return}t.value=await gO(e.localFile),n.value=!1}async function u(g){if(g!=="")try{t.value=await H1(g),e.localFile=new File([],me("logreader","Clipboard")),n.value=!1}catch(T){Gr(me("logreader","Could not parse clipboard content")),Sr.error(T)}}function c(){s.value=!1}function p(){if(s.value)return;const g=async()=>{try{if(e.isEnabled&&r.value===""){const{data:T}=await zm({lastReqId:t.value[0]?.reqId||""});t.value.splice(0,0,...T.map(Us))}}catch(T){Sr.warn("Unexpected error while polling for new log entries",{error:T}),(T.status||0)>=500?Gr(me("logreader","Could not fetch new log entries (server unavailable)")):Gr(me("logreader","Could not fetch new entries"))}finally{s.value&&window.setTimeout(g,Hm)}};s.value=!0,window.setTimeout(g,Hm)}async function m(g=""){const T=r.value;if(r.value=g,g!==T&&e.isEnabled){i.value=!0;try{const{data:E}=await Um({offset:0,query:g});t.value=[...E.data.map(Us)],n.value=E.remain}finally{i.value=!1}}}return{allEntries:t,entries:a,hasRemainingEntries:n,query:r,loadMore:o,loadText:u,loadFile:l,startPolling:p,stopPolling:c,searchLogs:m}}),TO={name:"NcEmptyContent",props:{name:{type:String,default:""},description:{type:String,default:""}},computed:{hasName(){return this.name!==""},hasDescription(){return this.description!==""||this.$slots.description?.[0]}}};var vO=function(){var e=this,t=e._self._c;return t("div",{staticClass:"empty-content",attrs:{role:"note"}},[e.$slots.icon?t("div",{staticClass:"empty-content__icon",attrs:{"aria-hidden":"true"}},[e._t("icon")],2):e._e(),e._t("name",function(){return[e.hasName?t("span",{staticClass:"empty-content__name"},[e._v(" "+e._s(e.name)+" ")]):e._e()]}),e.hasDescription?t("p",{staticClass:"empty-content__description"},[e._t("description",function(){return[e._v(" "+e._s(e.description)+" ")]})],2):e._e(),e.$slots.action?t("div",{staticClass:"empty-content__action"},[e._t("action")],2):e._e()],2)},EO=[],AO=X(TO,vO,EO,!1,null,"fede0c71");const yO=AO.exports;function we(e,t,r,a,n,s,i,o){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),s&&(l._scopeId="data-v-"+s),{exports:e,options:l}}const SO={name:"CogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var DO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon cog-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},FO=[],NO=we(SO,DO,FO,!1,null,null);const wO=NO.exports,bO={name:"FormatListBulletedSquareIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var OO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon format-list-bulleted-square-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,4H7V8H3V4M9,5V7H21V5H9M3,10H7V14H3V10M9,11V13H21V11H9M3,16H7V20H3V16M9,17V19H21V17H9"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},RO=[],CO=we(bO,OO,RO,!1,null,null);const xO=CO.exports,_O={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var BO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon download-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},kO=[],MO=we(_O,BO,kO,!1,null,null);const LO=MO.exports,PO={name:"UploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var YO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon upload-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},IO=[],ZO=we(PO,YO,IO,!1,null,null);const UO=ZO.exports,zO={__name:"SettingsActions",setup(e){const t=Rr(),r=pu(),a=`${me("logreader","Ctrl")} + v`,n=Ca("/settings/admin/log/download"),s=oe();return{__sfc:!0,settingsStore:t,logStore:r,keyboardShortcutText:a,downloadURL:n,fileinput:s,onFileSelected:async()=>{const i=s.value?.files?.item?.(0);if(i)try{t.localFile=i,await r.loadFile()}catch(o){t.localFile=void 0,Gr(me("logreader","Could not parse local log file")),Sr.debug(o)}},t:me,NcButton:Or,NcNoteCard:yd,IconDownload:LO,IconUpload:UO}}};var HO=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",[t(r.NcNoteCard,{staticClass:"info-note",attrs:{type:"info"}},[t("p",{domProps:{innerHTML:e._s(r.t("logreader","You can also show log entries copied from your clipboard by pasting them on the log view using: {keyboardShortcut}",{keyboardShortcut:r.keyboardShortcutText},void 0,{escape:!1}))}})]),t(r.NcButton,{attrs:{href:r.settingsStore.enabled?r.downloadURL:null,disabled:!r.settingsStore.enabled,download:"nextcloud.log"},scopedSlots:e._u([{key:"icon",fn:function(){return[t(r.IconDownload,{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(r.t("logreader","Download logs"))+" ")]),t(r.NcButton,{on:{click:function(a){r.fileinput?.click()}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(r.IconUpload,{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(r.t("logreader","Show local log file"))+" ")]),t("label",{staticClass:"hidden-visually"},[e._v(" "+e._s(r.t("logreader","Upload local log file to be displayed"))+" "),t("input",{ref:"fileinput",attrs:{type:"file",name:"logfile",accept:".log,.json,.txt,application/json,text/plain"},on:{change:function(a){return a.stopPropagation(),r.onFileSelected.apply(null,arguments)}}})])],1)},GO=[],jO=we(zO,HO,GO,!1,null,"a7bb869e");const $O=jO.exports;function ta(e,t,r=!1){const a=Ql().proxy;return r&&a.$props[e]===void 0&&a.$props.modelValue===void 0&&ge.util.warn(`Missing required prop: "modelValue" or old "${e}"`),ne({get(){return a.$props[e]!==void 0?a.$props[e]:a.$props.modelValue},set(n){a.$emit("update:modelValue",n),a.$emit("update:model-value",n),a.$emit(t,n)}})}st();const VO={name:"CheckboxBlankOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var WO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon checkbox-blank-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},QO=[],KO=X(VO,WO,QO,!1,null,null);const qO=KO.exports,JO={name:"MinusBoxIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var XO=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon minus-box-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},eR=[],tR=X(JO,XO,eR,!1,null,null);const rR=tR.exports,aR={name:"CheckboxMarkedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var nR=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon checkbox-marked-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},sR=[],iR=X(aR,nR,sR,!1,null,null);const oR=iR.exports,lR={name:"RadioboxMarkedIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var uR=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon radiobox-marked-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},cR=[],dR=X(lR,uR,cR,!1,null,null);const pR=dR.exports,mR={name:"RadioboxBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var hR=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon radiobox-blank-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},fR=[],gR=X(mR,hR,fR,!1,null,null);const TR=gR.exports,vR={name:"ToggleSwitchOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ER=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon toggle-switch-off-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17,7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7M7,15A3,3 0 0,1 4,12A3,3 0 0,1 7,9A3,3 0 0,1 10,12A3,3 0 0,1 7,15Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},AR=[],yR=X(vR,ER,AR,!1,null,null);const SR=yR.exports,DR={name:"ToggleSwitchIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var FR=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon toggle-switch-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17,7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7M17,15A3,3 0 0,1 14,12A3,3 0 0,1 17,9A3,3 0 0,1 20,12A3,3 0 0,1 17,15Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},NR=[],wR=X(DR,FR,NR,!1,null,null);const bR=wR.exports,In="checkbox",Wn="radio",la="switch",ei="button",OR={name:"NcCheckboxContent",components:{NcLoadingIcon:du},props:{id:{type:String,default:null},iconClass:{type:[String,Object],default:null},textClass:{type:[String,Object],default:null},type:{type:String,default:"checkbox",validator:e=>[In,Wn,la,ei].includes(e)},buttonVariant:{type:Boolean,default:!1},isChecked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:Number,default:24}},computed:{isButtonType(){return this.type===ei},checkboxRadioIconElement(){return this.type===Wn?this.isChecked?pR:TR:this.type===la?this.isChecked?bR:SR:this.indeterminate?rR:this.isChecked?oR:qO}}};var RR=function(){var e=this,t=e._self._c;return t("span",{staticClass:"checkbox-content",class:{["checkbox-content-"+e.type]:!0,"checkbox-content--button-variant":e.buttonVariant,"checkbox-content--has-text":!!e.$slots.default},attrs:{id:e.isButtonType?void 0:`${e.id}-label`}},[t("span",{class:{"checkbox-content__icon":!0,"checkbox-content__icon--checked":e.isChecked,[e.iconClass]:!0},attrs:{"aria-hidden":!0,inert:""}},[e._t("icon",function(){return[e.loading?t("NcLoadingIcon"):e.buttonVariant?e._e():t(e.checkboxRadioIconElement,{tag:"component",attrs:{size:e.size}})]},{checked:e.isChecked,loading:e.loading})],2),e.$slots.default?t("span",{class:["checkbox-content__text",e.textClass]},[e._t("default")],2):e._e()])},CR=[],xR=X(OR,RR,CR,!1,null,"38a6f3e5");const _R=xR.exports,BR={name:"NcCheckboxRadioSwitch",components:{NcCheckboxContent:_R},inheritAttrs:!1,model:{prop:"modelValue",event:"update:modelValue"},props:{id:{type:String,default:()=>"checkbox-radio-switch-"+sr(),validator:e=>e.trim()!==""},wrapperId:{type:String,default:null},name:{type:String,default:null},ariaLabel:{type:String,default:""},type:{type:String,default:"checkbox",validator:e=>[In,Wn,la,ei].includes(e)},buttonVariant:{type:Boolean,default:!1},buttonVariantGrouped:{type:String,default:"no",validator:e=>["no","vertical","horizontal"].includes(e)},checked:{type:[Boolean,Array,String],default:void 0},modelValue:{type:[Boolean,Array,String],default:!1},value:{type:String,default:null},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},wrapperElement:{type:String,default:null}},emits:["update:checked","update:modelValue","update:model-value"],setup(){return{model:ta("checked","update:checked")}},computed:{dataAttrs(){return Object.fromEntries(Object.entries(this.$attrs).filter(([e])=>e.startsWith("data-")))},nonDataAttrs(){return Object.fromEntries(Object.entries(this.$attrs).filter(([e])=>!e.startsWith("data-")))},isButtonType(){return this.type===ei},computedWrapperElement(){return this.isButtonType?"button":this.wrapperElement!==null?this.wrapperElement:"span"},listeners(){return this.isButtonType?{click:this.onToggle}:{change:this.onToggle}},size(){return this.type===la?36:24},cssVars(){return{"--icon-size":this.size+"px","--icon-height":(this.type===la?16:this.size)+"px"}},inputType(){return[In,Wn,ei].includes(this.type)?this.type:In},isChecked(){return this.value!==null?Array.isArray(this.model)?[...this.model].indexOf(this.value)>-1:this.model===this.value:this.model===!0},hasIndeterminate(){return[In,Wn].includes(this.inputType)}},mounted(){if(this.name&&this.type===In&&!Array.isArray(this.model))throw new Error("When using groups of checkboxes, the updated value will be an array.");if(this.name&&this.type===la)throw new Error("Switches are not made to be used for data sets. Please use checkboxes instead.");if(typeof this.model!="boolean"&&this.type===la)throw new Error("Switches can only be used with boolean as checked prop.")},methods:{t:ee,n:FN,onToggle(e){if(this.disabled||e.target.tagName.toLowerCase()==="a")return;if(this.type===Wn){this.model=this.value;return}if(this.type===la){this.model=!this.isChecked;return}if(typeof this.model=="boolean"){this.model=!this.model;return}const t=this.getInputsSet().filter(r=>r.checked).map(r=>r.value);t.includes(this.value)?this.model=t.filter(r=>r!==this.value):this.model=[...t,this.value]},getInputsSet(){return[...document.getElementsByName(this.name)]}}};var kR=function(){var e=this,t=e._self._c;return t(e.computedWrapperElement,e._g(e._b({tag:"component",staticClass:"checkbox-radio-switch",class:{["checkbox-radio-switch-"+e.type]:e.type,"checkbox-radio-switch--checked":e.isChecked,"checkbox-radio-switch--disabled":e.disabled,"checkbox-radio-switch--indeterminate":e.hasIndeterminate?e.indeterminate:!1,"checkbox-radio-switch--button-variant":e.buttonVariant,"checkbox-radio-switch--button-variant-v-grouped":e.buttonVariant&&e.buttonVariantGrouped==="vertical","checkbox-radio-switch--button-variant-h-grouped":e.buttonVariant&&e.buttonVariantGrouped==="horizontal","button-vue":e.isButtonType},style:e.cssVars,attrs:{id:e.wrapperId,"aria-label":e.isButtonType&&e.ariaLabel?e.ariaLabel:void 0,type:e.isButtonType?"button":null}},"component",e.isButtonType?e.$attrs:e.dataAttrs,!1),e.isButtonType?e.listeners:null),[e.isButtonType?e._e():t("input",e._g(e._b({staticClass:"checkbox-radio-switch__input",attrs:{id:e.id,"aria-labelledby":!e.isButtonType&&!e.ariaLabel?`${e.id}-label`:null,"aria-label":e.ariaLabel||void 0,disabled:e.disabled,type:e.inputType,required:e.required,name:e.name},domProps:{value:e.value,checked:e.isChecked,indeterminate:e.hasIndeterminate?e.indeterminate:null}},"input",e.nonDataAttrs,!1),e.listeners)),t("NcCheckboxContent",{staticClass:"checkbox-radio-switch__content",attrs:{id:e.id,"icon-class":"checkbox-radio-switch__icon","text-class":"checkbox-radio-switch__text",type:e.type,indeterminate:e.hasIndeterminate?e.indeterminate:!1,"button-variant":e.buttonVariant,"is-checked":e.isChecked,loading:e.loading,size:e.size},nativeOn:{click:function(r){return e.onToggle.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("icon")]},proxy:!0}],null,!0)},[e._t("default")],2)],1)},MR=[],LR=X(BR,kR,MR,!1,null,"194d90ea");const mu=LR.exports,PR={__name:"SettingsLiveView",setup(e){const t=Rr(),r=ne({get:()=>t.enabled?t.liveLog:!1,set:a=>t.setSetting("liveLog",a).catch(n=>{Sr.debug(n),Gr(me("logreader","Could not change live view setting."))})});return{__sfc:!0,settingsStore:t,liveLog:r,t:me,NcCheckboxRadioSwitch:mu,NcNoteCard:yd}}};var YR=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",[r.settingsStore.enabled?e._e():t(r.NcNoteCard,{attrs:{type:"info"}},[e._v(" "+e._s(r.t("logreader","Polling is disabled because server is not configured to log to file"))+" ")]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.liveLog,disabled:!r.settingsStore.enabled},on:{"update:checked":function(a){r.liveLog=a}}},[e._v(" "+e._s(r.t("logreader","Polling (live view)"))+" ")])],1)},IR=[],ZR=we(PR,YR,IR,!1,null,null);const UR=ZR.exports;function zR(e,t=300){let r;return(...a)=>{clearTimeout(r),r=window.setTimeout(()=>{e.apply(this,a)},t)}}const HR={__name:"SettingsLogLevels",setup(e){const t=Rr(),r=ne(()=>t.shownLevels.map(n=>`${n}`)),a=zR(n=>{const s=n.map(i=>parseInt(i));t.setSetting("shownLevels",s).catch(()=>Gr(me("logreader","Could not set logging levels to show")))},200);return{__sfc:!0,settingsStore:t,shownLevels:r,setShowLevels:a,t:me,LOGGING_LEVEL_NAMES:zi,NcCheckboxRadioSwitch:mu}}};var GR=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",[t("fieldset",[t("legend",[e._v(e._s(r.t("logreader","Filter logging levels")))]),e._l(r.LOGGING_LEVEL_NAMES,function(a,n){return t(r.NcCheckboxRadioSwitch,{key:n,attrs:{checked:r.shownLevels,value:`${n}`,name:"logging_level"},on:{"update:checked":r.setShowLevels}},[e._v(" "+e._s(a)+" ")])})],2)])},jR=[],$R=we(HR,GR,jR,!1,null,"bfae3f2f");const VR=$R.exports,WR={__name:"SettingsSetLogLevel",setup(e){const t=Rr(),r=ne(()=>`${t.logLevel}`);return{__sfc:!0,settingsStore:t,logLevel:r,setLogLevel:a=>{const n=parseInt(a);t.setSetting("logLevel",n).catch(s=>{Gr(me("logreader","Could not set logging level")),Sr.error(s)})},t:me,LOGGING_LEVEL_NAMES:zi,NcCheckboxRadioSwitch:mu}}};var QR=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("fieldset",[t("legend",[e._v(e._s(r.t("logreader","Set backend loglevel")))]),e._l(r.LOGGING_LEVEL_NAMES,function(a,n){return t(r.NcCheckboxRadioSwitch,{key:n,attrs:{checked:r.logLevel,value:`${n}`,type:"radio",name:"loglevel"},on:{"update:checked":r.setLogLevel}},[e._v(" "+e._s(a)+" ")])})],2)},KR=[],qR=we(WR,QR,KR,!1,null,"eed977e3");const JR=qR.exports,XR={__name:"SettingsDatetimeFormat",setup(e){const t=Rr(),r=ne(()=>{let s=me("logreader","Time format used for displaying the timestamp");return t.localFile&&(s+=" "+me("logreader",'(Local log files only support the "raw" time format)')),s}),a=ne(()=>t.localFile!==void 0),n=ne(()=>t.dateTimeFormat);return{__sfc:!0,settingsStore:t,fieldsetLegend:r,isLocalLogfile:a,dateTimeFormat:n,setDateTimeFormat:s=>t.setSetting("dateTimeFormat",s).catch(i=>{Sr.debug(i),Gr(me("logreader","Could not change date time format."))}),t:me,NcCheckboxRadioSwitch:mu}}};var eC=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("fieldset",[t("legend",[e._v(e._s(r.fieldsetLegend))]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.dateTimeFormat,value:"raw",name:"timestamp_format",type:"radio"},on:{"update:checked":r.setDateTimeFormat}},[e._v(" "+e._s(r.t("logreader","Raw data"))+" ")]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.dateTimeFormat,disabled:r.isLocalLogfile,value:"local",name:"timestamp_format",type:"radio"},on:{"update:checked":r.setDateTimeFormat}},[e._v(" "+e._s(r.t("logreader","Local time"))+" ")]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.dateTimeFormat,disabled:r.isLocalLogfile,value:"utc",name:"timestamp_format",type:"radio"},on:{"update:checked":r.setDateTimeFormat}},[e._v(" "+e._s(r.t("logreader","UTC time"))+" ")]),t(r.NcCheckboxRadioSwitch,{attrs:{checked:r.dateTimeFormat,disabled:r.isLocalLogfile,value:"relative",name:"timestamp_format",type:"radio"},on:{"update:checked":r.setDateTimeFormat}},[e._v(" "+e._s(r.t("logreader","Relative"))+" ")])],1)},tC=[],rC=we(XR,eC,tC,!1,null,"e1e4a744");const aC=rC.exports,nC={name:"NcVNodes",props:{vnodes:{type:[Array,Object],default:null}},render(e){return this.vnodes||this.$slots?.default||this.$scopedSlots?.default?.()}},sC=null,iC=null;var oC=X(nC,sC,iC,!1,null,null);const lC=oC.exports,Dd=1024,G1=Dd/2,Dl=e=>document.documentElement.clientWidth{Fd.value=Dl(Dd),uC.value=Dl(G1)},{passive:!0});function cC(){return Pi(Fd)}Pi(Fd);var dc={exports:{}};function kh(e,t=100,r={}){if(typeof e!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");const{immediate:a}=typeof r=="boolean"?{immediate:r}:r;let n,s,i,o,l;function u(){const m=n,g=s;return n=void 0,s=void 0,l=e.apply(m,g),l}function c(){const m=Date.now()-o;m=0?i=setTimeout(c,t-m):(i=void 0,a||(l=u()))}const p=function(...m){if(n&&this!==n&&Object.getPrototypeOf(this)===Object.getPrototypeOf(n))throw new Error("Debounced method called with different contexts of the same prototype.");n=this,s=m,o=Date.now();const g=a&&!i;return i||(i=setTimeout(c,t)),g&&(l=u()),l};return Object.defineProperty(p,"isPending",{get(){return i!==void 0}}),p.clear=()=>{i&&(clearTimeout(i),i=void 0)},p.flush=()=>{i&&p.trigger()},p.trigger=()=>{l=u(),p.clear()},p}dc.exports.debounce=kh,dc.exports=kh;var dC=dc.exports;const j1=xa(dC);st(IN);const pC={name:"NcAppSettingsDialog",components:{NcDialog:kb,NcVNodes:lC},provide(){return{registerSection:this.registerSection,unregisterSection:this.unregisterSection}},props:{open:{type:Boolean,required:!0},showNavigation:{type:Boolean,default:!1},container:{type:String,default:"body"},name:{type:String,default:""},additionalTrapElements:{type:Array,default:()=>[]}},emits:["update:open"],setup(){return{isMobile:cC()}},data(){return{selectedSection:"",linkClicked:!1,addedScrollListener:!1,scroller:null,sections:[]}},computed:{dialogProperties(){return{additionalTrapElements:this.additionalTrapElements,closeOnClickOutside:!0,class:"app-settings",container:this.container,contentClasses:"app-settings__content",size:"large",name:this.name,navigationClasses:"app-settings__navigation"}},hasNavigationIcons(){return this.sections.some(({icon:e})=>!!e)},hasNavigation(){return!(this.isMobile||!this.showNavigation)},settingsNavigationAriaLabel(){return ee("Settings navigation")}},updated(){this.$refs.settingsScroller&&(this.scroller=this.$refs.settingsScroller,this.addedScrollListener||(this.scroller.addEventListener("scroll",this.handleScroll),this.addedScrollListener=!0))},methods:{registerSection(e,t,r){if(this.sections.some(({id:n})=>e===n))throw new Error(`Duplicate section id found: ${e}. Settings navigation sections must have unique section ids.`);this.sections.some(({name:n})=>t===n)&&ge.util.warn(`Duplicate section name found: ${t}. Settings navigation sections must have unique section names.`);const a=[...this.sections,{id:e,name:t,icon:r}];this.sections=a.sort(({id:n},{id:s})=>{const i=o=>this.$slots.default?.findIndex?.(l=>l?.componentOptions?.propsData?.id===o)??-1;return i(n)-i(s)}),this.sections.length===1&&(this.selectedSection=e)},unregisterSection(e){this.sections=this.sections.filter(({id:t})=>e!==t),this.selectedSection===e&&(this.selectedSection=this.sections[0]?.id??"")},handleSettingsNavigationClick(e){this.linkClicked=!0,document.getElementById("settings-section_"+e).scrollIntoView({behavior:"smooth",inline:"nearest"}),this.selectedSection=e,setTimeout(()=>{this.linkClicked=!1},1e3)},handleCloseModal(e){e||(this.$emit("update:open",!1),this.scroller.removeEventListener("scroll",this.handleScroll),this.addedScrollListener=!1,this.scroller.scrollTop=0)},handleScroll(){this.linkClicked||this.unfocusNavigationItem()},unfocusNavigationItem:j1(function(){this.selectedSection="",document.activeElement.className.includes("navigation-list__link")&&document.activeElement.blur()},300)}};var mC=function(){var e=this,t=e._self._c;return e.open?t("NcDialog",e._b({attrs:{"navigation-aria-label":e.settingsNavigationAriaLabel},on:{"update:open":e.handleCloseModal},scopedSlots:e._u([e.hasNavigation?{key:"navigation",fn:function({isCollapsed:r}){return[r?e._e():t("ul",{staticClass:"navigation-list"},e._l(e.sections,function(a){return t("li",{key:a.id},[t("a",{class:{"navigation-list__link":!0,"navigation-list__link--active":a.id===e.selectedSection,"navigation-list__link--icon":e.hasNavigationIcons},attrs:{"aria-current":`${a.id===e.selectedSection}`,href:`#settings-section_${a.id}`,tabindex:"0"},on:{click:function(n){return n.preventDefault(),e.handleSettingsNavigationClick(a.id)},keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.handleSettingsNavigationClick(a.id)}}},[e.hasNavigationIcons?t("div",{staticClass:"navigation-list__link-icon"},[a.icon?t("NcVNodes",{attrs:{vnodes:a.icon}}):e._e()],1):e._e(),t("span",{staticClass:"navigation-list__link-text"},[e._v(" "+e._s(a.name)+" ")])])])}),0)]}}:null],null,!0)},"NcDialog",e.dialogProperties,!1),[t("div",{ref:"settingsScroller"},[e._t("default")],2)]):e._e()},hC=[],fC=X(pC,mC,hC,!1,null,"0674bd2e");const gC=fC.exports,TC={name:"NcAppSettingsSection",inject:["registerSection","unregisterSection"],props:{name:{type:String,required:!0},id:{type:String,required:!0,validator(e){return/^[a-z0-9\-_]+$/.test(e)}}},computed:{htmlId(){return"settings-section_"+this.id}},watch:{id(e,t){this.unregisterSection(t),this.registerSection(e,this.name,this.$slots?.icon)},name(e){this.unregisterSection(this.id),this.registerSection(this.id,e,this.$slots?.icon)}},mounted(){this.registerSection(this.id,this.name,this.$slots?.icon)},beforeDestroy(){this.unregisterSection(this.id)}};var vC=function(){var e=this,t=e._self._c;return t("section",{staticClass:"app-settings-section",attrs:{id:e.htmlId,"aria-labelledby":`${e.htmlId}--label`}},[t("h3",{staticClass:"app-settings-section__name",attrs:{id:`${e.htmlId}--label`}},[e._v(" "+e._s(e.name)+" ")]),e._t("default"),e._e()],2)},EC=[],AC=X(TC,vC,EC,!1,null,"e970c9f7");const yC=AC.exports,SC={__name:"AppSettingsDialog",props:{open:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){return{__sfc:!0,props:e,emit:t,onUpdateOpen:r=>t("update:open",r),t:me,SettingsActions:$O,SettingsLiveView:UR,SettingsLogLevels:VR,SettingsSetLogLevel:JR,SettingsDatetimeFormat:aC,NcAppSettingsDialog:gC,NcAppSettingsSection:yC}}};var DC=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.NcAppSettingsDialog,{attrs:{open:r.props.open,"show-navigation":!0,name:r.t("logreader","Log reader settings")},on:{"update:open":r.onUpdateOpen}},[t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-levels",name:r.t("logreader","Filter log levels")}},[t(r.SettingsLogLevels)],1),t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-set-level",name:r.t("logreader","Set log level")}},[t(r.SettingsSetLogLevel)],1),t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-time",name:r.t("logreader","Time format")}},[t(r.SettingsDatetimeFormat)],1),t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-live-view",name:r.t("logreader","Live view")}},[t(r.SettingsLiveView)],1),t(r.NcAppSettingsSection,{attrs:{id:"logreader-settings-actions",name:r.t("logreader","Download/Upload logs")}},[t(r.SettingsActions)],1)],1)},FC=[],NC=we(SC,DC,FC,!1,null,null);const wC=NC.exports,bC={__name:"IntersectionObserver",props:{options:null},emits:["intersection"],setup(e,{emit:t}){const r=e,a=oe(),n=new IntersectionObserver(s=>{s[0].isIntersecting&&t("intersection")},r.options);return Tn(()=>{a.value&&n.observe(a.value)}),gi(()=>n.disconnect()),{__sfc:!0,emit:t,props:r,observable:a,observer:n}}};var OC=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{ref:"observable"},[e._t("default")],2)},RC=[],CC=we(bC,OC,RC,!1,null,null);const xC=CC.exports,Fl=async e=>{try{return await window.navigator.clipboard.writeText(e),!0}catch{window.prompt(me("logreader","Could not copy to clipboard, please copy manually:"),e)}return!1},$1=e=>{const t=Rr(e),r=a=>Intl.DateTimeFormat(Kc(),{dateStyle:"medium",timeStyle:"medium",timeZone:t.dateTimeFormat==="utc"?"UTC":void 0}).format(new Date(a));return{formatTime:r,formatLogEntry:a=>`[${a.app}] ${zi[a.level]}: ${a.message} `+(a.method?` ${a.method} ${a.url} `:"")+me("logreader",` from {address} by {user} at {time} `,{address:a.remoteAddr||"?",user:a.user||"?",time:r(a.time)})}},_C={name:"ContentCopyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var BC=function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon content-copy-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(r){return e.$emit("click",r)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},kC=[],MC=we(_C,BC,kC,!1,null,null);const V1=MC.exports;function W1(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const r=e[t],a=typeof r;(a==="object"||a==="function")&&!Object.isFrozen(r)&&W1(r)}),e}let Mh=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Q1(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Ea(e,...t){const r=Object.create(null);for(const a in e)r[a]=e[a];return t.forEach(function(a){for(const n in a)r[n]=a[n]}),r}const LC="",Lh=e=>!!e.scope,PC=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map((a,n)=>`${a}${"_".repeat(n+1)}`)].join(" ")}return`${t}${e}`};class YC{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=Q1(t)}openNode(t){if(!Lh(t))return;const r=PC(t.scope,{prefix:this.classPrefix});this.span(r)}closeNode(t){Lh(t)&&(this.buffer+=LC)}value(){return this.buffer}span(t){this.buffer+=``}}const Ph=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Nd{constructor(){this.rootNode=Ph(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const r=Ph({scope:t});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(a=>this._walk(t,a)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{Nd._collapse(r)}))}}class IC extends Nd{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,r){const a=t.root;r&&(a.scope=`language:${r}`),this.add(a)}toHTML(){return new YC(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Di(e){return e?typeof e=="string"?e:e.source:null}function K1(e){return bn("(?=",e,")")}function ZC(e){return bn("(?:",e,")*")}function UC(e){return bn("(?:",e,")?")}function bn(...e){return e.map(t=>Di(t)).join("")}function zC(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function wd(...e){return"("+(zC(e).capture?"":"?:")+e.map(t=>Di(t)).join("|")+")"}function q1(e){return new RegExp(e.toString()+"|").exec("").length-1}function HC(e,t){const r=e&&e.exec(t);return r&&r.index===0}const GC=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function bd(e,{joinWith:t}){let r=0;return e.map(a=>{r+=1;const n=r;let s=Di(a),i="";for(;s.length>0;){const o=GC.exec(s);if(!o){i+=s;break}i+=s.substring(0,o.index),s=s.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?i+="\\"+String(Number(o[1])+n):(i+=o[0],o[0]==="("&&r++)}return i}).map(a=>`(${a})`).join(t)}const jC=/\b\B/,J1="[a-zA-Z]\\w*",Od="[a-zA-Z_]\\w*",X1="\\b\\d+(\\.\\d+)?",ev="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",tv="\\b(0b[01]+)",$C="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",VC=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=bn(t,/.*\b/,e.binary,/\b.*/)),Ea({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,a)=>{r.index!==0&&a.ignoreMatch()}},e)},Fi={begin:"\\\\[\\s\\S]",relevance:0},WC={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Fi]},QC={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Fi]},KC={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},hu=function(e,t,r={}){const a=Ea({scope:"comment",begin:e,end:t,contains:[]},r);a.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const n=wd("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return a.contains.push({begin:bn(/[ ]+/,"(",n,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),a},qC=hu("//","$"),JC=hu("/\\*","\\*/"),XC=hu("#","$"),ex={scope:"number",begin:X1,relevance:0},tx={scope:"number",begin:ev,relevance:0},rx={scope:"number",begin:tv,relevance:0},ax={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Fi,{begin:/\[/,end:/\]/,relevance:0,contains:[Fi]}]},nx={scope:"title",begin:J1,relevance:0},sx={scope:"title",begin:Od,relevance:0},ix={begin:"\\.\\s*"+Od,relevance:0},ox=function(e){return Object.assign(e,{"on:begin":(t,r)=>{r.data._beginMatch=t[1]},"on:end":(t,r)=>{r.data._beginMatch!==t[1]&&r.ignoreMatch()}})};var po=Object.freeze({__proto__:null,APOS_STRING_MODE:WC,BACKSLASH_ESCAPE:Fi,BINARY_NUMBER_MODE:rx,BINARY_NUMBER_RE:tv,COMMENT:hu,C_BLOCK_COMMENT_MODE:JC,C_LINE_COMMENT_MODE:qC,C_NUMBER_MODE:tx,C_NUMBER_RE:ev,END_SAME_AS_BEGIN:ox,HASH_COMMENT_MODE:XC,IDENT_RE:J1,MATCH_NOTHING_RE:jC,METHOD_GUARD:ix,NUMBER_MODE:ex,NUMBER_RE:X1,PHRASAL_WORDS_MODE:KC,QUOTE_STRING_MODE:QC,REGEXP_MODE:ax,RE_STARTERS_RE:$C,SHEBANG:VC,TITLE_MODE:nx,UNDERSCORE_IDENT_RE:Od,UNDERSCORE_TITLE_MODE:sx});function lx(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function ux(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function cx(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=lx,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function dx(e,t){Array.isArray(e.illegal)&&(e.illegal=wd(...e.illegal))}function px(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function mx(e,t){e.relevance===void 0&&(e.relevance=1)}const hx=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(a=>{delete e[a]}),e.keywords=r.keywords,e.begin=bn(r.beforeMatch,K1(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},fx=["of","and","for","in","not","or","if","then","parent","list","value"],gx="keyword";function rv(e,t,r=gx){const a=Object.create(null);return typeof e=="string"?n(r,e.split(" ")):Array.isArray(e)?n(r,e):Object.keys(e).forEach(function(s){Object.assign(a,rv(e[s],t,s))}),a;function n(s,i){t&&(i=i.map(o=>o.toLowerCase())),i.forEach(function(o){const l=o.split("|");a[l[0]]=[s,Tx(l[0],l[1])]})}}function Tx(e,t){return t?Number(t):vx(e)?0:1}function vx(e){return fx.includes(e.toLowerCase())}const Yh={},cn=e=>{console.error(e)},Ih=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Mn=(e,t)=>{Yh[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Yh[`${e}/${t}`]=!0)},Nl=new Error;function av(e,t,{key:r}){let a=0;const n=e[r],s={},i={};for(let o=1;o<=t.length;o++)i[o+a]=n[o],s[o+a]=!0,a+=q1(t[o-1]);e[r]=i,e[r]._emit=s,e[r]._multi=!0}function Ex(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw cn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Nl;if(typeof e.beginScope!="object"||e.beginScope===null)throw cn("beginScope must be object"),Nl;av(e,e.begin,{key:"beginScope"}),e.begin=bd(e.begin,{joinWith:""})}}function Ax(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw cn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Nl;if(typeof e.endScope!="object"||e.endScope===null)throw cn("endScope must be object"),Nl;av(e,e.end,{key:"endScope"}),e.end=bd(e.end,{joinWith:""})}}function yx(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Sx(e){yx(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Ex(e),Ax(e)}function Dx(e){function t(i,o){return new RegExp(Di(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=q1(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(bd(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const u=l.findIndex((p,m)=>m>0&&p!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class a{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new r;return this.rules.slice(o).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(o);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(o)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function n(i){const o=new a;return i.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),i.terminatorEnd&&o.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&o.addRule(i.illegal,{type:"illegal"}),o}function s(i,o){const l=i;if(i.isCompiled)return l;[ux,px,Sx,hx].forEach(c=>c(i,o)),e.compilerExtensions.forEach(c=>c(i,o)),i.__beforeBegin=null,[cx,dx,mx].forEach(c=>c(i,o)),i.isCompiled=!0;let u=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),u=i.keywords.$pattern,delete i.keywords.$pattern),u=u||/\w+/,i.keywords&&(i.keywords=rv(i.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),o&&(i.begin||(i.begin=/\B|\b/),l.beginRe=t(l.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(l.endRe=t(l.end)),l.terminatorEnd=Di(l.end)||"",i.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(l.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(c){return Fx(c==="self"?i:c)})),i.contains.forEach(function(c){s(c,l)}),i.starts&&s(i.starts,o),l.matcher=n(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ea(e.classNameAliases||{}),s(e)}function nv(e){return e?e.endsWithParent||nv(e.starts):!1}function Fx(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ea(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:nv(e)?Ea(e,{starts:e.starts?Ea(e.starts):null}):Object.isFrozen(e)?Ea(e):e}var Nx="11.11.1";class wx extends Error{constructor(t,r){super(t),this.name="HTMLInjectionError",this.html=r}}const qu=Q1,Zh=Ea,Uh=Symbol("nomatch"),bx=7,sv=function(e){const t=Object.create(null),r=Object.create(null),a=[];let n=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:IC};function l(w){return o.noHighlightRe.test(w)}function u(w){let _=w.className+" ";_+=w.parentNode?w.parentNode.className:"";const I=o.languageDetectRe.exec(_);if(I){const U=z(I[1]);return U||(Ih(s.replace("{}",I[1])),Ih("Falling back to no-highlight mode for this block.",w)),U?I[1]:"no-highlight"}return _.split(/\s+/).find(U=>l(U)||z(U))}function c(w,_,I){let U="",W="";typeof _=="object"?(U=w,I=_.ignoreIllegals,W=_.language):(Mn("10.7.0","highlight(lang, code, ...args) has been deprecated."),Mn("10.7.0",`Please use highlight(code, options) instead. diff --git a/package-lock.json b/package-lock.json index 2a36e6c41..0f076db1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "logreader", - "version": "4.0.0", + "version": "5.0.0-dev.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "logreader", - "version": "4.0.0", + "version": "5.0.0-dev.0", "dependencies": { "@highlightjs/vue-plugin": "^1.0.2", "@mdi/svg": "^7.4.47", diff --git a/package.json b/package.json index 1a0d9f2f0..1efb78ac9 100644 --- a/package.json +++ b/package.json @@ -92,5 +92,5 @@ "browserslist": [ "extends @nextcloud/browserslist-config" ], - "version": "4.0.0" + "version": "5.0.0-dev.0" }