summaryrefslogtreecommitdiffstats
path: root/dist/systemtags-init.js
blob: b198a04d9066883cfae6e09002088716dcda197b (plain)
1
2
(()=>{var t,e,n,r={44563:(t,e,n)=>{"use strict";var r=n(35810),i=n(94205),s=n(85471),o=n(82680),a=n(85168),l=n(53334);const c='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-tag-multiple" viewBox="0 0 24 24"><path d="M5.5,9A1.5,1.5 0 0,0 7,7.5A1.5,1.5 0 0,0 5.5,6A1.5,1.5 0 0,0 4,7.5A1.5,1.5 0 0,0 5.5,9M17.41,11.58C17.77,11.94 18,12.44 18,13C18,13.55 17.78,14.05 17.41,14.41L12.41,19.41C12.05,19.77 11.55,20 11,20C10.45,20 9.95,19.78 9.58,19.41L2.59,12.42C2.22,12.05 2,11.55 2,11V6C2,4.89 2.89,4 4,4H9C9.55,4 10.05,4.22 10.41,4.58L17.41,11.58M13.54,5.71L14.54,4.71L21.41,11.58C21.78,11.94 22,12.45 22,13C22,13.55 21.78,14.05 21.42,14.41L16.04,19.79L15.04,18.79L20.75,13L13.54,5.71Z" /></svg>';async function u(t){const e=await new Promise((e=>{(0,a.Ss)((0,s.$V)((()=>Promise.all([n.e(4208),n.e(7477)]).then(n.bind(n,17477)))),{nodes:t},(t=>{e(t)}))}));return Array(t.length).fill(e)}const h=new r.hY({id:"systemtags:bulk",displayName:()=>(0,l.t)("systemtags","Manage tags"),iconSvgInline:()=>c,enabled:t=>!(0,o.f)()&&0!==t.length&&!t.some((t=>!t.isDavResource))&&!t.some((t=>!(t.permissions&r.aX.UPDATE))),exec:async t=>u([t])[0],execBatch:u});var d=n(65899),p=n(61338);const f=(0,n(35947).YK)().setApp("files").detectUser().build(),g=async t=>{const e=function(){const t=(0,d.nY)("active",{state:()=>({_initialized:!1,activeNode:null,activeView:null,activeAction:null}),actions:{setActiveNode(t){if(!t)throw new Error("Use clearActiveNode to clear the active node");f.debug("Setting active node",{node:t}),this.activeNode=t},clearActiveNode(){this.activeNode=null},onDeletedNode(t){this.activeNode&&this.activeNode.source===t.source&&this.clearActiveNode()},setActiveAction(t){this.activeAction=t},clearActiveAction(){this.activeAction=null},onChangedView(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;f.debug("Setting active view",{view:t}),this.activeView=t,this.clearActiveNode()}}}),e=t(...arguments),n=(0,r.bh)();return e._initialized||((0,p.B1)("files:node:deleted",e.onDeletedNode),e._initialized=!0,e.onChangedView(n.active),n.addEventListener("updateActive",(t=>{e.onChangedView(t.detail)}))),e}((window._nc_files_pinia||(window._nc_files_pinia=(0,d.Ey)()),window._nc_files_pinia)),n=window?.OCP?.Files?.Router?.query?.dir||"/",i=e.activeNode,o=e.activeView;if(!i||!o)return void f.error("No active node or view",{node:i,view:o});if(i.status===r.zI.LOADING)return void f.debug("Node is already loading",{node:i});if(!t.enabled([i],o))return void f.debug("Action is not not available for the current context",{action:t,node:i,view:o});let c=t.id;try{c=t.displayName([i],o)}catch(e){f.error("Error while getting action display name",{action:t,error:e})}try{s.Ay.set(i,"status",r.zI.LOADING),e.setActiveAction(t);const u=await t.exec(i,o,n);if(null==u)return;if(u)return void(0,a.Te)((0,l.t)("files",'"{displayName}" action executed successfully',{displayName:c}));(0,a.Qg)((0,l.t)("files",'"{displayName}" action failed',{displayName:c}))}catch(e){f.error("Error while executing action",{action:t,error:e}),(0,a.Qg)((0,l.t)("files",'"{displayName}" action failed',{displayName:c}))}finally{s.Ay.set(i,"status",void 0),e.clearActiveAction()}};var m=n(25631),b=n(21777),y=n(82528);const v="/systemtags",E=(0,r.H4)(),w=t=>(0,r.Al)(t),A=t=>`<?xml version="1.0"?>\n<oc:filter-files ${(0,r.CP)()}>\n\t<d:prop>\n\t\t${(0,r.VX)()}\n\t</d:prop>\n\t<oc:filter-rules>\n\t\t<oc:systemtag>${t}</oc:systemtag>\n\t</oc:filter-rules>\n</oc:filter-files>`,x=function(t){return new r.vd({id:t.id,source:`${r.PY}${v}/${t.id}`,owner:String((0,b.HW)()?.uid??"anonymous"),root:v,displayname:t.displayName,permissions:r.aX.READ,attributes:{...t,"is-tag":!0}})},N="tags";var I=n(85072),O=n.n(I),C=n(97825),T=n.n(C),L=n(77659),R=n.n(L),$=n(55056),P=n.n($),_=n(10540),S=n.n(_),M=n(41113),k=n.n(M),F=n(73911),j={};j.styleTagTransform=k(),j.setAttributes=P(),j.insert=R().bind(null,"head"),j.domAPI=T(),j.insertStyleElement=S(),O()(F.A,j),F.A&&F.A.locals&&F.A.locals;var D=n(51113),V=n(12686);const B=[],G=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("li");n.classList.add("files-list__system-tag"),n.setAttribute("data-systemtag-name",t),n.textContent=t;const r=B.find((e=>e.displayName===t));if(r?.color){const t=getComputedStyle(document.body).getPropertyValue("--color-main-background").replace("#","")||((0,D.j2)()?"000000":"ffffff"),e=(0,D.W7)(`#${r.color}`,`#${t}`);n.style.setProperty("--systemtag-color",e),n.setAttribute("data-systemtag-color","true")}return e&&n.classList.add("files-list__system-tag--more"),n},X=async function(t){const e=(0,V.rA)(t),n=document.createElement("ul");if(n.classList.add("files-list__system-tags"),n.setAttribute("aria-label",(0,l.t)("files","Assigned collaborative tags")),n.setAttribute("data-systemtags-fileid",t.fileid?.toString()||""),0===e.length)return n;if(0===B.length)try{B.push(...await(0,y.un)())}catch(t){m.A.error("Failed to fetch tags",{error:t})}if(n.append(G(e[0])),2===e.length)n.append(G(e[1]));else if(e.length>1){const t=G("+"+(e.length-1),!0);t.setAttribute("title",e.slice(1).join(", ")),t.setAttribute("aria-hidden","true"),t.setAttribute("role","presentation"),n.append(t);for(const t of e.slice(1)){const e=G(t);e.classList.add("hidden-visually"),n.append(e)}}return n},U=new r.hY({id:"system-tags",displayName:()=>"",iconSvgInline:()=>"",enabled:t=>1===t.length,exec:async()=>null,renderInline:X,order:0});(0,p.B1)("systemtags:node:updated",(function(t){X(t).then((e=>{document.querySelectorAll(`[data-systemtags-fileid="${t.fileid}"]`).forEach((t=>{t.replaceWith(e)}))}))})),(0,p.B1)("systemtags:tag:created",(function(t){B.push(t)})),(0,p.B1)("systemtags:tag:deleted",(function(t){B.splice(B.findIndex((e=>e.id===t.id)),1)})),(0,p.B1)("systemtags:tag:updated",(function(t){const e=B.findIndex((e=>e.id===t.id));-1!==e&&(B[e]=t),function(t){document.querySelectorAll(`[data-systemtag-name="${t.displayName}"]`).forEach((e=>{e.style.setProperty("--systemtag-color",`#${t.color}`)}))}(t)}));const z=new r.hY({id:"systemtags:open-in-files",displayName:()=>(0,l.t)("systemtags","Open in Files"),iconSvgInline:()=>"",enabled:(t,e)=>e.id===N&&1===t.length&&!0!==t[0].attributes["is-tag"]&&t[0].type===r.pt.Folder,async exec(t){let e=t.dirname;return t.type===r.pt.Folder&&(e=t.path),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(t.fileid)},{dir:e,openfile:"true"}),null},order:-1e3,default:r.m9.HIDDEN});(0,r.Yc)("nc:system-tags"),(0,r.Gg)(h),(0,r.Gg)(U),(0,r.Gg)(z),(0,r.bh)().register(new r.Ss({id:N,name:(0,l.Tl)("systemtags","Tags"),caption:(0,l.Tl)("systemtags","List of tags and their associated files and folders."),emptyTitle:(0,l.Tl)("systemtags","No tags found"),emptyCaption:(0,l.Tl)("systemtags","Tags you have created will show up here."),icon:c,order:25,getContents:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const e=(await(0,y.un)()).filter((t=>t.userVisible));if("/"===t)return{folder:new r.vd({id:0,source:`${r.PY}${v}`,owner:(0,b.HW)()?.uid,root:v,permissions:r.aX.NONE}),contents:e.map(x)};const n=parseInt(t.split("/",2)[1]),i=e.find((t=>t.id===n));if(!i)throw new Error("Tag not found");return{folder:x(i),contents:(await E.getDirectoryContents(r.lJ,{details:!0,data:A(n),headers:{method:"REPORT"}})).data.map(w)}}})),document.addEventListener("DOMContentLoaded",(()=>{(0,i.C)("t",(()=>g(h)),{stop:!0,prevent:!0}),m.A.debug("Hotkeys registered")}))},25631:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=(0,n(35947).YK)().setApp("systemtags").detectUser().build()},82528:(t,e,n)=>{"use strict";n.d(e,{Gw:()=>d,T0:()=>f,VZ:()=>h,b0:()=>p,un:()=>c,xI:()=>u}),n(65043);var r=n(53334),i=n(8828),s=n(12686),o=n(25631),a=n(61338);n(56760);const l='<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">\n\t<d:prop>\n\t\t<oc:id />\n\t\t<oc:display-name />\n\t\t<oc:user-visible />\n\t\t<oc:user-assignable />\n\t\t<oc:can-assign />\n\t\t<d:getetag />\n\t\t<nc:color />\n\t</d:prop>\n</d:propfind>',c=async()=>{try{const{data:t}=await i.R.getDirectoryContents("/systemtags",{data:l,details:!0,glob:"/systemtags/*"});return(0,s.rL)(t)}catch(t){throw o.A.error((0,r.t)("systemtags","Failed to load tags"),{error:t}),new Error((0,r.t)("systemtags","Failed to load tags"))}},u=async t=>{const e="/systemtags/"+t;try{const{data:t}=await i.R.stat(e,{data:l,details:!0});return(0,s.rL)([t])[0]}catch(t){throw o.A.error((0,r.t)("systemtags","Failed to load tag"),{error:t}),new Error((0,r.t)("systemtags","Failed to load tag"))}},h=async t=>{const e=(0,s._3)(t);try{const{headers:n}=await i.R.customRequest("/systemtags",{method:"POST",data:e}),l=n.get("content-location");if(l)return(0,a.Ic)("systemtags:tag:created",t),(0,s.GX)(l);throw o.A.error((0,r.t)("systemtags",'Missing "Content-Location" header')),new Error((0,r.t)("systemtags",'Missing "Content-Location" header'))}catch(t){if(409===t?.response?.status)throw o.A.error((0,r.t)("systemtags","A tag with the same name already exists"),{error:t}),new Error((0,r.t)("systemtags","A tag with the same name already exists"));throw o.A.error((0,r.t)("systemtags","Failed to create tag"),{error:t}),new Error((0,r.t)("systemtags","Failed to create tag"))}},d=async t=>{const e="/systemtags/"+t.id,n=`<?xml version="1.0"?>\n\t<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:set>\n\t\t\t<d:prop>\n\t\t\t\t<oc:display-name>${t.displayName}</oc:display-name>\n\t\t\t\t<oc:user-visible>${t.userVisible}</oc:user-visible>\n\t\t\t\t<oc:user-assignable>${t.userAssignable}</oc:user-assignable>\n\t\t\t\t<nc:color>${t?.color||null}</nc:color>\n\t\t\t</d:prop>\n\t\t</d:set>\n\t</d:propertyupdate>`;try{await i.R.customRequest(e,{method:"PROPPATCH",data:n}),(0,a.Ic)("systemtags:tag:updated",t)}catch(t){throw o.A.error((0,r.t)("systemtags","Failed to update tag"),{error:t}),new Error((0,r.t)("systemtags","Failed to update tag"))}},p=async function(t,e){const n=`/systemtags/${t.id}/${e}`,r=await i.R.stat(n,{data:'<?xml version="1.0"?>\n\t<d:propfind xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:prop>\n\t\t\t<nc:object-ids />\n\t\t\t<d:getetag />\n\t\t</d:prop>\n\t</d:propfind>',details:!0});return{etag:r?.data?.props?.getetag||'""',objects:Object.values(r?.data?.props?.["object-ids"]||[]).flat()}},f=async function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const s=`/systemtags/${t.id}/${e}`;let o=`<?xml version="1.0"?>\n\t<d:propertyupdate xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t<d:set>\n\t\t\t<d:prop>\n\t\t\t\t<nc:object-ids>${n.map((t=>{let{id:e,type:n}=t;return`<nc:object-id><nc:id>${e}</nc:id><nc:type>${n}</nc:type></nc:object-id>`})).join("")}</nc:object-ids>\n\t\t\t</d:prop>\n\t\t</d:set>\n\t</d:propertyupdate>`;0===n.length&&(o='<?xml version="1.0"?>\n\t\t<d:propertyupdate xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns">\n\t\t\t<d:remove>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<nc:object-ids />\n\t\t\t\t</d:prop>\n\t\t\t</d:remove>\n\t\t</d:propertyupdate>'),await i.R.customRequest(s,{method:"PROPPATCH",data:o,headers:{"if-match":r}})}},8828:(t,e,n)=>{"use strict";n.d(e,{R:()=>a});var r=n(60669),i=n(63814),s=n(21777);const o=(0,i.dC)("dav"),a=(0,r.UU)(o),l=t=>{a.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,s.zo)(l),l((0,s.do)())},12686:(t,e,n)=>{"use strict";n.d(e,{GX:()=>o,Pq:()=>c,_3:()=>a,rA:()=>l,rL:()=>s});var r=n(71654),i=n(85471);const s=t=>t.map((t=>{let{props:e}=t;return Object.fromEntries(Object.entries(e).map((t=>{let[e,n]=t;return[(0,r.A)(e),"displayName"===(0,r.A)(e)?String(n):n]})))})),o=t=>{const e=t.indexOf("?");e>0&&(t=t.substring(0,e));const n=t.split("/");let r;do{r=n[n.length-1],n.pop()}while(!r&&n.length>0);return Number(r)},a=t=>{if("name"in t&&!("displayName"in t))return{...t};const e={...t};return e.name=e.displayName,delete e.displayName,e},l=function(t){const e=t.attributes?.["system-tags"]?.["system-tag"];return void 0===e?[]:[e].flat().map((t=>"string"==typeof t?t:t.text))},c=function(t,e){i.Ay.set(t.attributes,"system-tags",{"system-tag":e})}},51113:(t,e,n)=>{"use strict";n.d(e,{Pj:()=>o,W7:()=>a,j2:()=>s});var r=n(2520),i=n.n(r);function s(){const t=window?.matchMedia?.("(prefers-color-scheme: dark)")?.matches,e=document.body.getAttribute("data-themes")?.includes("dark");return e||t||!1}function o(t){return c(t,"#ffffff")<4.5}function a(t,e){const n=function(t){return l(t)>.6}(e),r=(s=e,o=n?t:"#ffffff",new(i())(o).mix(new(i())(s),.83).hex());var s,o;let a=c(t,r);const d=function(){const t=window?.matchMedia?.("(forced-colors: active)")?.matches,e=document.body.getAttribute("data-themes")?.includes("highcontrast");return e||t||!1}()?5.6:3.2;let p=0,f=t;const g=(n?-100:100)/255;for(;a<d&&p++<100;){const t=u(f),e=Math.max(0,Math.min(255,t.l+g));f=h({h:t.h,s:t.s,l:e}),a=c(f,r)}return f}function l(t){const e=function(t){return new(i())(t).rgb().array()}(t).map((t=>(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))),[n,r,s]=e;return.2126*n+.7152*r+.0722*s}function c(t,e){const n=l(t)+.05,r=l(e)+.05;return Math.max(n,r)/Math.min(n,r)}function u(t){const e=new(i())(t).hsl();return{h:e.color[0],s:e.color[1],l:e.color[2]}}function h(t){return new(i())(t).hex()}},15659:(t,e,n)=>{const r=n(8156),i={};for(const t of Object.keys(r))i[r[t]]=t;const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};t.exports=s;for(const t of Object.keys(s)){if(!("channels"in s[t]))throw new Error("missing channels property: "+t);if(!("labels"in s[t]))throw new Error("missing channel labels property: "+t);if(s[t].labels.length!==s[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=s[t];delete s[t].channels,delete s[t].labels,Object.defineProperty(s[t],"channels",{value:e}),Object.defineProperty(s[t],"labels",{value:n})}s.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=s-i;let a,l;s===i?a=0:e===s?a=(n-r)/o:n===s?a=2+(r-e)/o:r===s&&(a=4+(e-n)/o),a=Math.min(60*a,360),a<0&&(a+=360);const c=(i+s)/2;return l=s===i?0:c<=.5?o/(s+i):o/(2-s-i),[a,100*l,100*c]},s.rgb.hsv=function(t){let e,n,r,i,s;const o=t[0]/255,a=t[1]/255,l=t[2]/255,c=Math.max(o,a,l),u=c-Math.min(o,a,l),h=function(t){return(c-t)/6/u+.5};return 0===u?(i=0,s=0):(s=u/c,e=h(o),n=h(a),r=h(l),o===c?i=r-n:a===c?i=1/3+e-r:l===c&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*s,100*c]},s.rgb.hwb=function(t){const e=t[0],n=t[1];let r=t[2];const i=s.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,100*o,100*r]},s.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r);return[100*((1-e-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},s.rgb.keyword=function(t){const e=i[t];if(e)return e;let n,s=1/0;for(const e of Object.keys(r)){const i=(a=r[e],((o=t)[0]-a[0])**2+(o[1]-a[1])**2+(o[2]-a[2])**2);i<s&&(s=i,n=e)}var o,a;return n},s.keyword.rgb=function(t){return r[t]},s.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*e+.3576*n+.1805*r),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},s.rgb.lab=function(t){const e=s.rgb.xyz(t);let n=e[0],r=e[1],i=e[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},s.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;let i,s,o;if(0===n)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;const a=2*r-i,l=[0,0,0];for(let t=0;t<3;t++)s=e+1/3*-(t-1),s<0&&s++,s>1&&s--,o=6*s<1?a+6*(i-a)*s:2*s<1?i:3*s<2?a+(i-a)*(2/3-s)*6:a,l[t]=255*o;return l},s.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,r=t[2]/100,i=n;const s=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s,[e,100*(0===r?2*i/(s+i):2*n/(r+n)),(r+n)/2*100]},s.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let r=t[2]/100;const i=Math.floor(e)%6,s=e-Math.floor(e),o=255*r*(1-n),a=255*r*(1-n*s),l=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,l,o];case 1:return[a,r,o];case 2:return[o,r,l];case 3:return[o,a,r];case 4:return[l,o,r];case 5:return[r,o,a]}},s.hsv.hsl=function(t){const e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01);let s,o;o=(2-n)*r;const a=(2-n)*i;return s=n*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,100*s,100*o]},s.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,r=t[2]/100;const i=n+r;let s;i>1&&(n/=i,r/=i);const o=Math.floor(6*e),a=1-r;s=6*e-o,1&o&&(s=1-s);const l=n+s*(a-n);let c,u,h;switch(o){default:case 6:case 0:c=a,u=l,h=n;break;case 1:c=l,u=a,h=n;break;case 2:c=n,u=a,h=l;break;case 3:c=n,u=l,h=a;break;case 4:c=l,u=n,h=a;break;case 5:c=a,u=n,h=l}return[255*c,255*u,255*h]},s.cmyk.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},s.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100;let i,s,o;return i=3.2406*e+-1.5372*n+-.4986*r,s=-.9689*e+1.8758*n+.0415*r,o=.0557*e+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[255*i,255*s,255*o]},s.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];return e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(e-n),200*(n-r)]},s.lab.xyz=function(t){let e,n,r;n=(t[0]+16)/116,e=t[1]/500+n,r=n-t[2]/200;const i=n**3,s=e**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,e=s>.008856?s:(e-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,e*=95.047,n*=100,r*=108.883,[e,n,r]},s.lab.lch=function(t){const e=t[0],n=t[1],r=t[2];let i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[e,Math.sqrt(n*n+r*r),i]},s.lch.lab=function(t){const e=t[0],n=t[1],r=t[2]/360*2*Math.PI;return[e,n*Math.cos(r),n*Math.sin(r)]},s.rgb.ansi16=function(t,e=null){const[n,r,i]=t;let o=null===e?s.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),0===o)return 30;let a=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===o&&(a+=60),a},s.hsv.ansi16=function(t){return s.rgb.ansi16(s.hsv.rgb(t),t[2])},s.rgb.ansi256=function(t){const e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},s.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},s.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},s.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},s.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];3===e[0].length&&(n=n.split("").map((t=>t+t)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},s.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),o=i-s;let a,l;return a=o<1?s/(1-o):0,l=o<=0?0:i===e?(n-r)/o%6:i===n?2+(r-e)/o:4+(e-n)/o,l/=6,l%=1,[360*l,100*o,100*a]},s.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],100*r,100*i]},s.hsv.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=e*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},s.hcg.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;if(0===n)return[255*r,255*r,255*r];const i=[0,0,0],s=e%1*6,o=s%1,a=1-o;let l=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[255*(n*i[0]+l),255*(n*i[1]+l),255*(n*i[2]+l)]},s.hcg.hsv=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);let r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},s.hcg.hsl=function(t){const e=t[1]/100,n=t[2]/100*(1-e)+.5*e;let r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},s.hcg.hwb=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},s.hwb.hcg=function(t){const e=t[1]/100,n=1-t[2]/100,r=n-e;let i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},s.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},s.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},s.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},s.gray.hsl=function(t){return[0,0,t[0]]},s.gray.hsv=s.gray.hsl,s.gray.hwb=function(t){return[0,100,t[0]]},s.gray.cmyk=function(t){return[0,0,0,t[0]]},s.gray.lab=function(t){return[t[0],0,0]},s.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},s.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}},10734:(t,e,n)=>{const r=n(15659),i=n(8507),s={};Object.keys(r).forEach((t=>{s[t]={},Object.defineProperty(s[t],"channels",{value:r[t].channels}),Object.defineProperty(s[t],"labels",{value:r[t].labels});const e=i(t);Object.keys(e).forEach((n=>{const r=e[n];s[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const r=t(e);if("object"==typeof r)for(let t=r.length,e=0;e<t;e++)r[e]=Math.round(r[e]);return r};return"conversion"in t&&(e.conversion=t.conversion),e}(r),s[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(r)}))})),t.exports=s},8507:(t,e,n)=>{const r=n(15659);function i(t,e){return function(n){return e(t(n))}}function s(t,e){const n=[e[t].parent,t];let s=r[e[t].parent][t],o=e[t].parent;for(;e[o].parent;)n.unshift(e[o].parent),s=i(r[e[o].parent][o],s),o=e[o].parent;return s.conversion=n,s}t.exports=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(r);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),i=Object.keys(r[t]);for(let r=i.length,s=0;s<r;s++){const r=i[s],o=e[r];-1===o.distance&&(o.distance=e[t].distance+1,o.parent=t,n.unshift(r))}}return e}(t),n={},i=Object.keys(e);for(let t=i.length,r=0;r<t;r++){const t=i[r];null!==e[t].parent&&(n[t]=s(t,e))}return n}},8156:t=>{"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},28854:(t,e,n)=>{var r=n(8156),i=n(19872),s=Object.hasOwnProperty,o=Object.create(null);for(var a in r)s.call(r,a)&&(o[r[a]]=a);var l=t.exports={to:{},get:{}};function c(t,e,n){return Math.min(Math.max(e,t),n)}function u(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}l.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=l.get.hsl(t),n="hsl";break;case"hwb":e=l.get.hwb(t),n="hwb";break;default:e=l.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},l.get.rgb=function(t){if(!t)return null;var e,n,i,o=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=e[2],e=e[1],n=0;n<3;n++){var a=2*n;o[n]=parseInt(e.slice(a,a+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(i=(e=e[1])[3],n=0;n<3;n++)o[n]=parseInt(e[n]+e[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(e[n+1],0);e[4]&&(e[5]?o[3]=.01*parseFloat(e[4]):o[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:s.call(r,e[1])?((o=r[e[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?o[3]=.01*parseFloat(e[4]):o[3]=parseFloat(e[4]))}for(n=0;n<3;n++)o[n]=c(o[n],0,255);return o[3]=c(o[3],0,1),o},l.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,c(parseFloat(e[2]),0,100),c(parseFloat(e[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},l.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,c(parseFloat(e[2]),0,100),c(parseFloat(e[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},l.to.hex=function(){var t=i(arguments);return"#"+u(t[0])+u(t[1])+u(t[2])+(t[3]<1?u(Math.round(255*t[3])):"")},l.to.rgb=function(){var t=i(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},l.to.rgb.percent=function(){var t=i(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},l.to.hsl=function(){var t=i(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},l.to.hwb=function(){var t=i(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},l.to.keyword=function(t){return o[t.slice(0,3)]}},2520:(t,e,n)=>{const r=n(28854),i=n(10734),s=["keyword","gray","hex"],o={};for(const t of Object.keys(i))o[[...i[t].labels].sort().join("")]=t;const a={};function l(t,e){if(!(this instanceof l))return new l(t,e);if(e&&e in s&&(e=null),e&&!(e in i))throw new Error("Unknown model: "+e);let n,c;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof l)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=r.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,c=i[this.model].channels,this.color=e.value.slice(0,c),this.valpha="number"==typeof e.value[c]?e.value[c]:1}else if(t.length>0){this.model=e||"rgb",c=i[this.model].channels;const n=Array.prototype.slice.call(t,0,c);this.color=d(n,c),this.valpha="number"==typeof t[c]?t[c]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const r=e.sort().join("");if(!(r in o))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=o[r];const{labels:s}=i[this.model],a=[];for(n=0;n<s.length;n++)a.push(t[s[n]]);this.color=d(a)}if(a[this.model])for(c=i[this.model].channels,n=0;n<c;n++){const t=a[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}l.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in r.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return r.to[e.model](n)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),n=1===e.valpha?e.color:[...e.color,this.valpha];return r.to.rgb.percent(n)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=i[this.model],{labels:n}=i[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new l([...this.color.map(c(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new l([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:u("rgb",0,h(255)),green:u("rgb",1,h(255)),blue:u("rgb",2,h(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:u("hsl",1,h(100)),lightness:u("hsl",2,h(100)),saturationv:u("hsv",1,h(100)),value:u("hsv",2,h(100)),chroma:u("hcg",1,h(100)),gray:u("hcg",2,h(100)),white:u("hwb",1,h(100)),wblack:u("hwb",2,h(100)),cyan:u("cmyk",0,h(100)),magenta:u("cmyk",1,h(100)),yellow:u("cmyk",2,h(100)),black:u("cmyk",3,h(100)),x:u("xyz",0,h(95.047)),y:u("xyz",1,h(100)),z:u("xyz",2,h(108.833)),l:u("lab",0,h(100)),a:u("lab",1),b:u("lab",2),keyword(t){return void 0!==t?new l(t):i[this.model].keyword(this.color)},hex(t){return void 0!==t?new l(t):r.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new l(t);const e=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),r.to.hex(e)+n},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[n,r]of t.entries()){const t=r/255;e[n]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return l.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const n=t.rgb(),r=this.rgb(),i=void 0===e?.5:e,s=2*i-1,o=n.alpha()-r.alpha(),a=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,c=1-a;return l.rgb(a*n.red()+c*r.red(),a*n.green()+c*r.green(),a*n.blue()+c*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const t of Object.keys(i)){if(s.includes(t))continue;const{channels:e}=i[t];l.prototype[t]=function(...e){return this.model===t?new l(this):e.length>0?new l(e,t):new l([...(n=i[this.model][t].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],t);var n},l[t]=function(...n){let r=n[0];return"number"==typeof r&&(r=d(n,e)),new l(r,t)}}function c(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function u(t,e,n){t=Array.isArray(t)?t:[t];for(const r of t)(a[r]||(a[r]=[]))[e]=n;return t=t[0],function(r){let i;return void 0!==r?(n&&(r=n(r)),i=this[t](),i.color[e]=r,i):(i=this[t]().color[e],n&&(i=n(i)),i)}}function h(t){return function(e){return Math.max(0,Math.min(t,e))}}function d(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}t.exports=l},73911:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(71354),i=n.n(r),s=n(76314),o=n.n(s)()(i());o.push([t.id,".files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-inline-start:5px}.files-list__system-tag[data-systemtag-color]{border-color:var(--systemtag-color);color:var(--systemtag-color);border-width:2px;line-height:18px}@media(min-width: 512px){.files-list__system-tags{display:flex}}","",{version:3,sources:["webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss"],names:[],mappings:"AAKA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,uBAAA,CAID,8CACC,mCAAA,CACA,4BAAA,CACA,gBAAA,CACA,gBAAA,CAIF,yBACC,yBACC,YAAA,CAAA",sourcesContent:["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n.files-list__system-tags {\n\t--min-size: 32px;\n\tdisplay: none;\n\tjustify-content: center;\n\talign-items: center;\n\tmin-width: calc(var(--min-size) * 2);\n\tmax-width: 300px;\n}\n\n.files-list__system-tag {\n\tpadding: 5px 10px;\n\tborder: 1px solid;\n\tborder-radius: var(--border-radius-pill);\n\tborder-color: var(--color-border);\n\tcolor: var(--color-text-maxcontrast);\n\theight: var(--min-size);\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tline-height: 20px; // min-size - 2 * 5px padding - 2 * 1px border\n\ttext-align: center;\n\n\t&--more {\n\t\toverflow: visible;\n\t\ttext-overflow: initial;\n\t}\n\n\t// Proper spacing if multiple shown\n\t& + .files-list__system-tag {\n\t\tmargin-inline-start: 5px;\n\t}\n\n\t// With color\n\t&[data-systemtag-color] {\n\t\tborder-color: var(--systemtag-color);\n\t\tcolor: var(--systemtag-color);\n\t\tborder-width: 2px;\n\t\tline-height: 18px; // min-size - 2 * 5px padding - 2 * 2px border\n\t}\n}\n\n@media (min-width: 512px) {\n\t.files-list__system-tags {\n\t\tdisplay: flex;\n\t}\n}\n"],sourceRoot:""}]);const a=o},19872:(t,e,n)=>{"use strict";var r=n(83496),i=Array.prototype.concat,s=Array.prototype.slice,o=t.exports=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var a=t[n];r(a)?e=i.call(e,s.call(a)):e.push(a)}return e};o.wrap=function(t){return function(){return t(o(arguments))}}},83496:t=>{t.exports=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},42634:()=>{},63779:()=>{},77199:()=>{},59169:()=>{},86833:()=>{},35810:(t,e,n)=>{"use strict";n.d(e,{Al:()=>r.r,CP:()=>r.k,Gg:()=>c,H4:()=>r.c,PY:()=>r.b,Q$:()=>r.e,R3:()=>r.n,Ss:()=>J,VL:()=>r.l,VX:()=>r.j,Yc:()=>r.i,aX:()=>r.P,bh:()=>m,hY:()=>l,lJ:()=>r.d,m9:()=>a,pt:()=>r.F,ur:()=>f,v7:()=>d,vd:()=>r.s,zI:()=>r.t});var r=n(68251),i=(n(43627),n(53334)),s=n(380),o=n(65606),a=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(a||{});class l{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(void 0!==t.destructive&&"boolean"!=typeof t.destructive)throw new Error("Invalid destructive flag");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(a).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}const c=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],r.o.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?r.o.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};Error;const u=["B","KB","MB","GB","TB","PB"],h=["B","KiB","MiB","GiB","TiB","PiB"];function d(t,e=!1,n=!1,r=!1){n=n&&!r,"string"==typeof t&&(t=Number(t));let s=t>0?Math.floor(Math.log(t)/Math.log(r?1e3:1024)):0;s=Math.min((n?h.length:u.length)-1,s);const o=n?h[s]:u[s];let a=(t/Math.pow(r?1e3:1024,s)).toFixed(1);return!0===e&&0===s?("0.0"!==a?"< 1 ":"0 ")+(n?h[1]:u[1]):(a=s<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,i.lO)()),a+" "+o)}function p(t){return t instanceof Date?t.toISOString():String(t)}function f(t,e={}){const n={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,n){n=n??[];const r=(e=e??[t=>t]).map(((t,e)=>"asc"===(n[e]??"asc")?1:-1)),s=Intl.Collator([(0,i.Z0)(),(0,i.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,n)=>{for(const[i,o]of e.entries()){const e=s.compare(p(o(t)),p(o(n)));if(0!==e)return e*r[i]}return 0}))}(t,[...n.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...n.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==n.sortingMode?[t=>t[n.sortingMode]]:[],t=>{return(e=t.displayname||t.attributes?.displayname||t.basename).lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],..."mtime"===n.sortingMode?["asc"===n.sortingOrder?"desc":"asc"]:[],..."mtime"!==n.sortingMode&&"basename"!==n.sortingMode?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder])}class g extends s.m{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&(this._views.splice(e,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(t){this._currentView=t;const e=new CustomEvent("updateActive",{detail:t});this.dispatchTypedEvent("updateActive",e)}get active(){return this._currentView}get views(){return this._views}}const m=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new g,r.o.debug("Navigation service initialized")),window._nc_navigation};class b{_column;constructor(t){y(t),this._column=t}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const y=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var v,E,w={},A={};function x(){return v||(v=1,function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,n){if(e){const r=Object.keys(e),i=r.length;for(let s=0;s<i;s++)t[r[s]]="strict"===n?[e[r[s]]]:e[r[s]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){return!(null==r.exec(t))},t.getAllMatches=function(t,e){const n=[];let r=e.exec(t);for(;r;){const i=[];i.startIndex=e.lastIndex-r[0].length;const s=r.length;for(let t=0;t<s;t++)i.push(r[t]);n.push(i),r=e.exec(t)}return n},t.nameRegexp=n}(A)),A}function N(){if(E)return w;E=1;const t=x(),e={allowBooleanAttributes:!1,unpairedTags:[]};function n(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function r(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const r=t.substr(n,e-n);if(e>5&&"xml"===r)return h("InvalidXml","XML declaration allowed only at the start of the document.",p(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function i(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}w.validate=function(s,o){o=Object.assign({},e,o);const l=[];let d=!1,f=!1;"\ufeff"===s[0]&&(s=s.substr(1));for(let e=0;e<s.length;e++)if("<"===s[e]&&"?"===s[e+1]){if(e+=2,e=r(s,e),e.err)return e}else{if("<"!==s[e]){if(n(s[e]))continue;return h("InvalidChar","char '"+s[e]+"' is not expected.",p(s,e))}{let m=e;if(e++,"!"===s[e]){e=i(s,e);continue}{let b=!1;"/"===s[e]&&(b=!0,e++);let y="";for(;e<s.length&&">"!==s[e]&&" "!==s[e]&&"\t"!==s[e]&&"\n"!==s[e]&&"\r"!==s[e];e++)y+=s[e];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),e--),g=y,!t.isName(g)){let t;return t=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",h("InvalidTag",t,p(s,e))}const v=a(s,e);if(!1===v)return h("InvalidAttr","Attributes for '"+y+"' have open quote.",p(s,e));let E=v.value;if(e=v.index,"/"===E[E.length-1]){const t=e-E.length;E=E.substring(0,E.length-1);const n=c(E,o);if(!0!==n)return h(n.err.code,n.err.msg,p(s,t+n.err.line));d=!0}else if(b){if(!v.tagClosed)return h("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",p(s,e));if(E.trim().length>0)return h("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",p(s,m));if(0===l.length)return h("InvalidTag","Closing tag '"+y+"' has not been opened.",p(s,m));{const t=l.pop();if(y!==t.tagName){let e=p(s,t.tagStartPos);return h("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+e.line+", col "+e.col+") instead of closing tag '"+y+"'.",p(s,m))}0==l.length&&(f=!0)}}else{const t=c(E,o);if(!0!==t)return h(t.err.code,t.err.msg,p(s,e-E.length+t.err.line));if(!0===f)return h("InvalidXml","Multiple possible root nodes found.",p(s,e));-1!==o.unpairedTags.indexOf(y)||l.push({tagName:y,tagStartPos:m}),d=!0}for(e++;e<s.length;e++)if("<"===s[e]){if("!"===s[e+1]){e++,e=i(s,e);continue}if("?"!==s[e+1])break;if(e=r(s,++e),e.err)return e}else if("&"===s[e]){const t=u(s,e);if(-1==t)return h("InvalidChar","char '&' is not expected.",p(s,e));e=t}else if(!0===f&&!n(s[e]))return h("InvalidXml","Extra text at the end",p(s,e));"<"===s[e]&&e--}}}var g;return d?1==l.length?h("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",p(s,l[0].tagStartPos)):!(l.length>0)||h("InvalidXml","Invalid '"+JSON.stringify(l.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const s='"',o="'";function a(t,e){let n="",r="",i=!1;for(;e<t.length;e++){if(t[e]===s||t[e]===o)""===r?r=t[e]:r!==t[e]||(r="");else if(">"===t[e]&&""===r){i=!0;break}n+=t[e]}return""===r&&{value:n,index:e,tagClosed:i}}const l=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function c(e,n){const r=t.getAllMatches(e,l),i={};for(let t=0;t<r.length;t++){if(0===r[t][1].length)return h("InvalidAttr","Attribute '"+r[t][2]+"' has no space in starting.",f(r[t]));if(void 0!==r[t][3]&&void 0===r[t][4])return h("InvalidAttr","Attribute '"+r[t][2]+"' is without value.",f(r[t]));if(void 0===r[t][3]&&!n.allowBooleanAttributes)return h("InvalidAttr","boolean attribute '"+r[t][2]+"' is not allowed.",f(r[t]));const e=r[t][2];if(!d(e))return h("InvalidAttr","Attribute '"+e+"' is an invalid name.",f(r[t]));if(i.hasOwnProperty(e))return h("InvalidAttr","Attribute '"+e+"' is repeated.",f(r[t]));i[e]=1}return!0}function u(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function h(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function d(e){return t.isName(e)}function p(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function f(t){return t.startIndex+t[1].length}return w}var I,O,C,T,L,R,$,P,_,S,M,k={};function F(){return _?P:(_=1,P=function(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1})}var j,D,V,B,G,X,U,z,q,H={};function Y(){if(j)return H;function t(i,s,o){let a;const l={};for(let c=0;c<i.length;c++){const u=i[c],h=e(u);let d="";if(d=void 0===o?h:o+"."+h,h===s.textNodeName)void 0===a?a=u[h]:a+=""+u[h];else{if(void 0===h)continue;if(u[h]){let e=t(u[h],s,d);const i=r(e,s);u[":@"]?n(e,u[":@"],d,s):1!==Object.keys(e).length||void 0===e[s.textNodeName]||s.alwaysCreateTextNode?0===Object.keys(e).length&&(s.alwaysCreateTextNode?e[s.textNodeName]="":e=""):e=e[s.textNodeName],void 0!==l[h]&&l.hasOwnProperty(h)?(Array.isArray(l[h])||(l[h]=[l[h]]),l[h].push(e)):s.isArray(h,d,i)?l[h]=[e]:l[h]=e}}}return"string"==typeof a?a.length>0&&(l[s.textNodeName]=a):void 0!==a&&(l[s.textNodeName]=a),l}function e(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function n(t,e,n,r){if(e){const i=Object.keys(e),s=i.length;for(let o=0;o<s;o++){const s=i[o];r.isArray(s,n+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function r(t,e){const{textNodeName:n}=e,r=Object.keys(t).length;return 0===r||!(1!==r||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}return j=1,H.prettify=function(e,n){return t(e,n)},H}function K(){if(V)return D;V=1;const{buildOptions:t}=function(){if(I)return k;I=1;const t={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};return k.buildOptions=function(e){return Object.assign({},t,e)},k.defaultOptions=t,k}(),e=function(){if(M)return S;M=1;const t=x(),e=C?O:(C=1,O=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}),n=function(){if(L)return T;L=1;const t=x();function e(t,e){let n="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)n+=t[e];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=t[e++];let i="";for(;e<t.length&&t[e]!==r;e++)i+=t[e];return[n,i,e]}function n(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function r(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function i(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function s(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function o(e){if(t.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}return T=function(t,a){const l={};if("O"!==t[a+3]||"C"!==t[a+4]||"T"!==t[a+5]||"Y"!==t[a+6]||"P"!==t[a+7]||"E"!==t[a+8])throw new Error("Invalid Tag instead of DOCTYPE");{a+=9;let c=1,u=!1,h=!1,d="";for(;a<t.length;a++)if("<"!==t[a]||h)if(">"===t[a]){if(h?"-"===t[a-1]&&"-"===t[a-2]&&(h=!1,c--):c--,0===c)break}else"["===t[a]?u=!0:d+=t[a];else{if(u&&n(t,a)){let n,r;a+=7,[n,r,a]=e(t,a+1),-1===r.indexOf("&")&&(l[o(n)]={regx:RegExp(`&${n};`,"g"),val:r})}else u&&r(t,a)||u&&i(t,a)?a+=8:u&&s(t,a)?a+=9:h=!0;c++,d=""}if(0!==c)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:a}}}(),r=function(){if($)return R;$=1;const t=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return R=function(r,i={}){if(i=Object.assign({},n,i),!r||"string"!=typeof r)return r;let s=r.trim();if(void 0!==i.skipLike&&i.skipLike.test(s))return r;if(i.hex&&t.test(s))return Number.parseInt(s,16);{const t=e.exec(s);if(t){const e=t[1],n=t[2];let a=(o=t[3])&&-1!==o.indexOf(".")?("."===(o=o.replace(/0+$/,""))?o="0":"."===o[0]?o="0"+o:"."===o[o.length-1]&&(o=o.substr(0,o.length-1)),o):o;const l=t[4]||t[6];if(!i.leadingZeros&&n.length>0&&e&&"."!==s[2])return r;if(!i.leadingZeros&&n.length>0&&!e&&"."!==s[1])return r;{const t=Number(s),o=""+t;return-1!==o.search(/[eE]/)||l?i.eNotation?t:r:-1!==s.indexOf(".")?"0"===o&&""===a||o===a||e&&o==="-"+a?t:r:n?a===o||e+a===o?t:r:s===o||s===e+o?t:r}}return r}var o}}(),i=F();function s(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:t[r]}}}function o(t,e,n,r,i,s,o){if(void 0!==t&&(this.options.trimValues&&!r&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const r=this.options.tagValueProcessor(e,t,n,i,s);return null==r?t:typeof r!=typeof t||r!==t?r:this.options.trimValues||t.trim()===t?y(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function a(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(e,n,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const r=t.getAllMatches(e,l),i=r.length,s={};for(let t=0;t<i;t++){const e=this.resolveNameSpace(r[t][1]);if(this.ignoreAttributesFn(e,n))continue;let i=r[t][4],o=this.options.attributeNamePrefix+e;if(e.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const t=this.options.attributeValueProcessor(e,i,n);s[o]=null==t?i:typeof t!=typeof i||t!==i?t:y(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[o]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=s,t}return s}}const u=function(t){t=t.replace(/\r\n?/g,"\n");const r=new e("!xml");let i=r,s="",o="";for(let a=0;a<t.length;a++)if("<"===t[a])if("/"===t[a+1]){const e=g(t,">",a,"Closing Tag is not closed.");let n=t.substring(a+2,e).trim();if(this.options.removeNSPrefix){const t=n.indexOf(":");-1!==t&&(n=n.substr(t+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),i&&(s=this.saveTextToParentTag(s,i,o));const r=o.substring(o.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: </${n}>`);let l=0;r&&-1!==this.options.unpairedTags.indexOf(r)?(l=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=o.lastIndexOf("."),o=o.substring(0,l),i=this.tagsNodeStack.pop(),s="",a=e}else if("?"===t[a+1]){let n=m(t,a,!1,"?>");if(!n)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,i,o),this.options.ignoreDeclaration&&"?xml"===n.tagName||this.options.ignorePiTags);else{const t=new e(n.tagName);t.add(this.options.textNodeName,""),n.tagName!==n.tagExp&&n.attrExpPresent&&(t[":@"]=this.buildAttributesMap(n.tagExp,o,n.tagName)),this.addChild(i,t,o)}a=n.closeIndex+1}else if("!--"===t.substr(a+1,3)){const e=g(t,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const n=t.substring(a+4,e-2);s=this.saveTextToParentTag(s,i,o),i.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}a=e}else if("!D"===t.substr(a+1,2)){const e=n(t,a);this.docTypeEntities=e.entities,a=e.i}else if("!["===t.substr(a+1,2)){const e=g(t,"]]>",a,"CDATA is not closed.")-2,n=t.substring(a+9,e);s=this.saveTextToParentTag(s,i,o);let r=this.parseTextData(n,i.tagname,o,!0,!1,!0,!0);null==r&&(r=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):i.add(this.options.textNodeName,r),a=e+2}else{let n=m(t,a,this.options.removeNSPrefix),l=n.tagName;const c=n.rawTagName;let u=n.tagExp,h=n.attrExpPresent,d=n.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),i&&s&&"!xml"!==i.tagname&&(s=this.saveTextToParentTag(s,i,o,!1));const p=i;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(i=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),l!==r.tagname&&(o+=o?"."+l:l),this.isItStopNode(this.options.stopNodes,o,l)){let r="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),u=l):u=u.substr(0,u.length-1),a=n.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))a=n.closeIndex;else{const e=this.readStopNodeData(t,c,d+1);if(!e)throw new Error(`Unexpected end of ${c}`);a=e.i,r=e.tagContent}const s=new e(l);l!==u&&h&&(s[":@"]=this.buildAttributesMap(u,o,l)),r&&(r=this.parseTextData(r,l,o,!0,h,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),s.add(this.options.textNodeName,r),this.addChild(i,s,o)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),u=l):u=u.substr(0,u.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const t=new e(l);l!==u&&h&&(t[":@"]=this.buildAttributesMap(u,o,l)),this.addChild(i,t,o),o=o.substr(0,o.lastIndexOf("."))}else{const t=new e(l);this.tagsNodeStack.push(i),l!==u&&h&&(t[":@"]=this.buildAttributesMap(u,o,l)),this.addChild(i,t,o),i=t}s="",a=d}}else s+=t[a];return r.child};function h(t,e,n){const r=this.options.updateTag(e.tagname,n,e[":@"]);!1===r||("string"==typeof r?(e.tagname=r,t.addChild(e)):t.addChild(e))}const d=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function p(t,e,n,r){return t&&(void 0===r&&(r=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,r))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function f(t,e,n){const r="*."+n;for(const n in t){const i=t[n];if(r===i||e===i)return!0}return!1}function g(t,e,n,r){const i=t.indexOf(e,n);if(-1===i)throw new Error(r);return i+e.length-1}function m(t,e,n,r=">"){const i=function(t,e,n=">"){let r,i="";for(let s=e;s<t.length;s++){let e=t[s];if(r)e===r&&(r="");else if('"'===e||"'"===e)r=e;else if(e===n[0]){if(!n[1])return{data:i,index:s};if(t[s+1]===n[1])return{data:i,index:s}}else"\t"===e&&(e=" ");i+=e}}(t,e+1,r);if(!i)return;let s=i.data;const o=i.index,a=s.search(/\s/);let l=s,c=!0;-1!==a&&(l=s.substring(0,a),s=s.substring(a+1).trimStart());const u=l;if(n){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),c=l!==i.data.substr(t+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:c,rawTagName:u}}function b(t,e,n){const r=n;let i=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const s=g(t,">",n,`${e} is not closed`);if(t.substring(n+2,s).trim()===e&&(i--,0===i))return{tagContent:t.substring(r,n),i:s};n=s}else if("?"===t[n+1])n=g(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=g(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=g(t,"]]>",n,"StopNode is not closed.")-2;else{const r=m(t,n,">");r&&((r&&r.tagName)===e&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function y(e,n,i){if(n&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&r(e,i)}return t.isExist(e)?e:""}return S=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=s,this.parseXml=u,this.parseTextData=o,this.resolveNameSpace=a,this.buildAttributesMap=c,this.isItStopNode=f,this.replaceEntitiesValue=d,this.readStopNodeData=b,this.saveTextToParentTag=p,this.addChild=h,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}}(),{prettify:n}=Y(),r=N();return D=class{constructor(e){this.externalEntities={},this.options=t(e)}parse(t,i){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(i){!0===i&&(i={});const e=r.validate(t,i);if(!0!==e)throw Error(`${e.err.msg}:${e.err.line}:${e.err.col}`)}const s=new e(this.options);s.addExternalEntities(this.externalEntities);const o=s.parseXml(t);return this.options.preserveOrder||void 0===o?o:n(o,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}}function Z(){if(G)return B;function t(s,o,a,l){let c="",u=!1;for(let h=0;h<s.length;h++){const d=s[h],p=e(d);if(void 0===p)continue;let f="";if(f=0===a.length?p:`${a}.${p}`,p===o.textNodeName){let t=d[p];r(f,o)||(t=o.tagValueProcessor(p,t),t=i(t,o)),u&&(c+=l),c+=t,u=!1;continue}if(p===o.cdataPropName){u&&(c+=l),c+=`<![CDATA[${d[p][0][o.textNodeName]}]]>`,u=!1;continue}if(p===o.commentPropName){c+=l+`\x3c!--${d[p][0][o.textNodeName]}--\x3e`,u=!0;continue}if("?"===p[0]){const t=n(d[":@"],o),e="?xml"===p?"":l;let r=d[p][0][o.textNodeName];r=0!==r.length?" "+r:"",c+=e+`<${p}${r}${t}?>`,u=!0;continue}let g=l;""!==g&&(g+=o.indentBy);const m=l+`<${p}${n(d[":@"],o)}`,b=t(d[p],o,f,g);-1!==o.unpairedTags.indexOf(p)?o.suppressUnpairedNode?c+=m+">":c+=m+"/>":b&&0!==b.length||!o.suppressEmptyNode?b&&b.endsWith(">")?c+=m+`>${b}${l}</${p}>`:(c+=m+">",b&&""!==l&&(b.includes("/>")||b.includes("</"))?c+=l+o.indentBy+b+l:c+=b,c+=`</${p}>`):c+=m+"/>",u=!0}return c}function e(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(t.hasOwnProperty(r)&&":@"!==r)return r}}function n(t,e){let n="";if(t&&!e.ignoreAttributes)for(let r in t){if(!t.hasOwnProperty(r))continue;let s=e.attributeValueProcessor(r,t[r]);s=i(s,e),!0===s&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}="${s}"`}return n}function r(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let r in e.stopNodes)if(e.stopNodes[r]===t||e.stopNodes[r]==="*."+n)return!0;return!1}function i(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}return G=1,B=function(e,n){let r="";return n.format&&n.indentBy.length>0&&(r="\n"),t(e,n,"",r)}}var W=function(){if(q)return z;q=1;const t=N(),e=K(),n=function(){if(U)return X;U=1;const t=Z(),e=F(),n={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:"  ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(t){this.options=Object.assign({},n,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=e(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=i,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(t,e,n,r){const i=this.j2x(t,n+1,r.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function s(t){return this.options.indentBy.repeat(t)}function o(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}return r.prototype.build=function(e){return this.options.preserveOrder?t(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},r.prototype.j2x=function(t,e,n){let r="",i="";const s=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(i+="");else if(null===t[o])this.isAttribute(o)?i+="":"?"===o[0]?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)i+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,s))r+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const r=t[o].length;let s="",a="";for(let l=0;l<r;l++){const r=t[o][l];if(void 0===r);else if(null===r)"?"===o[0]?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const t=this.j2x(r,e+1,n.concat(o));s+=t.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else s+=this.processTextOrObjNode(r,o,e,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(o,r);t=this.replaceEntitiesValue(t),s+=t}else s+=this.buildTextValNode(r,o,"",e)}this.options.oneListGroup&&(s=this.buildObjectNode(s,o,a,e)),i+=s}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const e=Object.keys(t[o]),n=e.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(e[i],""+t[o][e[i]])}else i+=this.processTextOrObjNode(t[o],o,e,n);return{attrStr:r,val:i}},r.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},r.prototype.buildObjectNode=function(t,e,n,r){if(""===t)return"?"===e[0]?this.indentate(r)+"<"+e+n+"?"+this.tagEndChar:this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",i=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(r)+"<"+e+n+s+this.tagEndChar+t+this.indentate(r)+i:this.indentate(r)+"<"+e+n+s+">"+t+i}},r.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},r.prototype.buildTextValNode=function(t,e,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+i+"</"+e+this.tagEndChar}},r.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t},X=r}();return z={XMLParser:e,XMLValidator:t,XMLBuilder:n}}();class J{_view;constructor(t){Q(t),this._view=t}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get icon(){return this._view.icon}set icon(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}get loadChildViews(){return this._view.loadChildViews}}const Q=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if("caption"in t&&"string"!=typeof t.caption)throw new Error("View caption must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length)return!1;if(!0!==W.XMLValidator.validate(t))return!1;let e;const n=new W.XMLParser;try{e=n.parse(t)}catch{return!1}return!!e&&!!Object.keys(e).some((t=>"svg"===t.toLowerCase()))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if("order"in t&&"number"!=typeof t.order)throw new Error("View order must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof b))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");if(t.loadChildViews&&"function"!=typeof t.loadChildViews)throw new Error("View loadChildViews must be a function");return!0};var tt,et,nt,rt;function it(){if(et)return tt;et=1;const t="object"==typeof o&&o.env&&o.env.NODE_DEBUG&&/\bsemver\b/i.test(o.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};return tt=t}function st(){if(rt)return nt;rt=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return nt={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var ot,at,lt,ct,ut,ht,dt,pt,ft,gt,mt,bt,yt,vt={exports:{}};function Et(){if(dt)return ht;dt=1;const t=it(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:n}=st(),{safeRe:r,t:i}=(ot||(ot=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=st(),s=it(),o=(e=t.exports={}).re=[],a=e.safeRe=[],l=e.src=[],c=e.t={};let u=0;const h="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[h,r]],p=(t,e,n)=>{const r=(t=>{for(const[e,n]of d)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t})(e),i=u++;s(t,i,e),c[t]=i,l[i]=e,o[i]=new RegExp(e,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(vt,vt.exports)),vt.exports),s=function(){if(lt)return at;lt=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return at=n=>n?"object"!=typeof n?t:n:e}(),{compareIdentifiers:o}=function(){if(ut)return ct;ut=1;const t=/^[0-9]+$/,e=(e,n)=>{const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:e<n?-1:1};return ct={compareIdentifiers:e,rcompareIdentifiers:(t,n)=>e(n,t)}}();class a{constructor(o,l){if(l=s(l),o instanceof a){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=o.trim().match(l.loose?r[i.LOOSE]:r[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<n)return e}return t})):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(t("SemVer.compare",this.version,this.options,e),!(e instanceof a)){if("string"==typeof e&&e===this.version)return 0;e=new a(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(t){return t instanceof a||(t=new a(t,this.options)),o(this.major,t.major)||o(this.minor,t.minor)||o(this.patch,t.patch)}comparePre(e){if(e instanceof a||(e=new a(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=e.prerelease[n];if(t("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return o(r,i)}while(++n)}compareBuild(e){e instanceof a||(e=new a(e,this.options));let n=0;do{const r=this.build[n],i=e.build[n];if(t("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return o(r,i)}while(++n)}inc(t,e,n){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,n),this.inc("pre",e,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e,n),this.inc("pre",e,n);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const t=Number(n)?1:0;if(!e&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[t];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let r=[e,t];!1===n&&(r=[e]),0===o(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ht=a}!function(){if(mt)return gt;mt=1;const t=function(){if(ft)return pt;ft=1;const t=Et();return pt=(e,n,r=!1)=>{if(e instanceof t)return e;try{return new t(e,n)}catch(t){if(!r)return null;throw t}}}();gt=(e,n)=>{const r=t(e,n);return r?r.version:null}}(),function(){if(yt)return bt;yt=1;const t=Et();bt=(e,n)=>new t(e,n).major}(),s.m}},i={};function s(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={id:t,loaded:!1,exports:{}};return r[t].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=r,t=[],s.O=(e,n,r,i)=>{if(!n){var o=1/0;for(u=0;u<t.length;u++){n=t[u][0],r=t[u][1],i=t[u][2];for(var a=!0,l=0;l<n.length;l++)(!1&i||o>=i)&&Object.keys(s.O).every((t=>s.O[t](n[l])))?n.splice(l--,1):(a=!1,i<o&&(o=i));if(a){t.splice(u--,1);var c=r();void 0!==c&&(e=c)}}return e}i=i||0;for(var u=t.length;u>0&&t[u-1][2]>i;u--)t[u]=t[u-1];t[u]=[n,r,i]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>t+"-"+t+".js?v="+{2441:"fc741cf57e9647f370a3",5862:"142cd48ca8ec32e57725",7477:"dd0c501b94e5f10b2332",7874:"cd16576625b0c6e0d277"}[t],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},n="nextcloud:",s.l=(t,r,i,o)=>{if(e[t])e[t].push(r);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var h=c[u];if(h.getAttribute("src")==t||h.getAttribute("data-webpack")==n+i){a=h;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",n+i),a.src=t),e[t]=[r];var d=(n,r)=>{a.onerror=a.onload=null,clearTimeout(p);var i=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((t=>t(r))),n)return n(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s.j=2766,(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={2766:0};s.f.j=(e,n)=>{var r=s.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=t[e]=[n,i]));n.push(r[2]=i);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,r[1](a)}}),"chunk-"+e,e)}},s.O.j=e=>0===t[e];var e=(e,n)=>{var r,i,o=n[0],a=n[1],l=n[2],c=0;if(o.some((e=>0!==t[e]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(l)var u=l(s)}for(e&&e(n);c<o.length;c++)i=o[c],s.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return s.O(u)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),s.nc=void 0;var o=s.O(void 0,[4208],(()=>s(44563)));o=s.O(o)})();
//# sourceMappingURL=systemtags-init.js.map?v=472c42b50fc67aabf7c5