You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

theming-admin-theming.js 108KB

123
  1. /*! For license information please see theming-admin-theming.js.LICENSE.txt */
  2. !function(){"use strict";var e,n,r,o={86303:function(e,n,r){var o=r(77958),i=r(20144);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var l=r(43554),c=r(6156),s=r(67912),u=r(67606),d=r(93664),p=r(79753),h=["color","logo","background","logoheader","favicon","disable-user-theming"],f={emits:["update:theming"],data:function(){return{showSuccess:!1,errorMessage:""}},computed:{id:function(){return"admin-theming-".concat(this.name)}},methods:{reset:function(){this.showSuccess=!1,this.errorMessage=""},handleSuccess:function(){var t=this;this.showSuccess=!0,setTimeout((function(){t.showSuccess=!1}),2e3),h.includes(this.name)&&this.$emit("update:theming")}}};function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(){g=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),l=new E(o||[]);return r(a,"_invoke",{value:C(t,n,l)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function p(){}function h(){}function f(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(T([])));b&&b!==e&&n.call(b,i)&&(v=b);var A=f.prototype=p.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(r,i,a,l){var c=u(t[r],t,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==m(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function C(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return h.prototype=f,r(A,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:h,configurable:!0}),h.displayName=c(f,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},w(x.prototype),c(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new x(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(A),c(A,l,"Generator"),c(A,i,(function(){return this})),c(A,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function v(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function y(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){v(i,r,o,a,l,"next",t)}function l(t){v(i,r,o,a,l,"throw",t)}a(void 0)}))}}var b={mixins:[f],watch:{value:function(t){this.localValue=t}},data:function(){return{localValue:this.value}},methods:{save:function(){var t=this;return y(g().mark((function e(){var n,r,o;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.reset(),n=(0,p.generateUrl)("/apps/theming/ajax/updateStylesheet"),r=!0===t.localValue?"yes":!1===t.localValue?"no":t.localValue,e.prev=3,e.next=6,d.Z.post(n,{setting:t.name,value:r});case 6:t.$emit("update:value",t.localValue),t.handleSuccess(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),t.errorMessage=null===(o=e.t0.response.data.data)||void 0===o?void 0:o.message;case 13:case"end":return e.stop()}}),e,null,[[3,10]])})))()},undo:function(){var t=this;return y(g().mark((function e(){var n,r;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.reset(),n=(0,p.generateUrl)("/apps/theming/ajax/undoChanges"),e.prev=2,e.next=5,d.Z.post(n,{setting:t.name});case 5:t.$emit("update:value",t.defaultValue),t.handleSuccess(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),t.errorMessage=null===(r=e.t0.response.data.data)||void 0===r?void 0:r.message;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))()}}},A={name:"CheckboxField",components:{NcCheckboxRadioSwitch:u.Z,NcNoteCard:c.Z},mixins:[b],props:{name:{type:String,required:!0},value:{type:Boolean,required:!0},defaultValue:{type:Boolean,required:!0},displayName:{type:String,required:!0},label:{type:String,required:!0},description:{type:String,required:!0}}},w=r(93379),x=r.n(w),C=r(7795),_=r.n(C),S=r(90569),N=r.n(S),E=r(3565),T=r.n(E),I=r(19216),L=r.n(I),k=r(44589),M=r.n(k),D=r(97763),O={};O.styleTagTransform=M(),O.setAttributes=T(),O.insert=N().bind(null,"head"),O.domAPI=_(),O.insertStyleElement=L(),x()(D.Z,O),D.Z&&D.Z.locals&&D.Z.locals;var j=r(51900),P=(0,j.Z)(A,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"field"},[e("label",{attrs:{for:t.id}},[t._v(t._s(t.displayName))]),t._v(" "),e("div",{staticClass:"field__row"},[e("NcCheckboxRadioSwitch",{attrs:{type:"switch",id:t.id,checked:t.localValue},on:{"update:checked":[function(e){t.localValue=e},t.save]}},[t._v("\n\t\t\t"+t._s(t.label)+"\n\t\t")])],1),t._v(" "),e("p",{staticClass:"field__description"},[t._v(t._s(t.description))]),t._v(" "),t.errorMessage?e("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[e("p",[t._v(t._s(t.errorMessage))])]):t._e()],1)}),[],!1,null,"c41a3e80",null).exports,F=r(20296),Z=r(57274),B=r(37776),Y=r(92425);function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function U(){U=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),l=new S(o||[]);return r(a,"_invoke",{value:w(t,n,l)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function p(){}function h(){}function f(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(N([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=f.prototype=p.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,l){var c=u(t[r],t,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==R(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=f,r(y,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:h,configurable:!0}),h.displayName=c(f,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(A.prototype),c(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),c(y,l,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=N,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function z(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function G(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){z(i,r,o,a,l,"next",t)}function l(t){z(i,r,o,a,l,"throw",t)}a(void 0)}))}}var V={name:"ColorPickerField",components:{NcButton:Z.Z,NcColorPicker:B.Z,NcNoteCard:c.Z,Undo:Y.default},mixins:[b],props:{name:{type:String,required:!0},value:{type:String,required:!0},defaultValue:{type:String,required:!0},displayName:{type:String,required:!0}},methods:{debounceSave:(0,F.debounce)(G(U().mark((function t(){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.save();case 2:case"end":return t.stop()}}),t,this)}))),200)}},X=r(40863),H={};H.styleTagTransform=M(),H.setAttributes=T(),H.insert=N().bind(null,"head"),H.domAPI=_(),H.insertStyleElement=L(),x()(X.Z,H),X.Z&&X.Z.locals&&X.Z.locals;var W=(0,j.Z)(V,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"field"},[e("label",{attrs:{for:t.id}},[t._v(t._s(t.displayName))]),t._v(" "),e("div",{staticClass:"field__row"},[e("NcColorPicker",{attrs:{value:t.localValue,"advanced-fields":!0},on:{"update:value":[function(e){t.localValue=e},t.debounceSave]}},[e("NcButton",{staticClass:"field__button",attrs:{type:"primary",id:t.id,"aria-label":t.t("theming","Select a custom color"),"data-admin-theming-setting-primary-color-picker":""}},[t._v("\n\t\t\t\t"+t._s(t.value)+"\n\t\t\t")])],1),t._v(" "),t.value!==t.defaultValue?e("NcButton",{attrs:{type:"tertiary","aria-label":t.t("theming","Reset to default"),"data-admin-theming-setting-primary-color-reset":""},on:{click:t.undo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Undo",{attrs:{size:20}})]},proxy:!0}],null,!1,33666776)}):t._e()],1),t._v(" "),t.errorMessage?e("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[e("p",[t._v(t._s(t.errorMessage))])]):t._e()],1)}),[],!1,null,"425ea0b4",null).exports,q=r(20435),$=r(57612),Q=r(75762);function J(t){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(t)}function K(){K=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),l=new S(o||[]);return r(a,"_invoke",{value:w(t,n,l)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function p(){}function h(){}function f(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(N([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=f.prototype=p.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,l){var c=u(t[r],t,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==J(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=f,r(y,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:h,configurable:!0}),h.displayName=c(f,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(A.prototype),c(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),c(y,l,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=N,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function tt(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function et(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){tt(i,r,o,a,l,"next",t)}function l(t){tt(i,r,o,a,l,"throw",t)}a(void 0)}))}}var nt=(0,l.j)("theming","adminThemingParameters",{}).allowedMimeTypes,rt={name:"FileInputField",components:{Delete:$.Z,NcButton:Z.Z,NcLoadingIcon:q.Z,NcNoteCard:c.Z,Undo:Y.default,Upload:Q.Z},mixins:[f],props:{name:{type:String,required:!0},mimeName:{type:String,required:!0},mimeValue:{type:String,required:!0},defaultMimeValue:{type:String,required:!0},displayName:{type:String,required:!0},ariaLabel:{type:String,required:!0}},data:function(){return{showLoading:!1,acceptMime:(nt[this.name]||["image/jpeg","image/png","image/gif","image/webp"]).join(",")}},computed:{showReset:function(){return this.mimeValue!==this.defaultMimeValue},showRemove:function(){if("background"===this.name){if(this.mimeValue.startsWith("image/"))return!0;if(this.mimeValue===this.defaultMimeValue)return!0}return!1}},methods:{activateLocalFilePicker:function(){this.reset(),this.$refs.input.value=null,this.$refs.input.click()},onChange:function(t){var e=this;return et(K().mark((function n(){var r,o,i,a;return K().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.target.files[0],(o=new FormData).append("key",e.name),o.append("image",r),i=(0,p.generateUrl)("/apps/theming/ajax/uploadImage"),n.prev=5,e.showLoading=!0,n.next=9,d.Z.post(i,o);case 9:e.showLoading=!1,e.$emit("update:mime-value",r.type),e.handleSuccess(),n.next=18;break;case 14:n.prev=14,n.t0=n.catch(5),e.showLoading=!1,e.errorMessage=null===(a=n.t0.response.data.data)||void 0===a?void 0:a.message;case 18:case"end":return n.stop()}}),n,null,[[5,14]])})))()},undo:function(){var t=this;return et(K().mark((function e(){var n,r;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.reset(),n=(0,p.generateUrl)("/apps/theming/ajax/undoChanges"),e.prev=2,e.next=5,d.Z.post(n,{setting:t.mimeName});case 5:t.$emit("update:mime-value",t.defaultMimeValue),t.handleSuccess(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),t.errorMessage=null===(r=e.t0.response.data.data)||void 0===r?void 0:r.message;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))()},removeBackground:function(){var t=this;return et(K().mark((function e(){var n,r;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.reset(),n=(0,p.generateUrl)("/apps/theming/ajax/updateStylesheet"),e.prev=2,e.next=5,d.Z.post(n,{setting:t.mimeName,value:"backgroundColor"});case 5:t.$emit("update:mime-value","backgroundColor"),t.handleSuccess(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),t.errorMessage=null===(r=e.t0.response.data.data)||void 0===r?void 0:r.message;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))()}}},ot=rt,it=r(1815),at={};at.styleTagTransform=M(),at.setAttributes=T(),at.insert=N().bind(null,"head"),at.domAPI=_(),at.insertStyleElement=L(),x()(it.Z,at),it.Z&&it.Z.locals&&it.Z.locals;var lt=(0,j.Z)(ot,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"field"},[e("label",{attrs:{for:t.id}},[t._v(t._s(t.displayName))]),t._v(" "),e("div",{staticClass:"field__row"},[e("NcButton",{attrs:{type:"secondary",id:t.id,"aria-label":t.ariaLabel,"data-admin-theming-setting-file-picker":""},on:{click:t.activateLocalFilePicker},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Upload",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t\t"+t._s(t.t("theming","Upload"))+"\n\t\t")]),t._v(" "),t.showReset?e("NcButton",{attrs:{type:"tertiary","aria-label":t.t("theming","Reset to default"),"data-admin-theming-setting-file-reset":""},on:{click:t.undo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Undo",{attrs:{size:20}})]},proxy:!0}],null,!1,33666776)}):t._e(),t._v(" "),t.showRemove?e("NcButton",{attrs:{type:"tertiary","aria-label":t.t("theming","Remove background image"),"data-admin-theming-setting-file-remove":""},on:{click:t.removeBackground},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Delete",{attrs:{size:20}})]},proxy:!0}],null,!1,2705356561)}):t._e(),t._v(" "),t.showLoading?e("NcLoadingIcon",{staticClass:"field__loading-icon",attrs:{size:20}}):t._e()],1),t._v(" "),"logoheader"!==t.name&&"favicon"!==t.name||t.mimeValue===t.defaultMimeValue?t._e():e("div",{staticClass:"field__preview",class:{"field__preview--logoheader":"logoheader"===t.name,"field__preview--favicon":"favicon"===t.name}}),t._v(" "),t.errorMessage?e("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[e("p",[t._v(t._s(t.errorMessage))])]):t._e(),t._v(" "),e("input",{ref:"input",attrs:{accept:t.acceptMime,type:"file"},on:{change:t.onChange}})],1)}),[],!1,null,"36abeca7",null).exports,ct={name:"TextField",components:{NcTextField:r(49368).Z},mixins:[b],props:{name:{type:String,required:!0},value:{type:String,required:!0},defaultValue:{type:String,required:!0},type:{type:String,required:!0},displayName:{type:String,required:!0},placeholder:{type:String,required:!0},maxlength:{type:Number,required:!0}}},st=r(33655),ut={};ut.styleTagTransform=M(),ut.setAttributes=T(),ut.insert=N().bind(null,"head"),ut.domAPI=_(),ut.insertStyleElement=L(),x()(st.Z,ut),st.Z&&st.Z.locals&&st.Z.locals;var dt=(0,j.Z)(ct,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"field"},[e("NcTextField",{attrs:{value:t.localValue,label:t.displayName,placeholder:t.placeholder,type:t.type,maxlength:t.maxlength,spellcheck:!1,success:t.showSuccess,error:Boolean(t.errorMessage),"helper-text":t.errorMessage,"show-trailing-button":t.value!==t.defaultValue,"trailing-button-icon":"undo"},on:{"update:value":function(e){t.localValue=e},"trailing-button-click":t.undo,keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.save.apply(null,arguments)},blur:t.save}})],1)}),[],!1,null,"31f08db0",null),pt=dt.exports,ht=r(64024),ft=r(31352),mt=r(61537);function gt(t){return"function"==typeof t?t():(0,i.unref)(t)}i.default.util.warn,r(25108);const vt="undefined"!=typeof window&&"undefined"!=typeof document;function yt(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}Object.prototype.toString;const bt=/\B([A-Z])/g,At=(yt((t=>t.replace(bt,"-$1").toLowerCase())),/-(\w)/g);yt((t=>t.replace(At,((t,e)=>e?e.toUpperCase():"")))),r(25108),vt&&window;const wt=vt?window.document:void 0;function xt(t){return xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(t)}function Ct(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _t(){return _t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_t.apply(this,arguments)}function St(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Ct(t,e,n[e])}))}return t}function Nt(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}vt&&window.navigator,vt&&window.location,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,Number.POSITIVE_INFINITY;var Et=Nt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Tt=Nt(/Edge/i),It=Nt(/firefox/i),Lt=Nt(/safari/i)&&!Nt(/chrome/i)&&!Nt(/android/i),kt=Nt(/iP(ad|od|hone)/i),Mt=Nt(/chrome/i)&&Nt(/android/i),Dt={capture:!1,passive:!1};function Ot(t,e,n){t.addEventListener(e,n,!Et&&Dt)}function jt(t,e,n){t.removeEventListener(e,n,!Et&&Dt)}function Pt(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Ft(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Zt(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Pt(t,e):Pt(t,e))||r&&t===n)return t;if(t===n)break}while(t=Ft(t))}return null}var Bt,Yt=/\s+/g;function Rt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(Yt," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(Yt," ")}}function Ut(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function zt(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Ut(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Gt(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function Vt(){return document.scrollingElement||document.documentElement}function Xt(t,e,n,r,o){if(t.getBoundingClientRect||t===window){var i,a,l,c,s,u,d;if(t!==window&&t!==Vt()?(a=(i=t.getBoundingClientRect()).top,l=i.left,c=i.bottom,s=i.right,u=i.height,d=i.width):(a=0,l=0,c=window.innerHeight,s=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!Et))do{if(o&&o.getBoundingClientRect&&("none"!==Ut(o,"transform")||n&&"static"!==Ut(o,"position"))){var p=o.getBoundingClientRect();a-=p.top+parseInt(Ut(o,"border-top-width")),l-=p.left+parseInt(Ut(o,"border-left-width")),c=a+i.height,s=l+i.width;break}}while(o=o.parentNode);if(r&&t!==window){var h=zt(o||t),f=h&&h.a,m=h&&h.d;h&&(c=(a/=m)+(u/=m),s=(l/=f)+(d/=f))}return{top:a,left:l,bottom:c,right:s,width:d,height:u}}}function Ht(t,e,n){for(var r=Jt(t,!0),o=Xt(t)[e];r;){var i=Xt(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===Vt())break;r=Jt(r,!1)}return!1}function Wt(t,e,n){for(var r=0,o=0,i=t.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==Ke.ghost&&i[o]!==Ke.dragged&&Zt(i[o],n.draggable,t,!1)){if(r===e)return i[o];r++}o++}return null}function qt(t,e){for(var n=t.lastElementChild;n&&(n===Ke.ghost||"none"===Ut(n,"display")||e&&!Pt(n,e));)n=n.previousElementSibling;return n||null}function $t(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ke.clone||e&&!Pt(t,e)||n++;return n}function Qt(t){var e=0,n=0,r=Vt();if(t)do{var o=zt(t),i=o.a,a=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function Jt(t,e){if(!t||!t.getBoundingClientRect)return Vt();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Ut(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 Vt();if(r||e)return n;r=!0}}}while(n=n.parentNode);return Vt()}function Kt(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function te(t,e){return function(){if(!Bt){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),Bt=setTimeout((function(){Bt=void 0}),e)}}}function ee(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function ne(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var re="Sortable"+(new Date).getTime();var oe=[],ie={initializeByDefault:!0},ae={mount:function(t){for(var e in ie)ie.hasOwnProperty(e)&&!(e in t)&&(t[e]=ie[e]);oe.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";oe.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](St({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](St({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var o in oe.forEach((function(r){var o=r.pluginName;if(t.options[o]||r.initializeByDefault){var i=new r(t,e,t.options);i.sortable=t,i.options=t.options,t[o]=i,_t(n,i.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var i=this.modifyOption(t,o,t.options[o]);void 0!==i&&(t.options[o]=i)}},getEventProperties:function(t,e){var n={};return oe.forEach((function(r){"function"==typeof r.eventProperties&&_t(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return oe.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(r=o.optionListeners[e].call(t[o.pluginName],n))})),r}};var le=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(n,["evt"]);ae.pluginEvent.bind(Ke)(t,e,St({dragEl:se,parentEl:ue,ghostEl:de,rootEl:pe,nextEl:he,lastDownEl:fe,cloneEl:me,cloneHidden:ge,dragStarted:Ie,putSortable:xe,activeSortable:Ke.active,originalEvent:r,oldIndex:ve,oldDraggableIndex:be,newIndex:ye,newDraggableIndex:Ae,hideGhostForTarget:qe,unhideGhostForTarget:$e,cloneNowHidden:function(){ge=!0},cloneNowShown:function(){ge=!1},dispatchSortableEvent:function(t){ce({sortable:e,name:t,originalEvent:r})}},o))};function ce(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,a=t.toEl,l=t.fromEl,c=t.oldIndex,s=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[re]){var m,g=e.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||Et||Tt?(m=document.createEvent("Event")).initEvent(r,!0,!0):m=new CustomEvent(r,{bubbles:!0,cancelable:!0}),m.to=a||n,m.from=l||n,m.item=o||n,m.clone=i,m.oldIndex=c,m.newIndex=s,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=p,m.pullMode=h?h.lastPutMode:void 0;var y=St({},f,ae.getEventProperties(r,e));for(var b in y)m[b]=y[b];n&&n.dispatchEvent(m),g[v]&&g[v].call(e,m)}}(St({putSortable:xe,cloneEl:me,targetEl:se,rootEl:pe,oldIndex:ve,oldDraggableIndex:be,newIndex:ye,newDraggableIndex:Ae},t))}var se,ue,de,pe,he,fe,me,ge,ve,ye,be,Ae,we,xe,Ce,_e,Se,Ne,Ee,Te,Ie,Le,ke,Me,De,Oe=!1,je=!1,Pe=[],Fe=!1,Ze=!1,Be=[],Ye=!1,Re=[],Ue="undefined"!=typeof document,ze=kt,Ge=Tt||Et?"cssFloat":"float",Ve=Ue&&!Mt&&!kt&&"draggable"in document.createElement("div"),Xe=function(){if(Ue){if(Et)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),He=function(t,e){var n=Ut(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Wt(t,0,e),i=Wt(t,1,e),a=o&&Ut(o),l=i&&Ut(i),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Xt(o).width,s=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Xt(i).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&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=r&&"none"===n[Ge]||i&&"none"===n[Ge]&&c+s>r)?"vertical":"horizontal"},We=function(t){function e(t,n){return function(r,o,i,a){var l=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var c=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var n={},r=t.group;r&&"object"==xt(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},qe=function(){!Xe&&de&&Ut(de,"display","none")},$e=function(){!Xe&&de&&Ut(de,"display","")};Ue&&document.addEventListener("click",(function(t){if(je)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),je=!1,!1}),!0);var Qe=function(t){if(se){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,i=t.clientY,Pe.some((function(t){if(!qt(t)){var e=Xt(t),n=t[re].options.emptyInsertThreshold,r=o>=e.left-n&&o<=e.right+n,l=i>=e.top-n&&i<=e.bottom+n;return n&&r&&l?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[re]._onDragOver(n)}}var o,i,a},Je=function(t){se&&se.parentNode[re]._isOutsideThisEl(t.target)};function Ke(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=_t({},e),t[re]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return He(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.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!==Ke.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in ae.initializePlugins(this,t,o),o)!(i in e)&&(e[i]=o[i]);for(var a in We(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Ve,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ot(t,"pointerdown",this._onTapStart):(Ot(t,"mousedown",this._onTapStart),Ot(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ot(t,"dragover",this),Ot(t,"dragenter",this)),Pe.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),_t(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Ut(t,"display")&&t!==Ke.ghost){r.push({target:t,rect:Xt(t)});var e=St({},r[r.length-1].rect);if(t.thisAnimationDuration){var n=zt(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){r.push(t)},removeAnimationState:function(t){r.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(r,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var o=!1,i=0;r.forEach((function(t){var n=0,r=t.target,a=r.fromRect,l=Xt(r),c=r.prevFromRect,s=r.prevToRect,u=t.rect,d=zt(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&Kt(c,l)&&!Kt(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(n=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(u,c,s,e.options)),Kt(l,a)||(r.prevFromRect=a,r.prevToRect=l,n||(n=e.options.animation),e.animate(r,u,l,n)),n&&(o=!0,i=Math.max(i,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 t&&t()}),i):"function"==typeof t&&t(),r=[]},animate:function(t,e,n,r){if(r){Ut(t,"transition",""),Ut(t,"transform","");var o=zt(this.el),i=o&&o.a,a=o&&o.d,l=(e.left-n.left)/(i||1),c=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!c,Ut(t,"transform","translate3d("+l+"px,"+c+"px,0)"),function(t){t.offsetWidth}(t),Ut(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Ut(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Ut(t,"transition",""),Ut(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}))}function tn(t,e,n,r,o,i,a,l){var c,s,u=t[re],d=u.options.onMove;return!window.CustomEvent||Et||Tt?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=n,c.draggedRect=r,c.related=o||e,c.relatedRect=i||Xt(e),c.willInsertAfter=l,c.originalEvent=a,t.dispatchEvent(c),d&&(s=d.call(u,c,a)),s}function en(t){t.draggable=!1}function nn(){Ye=!1}function rn(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function on(t){return setTimeout(t,0)}function an(t){return clearTimeout(t)}Ke.prototype={constructor:Ke,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Le=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,se):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,s=r.filter;if(function(t){Re.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&Re.push(r)}}(n),!se&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled||c.isContentEditable||(l=Zt(l,r.draggable,n,!1))&&l.animated||fe===l)){if(ve=$t(l),be=$t(l,r.draggable),"function"==typeof s){if(s.call(this,t,l,this))return ce({sortable:e,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),le("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(s&&(s=s.split(",").some((function(r){if(r=Zt(c,r.trim(),n,!1))return ce({sortable:e,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),le("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!Zt(c,r.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,a=o.options,l=i.ownerDocument;if(n&&!se&&n.parentNode===i){var c=Xt(n);if(pe=i,ue=(se=n).parentNode,he=se.nextSibling,fe=n,we=a.group,Ke.dragged=se,Ce={target:se,clientX:(e||t).clientX,clientY:(e||t).clientY},Ee=Ce.clientX-c.left,Te=Ce.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,se.style["will-change"]="all",r=function(){le("delayEnded",o,{evt:t}),Ke.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!It&&o.nativeDraggable&&(se.draggable=!0),o._triggerDragStart(t,e),ce({sortable:o,name:"choose",originalEvent:t}),Rt(se,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){Gt(se,t.trim(),en)})),Ot(l,"dragover",Qe),Ot(l,"mousemove",Qe),Ot(l,"touchmove",Qe),Ot(l,"mouseup",o._onDrop),Ot(l,"touchend",o._onDrop),Ot(l,"touchcancel",o._onDrop),It&&this.nativeDraggable&&(this.options.touchStartThreshold=4,se.draggable=!0),le("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(Tt||Et))r();else{if(Ke.eventCanceled)return void this._onDrop();Ot(l,"mouseup",o._disableDelayedDrag),Ot(l,"touchend",o._disableDelayedDrag),Ot(l,"touchcancel",o._disableDelayedDrag),Ot(l,"mousemove",o._delayedDragTouchMoveHandler),Ot(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&Ot(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){se&&en(se),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;jt(t,"mouseup",this._disableDelayedDrag),jt(t,"touchend",this._disableDelayedDrag),jt(t,"touchcancel",this._disableDelayedDrag),jt(t,"mousemove",this._delayedDragTouchMoveHandler),jt(t,"touchmove",this._delayedDragTouchMoveHandler),jt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Ot(document,"pointermove",this._onTouchMove):Ot(document,e?"touchmove":"mousemove",this._onTouchMove):(Ot(se,"dragend",this),Ot(pe,"dragstart",this._onDragStart));try{document.selection?on((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Oe=!1,pe&&se){le("dragStarted",this,{evt:e}),this.nativeDraggable&&Ot(document,"dragover",Je);var n=this.options;!t&&Rt(se,n.dragClass,!1),Rt(se,n.ghostClass,!0),Ke.active=this,t&&this._appendGhost(),ce({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(_e){this._lastX=_e.clientX,this._lastY=_e.clientY,qe();for(var t=document.elementFromPoint(_e.clientX,_e.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(_e.clientX,_e.clientY))!==e;)e=t;if(se.parentNode[re]._isOutsideThisEl(t),e)do{if(e[re]&&e[re]._onDragOver({clientX:_e.clientX,clientY:_e.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);$e()}},_onTouchMove:function(t){if(Ce){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=de&&zt(de,!0),a=de&&i&&i.a,l=de&&i&&i.d,c=ze&&De&&Qt(De),s=(o.clientX-Ce.clientX+r.x)/(a||1)+(c?c[0]-Be[0]:0)/(a||1),u=(o.clientY-Ce.clientY+r.y)/(l||1)+(c?c[1]-Be[1]:0)/(l||1);if(!Ke.active&&!Oe){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(de){i?(i.e+=s-(Se||0),i.f+=u-(Ne||0)):i={a:1,b:0,c:0,d:1,e:s,f:u};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");Ut(de,"webkitTransform",d),Ut(de,"mozTransform",d),Ut(de,"msTransform",d),Ut(de,"transform",d),Se=s,Ne=u,_e=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!de){var t=this.options.fallbackOnBody?document.body:pe,e=Xt(se,!0,ze,!0,t),n=this.options;if(ze){for(De=t;"static"===Ut(De,"position")&&"none"===Ut(De,"transform")&&De!==document;)De=De.parentNode;De!==document.body&&De!==document.documentElement?(De===document&&(De=Vt()),e.top+=De.scrollTop,e.left+=De.scrollLeft):De=Vt(),Be=Qt(De)}Rt(de=se.cloneNode(!0),n.ghostClass,!1),Rt(de,n.fallbackClass,!0),Rt(de,n.dragClass,!0),Ut(de,"transition",""),Ut(de,"transform",""),Ut(de,"box-sizing","border-box"),Ut(de,"margin",0),Ut(de,"top",e.top),Ut(de,"left",e.left),Ut(de,"width",e.width),Ut(de,"height",e.height),Ut(de,"opacity","0.8"),Ut(de,"position",ze?"absolute":"fixed"),Ut(de,"zIndex","100000"),Ut(de,"pointerEvents","none"),Ke.ghost=de,t.appendChild(de),Ut(de,"transform-origin",Ee/parseInt(de.style.width)*100+"% "+Te/parseInt(de.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;le("dragStart",this,{evt:t}),Ke.eventCanceled?this._onDrop():(le("setupClone",this),Ke.eventCanceled||((me=ne(se)).draggable=!1,me.style["will-change"]="",this._hideClone(),Rt(me,this.options.chosenClass,!1),Ke.clone=me),n.cloneId=on((function(){le("clone",n),Ke.eventCanceled||(n.options.removeCloneOnHide||pe.insertBefore(me,se),n._hideClone(),ce({sortable:n,name:"clone"}))})),!e&&Rt(se,o.dragClass,!0),e?(je=!0,n._loopId=setInterval(n._emulateDragOver,50)):(jt(document,"mouseup",n._onDrop),jt(document,"touchend",n._onDrop),jt(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,se)),Ot(document,"drop",n),Ut(se,"transform","translateZ(0)")),Oe=!0,n._dragStartId=on(n._dragStarted.bind(n,e,t)),Ot(document,"selectstart",n),Ie=!0,Lt&&Ut(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,o,i=this.el,a=t.target,l=this.options,c=l.group,s=Ke.active,u=we===c,d=l.sort,p=xe||s,h=this,f=!1;if(!Ye){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=Zt(a,l.draggable,i,!0),T("dragOver"),Ke.eventCanceled)return f;if(se.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||h._ignoreWhileAnimating===a)return L(!1);if(je=!1,s&&!l.disabled&&(u?d||(r=!pe.contains(se)):xe===this||(this.lastPutMode=we.checkPull(this,s,se,t))&&c.checkPut(this,s,se,t))){if(o="vertical"===this._getDirection(t,a),e=Xt(se),T("dragOverValid"),Ke.eventCanceled)return f;if(r)return ue=pe,I(),this._hideClone(),T("revert"),Ke.eventCanceled||(he?pe.insertBefore(se,he):pe.appendChild(se)),L(!0);var m=qt(i,l.draggable);if(!m||function(t,e,n){var r=Xt(qt(n.el,n.options.draggable));return e?t.clientX>r.right+10||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+10}(t,o,this)&&!m.animated){if(m===se)return L(!1);if(m&&i===t.target&&(a=m),a&&(n=Xt(a)),!1!==tn(pe,i,se,e,a,n,t,!!a))return I(),i.appendChild(se),ue=i,k(),L(!0)}else if(a.parentNode===i){n=Xt(a);var g,v,y,b=se.parentNode!==i,A=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,c=n?e.width:e.height;return r===a||o===l||r+i/2===a+c/2}(se.animated&&se.toRect||e,a.animated&&a.toRect||n,o),w=o?"top":"left",x=Ht(a,"top","top")||Ht(se,"top","top"),C=x?x.scrollTop:void 0;if(Le!==a&&(v=n[w],Fe=!1,Ze=!A&&l.invertSwap||b),g=function(t,e,n,r,o,i,a,l){var c=r?t.clientY:t.clientX,s=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,p=!1;if(!a)if(l&&Me<s*o){if(!Fe&&(1===ke?c>u+s*i/2:c<d-s*i/2)&&(Fe=!0),Fe)p=!0;else if(1===ke?c<u+Me:c>d-Me)return-ke}else if(c>u+s*(1-o)/2&&c<d-s*(1-o)/2)return function(t){return $t(se)<$t(t)?1:-1}(e);return(p=p||a)&&(c<u+s*i/2||c>d-s*i/2)?c>u+s/2?1:-1:0}(t,a,n,o,A?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ze,Le===a),0!==g){var _=$t(se);do{_-=g,y=ue.children[_]}while(y&&("none"===Ut(y,"display")||y===de))}if(0===g||y===a)return L(!1);Le=a,ke=g;var S=a.nextElementSibling,N=!1,E=tn(pe,i,se,e,a,n,t,N=1===g);if(!1!==E)return 1!==E&&-1!==E||(N=1===E),Ye=!0,setTimeout(nn,30),I(),N&&!S?i.appendChild(se):a.parentNode.insertBefore(se,N?S:a),x&&ee(x,0,C-x.scrollTop),ue=se.parentNode,void 0===v||Ze||(Me=Math.abs(v-Xt(a)[w])),k(),L(!0)}if(i.contains(se))return L(!1)}return!1}function T(l,c){le(l,h,St({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:d,fromSortable:p,target:a,completed:L,onMove:function(n,r){return tn(pe,i,se,e,n,Xt(n),t,r)},changed:k},c))}function I(){T("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function L(e){return T("dragOverCompleted",{insertion:e}),e&&(u?s._hideClone():s._showClone(h),h!==p&&(Rt(se,xe?xe.options.ghostClass:s.options.ghostClass,!1),Rt(se,l.ghostClass,!0)),xe!==h&&h!==Ke.active?xe=h:h===Ke.active&&xe&&(xe=null),p===h&&(h._ignoreWhileAnimating=a),h.animateAll((function(){T("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===se&&!se.animated||a===i&&!a.animated)&&(Le=null),l.dragoverBubble||t.rootEl||a===document||(se.parentNode[re]._isOutsideThisEl(t.target),!e&&Qe(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function k(){ye=$t(se),Ae=$t(se,l.draggable),ce({sortable:h,name:"change",toEl:i,newIndex:ye,newDraggableIndex:Ae,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){jt(document,"mousemove",this._onTouchMove),jt(document,"touchmove",this._onTouchMove),jt(document,"pointermove",this._onTouchMove),jt(document,"dragover",Qe),jt(document,"mousemove",Qe),jt(document,"touchmove",Qe)},_offUpEvents:function(){var t=this.el.ownerDocument;jt(t,"mouseup",this._onDrop),jt(t,"touchend",this._onDrop),jt(t,"pointerup",this._onDrop),jt(t,"touchcancel",this._onDrop),jt(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ye=$t(se),Ae=$t(se,n.draggable),le("drop",this,{evt:t}),ue=se&&se.parentNode,ye=$t(se),Ae=$t(se,n.draggable),Ke.eventCanceled||(Oe=!1,Ze=!1,Fe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),an(this.cloneId),an(this._dragStartId),this.nativeDraggable&&(jt(document,"drop",this),jt(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Lt&&Ut(document.body,"user-select",""),Ut(se,"transform",""),t&&(Ie&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),de&&de.parentNode&&de.parentNode.removeChild(de),(pe===ue||xe&&"clone"!==xe.lastPutMode)&&me&&me.parentNode&&me.parentNode.removeChild(me),se&&(this.nativeDraggable&&jt(se,"dragend",this),en(se),se.style["will-change"]="",Ie&&!Oe&&Rt(se,xe?xe.options.ghostClass:this.options.ghostClass,!1),Rt(se,this.options.chosenClass,!1),ce({sortable:this,name:"unchoose",toEl:ue,newIndex:null,newDraggableIndex:null,originalEvent:t}),pe!==ue?(ye>=0&&(ce({rootEl:ue,name:"add",toEl:ue,fromEl:pe,originalEvent:t}),ce({sortable:this,name:"remove",toEl:ue,originalEvent:t}),ce({rootEl:ue,name:"sort",toEl:ue,fromEl:pe,originalEvent:t}),ce({sortable:this,name:"sort",toEl:ue,originalEvent:t})),xe&&xe.save()):ye!==ve&&ye>=0&&(ce({sortable:this,name:"update",toEl:ue,originalEvent:t}),ce({sortable:this,name:"sort",toEl:ue,originalEvent:t})),Ke.active&&(null!=ye&&-1!==ye||(ye=ve,Ae=be),ce({sortable:this,name:"end",toEl:ue,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){le("nulling",this),pe=se=ue=de=he=me=fe=ge=Ce=_e=Ie=ye=Ae=ve=be=Le=ke=xe=we=Ke.dragged=Ke.ghost=Ke.clone=Ke.active=null,Re.forEach((function(t){t.checked=!0})),Re.length=Se=Ne=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":se&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)Zt(t=n[r],i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||rn(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,r){var o=n.children[r];Zt(o,this.options.draggable,n,!1)&&(e[t]=o)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Zt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=ae.modifyOption(this,t,e);n[t]=void 0!==r?r:e,"group"===t&&We(n)},destroy:function(){le("destroy",this);var t=this.el;t[re]=null,jt(t,"mousedown",this._onTapStart),jt(t,"touchstart",this._onTapStart),jt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(jt(t,"dragover",this),jt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Pe.splice(Pe.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ge){if(le("hideClone",this),Ke.eventCanceled)return;Ut(me,"display","none"),this.options.removeCloneOnHide&&me.parentNode&&me.parentNode.removeChild(me),ge=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(ge){if(le("showClone",this),Ke.eventCanceled)return;pe.contains(se)&&!this.options.group.revertClone?pe.insertBefore(me,se):he?pe.insertBefore(me,he):pe.appendChild(me),this.options.group.revertClone&&this.animate(se,me),Ut(me,"display",""),ge=!1}}else this._hideClone()}},Ue&&Ot(document,"touchmove",(function(t){(Ke.active||Oe)&&t.cancelable&&t.preventDefault()})),Ke.utils={on:Ot,off:jt,css:Ut,find:Gt,is:function(t,e){return!!Zt(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:te,closest:Zt,toggleClass:Rt,clone:ne,index:$t,nextTick:on,cancelNextTick:an,detectDirection:He,getChild:Wt},Ke.get=function(t){return t[re]},Ke.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ke.utils=St({},Ke.utils,t.utils)),ae.mount(t)}))},Ke.create=function(t,e){return new Ke(t,e)},Ke.version="1.10.2";var ln,cn,sn,un,dn,pn,hn=[],fn=!1;function mn(){hn.forEach((function(t){clearInterval(t.pid)})),hn=[]}function gn(){clearInterval(pn)}var vn=te((function(t,e,n,r){if(e.scroll){var o,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,c=e.scrollSpeed,s=Vt(),u=!1;cn!==n&&(cn=n,mn(),ln=e.scroll,o=e.scrollFn,!0===ln&&(ln=Jt(n,!0)));var d=0,p=ln;do{var h=p,f=Xt(h),m=f.top,g=f.bottom,v=f.left,y=f.right,b=f.width,A=f.height,w=void 0,x=void 0,C=h.scrollWidth,_=h.scrollHeight,S=Ut(h),N=h.scrollLeft,E=h.scrollTop;h===s?(w=b<C&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),x=A<_&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(w=b<C&&("auto"===S.overflowX||"scroll"===S.overflowX),x=A<_&&("auto"===S.overflowY||"scroll"===S.overflowY));var T=w&&(Math.abs(y-i)<=l&&N+b<C)-(Math.abs(v-i)<=l&&!!N),I=x&&(Math.abs(g-a)<=l&&E+A<_)-(Math.abs(m-a)<=l&&!!E);if(!hn[d])for(var L=0;L<=d;L++)hn[L]||(hn[L]={});hn[d].vx==T&&hn[d].vy==I&&hn[d].el===h||(hn[d].el=h,hn[d].vx=T,hn[d].vy=I,clearInterval(hn[d].pid),0==T&&0==I||(u=!0,hn[d].pid=setInterval(function(){r&&0===this.layer&&Ke.active._onTouchMove(dn);var e=hn[this.layer].vy?hn[this.layer].vy*c:0,n=hn[this.layer].vx?hn[this.layer].vx*c:0;"function"==typeof o&&"continue"!==o.call(Ke.dragged.parentNode[re],n,e,t,dn,hn[this.layer].el)||ee(hn[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&p!==s&&(p=Jt(p,!1)));fn=u}}),30),yn=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,i=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var c=n||o;a();var s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(s.clientX,s.clientY);l(),c&&!c.el.contains(u)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function bn(){}function An(){}bn.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=Wt(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:yn},_t(bn,{pluginName:"revertOnSpill"}),An.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:yn},_t(An,{pluginName:"removeOnSpill"}),Ke.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Ot(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ot(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Ot(document,"touchmove",this._handleFallbackAutoScroll):Ot(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?jt(document,"dragover",this._handleAutoScroll):(jt(document,"pointermove",this._handleFallbackAutoScroll),jt(document,"touchmove",this._handleFallbackAutoScroll),jt(document,"mousemove",this._handleFallbackAutoScroll)),gn(),mn(),clearTimeout(Bt),Bt=void 0},nulling:function(){dn=cn=ln=fn=pn=sn=un=null,hn.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(r,o);if(dn=t,e||Tt||Et||Lt){vn(t,this.options,i,e);var a=Jt(i,!0);!fn||pn&&r===sn&&o===un||(pn&&gn(),pn=setInterval((function(){var i=Jt(document.elementFromPoint(r,o),!0);i!==a&&(a=i,mn()),vn(t,n.options,i,e)}),10),sn=r,un=o)}else{if(!this.options.bubbleScroll||Jt(i,!0)===Vt())return void mn();vn(t,this.options,Jt(i,!1),!1)}}},_t(t,{pluginName:"scroll",initializeByDefault:!0})}),Ke.mount(An,bn);var wn=Ke;function xn(t,e,n={}){let r;const{document:o=wt,...a}=n,l={onUpdate:t=>{!function(t,e,n){const r=(0,i.isRef)(t),o=r?[...gt(t)]:gt(t);if(n>=0&&n<o.length){const a=o.splice(e,1)[0];(0,i.nextTick)((()=>{o.splice(n,0,a),r&&(t.value=o)}))}}(e,t.oldIndex,t.newIndex)}},c=()=>{const e="string"==typeof t?null==o?void 0:o.querySelector(t):function(t){var e;const n=gt(t);return null!=(e=null==n?void 0:n.$el)?e:n}(t);e&&(r=new wn(e,{...l,...a}))},s=()=>null==r?void 0:r.destroy();return function(t,e=!0){(0,i.getCurrentInstance)()?(0,i.onMounted)(t):e?t():(0,i.nextTick)(t)}(c),u=s,!!(0,i.getCurrentScope)()&&(0,i.onScopeDispose)(u),{stop:s,start:c,option:(t,e)=>{if(void 0===e)return null==r?void 0:r.option(t);null==r||r.option(t,e)}};var u}var Cn=r(76236),_n=r(85313),Sn=(0,i.defineComponent)({name:"AppOrderSelectorElement",components:{IconArrowDown:Cn.Z,IconArrowUp:_n.Z,NcButton:Z.Z},props:{app:{type:Object,required:!0},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1}},emits:{"move:up":function(){return!0},"move:down":function(){return!0}},setup:function(t,e){var n=e.emit,r=(0,i.ref)(),o=(0,i.ref)(),a=0;return(0,i.onUpdated)((function(){0!==a&&(1!==a&&!t.isLast||t.isFirst?(0,i.nextTick)((function(){return o.value.$el.focus()})):(0,i.nextTick)((function(){return r.value.$el.focus()}))),a=0})),{buttonUp:r,buttonDown:o,moveUp:function(){n("move:up"),a=1},moveDown:function(){n("move:down"),a=-1},t:ft.Iu}}}),Nn=r(79420),En={};En.styleTagTransform=M(),En.setAttributes=T(),En.insert=N().bind(null,"head"),En.domAPI=_(),En.insertStyleElement=L(),x()(Nn.Z,En),Nn.Z&&Nn.Z.locals&&Nn.Z.locals;var Tn=(0,j.Z)(Sn,(function(){var t,e=this,n=e._self._c;return e._self._setupProxy,n("li",{class:{"order-selector-element":!0,"order-selector-element--disabled":e.app.default},attrs:{"data-cy-app-order-element":e.app.id}},[n("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",role:"presentation"}},[n("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(" "),n("div",{staticClass:"order-selector-element__label"},[e._v("\n\t\t"+e._s(null!==(t=e.app.label)&&void 0!==t?t:e.app.id)+"\n\t")]),e._v(" "),n("div",{staticClass:"order-selector-element__actions"},[n("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"),"data-cy-app-order-button":"up",type:"tertiary-no-background"},on:{click:e.moveUp},scopedSlots:e._u([{key:"icon",fn:function(){return[n("IconArrowUp",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),n("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(" "),n("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"),"data-cy-app-order-button":"down",type:"tertiary-no-background"},on:{click:e.moveDown},scopedSlots:e._u([{key:"icon",fn:function(){return[n("IconArrowDown",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),n("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,"b6ba69de",null).exports;function In(t){return function(t){if(Array.isArray(t))return Ln(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ln(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ln(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ln(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var kn=(0,i.defineComponent)({name:"AppOrderSelector",components:{AppOrderSelectorElement:Tn},props:{value:{type:Array,required:!0}},emits:{"update:value":function(t){return Array.isArray(t)}},setup:function(t,e){var n=e.emit,r=(0,i.ref)(null),o=(0,i.computed)({get:function(){return t.value},set:function(e){var r=In(e).sort((function(t,n){return(n.default?1:0)-(t.default?1:0)||e.indexOf(t)-e.indexOf(n)}));r.some((function(e,n){return e.id!==t.value[n].id}))?n("update:value",r):a.value+=1}}),a=(0,i.ref)(0);return xn(r,o,{filter:".order-selector-element--disabled"}),{appList:o,listElement:r,moveDown:function(e){var r=e>0?t.value.slice(0,e):[];r.push(t.value[e+1]);var o=e<t.value.length-2?t.value.slice(e+2):[];n("update:value",[].concat(In(r),[t.value[e]],In(o)))},moveUp:function(e){var r,o=e>1?t.value.slice(0,e-1):[];if(null===(r=t.value[e-1])||void 0===r||!r.default){var i=[t.value[e-1]];e<t.value.length-1&&i.push.apply(i,In(t.value.slice(e+1))),n("update:value",[].concat(In(o),[t.value[e]],i))}},renderCount:a}}}),Mn=kn,Dn=r(78273),On={};On.styleTagTransform=M(),On.setAttributes=T(),On.insert=N().bind(null,"head"),On.domAPI=_(),On.insertStyleElement=L(),x()(Dn.Z,On),Dn.Z&&Dn.Z.locals&&Dn.Z.locals;var jn=(0,j.Z)(Mn,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("ol",{ref:"listElement",staticClass:"order-selector",attrs:{"data-cy-app-order":""}},t._l(t.appList,(function(n,r){return e("AppOrderSelectorElement",t._g({key:"".concat(n.id).concat(t.renderCount),attrs:{app:n,"is-first":0===r||!!t.appList[r-1].default,"is-last":r===t.value.length-1}},n.default?{}:{"move:up":function(){return t.moveUp(r)},"move:down":function(){return t.moveDown(r)}}))})),1)}),[],!1,null,"1c8e13a0",null),Pn=jn.exports;function Fn(t){return Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(t)}function Zn(){Zn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),l=new S(o||[]);return r(a,"_invoke",{value:w(t,n,l)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function p(){}function h(){}function f(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(N([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=f.prototype=p.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,l){var c=u(t[r],t,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==Fn(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=f,r(y,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:h,configurable:!0}),h.displayName=c(f,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(A.prototype),c(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),c(y,l,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=N,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function Bn(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}var Yn=(0,i.defineComponent)({name:"AppMenuSection",components:{AppOrderSelector:Pn,NcCheckboxRadioSwitch:u.Z,NcSelect:mt.Z,NcSettingsSection:s.Z},props:{defaultApps:{type:Array,required:!0}},emits:{"update:defaultApps":function(t){return Array.isArray(t)&&t.every((function(t){return"string"==typeof t}))}},setup:function(t,e){var n=e.emit,r=(0,i.computed)({get:function(){return t.defaultApps.length>0},set:function(t){t?n("update:defaultApps",["dashboard","files"]):a.value=[]}}),o=Object.values((0,l.j)("core","apps")).map((function(t){var e=t.id;return{label:t.name,id:e,icon:t.icon}})),a=(0,i.computed)({get:function(){return t.defaultApps.map((function(t){return o.filter((function(e){return e.id===t}))[0]}))},set:function(t){c("defaultApps",t.map((function(t){return t.id}))).then((function(){return n("update:defaultApps",t.map((function(t){return t.id})))})).catch((function(){return(0,ht.x2)((0,ft.Iu)("theming","Could not set global default apps"))}))}}),c=function(){var t,e=(t=Zn().mark((function t(e,n){var r;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,p.generateUrl)("/apps/theming/ajax/updateAppMenu"),t.next=3,d.Z.put(r,{setting:e,value:n});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Bn(i,r,o,a,l,"next",t)}function l(t){Bn(i,r,o,a,l,"throw",t)}a(void 0)}))});return function(t,n){return e.apply(this,arguments)}}();return{allApps:o,selectedApps:a,hasCustomDefaultApp:r,t:ft.Iu}}}),Rn=Yn,Un=r(31627),zn={};zn.styleTagTransform=M(),zn.setAttributes=T(),zn.insert=N().bind(null,"head"),zn.domAPI=_(),zn.insertStyleElement=L(),x()(Un.Z,zn),Un.Z&&Un.Z.locals&&Un.Z.locals;var Gn=(0,j.Z)(Rn,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcSettingsSection",{attrs:{name:t.t("theming","Navigation bar settings")}},[e("h3",[t._v(t._s(t.t("theming","Default app")))]),t._v(" "),e("p",{staticClass:"info-note"},[t._v("\n\t\t"+t._s(t.t("theming","The default app is the app that is e.g. opened after login or when the logo in the menu is clicked."))+"\n\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.hasCustomDefaultApp,type:"switch","data-cy-switch-default-app":""},on:{"update:checked":function(e){t.hasCustomDefaultApp=e}}},[t._v("\n\t\t"+t._s(t.t("theming","Use custom default app"))+"\n\t")]),t._v(" "),t.hasCustomDefaultApp?[e("h4",[t._v(t._s(t.t("theming","Global default app")))]),t._v(" "),e("NcSelect",{attrs:{"close-on-select":!1,placeholder:t.t("theming","Global default apps"),options:t.allApps,multiple:!0},model:{value:t.selectedApps,callback:function(e){t.selectedApps=e},expression:"selectedApps"}}),t._v(" "),e("h5",[t._v(t._s(t.t("theming","Default app priority")))]),t._v(" "),e("p",{staticClass:"info-note"},[t._v("\n\t\t\t"+t._s(t.t("theming","If an app is not enabled for a user, the next app with lower priority is used."))+"\n\t\t")]),t._v(" "),e("AppOrderSelector",{attrs:{value:t.selectedApps},on:{"update:value":function(e){t.selectedApps=e}}})]:t._e()],2)}),[],!1,null,"90f2e098",null).exports,Vn=(0,l.j)("theming","adminThemingParameters"),Xn=Vn.backgroundMime,Hn=Vn.canThemeIcons,Wn=Vn.color,qn=Vn.docUrl,$n=Vn.docUrlIcons,Qn=Vn.faviconMime,Jn=Vn.isThemable,Kn=Vn.legalNoticeUrl,tr=Vn.logoheaderMime,er=Vn.logoMime,nr=Vn.name,rr=Vn.notThemableErrorMessage,or=Vn.privacyPolicyUrl,ir=Vn.slogan,ar=Vn.url,lr=Vn.userThemingDisabled,cr=Vn.defaultApps,sr=[{name:"name",value:nr,defaultValue:"Nextcloud",type:"text",displayName:t("theming","Name"),placeholder:t("theming","Name"),maxlength:250},{name:"url",value:ar,defaultValue:"https://nextcloud.com",type:"url",displayName:t("theming","Web link"),placeholder:"https://…",maxlength:500},{name:"slogan",value:ir,defaultValue:t("theming","a safe home for all your data"),type:"text",displayName:t("theming","Slogan"),placeholder:t("theming","Slogan"),maxlength:500}],ur={name:"color",value:Wn,defaultValue:"#0082c9",displayName:t("theming","Color")},dr=[{name:"logo",mimeName:"logoMime",mimeValue:er,defaultMimeValue:"",displayName:t("theming","Logo"),ariaLabel:t("theming","Upload new logo")},{name:"background",mimeName:"backgroundMime",mimeValue:Xn,defaultMimeValue:"",displayName:t("theming","Background and login image"),ariaLabel:t("theming","Upload new background and login image")}],pr=[{name:"imprintUrl",value:Kn,defaultValue:"",type:"url",displayName:t("theming","Legal notice link"),placeholder:"https://…",maxlength:500},{name:"privacyUrl",value:or,defaultValue:"",type:"url",displayName:t("theming","Privacy policy link"),placeholder:"https://…",maxlength:500}],hr=[{name:"logoheader",mimeName:"logoheaderMime",mimeValue:tr,defaultMimeValue:"",displayName:t("theming","Header logo"),ariaLabel:t("theming","Upload new header logo")},{name:"favicon",mimeName:"faviconMime",mimeValue:Qn,defaultMimeValue:"",displayName:t("theming","Favicon"),ariaLabel:t("theming","Upload new favicon")}],fr={name:"disable-user-theming",value:lr,defaultValue:!1,displayName:t("theming","User settings"),label:t("theming","Disable user theming"),description:t("theming","Although you can select and customize your instance, users can change their background and colors. If you want to enforce your customization, you can toggle this on.")},mr={name:"AdminTheming",components:{AppMenuSection:Gn,CheckboxField:P,ColorPickerField:W,FileInputField:lt,NcNoteCard:c.Z,NcSettingsSection:s.Z,TextField:pt},emits:["update:theming"],textFields:sr,data:function(){return{textFields:sr,colorPickerField:ur,fileInputFields:dr,advancedTextFields:pr,advancedFileInputFields:hr,userThemingField:fr,defaultApps:cr,canThemeIcons:Hn,docUrl:qn,docUrlIcons:$n,isThemable:Jn,notThemableErrorMessage:rr}}},gr=r(65335),vr={};vr.styleTagTransform=M(),vr.setAttributes=T(),vr.insert=N().bind(null,"head"),vr.domAPI=_(),vr.insertStyleElement=L(),x()(gr.Z,vr),gr.Z&&gr.Z.locals&&gr.Z.locals;var yr=(0,j.Z)(mr,(function(){var t=this,e=t._self._c;return e("section",[e("NcSettingsSection",{attrs:{name:t.t("theming","Theming"),description:t.t("theming","Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users."),"doc-url":t.docUrl,"data-admin-theming-settings":""}},[e("div",{staticClass:"admin-theming"},[t.isThemable?t._e():e("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[e("p",[t._v(t._s(t.notThemableErrorMessage))])]),t._v(" "),t._l(t.textFields,(function(n){return e("TextField",{key:n.name,attrs:{"data-admin-theming-setting-field":n.name,"default-value":n.defaultValue,"display-name":n.displayName,maxlength:n.maxlength,name:n.name,placeholder:n.placeholder,type:n.type,value:n.value},on:{"update:value":function(e){return t.$set(n,"value",e)},"update:theming":function(e){return t.$emit("update:theming")}}})})),t._v(" "),e("ColorPickerField",{attrs:{name:t.colorPickerField.name,"default-value":t.colorPickerField.defaultValue,"display-name":t.colorPickerField.displayName,value:t.colorPickerField.value,"data-admin-theming-setting-primary-color":""},on:{"update:value":function(e){return t.$set(t.colorPickerField,"value",e)},"update:theming":function(e){return t.$emit("update:theming")}}}),t._v(" "),t._l(t.fileInputFields,(function(n){return e("FileInputField",{key:n.name,attrs:{"aria-label":n.ariaLabel,"data-admin-theming-setting-file":n.name,"default-mime-value":n.defaultMimeValue,"display-name":n.displayName,"mime-name":n.mimeName,"mime-value":n.mimeValue,name:n.name},on:{"update:mimeValue":function(e){return t.$set(n,"mimeValue",e)},"update:mime-value":function(e){return t.$set(n,"mimeValue",e)},"update:theming":function(e){return t.$emit("update:theming")}}})})),t._v(" "),e("div",{staticClass:"admin-theming__preview",attrs:{"data-admin-theming-preview":""}},[e("div",{staticClass:"admin-theming__preview-logo",attrs:{"data-admin-theming-preview-logo":""}})])],2)]),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Advanced options")}},[e("div",{staticClass:"admin-theming-advanced"},[t._l(t.advancedTextFields,(function(n){return e("TextField",{key:n.name,attrs:{name:n.name,value:n.value,"default-value":n.defaultValue,type:n.type,"display-name":n.displayName,placeholder:n.placeholder,maxlength:n.maxlength},on:{"update:value":function(e){return t.$set(n,"value",e)},"update:theming":function(e){return t.$emit("update:theming")}}})})),t._v(" "),t._l(t.advancedFileInputFields,(function(n){return e("FileInputField",{key:n.name,attrs:{name:n.name,"mime-name":n.mimeName,"mime-value":n.mimeValue,"default-mime-value":n.defaultMimeValue,"display-name":n.displayName,"aria-label":n.ariaLabel},on:{"update:mimeValue":function(e){return t.$set(n,"mimeValue",e)},"update:mime-value":function(e){return t.$set(n,"mimeValue",e)},"update:theming":function(e){return t.$emit("update:theming")}}})})),t._v(" "),e("CheckboxField",{attrs:{name:t.userThemingField.name,value:t.userThemingField.value,"default-value":t.userThemingField.defaultValue,"display-name":t.userThemingField.displayName,label:t.userThemingField.label,description:t.userThemingField.description,"data-admin-theming-setting-disable-user-theming":""},on:{"update:theming":function(e){return t.$emit("update:theming")}}}),t._v(" "),t.canThemeIcons?t._e():e("a",{attrs:{href:t.docUrlIcons,rel:"noreferrer noopener"}},[e("em",[t._v(t._s(t.t("theming","Install the ImageMagick PHP extension with support for SVG images to automatically generate favicons based on the uploaded logo and color.")))])])],2)]),t._v(" "),e("AppMenuSection",{attrs:{"default-apps":t.defaultApps},on:{"update:defaultApps":function(e){t.defaultApps=e},"update:default-apps":function(e){t.defaultApps=e}}})],1)}),[],!1,null,"7a1f9a54",null).exports;r.nc=btoa((0,o.IH)()),i.default.prototype.OC=OC,i.default.prototype.t=t;var br=new(i.default.extend(yr));br.$mount("#admin-theming"),br.$on("update:theming",(function(){var t;(t=document.head.querySelectorAll("link.theme"),function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).forEach((function(t){var e=new URL(t.href);e.searchParams.set("v",Date.now());var n=t.cloneNode();n.href=e.toString(),n.onload=function(){return t.remove()},document.head.append(n)}))}))},65335:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i),l=n(61667),c=n.n(l),s=new URL(n(92770),n.b),u=a()(o()),d=c()(s);u.push([t.id,".admin-theming[data-v-7a1f9a54],.admin-theming-advanced[data-v-7a1f9a54]{display:flex;flex-direction:column;gap:8px 0}.admin-theming__preview[data-v-7a1f9a54]{width:230px;height:140px;background-size:cover;background-position:center;text-align:center;margin-top:10px;background-color:var(--color-primary-element-default);background-image:var(--image-background-plain, var(--image-background-default))}.admin-theming__preview-logo[data-v-7a1f9a54]{width:20%;height:20%;margin-top:20px;display:inline-block;background-size:contain;background-position:center;background-repeat:no-repeat;background-image:var(--image-logo, url("+d+"))}","",{version:3,sources:["webpack://./apps/theming/src/AdminTheming.vue"],names:[],mappings:"AACA,yEAEC,YAAA,CACA,qBAAA,CACA,SAAA,CAIA,yCACC,WAAA,CACA,YAAA,CACA,qBAAA,CACA,0BAAA,CACA,iBAAA,CACA,eAAA,CAIA,qDAAA,CAKA,+EAAA,CAEA,8CACC,SAAA,CACA,UAAA,CACA,eAAA,CACA,oBAAA,CACA,uBAAA,CACA,0BAAA,CACA,2BAAA,CACA,2EAAA",sourcesContent:["\n.admin-theming,\n.admin-theming-advanced {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px 0;\n}\n\n.admin-theming {\n\t&__preview {\n\t\twidth: 230px;\n\t\theight: 140px;\n\t\tbackground-size: cover;\n\t\tbackground-position: center;\n\t\ttext-align: center;\n\t\tmargin-top: 10px;\n\t\t/* This is basically https://github.com/nextcloud/server/blob/master/core/css/guest.css\n\t\t But without the user variables. That way the admin can preview the render as guest*/\n\t\t/* As guest, there is no user color color-background-plain */\n\t\tbackground-color: var(--color-primary-element-default);\n\t\t/* As guest, there is no user background (--image-background)\n\t\t1. Empty background if defined\n\t\t2. Else default background\n\t\t3. Finally default gradient (should not happened, the background is always defined anyway) */\n\t\tbackground-image: var(--image-background-plain, var(--image-background-default));\n\n\t\t&-logo {\n\t\t\twidth: 20%;\n\t\t\theight: 20%;\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: inline-block;\n\t\t\tbackground-size: contain;\n\t\t\tbackground-position: center;\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-image: var(--image-logo, url('../../../core/img/logo/logo.svg'));\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),e.Z=u},78273:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".order-selector[data-v-1c8e13a0]{width:max-content;min-width:260px}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelector.vue"],names:[],mappings:"AACA,iCACC,iBAAA,CACA,eAAA",sourcesContent:["\n.order-selector {\n\twidth: max-content;\n\tmin-width: 260px; // align with NcSelect\n}\n"],sourceRoot:""}]),e.Z=a},79420:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".order-selector-element[data-v-b6ba69de]{list-style:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding-inline:12px}.order-selector-element[data-v-b6ba69de]:hover{background-color:var(--color-background-hover);border-radius:var(--border-radius-large)}.order-selector-element--disabled[data-v-b6ba69de]{border-color:var(--color-text-maxcontrast);color:var(--color-text-maxcontrast)}.order-selector-element--disabled .order-selector-element__icon[data-v-b6ba69de]{opacity:75%}.order-selector-element__actions[data-v-b6ba69de]{flex:0 0;display:flex;flex-direction:row;gap:6px}.order-selector-element__label[data-v-b6ba69de]{flex:1 1;text-overflow:ellipsis;overflow:hidden}.order-selector-element__placeholder[data-v-b6ba69de]{height:44px;width:44px}.order-selector-element__icon[data-v-b6ba69de]{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",sourcesContent:["\n.order-selector-element {\n\t// hide default styling\n\tlist-style: none;\n\t// Align children\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\t// Spacing\n\tgap: 12px;\n\tpadding-inline: 12px;\n\n\t&:hover {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\n\t&--disabled {\n\t\tborder-color: var(--color-text-maxcontrast);\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t.order-selector-element__icon {\n\t\t\topacity: 75%;\n\t\t}\n\t}\n\n\t&__actions {\n\t\tflex: 0 0;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: 6px;\n\t}\n\n\t&__label {\n\t\tflex: 1 1;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\n\t&__placeholder {\n\t\theight: 44px;\n\t\twidth: 44px;\n\t}\n\n\t&__icon {\n\t\tfilter: var(--background-invert-if-bright);\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},31627:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,"h3[data-v-90f2e098],h4[data-v-90f2e098]{font-weight:bold}h4[data-v-90f2e098],h5[data-v-90f2e098]{margin-block-start:12px}.info-note[data-v-90f2e098]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/AppMenuSection.vue"],names:[],mappings:"AACA,wCACC,gBAAA,CAED,wCACC,uBAAA,CAGD,4BACC,mCAAA",sourcesContent:["\nh3, h4 {\n\tfont-weight: bold;\n}\nh4, h5 {\n\tmargin-block-start: 12px;\n}\n\n.info-note {\n\tcolor: var(--color-text-maxcontrast);\n}\n"],sourceRoot:""}]),e.Z=a},97763:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".field[data-v-c41a3e80]{display:flex;flex-direction:column;gap:4px 0}.field__row[data-v-c41a3e80]{display:flex;gap:0 4px}.field__description[data-v-c41a3e80]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/shared/field.scss","webpack://./apps/theming/src/components/admin/CheckboxField.vue"],names:[],mappings:"AAsBA,wBACC,YAAA,CACA,qBAAA,CACA,SAAA,CAEA,6BACC,YAAA,CACA,SAAA,CCzBD,qCACC,mCAAA",sourcesContent:["/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n.field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px 0;\n\n\t&__row {\n\t\tdisplay: flex;\n\t\tgap: 0 4px;\n\t}\n}\n","\n@import './shared/field.scss';\n\n.field {\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},40863:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,'.field[data-v-425ea0b4]{display:flex;flex-direction:column;gap:4px 0}.field__row[data-v-425ea0b4]{display:flex;gap:0 4px}.field__button[data-v-425ea0b4]{width:230px !important;border-radius:var(--border-radius-large) !important;background-color:var(--color-primary-default) !important}.field__button[data-v-425ea0b4]:hover::after{background-color:#fff;content:"";position:absolute;width:100%;height:100%;opacity:.2;filter:var(--primary-invert-if-bright)}.field__button[data-v-425ea0b4] *{z-index:1}',"",{version:3,sources:["webpack://./apps/theming/src/components/admin/shared/field.scss","webpack://./apps/theming/src/components/admin/ColorPickerField.vue"],names:[],mappings:"AAsBA,wBACC,YAAA,CACA,qBAAA,CACA,SAAA,CAEA,6BACC,YAAA,CACA,SAAA,CCxBD,gCACC,sBAAA,CACA,mDAAA,CACA,wDAAA,CAIA,6CACC,qBAAA,CACA,UAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,UAAA,CACA,sCAAA,CAID,kCACC,SAAA",sourcesContent:["/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n.field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px 0;\n\n\t&__row {\n\t\tdisplay: flex;\n\t\tgap: 0 4px;\n\t}\n}\n","\n@import './shared/field.scss';\n\n.field {\n\t// Override default NcButton styles\n\t&__button {\n\t\twidth: 230px !important;\n\t\tborder-radius: var(--border-radius-large) !important;\n\t\tbackground-color: var(--color-primary-default) !important;\n\n\t\t// emulated hover state because it would not make sense\n\t\t// to create a dedicated global variable for the color-primary-default\n\t\t&:hover::after {\n\t\t\tbackground-color: white;\n\t\t\tcontent: \"\";\n\t\t\tposition: absolute;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\topacity: .2;\n\t\t\tfilter: var(--primary-invert-if-bright);\n\t\t}\n\n\t\t// Above the ::after\n\t\t&::v-deep * {\n\t\t\tz-index: 1;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},1815:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".field[data-v-36abeca7]{display:flex;flex-direction:column;gap:4px 0}.field__row[data-v-36abeca7]{display:flex;gap:0 4px}.field__loading-icon[data-v-36abeca7]{width:44px;height:44px}.field__preview[data-v-36abeca7]{width:70px;height:70px;background-size:contain;background-position:center;background-repeat:no-repeat;margin:10px 0}.field__preview--logoheader[data-v-36abeca7]{background-image:var(--image-logoheader)}.field__preview--favicon[data-v-36abeca7]{background-image:var(--image-favicon)}input[type=file][data-v-36abeca7]{display:none}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/shared/field.scss","webpack://./apps/theming/src/components/admin/FileInputField.vue"],names:[],mappings:"AAsBA,wBACC,YAAA,CACA,qBAAA,CACA,SAAA,CAEA,6BACC,YAAA,CACA,SAAA,CCzBD,sCACC,UAAA,CACA,WAAA,CAGD,iCACC,UAAA,CACA,WAAA,CACA,uBAAA,CACA,0BAAA,CACA,2BAAA,CACA,aAAA,CAEA,6CACC,wCAAA,CAGD,0CACC,qCAAA,CAKH,kCACC,YAAA",sourcesContent:["/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n.field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px 0;\n\n\t&__row {\n\t\tdisplay: flex;\n\t\tgap: 0 4px;\n\t}\n}\n","\n@import './shared/field.scss';\n\n.field {\n\t&__loading-icon {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t}\n\n\t&__preview {\n\t\twidth: 70px;\n\t\theight: 70px;\n\t\tbackground-size: contain;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tmargin: 10px 0;\n\n\t\t&--logoheader {\n\t\t\tbackground-image: var(--image-logoheader);\n\t\t}\n\n\t\t&--favicon {\n\t\t\tbackground-image: var(--image-favicon);\n\t\t}\n\t}\n}\n\ninput[type=\"file\"] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]),e.Z=a},33655:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".field[data-v-31f08db0]{max-width:400px}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/TextField.vue"],names:[],mappings:"AACA,wBACC,eAAA",sourcesContent:["\n.field {\n\tmax-width: 400px;\n}\n"],sourceRoot:""}]),e.Z=a},92770:function(t){t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjEyOCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMjU2IDEyOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMTI4IDdjLTI1Ljg3MSAwLTQ3LjgxNyAxNy40ODUtNTQuNzEzIDQxLjIwOS01Ljk3OTUtMTIuNDYxLTE4LjY0Mi0yMS4yMDktMzMuMjg3LTIxLjIwOS0yMC4zMDQgMC0zNyAxNi42OTYtMzcgMzdzMTYuNjk2IDM3IDM3IDM3YzE0LjY0NSAwIDI3LjMwOC04Ljc0ODEgMzMuMjg3LTIxLjIwOSA2Ljg5NTcgMjMuNzI0IDI4Ljg0MiA0MS4yMDkgNTQuNzEzIDQxLjIwOXM0Ny44MTctMTcuNDg1IDU0LjcxMy00MS4yMDljNS45Nzk1IDEyLjQ2MSAxOC42NDIgMjEuMjA5IDMzLjI4NyAyMS4yMDkgMjAuMzA0IDAgMzctMTYuNjk2IDM3LTM3cy0xNi42OTYtMzctMzctMzdjLTE0LjY0NSAwLTI3LjMwOCA4Ljc0ODEtMzMuMjg3IDIxLjIwOS02Ljg5NTctMjMuNzI0LTI4Ljg0Mi00MS4yMDktNTQuNzEzLTQxLjIwOXptMCAyMmMxOS40NiAwIDM1IDE1LjU0IDM1IDM1cy0xNS41NCAzNS0zNSAzNS0zNS0xNS41NC0zNS0zNSAxNS41NC0zNSAzNS0zNXptLTg4IDIwYzguNDE0NiAwIDE1IDYuNTg1NCAxNSAxNXMtNi41ODU0IDE1LTE1IDE1LTE1LTYuNTg1NC0xNS0xNSA2LjU4NTQtMTUgMTUtMTV6bTE3NiAwYzguNDE0NiAwIDE1IDYuNTg1NCAxNSAxNXMtNi41ODU0IDE1LTE1IDE1LTE1LTYuNTg1NC0xNS0xNSA2LjU4NTQtMTUgMTUtMTV6IiBjb2xvcj0iIzAwMDAwMCIgZmlsbD0iI2ZmZiIgc3R5bGU9Ii1pbmtzY2FwZS1zdHJva2U6bm9uZSIvPjwvc3ZnPgo="},42761:function(t){t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTS00LTRoMjR2MjRILTRWLTR6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhzMy42IDggOCA4IDgtMy42IDgtOC0zLjYtOC04LTh6IiBmaWxsPSIjZWQ0ODRjIi8+PHBhdGggZD0iTTUgNi41aDZjLjggMCAxLjUuNyAxLjUgMS41cy0uNyAxLjUtMS41IDEuNUg1Yy0uOCAwLTEuNS0uNy0xLjUtMS41UzQuMiA2LjUgNSA2LjV6IiBmaWxsPSIjZmRmZmZmIi8+PC9zdmc+Cg=="},87210:function(t){t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTQuOCAxMS4yaDYuNFY0LjhINC44djYuNHpNOCAwQzMuNiAwIDAgMy42IDAgOHMzLjYgOCA4IDggOC0zLjYgOC04LTMuNi04LTgtOHoiIGZpbGw9IiM0OWIzODIiLz48L3N2Zz4K"},94659:function(t){t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTS00LTRoMjR2MjRILTR6Ii8+PHBhdGggZD0iTTYuOS4xQzMgLjYtLjEgNC0uMSA4YzAgNC40IDMuNiA4IDggOCA0IDAgNy40LTMgOC02LjktMS4yIDEuMy0yLjkgMi4xLTQuNyAyLjEtMy41IDAtNi40LTIuOS02LjQtNi40IDAtMS45LjgtMy42IDIuMS00Ljd6IiBmaWxsPSIjZjRhMzMxIi8+PC9zdmc+Cg=="}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={id:t,loaded:!1,exports:{}};return o[t].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,e=[],a.O=function(t,n,r,o){if(!n){var i=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],o=e[u][2];for(var l=!0,c=0;c<n.length;c++)(!1&o||i>=o)&&Object.keys(a.O).every((function(t){return a.O[t](n[c])}))?n.splice(c--,1):(l=!1,o<i&&(i=o));if(l){e.splice(u--,1);var s=r();void 0!==s&&(t=s)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.f={},a.e=function(t){return Promise.all(Object.keys(a.f).reduce((function(e,n){return a.f[n](t,e),e}),[]))},a.u=function(t){return t+"-"+t+".js?v="+{2250:"34f75a254de23027f023",7608:"e10b56a26e98ac647fb2"}[t]},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n={},r="nextcloud:",a.l=function(t,e,o,i){if(n[t])n[t].push(e);else{var l,c;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var d=s[u];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==r+o){l=d;break}}l||(c=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",r+o),l.src=t),n[t]=[e];var p=function(e,r){l.onerror=l.onload=null,clearTimeout(h);var o=n[t];if(delete n[t],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((function(t){return t(r)})),e)return e(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),c&&document.head.appendChild(l)}},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},a.j=5544,function(){var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!t;)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t}(),function(){a.b=document.baseURI||self.location.href;var t={5544:0};a.f.j=function(e,n){var r=a.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=t[e]=[n,o]}));n.push(r[2]=o);var i=a.p+a.u(e),l=new Error;a.l(i,(function(n){if(a.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+e,e)}},a.O.j=function(e){return 0===t[e]};var e=function(e,n){var r,o,i=n[0],l=n[1],c=n[2],s=0;if(i.some((function(e){return 0!==t[e]}))){for(r in l)a.o(l,r)&&(a.m[r]=l[r]);if(c)var u=c(a)}for(e&&e(n);s<i.length;s++)o=i[s],a.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return a.O(u)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),a.nc=void 0;var l=a.O(void 0,[7874],(function(){return a(86303)}));l=a.O(l)}();
  3. //# sourceMappingURL=theming-admin-theming.js.map?v=9b477cd06cc1e8d43569