123 |
- /*! For license information please see 1359-1359.js.LICENSE.txt */
- "use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[1359],{9165:(e,t,i)=>{i.d(t,{$BT:()=>c,Ckb:()=>u,EYN:()=>f,F5c:()=>g,Fzw:()=>v,KR_:()=>p,MXC:()=>h,NZC:()=>l,Tfj:()=>a,ZL5:()=>m,dF:()=>w,fEr:()=>d,lWO:()=>s,mbi:()=>n,qFD:()=>r,vrq:()=>o,zY6:()=>y});var n="M16.61 15.15C16.15 15.15 15.77 14.78 15.77 14.32S16.15 13.5 16.61 13.5H16.61C17.07 13.5 17.45 13.86 17.45 14.32C17.45 14.78 17.07 15.15 16.61 15.15M7.41 15.15C6.95 15.15 6.57 14.78 6.57 14.32C6.57 13.86 6.95 13.5 7.41 13.5H7.41C7.87 13.5 8.24 13.86 8.24 14.32C8.24 14.78 7.87 15.15 7.41 15.15M16.91 10.14L18.58 7.26C18.67 7.09 18.61 6.88 18.45 6.79C18.28 6.69 18.07 6.75 18 6.92L16.29 9.83C14.95 9.22 13.5 8.9 12 8.91C10.47 8.91 9 9.24 7.73 9.82L6.04 6.91C5.95 6.74 5.74 6.68 5.57 6.78C5.4 6.87 5.35 7.08 5.44 7.25L7.1 10.13C4.25 11.69 2.29 14.58 2 18H22C21.72 14.59 19.77 11.7 16.91 10.14H16.91Z",r="M2.09 16.8H3.75V9.76H2.09M2.92 8.84C3.44 8.84 3.84 8.44 3.84 7.94C3.84 7.44 3.44 7.04 2.92 7.04C2.4 7.04 2 7.44 2 7.94C2 8.44 2.4 8.84 2.92 8.84M9.25 7.06C6.46 7.06 4.7 8.96 4.7 12C4.7 15.06 6.46 16.96 9.25 16.96C12.04 16.96 13.8 15.06 13.8 12C13.8 8.96 12.04 7.06 9.25 7.06M9.25 8.5C10.96 8.5 12.05 9.87 12.05 12C12.05 14.15 10.96 15.5 9.25 15.5C7.54 15.5 6.46 14.15 6.46 12C6.46 9.87 7.54 8.5 9.25 8.5M14.5 14.11C14.57 15.87 16 16.96 18.22 16.96C20.54 16.96 22 15.82 22 14C22 12.57 21.18 11.77 19.23 11.32L18.13 11.07C16.95 10.79 16.47 10.42 16.47 9.78C16.47 9 17.2 8.45 18.28 8.45C19.38 8.45 20.13 9 20.21 9.89H21.84C21.8 8.2 20.41 7.06 18.29 7.06C16.21 7.06 14.73 8.21 14.73 9.91C14.73 11.28 15.56 12.13 17.33 12.53L18.57 12.82C19.78 13.11 20.27 13.5 20.27 14.2C20.27 15 19.47 15.57 18.31 15.57C17.15 15.57 16.26 15 16.16 14.11H14.5Z",s="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,14.09 4.8,16 6.11,17.41L9.88,9.88L17.41,6.11C16,4.8 14.09,4 12,4M12,20A8,8 0 0,0 20,12C20,9.91 19.2,8 17.89,6.59L14.12,14.12L6.59,17.89C8,19.2 9.91,20 12,20M12,12L11.23,11.23L9.7,14.3L12.77,12.77L12,12M12,17.5H13V19H12V17.5M15.88,15.89L16.59,15.18L17.65,16.24L16.94,16.95L15.88,15.89M17.5,12V11H19V12H17.5M12,6.5H11V5H12V6.5M8.12,8.11L7.41,8.82L6.35,7.76L7.06,7.05L8.12,8.11M6.5,12V13H5V12H6.5Z",o="M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z",a="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",l="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",c="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",u="M9.27 7.94C9.27 7.94 9.27 7.94 9.27 7.94M6.85 6.74C6.86 6.74 6.86 6.74 6.85 6.74M21.28 8.6C20.85 7.55 19.96 6.42 19.27 6.06C19.83 7.17 20.16 8.28 20.29 9.1L20.29 9.12C19.16 6.3 17.24 5.16 15.67 2.68C15.59 2.56 15.5 2.43 15.43 2.3C15.39 2.23 15.36 2.16 15.32 2.09C15.26 1.96 15.2 1.83 15.17 1.69C15.17 1.68 15.16 1.67 15.15 1.67H15.13L15.12 1.67L15.12 1.67L15.12 1.67C12.9 2.97 11.97 5.26 11.74 6.71C11.05 6.75 10.37 6.92 9.75 7.22C9.63 7.27 9.58 7.41 9.62 7.53C9.67 7.67 9.83 7.74 9.96 7.68C10.5 7.42 11.1 7.27 11.7 7.23L11.75 7.23C11.83 7.22 11.92 7.22 12 7.22C12.5 7.21 12.97 7.28 13.44 7.42L13.5 7.44C13.6 7.46 13.67 7.5 13.75 7.5C13.8 7.54 13.86 7.56 13.91 7.58L14.05 7.64C14.12 7.67 14.19 7.7 14.25 7.73C14.28 7.75 14.31 7.76 14.34 7.78C14.41 7.82 14.5 7.85 14.54 7.89C14.58 7.91 14.62 7.94 14.66 7.96C15.39 8.41 16 9.03 16.41 9.77C15.88 9.4 14.92 9.03 14 9.19C17.6 11 16.63 17.19 11.64 16.95C11.2 16.94 10.76 16.85 10.34 16.7C10.24 16.67 10.14 16.63 10.05 16.58C10 16.56 9.93 16.53 9.88 16.5C8.65 15.87 7.64 14.68 7.5 13.23C7.5 13.23 8 11.5 10.83 11.5C11.14 11.5 12 10.64 12.03 10.4C12.03 10.31 10.29 9.62 9.61 8.95C9.24 8.59 9.07 8.42 8.92 8.29C8.84 8.22 8.75 8.16 8.66 8.1C8.43 7.3 8.42 6.45 8.63 5.65C7.6 6.12 6.8 6.86 6.22 7.5H6.22C5.82 7 5.85 5.35 5.87 5C5.86 5 5.57 5.16 5.54 5.18C5.19 5.43 4.86 5.71 4.56 6C4.21 6.37 3.9 6.74 3.62 7.14C3 8.05 2.5 9.09 2.28 10.18C2.28 10.19 2.18 10.59 2.11 11.1L2.08 11.33C2.06 11.5 2.04 11.65 2 11.91L2 11.94L2 12.27L2 12.32C2 17.85 6.5 22.33 12 22.33C16.97 22.33 21.08 18.74 21.88 14C21.9 13.89 21.91 13.76 21.93 13.63C22.13 11.91 21.91 10.11 21.28 8.6Z",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",p="M12,20L15.46,14H15.45C15.79,13.4 16,12.73 16,12C16,10.8 15.46,9.73 14.62,9H19.41C19.79,9.93 20,10.94 20,12A8,8 0 0,1 12,20M4,12C4,10.54 4.39,9.18 5.07,8L8.54,14H8.55C9.24,15.19 10.5,16 12,16C12.45,16 12.88,15.91 13.29,15.77L10.89,19.91C7,19.37 4,16.04 4,12M15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12M12,4C14.96,4 17.54,5.61 18.92,8H12C10.06,8 8.45,9.38 8.08,11.21L5.7,7.08C7.16,5.21 9.44,4 12,4M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",f="M7 14C5.9 14 5 13.1 5 12S5.9 10 7 10 9 10.9 9 12 8.1 14 7 14M12.6 10C11.8 7.7 9.6 6 7 6C3.7 6 1 8.7 1 12S3.7 18 7 18C9.6 18 11.8 16.3 12.6 14H16V18H20V14H23V10H12.6Z",h="M10.86 15.37C10.17 14.6 9.7 13.68 9.55 12.65C9.25 13.11 9 13.61 8.82 14.15C7.9 16.9 9.5 20.33 12.22 21.33C14.56 22.11 17.19 20.72 18.92 19.2C19.18 18.85 21.23 17.04 20.21 16.84C17.19 18.39 13.19 17.95 10.86 15.37M11.46 9.56C12.5 9.55 11.5 9.13 11.07 8.81C10.03 8.24 8.81 7.96 7.63 7.96C3.78 8 .995 10.41 2.3 14.4C3.24 18.28 6.61 21.4 10.59 21.9C8.54 20.61 7.3 18.19 7.3 15.78C7.38 13.25 8.94 10.28 11.46 9.56M2.78 8.24C5.82 6 10.66 6.18 13.28 9C14.3 10.11 15 12 14.07 13.37C12.33 15.25 17.15 15.5 18.18 15.22C21.92 14.5 22.91 10.15 21.13 7.15C19.43 3.75 15.66 1.97 11.96 2C7.9 1.93 4.25 4.5 2.78 8.24Z",g="M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z",m="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",w="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z",v="M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z",y="M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},26734:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M15.4%2016.6L10.8%2012l4.6-4.6L14%206l-6%206%206%206%201.4-1.4z%27/%3e%3c/svg%3e"},51338:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M18.4%207.4L17%206l-6%206%206%206%201.4-1.4-4.6-4.6%204.6-4.6m-6%200L11%206l-6%206%206%206%201.4-1.4L7.8%2012l4.6-4.6z%27/%3e%3c/svg%3e"},57818:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M5.6%207.4L7%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6m6%200L13%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6z%27/%3e%3c/svg%3e"},31926:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M8.6%2016.6l4.6-4.6-4.6-4.6L10%206l6%206-6%206-1.4-1.4z%27/%3e%3c/svg%3e"},61421:(e,t,i)=>{i.r(t),i.d(t,{default:()=>j});var n=i(85471),r=i(35810),s=i(53334),o=i(76333),a=i(38613);const l=(e,t,i)=>{const n=Object.assign({escape:!0},i||{});return"/"!==e.charAt(0)&&(e="/"+e),r=(r=t||{})||{},e.replace(/{([^{}]*)}/g,(function(e,t){const i=r[t];return n.escape?encodeURIComponent("string"==typeof i||"number"==typeof i?i.toString():e):"string"==typeof i||"number"==typeof i?i.toString():e}));var r},c=(e,t,i)=>{var n,r,s;const o=Object.assign({noRewrite:!1},i||{}),a=null!=(n=null==i?void 0:i.baseURL)?n:d();return!0!==(null==(s=null==(r=null==window?void 0:window.OC)?void 0:r.config)?void 0:s.modRewriteWorking)||o.noRewrite?a+"/index.php"+l(e,t,i):a+l(e,t,i)},u=()=>window.location.protocol+"//"+window.location.host+d();function d(){let e=window._oc_webroot;if(typeof e>"u"){e=location.pathname;const t=e.indexOf("/index.php/");if(-1!==t)e=e.slice(0,t);else{const t=e.indexOf("/",1);e=e.slice(0,t>0?t:void 0)}}return e}var p=i(59271),f=i(26287),h=i(10523),g=i(92457),m=i(54914),w=i(9165),v=i(61338),y=i(43627),_=i(96763);function b(e,t,i,n,r,s,o,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),o?(l=function(e){!(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)&&typeof __VUE_SSR_CONTEXT__<"u"&&(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},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(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}const C=b({name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"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"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null,null).exports,N=()=>{const e=(0,n.KR)(!0);return(0,n.KC)((()=>{e.value="1"===document.getElementById("isPublic")?.value})),{isPublic:e}},x=()=>{const e=(0,a.C)("files","config",null),t=(0,n.KR)(e?.show_hidden??!0),i=(0,n.KR)(e?.sort_favorites_first??!0),r=(0,n.KR)(e?.crop_image_previews??!0),{isPublic:s}=N();return(0,n.sV)((async()=>{if(s.value)_.debug("Skip loading files settings - currently on public share");else try{const{data:e}=await f.A.get(c("/apps/files/api/v1/configs"));t.value=e?.data?.show_hidden??!1,i.value=e?.data?.sort_favorites_first??!0,r.value=e?.data?.crop_image_previews??!0}catch(e){_.error("Could not load files settings",e),(0,h.k)((0,h.t)("Could not load files settings"))}})),{showHiddenFiles:t,sortFavoritesFirst:i,cropImagePreviews:r}},E=b({name:"MenuUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon menu-up-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7,15L12,10L17,15H7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null,null).exports,A=b({name:"MenuDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon menu-down-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M7,10L12,15L17,10H7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null,null).exports,k={"file-picker__file-icon":"_file-picker__file-icon_1vgv4_5"},L=b((0,n.pM)({__name:"LoadingTableRow",props:{showCheckbox:{type:Boolean}},setup:e=>({__sfc:!0,fileListIconStyles:k})}),(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("tr",{staticClass:"file-picker__row loading-row",attrs:{"aria-hidden":"true"}},[e.showCheckbox?t("td",{staticClass:"row-checkbox"},[t("span")]):e._e(),t("td",{staticClass:"row-name"},[t("div",{staticClass:"row-wrapper"},[t("span",{class:i.fileListIconStyles["file-picker__file-icon"]}),t("span")])]),e._m(0),e._m(1)])}),[function(){var e=this._self._c;return this._self._setupProxy,e("td",{staticClass:"row-size"},[e("span")])},function(){var e=this._self._c;return this._self._setupProxy,e("td",{staticClass:"row-modified"},[e("span")])}],!1,null,"6aded0d9",null,null).exports,S=b({name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,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"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null,null).exports,I=b((0,n.pM)({name:"FilePreview",props:{node:null,cropImagePreviews:{type:Boolean}},setup(e){const t=e,i=(0,n.KR)(k),s=(0,n.EW)((()=>function(e,t={}){t={size:32,cropPreview:!1,mimeFallback:!0,...t};try{const i=e.attributes?.previewUrl||c("/core/preview?fileId={fileid}",{fileid:e.fileid});let n;try{n=new URL(i)}catch{n=new URL(i,window.location.origin)}return n.searchParams.set("x",`${t.size}`),n.searchParams.set("y",`${t.size}`),n.searchParams.set("mimeFallback",`${t.mimeFallback}`),n.searchParams.set("a",!0===t.cropPreview?"0":"1"),n.searchParams.set("c",`${e.attributes.etag}`),n}catch{return null}}(t.node,{cropPreview:t.cropImagePreviews}))),o=(0,n.EW)((()=>t.node.type===r.pt.File)),a=(0,n.KR)(!1);return(0,n.wB)(s,(()=>{if(a.value=!1,s.value){const e=document.createElement("img");e.src=s.value.href,e.onerror=()=>e.remove(),e.onload=()=>{a.value=!0,e.remove()},document.body.appendChild(e)}}),{immediate:!0}),{__sfc:!0,fileListIconStyles:i,props:t,previewURL:s,isFile:o,canLoadPreview:a,IconFile:C,IconFolder:S}}}),(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("div",{class:i.fileListIconStyles["file-picker__file-icon"],style:i.canLoadPreview?{backgroundImage:`url(${i.previewURL})`}:void 0},[i.canLoadPreview?e._e():[i.isFile?t(i.IconFile,{attrs:{size:20}}):t(i.IconFolder,{attrs:{size:20}})]],2)}),[],!1,null,null,null,null).exports,P=(0,n.pM)({__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(e,{emit:t}){const i=e,s=(0,n.EW)((()=>i.node.attributes?.displayName||i.node.basename.slice(0,i.node.extension?-i.node.extension.length:void 0))),a=(0,n.EW)((()=>i.node.extension)),l=(0,n.EW)((()=>i.node.type===r.pt.Folder)),c=(0,n.EW)((()=>i.canPick&&(i.allowPickDirectory||!l.value)));function u(){t("update:selected",!i.selected)}function d(){l.value?t("enter-directory",i.node):u()}return{__sfc:!0,props:i,emit:t,displayName:s,fileExtension:a,isDirectory:l,isPickable:c,toggleSelected:u,handleClick:d,handleKeyDown:function(e){"Enter"===e.key&&d()},formatFileSize:r.v7,NcCheckboxRadioSwitch:o.AO,NcDateTime:o.lT,t:h.t,FilePreview:I}}}),F=b(P,(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("tr",e._g({class:["file-picker__row",{"file-picker__row--selected":e.selected&&!e.showCheckbox}],attrs:{tabindex:e.showCheckbox&&!i.isDirectory?void 0:0,"aria-selected":i.isPickable?e.selected:void 0,"data-filename":e.node.basename,"data-testid":"file-list-row"}},{click:i.handleClick,...!e.showCheckbox||i.isDirectory?{keydown:i.handleKeyDown}:{}}),[e.showCheckbox?t("td",{staticClass:"row-checkbox",on:{click:function(e){return e.stopPropagation(),(()=>{}).apply(null,arguments)}}},[t(i.NcCheckboxRadioSwitch,{attrs:{"aria-label":i.t("Select the row for {nodename}",{nodename:i.displayName}),checked:e.selected,disabled:!i.isPickable,"data-testid":"row-checkbox"},on:{"update:checked":i.toggleSelected}})],1):e._e(),t("td",{staticClass:"row-name"},[t("div",{staticClass:"file-picker__name-container",attrs:{"data-testid":"row-name"}},[t(i.FilePreview,{attrs:{node:e.node,"crop-image-previews":e.cropImagePreviews}}),t("div",{staticClass:"file-picker__file-name",attrs:{title:i.displayName},domProps:{textContent:e._s(i.displayName)}}),t("div",{staticClass:"file-picker__file-extension",domProps:{textContent:e._s(i.fileExtension)}})],1)]),t("td",{staticClass:"row-size"},[e._v(" "+e._s(i.formatFileSize(e.node.size||0))+" ")]),t("td",{staticClass:"row-modified"},[t(i.NcDateTime,{attrs:{timestamp:e.node.mtime,"ignore-seconds":!0}})],1)])}),[],!1,null,"48df4f27",null,null).exports,V=(0,n.pM)({__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(e,{emit:t}){const i=e,l=(0,n.KR)(),{currentConfig:u}=(e=>{const t=e=>"asc"===e?"ascending":"desc"===e?"descending":"none",i=(0,a.C)("files","viewConfigs",null),r=(0,n.KR)({sortBy:i?.files?.sorting_mode??"basename",order:t(i?.files?.sorting_direction??"asc")}),s=(0,n.KR)({sortBy:i?.recent?.sorting_mode??"basename",order:t(i?.recent?.sorting_direction??"asc")}),o=(0,n.KR)({sortBy:i?.favorites?.sorting_mode??"basename",order:t(i?.favorites?.sorting_direction??"asc")}),{isPublic:l}=N();(0,n.sV)((async()=>{if(l.value)_.debug("Skip loading files views - currently on public share");else try{const{data:e}=await f.A.get(c("/apps/files/api/v1/views"));r.value={sortBy:e?.data?.files?.sorting_mode??"basename",order:t(e?.data?.files?.sorting_direction)},o.value={sortBy:e?.data?.favorites?.sorting_mode??"basename",order:t(e?.data?.favorites?.sorting_direction)},s.value={sortBy:e?.data?.recent?.sorting_mode??"basename",order:t(e?.data?.recent?.sorting_direction)}}catch(e){_.error("Could not load files views",e),(0,h.k)((0,h.t)("Could not load files views"))}}));const u=(0,n.EW)((()=>"files"===(0,p.BA)(e||"files")?r.value:"recent"===(0,p.BA)(e)?s.value:o.value)),d=(0,n.EW)((()=>u.value.sortBy)),g=(0,n.EW)((()=>u.value.order));return{filesViewConfig:r,favoritesViewConfig:o,recentViewConfig:s,currentConfig:u,sortBy:d,order:g}})(i.currentView),d=(0,n.EW)((()=>l.value??u.value)),g=(0,n.EW)((()=>"basename"===d.value.sortBy?"none"===d.value.order?void 0:d.value.order:void 0)),m=(0,n.EW)((()=>"size"===d.value.sortBy?"none"===d.value.order?void 0:d.value.order:void 0)),w=(0,n.EW)((()=>"mtime"===d.value.sortBy?"none"===d.value.order?void 0:d.value.order:void 0)),{sortFavoritesFirst:v,cropImagePreviews:y}=x(),b=(0,n.EW)((()=>{const e={ascending:(e,t,i)=>i(e,t),descending:(e,t,i)=>i(t,e),none:(e,t,i)=>0},t={basename:(e,t)=>(e.attributes?.displayName||e.basename).localeCompare(t.attributes?.displayName||t.basename,(0,s.lO)()),size:(e,t)=>(e.size||0)-(t.size||0),mtime:(e,t)=>(t.mtime?.getTime?.()||0)-(e.mtime?.getTime?.()||0)};return[...i.files].sort(((i,n)=>(n.type===r.pt.Folder?1:0)-(i.type===r.pt.Folder?1:0)||(v?(n.attributes.favorite?1:0)-(i.attributes.favorite?1:0):0)||e[d.value.order](i,n,t[d.value.sortBy])))})),C=(0,n.EW)((()=>i.files.filter((e=>i.allowPickDirectory||e.type!==r.pt.Folder)))),k=(0,n.EW)((()=>!i.loading&&i.selectedFiles.length>0&&i.selectedFiles.length>=C.value.length)),S=(0,n.KR)(4),I=(0,n.KR)();{const e=()=>(0,n.dY)((()=>{const e=I.value?.parentElement?.children||[];let t=I.value?.parentElement?.clientHeight||450;for(let i=0;i<e.length;i++)I.value?.isSameNode(e[i])||(t-=e[i].clientHeight);S.value=Math.floor((t-50)/50)}));(0,n.sV)((()=>{window.addEventListener("resize",e),e()})),(0,n.hi)((()=>{window.removeEventListener("resize",e)}))}return{__sfc:!0,props:i,emit:t,customSortingConfig:l,filesAppSorting:u,sortingConfig:d,sortByName:g,sortBySize:m,sortByModified:w,toggleSorting:e=>{d.value.sortBy===e?"ascending"===d.value.order?l.value={sortBy:d.value.sortBy,order:"descending"}:l.value={sortBy:d.value.sortBy,order:"ascending"}:l.value={sortBy:e,order:"ascending"}},sortFavoritesFirst:v,cropImagePreviews:y,sortedFiles:b,selectableFiles:C,allSelected:k,onSelectAll:function(){i.selectedFiles.length<C.value.length?t("update:selectedFiles",C.value):t("update:selectedFiles",[])},onNodeSelected:function(e){i.selectedFiles.includes(e)?t("update:selectedFiles",i.selectedFiles.filter((t=>t.path!==e.path))):i.multiselect?t("update:selectedFiles",[...i.selectedFiles,e]):t("update:selectedFiles",[e])},onChangeDirectory:function(e){t("update:path",e.path)},skeletonNumber:S,fileContainer:I,NcButton:o.x1,NcCheckboxRadioSwitch:o.AO,t:h.t,IconSortAscending:E,IconSortDescending:A,LoadingTableRow:L,FileListRow:F}}}),T=b(V,(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("div",{ref:"fileContainer",staticClass:"file-picker__files"},[t("table",[t("thead",[t("tr",[e.multiselect?t("th",{staticClass:"row-checkbox"},[t("span",{staticClass:"hidden-visually"},[e._v(" "+e._s(i.t("Select entry"))+" ")]),e.multiselect?t(i.NcCheckboxRadioSwitch,{attrs:{"aria-label":i.t("Select all entries"),checked:i.allSelected,"data-testid":"select-all-checkbox"},on:{"update:checked":i.onSelectAll}}):e._e()],1):e._e(),t("th",{staticClass:"row-name",attrs:{"aria-sort":i.sortByName}},[t("div",{staticClass:"header-wrapper"},[t("span",{staticClass:"file-picker__header-preview"}),t(i.NcButton,{attrs:{wide:!0,type:"tertiary","data-test":"file-picker_sort-name"},on:{click:function(e){return i.toggleSorting("basename")}},scopedSlots:e._u([{key:"icon",fn:function(){return["ascending"===i.sortByName?t(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortByName?t(i.IconSortDescending,{attrs:{size:20}}):t("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(i.t("Name"))+" ")])],1)]),t("th",{staticClass:"row-size",attrs:{"aria-sort":i.sortBySize}},[t(i.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(e){return i.toggleSorting("size")}},scopedSlots:e._u([{key:"icon",fn:function(){return["ascending"===i.sortBySize?t(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortBySize?t(i.IconSortDescending,{attrs:{size:20}}):t("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(i.t("Size"))+" ")])],1),t("th",{staticClass:"row-modified",attrs:{"aria-sort":i.sortByModified}},[t(i.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(e){return i.toggleSorting("mtime")}},scopedSlots:e._u([{key:"icon",fn:function(){return["ascending"===i.sortByModified?t(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortByModified?t(i.IconSortDescending,{attrs:{size:20}}):t("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(i.t("Modified"))+" ")])],1)])]),t("tbody",[e.loading?e._l(i.skeletonNumber,(function(n){return t(i.LoadingTableRow,{key:n,attrs:{"show-checkbox":e.multiselect}})})):e._l(i.sortedFiles,(function(n){return t(i.FileListRow,{key:n.fileid||n.path,attrs:{"allow-pick-directory":e.allowPickDirectory,"show-checkbox":e.multiselect,"can-pick":e.multiselect||0===e.selectedFiles.length||e.selectedFiles.includes(n),selected:e.selectedFiles.includes(n),node:n,"crop-image-previews":i.cropImagePreviews},on:{"update:selected":function(e){return i.onNodeSelected(n)},"enter-directory":i.onChangeDirectory}})}))],2)])])}),[],!1,null,"d3c94818",null,null).exports,M=b({name:"HomeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon home-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null,null).exports,O=b({name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon plus-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null,null).exports,B=(0,n.pM)({__name:"FilePickerBreadcrumbs",props:{path:null,showMenu:{type:Boolean}},emits:["update:path","create-node"],setup(e,{emit:t}){const i=e,r=(0,n.KR)(""),s=(0,n.KR)();function a(){const e=r.value.trim(),t=s.value?.$el?.querySelector("input");let i="";return 0===e.length?i=(0,h.t)("Folder name cannot be empty."):e.includes("/")?i=(0,h.t)('"/" is not allowed inside a folder name.'):["..","."].includes(e)?i=(0,h.t)('"{name}" is an invalid folder name.',{name:e}):window.OC.config?.blacklist_files_regex&&e.match(window.OC.config?.blacklist_files_regex)&&(i=(0,h.t)('"{name}" is not an allowed folder name',{name:e})),t&&t.setCustomValidity(i),""===i}const l=(0,n.EW)((()=>i.path.split("/").filter((e=>""!==e)).map(((e,t,i)=>({name:e,path:"/"+i.slice(0,t+1).join("/")})))));return{__sfc:!0,props:i,emit:t,newNodeName:r,nameInput:s,validateInput:a,onSubmit:function(){const e=r.value.trim();a()&&(t("create-node",e),r.value="")},pathElements:l,IconFolder:S,IconHome:M,IconPlus:O,NcActions:o.B6,NcActionInput:o.Az,NcBreadcrumbs:o.Qz,NcBreadcrumb:o.R1,t:h.t}}}),H=b(B,(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(i.NcBreadcrumbs,{staticClass:"file-picker__breadcrumbs",scopedSlots:e._u([{key:"default",fn:function(){return[t(i.NcBreadcrumb,{attrs:{name:i.t("All files"),title:i.t("Home")},on:{click:function(e){return i.emit("update:path","/")}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconHome,{attrs:{size:20}})]},proxy:!0}])}),e._l(i.pathElements,(function(e){return t(i.NcBreadcrumb,{key:e.path,attrs:{name:e.name,title:e.path},on:{click:function(t){return i.emit("update:path",e.path)}}})}))]},proxy:!0},e.showMenu?{key:"actions",fn:function(){return[t(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(e){i.newNodeName=""}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconPlus,{attrs:{size:20}})]},proxy:!0}],null,!1,2971667417)},[t(i.NcActionInput,{ref:"nameInput",attrs:{value:i.newNodeName,label:i.t("New folder"),placeholder:i.t("New folder name")},on:{"update:value":function(e){i.newNodeName=e},submit:i.onSubmit,input:i.validateInput},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconFolder,{attrs:{size:20}})]},proxy:!0}],null,!1,1614167509)})],1)]},proxy:!0}:null],null,!0)})}),[],!1,null,"a25a2652",null,null).exports,$=b({name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,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"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null,null).exports,D=b({name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon magnify-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9.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"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null,null).exports,R=b((0,n.pM)({__name:"FilePickerNavigation",props:{currentView:null,filterString:null,isCollapsed:{type:Boolean},disabledNavigation:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(e,{emit:t}){const i=e,{availableViews:r}=(e=>{const t=[{id:"files",label:(0,h.t)("All files"),icon:w.fEr},{id:"recent",label:(0,h.t)("Recent"),icon:w.NZC},{id:"favorites",label:(0,h.t)("Favorites"),icon:w.ZL5}],i=e.value?t.filter((({id:e})=>"files"===e)):t;return{allViews:t,availableViews:i}})((0,n.KR)(null===(0,g.HW)())),s=(0,n.EW)((()=>r.filter((e=>e.id===i.currentView))[0]??r[0]));return{__sfc:!0,props:i,emit:t,availableViews:r,currentViewObject:s,updateFilterValue:e=>t("update:filterString",e),IconClose:$,IconMagnify:D,NcButton:o.x1,NcIconSvgWrapper:o.K1,NcSelect:o.EQ,NcTextField:o.v,Fragment:m.F,t:h.t}}}),(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(i.Fragment,[t(i.NcTextField,{staticClass:"file-picker__filter-input",attrs:{value:e.filterString,label:i.t("Filter file list"),"show-trailing-button":!!e.filterString},on:{"update:value":i.updateFilterValue,"trailing-button-click":function(e){return i.updateFilterValue("")}},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[t(i.IconClose,{attrs:{size:16}})]},proxy:!0}])},[t(i.IconMagnify,{attrs:{size:16}})],1),i.availableViews.length>1&&!e.disabledNavigation?[e.isCollapsed?t(i.NcSelect,{attrs:{"aria-label":i.t("Current view selector"),clearable:!1,searchable:!1,options:i.availableViews,value:i.currentViewObject},on:{input:e=>i.emit("update:currentView",e.id)}}):t("ul",{staticClass:"file-picker__side"},e._l(i.availableViews,(function(n){return t("li",{key:n.id},[t(i.NcButton,{attrs:{type:e.currentView===n.id?"primary":"tertiary",wide:!0},on:{click:function(t){return e.$emit("update:currentView",n.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.NcIconSvgWrapper,{attrs:{path:n.icon,size:20}})]},proxy:!0}],null,!0)},[e._v(" "+e._s(n.label)+" ")])],1)})),0)]:e._e()],2)}),[],!1,null,"a06474d4",null,null).exports,z=(0,n.pM)({name:"FilePicker",props:{buttons:null,name:null,allowPickDirectory:{type:Boolean,default:!1},disabledNavigation:{type:Boolean,default:!1},container:{default:"body"},filterFn:{default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!0},path:{default:void 0}},emits:["close"],setup(e,{emit:t}){const i=e,{isPublic:s}=N(),a=(0,n.KR)(!0),l=(0,n.EW)((()=>("function"==typeof i.buttons?i.buttons(g.value,b.value,p.value):i.buttons).map((e=>({...e,callback:()=>{c=!0,d(e.callback)}})))));let c=!1;const d=async e=>{const n=0===g.value.length&&i.allowPickDirectory?[await I(b.value)]:g.value;e(n),t("close",n),c=!1},p=(0,n.KR)("files"),f=(0,n.EW)((()=>"favorites"===p.value?(0,h.t)("Favorites"):"recent"===p.value?(0,h.t)("Recent"):"")),g=(0,n.KR)([]),m=(0,n.KR)(window?.sessionStorage.getItem("NC.FilePicker.LastPath")||"/"),w=(0,n.KR)(),b=(0,n.EW)({get:()=>"files"===p.value?w.value||i.path||m.value:"/",set:e=>{void 0===i.path&&window.sessionStorage.setItem("NC.FilePicker.LastPath",e),w.value=e,g.value=[]}}),E=(0,n.KR)(""),{isSupportedMimeType:A}=function(e){const t=(0,n.EW)((()=>e.value.map((e=>e.split("/")))));return{isSupportedMimeType:e=>{const i=e.split("/");return t.value.some((([e,t])=>!(i[0]!==e&&"*"!==e||i[1]!==t&&"*"!==t)))}}}((0,n.lW)(i,"mimetypeFilter")),{files:k,isLoading:L,loadFiles:S,getFile:I,createDirectory:P}=function(e,t,i){const s=(0,n.EW)((()=>i.value?"/":r.lJ)),o=(0,n.EW)((()=>i.value?(u()+"/remote.php/webdav").replace("/remote.php","/public.php"):r.PY)),a=(0,n.EW)((()=>{if(i.value){const e=document.getElementById("sharingToken").value,t=btoa(`${e}:null`);return(0,r.H4)(o.value,{Authorization:`Basic ${t}`})}return(0,r.H4)()})),l=e=>(0,r.Al)(e,s.value,o.value),c=(0,n.KR)([]),d=(0,n.KR)(!0);async function p(e,t=void 0){t=t??s.value;const{data:i}=await a.value.stat(`${t}${e}`,{details:!0});return l(i)}async function f(){if(d.value=!0,"favorites"===e.value)c.value=await(0,r.Q$)(a.value,t.value,s.value);else if("recent"===e.value){const e=Math.round(Date.now()/1e3)-1209600,{data:t}=await a.value.search("/",{details:!0,data:(0,r.R3)(e)});c.value=t.results.map(l)}else{const e=await a.value.getDirectoryContents(`${s.value}${t.value}`,{details:!0,data:(0,r.VL)()});c.value=e.data.map(l),i.value&&(c.value=c.value.filter((e=>e.path!==t.value)))}d.value=!1}return(0,n.wB)([e,t],(()=>f())),(0,n.sV)((()=>f())),{isLoading:d,files:c,loadFiles:f,getFile:p,createDirectory:async function(e){const i=(0,y.join)(t.value,e);await a.value.createDirectory((0,y.join)(s.value,i));const n=await p(i);return c.value.push(n),n}}}(p,b,s);(0,n.sV)((()=>S()));const{showHiddenFiles:F}=x(),V=(0,n.EW)((()=>{let e=k.value;return F.value||(e=e.filter((e=>!e.basename.startsWith(".")))),i.mimetypeFilter.length>0&&(e=e.filter((e=>"folder"===e.type||e.mime&&A(e.mime)))),E.value&&(e=e.filter((e=>e.basename.toLowerCase().includes(E.value.toLowerCase())))),i.filterFn&&(e=e.filter((e=>i.filterFn(e)))),e})),M=(0,n.EW)((()=>"files"===p.value?(0,h.t)("Upload some content or sync with your devices!"):"recent"===p.value?(0,h.t)("Files and folders you recently modified will show up here."):(0,h.t)("Files and folders you mark as favorite will show up here.")));return{__sfc:!0,props:i,emit:t,isPublic:s,isOpen:a,dialogButtons:l,isHandlingCallback:c,handleButtonClick:d,currentView:p,viewHeadline:f,selectedFiles:g,savedPath:m,navigatedPath:w,currentPath:b,filterString:E,isSupportedMimeType:A,files:k,isLoading:L,loadFiles:S,getFile:I,createDirectory:P,showHiddenFiles:F,filteredFiles:V,noFilesDescription:M,onCreateFolder:async e=>{try{await P(e),(0,v.Ic)("files:node:created",k.value.filter((t=>t.basename===e))[0])}catch(t){_.warn("Could not create new folder",{name:e,error:t}),(0,h.k)((0,h.t)("Could not create the new folder"))}},handleClose:e=>{!e&&!c&&t("close")},IconFile:C,FileList:T,FilePickerBreadcrumbs:H,FilePickerNavigation:R,NcDialog:o.i$,NcEmptyContent:o.yI,t:h.t}}}),j=b(z,(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(i.NcDialog,{attrs:{container:e.container,buttons:i.dialogButtons,name:e.name,size:"large","content-classes":"file-picker__content","dialog-classes":"file-picker","navigation-classes":"file-picker__navigation",open:i.isOpen},on:{"update:open":[function(e){i.isOpen=e},i.handleClose]},scopedSlots:e._u([{key:"navigation",fn:function({isCollapsed:n}){return[t(i.FilePickerNavigation,{attrs:{"is-collapsed":n,"current-view":i.currentView,"filter-string":i.filterString,"disabled-navigation":e.disabledNavigation},on:{"update:currentView":function(e){i.currentView=e},"update:current-view":function(e){i.currentView=e},"update:filterString":function(e){i.filterString=e},"update:filter-string":function(e){i.filterString=e}}})]}}])},[t("div",{staticClass:"file-picker__main"},["files"===i.currentView?t(i.FilePickerBreadcrumbs,{attrs:{path:i.currentPath,"show-menu":e.allowPickDirectory},on:{"update:path":function(e){i.currentPath=e},"create-node":i.onCreateFolder}}):t("div",{staticClass:"file-picker__view"},[t("h3",[e._v(e._s(i.viewHeadline))])]),i.isLoading||i.filteredFiles.length>0?t(i.FileList,{attrs:{"allow-pick-directory":e.allowPickDirectory,"current-view":i.currentView,files:i.filteredFiles,multiselect:e.multiselect,loading:i.isLoading,path:i.currentPath,"selected-files":i.selectedFiles,name:i.viewHeadline},on:{"update:path":[function(e){i.currentPath=e},function(e){i.currentView="files"}],"update:selectedFiles":function(e){i.selectedFiles=e},"update:selected-files":function(e){i.selectedFiles=e}}}):i.filterString?t(i.NcEmptyContent,{attrs:{name:i.t("No matching files"),description:i.t("No files matching your filter were found.")},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconFile)]},proxy:!0}])}):t(i.NcEmptyContent,{attrs:{name:i.t("No files in here"),description:i.noFilesDescription},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.IconFile)]},proxy:!0}])})],1)])}),[],!1,null,"9def3ca4",null,null).exports},35810:(e,t,i)=>{i.d(t,{Al:()=>W,By:()=>C,Gg:()=>_,H4:()=>z,PY:()=>R,Q$:()=>j,R3:()=>P,Ss:()=>dt,VL:()=>S,VP:()=>U,Yc:()=>A,ZH:()=>H,aX:()=>N,b2:()=>I,bP:()=>B,bh:()=>Z,gj:()=>ht,hY:()=>y,lJ:()=>D,lT:()=>w,m1:()=>gt,m9:()=>v,pt:()=>V,qK:()=>b,v7:()=>m,vb:()=>F,vd:()=>$,zI:()=>O,zj:()=>ft});var n=i(92457),r=i(53529),s=i(53334),o=i(43627),a=i(71089),l=i(66656),c=i(66037);const u=null===(d=(0,n.HW)())?(0,r.YK)().setApp("files").build():(0,r.YK)().setApp("files").setUid(d.uid).build();var d;class p{_entries=[];registerEntry(e){this.validateEntry(e),this._entries.push(e)}unregisterEntry(e){const t="string"==typeof e?this.getEntryIndex(e):this.getEntryIndex(e.id);-1!==t?this._entries.splice(t,1):u.warn("Entry not found, nothing removed",{entry:e,entries:this.getEntries()})}getEntries(e){return e?this._entries.filter((t=>"function"!=typeof t.enabled||t.enabled(e))):this._entries}getEntryIndex(e){return this._entries.findIndex((t=>t.id===e))}validateEntry(e){if(!e.id||!e.displayName||!e.iconSvgInline&&!e.iconClass||!e.handler)throw new Error("Invalid entry");if("string"!=typeof e.id||"string"!=typeof e.displayName)throw new Error("Invalid id or displayName property");if(e.iconClass&&"string"!=typeof e.iconClass||e.iconSvgInline&&"string"!=typeof e.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==e.enabled&&"function"!=typeof e.enabled)throw new Error("Invalid enabled property");if("function"!=typeof e.handler)throw new Error("Invalid handler property");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(e.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(e,t=!1,i=!1,n=!1){i=i&&!n,"string"==typeof e&&(e=Number(e));let r=e>0?Math.floor(Math.log(e)/Math.log(n?1e3:1024)):0;r=Math.min((i?g.length:h.length)-1,r);const o=i?g[r]:h[r];let a=(e/Math.pow(n?1e3:1024,r)).toFixed(1);return!0===t&&0===r?("0.0"!==a?"< 1 ":"0 ")+(i?g[1]:h[1]):(a=r<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,s.lO)()),a+" "+o)}function w(e,t=!1){try{e=`${e}`.toLocaleLowerCase().replaceAll(/\s+/g,"").replaceAll(",",".")}catch{return null}const i=e.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]||t?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 v=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(v||{});class y{_action;constructor(e){this.validateAction(e),this._action=e}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(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(v).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function")}}const _=function(e){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],u.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?u.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)},b=function(){return typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],u.debug("FileActions initialized")),window._nc_fileactions},C=function(){return typeof window._nc_filelistheader>"u"&&(window._nc_filelistheader=[],u.debug("FileListHeaders initialized")),window._nc_filelistheader};var N=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=4]="CREATE",e[e.READ=1]="READ",e[e.UPDATE=2]="UPDATE",e[e.DELETE=8]="DELETE",e[e.SHARE=16]="SHARE",e[e.ALL=31]="ALL",e))(N||{});const x=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],E={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},A=function(e,t={nc:"http://nextcloud.org/ns"}){typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...x],window._nc_dav_namespaces={...E});const i={...window._nc_dav_namespaces,...t};return window._nc_dav_properties.find((t=>t===e))?(u.warn(`${e} already registered`,{prop:e}),!1):e.startsWith("<")||2!==e.split(":").length?(u.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1):i[e.split(":")[0]]?(window._nc_dav_properties.push(e),window._nc_dav_namespaces=i,!0):(u.error(`${e} namespace unknown`,{prop:e,namespaces:i}),!1)},k=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...x]),window._nc_dav_properties.map((e=>`<${e} />`)).join(" ")},L=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...E}),Object.keys(window._nc_dav_namespaces).map((e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`)).join(" ")},S=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${k()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},I=function(){return`<?xml version="1.0"?>\n\t\t<oc:filter-files ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${k()}\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>`},P=function(e){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${L()}\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${k()}\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.HW)()?.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>${e}</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>`},F=function(e=""){let t=N.NONE;return e&&((e.includes("C")||e.includes("K"))&&(t|=N.CREATE),e.includes("G")&&(t|=N.READ),(e.includes("W")||e.includes("N")||e.includes("V"))&&(t|=N.UPDATE),e.includes("D")&&(t|=N.DELETE),e.includes("R")&&(t|=N.SHARE)),t};var V=(e=>(e.Folder="folder",e.File="file",e))(V||{});const T=function(e,t){return null!==e.match(t)},M=(e,t)=>{if(e.id&&"number"!=typeof e.id)throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||"string"!=typeof e.mime||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&"number"!=typeof e.size&&void 0!==e.size)throw new Error("Invalid size type");if("permissions"in e&&void 0!==e.permissions&&!("number"==typeof e.permissions&&e.permissions>=N.NONE&&e.permissions<=N.ALL))throw new Error("Invalid permissions");if(e.owner&&null!==e.owner&&"string"!=typeof e.owner)throw new Error("Invalid owner type");if(e.attributes&&"object"!=typeof e.attributes)throw new Error("Invalid attributes type");if(e.root&&"string"!=typeof e.root)throw new Error("Invalid root type");if(e.root&&!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(e.root&&!e.source.includes(e.root))throw new Error("Root must be part of the source");if(e.root&&T(e.source,t)){const i=e.source.match(t)[0];if(!e.source.includes((0,o.join)(i,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.status&&!Object.values(O).includes(e.status))throw new Error("Status must be a valid NodeStatus")};var O=(e=>(e.NEW="new",e.FAILED="failed",e.LOADING="loading",e.LOCKED="locked",e))(O||{});class B{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(e,t){M(e,t||this._knownDavService),this._data=e;const i={set:(e,t,i)=>(this.updateMtime(),Reflect.set(e,t,i)),deleteProperty:(e,t)=>(this.updateMtime(),Reflect.deleteProperty(e,t))};this._attributes=new Proxy(e.attributes||{},i),delete this._data.attributes,t&&(this._knownDavService=t)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:e}=new URL(this.source);return e+(0,a.O0)(this.source.slice(e.length))}get basename(){return(0,o.basename)(this.source)}get extension(){return(0,o.extname)(this.source)}get dirname(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),i=this.root.replace(/\/$/,"");return(0,o.dirname)(e.slice(t+i.length)||"/")}const e=new URL(this.source);return(0,o.dirname)(e.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 T(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,o.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let e=this.source;this.isDavRessource&&(e=e.split(this._knownDavService).pop());const t=e.indexOf(this.root),i=this.root.replace(/\/$/,"");return e.slice(t+i.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(e){this._data.status=e}move(e){M({...this._data,source:e},this._knownDavService),this._data.source=e,this.updateMtime()}rename(e){if(e.includes("/"))throw new Error("Invalid basename");this.move((0,o.dirname)(this.source)+"/"+e)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class H extends B{get type(){return V.File}}class $ extends B{constructor(e){super({...e,mime:"httpd/unix-directory"})}get type(){return V.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const D=`/files/${(0,n.HW)()?.uid}`,R=(0,l.dC)("dav"),z=function(e=R,t={}){const i=(0,c.UU)(e,{headers:t});function r(e){i.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,n.zo)(r),r((0,n.do)()),(0,c.Gu)().patch("fetch",((e,t)=>{const i=t.headers;return i?.method&&(t.method=i.method,delete i.method),fetch(e,t)})),i},j=async(e,t="/",i=D)=>(await e.getDirectoryContents(`${i}${t}`,{details:!0,data:I(),headers:{method:"REPORT"},includeSelf:!0})).data.filter((e=>e.filename!==t)).map((e=>W(e,i))),W=function(e,t=D,i=R){const r=(0,n.HW)()?.uid;if(!r)throw new Error("No user id found");const s=e.props,o=F(s?.permissions),a=(s?.["owner-id"]||r).toString(),l={id:s?.fileid||0,source:`${i}${e.filename}`,mtime:new Date(Date.parse(e.lastmod)),mime:e.mime||"application/octet-stream",size:s?.size||Number.parseInt(s.getcontentlength||"0"),permissions:o,owner:a,root:t,attributes:{...e,...s,hasPreview:s?.["has-preview"]}};return delete l.attributes?.props,"file"===e.type?new H(l):new $(l)};class K{_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);this._views.push(e)}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&this._views.splice(t,1)}get views(){return this._views}setActive(e){this._currentView=e}get active(){return this._currentView}}const Z=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new K,u.debug("Navigation service initialized")),window._nc_navigation};class U{_column;constructor(e){q(e),this._column=e}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 q=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("A column id is required");if(!e.title||"string"!=typeof e.title)throw new Error("A column title is required");if(!e.render||"function"!=typeof e.render)throw new Error("A render function is required");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};var X={},G={};!function(e){const t=":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="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");e.isExist=function(e){return typeof e<"u"},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,i){if(t){const n=Object.keys(t),r=n.length;for(let s=0;s<r;s++)e[n[s]]="strict"===i?[t[n[s]]]:t[n[s]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null===t||typeof t>"u")},e.getAllMatches=function(e,t){const i=[];let n=t.exec(e);for(;n;){const r=[];r.startIndex=t.lastIndex-n[0].length;const s=n.length;for(let e=0;e<s;e++)r.push(n[e]);i.push(r),n=t.exec(e)}return i},e.nameRegexp=i}(G);const Y=G,Q={allowBooleanAttributes:!1,unpairedTags:[]};function J(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function ee(e,t){const i=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const n=e.substr(i,t-i);if(t>5&&"xml"===n)return le("InvalidXml","XML declaration allowed only at the start of the document.",de(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function te(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let i=1;for(t+=8;t<e.length;t++)if("<"===e[t])i++;else if(">"===e[t]&&(i--,0===i))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}X.validate=function(e,t){t=Object.assign({},Q,t);const i=[];let n=!1,r=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=ee(e,s),s.err)return s}else{if("<"!==e[s]){if(J(e[s]))continue;return le("InvalidChar","char '"+e[s]+"' is not expected.",de(e,s))}{let o=s;if(s++,"!"===e[s]){s=te(e,s);continue}{let a=!1;"/"===e[s]&&(a=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),!ue(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",le("InvalidTag",t,de(e,s))}const c=re(e,s);if(!1===c)return le("InvalidAttr","Attributes for '"+l+"' have open quote.",de(e,s));let u=c.value;if(s=c.index,"/"===u[u.length-1]){const i=s-u.length;u=u.substring(0,u.length-1);const r=oe(u,t);if(!0!==r)return le(r.err.code,r.err.msg,de(e,i+r.err.line));n=!0}else if(a){if(!c.tagClosed)return le("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",de(e,s));if(u.trim().length>0)return le("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",de(e,o));{const t=i.pop();if(l!==t.tagName){let i=de(e,t.tagStartPos);return le("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+l+"'.",de(e,o))}0==i.length&&(r=!0)}}else{const a=oe(u,t);if(!0!==a)return le(a.err.code,a.err.msg,de(e,s-u.length+a.err.line));if(!0===r)return le("InvalidXml","Multiple possible root nodes found.",de(e,s));-1!==t.unpairedTags.indexOf(l)||i.push({tagName:l,tagStartPos:o}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=te(e,s);continue}if("?"!==e[s+1])break;if(s=ee(e,++s),s.err)return s}else if("&"===e[s]){const t=ae(e,s);if(-1==t)return le("InvalidChar","char '&' is not expected.",de(e,s));s=t}else if(!0===r&&!J(e[s]))return le("InvalidXml","Extra text at the end",de(e,s));"<"===e[s]&&s--}}}return n?1==i.length?le("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",de(e,i[0].tagStartPos)):!(i.length>0)||le("InvalidXml","Invalid '"+JSON.stringify(i.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):le("InvalidXml","Start tag expected.",1)};const ie='"',ne="'";function re(e,t){let i="",n="",r=!1;for(;t<e.length;t++){if(e[t]===ie||e[t]===ne)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){r=!0;break}i+=e[t]}return""===n&&{value:i,index:t,tagClosed:r}}const se=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function oe(e,t){const i=Y.getAllMatches(e,se),n={};for(let e=0;e<i.length;e++){if(0===i[e][1].length)return le("InvalidAttr","Attribute '"+i[e][2]+"' has no space in starting.",pe(i[e]));if(void 0!==i[e][3]&&void 0===i[e][4])return le("InvalidAttr","Attribute '"+i[e][2]+"' is without value.",pe(i[e]));if(void 0===i[e][3]&&!t.allowBooleanAttributes)return le("InvalidAttr","boolean attribute '"+i[e][2]+"' is not allowed.",pe(i[e]));const r=i[e][2];if(!ce(r))return le("InvalidAttr","Attribute '"+r+"' is an invalid name.",pe(i[e]));if(n.hasOwnProperty(r))return le("InvalidAttr","Attribute '"+r+"' is repeated.",pe(i[e]));n[r]=1}return!0}function ae(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let i=/\d/;for("x"===e[t]&&(t++,i=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(i))break}return-1}(e,++t);let i=0;for(;t<e.length;t++,i++)if(!(e[t].match(/\w/)&&i<20)){if(";"===e[t])break;return-1}return t}function le(e,t,i){return{err:{code:e,msg:t,line:i.line||i,col:i.col}}}function ce(e){return Y.isName(e)}function ue(e){return Y.isName(e)}function de(e,t){const i=e.substring(0,t).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function pe(e){return e.startIndex+e[1].length}var fe={};const he={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e}};fe.buildOptions=function(e){return Object.assign({},he,e)},fe.defaultOptions=he;const ge=G;function me(e,t){let i="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)i+=e[t];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let r="";for(;t<e.length&&e[t]!==n;t++)r+=e[t];return[i,r,t]}function we(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function ve(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function ye(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function _e(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function be(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function Ce(e){if(ge.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const Ne=/^[-+]?0x[a-fA-F0-9]+$/,xe=/^([\-\+])?(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 Ee={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const Ae=G,ke=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},Le=function(e,t){const i={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,r=!1,s=!1,o="";for(;t<e.length;t++)if("<"!==e[t]||s)if(">"===e[t]){if(s?"-"===e[t-1]&&"-"===e[t-2]&&(s=!1,n--):n--,0===n)break}else"["===e[t]?r=!0:o+=e[t];else{if(r&&ve(e,t))t+=7,[entityName,val,t]=me(e,t+1),-1===val.indexOf("&")&&(i[Ce(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&ye(e,t))t+=8;else if(r&&_e(e,t))t+=8;else if(r&&be(e,t))t+=9;else{if(!we)throw new Error("Invalid DOCTYPE");s=!0}n++,o=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:t}},Se=function(e,t={}){if(t=Object.assign({},Ee,t),!e||"string"!=typeof e)return e;let i=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(i))return e;if(t.hex&&Ne.test(i))return Number.parseInt(i,16);{const n=xe.exec(i);if(n){const r=n[1],s=n[2];let o=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(n[3]);const a=n[4]||n[6];if(!t.leadingZeros&&s.length>0&&r&&"."!==i[2])return e;if(!t.leadingZeros&&s.length>0&&!r&&"."!==i[1])return e;{const n=Number(i),l=""+n;return-1!==l.search(/[eE]/)||a?t.eNotation?n:e:-1!==i.indexOf(".")?"0"===l&&""===o||l===o||r&&l==="-"+o?n:e:s?o===l||r+o===l?n:e:i===l||i===r+l?n:e}}return e}};function Ie(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function Pe(e,t,i,n,r,s,o){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,i,r,s);return null==n?e:typeof n!=typeof e||n!==e?n:this.options.trimValues||e.trim()===e?je(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Fe(e){if(this.options.removeNSPrefix){const t=e.split(":"),i="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=i+t[1])}return e}const Ve=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Te(e,t,i){if(!this.options.ignoreAttributes&&"string"==typeof e){const i=Ae.getAllMatches(e,Ve),n=i.length,r={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(i[e][1]);let s=i[e][4],o=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const e=this.options.attributeValueProcessor(n,s,t);r[o]=null==e?s:typeof e!=typeof s||e!==s?e:je(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=r,e}return r}}const Me=function(e){e=e.replace(/\r\n?/g,"\n");const t=new ke("!xml");let i=t,n="",r="";for(let s=0;s<e.length;s++)if("<"===e[s])if("/"===e[s+1]){const t=De(e,">",s,"Closing Tag is not closed.");let o=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),i&&(n=this.saveTextToParentTag(n,i,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);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="",s=t}else if("?"===e[s+1]){let t=Re(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,r),!(this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags)){const e=new ke(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,r,t.tagName)),this.addChild(i,e,r)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=De(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(s+4,t-2);n=this.saveTextToParentTag(n,i,r),i.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=t}else if("!D"===e.substr(s+1,2)){const t=Le(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=De(e,"]]>",s,"CDATA is not closed.")-2,o=e.substring(s+9,t);n=this.saveTextToParentTag(n,i,r);let a=this.parseTextData(o,i.tagname,r,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):i.add(this.options.textNodeName,a),s=t+2}else{let o=Re(e,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let c=o.tagExp,u=o.attrExpPresent,d=o.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!==t.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const i=this.readStopNodeData(e,l,d+1);if(!i)throw new Error(`Unexpected end of ${l}`);s=i.i,t=i.tagContent}const n=new ke(a);a!==c&&u&&(n[":@"]=this.buildAttributesMap(c,r,a)),t&&(t=this.parseTextData(t,a,r,!0,u,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),n.add(this.options.textNodeName,t),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 e=new ke(a);a!==c&&u&&(e[":@"]=this.buildAttributesMap(c,r,a)),this.addChild(i,e,r),r=r.substr(0,r.lastIndexOf("."))}else{const e=new ke(a);this.tagsNodeStack.push(i),a!==c&&u&&(e[":@"]=this.buildAttributesMap(c,r,a)),this.addChild(i,e,r),i=e}n="",s=d}}else n+=e[s];return t.child};function Oe(e,t,i){const n=this.options.updateTag(t.tagname,i,t[":@"]);!1===n||("string"==typeof n&&(t.tagname=n),e.addChild(t))}const Be=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){const i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function He(e,t,i,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,i,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function $e(e,t,i){const n="*."+i;for(const i in e){const r=e[i];if(n===r||t===r)return!0}return!1}function De(e,t,i,n){const r=e.indexOf(t,i);if(-1===r)throw new Error(n);return r+t.length-1}function Re(e,t,i,n=">"){const r=function(e,t,i=">"){let n,r="";for(let s=t;s<e.length;s++){let t=e[s];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===i[0]){if(!i[1])return{data:r,index:s};if(e[s+1]===i[1])return{data:r,index:s}}else"\t"===t&&(t=" ");r+=t}}(e,t+1,n);if(!r)return;let s=r.data;const o=r.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(i){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),c=l!==r.data.substr(e+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:c,rawTagName:u}}function ze(e,t,i){const n=i;let r=1;for(;i<e.length;i++)if("<"===e[i])if("/"===e[i+1]){const s=De(e,">",i,`${t} is not closed`);if(e.substring(i+2,s).trim()===t&&(r--,0===r))return{tagContent:e.substring(n,i),i:s};i=s}else if("?"===e[i+1])i=De(e,"?>",i+1,"StopNode is not closed.");else if("!--"===e.substr(i+1,3))i=De(e,"--\x3e",i+3,"StopNode is not closed.");else if("!["===e.substr(i+1,2))i=De(e,"]]>",i,"StopNode is not closed.")-2;else{const n=Re(e,i,">");n&&((n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function je(e,t,i){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&Se(e,i)}return Ae.isExist(e)?e:""}var We={};function Ke(e,t,i){let n;const r={};for(let s=0;s<e.length;s++){const o=e[s],a=Ze(o);let l="";if(l=void 0===i?a:i+"."+a,a===t.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let e=Ke(o[a],t,l);const i=qe(e,t);o[":@"]?Ue(e,o[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(e)):t.isArray(a,l,i)?r[a]=[e]:r[a]=e}}}return"string"==typeof n?n.length>0&&(r[t.textNodeName]=n):void 0!==n&&(r[t.textNodeName]=n),r}function Ze(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const i=t[e];if(":@"!==i)return i}}function Ue(e,t,i,n){if(t){const r=Object.keys(t),s=r.length;for(let o=0;o<s;o++){const s=r[o];n.isArray(s,i+"."+s,!0,!0)?e[s]=[t[s]]:e[s]=t[s]}}}function qe(e,t){const{textNodeName:i}=t,n=Object.keys(e).length;return!(0!==n&&(1!==n||!e[i]&&"boolean"!=typeof e[i]&&0!==e[i]))}We.prettify=function(e,t){return Ke(e,t)};const{buildOptions:Xe}=fe,Ge=class{constructor(e){this.options=e,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=Ie,this.parseXml=Me,this.parseTextData=Pe,this.resolveNameSpace=Fe,this.buildAttributesMap=Te,this.isItStopNode=$e,this.replaceEntitiesValue=Be,this.readStopNodeData=ze,this.saveTextToParentTag=He,this.addChild=Oe}},{prettify:Ye}=We,Qe=X;function Je(e,t,i,n){let r="",s=!1;for(let o=0;o<e.length;o++){const a=e[o],l=et(a);if(void 0===l)continue;let c="";if(c=0===i.length?l:`${i}.${l}`,l===t.textNodeName){let e=a[l];it(c,t)||(e=t.tagValueProcessor(l,e),e=nt(e,t)),s&&(r+=n),r+=e,s=!1;continue}if(l===t.cdataPropName){s&&(r+=n),r+=`<![CDATA[${a[l][0][t.textNodeName]}]]>`,s=!1;continue}if(l===t.commentPropName){r+=n+`\x3c!--${a[l][0][t.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const e=tt(a[":@"],t),i="?xml"===l?"":n;let o=a[l][0][t.textNodeName];o=0!==o.length?" "+o:"",r+=i+`<${l}${o}${e}?>`,s=!0;continue}let u=n;""!==u&&(u+=t.indentBy);const d=n+`<${l}${tt(a[":@"],t)}`,p=Je(a[l],t,c,u);-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?r+=d+">":r+=d+"/>":p&&0!==p.length||!t.suppressEmptyNode?p&&p.endsWith(">")?r+=d+`>${p}${n}</${l}>`:(r+=d+">",p&&""!==n&&(p.includes("/>")||p.includes("</"))?r+=n+t.indentBy+p+n:r+=p,r+=`</${l}>`):r+=d+"/>",s=!0}return r}function et(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function tt(e,t){let i="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let r=t.attributeValueProcessor(n,e[n]);r=nt(r,t),!0===r&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${r}"`}return i}function it(e,t){let i=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+i)return!0;return!1}function nt(e,t){if(e&&e.length>0&&t.processEntities)for(let i=0;i<t.entities.length;i++){const n=t.entities[i];e=e.replace(n.regex,n.val)}return e}const rt=function(e,t){let i="";return t.format&&t.indentBy.length>0&&(i="\n"),Je(e,t,"",i)},st={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},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 ot(e){this.options=Object.assign({},st,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ct),this.processTextOrObjNode=at,this.options.format?(this.indentate=lt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function at(e,t,i){const n=this.j2x(e,i+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,i):this.buildObjectNode(n.val,t,n.attrStr,i)}function lt(e){return this.options.indentBy.repeat(e)}function ct(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}ot.prototype.build=function(e){return this.options.preserveOrder?rt(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},ot.prototype.j2x=function(e,t){let i="",n="";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(typeof e[r]>"u")this.isAttribute(r)&&(n+="");else if(null===e[r])this.isAttribute(r)?n+="":"?"===r[0]?n+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)n+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const s=this.isAttribute(r);if(s)i+=this.buildAttrPairStr(s,""+e[r]);else if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const i=e[r].length;let s="";for(let o=0;o<i;o++){const i=e[r][o];typeof i>"u"||(null===i?"?"===r[0]?n+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+r+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?s+=this.j2x(i,t+1).val:s+=this.processTextOrObjNode(i,r,t):s+=this.buildTextValNode(i,r,"",t))}this.options.oneListGroup&&(s=this.buildObjectNode(s,r,"",t)),n+=s}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const t=Object.keys(e[r]),n=t.length;for(let s=0;s<n;s++)i+=this.buildAttrPairStr(t[s],""+e[r][t[s]])}else n+=this.processTextOrObjNode(e[r],r,t);return{attrStr:i,val:n}},ot.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},ot.prototype.buildObjectNode=function(e,t,i,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+i+"?"+this.tagEndChar:this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar;{let r="</"+t+this.tagEndChar,s="";return"?"===t[0]&&(s="?",r=""),!i&&""!==i||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+i+s+this.tagEndChar+e+this.indentate(n)+r:this.indentate(n)+"<"+t+i+s+">"+e+r}},ot.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},ot.prototype.buildTextValNode=function(e,t,i,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+i+">"+r+"</"+t+this.tagEndChar}},ot.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const i=this.options.entities[t];e=e.replace(i.regex,i.val)}return e};var ut={XMLParser:class{constructor(e){this.externalEntities={},this.options=Xe(e)}parse(e,t){if("string"!=typeof e){if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const i=Qe.validate(e,t);if(!0!==i)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const i=new Ge(this.options);i.addExternalEntities(this.externalEntities);const n=i.parseXml(e);return this.options.preserveOrder||void 0===n?n:Ye(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}},XMLValidator:X,XMLBuilder:ot};class dt{_view;constructor(e){pt(e),this._view=e}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(e){this._view.icon=e}get order(){return this._view.order}set order(e){this._view.order=e}get params(){return this._view.params}set params(e){this._view.params=e}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(e){this._view.expanded=e}get defaultSortKey(){return this._view.defaultSortKey}}const pt=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if(e.columns&&e.columns.length>0&&(!e.caption||"string"!=typeof e.caption))throw new Error("View caption is required for top-level views and must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if(!e.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length||!0!==ut.XMLValidator.validate(e))return!1;let t;const i=new ut.XMLParser;try{t=i.parse(e)}catch{return!1}return!(!t||!("svg"in t))}(e.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in e)||"number"!=typeof e.order)throw new Error("View order is required and must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof U))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0},ft=function(e){return f().registerEntry(e)},ht=function(e){return f().unregisterEntry(e)},gt=function(e){return f().getEntries(e).sort(((e,t)=>void 0!==e.order&&void 0!==t.order&&e.order!==t.order?e.order-t.order:e.displayName.localeCompare(t.displayName,void 0,{numeric:!0,sensitivity:"base"})))}},76333:(e,t,i)=>{i.d(t,{AO:()=>M.N,Az:()=>a.N,B6:()=>d.N,C7:()=>me.N,EQ:()=>ue.N,K1:()=>Y.N,Qz:()=>V.N,R1:()=>F.N,gb:()=>_e.A,i$:()=>W.N,lT:()=>R.N,mQ:()=>ie.A,rE:()=>ge.N,v:()=>de.N,x1:()=>T.A,yI:()=>U.A}),i(54064);var n=i(63420),r=i(90116),s=i(50953),o=i(63127),a=i(6840),l=i(10700),c=i(51246),u=i(59594),d=i(3200),p=i(10501),f=i(63961),h=i(34375),g=i(86921),m=i(47611),w=i(10363),v=i(41430),y=i(19858),_=i(68776),b=i(15650),C=i(71246),N=i(46447),x=i(69176),E=i(82936),A=i(14645),k=i(89902),L=i(947),S=i(58589),I=i(18503),P=i(37595),F=i(91680),V=i(49296),T=i(9518),M=i(38868),O=i(23503),B=i(52870),H=i(70563),$=i(66250),D=i(35725),R=i(28245),z=i(35428),j=i(43899),W=i(33828),K=i(84003),Z=i(740),U=i(10833),q=i(1620),X=i(94305),G=i(27720),Y=i(6936),Q=i(44559),J=i(78768),ee=i(46222),te=i(53278),ie=i(48934),ne=i(51375),re=i(28690),se=i(15224),oe=i(5392),ae=i(11285),le=i(22911),ce=i(35384),ue=(i(78460),i(66957),i(26287),i(8012)),de=i(59567),pe=(i(61338),i(64981)),fe=i(12888),he=i(41347),ge=i(61217),me=i(82898),we=i(86598),ve=i(92019),ye=i(8259),_e=i(47732),be=(i(23020),i(53429),i(58995),i(89921),i(42892)),Ce=i(65842),Ne=(i(57874),i(75105),i(92471),i(16406),i(2508));n.A,r.N,s.A,o.A,a.N,l.A,c.A,u.A,p.A,f.A,h.A,d.N,g.N,m.A,w.A,v.N,y.N,_.A,b.N,C.A,N.A,x.N,E.N,A.A,k.N,L.A,S.N,I.A,le.N,P.N,F.N,V.N,T.A,M.N,O.N,B.N,H.A,$.N,D.N,R.N,z.A,j.A,W.N,K.N,Z.N,U.A,q.A,X.N,G.N,Y.N,Q.N,J.N,ee.A,ae.N,te.A,ie.A,ne.N,re.N,se.N,oe.N,le.a,ce.N,pe.N,ue.N,fe.N,he.N,ge.N,me.N,_e.A,de.N,we.N,ve.N,ye.N,Symbol.toStringTag,be.u,Ce.u,Ne.yw,Symbol.toStringTag}}]);
- //# sourceMappingURL=1359-1359.js.map?v=0bf1b6d6403ca20a8e30
|