!function(){"use strict";varn,e={10106:function(n,e,r){vara=r(20144),o=r(79753),i=r(16453),c=r(4820),s=r(20571),l=r.n(s),u=r(13299),d=r.n(u),g=r(14625),m=r(31894),p=r(20296),h=r.n(p),f=r(69867),A=r.n(f),b=r(15168),v=r.n(b),k=r(1082),C=r.n(k),_=(r(97248),r(26932)),y=r(22200);functionw(n,e,t,r,a,o,i){try{varc=n[o](i),s=c.value}catch(n){returnvoidt(n)}c.done?e(s):Promise.resolve(s).then(r,a)}functionx(n){returnfunction(){vare=this,t=arguments;returnnewPromise((function(r,a){varo=n.apply(e,t);functioni(n){w(o,r,a,i,c,"next",n)}functionc(n){w(o,r,a,i,c,"throw",n)}i(void0)}))}}functionS(n,e){(null==e||e>n.length)&&(e=n.length);for(vart=0,r=newArray(e);t<e;t++)r[t]=n[t];returnr}varT=(0,i.loadState)("theming","backgroundColor"),I=(0,i.loadState)("theming","backgroundImage"),B=(0,i.loadState)("theming","shippedBackgrounds"),D=(0,i.loadState)("theming","themingDefaultBackground"),E=(0,i.loadState)("theming","defaultShippedBackground"),P=function(n){return(0,o.generateFilePath)("theming","","img/background/")+n},R=(0,_.fn)(t("theming","Select a background from your files")).setMultiSelect(!1).setModal(!0).setType(1).setMimeTypeFilter(["image/png","image/gif","image/jpeg","image/svg+xml","image/svg"]).build(),U={name:"BackgroundSettings",directives:{Tooltip:v()},components:{Check:g.default,Close:m.default,NcColorPicker:A()},data:function(){return{loading:!1,Theming:(0,i.loadState)("theming","data",{}),backgroundImage:I,backgroundColor:T}},computed:{shippedBackgrounds:function(){varn=this;returnObject.keys(B).map((function(n){return{name:n,url:P(n),preview:P("preview/"+n),details:B[n]}})).filter((function(e){return!(!n.isGlobalBackgroundDeleted&&!n.isGlobalBackgroundDefault)||e.name!==E}))},isGlobalBackgroundDefault:function(){return!!D},isGlobalBackgroundDeleted:function(){return"backgroundColor"===D}},methods:{invertTextColor:function(n){returnthis.calculateLuma(n)>.6},calculateLuma:function(n){vare,t,r=(e=this.hexToRGB(n),t=3,function(n){if(Array.isArray(n))returnn}(e)||function(n,e){vart=null==n?null:"undefined"!=typeofSymbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){varr,a,o=[],i=!0,c=!1;try{for(t=t.call(n);!(i=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);i=!0);}catch(n){c=!0,a=n}finally{try{i||null==t.return||t.return()}finally{if(c)throwa}}returno}}(e,t)||function(n,e){if(n){if("string"==typeofn)returnS(n,e);vart=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(n,e):void0}}(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return(.2126*r[0]+.7152*r[1]+.0722*r[2])/255},hexToRGB:function(n){vare=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);returne?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null},update:function(n){vare=this;returnx(regeneratorRuntime.mark((functiont(){returnregeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case0:e.backgroundImage=n.backgroundImage,e.backgroundColor=n.backgroundColor,e.Theming.color=n.backgroundColor,e.$emit("update:background"),e.loading=!1;case5:case"end":returnt.stop()}}),t)})))()},setDefault:function(){varn=this;returnx(regeneratorRuntime.mark((functione(){vart;returnregeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case0:returnn.loading="default",e.next=3,c.default.post((0,o.generateUrl)("/apps/theming/background/default"));case3:t=e.sent,n.update(t.data);case5:case"end":returne.stop()}}),e)})))()},setShipped:function(n){vare=this;returnx(regeneratorRuntime.mark((functiont(){varr;returnregeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case0:returne.loading=n,t.next=3,c.default.post((0,o.generateUrl)("/apps/theming/background/shipped"),{value:n});case3:r=t.sent,e.update(r.data);case5:case"end":returnt.stop()}}),t)})))()},setFile:function(n){vare=arguments,t=t