From ce47c723fbc2c1d45833159901b15c0b1e37d93c Mon Sep 17 00:00:00 2001 From: Drini Cami Date: Mon, 2 Dec 2024 13:59:25 -0500 Subject: [PATCH] 5.0.0-84 --- BookReader/BookReader.js | 2 +- BookReader/ia-bookreader-bundle.js | 40 +++++++++++++------------- BookReader/ia-bookreader-bundle.js.map | 2 +- CHANGELOG.md | 3 ++ package-lock.json | 4 +-- package.json | 2 +- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/BookReader/BookReader.js b/BookReader/BookReader.js index cad1a3992..12660bec9 100644 --- a/BookReader/BookReader.js +++ b/BookReader/BookReader.js @@ -1,3 +1,3 @@ /*! For license information please see BookReader.js.LICENSE.txt */ -!function(){var t,e={1774:function(t,e,n){"use strict";n.d(e,{KL:function(){return p},LN:function(){return f},Ql:function(){return h}}),n(2675),n(9463),n(6412),n(2259),n(5700),n(8125),n(8706),n(3418),n(3792),n(8598),n(2712),n(4490),n(4782),n(9572),n(2010),n(4731),n(479),n(8130),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(3500),n(2953);var r=n(1669);function i(t){return i="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},i(t)}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.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}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},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 i=r.arg;M(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function u(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function c(t,e){for(var n=0;n",{class:"BRpagecontainer ".concat(e?"pagediv".concat(e.index):"BRemptypage"),css:{position:"absolute"}}).attr("data-side",null==e?void 0:e.pageSide),i&&(this.$container.append(r('
')),this.$container.addClass("protected")),this.$img=null},e=[{key:"update",value:function(t){var e,n,i=t.dimensions,o=void 0===i?null:i,a=t.reduce,c=void 0===a?null:a;if(o&&this.$container.css(o),null!=c&&this.page){var l=this.imageCache.imageLoaded(this.page.index,c),f=!l&&this.imageCache.getBestLoadedReduce(this.page.index,c),h=this.imageCache.image(this.page.index,c);if((null===(e=this.$img)||void 0===e?void 0:e[0].src)==h[0].src)return this;null===(n=this.$img)||void 0===n||n.remove(),this.$img=h.prependTo(this.$container);var d=[];return l||(this.$container.addClass("BRpageloading"),d.push('url("'.concat(this.loadingImage,'") center/20px no-repeat'))),f&&d.push('url("'.concat(this.page.getURI(f,0),'") center/100% 100% no-repeat')),l||this.$img.css("background",d.join(",")).one("loadend",function(){var t,e=(t=s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r(e.target).css({background:""}),r(e.target).parent().removeClass("BRpageloading");case 2:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),this}}}],e&&c(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function h(t,e){var n=document.createElement("div");return n.style.width="".concat(t.width,"px"),n.style.height="".concat(t.height,"px"),n.setAttribute("class","BRPageLayer ".concat(e)),n}function d(t){var e=t.l,n=t.r,r=t.b,i=t.t,o=document.createElementNS("http://www.w3.org/2000/svg","rect");return o.setAttribute("x",e.toString()),o.setAttribute("y",i.toString()),o.setAttribute("width",(n-e).toString()),o.setAttribute("height",(r-i).toString()),o.setAttribute("rx","4"),o.setAttribute("ry","4"),o}function p(t,e,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=i.querySelector(".".concat(t)),u=s||function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("viewBox","0 0 ".concat(t.width," ").concat(t.height)),n.setAttribute("class","BRPageLayer ".concat(e)),n.setAttribute("preserveAspectRatio","none"),n}(n,t);if(!s){var c=i.querySelector(".BRpageimage");c?r(u).insertAfter(c):r(u).prependTo(i)}var l,f,h,p=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(e.entries());try{for(p.s();!(l=p.n()).done;){var v=(f=l.value,h=2,function(t){if(Array.isArray(t))return t}(f)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(f,h)||o(f,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=v[0],m=d(v[1]);a&&m.setAttribute("class",a[g]),u.appendChild(m)}}catch(t){p.e(t)}finally{p.f()}}},6257:function(t,e,n){"use strict";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 i(){i=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),s=new A(r||[]);return a(o,"_invoke",{value:T(t,n,s)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",g="executing",m="completed",y={};function b(){}function w(){}function x(){}var _={};f(_,u,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(R([])));S&&S!==n&&o.call(S,u)&&(_=S);var P=x.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,a,s,u){var c=d(t[i],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,n,r){var i=p;return function(o,a){if(i===g)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var c=d(e,n,r);if("normal"===c.type){if(i=r.done?m:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(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 M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function R(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},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 i=r.arg;M(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function o(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,u,"next",t)}function u(t){o(a,r,i,s,u,"throw",t)}s(void 0)}))}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:document,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.activeElement;return e&&null!=n&&n.shadowRoot?h(n.shadowRoot,!0):n}function d(){var t=h(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document);return"INPUT"==(null==t?void 0:t.tagName)||"TEXTAREA"==(null==t?void 0:t.tagName)}function p(t){var e=t.contentWindow||t.contentDocument;return e.document||e}function v(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/1&&void 0!==arguments[1]?arguments[1]:{},n=e.bubbles,r=void 0!==n&&n,i=e.cancelable,o=void 0!==i&&i,a=e.detail,s=void 0===a?null:a,u=document.createEvent("CustomEvent");return u.initCustomEvent(t,r,o,s),u}function _(){var t=document.createElement("div");t.style.width="1in",document.body.appendChild(t);var e=t.offsetWidth;document.body.removeChild(t);var n=1.25*e;return 0==n?100:n}function k(t){return t.reduce((function(t,e){return t+e}),0)}function S(t){var e,n=[],r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.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)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.push(i)}}catch(t){r.e(t)}finally{r.f()}return n}function P(t,e){return t.length==e.length&&t.every((function(t,n){return t==e[n]}))}function E(t,e){return t&&e&&!P(t,e)}function O(t){return T.apply(this,arguments)}function T(){return(T=a(i().mark((function t(e){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,e)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t){return j.apply(this,arguments)}function j(){return j=a(i().mark((function t(e){var n,r,o,a,s,u,c,l,f,h,d,p=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(n=p.length>1&&void 0!==p[1]?p[1]:{}).step,o=void 0===r?50:r,a=n.timeout,s=void 0===a?500:a,u=n.until,c=void 0===u?function(t){return Boolean(t)}:u,l=n._sleep,f=void 0===l?O:l,h=Date.now();case 2:if(!(Date.now()-h0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator.vendor;return/chrome/i.test(t)&&/google inc/i.test(e)}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(t)}function o(){return"ongesturestart"in window&&navigator.maxTouchPoints>0}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/SamsungBrowser/i.test(t)}n.d(e,{H8:function(){return r},gm:function(){return i},ij:function(){return a},un:function(){return o}}),n(7495)},2617:function(t){t.exports=function(){var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(t){return!(!t||!t.Window)&&t instanceof t.Window};var e={};Object.defineProperty(e,"__esModule",{value:!0}),e.getWindow=function(e){return(0,t.default)(e)?e:(e.ownerDocument||e).defaultView||r.window},e.init=i,e.window=e.realWindow=void 0;var n=void 0;e.realWindow=n;var r=void 0;function i(t){e.realWindow=n=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&"function"==typeof t.wrap&&t.wrap(i)===i&&(t=t.wrap(t)),e.window=r=t}e.window=r,"undefined"!=typeof window&&window&&i(window);var o={};function a(t){return a="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},a(t)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=function(t){return!!t&&"object"===a(t)},u=function(t){return"function"==typeof t},c={window:function(n){return n===e.window||(0,t.default)(n)},docFrag:function(t){return s(t)&&11===t.nodeType},object:s,func:u,number:function(t){return"number"==typeof t},bool:function(t){return"boolean"==typeof t},string:function(t){return"string"==typeof t},element:function(t){if(!t||"object"!==a(t))return!1;var n=e.getWindow(t)||e.window;return/object|function/.test("undefined"==typeof Element?"undefined":a(Element))?t instanceof Element||t instanceof n.Element:1===t.nodeType&&"string"==typeof t.nodeName},plainObject:function(t){return s(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return s(t)&&void 0!==t.length&&u(t.splice)}};o.default=c;var l={};function f(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.prepared.axis;"x"===n?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):"y"===n&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function h(t){var e=t.iEvent,n=t.interaction;if("drag"===n.prepared.name){var r=n.prepared.axis;if("x"===r||"y"===r){var i="x"===r?"y":"x";e.page[i]=n.coords.start.page[i],e.client[i]=n.coords.start.client[i],e.delta[i]=0}}}Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var d={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=d.draggable,e.map.drag=d,e.methodDict.drag="draggable",r.actions.drag=d.defaults},listeners:{"interactions:before-action-move":f,"interactions:action-resume":f,"interactions:action-move":h,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,i=n.options.drag;if(i&&i.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||r&n.options.drag.mouseButtons))return t.action={name:"drag",axis:"start"===i.lockAxis?i.startAxis:i.lockAxis},!1}},draggable:function(t){return o.default.object(t)?(this.options.drag.enabled=!1!==t.enabled,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):o.default.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:f,move:h,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"}},p=d;l.default=p;var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;var g={init:function(t){var e=t;g.document=e.document,g.DocumentFragment=e.DocumentFragment||m,g.SVGElement=e.SVGElement||m,g.SVGSVGElement=e.SVGSVGElement||m,g.SVGElementInstance=e.SVGElementInstance||m,g.Element=e.Element||m,g.HTMLElement=e.HTMLElement||g.Element,g.Event=e.Event,g.Touch=e.Touch||m,g.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function m(){}var y=g;v.default=y;var b={};Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var w={init:function(t){var e=v.default.Element,n=t.navigator||{};w.supportsTouch="ontouchstart"in t||o.default.func(t.DocumentTouch)&&v.default.document instanceof t.DocumentTouch,w.supportsPointerEvent=!1!==n.pointerEnabled&&!!v.default.PointerEvent,w.isIOS=/iP(hone|od|ad)/.test(n.platform),w.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),w.isIe9=/MSIE 9/.test(n.userAgent),w.isOperaMobile="Opera"===n.appName&&w.supportsTouch&&/Presto/.test(n.userAgent),w.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",w.pEventTypes=w.supportsPointerEvent?v.default.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,w.wheelEvent=v.default.document&&"onmousewheel"in v.default.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},x=w;b.default=x;var _={};function k(t){var e=t.parentNode;if(o.default.docFrag(e)){for(;(e=e.host)&&o.default.docFrag(e););return e}return e}function S(t,n){return e.window!==e.realWindow&&(n=n.replace(/\/deep\//g," ")),t[b.default.prefixedMatchesSelector](n)}Object.defineProperty(_,"__esModule",{value:!0}),_.closest=function(t,e){for(;o.default.element(t);){if(S(t,e))return t;t=k(t)}return null},_.getActualElement=function(t){return t.correspondingUseElement||t},_.getElementClientRect=T,_.getElementRect=function(t){var n=T(t);if(!b.default.isIOS7&&n){var r=O(e.getWindow(t));n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n},_.getPath=function(t){for(var e=[];t;)e.push(t),t=k(t);return e},_.getScrollXY=O,_.indexOfDeepestElement=function(t){for(var n,r=[],i=0;i=(parseInt(e.getWindow(g).getComputedStyle(g).zIndex,10)||0)&&(n=i);else n=i}else n=i}var p,g;return n},_.matchesSelector=S,_.matchesUpTo=function(t,e,n){for(;o.default.element(t);){if(S(t,e))return!0;if((t=k(t))===n)return S(t,e)}return!1},_.nodeContains=function(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1},_.parentNode=k,_.trySelector=function(t){return!!o.default.string(t)&&(v.default.document.querySelector(t),!0)};var P=function(t){return t.parentNode||t.host};function E(t,e){for(var n,r=[],i=t;(n=P(i))&&i!==e&&n!==i.ownerDocument;)r.unshift(i),i=n;return r}function O(t){return{x:(t=t||e.window).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function T(t){var e=t instanceof v.default.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}var C={};Object.defineProperty(C,"__esModule",{value:!0}),C.default=function(t,e){for(var n in e)t[n]=e[n];return t};var j={};function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1?H(e):e[0];U(r,t.page),z(r,t.client),t.timeStamp=n},$.setZeroCoords=function(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0},$.touchAngle=function(t,e){var n=e+"X",r=e+"Y",i=W(t),o=i[1][n]-i[0][n],a=i[1][r]-i[0][r];return 180*Math.atan2(a,o)/Math.PI},$.touchBBox=function(t){if(!t.length)return null;var e=W(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),i=Math.max(e[0].pageX,e[1].pageX),o=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:i,bottom:o,width:i-n,height:o-r}},$.touchDistance=function(t,e){var n=e+"X",r=e+"Y",i=W(t),o=i[0][n]-i[1][n],a=i[0][r]-i[1][r];return(0,D.default)(o,a)};var V={};function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(V,"__esModule",{value:!0}),V.BaseEvent=void 0;var Y=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),G(this,"immediatePropagationStopped",!1),G(this,"propagationStopped",!1),this._interaction=e}var e,n;return e=t,(n=[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}])&&function(t,e){for(var n=0;ns.left&&f.xs.top&&f.y=s.left&&v<=s.right&&g>=s.top&&g<=s.bottom}return p&&o.default.number(c)&&(u=Math.max(0,Math.min(s.right,p.right)-Math.max(s.left,p.left))*Math.max(0,Math.min(s.bottom,p.bottom)-Math.max(s.top,p.top))/(p.width*p.height)>=c),t.options.drop.checker&&(u=t.options.drop.checker(e,n,u,t,a,r,i)),u}(this,t,e,n,r,i,a)},n.dynamicDrop=function(e){return o.default.bool(e)?(t.dynamicDrop=e,n):t.dynamicDrop},(0,C.default)(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,i.actions.drop=ft.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;"drag"===e.prepared.name&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if("drag"===n.prepared.name){var i=n.dropState;i.activeDrops=null,i.events=null,i.activeDrops=at(e,n.element),i.events=ut(n,0,r),i.events.activate&&(ot(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":lt,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;"drag"===n.prepared.name&&(ct(n,n.dropState.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),n.dropState.events={})},"interactions:action-end":function(t,e){if("drag"===t.interaction.prepared.name){var n=t.interaction,r=t.iEvent;lt(t,e),ct(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:at,getDrop:st,getDropEvents:ut,fireDropEvents:ct,defaults:{enabled:!1,accept:null,overlap:"pointer"}},ht=ft;it.default=ht;var dt={};function pt(t){var e=t.interaction,n=t.iEvent,r=t.phase;if("gesture"===e.prepared.name){var i=e.pointers.map((function(t){return t.pointer})),a="start"===r,s="end"===r,u=e.interactable.options.deltaSource;if(n.touches=[i[0],i[1]],a)n.distance=$.touchDistance(i,u),n.box=$.touchBBox(i),n.scale=1,n.ds=0,n.angle=$.touchAngle(i,u),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(s){var c=e.prevEvent;n.distance=c.distance,n.box=c.box,n.scale=c.scale,n.ds=0,n.angle=c.angle,n.da=0}else n.distance=$.touchDistance(i,u),n.box=$.touchBBox(i),n.scale=n.distance/e.gesture.startDistance,n.angle=$.touchAngle(i,u),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,o.default.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}Object.defineProperty(dt,"__esModule",{value:!0}),dt.default=void 0;var vt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(t){return o.default.object(t)?(this.options.gesture.enabled=!1!==t.enabled,this.setPerAction("gesture",t),this.setOnEvents("gesture",t),this):o.default.bool(t)?(this.options.gesture.enabled=t,this):this.options.gesture},e.map.gesture=vt,e.methodDict.gesture="gesturable",r.actions.gesture=vt.defaults},listeners:{"interactions:action-start":pt,"interactions:action-move":pt,"interactions:action-end":pt,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""}},gt=vt;dt.default=gt;var mt={};function yt(t,e,n,r,i,a,s){if(!e)return!1;if(!0===e){var u=o.default.number(a.width)?a.width:a.right-a.left,c=o.default.number(a.height)?a.height:a.bottom-a.top;if(s=Math.min(s,Math.abs(("left"===t||"right"===t?u:c)/2)),u<0&&("left"===t?t="right":"right"===t&&(t="left")),c<0&&("top"===t?t="bottom":"bottom"===t&&(t="top")),"left"===t){var l=u>=0?a.left:a.right;return n.x=0?a.top:a.bottom;return n.y(u>=0?a.right:a.left)-s;if("bottom"===t)return n.y>(c>=0?a.bottom:a.top)-s}return!!o.default.element(r)&&(o.default.element(e)?e===r:_.matchesUpTo(r,e,i))}function bt(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.resizeAxes){var r=e;n.interactable.options.resize.square?("y"===n.resizeAxes?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,"x"===n.resizeAxes?r.delta.y=0:"y"===n.resizeAxes&&(r.delta.x=0))}}Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=void 0;var wt={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,i=t.defaults;wt.cursors=function(t){return t.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(n),wt.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(e){return function(t,e,n){return o.default.object(e)?(t.options.resize.enabled=!1!==e.enabled,t.setPerAction("resize",e),t.setOnEvents("resize",e),o.default.string(e.axis)&&/^x$|^y$|^xy$/.test(e.axis)?t.options.resize.axis=e.axis:null===e.axis&&(t.options.resize.axis=n.defaults.actions.resize.axis),o.default.bool(e.preserveAspectRatio)?t.options.resize.preserveAspectRatio=e.preserveAspectRatio:o.default.bool(e.square)&&(t.options.resize.square=e.square),t):o.default.bool(e)?(t.options.resize.enabled=e,t):t.options.resize}(this,e,t)},e.map.resize=wt,e.methodDict.resize="resizable",i.actions.resize=wt.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.rect;n._rects={start:(0,C.default)({},i),corrected:(0,C.default)({},i),previous:(0,C.default)({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}}(t),bt(t)},"interactions:action-move":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.interactable.options.resize.invert,o="reposition"===i||"negate"===i,a=n.rect,s=n._rects,u=s.start,c=s.corrected,l=s.delta,f=s.previous;if((0,C.default)(f,c),o){if((0,C.default)(c,a),"reposition"===i){if(c.top>c.bottom){var h=c.top;c.top=c.bottom,c.bottom=h}if(c.left>c.right){var d=c.left;c.left=c.right,c.right=d}}}else c.top=Math.min(a.top,u.bottom),c.bottom=Math.max(a.bottom,u.top),c.left=Math.min(a.left,u.right),c.right=Math.max(a.right,u.left);for(var p in c.width=c.right-c.left,c.height=c.bottom-c.top,c)l[p]=c[p]-f[p];r.edges=n.prepared.edges,r.rect=c,r.deltaRect=l}}(t),bt(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,i=t.rect,a=t.buttons;if(i){var s=(0,C.default)({},e.coords.cur.page),u=n.options.resize;if(u&&u.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||a&u.mouseButtons)){if(o.default.object(u.edges)){var c={left:!1,right:!1,top:!1,bottom:!1};for(var l in c)c[l]=yt(l,u.edges[l],s,e._latestPointer.eventTarget,r,i,u.margin||wt.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:"resize",edges:c})}else{var f="y"!==u.axis&&s.x>i.right-wt.defaultMargin,h="x"!==u.axis&&s.y>i.bottom-wt.defaultMargin;(f||h)&&(t.action={name:"resize",axes:(f?"x":"")+(h?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,i=wt.cursors,o=null;if(n)o=i[r+n];else if(e){for(var a="",s=["top","bottom","left","right"],u=0;u=1){var l={x:jt.x*c,y:jt.y*c};if(l.x||l.y){var f=At(a);o.default.window(a)?a.scrollBy(l.x,l.y):a&&(a.scrollLeft+=l.x,a.scrollTop+=l.y);var h=At(a),d={x:h.x-f.x,y:h.y-f.y};(d.x||d.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:d,interaction:t,container:a})}jt.prevTime=s}jt.isScrolling&&(St.default.cancel(jt.i),jt.i=St.default.request(jt.scroll))},check:function(t,e){var n;return null==(n=t.options[e].autoScroll)?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&jt.check(e.interactable,e.prepared.name))if(e.simulation)jt.x=jt.y=0;else{var r,i,a,s,u=e.interactable,c=e.element,l=e.prepared.name,f=u.options[l].autoScroll,h=Mt(f.container,u,c);if(o.default.window(h))s=n.clientXh.innerWidth-jt.margin,a=n.clientY>h.innerHeight-jt.margin;else{var d=_.getElementClientRect(h);s=n.clientXd.right-jt.margin,a=n.clientY>d.bottom-jt.margin}jt.x=i?1:s?-1:0,jt.y=a?1:r?-1:0,jt.isScrolling||(jt.margin=f.margin,jt.speed=f.speed,jt.start(e))}}};function Mt(t,n,r){return(o.default.string(t)?(0,j.getStringOptionResult)(t,n,r):t)||(0,e.getWindow)(r)}function At(t){return o.default.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Rt={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=jt,jt.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=jt.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,jt.stop(),jt.interaction&&(jt.interaction=null)},"interactions:stop":jt.stop,"interactions:action-move":function(t){return jt.onInteractionMove(t)}}},It=Rt;Ct.default=It;var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.copyAction=function(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t},Lt.sign=void 0,Lt.warnOnce=function(t,n){var r=!1;return function(){return r||(e.window.console.warn(n),r=!0),t.apply(this,arguments)}},Lt.sign=function(t){return t>=0?1:-1};var Dt={};function Nt(t){return o.default.bool(t)?(this.options.styleCursor=t,this):null===t?(delete this.options.styleCursor,this):this.options.styleCursor}function $t(t){return o.default.func(t)?(this.options.actionChecker=t,this):null===t?(delete this.options.actionChecker,this):this.options.actionChecker}Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=void 0;var Ft={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(e,n,r,i){var o=function(t,e,n,r,i){var o=t.getRect(r),a={action:null,interactable:t,interaction:n,element:r,rect:o,buttons:e.buttons||{0:1,1:4,3:8,4:16}[e.button]};return i.fire("auto-start:check",a),a.action}(this,n,r,i,t);return this.options.actionChecker?this.options.actionChecker(e,n,o,this,i,r):o},e.prototype.ignoreFrom=(0,Lt.warnOnce)((function(t){return this._backCompatOption("ignoreFrom",t)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=(0,Lt.warnOnce)((function(t){return this._backCompatOption("allowFrom",t)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=$t,e.prototype.styleCursor=Nt}};Dt.default=Ft;var Bt={};function Ut(t,e,n,r,i){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&Vt(e,n,t,i)?t:null}function zt(t,e,n,r,i,o,a){for(var s=0,u=r.length;s=s)return!1;if(h.interactable===t){if((c+=d===n.name?1:0)>=o)return!1;if(h.element===e&&(l++,d===n.name&&l>=a))return!1}}}return s>0}function Gt(t,e){return o.default.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function Yt(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function Xt(t,e){var n=t.interactable,r=t.element,i=t.prepared;if("mouse"===t.pointerType&&n&&n.options.styleCursor){var a="";if(i.name){var s=n.options[i.name].cursorChecker;a=o.default.func(s)?s(i,n,r,t._interacting):e.actions.map[i.name].getCursor(i)}Yt(t.element,a||"",e)}else e.autoStart.cursorElement&&Yt(e.autoStart.cursorElement,"",e)}Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.default=void 0;var qt={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Dt.default),n.base.actionChecker=null,n.base.styleCursor=!0,(0,C.default)(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(e){return Gt(e,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:Vt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.interacting()||Ht(n,Wt(n,r,i,o,e),e)},"interactions:move":function(t,e){!function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;"mouse"!==n.pointerType||n.pointerIsDown||n.interacting()||Ht(n,Wt(n,r,i,o,e),e)}(t,e),function(t,e){var n=t.interaction;if(n.pointerIsDown&&!n.interacting()&&n.pointerWasMoved&&n.prepared.name){e.fire("autoStart:before-start",t);var r=n.interactable,i=n.prepared.name;i&&r&&(r.options[i].manualStart||!Vt(r,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,r,n.element),Xt(n,e)))}}(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&Yt(n.element,"",e)}},maxInteractions:Gt,withinInteractionLimit:Vt,validateAction:Ut},Zt=qt;Bt.default=Zt;var Kt={};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.default=void 0;var Jt={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,i=t.dx,a=t.dy;if("drag"===n.prepared.name){var s=Math.abs(i),u=Math.abs(a),c=n.interactable.options.drag,l=c.startAxis,f=s>u?"x":s0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;te(e)>0&&(e.prepared.name=null)}},getHoldDuration:te},ne=ee;Qt.default=ne;var re={};Object.defineProperty(re,"__esModule",{value:!0}),re.default=void 0;var ie={id:"auto-start",install:function(t){t.usePlugin(Bt.default),t.usePlugin(Qt.default),t.usePlugin(Kt.default)}};re.default=ie;var oe={};function ae(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):o.default.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault}function se(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}function ue(t){var n=t.Interactable;n.prototype.preventDefault=ae,n.prototype.checkAndPreventDefault=function(n){return function(t,n,r){var i=t.options.preventDefault;if("never"!==i)if("always"!==i){if(n.events.supportsPassive&&/^touch(start|move)$/.test(r.type)){var a=(0,e.getWindow)(r.target).document,s=n.getDocOptions(a);if(!s||!s.events||!1!==s.events.passive)return}/^(mouse|pointer|touch)*(down|start)/i.test(r.type)||o.default.element(r.target)&&(0,_.matchesSelector)(r.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||r.preventDefault()}else r.preventDefault()}(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n150)return null;var e=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI;e<0&&(e+=360);var n=112.5<=e&&e<247.5,r=202.5<=e&&e<337.5;return{up:r,down:!r&&22.5<=e&&e<157.5,left:n,right:!n&&(292.5<=e||e<67.5),angle:e,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}])&&function(t,e){for(var n=0;nthis.pointerMoveTolerance);var a=this.getPointerIndex(t),s={pointer:t,pointerIndex:a,pointerInfo:this.pointers[a],event:e,type:"move",eventTarget:n,dx:r,dy:i,duplicate:o,interaction:this};o||$.setCoordVelocity(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",s),o||this.simulation||(this.interacting()&&(s.type=null,this.move(s)),this.pointerWasMoved&&$.copyCoords(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||$.setZeroCoords(this.coords.delta),(t=(0,C.default)({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,e,n,r){var i=this.getPointerIndex(t);-1===i&&(i=this.updatePointer(t,e,n,!1));var o=/cancel$/i.test(e.type)?"cancel":"up";this._scopeFire("interactions:".concat(o),{pointer:t,pointerIndex:i,pointerInfo:this.pointers[i],event:e,eventTarget:n,type:o,curEventTarget:r,interaction:this}),this.simulation||this.end(e),this.removePointer(t,e)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var e;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(e=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,!0===e&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var e=$.getPointerId(t);return"mouse"===this.pointerType||"pen"===this.pointerType?this.pointers.length-1:X.findIndex(this.pointers,(function(t){return t.id===e}))}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,e,n,r){var i=$.getPointerId(t),o=this.getPointerIndex(t),a=this.pointers[o];return r=!1!==r&&(r||/(down|start)$/i.test(e.type)),a?a.pointer=t:(a=new Re.PointerInfo(i,t,e,null,null),o=this.pointers.length,this.pointers.push(a)),$.setCoords(this.coords.cur,this.pointers.map((function(t){return t.pointer})),this._now()),$.setCoordDeltas(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=n,$.pointerExtend(this.downPointer,t),this.interacting()||($.copyCoords(this.coords.start,this.coords.cur),$.copyCoords(this.coords.prev,this.coords.cur),this.downEvent=e,this.pointerWasMoved=!1)),this._updateLatestPointer(t,e,n),this._scopeFire("interactions:update-pointer",{pointer:t,event:e,eventTarget:n,down:r,pointerInfo:a,pointerIndex:o,interaction:this}),o}},{key:"removePointer",value:function(t,e){var n=this.getPointerIndex(t);if(-1!==n){var r=this.pointers[n];this._scopeFire("interactions:remove-pointer",{pointer:t,event:e,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,e,n){this._latestPointer.pointer=t,this._latestPointer.event=e,this._latestPointer.eventTarget=n}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,e,n,r){return new Ee.InteractEvent(this,t,this.prepared.name,e,this.element,n,r)}},{key:"_fireEvent",value:function(t){var e;null==(e=this.interactable)||e.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var e=t.event,n=t.phase,r=t.preEnd,i=t.type,o=this.rect;if(o&&"move"===n&&(j.addEdges(this.edges,o,this.coords.delta[this.interactable.options.deltaSource]),o.width=o.right-o.left,o.height=o.bottom-o.top),!1===this._scopeFire("interactions:before-action-".concat(n),t))return!1;var a=t.iEvent=this._createPreparedEvent(e,n,r,i);return this._scopeFire("interactions:action-".concat(n),t),"start"===n&&(this.prevEvent=a),this._fireEvent(a),this._scopeFire("interactions:after-action-".concat(n),t),!0}},{key:"_now",value:function(){return Date.now()}}],n&&function(t,e){for(var n=0;nn.minSpeed&&i>n.endSpeed)this.startInertia();else{if(o.result=o.setAll(this.modifierArg),!o.result.changed)return!1;this.startSmoothEnd()}return e.modification.result.rect=null,e.offsetBy(this.targetOffset),e._doPhase({interaction:e,event:t,phase:"inertiastart"}),e.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),e.modification.result.rect=null,this.active=!0,e.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,e=this.interaction.coords.velocity.client,n=en(this.interaction),r=n.resistance,i=-Math.log(n.endSpeed/this.v0)/r;this.targetOffset={x:(e.x-i)/r,y:(e.y-i)/r},this.te=i,this.lambda_v0=r/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;var o=this.modification,a=this.modifierArg;a.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},o.result=o.setAll(a),o.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+o.result.delta.x,y:this.targetOffset.y+o.result.delta.y}),this.onNextFrame((function(){return t.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return t.smoothEndTick()}))}},{key:"onNextFrame",value:function(t){var e=this;this.timeout=St.default.request((function(){e.active&&t()}))}},{key:"inertiaTick",value:function(){var t,e,n,r,i,o=this,a=this.interaction,s=en(a).resistance,u=(a._now()-this.t0)/1e3;if(u=0;n--){var r=e[n],i=r.selector,a=r.context,s=r.listeners;i===this.target&&a===this._context&&e.splice(n,1);for(var u=s.length-1;u>=0;u--)this._scopeEvents.removeDelegate(this.target,this._context,t,s[u][0],s[u][1])}else this._scopeEvents.remove(this.target,"all")}}])&&function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n=0;a--){var d=f[a];if(d.selector===t&&d.context===e){for(var p=d.listeners,v=p.length-1;v>=0;v--){var g=xn(p[v],2),m=g[0],y=g[1],b=y.capture,w=y.passive;if(m===i&&b===s.capture&&w===s.passive){p.splice(v,1),p.length||(f.splice(a,1),u(e,n,c),u(e,n,l,!0)),h=!0;break}}if(h)break}}},delegateListener:c,delegateUseCapture:l,delegatedEvents:r,documents:i,targets:n,supportsOptions:!1,supportsPassive:!1};function s(t,e,r,i){var o=Sn(i),s=X.find(n,(function(e){return e.eventTarget===t}));s||(s={eventTarget:t,events:{}},n.push(s)),s.events[e]||(s.events[e]=[]),t.addEventListener&&!X.contains(s.events[e],r)&&(t.addEventListener(e,r,a.supportsOptions?o:o.capture),s.events[e].push(r))}function u(t,e,r,i){var o=Sn(i),s=X.findIndex(n,(function(e){return e.eventTarget===t})),c=n[s];if(c&&c.events)if("all"!==e){var l=!1,f=c.events[e];if(f){if("all"===r){for(var h=f.length-1;h>=0;h--)u(t,e,f[h],o);return}for(var d=0;d=2)continue;if(!i.interacting()&&e===i.pointerType)return i}return null}};function Tn(t,e){return t.pointers.some((function(t){return t.id===e}))}var Cn=On;En.default=Cn;var jn={};function Mn(t){return Mn="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},Mn(t)}function An(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Rn(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)?Rn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=0;r--){var i=e.interactions.list[r];i.interactable===n&&(i.stop(),e.fire("interactions:destroy",{interaction:i}),i.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:Fn,doOnInteractions:Nn,methodNames:Dn},Un=Bn;jn.default=Un;var zn={};function Wn(t){return Wn="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},Wn(t)}function Hn(){return Hn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Gn(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Hn.apply(this,arguments)}function Vn(t,e){return Vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vn(t,e)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Yn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xn(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);nMath.abs(c.y),u.coords,u.rect),(0,C.default)(r,u.coords)),u.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function yr(t,e,n){var r=t.startCoords,i=t.edgeSign;e?n.y=r.y+(n.x-r.x)*i.y:n.x=r.x+(n.y-r.y)*i.x}function br(t,e,n,r){var i=t.startRect,o=t.startCoords,a=t.ratio,s=t.edgeSign;if(e){var u=r.width/a;n.y=o.y+(u-i.height)*s.y}else{var c=r.height*a;n.x=o.x+(c-i.width)*s.x}}dr.aspectRatio=mr;var wr=(0,xe.makeModifier)(mr,"aspectRatio");dr.default=wr;var xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.default=void 0;var _r=function(){};_r._defaults={};var kr=_r;xr.default=kr;var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0}),Object.defineProperty(Sr,"default",{enumerable:!0,get:function(){return xr.default}});var Pr={};function Er(t,e,n){return o.default.func(t)?j.resolveRectLike(t,e.interactable,e.element,[n.x,n.y,e]):j.resolveRectLike(t,e.interactable,e.element)}Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=void 0,Pr.getRestrictionRect=Er,Pr.restrict=void 0;var Or={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,i=t.interaction,o=t.pageCoords,a=r.options,s=a.elementRect,u=(0,C.default)({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&s){var c=Er(a.restriction,i,o);if(c){var l=c.right-c.left-e.width,f=c.bottom-c.top-e.height;l<0&&(u.left+=l,u.right+=l),f<0&&(u.top+=f,u.bottom+=f)}u.left+=n.left-e.width*s.left,u.top+=n.top-e.height*s.top,u.right+=n.right-e.width*(1-s.right),u.bottom+=n.bottom-e.height*(1-s.bottom)}r.offset=u},set:function(t){var e=t.coords,n=t.interaction,r=t.state,i=r.options,o=r.offset,a=Er(i.restriction,n,e);if(a){var s=j.xywhToTlbr(a);e.x=Math.max(Math.min(s.right-o.right,e.x),s.left+o.left),e.y=Math.max(Math.min(s.bottom-o.bottom,e.y),s.top+o.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};Pr.restrict=Or;var Tr=(0,xe.makeModifier)(Or,"restrict");Pr.default=Tr;var Cr={};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.restrictEdges=Cr.default=void 0;var jr={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Mr={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Ar(t,e){for(var n=["top","left","bottom","right"],r=0;rt.length)&&(e=t.length);for(var n=0,r=Array(e);n"),Y="div",X=0,q={};function Z(n,r,i){var o=e.createElement(n);return r&&(o.id=$+r),i&&(o.style.cssText=i),t(o)}function K(){return n.innerHeight?n.innerHeight:t(n).height()}function J(e,n){n!==Object(n)&&(n={}),this.cache={},this.el=e,this.value=function(e){var r;return void 0===this.cache[e]&&(void 0!==(r=t(this.el).attr("data-cbox-"+e))?this.cache[e]=r:void 0!==n[e]?this.cache[e]=n[e]:void 0!==D[e]&&(this.cache[e]=D[e])),this.cache[e]},this.get=function(e){var n=this.value(e);return t.isFunction(n)?n.call(this.el,this):n}}function Q(t){var e=f.length,n=(T+t)%e;return n<0?e+n:n}function tt(t,e){return Math.round((/%/.test(t)?("x"===e?h.width():K())/100:1)*parseInt(t,10))}function et(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function nt(t,e){return t.get("retinaUrl")&&n.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function rt(t){"contains"in i[0]&&!i[0].contains(t.target)&&t.target!==r[0]&&(t.stopPropagation(),i.focus())}function it(t){it.str!==t&&(i.add(r).removeClass(it.str).addClass(t),it.str=t)}function ot(n){t(e).trigger(n),G.triggerHandler(n)}var at=function(){var t,e,n=$+"Slideshow_",r="click."+$;function o(){clearTimeout(e)}function a(){(k.get("loop")||f[T+1])&&(o(),e=setTimeout(I.next,k.get("slideshowSpeed")))}function s(){y.html(k.get("slideshowStop")).unbind(r).one(r,u),G.bind(z,a).bind(U,o),i.removeClass(n+"off").addClass(n+"on")}function u(){o(),G.unbind(z,a).unbind(U,o),y.html(k.get("slideshowStart")).unbind(r).one(r,(function(){I.next(),s()})),i.removeClass(n+"on").addClass(n+"off")}function c(){t=!1,y.hide(),o(),G.unbind(z,a).unbind(U,o),i.removeClass(n+"off "+n+"on")}return function(){t?k.get("slideshow")||(G.unbind(W,c),c()):k.get("slideshow")&&f[1]&&(t=!0,G.one(W,c),k.get("slideshowAuto")?s():u(),y.show())}}();function st(o){var h,m;if(!A){if(h=t(o).data(N),k=new J(o,h),m=k.get("rel"),T=0,m&&!1!==m&&"nofollow"!==m?(f=t("."+F).filter((function(){return new J(this,t.data(this,N)).get("rel")===m})),-1===(T=f.index(k.el))&&(f=f.add(k.el),T=f.length-1)):f=t(k.el),!j){j=M=!0,it(k.get("className")),i.css({visibility:"hidden",display:"block",opacity:""}),d=Z(Y,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),a.css({width:"",height:""}).append(d),S=s.height()+l.height()+a.outerHeight(!0)-a.height(),P=u.width()+c.width()+a.outerWidth(!0)-a.width(),E=d.outerHeight(!0),O=d.outerWidth(!0);var y=tt(k.get("initialWidth"),"x"),b=tt(k.get("initialHeight"),"y"),w=k.get("maxWidth"),L=k.get("maxHeight");k.w=Math.max((!1!==w?Math.min(y,tt(w,"x")):y)-O-P,0),k.h=Math.max((!1!==L?Math.min(b,tt(L,"y")):b)-E-S,0),d.css({width:"",height:k.h}),I.position(),ot(B),k.get("onOpen"),_.add(g).hide(),i.focus(),k.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",rt,!0),G.one(H,(function(){e.removeEventListener("focus",rt,!0)}))),k.get("returnFocus")&&G.one(H,(function(){t(k.el).focus()}))}var D=parseFloat(k.get("opacity"));r.css({opacity:D==D?D:"",cursor:k.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),k.get("closeButton")?x.html(k.get("close")).appendTo(a):x.appendTo("
"),function(){var e,r,i,o=I.prep,a=++X;if(M=!0,C=!1,ot(V),ot(U),k.get("onLoad"),k.h=k.get("height")?tt(k.get("height"),"y")-E-S:k.get("innerHeight")&&tt(k.get("innerHeight"),"y"),k.w=k.get("width")?tt(k.get("width"),"x")-O-P:k.get("innerWidth")&&tt(k.get("innerWidth"),"x"),k.mw=k.w,k.mh=k.h,k.get("maxWidth")&&(k.mw=tt(k.get("maxWidth"),"x")-O-P,k.mw=k.w&&k.w").hide().insertBefore(s),G.one(V,(function(){i.replaceWith(s)})),o(s)}else k.get("iframe")?o(" "):k.get("html")?o(k.get("html")):et(k,e)?(e=nt(k,e),C=k.get("createImg"),t(C).addClass($+"Photo").bind("error."+$,(function(){o(Z(Y,"Error").html(k.get("imgError")))})).one("load",(function(){a===X&&setTimeout((function(){var e;k.get("retinaImage")&&n.devicePixelRatio>1&&(C.height=C.height/n.devicePixelRatio,C.width=C.width/n.devicePixelRatio),k.get("scalePhotos")&&(r=function(){C.height-=C.height*e,C.width-=C.width*e},k.mw&&C.width>k.mw&&(e=(C.width-k.mw)/C.width,r()),k.mh&&C.height>k.mh&&(e=(C.height-k.mh)/C.height,r())),k.h&&(C.style.marginTop=Math.max(k.mh-C.height,0)/2+"px"),f[1]&&(k.get("loop")||f[T+1])&&(C.style.cursor="pointer",t(C).bind("click."+$,(function(){I.next()}))),C.style.width=C.width+"px",C.style.height=C.height+"px",o(C)}),1)})),C.src=e):e&&p.load(e,k.get("data"),(function(e,n){a===X&&o("error"===n?Z(Y,"Error").html(k.get("xhrError")):t(this).contents())}))}()}}function ut(){i||(L=!1,h=t(n),i=Z(Y).attr({id:N,class:!1===t.support.opacity?$+"IE":"",role:"dialog",tabindex:"-1"}).hide(),r=Z(Y,"Overlay").hide(),v=t([Z(Y,"LoadingOverlay")[0],Z(Y,"LoadingGraphic")[0]]),o=Z(Y,"Wrapper"),a=Z(Y,"Content").append(g=Z(Y,"Title"),m=Z(Y,"Current"),w=t('\n "):""}},{key:"_renderControls",value:function(){var t=this;return["bookLeft","bookRight","onePage","twoPage","thumbnail","viewmode","zoomOut","zoomIn","fullScreen"].map((function(e){return t.controlFor(e)})).join("")}},{key:"_bindViewModeButton",value:function(){var t=this,r=this.br,i=r.options.controls.viewmode,o=[{mode:r.constMode1up,className:"onepg",title:"One-page view"},{mode:r.constMode2up,className:"twopg",title:"Two-page view"},{mode:r.constModeThumb,className:"thumb",title:"Thumbnail view"}].filter((function(t){return!i.excludedModes.includes(t.mode)})),a=o.map((function(t){return t.mode}));i.excludedModes.includes(r.mode)&&r.switchMode(a[0]);for(var s=a.indexOf(r.mode),u=0;u<=s;u++)a.push(a.shift());o.length<2&&this.$nav.find(".".concat(i.className)).remove(),this.br.bind(e.PostInit,(function(){var e=t.$nav.find(".".concat(i.className)).off(".bindNavigationHandlers").on("click",(function(e){var i=a.shift(),s=o.find((function(t){return t.mode===i})),u=o.find((function(t){return t.mode===a[0]}));a.push(i),r.viewModeOrder=a,t.updateViewModeButton(n(e.currentTarget),u.className,u.title),r.switchMode(s.mode)})),s=o.find((function(t){return t.mode===a[0]}));t.updateViewModeButton(e,s.className,s.title)}))}},{key:"updateViewModeButton",value:function(t,e,n){t.attr("title",n).find(".icon").removeClass().addClass("icon icon-".concat(e)).end().find(".BRtooltip").text(n)}},{key:"switchNavbarControls",value:function(){"linerNotes"!==this.br.options.bookType&&(this.br.refs.$brContainer.prop("clientWidth")<640?this.showMinimumNavbarControls():this.showMaximumNavbarControls())}},{key:"showMinimumNavbarControls",value:function(){this.minimumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.remove("hide")})),this.maximumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.add("hide")}))}},{key:"showMaximumNavbarControls",value:function(){this.maximumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.remove("hide")})),this.minimumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.add("hide")}))}},{key:"init",value:function(){var t=this,e=this.br,r=e.options.navbarTitle,i="rl"===e.pageProgression,o=i?"book_flip_next":"book_flip_prev",a=i?"book_flip_prev":"book_flip_next";this.br.options.controls.bookLeft.className="book_left ".concat(o),this.br.options.controls.bookRight.className="book_right ".concat(a),e.refs.$BRfooter=this.$root=n('
'),e.refs.$BRnav=this.$nav=n('
\n '.concat(r?'
'.concat(r,"
"):"",'\n \n
")),this.$root.append(this.$nav),e.refs.$br.append(this.$root);var s=this.$root.find(".BRpager").slider({animate:!0,min:0,max:e.book.getNumLeafs()-1,value:e.currentIndex(),range:"min"});return s.on("slide",(function(e,n){return t.updateNavPageNum(n.value),!0})),s.on("slidechange",(function(n,r){return t.updateNavPageNum(r.value),s.data("swallowchange")?s.data("swallowchange",!1):e.jumpToIndex(r.value),!0})),e.options.controls.viewmode.visible&&this._bindViewModeButton(),this.updateNavPageNum(e.currentIndex()),this.$nav}},{key:"getNavPageNumString",value:function(t){var e=this.br,n=e.book.getPageNum(t),r=(e.book.getPageProp(t,"pageType"),e.book.getNumLeafs());if(!this.maxPageNum){for(var i,o=0,a=0;ao&&(o=i);this.maxPageNum=o}return function(t,e,n,r,i){if("n"==n[0])return"(".concat(t+1," of ").concat(e,")");var o=i&&parseFloat(n)?" of ".concat(i):"";return"".concat(n).concat(o)}(t,r,n,0,this.maxPageNum)}},{key:"updateNavPageNum",value:function(t){this.$root.find(".BRcurrentpage").html(this.getNavPageNumString(t))}},{key:"updateNavIndex",value:function(t){t=void 0!==t?t:this.br.currentIndex(),this.$root.find(".BRpager").data("swallowchange",!0).slider("value",t)}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}();function u(t){return u="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},u(t)}function c(t){var e="function"==typeof Map?new Map:void 0;return c=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(l())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&f(i,n.prototype),i}(t,arguments,h(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,t)},c(t)}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}r(6033),r(825);var d={defaults:null,padding:10,ui:"full",uiAutoHide:!1,thumbRowBuffer:1,thumbColumns:6,thumbMaxLoading:4,thumbPadding:10,thumbMinZoomColumns:2,thumbMaxZoomColumns:8,flipSpeed:400,showToolbar:!0,showNavbar:!0,navBarTitle:"",showLogo:!0,logoURL:"https://archive.org",imagesBaseURL:"/BookReader/images/",reduceSet:"pow2",reductionFactors:[{reduce:.25,autofit:null},{reduce:.5,autofit:null},{reduce:1,autofit:null},{reduce:2,autofit:null},{reduce:3,autofit:null},{reduce:4,autofit:null},{reduce:6,autofit:null}],onePage:{autofit:"auto"},twoPage:{coverInternalPadding:0,coverExternalPadding:0,bookSpineDivWidth:64,autofit:"auto"},onePageMinBreakpoint:800,bookTitle:"",bookUrl:null,bookUrlText:null,bookUrlTitle:null,enableBookTitleLink:!0,bookLanguage:null,metadata:[],thumbnail:null,bookUrlMoreInfo:null,enableExperimentalControls:!1,el:"#BookReader",pageProgression:"lr",ppi:500,protected:!1,plugins:{textSelection:null},vars:{},data:[],table_of_contents:null,getNumLeafs:null,getPageWidth:null,getPageHeight:null,getPageURI:null,getPageSide:null,getSpreadIndices:null,getPageNum:null,getPageProp:null,leafNumToIndex:null,getEmbedCode:null,controls:{bookLeft:{visible:!0,label:"Flip left",className:"book_left",iconClassName:"left-arrow"},bookRight:{visible:!0,label:"Flip right",className:"book_right",iconClassName:"left-arrow hflip"},onePage:{visible:!0,label:"One-page view",className:"onepg",iconClassName:"onepg"},twoPage:{visible:!0,label:"Two-page view",className:"twopg",iconClassName:"twopg"},thumbnail:{visible:!0,label:"Thumbnail view",className:"thumb",iconClassName:"thumb"},viewmode:{visible:!0,className:"viewmode",excludedModes:[]},zoomOut:{visible:!0,label:"Zoom out",className:"zoom_out",iconClassName:"magnify"},zoomIn:{visible:!0,label:"Zoom in",className:"zoom_in",iconClassName:"magnify plus"},fullScreen:{visible:!0,label:"Toggle fullscreen",className:"full",iconClassName:"fullscreen"}},startFullscreen:!1,enableFSLogoShortcut:!1,autoResize:!0,useSrcSet:!1,unviewablePageURI:"./unviewable_page.png"},p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,r=arguments,n=h(n=e),function(t,e){if(e&&("object"==u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(n,r||[],h(t).constructor):n.apply(t,r));var t,n,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(c(Error)),v=(r(5440),r(4638),r(1669));function g(t){return g="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},g(t)}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n\n
\n '):"";t.refs.$BRtoolbar=v('\n
\n
\n
\n '.concat(e,'\n \n
\n
\n \n \n \n \n
\n
\n
'));var n=t.refs.$BRtoolbar.find(".BRtoolbarSectionTitle");return t.bookUrl&&t.options.enableBookTitleLink?n.append(v("").attr({href:t.bookUrl,title:t.bookUrlTitle}).addClass("BRreturn").html(t.bookUrlText||t.bookTitle)):t.bookTitle&&n.append(t.bookUrlText||t.bookTitle),t.refs.$BRtoolbar}},{key:"initToolbar",value:function(t,n){var r=this.br;r.refs.$br.append(this.buildToolbarElement()),r.$(".BRnavCntl").addClass("BRup"),r.$(".pause").hide(),r.refs.$BRtoolbar.append(),r.canSwitchToMode(r.constMode2up)||r.$(".two_page_mode, .play, .pause").hide(),r.canSwitchToMode(r.constModeThumb)||r.$(".thumbnail_mode").hide(),r.canSwitchToMode(r.constMode2up)||r.canSwitchToMode(r.constModeThumb)||r.$(".one_page_mode").hide(),v('
').append(v('\n
\n
\n Share\n \n
\n
')).append(v('\n
')).appendTo(r.refs.$br),r.$(".BRinfo .BRfloatTitle a").attr({href:r.bookUrl}).text(r.bookTitle).addClass("title"),this.buildInfoDiv(r.$(".BRinfo")),this.buildShareDiv(r.$(".BRshare")),r.$(".share").colorbox({inline:!0,opacity:"0.5",href:r.$(".BRshare"),onLoad:function(){r.trigger(e.stop),r.$(".BRpageviewValue").val(window.location.href)}}),r.$(".info").colorbox({inline:!0,opacity:"0.5",href:r.$(".BRinfo"),onLoad:function(){r.trigger(e.stop)}})}},{key:"buildShareDiv",value:function(t){var e=this,n=this.br,r=document.location+"",i=(r+"").replace(/#.*/,""),o=n.getEmbedCode?'\n '):"",a=v('\n \n