asteroid/templates/reader/resources/scripts/bibi.js

11 lines
215 KiB
JavaScript
Raw Normal View History

/*!
*
* # Bibi | EPUB Reader on your website. ()
*
* * © Satoru Matsushima - https://bibi.epub.link or https://github.com/satorumurmur/bibi
* * Open source under the MIT License - https://github.com/satorumurmur/bibi/blob/master/LICENSE
*
* * Including:
* - sML.js : © Satoru Matsushima - https://github.com/satorumurmur/sML / Licensed under the MIT License - https://github.com/satorumurmur/sML/blob/master/LICENSE
*
*/!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=47)}({0:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(i=window)}e.exports=i},2:function(e,t,n){(function(t){var n=this;function i(e){throw new Error('"'+e+'" is read-only')}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(i){e.exports?e.exports=i:(void 0!==t?t:void 0!==n?n:self).sML=i}(function(){"use strict";var e,t,n,o,a,s,c,l,u,d,p,f,g={version:"1.0.28"},h=navigator.userAgent,b=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$1";return e?(t=new RegExp("^.*"+e+"[ :\\/]?(\\d+([\\._]\\d+)*).*$")).test(h)?h.replace(t,n).replace(/_/g,".").split(".").map((function(e){return parseInt(e)||0})):[]:[]};return g.OperatingSystem=(e={},/Mac OS X/.test(h)?/\(iP(hone|ad|od touch);/.test(h)?e.iOS=b("CPU (iPhone )?OS","$2"):void 0!==document.ontouchend?e.iOS=e.iPadOS=b():/Mac OS X 10[\._]\d/.test(h)&&(e.macOS=b("Mac OS X ")):/Windows( NT)? \d/.test(h)?e.Windows=6!=(t=b("Windows( NT)?","$2"))[0]?t:t[1]>=3?[8,1]:t[1]>=2?[8]:t[1]>=1?[7]:t:/Android \d/.test(h)?e.Android=b("Android"):/CrOS/.test(h)?e.Chrome=b():/X11;/.test(h)?e.Linux=b():/Firefox/.test(h)&&(e.Firefox=b()),e),g.UserAgent=(n={},/ Gecko\/\d/.test(h)?(n.Gecko=b("rv"),/ Waterfox\/\d/.test(h)?n.Waterfox=b("Waterfox"):/ Firefox\/\d/.test(h)&&(n.Firefox=b("Firefox"))):/ Edge\/\d/.test(h)?n.EdgeHTML=n.Edge=b("Edge"):/ Chrom(ium|e)\/\d/.test(h)?(n.Blink=n.Chromium=function(e){return e[0]?e:b("Chrome")}(b("Chromium")),/ EdgA?\/\d/.test(h)?n.Edge=function(e){return e[0]?e:b("Edg")}(b("EdgA")):/ OPR\/\d/.test(h)?n.Opera=b("OPR"):/ Silk\/\d/.test(h)?n.Silk=b("Silk"):/ Vivaldi\/\d/.test(h)?n.Vivaldi=b("Vivaldi"):/ Phoebe\/\d/.test(h)?n.Phoebe=b("Phoebe"):n.Chrome=function(e){return e[0]?e:n.Chromium}(b("Chrome"))):/ AppleWebKit\/\d/.test(h)?(n.WebKit=b("AppleWebKit"),/ CriOS \d/.test(h)?n.Chrome=b("CriOS"):/ FxiOS \d/.test(h)?n.Firefox=b("FxiOS"):/ EdgiOS\/\d/.test(h)?n.Edge=b("EdgiOS"):/ Version\/\d/.test(h)&&(n.Safari=b("Version"))):/ Trident\/\d/.test(h)&&(n.Trident=b("Trident"),n.InternetExplorer=function(e){return e[0]?e:b("MSIE")}(b("rv"))),/[\[; ]FB(AN|_IAB)\//.test(h)&&(n.Facebook=b("FBAV")),/ Line\/\d/.test(h)&&(n.LINE=b("Line")),n),g.Environments=[g.OperatingSystem,g.UserAgent].reduce((function(e,t){for(var n in t)t[n]&&e.push(n);return e}),[]),Object.defineProperties(g,{OS:{get:function(){return g.OperatingSystem}},UA:{get:function(){return g.UserAgent}}}),g.forEach=function(e){return function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window||self,i=e.length,r=0;r<i&&"break"!=t.call(n,e[r],r,e);r++);}},g.replace=function(e,t){if(!(t[0]instanceof Array))return e.replace(t[0],t[1]);for(var n=t.length,i=0;i<n;i