mirror of
https://github.com/nextcloud/server.git
synced 2025-02-07 09:59:46 +00:00
b2ece065f9
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2 lines
No EOL
81 KiB
JavaScript
2 lines
No EOL
81 KiB
JavaScript
(()=>{"use strict";var e,n,r,o={68587:(e,n,r)=>{var o=r(21777),a=r(85471);async function i(){const e=[...document.head.querySelectorAll("link.theme")].map((e=>new Promise((t=>{const n=new URL(e.href);n.searchParams.set("v",Date.now());const r=e.cloneNode();r.href=n.toString(),r.onload=()=>{e.remove(),t()},document.head.append(r)}))));await Promise.allSettled(e)}var l=r(63814),s=r(32981),c=r(65043),d=r(32073),u=r(88837),p=r(85168),h=r(17334),g=r.n(h),m=r(56798),f=r(54373);const v={name:"ImageEditIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var A=r(14486);const b=(0,A.A)(v,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon image-edit-icon",attrs:{"aria-hidden":e.title?null:"true","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:"M22.7 14.3L21.7 15.3L19.7 13.3L20.7 12.3C20.8 12.2 20.9 12.1 21.1 12.1C21.2 12.1 21.4 12.2 21.5 12.3L22.8 13.6C22.9 13.8 22.9 14.1 22.7 14.3M13 19.9V22H15.1L21.2 15.9L19.2 13.9L13 19.9M21 5C21 3.9 20.1 3 19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H11V19.1L12.1 18H5L8.5 13.5L11 16.5L14.5 12L16.1 14.1L21 9.1V5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,C={name:"PaletteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},y=(0,A.A)(C,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon palette-icon",attrs:{"aria-hidden":e.title?null:"true","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:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,_=(0,s.C)("theming","shippedBackgrounds"),w=(0,s.C)("theming","userBackgroundImage"),{backgroundImage:k,backgroundMime:x,defaultShippedBackground:S}=(0,s.C)("theming","themingDefaults"),D=e=>(0,l.fg)("theming","","img/background/")+e,E={name:"BackgroundSettings",components:{Check:f.A,ColorPalette:y,ImageEdit:b,NcColorPicker:m.A},data:()=>({loading:!1,Theming:(0,s.C)("theming","data",{}),backgroundImage:w}),computed:{shippedBackgrounds(){return Object.keys(_).filter((e=>e!==S||!this.isGlobalBackgroundDefault)).map((e=>({name:e,url:D(e),preview:D("preview/"+e),details:_[e]})))},isGlobalBackgroundDefault:()=>""===x,isGlobalBackgroundDeleted:()=>"backgroundColor"===x,cssDefaultBackgroundImage:()=>`url('${k}')`},methods:{invertTextColor(e){return this.calculateLuma(e)>.6},calculateLuma(e){const[t,n,r]=this.hexToRGB(e);return(.2126*t+.7152*n+.0722*r)/255},hexToRGB(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},async update(e){this.backgroundImage=e.backgroundImage,this.Theming.backgroundColor=e.backgroundColor,this.$emit("update:background"),this.loading=!1},async setDefault(){this.loading="default";const e=await c.Ay.post((0,l.Jv)("/apps/theming/background/default"));this.update(e.data)},async setShipped(e){this.loading=e;const t=await c.Ay.post((0,l.Jv)("/apps/theming/background/shipped"),{value:e});this.update(t.data)},async setFile(e){this.loading="custom";const t=await c.Ay.post((0,l.Jv)("/apps/theming/background/custom"),{value:e});this.update(t.data)},async removeBackground(){this.loading="remove";const e=await c.Ay.delete((0,l.Jv)("/apps/theming/background/custom"));this.update(e.data)},async pickColor(e){this.loading="color";const{data:t}=await c.Ay.post((0,l.Jv)("/apps/theming/background/color"),{color:e||"#0082c9"});this.update(t)},debouncePickColor:g()((function(){this.pickColor(...arguments)}),200),pickFile(){(0,p.a1)(t("theming","Select a background from your files")).allowDirectories(!1).setMimeTypeFilter(["image/png","image/gif","image/jpeg","image/svg+xml","image/svg"]).setMultiSelect(!1).addButton({id:"select",label:t("theming","Select background"),callback:e=>{this.applyFile(e[0]?.path)},type:"primary"}).build().pick()},async applyFile(e){if(!e||"string"!=typeof e||0===e.trim().length||"/"===e)return console.error("No valid background have been selected",{path:e}),void(0,p.Qg)(t("theming","No background has been selected"));this.loading="custom",this.setFile(e)}}},T=()=>{(0,a.$9)(((e,t)=>({"05e06a8e":e.cssDefaultBackgroundImage})))},I=E.setup;E.setup=I?(e,t)=>(T(),I(e,t)):T;const N=E;var B=r(85072),O=r.n(B),P=r(97825),M=r.n(P),L=r(77659),F=r.n(L),R=r(55056),U=r.n(R),Y=r(10540),j=r.n(Y),H=r(41113),$=r.n(H),z=r(6091),G={};G.styleTagTransform=$(),G.setAttributes=U(),G.insert=F().bind(null,"head"),G.domAPI=M(),G.insertStyleElement=j(),O()(z.A,G),z.A&&z.A.locals&&z.A.locals;const X=(0,A.A)(N,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"background-selector",attrs:{"data-user-theming-background-settings":""}},[t("button",{class:{"icon-loading":"custom"===e.loading,"background background__filepicker":!0,"background--active":"custom"===e.backgroundImage},attrs:{"aria-pressed":"custom"===e.backgroundImage,"data-user-theming-background-custom":"",tabindex:"0"},on:{click:e.pickFile}},[e._v("\n\t\t"+e._s(e.t("theming","Custom background"))+"\n\t\t"),"custom"!==e.backgroundImage?t("ImageEdit",{attrs:{size:20}}):e._e(),e._v(" "),t("Check",{attrs:{size:44}})],1),e._v(" "),t("NcColorPicker",{on:{"update:value":e.debouncePickColor},model:{value:e.Theming.backgroundColor,callback:function(t){e.$set(e.Theming,"backgroundColor",t)},expression:"Theming.backgroundColor"}},[t("button",{class:{"icon-loading":"color"===e.loading,"background background__color":!0,"background--active":"color"===e.backgroundImage},style:{backgroundColor:e.Theming.backgroundColor,"--border-color":e.Theming.backgroundColor},attrs:{"aria-pressed":"color"===e.backgroundImage,"data-color":e.Theming.backgroundColor,"data-color-bright":e.invertTextColor(e.Theming.backgroundColor),"data-user-theming-background-color":"",tabindex:"0"},on:{click:function(t){"color"!==e.backgroundImage&&e.debouncePickColor(e.Theming.backgroundColor)}}},[e._v("\n\t\t\t"+e._s(e.t("theming","Plain background"))+"\n\t\t\t"),"color"!==e.backgroundImage?t("ColorPalette",{attrs:{size:20}}):e._e(),e._v(" "),t("Check",{attrs:{size:44}})],1)]),e._v(" "),t("button",{class:{"icon-loading":"default"===e.loading,"background background__default":!0,"background--active":"default"===e.backgroundImage},style:{"--border-color":e.Theming.defaultBackgroundColor},attrs:{"aria-pressed":"default"===e.backgroundImage,"data-color-bright":e.invertTextColor(e.Theming.defaultBackgroundColor),"data-user-theming-background-default":"",tabindex:"0"},on:{click:e.setDefault}},[e._v("\n\t\t"+e._s(e.t("theming","Default background"))+"\n\t\t"),t("Check",{attrs:{size:44}})],1),e._v(" "),e._l(e.shippedBackgrounds,(function(n){return t("button",{key:n.name,class:{"background background__shipped":!0,"icon-loading":e.loading===n.name,"background--active":e.backgroundImage===n.name},style:{backgroundImage:"url("+n.preview+")","--border-color":n.details.primary_color},attrs:{title:n.details.attribution,"aria-label":n.details.description,"aria-pressed":e.backgroundImage===n.name,"data-color-bright":e.invertTextColor(n.details.background_color),"data-user-theming-background-shipped":n.name,tabindex:"0"},on:{click:function(t){return e.setShipped(n.name)}}},[t("Check",{attrs:{size:44}})],1)}))],2)}),[],!1,null,"7cc51a4f",null).exports,W={name:"ItemPreview",components:{NcCheckboxRadioSwitch:d.A},props:{enforced:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},theme:{type:Object,required:!0},type:{type:String,default:""},unique:{type:Boolean,default:!1}},computed:{switchType(){return this.unique?"switch":"radio"},name(){return this.unique?null:this.type},img(){return(0,l.fg)("theming","img",this.theme.id+".jpg")},checked:{get(){return this.selected},set(e){this.enforced||(console.debug("Changed theme",this.theme.id,e),this.unique?this.$emit("change",{enabled:!0===e,id:this.theme.id}):this.$emit("change",{enabled:!0,id:this.theme.id}))}}},methods:{onToggle(){this.enforced||("radio"!==this.switchType?this.checked=!this.checked:this.checked=!0)}}};var q=r(37499),K={};K.styleTagTransform=$(),K.setAttributes=U(),K.insert=F().bind(null,"head"),K.domAPI=M(),K.insertStyleElement=j(),O()(q.A,K),q.A&&q.A.locals&&q.A.locals;const V=(0,A.A)(W,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"theming__preview",class:"theming__preview--"+e.theme.id},[t("div",{staticClass:"theming__preview-image",style:{backgroundImage:"url("+e.img+")"},on:{click:e.onToggle}}),e._v(" "),t("div",{staticClass:"theming__preview-description"},[t("h3",[e._v(e._s(e.theme.title))]),e._v(" "),t("p",{staticClass:"theming__preview-explanation"},[e._v("\n\t\t\t"+e._s(e.theme.description)+"\n\t\t")]),e._v(" "),e.enforced?t("span",{staticClass:"theming__preview-warning",attrs:{role:"note"}},[e._v("\n\t\t\t"+e._s(e.t("theming","Theme selection is enforced"))+"\n\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{directives:[{name:"show",rawName:"v-show",value:!e.enforced,expression:"!enforced"}],staticClass:"theming__preview-toggle",attrs:{checked:e.checked,disabled:e.enforced,name:e.name,type:e.switchType},on:{"update:checked":function(t){e.checked=t}}},[e._v("\n\t\t\t"+e._s(e.theme.enableLabel)+"\n\t\t")])],1)])}),[],!1,null,"fcbd7e50",null).exports;var Q=r(53334),J=r(13073),Z=r(59271);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(){return ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ne.apply(this,arguments)}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){te(e,t,n[t])}))}return e}function oe(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var ae=oe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ie=oe(/Edge/i),le=oe(/firefox/i),se=oe(/safari/i)&&!oe(/chrome/i)&&!oe(/android/i),ce=oe(/iP(ad|od|hone)/i),de=oe(/chrome/i)&&oe(/android/i),ue={capture:!1,passive:!1};function pe(e,t,n){e.addEventListener(t,n,!ae&&ue)}function he(e,t,n){e.removeEventListener(t,n,!ae&&ue)}function ge(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function me(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function fe(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&ge(e,t):ge(e,t))||r&&e===n)return e;if(e===n)break}while(e=me(e))}return null}var ve,Ae=/\s+/g;function be(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(Ae," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(Ae," ")}}function Ce(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function ye(e,t){var n="";if("string"==typeof e)n=e;else do{var r=Ce(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function _e(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,a=r.length;if(n)for(;o<a;o++)n(r[o],o);return r}return[]}function we(){return document.scrollingElement||document.documentElement}function ke(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var a,i,l,s,c,d,u;if(e!==window&&e!==we()?(i=(a=e.getBoundingClientRect()).top,l=a.left,s=a.bottom,c=a.right,d=a.height,u=a.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!ae))do{if(o&&o.getBoundingClientRect&&("none"!==Ce(o,"transform")||n&&"static"!==Ce(o,"position"))){var p=o.getBoundingClientRect();i-=p.top+parseInt(Ce(o,"border-top-width")),l-=p.left+parseInt(Ce(o,"border-left-width")),s=i+a.height,c=l+a.width;break}}while(o=o.parentNode);if(r&&e!==window){var h=ye(o||e),g=h&&h.a,m=h&&h.d;h&&(s=(i/=m)+(d/=m),c=(l/=g)+(u/=g))}return{top:i,left:l,bottom:s,right:c,width:u,height:d}}}function xe(e,t,n){for(var r=Ie(e,!0),o=ke(e)[t];r;){var a=ke(r)[n];if(!("top"===n||"left"===n?o>=a:o<=a))return r;if(r===we())break;r=Ie(r,!1)}return!1}function Se(e,t,n){for(var r=0,o=0,a=e.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Nt.ghost&&a[o]!==Nt.dragged&&fe(a[o],n.draggable,e,!1)){if(r===t)return a[o];r++}o++}return null}function De(e,t){for(var n=e.lastElementChild;n&&(n===Nt.ghost||"none"===Ce(n,"display")||t&&!ge(n,t));)n=n.previousElementSibling;return n||null}function Ee(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Nt.clone||t&&!ge(e,t)||n++;return n}function Te(e){var t=0,n=0,r=we();if(e)do{var o=ye(e),a=o.a,i=o.d;t+=e.scrollLeft*a,n+=e.scrollTop*i}while(e!==r&&(e=e.parentNode));return[t,n]}function Ie(e,t){if(!e||!e.getBoundingClientRect)return we();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Ce(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return we();if(r||t)return n;r=!0}}}while(n=n.parentNode);return we()}function Ne(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function Be(e,t){return function(){if(!ve){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),ve=setTimeout((function(){ve=void 0}),t)}}}function Oe(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Pe(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Me="Sortable"+(new Date).getTime();var Le=[],Fe={initializeByDefault:!0},Re={mount:function(e){for(var t in Fe)Fe.hasOwnProperty(t)&&!(t in e)&&(e[t]=Fe[t]);Le.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";Le.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](re({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](re({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var o in Le.forEach((function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var a=new r(e,t,e.options);a.sortable=e,a.options=e.options,e[o]=a,ne(n,a.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var a=this.modifyOption(e,o,e.options[o]);void 0!==a&&(e.options[o]=a)}},getEventProperties:function(e,t){var n={};return Le.forEach((function(r){"function"==typeof r.eventProperties&&ne(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return Le.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))})),r}};var Ue=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,["evt"]);Re.pluginEvent.bind(Nt)(e,t,re({dragEl:je,parentEl:He,ghostEl:$e,rootEl:ze,nextEl:Ge,lastDownEl:Xe,cloneEl:We,cloneHidden:qe,dragStarted:lt,putSortable:et,activeSortable:Nt.active,originalEvent:r,oldIndex:Ke,oldDraggableIndex:Qe,newIndex:Ve,newDraggableIndex:Je,hideGhostForTarget:Dt,unhideGhostForTarget:Et,cloneNowHidden:function(){qe=!0},cloneNowShown:function(){qe=!1},dispatchSortableEvent:function(e){Ye({sortable:t,name:e,originalEvent:r})}},o))};function Ye(e){!function(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,a=e.cloneEl,i=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,u=e.newDraggableIndex,p=e.originalEvent,h=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[Me]){var m,f=t.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||ae||ie?(m=document.createEvent("Event")).initEvent(r,!0,!0):m=new CustomEvent(r,{bubbles:!0,cancelable:!0}),m.to=i||n,m.from=l||n,m.item=o||n,m.clone=a,m.oldIndex=s,m.newIndex=c,m.oldDraggableIndex=d,m.newDraggableIndex=u,m.originalEvent=p,m.pullMode=h?h.lastPutMode:void 0;var A=re({},g,Re.getEventProperties(r,t));for(var b in A)m[b]=A[b];n&&n.dispatchEvent(m),f[v]&&f[v].call(t,m)}}(re({putSortable:et,cloneEl:We,targetEl:je,rootEl:ze,oldIndex:Ke,oldDraggableIndex:Qe,newIndex:Ve,newDraggableIndex:Je},e))}var je,He,$e,ze,Ge,Xe,We,qe,Ke,Ve,Qe,Je,Ze,et,tt,nt,rt,ot,at,it,lt,st,ct,dt,ut,pt=!1,ht=!1,gt=[],mt=!1,ft=!1,vt=[],At=!1,bt=[],Ct="undefined"!=typeof document,yt=ce,_t=ie||ae?"cssFloat":"float",wt=Ct&&!de&&!ce&&"draggable"in document.createElement("div"),kt=function(){if(Ct){if(ae)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),xt=function(e,t){var n=Ce(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Se(e,0,t),a=Se(e,1,t),i=o&&Ce(o),l=a&&Ce(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+ke(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ke(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&"none"!==i.float){var d="left"===i.float?"left":"right";return!a||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=r&&"none"===n[_t]||a&&"none"===n[_t]&&s+c>r)?"vertical":"horizontal"},St=function(e){function t(e,n){return function(r,o,a,i){var l=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,a,i),n)(r,o,a,i);var s=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},r=e.group;r&&"object"==ee(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Dt=function(){!kt&&$e&&Ce($e,"display","none")},Et=function(){!kt&&$e&&Ce($e,"display","")};Ct&&document.addEventListener("click",(function(e){if(ht)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ht=!1,!1}),!0);var Tt=function(e){if(je){var t=function(e,t){var n;return gt.some((function(r){if(!De(r)){var o=ke(r),a=r[Me].options.emptyInsertThreshold,i=e>=o.left-a&&e<=o.right+a,l=t>=o.top-a&&t<=o.bottom+a;return a&&i&&l?n=r:void 0}})),n}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Me]._onDragOver(n)}}},It=function(e){je&&je.parentNode[Me]._isOutsideThisEl(e.target)};function Nt(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ne({},t),e[Me]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return xt(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Nt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var a in Re.initializePlugins(this,e,o),o)!(a in t)&&(t[a]=o[a]);for(var i in St(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&wt,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?pe(e,"pointerdown",this._onTapStart):(pe(e,"mousedown",this._onTapStart),pe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(pe(e,"dragover",this),pe(e,"dragenter",this)),gt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ne(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==Ce(e,"display")&&e!==Nt.ghost){r.push({target:e,rect:ke(e)});var t=re({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=ye(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,a=0;r.forEach((function(e){var n=0,r=e.target,i=r.fromRect,l=ke(r),s=r.prevFromRect,c=r.prevToRect,d=e.rect,u=ye(r,!0);u&&(l.top-=u.f,l.left-=u.e),r.toRect=l,r.thisAnimationDuration&&Ne(s,l)&&!Ne(i,l)&&(d.top-l.top)/(d.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(d,s,c,t.options)),Ne(l,i)||(r.prevFromRect=i,r.prevToRect=l,n||(n=t.options.animation),t.animate(r,d,l,n)),n&&(o=!0,a=Math.max(a,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof e&&e()}),a):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){Ce(e,"transition",""),Ce(e,"transform","");var o=ye(this.el),a=o&&o.a,i=o&&o.d,l=(t.left-n.left)/(a||1),s=(t.top-n.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,Ce(e,"transform","translate3d("+l+"px,"+s+"px,0)"),function(e){e.offsetWidth}(e),Ce(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Ce(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){Ce(e,"transition",""),Ce(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function Bt(e,t,n,r,o,a,i,l){var s,c,d=e[Me],u=d.options.onMove;return!window.CustomEvent||ae||ie?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=r,s.related=o||t,s.relatedRect=a||ke(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),u&&(c=u.call(d,s,i)),c}function Ot(e){e.draggable=!1}function Pt(){At=!1}function Mt(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Lt(e){return setTimeout(e,0)}function Ft(e){return clearTimeout(e)}Nt.prototype={constructor:Nt,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(st=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,je):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=r.filter;if(function(e){bt.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&bt.push(r)}}(n),!je&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||r.disabled||s.isContentEditable||(l=fe(l,r.draggable,n,!1))&&l.animated||Xe===l)){if(Ke=Ee(l),Qe=Ee(l,r.draggable),"function"==typeof c){if(c.call(this,e,l,this))return Ye({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Ue("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=fe(s,r.trim(),n,!1))return Ye({sortable:t,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),Ue("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!fe(s,r.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var r,o=this,a=o.el,i=o.options,l=a.ownerDocument;if(n&&!je&&n.parentNode===a){var s=ke(n);if(ze=a,He=(je=n).parentNode,Ge=je.nextSibling,Xe=n,Ze=i.group,Nt.dragged=je,tt={target:je,clientX:(t||e).clientX,clientY:(t||e).clientY},at=tt.clientX-s.left,it=tt.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,je.style["will-change"]="all",r=function(){Ue("delayEnded",o,{evt:e}),Nt.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!le&&o.nativeDraggable&&(je.draggable=!0),o._triggerDragStart(e,t),Ye({sortable:o,name:"choose",originalEvent:e}),be(je,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){_e(je,e.trim(),Ot)})),pe(l,"dragover",Tt),pe(l,"mousemove",Tt),pe(l,"touchmove",Tt),pe(l,"mouseup",o._onDrop),pe(l,"touchend",o._onDrop),pe(l,"touchcancel",o._onDrop),le&&this.nativeDraggable&&(this.options.touchStartThreshold=4,je.draggable=!0),Ue("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(ie||ae))r();else{if(Nt.eventCanceled)return void this._onDrop();pe(l,"mouseup",o._disableDelayedDrag),pe(l,"touchend",o._disableDelayedDrag),pe(l,"touchcancel",o._disableDelayedDrag),pe(l,"mousemove",o._delayedDragTouchMoveHandler),pe(l,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&pe(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){je&&Ot(je),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;he(e,"mouseup",this._disableDelayedDrag),he(e,"touchend",this._disableDelayedDrag),he(e,"touchcancel",this._disableDelayedDrag),he(e,"mousemove",this._delayedDragTouchMoveHandler),he(e,"touchmove",this._delayedDragTouchMoveHandler),he(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?pe(document,"pointermove",this._onTouchMove):pe(document,t?"touchmove":"mousemove",this._onTouchMove):(pe(je,"dragend",this),pe(ze,"dragstart",this._onDragStart));try{document.selection?Lt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(pt=!1,ze&&je){Ue("dragStarted",this,{evt:t}),this.nativeDraggable&&pe(document,"dragover",It);var n=this.options;!e&&be(je,n.dragClass,!1),be(je,n.ghostClass,!0),Nt.active=this,e&&this._appendGhost(),Ye({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(nt){this._lastX=nt.clientX,this._lastY=nt.clientY,Dt();for(var e=document.elementFromPoint(nt.clientX,nt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(nt.clientX,nt.clientY))!==t;)t=e;if(je.parentNode[Me]._isOutsideThisEl(e),t)do{if(t[Me]&&t[Me]._onDragOver({clientX:nt.clientX,clientY:nt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Et()}},_onTouchMove:function(e){if(tt){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,a=$e&&ye($e,!0),i=$e&&a&&a.a,l=$e&&a&&a.d,s=yt&&ut&&Te(ut),c=(o.clientX-tt.clientX+r.x)/(i||1)+(s?s[0]-vt[0]:0)/(i||1),d=(o.clientY-tt.clientY+r.y)/(l||1)+(s?s[1]-vt[1]:0)/(l||1);if(!Nt.active&&!pt){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if($e){a?(a.e+=c-(rt||0),a.f+=d-(ot||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");Ce($e,"webkitTransform",u),Ce($e,"mozTransform",u),Ce($e,"msTransform",u),Ce($e,"transform",u),rt=c,ot=d,nt=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!$e){var e=this.options.fallbackOnBody?document.body:ze,t=ke(je,!0,yt,!0,e),n=this.options;if(yt){for(ut=e;"static"===Ce(ut,"position")&&"none"===Ce(ut,"transform")&&ut!==document;)ut=ut.parentNode;ut!==document.body&&ut!==document.documentElement?(ut===document&&(ut=we()),t.top+=ut.scrollTop,t.left+=ut.scrollLeft):ut=we(),vt=Te(ut)}be($e=je.cloneNode(!0),n.ghostClass,!1),be($e,n.fallbackClass,!0),be($e,n.dragClass,!0),Ce($e,"transition",""),Ce($e,"transform",""),Ce($e,"box-sizing","border-box"),Ce($e,"margin",0),Ce($e,"top",t.top),Ce($e,"left",t.left),Ce($e,"width",t.width),Ce($e,"height",t.height),Ce($e,"opacity","0.8"),Ce($e,"position",yt?"absolute":"fixed"),Ce($e,"zIndex","100000"),Ce($e,"pointerEvents","none"),Nt.ghost=$e,e.appendChild($e),Ce($e,"transform-origin",at/parseInt($e.style.width)*100+"% "+it/parseInt($e.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;Ue("dragStart",this,{evt:e}),Nt.eventCanceled?this._onDrop():(Ue("setupClone",this),Nt.eventCanceled||((We=Pe(je)).draggable=!1,We.style["will-change"]="",this._hideClone(),be(We,this.options.chosenClass,!1),Nt.clone=We),n.cloneId=Lt((function(){Ue("clone",n),Nt.eventCanceled||(n.options.removeCloneOnHide||ze.insertBefore(We,je),n._hideClone(),Ye({sortable:n,name:"clone"}))})),!t&&be(je,o.dragClass,!0),t?(ht=!0,n._loopId=setInterval(n._emulateDragOver,50)):(he(document,"mouseup",n._onDrop),he(document,"touchend",n._onDrop),he(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,je)),pe(document,"drop",n),Ce(je,"transform","translateZ(0)")),pt=!0,n._dragStartId=Lt(n._dragStarted.bind(n,t,e)),pe(document,"selectstart",n),lt=!0,se&&Ce(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,a=this.el,i=e.target,l=this.options,s=l.group,c=Nt.active,d=Ze===s,u=l.sort,p=et||c,h=this,g=!1;if(!At){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),i=fe(i,l.draggable,a,!0),E("dragOver"),Nt.eventCanceled)return g;if(je.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||h._ignoreWhileAnimating===i)return I(!1);if(ht=!1,c&&!l.disabled&&(d?u||(r=!ze.contains(je)):et===this||(this.lastPutMode=Ze.checkPull(this,c,je,e))&&s.checkPut(this,c,je,e))){if(o="vertical"===this._getDirection(e,i),t=ke(je),E("dragOverValid"),Nt.eventCanceled)return g;if(r)return He=ze,T(),this._hideClone(),E("revert"),Nt.eventCanceled||(Ge?ze.insertBefore(je,Ge):ze.appendChild(je)),I(!0);var m=De(a,l.draggable);if(!m||function(e,t,n){var r=ke(De(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,o,this)&&!m.animated){if(m===je)return I(!1);if(m&&a===e.target&&(i=m),i&&(n=ke(i)),!1!==Bt(ze,a,je,t,i,n,e,!!i))return T(),a.appendChild(je),He=a,N(),I(!0)}else if(i.parentNode===a){n=ke(i);var f,v,A,b=je.parentNode!==a,C=!function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,i=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return r===i||o===l||r+a/2===i+s/2}(je.animated&&je.toRect||t,i.animated&&i.toRect||n,o),y=o?"top":"left",_=xe(i,"top","top")||xe(je,"top","top"),w=_?_.scrollTop:void 0;if(st!==i&&(v=n[y],mt=!1,ft=!C&&l.invertSwap||b),f=function(e,t,n,r,o,a,i,l){var s=r?e.clientY:e.clientX,c=r?n.height:n.width,d=r?n.top:n.left,u=r?n.bottom:n.right,p=!1;if(!i)if(l&&dt<c*o){if(!mt&&(1===ct?s>d+c*a/2:s<u-c*a/2)&&(mt=!0),mt)p=!0;else if(1===ct?s<d+dt:s>u-dt)return-ct}else if(s>d+c*(1-o)/2&&s<u-c*(1-o)/2)return function(e){return Ee(je)<Ee(e)?1:-1}(t);return(p=p||i)&&(s<d+c*a/2||s>u-c*a/2)?s>d+c/2?1:-1:0}(e,i,n,o,C?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ft,st===i),0!==f){var k=Ee(je);do{k-=f,A=He.children[k]}while(A&&("none"===Ce(A,"display")||A===$e))}if(0===f||A===i)return I(!1);st=i,ct=f;var x=i.nextElementSibling,S=!1,D=Bt(ze,a,je,t,i,n,e,S=1===f);if(!1!==D)return 1!==D&&-1!==D||(S=1===D),At=!0,setTimeout(Pt,30),T(),S&&!x?a.appendChild(je):i.parentNode.insertBefore(je,S?x:i),_&&Oe(_,0,w-_.scrollTop),He=je.parentNode,void 0===v||ft||(dt=Math.abs(v-ke(i)[y])),N(),I(!0)}if(a.contains(je))return I(!1)}return!1}function E(l,s){Ue(l,h,re({evt:e,isOwner:d,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:u,fromSortable:p,target:i,completed:I,onMove:function(n,r){return Bt(ze,a,je,t,n,ke(n),e,r)},changed:N},s))}function T(){E("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function I(t){return E("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(h),h!==p&&(be(je,et?et.options.ghostClass:c.options.ghostClass,!1),be(je,l.ghostClass,!0)),et!==h&&h!==Nt.active?et=h:h===Nt.active&&et&&(et=null),p===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){E("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===je&&!je.animated||i===a&&!i.animated)&&(st=null),l.dragoverBubble||e.rootEl||i===document||(je.parentNode[Me]._isOutsideThisEl(e.target),!t&&Tt(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function N(){Ve=Ee(je),Je=Ee(je,l.draggable),Ye({sortable:h,name:"change",toEl:a,newIndex:Ve,newDraggableIndex:Je,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){he(document,"mousemove",this._onTouchMove),he(document,"touchmove",this._onTouchMove),he(document,"pointermove",this._onTouchMove),he(document,"dragover",Tt),he(document,"mousemove",Tt),he(document,"touchmove",Tt)},_offUpEvents:function(){var e=this.el.ownerDocument;he(e,"mouseup",this._onDrop),he(e,"touchend",this._onDrop),he(e,"pointerup",this._onDrop),he(e,"touchcancel",this._onDrop),he(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Ve=Ee(je),Je=Ee(je,n.draggable),Ue("drop",this,{evt:e}),He=je&&je.parentNode,Ve=Ee(je),Je=Ee(je,n.draggable),Nt.eventCanceled||(pt=!1,ft=!1,mt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ft(this.cloneId),Ft(this._dragStartId),this.nativeDraggable&&(he(document,"drop",this),he(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),se&&Ce(document.body,"user-select",""),Ce(je,"transform",""),e&&(lt&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),$e&&$e.parentNode&&$e.parentNode.removeChild($e),(ze===He||et&&"clone"!==et.lastPutMode)&&We&&We.parentNode&&We.parentNode.removeChild(We),je&&(this.nativeDraggable&&he(je,"dragend",this),Ot(je),je.style["will-change"]="",lt&&!pt&&be(je,et?et.options.ghostClass:this.options.ghostClass,!1),be(je,this.options.chosenClass,!1),Ye({sortable:this,name:"unchoose",toEl:He,newIndex:null,newDraggableIndex:null,originalEvent:e}),ze!==He?(Ve>=0&&(Ye({rootEl:He,name:"add",toEl:He,fromEl:ze,originalEvent:e}),Ye({sortable:this,name:"remove",toEl:He,originalEvent:e}),Ye({rootEl:He,name:"sort",toEl:He,fromEl:ze,originalEvent:e}),Ye({sortable:this,name:"sort",toEl:He,originalEvent:e})),et&&et.save()):Ve!==Ke&&Ve>=0&&(Ye({sortable:this,name:"update",toEl:He,originalEvent:e}),Ye({sortable:this,name:"sort",toEl:He,originalEvent:e})),Nt.active&&(null!=Ve&&-1!==Ve||(Ve=Ke,Je=Qe),Ye({sortable:this,name:"end",toEl:He,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Ue("nulling",this),ze=je=He=$e=Ge=We=Xe=qe=tt=nt=lt=Ve=Je=Ke=Qe=st=ct=et=Ze=Nt.dragged=Nt.ghost=Nt.clone=Nt.active=null,bt.forEach((function(e){e.checked=!0})),bt.length=rt=ot=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":je&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,a=this.options;r<o;r++)fe(e=n[r],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Mt(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach((function(e,r){var o=n.children[r];fe(o,this.options.draggable,n,!1)&&(t[e]=o)}),this),e.forEach((function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return fe(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=Re.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&St(n)},destroy:function(){Ue("destroy",this);var e=this.el;e[Me]=null,he(e,"mousedown",this._onTapStart),he(e,"touchstart",this._onTapStart),he(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(he(e,"dragover",this),he(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),gt.splice(gt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!qe){if(Ue("hideClone",this),Nt.eventCanceled)return;Ce(We,"display","none"),this.options.removeCloneOnHide&&We.parentNode&&We.parentNode.removeChild(We),qe=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(qe){if(Ue("showClone",this),Nt.eventCanceled)return;ze.contains(je)&&!this.options.group.revertClone?ze.insertBefore(We,je):Ge?ze.insertBefore(We,Ge):ze.appendChild(We),this.options.group.revertClone&&this.animate(je,We),Ce(We,"display",""),qe=!1}}else this._hideClone()}},Ct&&pe(document,"touchmove",(function(e){(Nt.active||pt)&&e.cancelable&&e.preventDefault()})),Nt.utils={on:pe,off:he,css:Ce,find:_e,is:function(e,t){return!!fe(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:Be,closest:fe,toggleClass:be,clone:Pe,index:Ee,nextTick:Lt,cancelNextTick:Ft,detectDirection:xt,getChild:Se},Nt.get=function(e){return e[Me]},Nt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Nt.utils=re({},Nt.utils,e.utils)),Re.mount(e)}))},Nt.create=function(e,t){return new Nt(e,t)},Nt.version="1.10.2";var Rt,Ut,Yt,jt,Ht,$t,zt=[],Gt=!1;function Xt(){zt.forEach((function(e){clearInterval(e.pid)})),zt=[]}function Wt(){clearInterval($t)}var qt=Be((function(e,t,n,r){if(t.scroll){var o,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=we(),d=!1;Ut!==n&&(Ut=n,Xt(),Rt=t.scroll,o=t.scrollFn,!0===Rt&&(Rt=Ie(n,!0)));var u=0,p=Rt;do{var h=p,g=ke(h),m=g.top,f=g.bottom,v=g.left,A=g.right,b=g.width,C=g.height,y=void 0,_=void 0,w=h.scrollWidth,k=h.scrollHeight,x=Ce(h),S=h.scrollLeft,D=h.scrollTop;h===c?(y=b<w&&("auto"===x.overflowX||"scroll"===x.overflowX||"visible"===x.overflowX),_=C<k&&("auto"===x.overflowY||"scroll"===x.overflowY||"visible"===x.overflowY)):(y=b<w&&("auto"===x.overflowX||"scroll"===x.overflowX),_=C<k&&("auto"===x.overflowY||"scroll"===x.overflowY));var E=y&&(Math.abs(A-a)<=l&&S+b<w)-(Math.abs(v-a)<=l&&!!S),T=_&&(Math.abs(f-i)<=l&&D+C<k)-(Math.abs(m-i)<=l&&!!D);if(!zt[u])for(var I=0;I<=u;I++)zt[I]||(zt[I]={});zt[u].vx==E&&zt[u].vy==T&&zt[u].el===h||(zt[u].el=h,zt[u].vx=E,zt[u].vy=T,clearInterval(zt[u].pid),0==E&&0==T||(d=!0,zt[u].pid=setInterval(function(){r&&0===this.layer&&Nt.active._onTouchMove(Ht);var t=zt[this.layer].vy?zt[this.layer].vy*s:0,n=zt[this.layer].vx?zt[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(Nt.dragged.parentNode[Me],n,t,e,Ht,zt[this.layer].el)||Oe(zt[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==c&&(p=Ie(p,!1)));Gt=d}}),30),Kt=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||o;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(d)&&(a("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Vt(){}function Qt(){}Vt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=Se(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Kt},ne(Vt,{pluginName:"revertOnSpill"}),Qt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Kt},ne(Qt,{pluginName:"removeOnSpill"}),Nt.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?pe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?pe(document,"pointermove",this._handleFallbackAutoScroll):t.touches?pe(document,"touchmove",this._handleFallbackAutoScroll):pe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?he(document,"dragover",this._handleAutoScroll):(he(document,"pointermove",this._handleFallbackAutoScroll),he(document,"touchmove",this._handleFallbackAutoScroll),he(document,"mousemove",this._handleFallbackAutoScroll)),Wt(),Xt(),clearTimeout(ve),ve=void 0},nulling:function(){Ht=Ut=Rt=Gt=$t=Yt=jt=null,zt.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,o);if(Ht=e,t||ie||ae||se){qt(e,this.options,a,t);var i=Ie(a,!0);!Gt||$t&&r===Yt&&o===jt||($t&&Wt(),$t=setInterval((function(){var a=Ie(document.elementFromPoint(r,o),!0);a!==i&&(i=a,Xt()),qt(e,n.options,a,t)}),10),Yt=r,jt=o)}else{if(!this.options.bubbleScroll||Ie(a,!0)===we())return void Xt();qt(e,this.options,Ie(a,!1),!1)}}},ne(e,{pluginName:"scroll",initializeByDefault:!0})}),Nt.mount(Qt,Vt);const Jt=Nt;a.Ay.util.warn;var Zt=r(54914),en=r(39017),tn=r(68560),nn=r(70995);const rn=(0,a.pM)({name:"AppOrderSelectorElement",components:{IconArrowDown:en.A,IconArrowUp:tn.A,NcButton:nn.A},props:{ariaDescribedby:{type:String,default:null},ariaDetails:{type:String,default:null},app:{type:Object,required:!0},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1}},emits:{"move:up":()=>!0,"move:down":()=>!0,"update:focus":()=>!0},setup(e,t){let{emit:n}=t;const r=(0,a.KR)(),o=(0,a.KR)();let i=0;return{buttonUp:r,buttonDown:o,moveUp:()=>{n("move:up"),i=1},moveDown:()=>{n("move:down"),i=-1},keepFocus:()=>{0!==i&&(1!==i&&!e.isLast||e.isFirst?(0,a.dY)((()=>o.value.$el.focus())):(0,a.dY)((()=>r.value.$el.focus()))),i=0},t:Q.Tl}}});var on=r(56725),an={};an.styleTagTransform=$(),an.setAttributes=U(),an.insert=F().bind(null,"head"),an.domAPI=M(),an.insertStyleElement=j(),O()(on.A,an),on.A&&on.A.locals&&on.A.locals;const ln=(0,A.A)(rn,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("li",{class:{"order-selector-element":!0,"order-selector-element--disabled":e.app.default},attrs:{"data-cy-app-order-element":e.app.id},on:{focusin:function(t){return e.$emit("update:focus")}}},[t("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",role:"presentation"}},[t("image",{staticClass:"order-selector-element__icon",attrs:{preserveAspectRatio:"xMinYMin meet",x:"0",y:"0",width:"20",height:"20","xlink:href":e.app.icon}})]),e._v(" "),t("div",{staticClass:"order-selector-element__label"},[e._v("\n\t\t"+e._s(e.app.label??e.app.id)+"\n\t")]),e._v(" "),t("div",{staticClass:"order-selector-element__actions"},[t("NcButton",{directives:[{name:"show",rawName:"v-show",value:!e.isFirst&&!e.app.default,expression:"!isFirst && !app.default"}],ref:"buttonUp",attrs:{"aria-label":e.t("settings","Move up"),"aria-describedby":e.ariaDescribedby,"aria-details":e.ariaDetails,"data-cy-app-order-button":"up",type:"tertiary-no-background"},on:{click:e.moveUp},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconArrowUp",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isFirst||!!e.app.default,expression:"isFirst || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}}),e._v(" "),t("NcButton",{directives:[{name:"show",rawName:"v-show",value:!e.isLast&&!e.app.default,expression:"!isLast && !app.default"}],ref:"buttonDown",attrs:{"aria-label":e.t("settings","Move down"),"aria-describedby":e.ariaDescribedby,"aria-details":e.ariaDetails,"data-cy-app-order-button":"down",type:"tertiary-no-background"},on:{click:e.moveDown},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconArrowDown",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isLast||!!e.app.default,expression:"isLast || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}})],1)])}),[],!1,null,"e25020e8",null).exports,sn=(0,a.pM)({name:"AppOrderSelector",components:{AppOrderSelectorElement:ln,Fragment:Zt.F},props:{ariaDetails:{type:String,default:null},value:{type:Array,required:!0}},emits:{"update:value":e=>Array.isArray(e)},setup(e,t){let{emit:n}=t;const r=(0,a.KR)(null),o=(0,a.EW)({get:()=>e.value,set:t=>{const r=[...t].sort(((e,n)=>(n.default?1:0)-(e.default?1:0)||t.indexOf(e)-t.indexOf(n)));r.some(((t,n)=>{let{id:r}=t;return r!==e.value[n].id}))?n("update:value",r):i.value+=1}}),i=(0,a.KR)(0);!function(e,t,n={}){let r;const{document:o=J.PWG,...i}=n,l={onUpdate:e=>{!function(e,t,n){const r=(0,a.i9)(e),o=r?[...(0,Z.BA)(e)]:(0,Z.BA)(e);if(n>=0&&n<o.length){const i=o.splice(t,1)[0];(0,a.dY)((()=>{o.splice(n,0,i),r&&(e.value=o)}))}}(t,e.oldIndex,e.newIndex)}},s=()=>{const t="string"==typeof e?null==o?void 0:o.querySelector(e):(0,J.F4c)(e);t&&void 0===r&&(r=new Jt(t,{...l,...i}))},c=()=>{null==r||r.destroy(),r=void 0};(0,Z.rd)(s),(0,Z.Uo)(c)}(r,o,{filter:".order-selector-element--disabled"});const l=(0,a.KR)([]);(0,a.$u)((()=>{l.value.forEach((e=>e.keepFocus()))}));const s=(0,a.KR)("");return{appList:o,listElement:r,moveDown:t=>{const r=t>0?e.value.slice(0,t):[];r.push(e.value[t+1]);const o=t<e.value.length-2?e.value.slice(t+2):[];n("update:value",[...r,e.value[t],...o])},moveUp:t=>{const r=t>1?e.value.slice(0,t-1):[];if(e.value[t-1]?.default)return;const o=[e.value[t-1]];t<e.value.length-1&&o.push(...e.value.slice(t+1)),n("update:value",[...r,e.value[t],...o])},statusInfoId:`sorting-status-info-${(Math.random()+1).toString(36).substring(7)}`,statusInfo:s,updateStatusInfo:t=>{s.value=(0,Q.Tl)("theming","Current selected app: {app}, position {position} of {total}",{app:e.value[t].label,position:t+1,total:e.value.length})},renderCount:i,selectorElements:l}}}),cn=sn;var dn=r(42797),un={};un.styleTagTransform=$(),un.setAttributes=U(),un.insert=F().bind(null,"head"),un.domAPI=M(),un.insertStyleElement=j(),O()(dn.A,un),dn.A&&dn.A.locals&&dn.A.locals;var pn=(0,A.A)(cn,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("Fragment",[t("div",{staticClass:"hidden-visually",attrs:{id:e.statusInfoId,"aria-live":"polite",role:"status"}},[e._v("\n\t\t"+e._s(e.statusInfo)+"\n\t")]),e._v(" "),t("ol",{ref:"listElement",staticClass:"order-selector",attrs:{"data-cy-app-order":""}},e._l(e.appList,(function(n,r){return t("AppOrderSelectorElement",e._g({key:`${n.id}${e.renderCount}`,ref:"selectorElements",refInFor:!0,attrs:{app:n,"aria-details":e.ariaDetails,"aria-describedby":e.statusInfoId,"is-first":0===r||!!e.appList[r-1].default,"is-last":r===e.value.length-1}},n.default?{}:{"move:up":()=>e.moveUp(r),"move:down":()=>e.moveDown(r),"update:focus":()=>e.updateStatusInfo(r)}))})),1)])}),[],!1,null,"3c4840b5",null);const hn=pn.exports,gn={name:"UndoIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},mn=(0,A.A)(gn,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon undo-icon",attrs:{"aria-hidden":e.title?null:"true","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:"M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var fn=r(40083);const vn=(0,a.pM)({name:"UserAppMenuSection",components:{AppOrderSelector:hn,IconUndo:mn,NcButton:nn.A,NcNoteCard:fn.A,NcSettingsSection:u.A},setup(){const{userAppOrder:e,enforcedDefaultApp:t}=(0,s.C)("theming","navigationBar"),n=(0,s.C)("core","apps").filter((e=>{let{type:t}=e;return"link"===t})).map((e=>({...e,label:e.name,default:e.default&&e.id===t}))),r=(0,a.KR)(!Array.isArray(e)||Object.values(e).length>0),o=(0,a.EW)((()=>n.some(((e,t)=>{let{id:n}=e;return n!==h.value[t].id})))),i="theming-apporder-changed-infocard",d="theming-apporder-changed-infocard",u=(0,a.EW)((()=>(o.value?`${i} `:"")+(t?d:""))),h=(0,a.KR)([...n]),g=async(e,t)=>{const n=(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"core",configKey:e});return await c.Ay.post(n,{configValue:JSON.stringify(t)})};return{appOrder:h,updateAppOrder:e=>{const t={};e.forEach(((e,n)=>{let{app:r,id:o}=e;t[o]={order:n,app:r}})),g("apporder",t).then((()=>{h.value=e,r.value=!0})).catch((e=>{console.warn("Could not set the app order",e),(0,p.Qg)((0,Q.Tl)("theming","Could not set the app order"))}))},resetAppOrder:async()=>{try{await g("apporder",[]),r.value=!1;const{data:e}=await c.Ay.get((0,l.KT)("/core/navigation/apps"),{headers:{"OCS-APIRequest":"true"}});h.value=e.ocs.data.map((e=>({...e,label:e.name,default:e.default&&e.app===t})))}catch(e){console.warn(e),(0,p.Qg)((0,Q.Tl)("theming","Could not reset the app order"))}},enforcedDefaultApp:t,hasAppOrderChanged:o,hasCustomAppOrder:r,ariaDetailsAppOrder:u,elementIdAppOrderChanged:i,elementIdEnforcedDefaultApp:d,t:Q.Tl}}}),An=vn;var bn=r(66167),Cn={};Cn.styleTagTransform=$(),Cn.setAttributes=U(),Cn.insert=F().bind(null,"head"),Cn.domAPI=M(),Cn.insertStyleElement=j(),O()(bn.A,Cn),bn.A&&bn.A.locals&&bn.A.locals;const yn=(0,A.A)(An,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("NcSettingsSection",{attrs:{name:e.t("theming","Navigation bar settings")}},[t("p",[e._v("\n\t\t"+e._s(e.t("theming","You can configure the app order used for the navigation bar. The first entry will be the default app, opened after login or when clicking on the logo."))+"\n\t")]),e._v(" "),e.enforcedDefaultApp?t("NcNoteCard",{attrs:{id:e.elementIdEnforcedDefaultApp,type:"info"}},[e._v("\n\t\t"+e._s(e.t("theming","The default app can not be changed because it was configured by the administrator."))+"\n\t")]):e._e(),e._v(" "),e.hasAppOrderChanged?t("NcNoteCard",{attrs:{id:e.elementIdAppOrderChanged,type:"info"}},[e._v("\n\t\t"+e._s(e.t("theming","The app order was changed, to see it in action you have to reload the page."))+"\n\t")]):e._e(),e._v(" "),t("AppOrderSelector",{staticClass:"user-app-menu-order",attrs:{"aria-details":e.ariaDetailsAppOrder,value:e.appOrder},on:{"update:value":e.updateAppOrder}}),e._v(" "),t("NcButton",{attrs:{"data-test-id":"btn-apporder-reset",disabled:!e.hasCustomAppOrder,type:"tertiary"},on:{click:e.resetAppOrder},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t"+e._s(e.t("theming","Reset default app order"))+"\n\t")])],1)}),[],!1,null,"08dfaa90",null).exports;var _n={grad:.9,turn:360,rad:360/(2*Math.PI)},wn=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},kn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},xn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Sn=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Dn=function(e){return{r:xn(e.r,0,255),g:xn(e.g,0,255),b:xn(e.b,0,255),a:xn(e.a)}},En=function(e){return{r:kn(e.r),g:kn(e.g),b:kn(e.b),a:kn(e.a,3)}},Tn=/^#([0-9a-f]{3,8})$/i,In=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Nn=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),i=a-Math.min(t,n,r),l=i?a===t?(n-r)/i:a===n?2+(r-t)/i:4+(t-n)/i:0;return{h:60*(l<0?l+6:l),s:a?i/a*100:0,v:a/255*100,a:o}},Bn=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),i=r*(1-n),l=r*(1-(t-a)*n),s=r*(1-(1-t+a)*n),c=a%6;return{r:255*[r,l,i,i,s,r][c],g:255*[s,r,r,l,i,i][c],b:255*[i,i,s,r,r,l][c],a:o}},On=function(e){return{h:Sn(e.h),s:xn(e.s,0,100),l:xn(e.l,0,100),a:xn(e.a)}},Pn=function(e){return{h:kn(e.h),s:kn(e.s),l:kn(e.l),a:kn(e.a,3)}},Mn=function(e){return Bn((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Ln=function(e){return{h:(t=Nn(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},Fn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Un=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jn={string:[[function(e){var t=Tn.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?kn(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?kn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Un.exec(e)||Yn.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Dn({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Fn.exec(e)||Rn.exec(e);if(!t)return null;var n,r,o=On({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(_n[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Mn(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=void 0===o?1:o;return wn(t)&&wn(n)&&wn(r)?Dn({r:Number(t),g:Number(n),b:Number(r),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,a=void 0===o?1:o;if(!wn(t)||!wn(n)||!wn(r))return null;var i=On({h:Number(t),s:Number(n),l:Number(r),a:Number(a)});return Mn(i)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,a=void 0===o?1:o;if(!wn(t)||!wn(n)||!wn(r))return null;var i=function(e){return{h:Sn(e.h),s:xn(e.s,0,100),v:xn(e.v,0,100),a:xn(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(a)});return Bn(i)},"hsv"]]},Hn=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},$n=function(e,t){var n=Ln(e);return{h:n.h,s:xn(n.s+100*t,0,100),l:n.l,a:n.a}},zn=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Gn=function(e,t){var n=Ln(e);return{h:n.h,s:n.s,l:xn(n.l+100*t,0,100),a:n.a}},Xn=function(){function e(e){this.parsed=function(e){return"string"==typeof e?Hn(e.trim(),jn.string):"object"==typeof e&&null!==e?Hn(e,jn.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return kn(zn(this.rgba),2)},e.prototype.isDark=function(){return zn(this.rgba)<.5},e.prototype.isLight=function(){return zn(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=En(this.rgba)).r,n=e.g,r=e.b,a=(o=e.a)<1?In(kn(255*o)):"","#"+In(t)+In(n)+In(r)+a;var e,t,n,r,o,a},e.prototype.toRgb=function(){return En(this.rgba)},e.prototype.toRgbString=function(){return t=(e=En(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return Pn(Ln(this.rgba))},e.prototype.toHslString=function(){return t=(e=Pn(Ln(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=Nn(this.rgba),{h:kn(e.h),s:kn(e.s),v:kn(e.v),a:kn(e.a,3)};var e},e.prototype.invert=function(){return Wn({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Wn($n(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Wn($n(this.rgba,-e))},e.prototype.grayscale=function(){return Wn($n(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Wn(Gn(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Wn(Gn(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Wn({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):kn(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ln(this.rgba);return"number"==typeof e?Wn({h:e,s:t.s,l:t.l,a:t.a}):kn(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Wn(e).toHex()},e}(),Wn=function(e){return e instanceof Xn?e:new Xn(e)},qn=r(59892);const Kn={name:"UndoVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Vn=(0,A.A)(Kn,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon undo-variant-icon",attrs:{"aria-hidden":e.title?null:"true","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.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,{primaryColor:Qn,defaultPrimaryColor:Jn}=(0,s.C)("theming","data",{primaryColor:"#0082c9",defaultPrimaryColor:"#0082c9"}),Zn=(0,a.pM)({name:"UserPrimaryColor",components:{IconColorPalette:y,IconUndo:Vn,NcButton:nn.A,NcColorPicker:m.A,NcLoadingIcon:qn.A},emits:["refresh-styles"],data:()=>({primaryColor:Qn,loading:!1}),computed:{isdefaultPrimaryColor(){return Wn(this.primaryColor).isEqual(Wn(Jn))},debouncedOnUpdate(){return g()(this.onUpdate,500)}},methods:{t:Q.Tl,reload(){const e=this.$refs.trigger,t=window.getComputedStyle(e).backgroundColor;t.toLowerCase()!==this.primaryColor&&(this.primaryColor=t)},onReset(){this.primaryColor=Jn,this.onUpdate(null)},async onUpdate(e){this.loading=!0;const t=(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"primary_color"});try{e?await c.Ay.post(t,{configValue:e}):await c.Ay.delete(t),this.$emit("refresh-styles")}catch(e){console.error("Could not update primary color",e),(0,p.Qg)((0,Q.Tl)("theming","Could not set primary color"))}this.loading=!1}}}),er=Zn;var tr=r(79799),nr={};nr.styleTagTransform=$(),nr.setAttributes=U(),nr.insert=F().bind(null,"head"),nr.domAPI=M(),nr.insertStyleElement=j(),O()(tr.A,nr),tr.A&&tr.A.locals&&tr.A.locals;const rr=(0,A.A)(er,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"primary-color__wrapper"},[t("NcColorPicker",{attrs:{"data-user-theming-primary-color":""},on:{"update:value":e.debouncedOnUpdate},model:{value:e.primaryColor,callback:function(t){e.primaryColor=t},expression:"primaryColor"}},[t("button",{ref:"trigger",staticClass:"color-container primary-color__trigger",style:{"background-color":e.primaryColor},attrs:{"data-user-theming-primary-color-trigger":""}},[e._v("\n\t\t\t"+e._s(e.t("theming","Primary color"))+"\n\t\t\t"),e.loading?t("NcLoadingIcon"):t("IconColorPalette",{attrs:{size:20}})],1)]),e._v(" "),t("NcButton",{attrs:{type:"tertiary",disabled:e.isdefaultPrimaryColor},on:{click:e.onReset},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t"+e._s(e.t("theming","Reset primary color"))+"\n\t")])],1)}),[],!1,null,"c7fa82d2",null).exports,or=(0,s.C)("theming","themes",[]),ar=(0,s.C)("theming","enforceTheme",""),ir=(0,s.C)("theming","shortcutsDisabled",!1),lr=(0,s.C)("theming","enableBlurFilter",""),sr=(0,s.C)("theming","isUserThemingDisabled"),cr={name:"UserTheming",components:{ItemPreview:V,NcCheckboxRadioSwitch:d.A,NcSettingsSection:u.A,BackgroundSettings:X,UserAppMenuSection:yn,UserPrimaryColor:rr},data:()=>({availableThemes:or,enforceTheme:ar,shortcutsDisabled:ir,isUserThemingDisabled:sr,enableBlurFilter:lr}),computed:{themes(){return this.availableThemes.filter((e=>1===e.type))},fonts(){return this.availableThemes.filter((e=>2===e.type))},selectedTheme(){return this.themes.find((e=>!0===e.enabled))||this.themes[0]},description(){return t("theming","Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level.").replace("{guidelines}",this.guidelinesLink).replace("{linkend}","</a>")},guidelinesLink:()=>'<a target="_blank" href="https://www.w3.org/WAI/standards-guidelines/wcag/" rel="noreferrer nofollow">',descriptionDetail(){return t("theming","If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!").replace("{issuetracker}",this.issuetrackerLink).replace("{designteam}",this.designteamLink).replace(/\{linkend\}/g,"</a>")},issuetrackerLink:()=>'<a target="_blank" href="https://github.com/nextcloud/server/issues/" rel="noreferrer nofollow">',designteamLink:()=>'<a target="_blank" href="https://nextcloud.com/design" rel="noreferrer nofollow">'},watch:{shortcutsDisabled(e){this.changeShortcutsDisabled(e)}},methods:{async refreshGlobalStyles(){await i(),this.$nextTick((()=>this.$refs.primaryColor.reload()))},changeTheme(e){let{enabled:t,id:n}=e;this.themes.forEach((e=>{e.id===n&&t?e.enabled=!0:e.enabled=!1})),this.updateBodyAttributes(),this.selectItem(t,n)},changeFont(e){let{enabled:t,id:n}=e;this.fonts.forEach((e=>{e.id===n&&t?e.enabled=!0:e.enabled=!1})),this.updateBodyAttributes(),this.selectItem(t,n)},async changeShortcutsDisabled(e){e?await(0,c.Ay)({url:(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),data:{configValue:"yes"},method:"POST"}):await(0,c.Ay)({url:(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),method:"DELETE"})},async changeEnableBlurFilter(){this.enableBlurFilter="no"===this.enableBlurFilter?"yes":"no",await(0,c.Ay)({url:(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"force_enable_blur_filter"}),data:{configValue:this.enableBlurFilter},method:"POST"}),this.$emit("update:background")},updateBodyAttributes(){const e=this.themes.filter((e=>!0===e.enabled)).map((e=>e.id)),t=this.fonts.filter((e=>!0===e.enabled)).map((e=>e.id));this.themes.forEach((e=>{document.body.toggleAttribute(`data-theme-${e.id}`,e.enabled)})),this.fonts.forEach((e=>{document.body.toggleAttribute(`data-theme-${e.id}`,e.enabled)})),document.body.setAttribute("data-themes",[...e,...t].join(","))},async selectItem(e,n){try{e?await(0,c.Ay)({url:(0,l.KT)("apps/theming/api/v1/theme/{themeId}/enable",{themeId:n}),method:"PUT"}):await(0,c.Ay)({url:(0,l.KT)("apps/theming/api/v1/theme/{themeId}",{themeId:n}),method:"DELETE"})}catch(e){console.error(e,e.response),OC.Notification.showTemporary(t("theming",e.response.data.ocs.meta.message+". Unable to apply the setting."))}}}};var dr=r(18755),ur={};ur.styleTagTransform=$(),ur.setAttributes=U(),ur.insert=F().bind(null,"head"),ur.domAPI=M(),ur.insertStyleElement=j(),O()(dr.A,ur),dr.A&&dr.A.locals&&dr.A.locals;const pr=(0,A.A)(cr,(function(){var e=this,t=e._self._c;return t("section",[t("NcSettingsSection",{staticClass:"theming",attrs:{name:e.t("theming","Appearance and accessibility settings")}},[t("p",{domProps:{innerHTML:e._s(e.description)}}),e._v(" "),t("p",{domProps:{innerHTML:e._s(e.descriptionDetail)}}),e._v(" "),t("div",{staticClass:"theming__preview-list"},e._l(e.themes,(function(n){return t("ItemPreview",{key:n.id,attrs:{enforced:n.id===e.enforceTheme,selected:e.selectedTheme.id===n.id,theme:n,unique:1===e.themes.length,type:"theme"},on:{change:e.changeTheme}})})),1),e._v(" "),t("div",{staticClass:"theming__preview-list"},e._l(e.fonts,(function(n){return t("ItemPreview",{key:n.id,attrs:{selected:n.enabled,theme:n,unique:1===e.fonts.length,type:"font"},on:{change:e.changeFont}})})),1),e._v(" "),t("h3",[e._v(e._s(e.t("theming","Misc accessibility options")))]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{type:"checkbox",checked:"yes"===e.enableBlurFilter,indeterminate:""===e.enableBlurFilter},on:{"update:checked":e.changeEnableBlurFilter}},[e._v("\n\t\t\t"+e._s(e.t("theming","Enable blur background filter (may increase GPU load)"))+"\n\t\t")])],1),e._v(" "),t("NcSettingsSection",{attrs:{name:e.t("theming","Primary color"),description:e.isUserThemingDisabled?e.t("theming","Customization has been disabled by your administrator"):e.t("theming","Set a primary color to highlight important elements. The color used for elements such as primary buttons might differ a bit as it gets adjusted to fulfill accessibility requirements.")}},[e.isUserThemingDisabled?e._e():t("UserPrimaryColor",{ref:"primaryColor",on:{"refresh-styles":e.refreshGlobalStyles}})],1),e._v(" "),t("NcSettingsSection",{staticClass:"background",attrs:{name:e.t("theming","Background and color"),description:e.isUserThemingDisabled?e.t("theming","Customization has been disabled by your administrator"):e.t("theming","The background can be set to an image from the default set, a custom uploaded image, or a plain color.")}},[e.isUserThemingDisabled?e._e():t("BackgroundSettings",{staticClass:"background__grid",on:{"update:background":e.refreshGlobalStyles}})],1),e._v(" "),t("NcSettingsSection",{attrs:{name:e.t("theming","Keyboard shortcuts"),description:e.t("theming","In some cases keyboard shortcuts can interfere with accessibility tools. In order to allow focusing on your tool correctly you can disable all keyboard shortcuts here. This will also disable all available shortcuts in apps.")}},[t("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:e.shortcutsDisabled,type:"switch"},on:{"update:checked":function(t){e.shortcutsDisabled=t},change:e.changeShortcutsDisabled}},[e._v("\n\t\t\t"+e._s(e.t("theming","Disable all keyboard shortcuts"))+"\n\t\t")])],1),e._v(" "),t("UserAppMenuSection")],1)}),[],!1,null,"3082a53a",null).exports;r.nc=(0,o.aV)(),a.Ay.prototype.OC=OC,a.Ay.prototype.t=t;const hr=new(a.Ay.extend(pr));hr.$mount("#theming"),hr.$on("update:background",i)},18755:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([e.id,".theming p[data-v-3082a53a]{max-width:800px}.theming[data-v-3082a53a] a{font-weight:bold}.theming[data-v-3082a53a] a:hover,.theming[data-v-3082a53a] a:focus{text-decoration:underline}.theming__preview-list[data-v-3082a53a]{--gap: 30px;display:grid;margin-top:var(--gap);column-gap:var(--gap);row-gap:var(--gap)}.background__grid[data-v-3082a53a]{margin-top:30px}@media(max-width: 1440px){.theming__preview-list[data-v-3082a53a]{display:flex;flex-direction:column}}","",{version:3,sources:["webpack://./apps/theming/src/UserTheming.vue"],names:[],mappings:"AAGC,4BACC,eAAA,CAID,4BACC,gBAAA,CAEA,oEAEC,yBAAA,CAIF,wCACC,WAAA,CACA,YAAA,CACA,qBAAA,CACA,qBAAA,CACA,kBAAA,CAKD,mCACC,eAAA,CAIF,0BACC,wCACC,YAAA,CACA,qBAAA,CAAA",sourceRoot:""}]);const l=i},42797:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([e.id,".order-selector[data-v-3c4840b5]{width:max-content;min-width:260px}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelector.vue"],names:[],mappings:"AACA,iCACC,iBAAA,CACA,eAAA",sourceRoot:""}]);const l=i},56725:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([e.id,".order-selector-element[data-v-e25020e8]{list-style:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding-inline:12px}.order-selector-element[data-v-e25020e8]:hover{background-color:var(--color-background-hover);border-radius:var(--border-radius-large)}.order-selector-element--disabled[data-v-e25020e8]{border-color:var(--color-text-maxcontrast);color:var(--color-text-maxcontrast)}.order-selector-element--disabled .order-selector-element__icon[data-v-e25020e8]{opacity:75%}.order-selector-element__actions[data-v-e25020e8]{flex:0 0;display:flex;flex-direction:row;gap:6px}.order-selector-element__label[data-v-e25020e8]{flex:1 1;text-overflow:ellipsis;overflow:hidden}.order-selector-element__placeholder[data-v-e25020e8]{height:44px;width:44px}.order-selector-element__icon[data-v-e25020e8]{filter:var(--background-invert-if-bright)}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelectorElement.vue"],names:[],mappings:"AACA,yCAEC,eAAA,CAEA,YAAA,CACA,kBAAA,CACA,kBAAA,CAEA,QAAA,CACA,mBAAA,CAEA,+CACC,8CAAA,CACA,wCAAA,CAGD,mDACC,0CAAA,CACA,mCAAA,CAEA,iFACC,WAAA,CAIF,kDACC,QAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CAGD,gDACC,QAAA,CACA,sBAAA,CACA,eAAA,CAGD,sDACC,WAAA,CACA,UAAA,CAGD,+CACC,yCAAA",sourceRoot:""}]);const l=i},6091:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([e.id,".background-selector[data-v-7cc51a4f]{display:flex;flex-wrap:wrap;justify-content:center}.background-selector .background-color[data-v-7cc51a4f]{display:flex;justify-content:center;align-items:center;width:176px;height:96px;margin:8px;border-radius:var(--border-radius-large);background-color:var(--color-primary)}.background-selector .background[data-v-7cc51a4f]{overflow:hidden;width:176px;height:96px;margin:8px;text-align:center;word-wrap:break-word;hyphens:auto;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large);background-position:center center;background-size:cover}.background-selector .background__filepicker[data-v-7cc51a4f]{background-color:var(--color-background-dark)}.background-selector .background__filepicker.background--active[data-v-7cc51a4f]{color:var(--color-background-plain-text);background-image:var(--image-background)}.background-selector .background__default[data-v-7cc51a4f]{background-color:var(--color-background-plain);background-image:linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)),var(--05e06a8e)}.background-selector .background__filepicker[data-v-7cc51a4f],.background-selector .background__default[data-v-7cc51a4f],.background-selector .background__color[data-v-7cc51a4f]{border-color:var(--color-border)}.background-selector .background__default[data-v-7cc51a4f],.background-selector .background__shipped[data-v-7cc51a4f]{color:#fff}.background-selector .background[data-color-bright][data-v-7cc51a4f]{color:#000}.background-selector .background--active[data-v-7cc51a4f],.background-selector .background[data-v-7cc51a4f]:hover,.background-selector .background[data-v-7cc51a4f]:focus{outline:2px solid var(--color-main-text) !important;border-color:var(--color-main-background) !important}.background-selector .background span[data-v-7cc51a4f]{margin:4px}.background-selector .background .check-icon[data-v-7cc51a4f]{display:none}.background-selector .background--active:not(.icon-loading) .check-icon[data-v-7cc51a4f]{display:block !important}","",{version:3,sources:["webpack://./apps/theming/src/components/BackgroundSettings.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,cAAA,CACA,sBAAA,CAEA,wDACC,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,wCAAA,CACA,qCAAA,CAGD,kDACC,eAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,iBAAA,CACA,oBAAA,CACA,YAAA,CACA,6CAAA,CACA,wCAAA,CACA,iCAAA,CACA,qBAAA,CAEA,8DACC,6CAAA,CAEA,iFACC,wCAAA,CACA,wCAAA,CAIF,2DACC,8CAAA,CACA,yGAAA,CAGD,kLACC,gCAAA,CAID,sHAEC,UAAA,CAID,qEACC,UAAA,CAGD,0KAGC,mDAAA,CACA,oDAAA,CAID,uDACC,UAAA,CAGD,8DACC,YAAA,CAIA,yFAEC,wBAAA",sourceRoot:""}]);const l=i},37499:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([e.id,".theming__preview[data-v-fcbd7e50]{--ratio: 16;position:relative;display:flex;justify-content:flex-start}.theming__preview[data-v-fcbd7e50],.theming__preview *[data-v-fcbd7e50]{user-select:none}.theming__preview-image[data-v-fcbd7e50]{flex-basis:calc(16px*var(--ratio));flex-shrink:0;height:calc(10px*var(--ratio));margin-inline-end:var(--gap);cursor:pointer;border-radius:var(--border-radius);background-repeat:no-repeat;background-position:top left;background-size:cover}.theming__preview-explanation[data-v-fcbd7e50]{margin-bottom:10px}.theming__preview-description[data-v-fcbd7e50]{display:flex;flex-direction:column}.theming__preview-description h3[data-v-fcbd7e50]{font-weight:bold;margin-bottom:0}.theming__preview-description label[data-v-fcbd7e50]{padding:12px 0}.theming__preview-warning[data-v-fcbd7e50]{color:var(--color-warning)}@media(max-width: 682.6666666667px){.theming__preview[data-v-fcbd7e50]{flex-direction:column}.theming__preview-image[data-v-fcbd7e50]{margin:0}}","",{version:3,sources:["webpack://./apps/theming/src/components/ItemPreview.vue"],names:[],mappings:"AAGA,mCAEC,WAAA,CACA,iBAAA,CACA,YAAA,CACA,0BAAA,CAEA,wEAEC,gBAAA,CAGD,yCACC,kCAAA,CACA,aAAA,CACA,8BAAA,CACA,4BAAA,CACA,cAAA,CACA,kCAAA,CACA,2BAAA,CACA,4BAAA,CACA,qBAAA,CAGD,+CACC,kBAAA,CAGD,+CACC,YAAA,CACA,qBAAA,CAEA,kDACC,gBAAA,CACA,eAAA,CAGD,qDACC,cAAA,CAIF,2CACC,0BAAA,CAIF,oCACC,mCACC,qBAAA,CAEA,yCACC,QAAA,CAAA",sourceRoot:""}]);const l=i},66167:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([e.id,".user-app-menu-order[data-v-08dfaa90]{margin-block:12px}","",{version:3,sources:["webpack://./apps/theming/src/components/UserAppMenuSection.vue"],names:[],mappings:"AACA,sCACC,iBAAA",sourceRoot:""}]);const l=i},79799:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([e.id,".primary-color__wrapper[data-v-c7fa82d2]{display:flex;flex-direction:row;flex-wrap:wrap;gap:12px}.primary-color__trigger[data-v-c7fa82d2]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background-color:var(--color-primary);color:var(--color-primary-text);width:350px;max-width:100vw;height:96px;word-wrap:break-word;hyphens:auto;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large)}.primary-color__trigger[data-v-c7fa82d2]:active{background-color:var(--color-primary-hover) !important}.primary-color__trigger[data-v-c7fa82d2]:hover,.primary-color__trigger[data-v-c7fa82d2]:focus,.primary-color__trigger[data-v-c7fa82d2]:focus-visible{border-color:var(--color-main-background) !important;outline:2px solid var(--color-main-text) !important}","",{version:3,sources:["webpack://./apps/theming/src/components/UserPrimaryColor.vue"],names:[],mappings:"AAEC,yCACC,YAAA,CACA,kBAAA,CACA,cAAA,CACA,QAAA,CAGD,yCACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA,CACA,OAAA,CAEA,qCAAA,CACA,+BAAA,CACA,WAAA,CACA,eAAA,CACA,WAAA,CAEA,oBAAA,CACA,YAAA,CAEA,6CAAA,CACA,wCAAA,CAEA,gDACC,sDAAA,CAGD,qJAGC,oDAAA,CACA,mDAAA",sourceRoot:""}]);const l=i}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=o,e=[],i.O=(t,n,r,o)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){n=e[d][0],r=e[d][1],o=e[d][2];for(var l=!0,s=0;s<n.length;s++)(!1&o||a>=o)&&Object.keys(i.O).every((e=>i.O[e](n[s])))?n.splice(s--,1):(l=!1,o<a&&(a=o));if(l){e.splice(d--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+"-"+e+".js?v="+{2441:"fc741cf57e9647f370a3",5862:"7b9b02dc0a1b898066ef",7874:"5d0f14697282cbdd7841"}[e],i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="nextcloud:",i.l=(e,t,o,a)=>{if(n[e])n[e].push(t);else{var l,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+o){l=u;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.setAttribute("data-webpack",r+o),l.src=e),n[e]=[t];var p=(t,r)=>{l.onerror=l.onload=null,clearTimeout(h);var o=n[e];if(delete n[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),s&&document.head.appendChild(l)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=6673,(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{i.b=document.baseURI||self.location.href;var e={6673:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var a=i.p+i.u(t),l=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",l.name="ChunkLoadError",l.type=o,l.request=a,r[1](l)}}),"chunk-"+t,t)}},i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,a=n[0],l=n[1],s=n[2],c=0;if(a.some((t=>0!==e[t]))){for(r in l)i.o(l,r)&&(i.m[r]=l[r]);if(s)var d=s(i)}for(t&&t(n);c<a.length;c++)o=a[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(d)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0;var l=i.O(void 0,[4208],(()=>i(68587)));l=i.O(l)})();
|
|
//# sourceMappingURL=theming-personal-theming.js.map?v=fbb73263f5da5649f5b0
|