You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/dist/core-common.js

3 lines
4.4 MiB
JavaScript

/*! For license information please see core-common.js.LICENSE.txt */
(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[7874],{90478:(e,t,n)=>{"use strict";var r=n(50791),a=Object.prototype.hasOwnProperty,i={align:"text-align",valign:"vertical-align",height:"height",width:"width"};function o(e){var t;if("tr"===e.tagName||"td"===e.tagName||"th"===e.tagName)for(t in i)a.call(i,t)&&void 0!==e.properties[t]&&(s(e,i[t],e.properties[t]),delete e.properties[t])}function s(e,t,n){var r=(e.properties.style||"").trim();r&&!/;\s*/.test(r)&&(r+=";"),r&&(r+=" ");var a=r+t+": "+n+";";e.properties.style=a}e.exports=function(e){return r(e,"element",o),e}},93790:e=>{"use strict";function t(e){if("string"==typeof e)return function(e){return function(t){return Boolean(t&&t.type===e)}}(e);if(null==e)return a;if("object"==typeof e)return("length"in e?r:n)(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function n(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function r(e){var n=function(e){for(var n=[],r=e.length,a=-1;++a<r;)n[a]=t(e[a]);return n}(e),r=n.length;return function(){for(var e=-1;++e<r;)if(n[e].apply(this,arguments))return!0;return!1}}function a(){return!0}e.exports=t},11150:(e,t,n)=>{"use strict";e.exports=s;var r=n(93790),a=!0,i="skip",o=!1;function s(e,t,n,a){var s;"function"==typeof t&&"function"!=typeof n&&(a=n,n=t,t=null),s=r(t),function e(r,u,c){var d,h=[];return(t&&!s(r,u,c[c.length-1]||null)||(h=l(n(r,c)))[0]!==o)&&r.children&&h[0]!==i?(d=l(function(t,n){for(var r,i=a?-1:1,s=(a?t.length:-1)+i;s>-1&&s<t.length;){if((r=e(t[s],s,n))[0]===o)return r;s="number"==typeof r[1]?r[1]:s+i}}(r.children,c.concat(r))),d[0]===o?d:h):h}(e,null,[])}function l(e){return null!==e&&"object"==typeof e&&"length"in e?e:"number"==typeof e?[a,e]:[e]}s.CONTINUE=a,s.SKIP=i,s.EXIT=o},50791:(e,t,n)=>{"use strict";e.exports=s;var r=n(11150),a=r.CONTINUE,i=r.SKIP,o=r.EXIT;function s(e,t,n,a){"function"==typeof t&&"function"!=typeof n&&(a=n,n=t,t=null),r(e,t,(function(e,t){var r=t[t.length-1],a=r?r.children.indexOf(e):null;return n(e,a,r)}),a)}s.CONTINUE=a,s.SKIP=i,s.EXIT=o},22200:(e,t,n)=>{"use strict";var r=n(25108),a=n(57888),i=void 0,o=[];a.subscribe("csrf-token-update",(function(e){i=e.token,o.forEach((function(t){try{t(e.token)}catch(e){r.error("error updating CSRF token observer",e)}}))}));var s=function(e,t){return e?e.getAttribute(t):null},l=void 0;t.getCurrentUser=function(){if(void 0!==l)return l;var e=null===document||void 0===document?void 0:document.getElementsByTagName("head")[0];if(!e)return null;var t=s(e,"data-user");return l=null===t?null:{uid:t,displayName:s(e,"data-user-displayname"),isAdmin:!!window._oc_isadmin}},t.getRequestToken=function(){if(void 0===i){var e=null===document||void 0===document?void 0:document.getElementsByTagName("head")[0];i=e?e.getAttribute("data-requesttoken"):null}return i},t.onRequestTokenUpdate=function(e){o.push(e)}},42515:(e,t,n)=>{"use strict";var r=n(25108);n(40739),t.F=function(){try{return(0,a.loadState)("core","capabilities")}catch(e){return r.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}};var a=n(91947)},9944:(e,t,n)=>{"use strict";var r=n(25108),a=n(79753),i=n(27856),o=n(95573);function s(){return document.documentElement.dataset.locale||"en"}function l(){return s().replace(/_/g,"-")}function u(){return document.documentElement.lang||"en"}function c(e){var t,n,r,a;return{translations:null!==(n=null===(t=window._oc_l10n_registry_translations)||void 0===t?void 0:t[e])&&void 0!==n?n:{},pluralFunction:null!==(a=null===(r=window._oc_l10n_registry_plural_functions)||void 0===r?void 0:r[e])&&void 0!==a?a:e=>e}}function d(e,t,n,r,a){const s=Object.assign({},{escape:!0,sanitize:!0},a||{}),l=e=>e,u=s.sanitize?i.sanitize:l,d=s.escape?o:l;let h=c(e).translations[t]||t;return h=Array.isArray(h)?h[0]:h,u("object"==typeof n||void 0!==r?((e,t,n)=>e.replace(/%n/g,""+n).replace(/{([^{}]*)}/g,((e,n)=>{if(void 0===t||!(n in t))return u(e);const r=t[n];return u("string"==typeof r||"number"==typeof r?d
//# sourceMappingURL=core-common.js.map?v=b973ae5be3edcb0f65a8