mirror of
https://github.com/nextcloud/server.git
synced 2024-08-27 17:55:28 +02:00
3 lines
76 KiB
JavaScript
3 lines
76 KiB
JavaScript
/*! For license information please see 8321-8321.js.LICENSE.txt */
|
|
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[8321],{42761:t=>{t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTS00LTRoMjR2MjRILTRWLTR6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhzMy42IDggOCA4IDgtMy42IDgtOC0zLjYtOC04LTh6IiBmaWxsPSIjZWQ0ODRjIi8+PHBhdGggZD0iTTUgNi41aDZjLjggMCAxLjUuNyAxLjUgMS41cy0uNyAxLjUtMS41IDEuNUg1Yy0uOCAwLTEuNS0uNy0xLjUtMS41UzQuMiA2LjUgNSA2LjV6IiBmaWxsPSIjZmRmZmZmIi8+PC9zdmc+Cg=="},87210:t=>{t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTQuOCAxMS4yaDYuNFY0LjhINC44djYuNHpNOCAwQzMuNiAwIDAgMy42IDAgOHMzLjYgOCA4IDggOC0zLjYgOC04LTMuNi04LTgtOHoiIGZpbGw9IiM0OWIzODIiLz48L3N2Zz4K"},94659:t=>{t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTS00LTRoMjR2MjRILTR6Ii8+PHBhdGggZD0iTTYuOS4xQzMgLjYtLjEgNC0uMSA4YzAgNC40IDMuNiA4IDggOCA0IDAgNy40LTMgOC02LjktMS4yIDEuMy0yLjkgMi4xLTQuNyAyLjEtMy41IDAtNi40LTIuOS02LjQtNi40IDAtMS45LjgtMy42IDIuMS00Ljd6IiBmaWxsPSIjZjRhMzMxIi8+PC9zdmc+Cg=="},39896:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzIyMiI+PHBhdGggZD0iTTE1LjQgMTYuNkwxMC44IDEybDQuNi00LjZMMTQgNmwtNiA2IDYgNiAxLjQtMS40eiIvPjwvc3ZnPg=="},76899:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzIyMiI+PHBhdGggZD0iTTE4LjQgNy40TDE3IDZsLTYgNiA2IDYgMS40LTEuNC00LjYtNC42IDQuNi00LjZtLTYgMEwxMSA2bC02IDYgNiA2IDEuNC0xLjRMNy44IDEybDQuNi00LjZ6Ii8+PC9zdmc+"},88931:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzIyMiI+PHBhdGggZD0iTTUuNiA3LjRMNyA2bDYgNi02IDYtMS40LTEuNCA0LjYtNC42LTQuNi00LjZtNiAwTDEzIDZsNiA2LTYgNi0xLjQtMS40IDQuNi00LjYtNC42LTQuNnoiLz48L3N2Zz4="},16556:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzIyMiI+PHBhdGggZD0iTTguNiAxNi42bDQuNi00LjYtNC42LTQuNkwxMCA2bDYgNi02IDYtMS40LTEuNHoiLz48L3N2Zz4="},94542:(t,e,i)=>{i.r(e),i.d(e,{default:()=>z});var n=i(20144),r=i(5656),o=i(31352),s=i(64882),a=i(62520),l=i(43554),c=i(79753);function u(t){return"function"==typeof t?t():(0,n.unref)(t)}function d(t){const e=Object.create(null);return i=>e[i]||(e[i]=t(i))}n.default.util.warn,i(25108),"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString;const p=/\B([A-Z])/g,f=(d((t=>t.replace(p,"-$1").toLowerCase())),/-(\w)/g);d((t=>t.replace(f,((t,e)=>e?e.toUpperCase():""))));var h=i(93664),g=i(35820),m=i(74139),v=i(69183),w=i(25108);function y(t,e,i,n,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){!(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)&&typeof __VUE_SSR_CONTEXT__<"u"&&(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}const _=y({name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,b=()=>{var t,e,i;const r=(0,l.j)("files","config",null),o=(0,n.ref)(null!=(t=null==r?void 0:r.show_hidden)&&t),s=(0,n.ref)(null==(e=null==r?void 0:r.sort_favorites_first)||e),a=(0,n.ref)(null==(i=null==r?void 0:r.crop_image_previews)||i);return(0,n.onMounted)((()=>{h.Z.get((0,c.generateUrl)("/apps/files/api/v1/configs")).then((t=>{var e,i,n,r,l,c,u,d,p;o.value=null!=(n=null==(i=null==(e=t.data)?void 0:e.data)?void 0:i.show_hidden)&&n,s.value=null==(c=null==(l=null==(r=t.data)?void 0:r.data)?void 0:l.sort_favorites_first)||c,a.value=null==(p=null==(d=null==(u=t.data)?void 0:u.data)?void 0:d.crop_image_previews)||p}))})),{showHiddenFiles:o,sortFavoritesFirst:s,cropImagePreviews:a}},x=y({name:"MenuUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon menu-up-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M7,15L12,10L17,15H7Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,N=y({name:"MenuDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon menu-down-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M7,10L12,15L17,10H7Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,C={"file-picker__file-icon":"_file-picker__file-icon_1vgv4_5"},I=y((0,n.defineComponent)({__name:"LoadingTableRow",props:{showCheckbox:{type:Boolean}},setup:t=>({__sfc:!0,fileListIconStyles:C})}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e("tr",{staticClass:"file-picker__row loading-row",attrs:{"aria-hidden":"true"}},[t.showCheckbox?e("td",{staticClass:"row-checkbox"},[e("span")]):t._e(),e("td",{staticClass:"row-name"},[e("div",{staticClass:"row-wrapper"},[e("span",{class:i.fileListIconStyles["file-picker__file-icon"]}),e("span")])]),t._m(0),t._m(1)])}),[function(){var t=this._self._c;return this._self._setupProxy,t("td",{staticClass:"row-size"},[t("span")])},function(){var t=this._self._c;return this._self._setupProxy,t("td",{staticClass:"row-modified"},[t("span")])}],!1,null,"6aded0d9",null,null).exports,E=y({name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,S=y((0,n.defineComponent)({name:"FilePreview",props:{node:null,cropImagePreviews:{type:Boolean}},setup(t){const e=t,i=(0,n.ref)(C),o=(0,n.computed)((()=>function(t,e={}){var i;e={size:32,cropPreview:!1,mimeFallback:!0,...e};try{const n=(null==(i=t.attributes)?void 0:i.previewUrl)||(0,c.generateUrl)("/core/preview?fileId={fileid}",{fileid:t.fileid});let r;try{r=new URL(n)}catch{r=new URL(n,window.location.origin)}return r.searchParams.set("x","".concat(e.size)),r.searchParams.set("y","".concat(e.size)),r.searchParams.set("mimeFallback","".concat(e.mimeFallback)),r.searchParams.set("a",!0===e.cropPreview?"0":"1"),r.searchParams.set("c","".concat(t.attributes.etag)),r}catch{return null}}(e.node,{cropPreview:e.cropImagePreviews}))),s=(0,n.computed)((()=>e.node.type===r.Tv.File)),a=(0,n.ref)(!1);return(0,n.watch)(o,(()=>{if(a.value=!1,o.value){const t=document.createElement("img");t.src=o.value.href,t.onerror=()=>t.remove(),t.onload=()=>{a.value=!0,t.remove()},document.body.appendChild(t)}}),{immediate:!0}),{__sfc:!0,fileListIconStyles:i,props:e,previewURL:o,isFile:s,canLoadPreview:a,t:g.t,IconFile:_,IconFolder:E}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e("div",{class:i.fileListIconStyles["file-picker__file-icon"],style:i.canLoadPreview?{backgroundImage:"url(".concat(i.previewURL,")")}:void 0,attrs:{"aria-label":i.t("MIME type {mime}",{mime:t.node.mime||i.t("unknown")})}},[i.canLoadPreview?t._e():[i.isFile?e(i.IconFile,{attrs:{size:20}}):e(i.IconFolder,{attrs:{size:20}})]],2)}),[],!1,null,null,null,null).exports,k=y((0,n.defineComponent)({__name:"FileListRow",props:{allowPickDirectory:{type:Boolean},selected:{type:Boolean},showCheckbox:{type:Boolean},canPick:{type:Boolean},node:null,cropImagePreviews:{type:Boolean}},emits:["update:selected","enter-directory"],setup(t,{emit:e}){const i=t,o=(0,n.computed)((()=>{var t;return(null==(t=i.node.attributes)?void 0:t.displayName)||i.node.basename.slice(0,i.node.extension?-i.node.extension.length:void 0)})),a=(0,n.computed)((()=>i.node.extension)),l=(0,n.computed)((()=>i.node.type===r.Tv.Folder)),c=(0,n.computed)((()=>i.canPick&&(i.allowPickDirectory||!l.value)));function u(){e("update:selected",!i.selected)}function d(){l.value?e("enter-directory",i.node):u()}return{__sfc:!0,props:i,emit:e,displayName:o,fileExtension:a,isDirectory:l,isPickable:c,toggleSelected:u,handleClick:d,handleKeyDown:function(t){"Enter"===t.key&&d()},formatFileSize:r.sS,NcCheckboxRadioSwitch:s.rw,NcDateTime:s.Jh,t:g.t,FilePreview:S}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e("tr",t._g({class:["file-picker__row",{"file-picker__row--selected":t.selected&&!t.showCheckbox}],attrs:{tabindex:t.showCheckbox&&!i.isDirectory?void 0:0,"aria-selected":i.isPickable?t.selected:void 0,"data-filename":t.node.basename,"data-testid":"file-list-row"},on:{click:i.handleClick}},!t.showCheckbox||i.isDirectory?{keydown:i.handleKeyDown}:{}),[t.showCheckbox?e("td",{staticClass:"row-checkbox"},[e(i.NcCheckboxRadioSwitch,{attrs:{disabled:!i.isPickable,checked:t.selected,"aria-label":i.t("Select the row for {nodename}",{nodename:i.displayName}),"data-testid":"row-checkbox"},on:{click:function(t){t.stopPropagation()},"update:checked":i.toggleSelected}})],1):t._e(),e("td",{staticClass:"row-name"},[e("div",{staticClass:"file-picker__name-container",attrs:{"data-testid":"row-name"}},[e(i.FilePreview,{attrs:{node:t.node,"crop-image-previews":t.cropImagePreviews}}),e("div",{staticClass:"file-picker__file-name",attrs:{title:i.displayName},domProps:{textContent:t._s(i.displayName)}}),e("div",{staticClass:"file-picker__file-extension",domProps:{textContent:t._s(i.fileExtension)}})],1)]),e("td",{staticClass:"row-size"},[t._v(" "+t._s(i.formatFileSize(t.node.size||0))+" ")]),e("td",{staticClass:"row-modified"},[e(i.NcDateTime,{attrs:{timestamp:t.node.mtime,"ignore-seconds":!0}})],1)])}),[],!1,null,"ee6f34b5",null,null).exports,L=y((0,n.defineComponent)({__name:"FileList",props:{currentView:null,multiselect:{type:Boolean},allowPickDirectory:{type:Boolean},loading:{type:Boolean},files:null,selectedFiles:null,path:null},emits:["update:path","update:selectedFiles"],setup(t,{emit:e}){const i=t,d=(0,n.ref)(),{currentConfig:p}=(t=>{var e,i,r,o,s,a,d,p,f,g,m,v;const w=t=>"asc"===t?"ascending":"desc"===t?"descending":"none",y=(0,l.j)("files","viewConfigs",null),_=(0,n.ref)({sortBy:null!=(i=null==(e=null==y?void 0:y.files)?void 0:e.sorting_mode)?i:"basename",order:w(null!=(o=null==(r=null==y?void 0:y.files)?void 0:r.sorting_direction)?o:"asc")}),b=(0,n.ref)({sortBy:null!=(a=null==(s=null==y?void 0:y.recent)?void 0:s.sorting_mode)?a:"basename",order:w(null!=(p=null==(d=null==y?void 0:y.recent)?void 0:d.sorting_direction)?p:"asc")}),x=(0,n.ref)({sortBy:null!=(g=null==(f=null==y?void 0:y.favorites)?void 0:f.sorting_mode)?g:"basename",order:w(null!=(v=null==(m=null==y?void 0:y.favorites)?void 0:m.sorting_direction)?v:"asc")});(0,n.onMounted)((()=>{h.Z.get((0,c.generateUrl)("/apps/files/api/v1/views")).then((t=>{var e,i,n,r,o,s,a,l,c,u,d,p,f,h,g,m,v,y,N,C,I;_.value={sortBy:null!=(r=null==(n=null==(i=null==(e=t.data)?void 0:e.data)?void 0:i.files)?void 0:n.sorting_mode)?r:"basename",order:w(null==(a=null==(s=null==(o=t.data)?void 0:o.data)?void 0:s.files)?void 0:a.sorting_direction)},x.value={sortBy:null!=(d=null==(u=null==(c=null==(l=t.data)?void 0:l.data)?void 0:c.favorites)?void 0:u.sorting_mode)?d:"basename",order:w(null==(h=null==(f=null==(p=t.data)?void 0:p.data)?void 0:f.favorites)?void 0:h.sorting_direction)},b.value={sortBy:null!=(y=null==(v=null==(m=null==(g=t.data)?void 0:g.data)?void 0:m.recent)?void 0:v.sorting_mode)?y:"basename",order:w(null==(I=null==(C=null==(N=t.data)?void 0:N.data)?void 0:C.recent)?void 0:I.sorting_direction)}}))}));const N=(0,n.computed)((()=>"files"===u(t||"files")?_.value:"recent"===u(t)?b.value:x.value)),C=(0,n.computed)((()=>N.value.sortBy)),I=(0,n.computed)((()=>N.value.order));return{filesViewConfig:_,favoritesViewConfig:x,recentViewConfig:b,currentConfig:N,sortBy:C,order:I}})(i.currentView),f=(0,n.computed)((()=>{var t;return null!=(t=d.value)?t:p.value})),m=(0,n.computed)((()=>"basename"===f.value.sortBy?"none"===f.value.order?void 0:f.value.order:void 0)),v=(0,n.computed)((()=>"size"===f.value.sortBy?"none"===f.value.order?void 0:f.value.order:void 0)),w=(0,n.computed)((()=>"mtime"===f.value.sortBy?"none"===f.value.order?void 0:f.value.order:void 0)),{sortFavoritesFirst:y,cropImagePreviews:_}=b(),C=(0,n.computed)((()=>{const t={ascending:(t,e,i)=>i(t,e),descending:(t,e,i)=>i(e,t),none:(t,e,i)=>0},e={basename:(t,e)=>{var i,n;return((null==(i=t.attributes)?void 0:i.displayName)||t.basename).localeCompare((null==(n=e.attributes)?void 0:n.displayName)||e.basename,(0,o.aj)())},size:(t,e)=>(t.size||0)-(e.size||0),mtime:(t,e)=>{var i,n,r,o;return((null==(n=null==(i=e.mtime)?void 0:i.getTime)?void 0:n.call(i))||0)-((null==(o=null==(r=t.mtime)?void 0:r.getTime)?void 0:o.call(r))||0)}};return[...i.files].sort(((i,n)=>(n.type===r.Tv.Folder?1:0)-(i.type===r.Tv.Folder?1:0)||(y?(n.attributes.favorite?1:0)-(i.attributes.favorite?1:0):0)||t[f.value.order](i,n,e[f.value.sortBy])))})),E=(0,n.computed)((()=>i.files.filter((t=>i.allowPickDirectory||t.type!==r.Tv.Folder)))),S=(0,n.computed)((()=>!i.loading&&i.selectedFiles.length>0&&i.selectedFiles.length>=E.value.length)),L=(0,n.ref)(4),A=(0,n.ref)();{const t=()=>(0,n.nextTick)((()=>{var t,e,i,n,r;const o=(null==(e=null==(t=A.value)?void 0:t.parentElement)?void 0:e.children)||[];let s=(null==(n=null==(i=A.value)?void 0:i.parentElement)?void 0:n.clientHeight)||450;for(let t=0;t<o.length;t++)null!=(r=A.value)&&r.isSameNode(o[t])||(s-=o[t].clientHeight);L.value=Math.floor((s-50)/50)}));(0,n.onMounted)((()=>{window.addEventListener("resize",t),t()})),(0,n.onUnmounted)((()=>{window.removeEventListener("resize",t)}))}return{__sfc:!0,props:i,emit:e,customSortingConfig:d,filesAppSorting:p,sortingConfig:f,sortByName:m,sortBySize:v,sortByModified:w,toggleSorting:t=>{f.value.sortBy===t?"ascending"===f.value.order?d.value={sortBy:f.value.sortBy,order:"descending"}:d.value={sortBy:f.value.sortBy,order:"ascending"}:d.value={sortBy:t,order:"ascending"}},sortFavoritesFirst:y,cropImagePreviews:_,sortedFiles:C,selectableFiles:E,allSelected:S,onSelectAll:function(){i.selectedFiles.length<E.value.length?e("update:selectedFiles",E.value):e("update:selectedFiles",[])},onNodeSelected:function(t){i.selectedFiles.includes(t)?e("update:selectedFiles",i.selectedFiles.filter((e=>e.path!==t.path))):i.multiselect?e("update:selectedFiles",[...i.selectedFiles,t]):e("update:selectedFiles",[t])},onChangeDirectory:function(t){e("update:path",(0,a.join)(i.path,t.basename))},skeletonNumber:L,fileContainer:A,NcButton:s.P2,NcCheckboxRadioSwitch:s.rw,t:g.t,IconSortAscending:x,IconSortDescending:N,LoadingTableRow:I,FileListRow:k}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e("div",{ref:"fileContainer",staticClass:"file-picker__files"},[e("table",[e("thead",[e("tr",[t.multiselect?e("th",{staticClass:"row-checkbox"},[e("span",{staticClass:"hidden-visually"},[t._v(" "+t._s(i.t("Select entry"))+" ")]),t.multiselect?e(i.NcCheckboxRadioSwitch,{attrs:{"aria-label":i.t("Select all entries"),checked:i.allSelected,"data-testid":"select-all-checkbox"},on:{"update:checked":i.onSelectAll}}):t._e()],1):t._e(),e("th",{staticClass:"row-name",attrs:{"aria-sort":i.sortByName}},[e("div",{staticClass:"header-wrapper"},[e("span",{staticClass:"file-picker__header-preview"}),e(i.NcButton,{attrs:{wide:!0,type:"tertiary","data-test":"file-picker_sort-name"},on:{click:function(t){return i.toggleSorting("basename")}},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===i.sortByName?e(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortByName?e(i.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(i.t("Name"))+" ")])],1)]),e("th",{staticClass:"row-size",attrs:{"aria-sort":i.sortBySize}},[e(i.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(t){return i.toggleSorting("size")}},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===i.sortBySize?e(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortBySize?e(i.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(i.t("Size"))+" ")])],1),e("th",{staticClass:"row-modified",attrs:{"aria-sort":i.sortByModified}},[e(i.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(t){return i.toggleSorting("mtime")}},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===i.sortByModified?e(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortByModified?e(i.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(i.t("Modified"))+" ")])],1)])]),e("tbody",[t.loading?t._l(i.skeletonNumber,(function(n){return e(i.LoadingTableRow,{key:n,attrs:{"show-checkbox":t.multiselect}})})):t._l(i.sortedFiles,(function(n){return e(i.FileListRow,{key:n.fileid||n.path,attrs:{"allow-pick-directory":t.allowPickDirectory,"show-checkbox":t.multiselect,"can-pick":t.multiselect||0===t.selectedFiles.length||t.selectedFiles.includes(n),selected:t.selectedFiles.includes(n),node:n,"crop-image-previews":i.cropImagePreviews},on:{"update:selected":function(t){return i.onNodeSelected(n)},"enter-directory":i.onChangeDirectory}})}))],2)])])}),[],!1,null,"4297db37",null,null).exports,A=y({name:"HomeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon home-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,P=y({name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon plus-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,T=y((0,n.defineComponent)({__name:"FilePickerBreadcrumbs",props:{path:null,showMenu:{type:Boolean}},emits:["update:path","create-node"],setup(t,{emit:e}){const i=t,r=(0,n.ref)(""),o=(0,n.ref)();function a(){var t,e,i,n;const s=r.value.trim(),a=null==(e=null==(t=o.value)?void 0:t.$el)?void 0:e.querySelector("input");let l="";return 0===s.length?l=(0,g.t)("Folder name cannot be empty."):s.includes("/")?l=(0,g.t)('"/" is not allowed inside a folder name.'):["..","."].includes(s)?l=(0,g.t)('"{name}" is an invalid folder name.',{name:s}):null!=(i=window.OC.config)&&i.blacklist_files_regex&&s.match(null==(n=window.OC.config)?void 0:n.blacklist_files_regex)&&(l=(0,g.t)('"{name}" is not an allowed folder name',{name:s})),a&&a.setCustomValidity(l),""===l}const l=(0,n.computed)((()=>i.path.split("/").filter((t=>""!==t)).map(((t,e,i)=>({name:t,path:"/"+i.slice(0,e+1).join("/")})))));return{__sfc:!0,props:i,emit:e,newNodeName:r,nameInput:o,validateInput:a,onSubmit:function(){const t=r.value.trim();a()&&(e("create-node",t),r.value="")},pathElements:l,IconFolder:E,IconHome:A,IconPlus:P,NcActions:s.O3,NcActionInput:s.Iw,NcBreadcrumbs:s.fg,NcBreadcrumb:s.$U,t:g.t}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e(i.NcBreadcrumbs,{staticClass:"file-picker__breadcrumbs",scopedSlots:t._u([{key:"default",fn:function(){return[e(i.NcBreadcrumb,{attrs:{name:i.t("Home"),title:i.t("Home")},on:{click:function(t){return i.emit("update:path","/")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconHome,{attrs:{size:20}})]},proxy:!0}])}),t._l(i.pathElements,(function(t){return e(i.NcBreadcrumb,{key:t.path,attrs:{name:t.name,title:t.path},on:{click:function(e){return i.emit("update:path",t.path)}}})}))]},proxy:!0},t.showMenu?{key:"actions",fn:function(){return[e(i.NcActions,{attrs:{"aria-label":i.t("Create directory"),"force-menu":!0,"force-name":!0,"menu-name":i.t("New"),type:"secondary"},on:{close:function(t){i.newNodeName=""}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconPlus,{attrs:{size:20}})]},proxy:!0}],null,!1,2971667417)},[e(i.NcActionInput,{ref:"nameInput",attrs:{value:i.newNodeName,label:i.t("New folder"),placeholder:i.t("New folder name")},on:{"update:value":function(t){i.newNodeName=t},submit:i.onSubmit,input:i.validateInput},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconFolder,{attrs:{size:20}})]},proxy:!0}],null,!1,1614167509)})],1)]},proxy:!0}:null],null,!0)})}),[],!1,null,"3bc9efa5",null,null).exports,Z=y({name:"ClockIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon clock-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,F=y({name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,D=y({name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon magnify-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,M=y({name:"StarIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon star-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,B=y((0,n.defineComponent)({__name:"FilePickerNavigation",props:{currentView:null,filterString:null,isCollapsed:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(t,{emit:e}){const i=t,r=[{id:"files",label:(0,g.t)("All files"),icon:E},{id:"recent",label:(0,g.t)("Recent"),icon:Z},{id:"favorites",label:(0,g.t)("Favorites"),icon:M}],o=(0,n.computed)((()=>r.filter((t=>t.id===i.currentView))[0]));return{__sfc:!0,allViews:r,props:i,emit:e,currentViewObject:o,updateFilterValue:t=>e("update:filterString",t),IconClose:F,IconMagnify:D,NcButton:s.P2,NcSelect:s.QG,NcTextField:s.h3,t:g.t,Fragment:m.Fragment}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e(i.Fragment,[e(i.NcTextField,{staticClass:"file-picker__filter-input",attrs:{value:t.filterString,label:i.t("Filter file list"),"show-trailing-button":!!t.filterString},on:{"update:value":i.updateFilterValue,"trailing-button-click":function(t){return i.updateFilterValue("")}},scopedSlots:t._u([{key:"trailing-button-icon",fn:function(){return[e(i.IconClose,{attrs:{size:16}})]},proxy:!0}])},[e(i.IconMagnify,{attrs:{size:16}})],1),t.isCollapsed?e(i.NcSelect,{attrs:{"aria-label":i.t("Current view selector"),clearable:!1,searchable:!1,options:i.allViews,value:i.currentViewObject},on:{input:t=>i.emit("update:currentView",t.id)}}):e("ul",{staticClass:"file-picker__side",attrs:{role:"tablist","aria-label":i.t("Filepicker sections")}},t._l(i.allViews,(function(n){return e("li",{key:n.id},[e(i.NcButton,{attrs:{"aria-selected":t.currentView===n.id,type:t.currentView===n.id?"primary":"tertiary",wide:!0,role:"tab"},on:{click:function(e){return t.$emit("update:currentView",n.id)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(n.icon,{tag:"component",attrs:{size:20}})]},proxy:!0}],null,!0)},[t._v(" "+t._s(n.label)+" ")])],1)})),0)],1)}),[],!1,null,"fcfd0f23",null,null).exports,z=y((0,n.defineComponent)({name:"FilePicker",props:{buttons:null,name:null,allowPickDirectory:{type:Boolean,default:!1},container:{default:"body"},filterFn:{default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!0},path:{default:"/"}},emits:["close"],setup(t,{emit:e}){const i=t,o=(0,n.computed)((()=>({container:i.container,name:i.name,buttons:l.value,size:"large",contentClasses:["file-picker__content"],dialogClasses:["file-picker"],navigationClasses:["file-picker__navigation"]}))),l=(0,n.computed)((()=>("function"==typeof i.buttons?i.buttons(d.value,h.value,c.value):i.buttons).map((t=>({...t,callback:async()=>{const n=0===d.value.length&&i.allowPickDirectory?[await I(h.value)]:d.value;t.callback(n),e("close",n)}}))))),c=(0,n.ref)("files"),u=(0,n.computed)((()=>"favorites"===c.value?(0,g.t)("Favorites"):"recent"===c.value?(0,g.t)("Recent"):"")),d=(0,n.ref)([]),p=(0,n.ref)((null==window?void 0:window.sessionStorage.getItem("NC.FilePicker.LastPath"))||"/"),f=(0,n.ref)(),h=(0,n.computed)({get:()=>"files"===c.value?f.value||i.path||p.value:"/",set:t=>{void 0===i.path&&window.sessionStorage.setItem("NC.FilePicker.LastPath",t),f.value=t,d.value=[]}}),m=(0,n.ref)(""),{isSupportedMimeType:y}=function(t){const e=(0,n.computed)((()=>t.value.map((t=>t.split("/")))));return{isSupportedMimeType:t=>{const i=t.split("/");return e.value.some((([t,e])=>!(i[0]!==t&&"*"!==t||i[1]!==e&&"*"!==e)))}}}((0,n.toRef)(i,"mimetypeFilter")),{files:x,isLoading:N,loadFiles:C,getFile:I,client:E}=function(t,e){const i=(0,r.rp)(),o=(0,n.ref)([]),s=(0,n.ref)(!0);async function a(){if(s.value=!0,"favorites"===t.value)o.value=await(0,r.pC)(i,e.value);else if("recent"===t.value){const t=Math.round(Date.now()/1e3)-1209600,{data:e}=await i.search("/",{details:!0,data:(0,r.tB)(t)});o.value=e.results.map((t=>(0,r.RL)(t)))}else{const t=await i.getDirectoryContents("".concat(r._o).concat(e.value),{details:!0,data:(0,r.h7)()});o.value=t.data.map((t=>(0,r.RL)(t)))}s.value=!1}return(0,n.watch)([t,e],(()=>a())),(0,n.onMounted)((()=>a())),{isLoading:s,files:o,loadFiles:a,getFile:async function(t,e=r._o){const n=await i.stat("".concat(e).concat(t),{details:!0});return(0,r.RL)(n.data)},client:i}}(c,h);(0,n.onMounted)((()=>C()));const{showHiddenFiles:S}=b(),k=(0,n.computed)((()=>{let t=x.value;return S.value||(t=t.filter((t=>!t.basename.startsWith(".")))),i.mimetypeFilter.length>0&&(t=t.filter((t=>"folder"===t.type||t.mime&&y(t.mime)))),m.value&&(t=t.filter((t=>t.basename.toLowerCase().includes(m.value.toLowerCase())))),i.filterFn&&(t=t.filter((t=>i.filterFn(t)))),t})),A=(0,n.computed)((()=>"files"===c.value?(0,g.t)("Upload some content or sync with your devices!"):"recent"===c.value?(0,g.t)("Files and folders you recently modified will show up here."):(0,g.t)("Files and folders you mark as favorite will show up here.")));return{__sfc:!0,props:i,emit:e,dialogProps:o,dialogButtons:l,currentView:c,viewHeadline:u,selectedFiles:d,savedPath:p,navigatedPath:f,currentPath:h,filterString:m,isSupportedMimeType:y,files:x,isLoading:N,loadFiles:C,getFile:I,client:E,showHiddenFiles:S,filteredFiles:k,noFilesDescription:A,onCreateFolder:async t=>{try{await E.createDirectory((0,a.join)(r._o,h.value,t)),await C(),(0,v.j8)("files:node:created",x.value.filter((e=>e.basename===t))[0])}catch(e){w.warn("Could not create new folder",{name:t,error:e}),(0,g.k)((0,g.t)("Could not create the new folder"))}},handleClose:t=>{t||e("close")},IconFile:_,FileList:L,FilePickerBreadcrumbs:T,FilePickerNavigation:B,NcDialog:s.a0,NcEmptyContent:s.SL,t:g.t}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e(i.NcDialog,t._b({on:{"update:open":i.handleClose},scopedSlots:t._u([{key:"navigation",fn:function({isCollapsed:t}){return[e(i.FilePickerNavigation,{attrs:{"is-collapsed":t,"current-view":i.currentView,"filter-string":i.filterString},on:{"update:currentView":function(t){i.currentView=t},"update:current-view":function(t){i.currentView=t},"update:filterString":function(t){i.filterString=t},"update:filter-string":function(t){i.filterString=t}}})]}}])},"NcDialog",i.dialogProps,!1),[e("div",{staticClass:"file-picker__main"},["files"===i.currentView?e(i.FilePickerBreadcrumbs,{attrs:{path:i.currentPath,"show-menu":t.allowPickDirectory},on:{"update:path":function(t){i.currentPath=t},"create-node":i.onCreateFolder}}):e("div",{staticClass:"file-picker__view"},[e("h3",[t._v(t._s(i.viewHeadline))])]),i.isLoading||i.filteredFiles.length>0?e(i.FileList,{attrs:{"allow-pick-directory":t.allowPickDirectory,"current-view":i.currentView,files:i.filteredFiles,multiselect:t.multiselect,loading:i.isLoading,path:i.currentPath,"selected-files":i.selectedFiles,name:i.viewHeadline},on:{"update:path":[function(t){i.currentPath=t},function(t){i.currentView="files"}],"update:selectedFiles":function(t){i.selectedFiles=t},"update:selected-files":function(t){i.selectedFiles=t}}}):i.filterString?e(i.NcEmptyContent,{attrs:{name:i.t("No matching files"),description:i.t("No files matching your filter were found.")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconFile)]},proxy:!0}])}):e(i.NcEmptyContent,{attrs:{name:i.t("No files in here"),description:i.noFilesDescription},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconFile)]},proxy:!0}])})],1)])}),[],!1,null,"86a13079",null,null).exports},5656:(t,e,i)=>{i.d(e,{$B:()=>B,DT:()=>w,De:()=>x,G7:()=>ue,Ir:()=>he,NB:()=>M,RL:()=>$,Ti:()=>G,Tv:()=>T,Vn:()=>b,_o:()=>O,cd:()=>pe,e4:()=>D,gt:()=>z,h7:()=>L,jA:()=>v,m0:()=>S,oE:()=>fe,p$:()=>y,p4:()=>_,pC:()=>R,qq:()=>E,rp:()=>V,sS:()=>m,sg:()=>U,tB:()=>A,w4:()=>k,y3:()=>N,zu:()=>P});var n=i(77958),r=i(17499),o=i(31352),s=i(62520),a=i(65358),l=i(79753),c=i(14596);const u=null===(d=(0,n.ts)())?(0,r.IY)().setApp("files").build():(0,r.IY)().setApp("files").setUid(d.uid).build();var d;class p{_entries=[];registerEntry(t){this.validateEntry(t),this._entries.push(t)}unregisterEntry(t){const e="string"==typeof t?this.getEntryIndex(t):this.getEntryIndex(t.id);-1!==e?this._entries.splice(e,1):u.warn("Entry not found, nothing removed",{entry:t,entries:this.getEntries()})}getEntries(t){return t?this._entries.filter((e=>"function"!=typeof e.enabled||e.enabled(t))):this._entries}getEntryIndex(t){return this._entries.findIndex((e=>e.id===t))}validateEntry(t){if(!t.id||!t.displayName||!t.iconSvgInline&&!t.iconClass||!t.handler)throw new Error("Invalid entry");if("string"!=typeof t.id||"string"!=typeof t.displayName)throw new Error("Invalid id or displayName property");if(t.iconClass&&"string"!=typeof t.iconClass||t.iconSvgInline&&"string"!=typeof t.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==t.enabled&&"function"!=typeof t.enabled)throw new Error("Invalid enabled property");if("function"!=typeof t.handler)throw new Error("Invalid handler property");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(t.id))throw new Error("Duplicate entry")}}const f=function(){return typeof window._nc_newfilemenu>"u"&&(window._nc_newfilemenu=new p,u.debug("NewFileMenu initialized")),window._nc_newfilemenu},h=["B","KB","MB","GB","TB","PB"],g=["B","KiB","MiB","GiB","TiB","PiB"];function m(t,e=!1,i=!1,n=!1){i=i&&!n,"string"==typeof t&&(t=Number(t));let r=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;r=Math.min((i?g.length:h.length)-1,r);const s=i?g[r]:h[r];let a=(t/Math.pow(n?1e3:1024,r)).toFixed(1);return!0===e&&0===r?("0.0"!==a?"< 1 ":"0 ")+(i?g[1]:h[1]):(a=r<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,o.aj)()),a+" "+s)}function v(t,e=!1){try{t=`${t}`.toLocaleLowerCase().replaceAll(/\s+/g,"").replaceAll(",",".")}catch{return null}const i=t.match(/^([0-9]*(\.[0-9]*)?)([kmgtp]?)(i?)b?$/);if(null===i||"."===i[1]||""===i[1])return null;const n=`${i[1]}`,r="i"===i[4]||e?1024:1e3;return Math.round(Number.parseFloat(n)*r**{"":0,k:1,m:2,g:3,t:4,p:5,e:6}[i[3]])}var w=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(w||{});class y{_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 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("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(w).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 _=function(t){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],u.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?u.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)},b=function(){return typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],u.debug("FileActions initialized")),window._nc_fileactions},x=function(){return typeof window._nc_filelistheader>"u"&&(window._nc_filelistheader=[],u.debug("FileListHeaders initialized")),window._nc_filelistheader};var N=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(N||{});const C=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],I={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},E=function(t,e={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...C],window._nc_dav_namespaces={...I});const i={...window._nc_dav_namespaces,...e};return window._nc_dav_properties.find((e=>e===t))?(u.error(`${t} already registered`,{prop:t}),!1):t.startsWith("<")||2!==t.split(":").length?(u.error(`${t} is not valid. See example: 'oc:fileid'`,{prop:t}),!1):i[t.split(":")[0]]?(window._nc_dav_properties.push(t),window._nc_dav_namespaces=i,!0):(u.error(`${t} namespace unknown`,{prop:t,namespaces:i}),!1)},S=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...C]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},k=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...I}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},L=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${k()}>\n\t\t\t<d:prop>\n\t\t\t\t${S()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},A=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${k()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${S()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,n.ts)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`},P=function(t=""){let e=N.NONE;return t&&((t.includes("C")||t.includes("K"))&&(e|=N.CREATE),t.includes("G")&&(e|=N.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=N.UPDATE),t.includes("D")&&(e|=N.DELETE),t.includes("R")&&(e|=N.SHARE)),e};var T=(t=>(t.Folder="folder",t.File="file",t))(T||{});const Z=function(t,e){return null!==t.match(e)},F=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=N.NONE&&t.permissions<=N.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&Z(t.source,e)){const i=t.source.match(e)[0];if(!t.source.includes((0,s.join)(i,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(D).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var D=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(D||{});class M{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(t,e){F(t,e||this._knownDavService),this._data=t;const i={set:(t,e,i)=>(this.updateMtime(),Reflect.set(t,e,i)),deleteProperty:(t,e)=>(this.updateMtime(),Reflect.deleteProperty(t,e))};this._attributes=new Proxy(t.attributes||{},i),delete this._data.attributes,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,a.Ec)(this.source.slice(t.length))}get basename(){return(0,s.basename)(this.source)}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){const t=this.source.indexOf(this.root);return(0,s.dirname)(this.source.slice(t+this.root.length)||"/")}const t=new URL(this.source);return(0,s.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:N.NONE:N.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return Z(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,s.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const t=this.source.indexOf(this.root);return this.source.slice(t+this.root.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){F({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,s.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class B extends M{get type(){return T.File}}class z extends M{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return T.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const O=`/files/${(0,n.ts)()?.uid}`,j=(0,l.generateRemoteUrl)("dav"),V=function(t=j){const e=(0,c.eI)(t);function i(t){e.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,n._S)(i),i((0,n.IH)()),(0,c.lD)().patch("fetch",((t,e)=>{const i=e.headers;return i?.method&&(e.method=i.method,delete i.method),fetch(t,e)})),e},R=async(t,e="/",i=O)=>(await t.getDirectoryContents(`${i}${e}`,{details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${k()}>\n\t\t\t<d:prop>\n\t\t\t\t${S()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>$(t,i))),$=function(t,e=O,i=j){const r=t.props,o=P(r?.permissions),s=(0,n.ts)()?.uid,a={id:r?.fileid||0,source:`${i}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime,size:r?.size||Number.parseInt(r.getcontentlength||"0"),permissions:o,owner:s,root:e,attributes:{...t,...r,hasPreview:r?.["has-preview"]}};return delete a.attributes?.props,"file"===t.type?new B(a):new z(a)};class H{_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)}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&this._views.splice(e,1)}get views(){return this._views}setActive(t){this._currentView=t}get active(){return this._currentView}}const G=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new H,u.debug("Navigation service initialized")),window._nc_navigation};class U{_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 X={},W={};!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",i="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(t){return typeof t<"u"},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,i){if(e){const n=Object.keys(e),r=n.length;for(let o=0;o<r;o++)t[n[o]]="strict"===i?[e[n[o]]]:e[n[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){const e=n.exec(t);return!(null===e||typeof e>"u")},t.getAllMatches=function(t,e){const i=[];let n=e.exec(t);for(;n;){const r=[];r.startIndex=e.lastIndex-n[0].length;const o=n.length;for(let t=0;t<o;t++)r.push(n[t]);i.push(r),n=e.exec(t)}return i},t.nameRegexp=i}(W);const q=W,Q={allowBooleanAttributes:!1,unpairedTags:[]};function K(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function J(t,e){const i=e;for(;e<t.length;e++)if("?"==t[e]||" "==t[e]){const n=t.substr(i,e-i);if(e>5&&"xml"===n)return at("InvalidXml","XML declaration allowed only at the start of the document.",ut(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function tt(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 i=1;for(e+=8;e<t.length;e++)if("<"===t[e])i++;else if(">"===t[e]&&(i--,0===i))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}X.validate=function(t,e){e=Object.assign({},Q,e);const i=[];let n=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=J(t,o),o.err)return o}else{if("<"!==t[o]){if(K(t[o]))continue;return at("InvalidChar","char '"+t[o]+"' is not expected.",ut(t,o))}{let s=o;if(o++,"!"===t[o]){o=tt(t,o);continue}{let a=!1;"/"===t[o]&&(a=!0,o++);let l="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)l+=t[o];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),o--),!ct(l)){let e;return e=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",at("InvalidTag",e,ut(t,o))}const c=nt(t,o);if(!1===c)return at("InvalidAttr","Attributes for '"+l+"' have open quote.",ut(t,o));let u=c.value;if(o=c.index,"/"===u[u.length-1]){const i=o-u.length;u=u.substring(0,u.length-1);const r=ot(u,e);if(!0!==r)return at(r.err.code,r.err.msg,ut(t,i+r.err.line));n=!0}else if(a){if(!c.tagClosed)return at("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",ut(t,o));if(u.trim().length>0)return at("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",ut(t,s));{const e=i.pop();if(l!==e.tagName){let i=ut(t,e.tagStartPos);return at("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+l+"'.",ut(t,s))}0==i.length&&(r=!0)}}else{const a=ot(u,e);if(!0!==a)return at(a.err.code,a.err.msg,ut(t,o-u.length+a.err.line));if(!0===r)return at("InvalidXml","Multiple possible root nodes found.",ut(t,o));-1!==e.unpairedTags.indexOf(l)||i.push({tagName:l,tagStartPos:s}),n=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=tt(t,o);continue}if("?"!==t[o+1])break;if(o=J(t,++o),o.err)return o}else if("&"===t[o]){const e=st(t,o);if(-1==e)return at("InvalidChar","char '&' is not expected.",ut(t,o));o=e}else if(!0===r&&!K(t[o]))return at("InvalidXml","Extra text at the end",ut(t,o));"<"===t[o]&&o--}}}return n?1==i.length?at("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",ut(t,i[0].tagStartPos)):!(i.length>0)||at("InvalidXml","Invalid '"+JSON.stringify(i.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):at("InvalidXml","Start tag expected.",1)};const et='"',it="'";function nt(t,e){let i="",n="",r=!1;for(;e<t.length;e++){if(t[e]===et||t[e]===it)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){r=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:r}}const rt=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function ot(t,e){const i=q.getAllMatches(t,rt),n={};for(let t=0;t<i.length;t++){if(0===i[t][1].length)return at("InvalidAttr","Attribute '"+i[t][2]+"' has no space in starting.",dt(i[t]));if(void 0!==i[t][3]&&void 0===i[t][4])return at("InvalidAttr","Attribute '"+i[t][2]+"' is without value.",dt(i[t]));if(void 0===i[t][3]&&!e.allowBooleanAttributes)return at("InvalidAttr","boolean attribute '"+i[t][2]+"' is not allowed.",dt(i[t]));const r=i[t][2];if(!lt(r))return at("InvalidAttr","Attribute '"+r+"' is an invalid name.",dt(i[t]));if(n.hasOwnProperty(r))return at("InvalidAttr","Attribute '"+r+"' is repeated.",dt(i[t]));n[r]=1}return!0}function st(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let i=/\d/;for("x"===t[e]&&(e++,i=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(i))break}return-1}(t,++e);let i=0;for(;e<t.length;e++,i++)if(!(t[e].match(/\w/)&&i<20)){if(";"===t[e])break;return-1}return e}function at(t,e,i){return{err:{code:t,msg:e,line:i.line||i,col:i.col}}}function lt(t){return q.isName(t)}function ct(t){return q.isName(t)}function ut(t,e){const i=t.substring(0,e).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function dt(t){return t.startIndex+t[1].length}var pt={};const ft={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,i){return t}};pt.buildOptions=function(t){return Object.assign({},ft,t)},pt.defaultOptions=ft;const ht=W;function gt(t,e){let i="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)i+=t[e];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=t[e++];let r="";for(;e<t.length&&t[e]!==n;e++)r+=t[e];return[i,r,e]}function mt(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function vt(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 wt(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 yt(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 _t(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 bt(t){if(ht.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}const xt=/^[-+]?0x[a-fA-F0-9]+$/,Nt=/^([\-\+])?(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 Ct={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const It=W,Et=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})}},St=function(t,e){const i={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let n=1,r=!1,o=!1,s="";for(;e<t.length;e++)if("<"!==t[e]||o)if(">"===t[e]){if(o?"-"===t[e-1]&&"-"===t[e-2]&&(o=!1,n--):n--,0===n)break}else"["===t[e]?r=!0:s+=t[e];else{if(r&&vt(t,e))e+=7,[entityName,val,e]=gt(t,e+1),-1===val.indexOf("&")&&(i[bt(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&wt(t,e))e+=8;else if(r&&yt(t,e))e+=8;else if(r&&_t(t,e))e+=9;else{if(!mt)throw new Error("Invalid DOCTYPE");o=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}},kt=function(t,e={}){if(e=Object.assign({},Ct,e),!t||"string"!=typeof t)return t;let i=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(i))return t;if(e.hex&&xt.test(i))return Number.parseInt(i,16);{const n=Nt.exec(i);if(n){const r=n[1],o=n[2];let s=function(t){return t&&-1!==t.indexOf(".")&&("."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1))),t}(n[3]);const a=n[4]||n[6];if(!e.leadingZeros&&o.length>0&&r&&"."!==i[2])return t;if(!e.leadingZeros&&o.length>0&&!r&&"."!==i[1])return t;{const n=Number(i),l=""+n;return-1!==l.search(/[eE]/)||a?e.eNotation?n:t:-1!==i.indexOf(".")?"0"===l&&""===s||l===s||r&&l==="-"+s?n:t:o?s===l||r+s===l?n:t:i===l||i===r+l?n:t}}return t}};function Lt(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function At(t,e,i,n,r,o,s){if(void 0!==t&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){s||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,i,r,o);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?Rt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Pt(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,It.nameRegexp);const Tt=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Zt(t,e,i){if(!this.options.ignoreAttributes&&"string"==typeof t){const i=It.getAllMatches(t,Tt),n=i.length,r={};for(let t=0;t<n;t++){const n=this.resolveNameSpace(i[t][1]);let o=i[t][4],s=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const t=this.options.attributeValueProcessor(n,o,e);r[s]=null==t?o:typeof t!=typeof o||t!==o?t:Rt(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[s]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const Ft=function(t){t=t.replace(/\r\n?/g,"\n");const e=new Et("!xml");let i=e,n="",r="";for(let o=0;o<t.length;o++)if("<"===t[o])if("/"===t[o+1]){const e=Ot(t,">",o,"Closing Tag is not closed.");let s=t.substring(o+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),i&&(n=this.saveTextToParentTag(n,i,r));const a=r.substring(r.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),i=this.tagsNodeStack.pop(),n="",o=e}else if("?"===t[o+1]){let e=jt(t,o,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,r),!(this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags)){const t=new Et(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(i,t,r)}o=e.closeIndex+1}else if("!--"===t.substr(o+1,3)){const e=Ot(t,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(o+4,e-2);n=this.saveTextToParentTag(n,i,r),i.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}o=e}else if("!D"===t.substr(o+1,2)){const e=St(t,o);this.docTypeEntities=e.entities,o=e.i}else if("!["===t.substr(o+1,2)){const e=Ot(t,"]]>",o,"CDATA is not closed.")-2,s=t.substring(o+9,e);if(n=this.saveTextToParentTag(n,i,r),this.options.cdataPropName)i.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let t=this.parseTextData(s,i.tagname,r,!0,!1,!0);null==t&&(t=""),i.add(this.options.textNodeName,t)}o=e+2}else{let s=jt(t,o,this.options.removeNSPrefix),a=s.tagName;const l=s.rawTagName;let c=s.tagExp,u=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,r,!1));const p=i;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(i=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),a!==e.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let e="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)o=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=s.closeIndex;else{const i=this.readStopNodeData(t,l,d+1);if(!i)throw new Error(`Unexpected end of ${l}`);o=i.i,e=i.tagContent}const n=new Et(a);a!==c&&u&&(n[":@"]=this.buildAttributesMap(c,r,a)),e&&(e=this.parseTextData(e,a,r,!0,u,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),n.add(this.options.textNodeName,e),this.addChild(i,n,r)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),c=a):c=c.substr(0,c.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new Et(a);a!==c&&u&&(t[":@"]=this.buildAttributesMap(c,r,a)),this.addChild(i,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new Et(a);this.tagsNodeStack.push(i),a!==c&&u&&(t[":@"]=this.buildAttributesMap(c,r,a)),this.addChild(i,t,r),i=t}n="",o=d}}else n+=t[o];return e.child};function Dt(t,e,i){const n=this.options.updateTag(e.tagname,i,e[":@"]);!1===n||("string"==typeof n&&(e.tagname=n),t.addChild(e))}const Mt=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const i=this.docTypeEntities[e];t=t.replace(i.regx,i.val)}for(let e in this.lastEntities){const i=this.lastEntities[e];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const i=this.htmlEntities[e];t=t.replace(i.regex,i.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Bt(t,e,i,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function zt(t,e,i){const n="*."+i;for(const i in t){const r=t[i];if(n===r||e===r)return!0}return!1}function Ot(t,e,i,n){const r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r+e.length-1}function jt(t,e,i,n=">"){const r=function(t,e,i=">"){let n,r="";for(let o=e;o<t.length;o++){let e=t[o];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===i[0]){if(!i[1])return{data:r,index:o};if(t[o+1]===i[1])return{data:r,index:o}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,n);if(!r)return;let o=r.data;const s=r.index,a=o.search(/\s/);let l=o,c=!0;-1!==a&&(l=o.substr(0,a).replace(/\s\s*$/,""),o=o.substr(a+1));const u=l;if(i){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),c=l!==r.data.substr(t+1))}return{tagName:l,tagExp:o,closeIndex:s,attrExpPresent:c,rawTagName:u}}function Vt(t,e,i){const n=i;let r=1;for(;i<t.length;i++)if("<"===t[i])if("/"===t[i+1]){const o=Ot(t,">",i,`${e} is not closed`);if(t.substring(i+2,o).trim()===e&&(r--,0===r))return{tagContent:t.substring(n,i),i:o};i=o}else if("?"===t[i+1])i=Ot(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=Ot(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=Ot(t,"]]>",i,"StopNode is not closed.")-2;else{const n=jt(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function Rt(t,e,i){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&kt(t,i)}return It.isExist(t)?t:""}var $t={};function Ht(t,e,i){let n;const r={};for(let o=0;o<t.length;o++){const s=t[o],a=Gt(s);let l="";if(l=void 0===i?a:i+"."+a,a===e.textNodeName)void 0===n?n=s[a]:n+=""+s[a];else{if(void 0===a)continue;if(s[a]){let t=Ht(s[a],e,l);const i=Yt(t,e);s[":@"]?Ut(t,s[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(t)):e.isArray(a,l,i)?r[a]=[t]:r[a]=t}}}return"string"==typeof n?n.length>0&&(r[e.textNodeName]=n):void 0!==n&&(r[e.textNodeName]=n),r}function Gt(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function Ut(t,e,i,n){if(e){const r=Object.keys(e),o=r.length;for(let s=0;s<o;s++){const o=r[s];n.isArray(o,i+"."+o,!0,!0)?t[o]=[e[o]]:t[o]=e[o]}}}function Yt(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return!(0!==n&&(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i]))}$t.prettify=function(t,e){return Ht(t,e)};const{buildOptions:Xt}=pt,Wt=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:"₹"}},this.addExternalEntities=Lt,this.parseXml=Ft,this.parseTextData=At,this.resolveNameSpace=Pt,this.buildAttributesMap=Zt,this.isItStopNode=zt,this.replaceEntitiesValue=Mt,this.readStopNodeData=Vt,this.saveTextToParentTag=Bt,this.addChild=Dt}},{prettify:qt}=$t,Qt=X;function Kt(t,e,i,n){let r="",o=!1;for(let s=0;s<t.length;s++){const a=t[s],l=Jt(a);if(void 0===l)continue;let c="";if(c=0===i.length?l:`${i}.${l}`,l===e.textNodeName){let t=a[l];ee(c,e)||(t=e.tagValueProcessor(l,t),t=ie(t,e)),o&&(r+=n),r+=t,o=!1;continue}if(l===e.cdataPropName){o&&(r+=n),r+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,o=!1;continue}if(l===e.commentPropName){r+=n+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,o=!0;continue}if("?"===l[0]){const t=te(a[":@"],e),i="?xml"===l?"":n;let s=a[l][0][e.textNodeName];s=0!==s.length?" "+s:"",r+=i+`<${l}${s}${t}?>`,o=!0;continue}let u=n;""!==u&&(u+=e.indentBy);const d=n+`<${l}${te(a[":@"],e)}`,p=Kt(a[l],e,c,u);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=d+">":r+=d+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?r+=d+`>${p}${n}</${l}>`:(r+=d+">",p&&""!==n&&(p.includes("/>")||p.includes("</"))?r+=n+e.indentBy+p+n:r+=p,r+=`</${l}>`):r+=d+"/>",o=!0}return r}function Jt(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function te(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let r=e.attributeValueProcessor(n,t[n]);r=ie(r,e),!0===r&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${r}"`}return i}function ee(t,e){let i=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+i)return!0;return!1}function ie(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}const ne=function(t,e){let i="";return e.format&&e.indentBy.length>0&&(i="\n"),Kt(t,e,"",i)},re={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function oe(t){this.options=Object.assign({},re,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=le),this.processTextOrObjNode=se,this.options.format?(this.indentate=ae,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function se(t,e,i){const n=this.j2x(t,i+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,i):this.buildObjectNode(n.val,e,n.attrStr,i)}function ae(t){return this.options.indentBy.repeat(t)}function le(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}oe.prototype.build=function(t){return this.options.preserveOrder?ne(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},oe.prototype.j2x=function(t,e){let i="",n="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(typeof t[r]>"u")this.isAttribute(r)&&(n+="");else if(null===t[r])this.isAttribute(r)?n+="":"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)n+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const o=this.isAttribute(r);if(o)i+=this.buildAttrPairStr(o,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const i=t[r].length;let o="";for(let s=0;s<i;s++){const i=t[r][s];typeof i>"u"||(null===i?"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?o+=this.j2x(i,e+1).val:o+=this.processTextOrObjNode(i,r,e):o+=this.buildTextValNode(i,r,"",e))}this.options.oneListGroup&&(o=this.buildObjectNode(o,r,"",e)),n+=o}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const e=Object.keys(t[r]),n=e.length;for(let o=0;o<n;o++)i+=this.buildAttrPairStr(e[o],""+t[r][e[o]])}else n+=this.processTextOrObjNode(t[r],r,e);return{attrStr:i,val:n}},oe.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},oe.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",r=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+o+this.tagEndChar+t+this.indentate(n)+r:this.indentate(n)+"<"+e+i+o+">"+t+r}},oe.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},oe.prototype.buildTextValNode=function(t,e,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+r+"</"+e+this.tagEndChar}},oe.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t};var ce={XMLParser:class{constructor(t){this.externalEntities={},this.options=Xt(t)}parse(t,e){if("string"!=typeof t){if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const i=Qt.validate(t,e);if(!0!==i)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const i=new Wt(this.options);i.addExternalEntities(this.externalEntities);const n=i.parseXml(t);return this.options.preserveOrder||void 0===n?n:qt(n,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 '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}},XMLValidator:X,XMLBuilder:oe};class ue{_view;constructor(t){de(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}}const de=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(t.columns&&t.columns.length>0&&(!t.caption||"string"!=typeof t.caption))throw new Error("View caption is required for top-level views and 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||!0!==ce.XMLValidator.validate(t))return!1;let e;const i=new ce.XMLParser;try{e=i.parse(t)}catch{return!1}return!(!e||!("svg"in e))}(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 is required and must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof U))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");return!0},pe=function(t){return f().registerEntry(t)},fe=function(t){return f().unregisterEntry(t)},he=function(t){return f().getEntries(t).sort(((t,e)=>void 0!==t.order&&void 0!==e.order&&t.order!==e.order?t.order-e.order:t.displayName.localeCompare(e.displayName,void 0,{numeric:!0,sensitivity:"base"})))}},64882:(t,e,i)=>{i.d(e,{$F:()=>gt.N,$U:()=>P.Z,Iw:()=>a.Z,Jh:()=>j.Z,O3:()=>d.Z,O9:()=>wt.Z,P2:()=>Z.Z,QG:()=>ct.Z,SL:()=>U.Z,a0:()=>$.Z,fg:()=>T.Z,gE:()=>ht.Z,h3:()=>ut.Z,qf:()=>et.Z,rw:()=>F.Z});var n=i(72155),r=i(66236),o=i(75944),s=i(45157),a=i(26053),l=i(41989),c=i(99313),u=i(20090),d=i(55212),p=i(96204),f=i(16894),h=i(94162),g=i(40874),m=i(27657),v=i(2047),w=i(92870),y=i(26022),_=i(89998),b=i(51235),x=i(36065),N=i(96315),C=i(66845),I=i(87875),E=i(33429),S=i(56956),k=i(42899),L=i(98445),A=i(13887),P=i(36402),T=i(49231),Z=i(74628),F=i(34741),D=i(13607),M=i(73743),B=i(59897),z=i(89241),O=i(96226),j=i(97947),V=i(26939),R=i(37008),$=i(74764),H=i(6318),G=i(78573),U=i(22175),Y=i(93428),X=i(93815),W=i(40873),q=i(64865),Q=i(3172),K=i(88175),J=i(20435),tt=i(25475),et=i(6156),it=i(16972),nt=i(34246),rt=i(34854),ot=i(42213),st=i(22663),at=i(98212),lt=i(13372),ct=(i(29612),i(93664),i(79753),i(86884)),ut=(i(60577),i(49368)),dt=(i(69183),i(74911)),pt=i(35380),ft=i(56857),ht=i(67912),gt=i(13199),mt=i(13888),vt=i(34509),wt=i(70653),yt=(i(52299),i(50279),i(93911),i(85302),i(90318)),_t=i(17593),bt=(i(79845),i(84722),i(76692),i(40946),i(73045));n.Z,r.Z,o.Z,s.Z,a.Z,l.Z,c.Z,u.Z,p.Z,f.Z,h.Z,d.Z,g.Z,m.Z,v.Z,w.Z,y.Z,_.Z,b.Z,x.Z,N.Z,C.Z,I.Z,E.Z,S.Z,k.Z,L.Z,at.NcAutoCompleteResult,A.N,P.Z,T.Z,Z.Z,F.Z,D.Z,M.Z,B.Z,z.Z,O.Z,j.Z,V.Z,R.Z,$.Z,H.Z,G.Z,U.Z,Y.Z,X.Z,W.N,q.Z,Q.Z,K.Z,J.Z,st.N,tt.Z,et.Z,it.Z,nt.Z,rt.Z,ot.Z,at.default,lt.N,dt.Z,ct.Z,pt.Z,ft.Z,ht.Z,gt.N,wt.Z,ut.Z,mt.Z,vt.Z,Symbol.toStringTag,yt.X,_t.X,bt.VTooltip,Symbol.toStringTag}}]);
|
|
//# sourceMappingURL=8321-8321.js.map?v=1e9a8023ef8296a459a5
|