mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
10 lines
26 KiB
JavaScript
10 lines
26 KiB
JavaScript
|
/*!
|
||
|
* docsify-themeable
|
||
|
* v0.8.1
|
||
|
* https://jhildenbiddle.github.io/docsify-themeable/
|
||
|
* (c) 2018-2020 John Hildenbiddle
|
||
|
* MIT license
|
||
|
*/
|
||
|
!function(){"use strict";function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||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 r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){var n=1<arguments.length&&void 0!==t?t:{},o={mimeType:n.mimeType||null,onBeforeSend:n.onBeforeSend||Function.prototype,onSuccess:n.onSuccess||Function.prototype,onError:n.onError||Function.prototype,onComplete:n.onComplete||Function.prototype},r=Array.isArray(e)?e:[e],a=Array.apply(null,Array(r.length)).map(function(e){return null});function s(e){return!("<"===(0<arguments.length&&void 0!==e?e:"").trim().charAt(0))}function c(e,t){o.onError(e,r[t],t)}function i(e,t){var n=o.onSuccess(e,r[t],t);e=!1===n?"":n||e,a[t]=e,-1===a.indexOf(null)&&o.onComplete(a)}var u=document.createElement("a");r.forEach(function(e,t){if(u.setAttribute("href",e),u.href=String(u.href),Boolean(document.all&&!window.atob)&&u.host.split(":")[0]!==location.host.split(":")[0]){if(u.protocol===location.protocol){var n=new XDomainRequest;n.open("GET",e),n.timeout=0,n.onprogress=Function.prototype,n.ontimeout=Function.prototype,n.onload=function(){s(n.responseText)?i(n.responseText,t):c(n,t)},n.onerror=function(e){c(n,t)},setTimeout(function(){n.send()},0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),c(null,t)}else{var r=new XMLHttpRequest;r.open("GET",e),o.mimeType&&r.overrideMimeType&&r.overrideMimeType(o.mimeType),o.onBeforeSend(r,e,t),r.onreadystatechange=function(){4===r.readyState&&(200===r.status&&s(r.responseText)?i(r.responseText,t):c(r,t))},r.send()}})}function t(e){var r={cssComments:/\/\*[\s\S]+?\*\//g,cssImports:/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g},d={rootElement:e.rootElement||document,include:e.include||'style,link[rel="stylesheet"]',exclude:e.exclude||null,filter:e.filter||null,skipDisabled:!1!==e.skipDisabled,useCSSOM:e.useCSSOM||!1,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},t=Array.apply(null,d.rootElement.querySelectorAll(d.include)).filter(function(e){return t=e,n=d.exclude,!(t.matches||t.matchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector).call(t,n);var t,n}),i=Array.apply(null,Array(t.length)).map(function(e){return null});function u(){if(-1===i.indexOf(null)){var e=i.join("");d.onComplete(e,i,t)}}function l(e,n,r,t){var o=d.onSuccess(e,r,t);(function r(o,a,s,c){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[];var u=5<arguments.length&&void 0!==arguments[5]?arguments[5]:[];var l=f(o,s,u);l.rules.length?m(l.absoluteUrls,{onBeforeSend:function(e,t,n){d.onBeforeSend(e,a,t)},onSuccess:function(n,e,t){var r=d.onSuccess(n,a,e),o=f(n=!1===r?"":r||n,e,u);return o.rules.forEach(function(e,t){n=n.replace(e,o.absoluteRules[t])}),n},onError:function(e,t,n){i.push({xhr:e,url:t}),u.push(l.rules[n]),r(o,a,s,c,i,u)},onComplete:function(e){e.forEach(function(e,t){o=o.replace(l.rules[t],e)}),r(o,a,s,c,i,u)}}):c(o,i)})(e=void 0!==o&&!1===Boolean(o)?"":o||e,r,t,function(e,t){null===i[n]&&(t.forEach(function(e){return d.onError(e.xhr,r,e.url)}),!d.filter||d.filter.test(e)?i[n]=e
|
||
|
//# sourceMappingURL=docsify-themeable.min.js.map
|