diff options
Diffstat (limited to 'apps/accessibility/js/accessibility.js')
-rw-r--r-- | apps/accessibility/js/accessibility.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/accessibility/js/accessibility.js b/apps/accessibility/js/accessibility.js index 6e0b9c3958d..af132e1a3c6 100644 --- a/apps/accessibility/js/accessibility.js +++ b/apps/accessibility/js/accessibility.js @@ -11,5 +11,5 @@ var r=Object.freeze({});function o(e){return null==e}function i(e){return null!= * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */ -e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(17),a=n(18),s=n(10);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},c.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}})),e.exports=c},function(e,t,n){"use strict";var r=n(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(0),o=n(19),i=n(5),a=n(6),s=n(26),c=n(27);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!s(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(9);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(11);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(31),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(2))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){v(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(v,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&v(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return u[c]=o,r(c),c++},d.clearImmediate=p}function p(e){delete u[e]}function v(e){if(l)setTimeout(v,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(2),n(7))},function(e,n,r){"use strict";r.r(n);var o=r(1);function i(e,t,n,r,o,i,a,s){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:u}}var a=i({name:"itemPreview",props:["preview","selected"],computed:{checked:{get:function(){return this.selected===this.preview.id},set:function(e){this.$emit("select",!!e&&this.preview.id,this.selected)}}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{preview:!0}},[n("div",{staticClass:"preview-image",style:{backgroundImage:"url("+e.preview.img+")"}}),e._v(" "),n("div",{staticClass:"preview-description"},[n("h3",[e._v(e._s(e.preview.title))]),e._v(" "),n("p",[e._v(e._s(e.preview.text))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.checked,expression:"checked"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"accessibility-"+e.preview.id},domProps:{checked:Array.isArray(e.checked)?e._i(e.checked,null)>-1:e.checked},on:{change:function(t){var n=e.checked,r=t.target,o=!!r.checked;if(Array.isArray(n)){var i=e._i(n,null);r.checked?i<0&&(e.checked=n.concat([null])):i>-1&&(e.checked=n.slice(0,i).concat(n.slice(i+1)))}else e.checked=o}}}),e._v(" "),n("label",{attrs:{for:"accessibility-"+e.preview.id}},[e._v(e._s(e.t("accessibility","Enable"))+" "+e._s(e.preview.title.toLowerCase()))])])])}),[],!1,null,null,null).exports,s=r(12),c=r.n(s),u=i({name:"Accessibility",components:{preview:a},beforeMount:function(){null!==document.getElementById("serverData")&&(this.serverData=JSON.parse(document.getElementById("serverData").dataset.server))},data:function(){return{serverData:[]}},computed:{themes:function(){return this.serverData.themes},highcontrast:function(){return this.serverData.highcontrast},fonts:function(){return this.serverData.fonts},selected:function(){return{theme:this.serverData.selected.theme,highcontrast:this.serverData.selected.highcontrast,font:this.serverData.selected.font}},description:function(){return t("accessibility","Universal access is very important to us. We follow web standards\n\t\t\t\tand check to make everything usable also without mouse,\n\t\t\t\tand assistive software such as screenreaders.\n\t\t\t\tWe aim to be compliant with the {guidelines} 2.1 on AA level,\n\t\t\t\twith the high contrast theme even on AAA level.").replace("{guidelines}",this.guidelinesLink)},guidelinesLink:function(){return'<a target="_blank" href="https://www.w3.org/WAI/standards-guidelines/wcag/" rel="noreferrer nofollow">'.concat(t("accessibility","Web Content Accessibility Guidelines"),"</a>")},descriptionDetail:function(){return t("accessibility","If you find any issues, don’t hesitate to report them on {issuetracker}.\n\t\t\t\tAnd if you want to get involved, come join {designteam}!").replace("{issuetracker}",this.issuetrackerLink).replace("{designteam}",this.designteamLink)},issuetrackerLink:function(){return'<a target="_blank" href="https://github.com/nextcloud/server/issues/" rel="noreferrer nofollow">'.concat(t("accessibility","our issue tracker"),"</a>")},designteamLink:function(){return'<a target="_blank" href="https://nextcloud.com/design" rel="noreferrer nofollow">'.concat(t("accessibility","our design team"),"</a>")}},methods:{selectHighContrast:function(e){this.selectItem("highcontrast",e)},selectTheme:function(e,t){this.selectItem("theme",e),document.body.classList.remove(t),e&&document.body.classList.add(e)},selectFont:function(e){this.selectItem("font",e)},selectItem:function(e,n){var r=this;c.a.post(OC.linkToOCS("apps/accessibility/api/v1/config",2)+e,{value:n}).then((function(t){r.serverData.selected[e]=n;var o=document.querySelector("link[rel=stylesheet][href*=accessibility][href*=user-]");if(o)JSON.stringify(Object.values(r.selected))===JSON.stringify([!1,!1])?o.remove():o.href=o.href.split("?")[0]+"?v="+(new Date).getTime();else{var i=document.createElement("link");i.rel="stylesheet",i.href=OC.generateUrl("/apps/accessibility/css/user-style.css")+"?v="+(new Date).getTime(),document.head.appendChild(i)}})).catch((function(e){console.log(e,e.response),OC.Notification.showTemporary(t("accessibility",e.response.data.ocs.meta.message+". Unable to apply the setting."))}))}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"section",attrs:{id:"accessibility"}},[n("h2",[e._v(e._s(e.t("accessibility","Accessibility")))]),e._v(" "),n("p",{domProps:{innerHTML:e._s(e.description)}}),e._v(" "),n("p",{domProps:{innerHTML:e._s(e.descriptionDetail)}}),e._v(" "),n("div",{staticClass:"preview-list"},[n("preview",{key:e.highcontrast.id,attrs:{preview:e.highcontrast,selected:e.selected.highcontrast},on:{select:e.selectHighContrast}}),e._v(" "),e._l(e.themes,(function(t){return n("preview",{key:t.id,attrs:{preview:t,selected:e.selected.theme},on:{select:e.selectTheme}})})),e._v(" "),e._l(e.fonts,(function(t){return n("preview",{key:t.id,attrs:{preview:t,selected:e.selected.font},on:{select:e.selectFont}})}))],2)])}),[],!1,null,null,null).exports;o.a.prototype.OC=OC,o.a.prototype.t=t,new o.a({el:"#accessibility",render:function(e){return e(u)}})}]); +e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(17),a=n(18),s=n(10);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},c.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}})),e.exports=c},function(e,t,n){"use strict";var r=n(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(0),o=n(19),i=n(5),a=n(6),s=n(26),c=n(27);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!s(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(9);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(11);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(31),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(2))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){v(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(v,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&v(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return u[c]=o,r(c),c++},d.clearImmediate=p}function p(e){delete u[e]}function v(e){if(l)setTimeout(v,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(2),n(7))},function(e,n,r){"use strict";r.r(n);var o=r(1);function i(e,t,n,r,o,i,a,s){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:u}}var a=i({name:"ItemPreview",props:{preview:{type:Object,required:!0},selected:{type:String,default:null}},computed:{checked:{get:function(){return this.selected===this.preview.id},set:function(e){this.$emit("select",!!e&&this.preview.id,this.selected)}}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{preview:!0}},[n("div",{staticClass:"preview-image",style:{backgroundImage:"url("+e.preview.img+")"}}),e._v(" "),n("div",{staticClass:"preview-description"},[n("h3",[e._v(e._s(e.preview.title))]),e._v(" "),n("p",[e._v(e._s(e.preview.text))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.checked,expression:"checked"}],staticClass:"checkbox",attrs:{id:"accessibility-"+e.preview.id,type:"checkbox"},domProps:{checked:Array.isArray(e.checked)?e._i(e.checked,null)>-1:e.checked},on:{change:function(t){var n=e.checked,r=t.target,o=!!r.checked;if(Array.isArray(n)){var i=e._i(n,null);r.checked?i<0&&(e.checked=n.concat([null])):i>-1&&(e.checked=n.slice(0,i).concat(n.slice(i+1)))}else e.checked=o}}}),e._v(" "),n("label",{attrs:{for:"accessibility-"+e.preview.id}},[e._v(e._s(e.t("accessibility","Enable"))+" "+e._s(e.preview.title.toLowerCase()))])])])}),[],!1,null,null,null).exports,s=r(12),c=r.n(s),u=i({name:"Accessibility",components:{ItemPreview:a},data:function(){return{serverData:[]}},computed:{themes:function(){return this.serverData.themes},highcontrast:function(){return this.serverData.highcontrast},fonts:function(){return this.serverData.fonts},selected:function(){return{theme:this.serverData.selected.theme,highcontrast:this.serverData.selected.highcontrast,font:this.serverData.selected.font}},description:function(){return t("accessibility","Universal access is very important to us. We follow web standards\n\t\t\t\tand check to make everything usable also without mouse,\n\t\t\t\tand assistive software such as screenreaders.\n\t\t\t\tWe aim to be compliant with the {guidelines} 2.1 on AA level,\n\t\t\t\twith the high contrast theme even on AAA level.").replace("{guidelines}",this.guidelinesLink)},guidelinesLink:function(){return'<a target="_blank" href="https://www.w3.org/WAI/standards-guidelines/wcag/" rel="noreferrer nofollow">'.concat(t("accessibility","Web Content Accessibility Guidelines"),"</a>")},descriptionDetail:function(){return t("accessibility","If you find any issues, don’t hesitate to report them on {issuetracker}.\n\t\t\t\tAnd if you want to get involved, come join {designteam}!").replace("{issuetracker}",this.issuetrackerLink).replace("{designteam}",this.designteamLink)},issuetrackerLink:function(){return'<a target="_blank" href="https://github.com/nextcloud/server/issues/" rel="noreferrer nofollow">'.concat(t("accessibility","our issue tracker"),"</a>")},designteamLink:function(){return'<a target="_blank" href="https://nextcloud.com/design" rel="noreferrer nofollow">'.concat(t("accessibility","our design team"),"</a>")}},beforeMount:function(){null!==document.getElementById("serverData")&&(this.serverData=JSON.parse(document.getElementById("serverData").dataset.server))},methods:{selectHighContrast:function(e){this.selectItem("highcontrast",e)},selectTheme:function(e,t){this.selectItem("theme",e),document.body.classList.remove(t),e&&document.body.classList.add(e)},selectFont:function(e){this.selectItem("font",e)},selectItem:function(e,n){var r=this;c.a.post(OC.linkToOCS("apps/accessibility/api/v1/config",2)+e,{value:n}).then((function(t){r.serverData.selected[e]=n;var o=document.querySelector("link[rel=stylesheet][href*=accessibility][href*=user-]");if(o)JSON.stringify(Object.values(r.selected))===JSON.stringify([!1,!1])?o.remove():o.href=o.href.split("?")[0]+"?v="+(new Date).getTime();else{var i=document.createElement("link");i.rel="stylesheet",i.href=OC.generateUrl("/apps/accessibility/css/user-style.css")+"?v="+(new Date).getTime(),document.head.appendChild(i)}})).catch((function(e){console.error(e,e.response),OC.Notification.showTemporary(t("accessibility",e.response.data.ocs.meta.message+". Unable to apply the setting."))}))}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"section",attrs:{id:"accessibility"}},[n("h2",[e._v(e._s(e.t("accessibility","Accessibility")))]),e._v(" "),n("p",{domProps:{innerHTML:e._s(e.description)}}),e._v(" "),n("p",{domProps:{innerHTML:e._s(e.descriptionDetail)}}),e._v(" "),n("div",{staticClass:"preview-list"},[n("ItemPreview",{key:e.highcontrast.id,attrs:{preview:e.highcontrast,selected:e.selected.highcontrast},on:{select:e.selectHighContrast}}),e._v(" "),e._l(e.themes,(function(t){return n("ItemPreview",{key:t.id,attrs:{preview:t,selected:e.selected.theme},on:{select:e.selectTheme}})})),e._v(" "),e._l(e.fonts,(function(t){return n("ItemPreview",{key:t.id,attrs:{preview:t,selected:e.selected.font},on:{select:e.selectFont}})}))],2)])}),[],!1,null,null,null).exports;o.a.prototype.OC=OC,o.a.prototype.t=t;n.default=new o.a({el:"#accessibility",render:function(e){return e(u)}})}]); //# sourceMappingURL=accessibility.js.map
\ No newline at end of file |