@internetarchive/bookreader 5.0.0-102 → 5.0.0-103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/BookReader/BookReader.js +1 -1
  2. package/BookReader/BookReader.js.map +1 -1
  3. package/BookReader/ia-bookreader-bundle.js +141 -102
  4. package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +6 -0
  5. package/BookReader/ia-bookreader-bundle.js.map +1 -1
  6. package/BookReader/plugins/plugin.chapters.js +1 -1
  7. package/BookReader/plugins/plugin.chapters.js.map +1 -1
  8. package/BookReader/plugins/plugin.experiments.js +1 -1
  9. package/BookReader/plugins/plugin.experiments.js.map +1 -1
  10. package/BookReader/plugins/plugin.search.js +1 -1
  11. package/BookReader/plugins/plugin.search.js.map +1 -1
  12. package/BookReader/plugins/plugin.text_selection.js +1 -1
  13. package/BookReader/plugins/plugin.text_selection.js.map +1 -1
  14. package/BookReader/plugins/plugin.translate.js +2 -2
  15. package/BookReader/plugins/plugin.translate.js.map +1 -1
  16. package/BookReader/plugins/plugin.tts.js +1 -1
  17. package/BookReader/plugins/plugin.tts.js.map +1 -1
  18. package/package.json +2 -2
  19. package/src/BookNavigator/assets/button-base.js +0 -1
  20. package/src/BookNavigator/bookmarks/bookmarks-provider.js +1 -1
  21. package/src/BookNavigator/downloads/downloads-provider.js +1 -1
  22. package/src/BookNavigator/search/search-provider.js +5 -1
  23. package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +1 -1
  24. package/src/BookReader/Navbar/Navbar.js +10 -5
  25. package/src/plugins/plugin.chapters.js +1 -1
  26. package/src/plugins/plugin.experiments.js +1 -1
  27. package/src/plugins/translate/TranslationManager.js +6 -4
  28. package/src/plugins/tts/utils.js +43 -17
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see plugin.text_selection.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[326],{296:function(e,t,n){n(2675),n(9463),n(2259),n(5700),n(8706),n(2008),n(113),n(3418),n(3792),n(8598),n(2062),n(4782),n(6910),n(9572),n(2010),n(6033),n(8130),n(9085),n(875),n(6099),n(8459),n(3362),n(825),n(7495),n(8781),n(9449),n(7764),n(2762),n(2953);var r=n(4907),a=n(1041),o=n(9073),i=n(4565),l=n(4160),u=n(593),s=n(1669);function c(e){return c="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},c(e)}var f=b().m(N),h=b().m(_),d=b().m(M);function p(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(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 y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=m(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,a=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||m(e,t)||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 m(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return k(s,"_invoke",function(n,r,a){var o,l,u,s=0,c=a||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return o=t,l=0,u=e,h.n=n,i}};function d(n,r){for(l=n,u=r,t=0;!f&&s&&!a&&t<c.length;t++){var a,o=c[t],d=h.p,p=o[2];n>3?(a=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=d&&((a=n<2&&d<o[1])?(l=0,h.v=r,h.n=o[1]):d<p&&(a=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,l=0))}if(a||n>1)return i;throw f=!0,r}return function(a,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(t=l<2?e:u)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,u)):h.n=u:h.v=u);try{if(s=2,o){if(l||(a="next"),t=o[a]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==i)break}catch(t){o=e,l=1,u=t}finally{s=1}}return{value:t,done:f}}}(n,a,o),!0),s}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(k(t={},r,function(){return this}),t),f=s.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,k(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=s,k(f,"constructor",s),k(s,"constructor",u),u.displayName="GeneratorFunction",k(s,a,"GeneratorFunction"),k(f),k(f,a,"Generator"),k(f,r,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(b=function(){return{w:o,m:h}})()}function k(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}k=function(e,t,n,r){function o(t,n){k(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},k(e,t,n,r)}function w(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function S(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){w(o,r,a,i,l,"next",e)}function l(e){w(o,r,a,i,l,"throw",e)}i(void 0)})}}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,T(r.key),r)}}function P(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function A(e,t,n){return(t=T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var R=window.BookReader,B=function(e){function t(e){var n,r,a,o;return j(this,t),A((r=this,o=[e],a=E(a=t),n=function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,C()?Reflect.construct(a,o||[],E(r).constructor):a.apply(r,o))),"options",{enabled:!0,fullDjvuXmlUrl:null,singlePageDjvuXmlUrl:null,jsonp:!1,maxProtectedWords:200}),A(n,"djvuPagesPromise",null),A(n,"pageTextCache",new i.l),A(n,"maxWordRendered",2500),n.rtl="rl"===n.br.pageProgression,n.textSelectionManager=new u.bg(".BRtextLayer",n.br,{selectionElement:[".BRwordElement",".BRspace"]},n.options.maxProtectedWords),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(t,e),P(t,[{key:"init",value:function(){this.options.enabled&&(this.loadData(),this.textSelectionManager.init())}},{key:"_configurePageContainer",value:function(e){return this.br.mode!==this.br.constModeThumb&&e.page&&this.createTextLayer(e),e}},{key:"loadData",value:function(){this.options.singlePageDjvuXmlUrl||(this.djvuPagesPromise=s.ajax({type:"GET",url:(0,o.g)(this.options.fullDjvuXmlUrl,this.br.options.vars),dataType:this.options.jsonp?"jsonp":"html",cache:!0,xhrFields:{withCredentials:this.br.protected},error:function(e){}}).then(function(e){try{var t=s.parseXML(e);return t&&s(t).find("OBJECT")}catch(e){return}}))}},{key:"getPageText",value:(a=S(b().m(function e(t){var n,r,a,i,l;return b().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!this.options.singlePageDjvuXmlUrl){e.n=5;break}if(!(n=this.pageTextCache.entries.find(function(e){return e.index==t}))){e.n=1;break}return e.a(2,n.response);case 1:return e.n=2,s.ajax({type:"GET",url:(0,o.g)(this.options.singlePageDjvuXmlUrl,this.br.options.vars,{pageIndex:t}),dataType:this.options.jsonp?"jsonp":"html",cache:!0,xhrFields:{withCredentials:this.br.protected},error:function(e){}});case 2:return r=e.v,e.p=3,a=s.parseXML(r),i=a&&s(a).find("OBJECT")[0],this.pageTextCache.add({index:t,response:i}),e.a(2,i);case 4:return e.p=4,e.v,e.a(2,void 0);case 5:return e.n=6,this.djvuPagesPromise;case 6:if(!(l=e.v)){e.n=7;break}return e.a(2,l[t]);case 7:return e.a(2)}},e,this,[[3,4]])})),function(e){return a.apply(this,arguments)})},{key:"createTextLayer",value:(n=S(b().m(function e(t){var n,a,o,i,u,c,f,h,d,p,m,g,k,w,S,j,x,P,C,E,O,A,T,R,B,I=this;return b().w(function(e){for(;;)switch(e.n){case 0:if(n=t.page.index,!(a=t.$container).find(".BRtextLayer").length){e.n=1;break}return e.a(2);case 1:return e.n=2,this.getPageText(n);case 2:if(o=e.v){e.n=3;break}return e.a(2);case 3:if(s(o).find("WORD").filter(function(e,t){var n=v(t.getAttribute("coords").split(",").map(parseFloat),4),r=n[0],a=n[3];if(0==r&&0==a)return console.error("Found invalid ocr word coordinates"),!0}).remove(),L(o),!((i=s(o).find("WORD").length)>this.maxWordRendered)){e.n=4;break}return console.log("Page ".concat(n," has too many words (").concat(i," > ").concat(this.maxWordRendered,"). Not rendering text layer.")),e.a(2);case 4:return u=(0,r.Ql)(t.page,"BRtextLayer"),e.n=5,Promise.resolve();case 5:c=parseFloat(t.$container[0].style.width)/t.page.width,f=parseFloat(t.$container[0].style.height)/t.page.height,u.style.transform="scale(".concat(c,", ").concat(f,")"),(h=(0,l.YH)(this.br.options.bookLanguage))&&u.setAttribute("lang",h),u.setAttribute("dir",this.rtl?"rtl":"ltr"),d=s(o).find("PARAGRAPH[coords]").toArray(),p=d.map(function(e){var t=I.renderParagraph(e);return u.appendChild(t),t}),m=z(u,".BRparagraphElement"),g=0,k=y(M(d,p));try{for(k.s();!(w=k.n()).done;)S=v(w.value,2),j=S[0],x=S[1],P=s(j).attr("coords").split(",").map(parseFloat),C=m.get(x),E=v(P,4),O=E[0],A=E[2],T=E[3],R=this.rtl?C.right-A:O-C.left,B=T-(C.top+g),x.style[this.rtl?"marginRight":"marginLeft"]="".concat(R,"px"),x.style.marginTop="".concat(B,"px"),g+=B,u.appendChild(x)}catch(e){k.e(e)}finally{k.f()}a.append(u),this.textSelectionManager.stopPageFlip(a),this.br.trigger("textLayerRendered",{pageIndex:n,pageContainer:t});case 6:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"renderParagraph",value:function(e){var t=document.createElement("p");t.classList.add("BRparagraphElement"),e.getAttribute("x-role")&&(t.classList.add("ocr-role-header-footer"),t.ariaHidden="true");var n=v(s(e).attr("coords").split(",").map(parseFloat),4),r=n[0],a=n[1],o=n[2],i=n[3],l=[],u=s(e).find("LINE[coords]").toArray();if(!u.length)return t;var c,f=y(_(N(u,I)));try{for(f.s();!(c=f.n()).done;){var h=v(c.value,3),d=h[0],m=h[1],g=h[2],b=m.ocrElement==u[u.length-1],k=document.createElement("span");k.classList.add("BRlineElement");var w,S=y(m.words.entries());try{for(S.s();!(w=S.n()).done;){var j=v(w.value,2),x=j[0],P=j[1],C=v(s(P).attr("coords").split(",").map(parseFloat),4),E=C[1],O=C[2],A=C[3],T=E-A;if(l.push(T),0==x&&null!=d&&d.lastWord.textContent.trim().endsWith("-")){var R=v(s((g||d).firstWord).attr("coords").split(",").map(parseFloat),3)[0];s(P).attr("coords","".concat(R,",").concat(E,",").concat(O,",").concat(A))}var B=document.createElement("span");if(B.setAttribute("class","BRwordElement"),B.textContent=P.textContent.trim(),x>0){var L=document.createElement("span");L.classList.add("BRspace"),L.textContent=" ",k.append(L),k.appendChild(document.createTextNode(" "))}k.appendChild(B)}}catch(e){S.e(e)}finally{S.f()}var D=m.lastWord.textContent.trim().endsWith("-"),F=k.children[k.children.length-1];D&&!b&&(F.textContent=F.textContent.trim().slice(0,-1),F.classList.add("BRwordElement--hyphen")),t.appendChild(k),b||D||t.appendChild(document.createTextNode(" "))}}catch(e){f.e(e)}finally{f.f()}l.sort(function(e,t){return e-t});var G=l[Math.floor(.85*l.length)]+4;t.style.left="".concat(r,"px"),t.style.top="".concat(i,"px"),t.style.width="".concat(o-r,"px"),t.style.height="".concat(a-i,"px"),t.style.fontSize="".concat(G,"px");var W,K=z(t,".BRwordElement"),H=y(M(s(e).find("WORD").toArray(),t.querySelectorAll(".BRwordElement")));try{for(H.s();!(W=H.n()).done;){var U=v(W.value,2),q=U[0],X=U[1],$=K.get(X),V=v(s(q).attr("coords").split(",").map(parseFloat),3),J=V[0],Y=V[2]-J;q.textContent.endsWith(" ")&&(Y=Y*(q.textContent.length-1)/q.textContent.length);var Z=Y-$.width;X.style.letterSpacing="".concat(Z/(q.textContent.length-1),"px")}}catch(e){H.e(e)}finally{H.f()}K=z(t,".BRwordElement");var Q,ee=z(t,".BRspace"),te=s(e).find("LINE[coords]").toArray(),ne=Array.from(t.querySelectorAll(".BRlineElement")),re=i,ae=y(M(te,ne));try{for(ae.s();!(Q=ae.n()).done;){var oe,ie=v(Q.value,2),le=ie[0],ue=ie[1],se=s(le).find("WORD").toArray(),ce=this.rtl?o:r,fe=y(M(se,ue.querySelectorAll(".BRwordElement")));try{for(fe.s();!(oe=fe.n()).done;){var he=v(oe.value,2),de=he[0],pe=he[1],ye=K.get(pe),ve=v(s(de).attr("coords").split(",").map(parseFloat),3),me=ve[0],ge=ve[2],be=this.rtl?-(ge-ce):me-ce;if(pe.previousElementSibling){var ke=pe.previousElementSibling;ke.style.letterSpacing="".concat(be-ee.get(ke).width,"px")}else pe.style[this.rtl?"paddingRight":"paddingLeft"]="".concat(be,"px");this.rtl?ce-=be+ye.width:ce+=be+ye.width}}catch(e){fe.e(e)}finally{fe.f()}var we=Math.min.apply(Math,p(se.map(function(e){return parseFloat(s(e).attr("coords").split(",")[3])})))-re;ue.previousElementSibling&&(ue.previousElementSibling.style.lineHeight="".concat(we,"px"),re+=we)}}catch(e){ae.e(e)}finally{ae.f()}return ne[ne.length-1].style.lineHeight="".concat(a-re,"px"),t.appendChild(document.createElement("br")),t}}]);var n,a}(a.S);function z(e,t){var n={position:e.style.position,visibility:e.style.visibility,top:e.style.top,left:e.style.left,transform:e.style.transform};e.style.position="absolute",e.style.visibility="hidden",e.style.top="0",e.style.left="0",e.style.transform="none",document.body.appendChild(e);var r=new Map(Array.from(e.querySelectorAll(t)).map(function(e){var t=e.getBoundingClientRect();return[e,new D(t.left+window.scrollX,t.top+window.scrollY,t.width,t.height)]}));return document.body.removeChild(e),Object.assign(e.style,n),r}function I(e){var t=s(e).find("WORD").toArray();return{ocrElement:e,words:t,firstWord:t[0],lastWord:t[t.length-1]}}function N(e,t){var n,r,a,o;return b().w(function(i){for(;;)switch(i.p=i.n){case 0:n=y(e),i.p=1,n.s();case 2:if((r=n.n()).done){i.n=4;break}return a=r.value,i.n=3,t(a);case 3:i.n=2;break;case 4:i.n=6;break;case 5:i.p=5,o=i.v,n.e(o);case 6:return i.p=6,n.f(),i.f(6);case 7:return i.a(2)}},f,null,[[1,5,6,7]])}function _(e){var t,n,r,a,o,i,l;return b().w(function(u){for(;;)switch(u.p=u.n){case 0:t=void 0,n=void 0,r=void 0,a=y(e),u.p=1,a.s();case 2:if((o=a.n()).done){u.n=5;break}if(i=o.value,void 0===n){u.n=3;break}return r=i,u.n=3,[t,n,r];case 3:t=n,n=i,r=void 0;case 4:u.n=2;break;case 5:u.n=7;break;case 6:u.p=6,l=u.v,a.e(l);case 7:return u.p=7,a.f(),u.f(7);case 8:if(void 0===n){u.n=9;break}return u.n=9,[t,n,r];case 9:return u.a(2)}},h,null,[[1,6,7,8]])}function M(e,t){var n,r,a,o;return b().w(function(i){for(;;)switch(i.n){case 0:n=e[Symbol.iterator](),r=t[Symbol.iterator]();case 1:if(a=n.next(),o=r.next(),!a.done||!o.done){i.n=2;break}return i.a(2);case 2:if(!a.done&&!o.done){i.n=3;break}throw new Error("zip: one of the iterators is done");case 3:return i.n=4,[a.value,o.value];case 4:i.n=1;break;case 5:return i.a(2)}},d)}function L(e){if(!s(e).attr("coords")&&e.children){var t=s(e).children().toArray();if(0!==t.length){var n,r=y(t);try{for(r.s();!(n=r.n()).done;)L(n.value)}catch(e){r.e(e)}finally{r.f()}var a,o=[],i=y(t);try{for(i.s();!(a=i.n()).done;){var l=a.value;s(l).attr("coords")&&o.push(s(l).attr("coords").split(",").map(parseFloat))}}catch(e){i.e(e)}finally{i.f()}var u=function(e){var t,n=1/0,r=-1/0,a=-1/0,o=1/0,i=y(e);try{for(i.s();!(t=i.n()).done;){var l=v(t.value,4),u=l[0],s=l[1],c=l[2],f=l[3];n=Math.min(n,u),r=Math.max(r,s),a=Math.max(a,c),o=Math.min(o,f)}}catch(e){i.e(e)}finally{i.f()}return[n,r,a,o]}(o);Math.abs(u[0])!=1/0&&s(e).attr("coords",u.join(","))}}}null==R||R.registerPlugin("textSelection",B);var D=function(){return P(function e(t,n,r,a){j(this,e),this.x=t,this.y=n,this.width=r,this.height=a},[{key:"right",get:function(){return this.x+this.width}},{key:"bottom",get:function(){return this.y+this.height}},{key:"top",get:function(){return this.y}},{key:"left",get:function(){return this.x}}])}()},593:function(e,t,n){n.d(t,{bg:function(){return w}}),n(2675),n(9463),n(2259),n(5700),n(113),n(3418),n(3792),n(8598),n(4782),n(9572),n(2010),n(8130),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(5440),n(2953);var r=n(1669);function a(e){return a="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},a(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var u=function(){return e=function e(t,n){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"selecting",!1),i(this,"startedInSelector",!1),i(this,"target",null),i(this,"_onSelectionChange",function(){var e=window.getSelection();if(!a.selecting&&e.toString()){var t=r(e.anchorNode).closest(a.selector)[0];if(!t)return;a.target=t,a.selecting=!0,a.handler("started",a.target)}!a.selecting||!e.isCollapsed&&e.toString()&&r(e.anchorNode).closest(a.selector)[0]||(a.selecting=!1,a.handler("cleared",a.target))}),this.selector=t,this.handler=n},(t=[{key:"attach",value:function(){document.addEventListener("selectionchange",this._onSelectionChange)}},{key:"detach",value:function(){document.removeEventListener("selectionchange",this._onSelectionChange)}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),s=n(1669);function c(e){return c="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},c(e)}function f(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(c(e)+" is not iterable")}function h(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return d(s,"_invoke",function(n,r,a){var o,l,u,s=0,c=a||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return o=t,l=0,u=e,h.n=n,i}};function d(n,r){for(l=n,u=r,t=0;!f&&s&&!a&&t<c.length;t++){var a,o=c[t],d=h.p,p=o[2];n>3?(a=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=d&&((a=n<2&&d<o[1])?(l=0,h.v=r,h.n=o[1]):d<p&&(a=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,l=0))}if(a||n>1)return i;throw f=!0,r}return function(a,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(t=l<2?e:u)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,u)):h.n=u:h.v=u);try{if(s=2,o){if(l||(a="next"),t=o[a]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==i)break}catch(t){o=e,l=1,u=t}finally{s=1}}return{value:t,done:f}}}(n,a,o),!0),s}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(d(t={},r,function(){return this}),t),f=s.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,d(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=s,d(f,"constructor",s),d(s,"constructor",u),u.displayName="GeneratorFunction",d(s,a,"GeneratorFunction"),d(f),d(f,a,"Generator"),d(f,r,function(){return this}),d(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:o,m:p}})()}function d(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}d=function(e,t,n,r){function o(t,n){d(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},d(e,t,n,r)}var p=h().m(S),y=h().m(j);function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function b(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var w=function(){return e=function e(t,n,r,a){var o=this,i=r.selectionElement;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),b(this,"options",{maxProtectedWords:200}),b(this,"_onSelectionChange",function(e,t){if("started"===e)o.textSelectingMode(t);else{if("cleared"!==e)throw new Error("Unknown type ".concat(e));o.defaultMode(t)}}),b(this,"_limitSelection",function(){var e=window.getSelection();if(e.rangeCount){var t=e.getRangeAt(0),n=!!t.startContainer.parentElement.closest(".BRcontainer"),r=!!t.endContainer.parentElement.closest(".BRcontainer");if(n||r)if(n&&r){var a=function(e,t){var n,r=0,a=v(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(r==t)return o;r++}}catch(e){a.e(e)}finally{a.f()}}(S(j(t.startContainer,t.endContainer),function(e){var t;return null===(t=e.classList)||void 0===t?void 0:t.contains(o.selectionElement[0].replace(".",""))}),o.options.maxProtectedWords-1);if(a&&t.endContainer.parentNode!=a){var i=document.createRange();i.setStart(t.startContainer,t.startOffset),i.setEnd(a.firstChild,a.textContent.length),e.removeAllRanges(),e.addRange(i)}}else e.removeAllRanges()}}),this.layer=t,this.br=n,this.selectionElement=i,this.selectionObserver=new u(this.layer,this._onSelectionChange),this.options.maxProtectedWords=a||200},t=[{key:"init",value:function(){var e=this;this.attach(),new u(this.layer,function(t){var n;"started"==t&&(null===(n=e.br.plugins.archiveAnalytics)||void 0===n||n.sendEvent("BookReader","SelectStart"),e.br.refs.$br.find(".BRpagecontainer--hasSelection").removeClass("BRpagecontainer--hasSelection"),s(window.getSelection().anchorNode).closest(".BRpagecontainer").addClass("BRpagecontainer--hasSelection"))}).attach()}},{key:"attach",value:function(){var e=this;this.selectionObserver.attach(),this.br.protected&&(document.addEventListener("selectionchange",this._limitSelection),s(document.body).on("contextmenu dragstart copy",function(t){var n=document.getSelection();if(null!=n&&n.toString()&&s(e.layer).toArray().some(function(e){return n.containsNode(e,!0)}))return t.preventDefault(),!1}))}},{key:"detach",value:function(){this.selectionObserver.detach(),this.br.protected&&document.removeEventListener("selectionchange",this._limitSelection)}},{key:"interceptCopy",value:function(e){e[0].addEventListener("copy",function(e){var t=document.getSelection();e.clipboardData.setData("text/plain",t.toString()),e.preventDefault()})}},{key:"stopPageFlip",value:function(e){var t=this,n=e.find(this.layer);n.length&&(n.each(function(e,n){return t.defaultMode(n)}),this.br.protected||this.interceptCopy(e))}},{key:"defaultMode",value:function(e){var t=this,n=s(e).closest(".BRpagecontainer");e.style.pointerEvents="none",n.find("img").css("pointer-events","auto"),s(e).off(".textSelectPluginHandler");var r=this.mouseIsDown,a=this.mouseIsDown;r&&(e.style.pointerEvents="auto"),s(e).on("mousedown.textSelectPluginHandler",function(e){t.mouseIsDown=!0,s(e.target).is(t.selectionElement.join(", "))&&e.stopPropagation()}),s(e).on("mouseup.textSelectPluginHandler",function(n){t.mouseIsDown=!1,e.style.pointerEvents="none",a&&(a=!1,n.stopPropagation())})}},{key:"textSelectingMode",value:function(e){var t=this,n=s(e).closest(".BRpagecontainer");e.style.pointerEvents="all",n.find("img").css("pointer-events","none"),s(e).off(".textSelectPluginHandler"),s(e).on("mousedown.textSelectPluginHandler",function(e){t.mouseIsDown=!0,e.stopPropagation()}),s(e).on("mouseup.textSelectPluginHandler",function(e){t.mouseIsDown=!1,e.stopPropagation()})}}],t&&g(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function S(e,t){var n,r,a,o;return h().w(function(i){for(;;)switch(i.p=i.n){case 0:n=v(e),i.p=1,n.s();case 2:if((r=n.n()).done){i.n=4;break}if(a=r.value,!t(a)){i.n=3;break}return i.n=3,a;case 3:i.n=2;break;case 4:i.n=6;break;case 5:i.p=5,o=i.v,n.e(o);case 6:return i.p=6,n.f(),i.f(6);case 7:return i.a(2)}},p,null,[[1,5,6,7]])}function j(e,t){var n,r;return h().w(function(a){for(;;)switch(a.n){case 0:return r=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.children,i=void 0===o||o,l=a.parents,u=void 0===l||l,s=a.siblings,c=void 0===s||s;return h().m(function a(){var o;return h().w(function(a){for(;;)switch(a.n){case 0:if(e!==t){a.n=2;break}return n=!0,a.n=1,e;case 1:return a.a(2);case 2:return a.n=3,e;case 3:if(!i||!e.firstChild){a.n=5;break}return a.d(f(r(e.firstChild,{children:!0,parents:!1,siblings:!0})),4);case 4:if(!n){a.n=5;break}return a.a(2);case 5:if(!c){a.n=9;break}o=e.nextSibling;case 6:if(!o){a.n=9;break}return a.d(f(r(o,{children:!0,parents:!1,siblings:!1})),7);case 7:if(!n){a.n=8;break}return a.a(2);case 8:o=o.nextSibling,a.n=6;break;case 9:if(!u||!e.parentNode){a.n=11;break}return a.d(f(r(e.parentNode,{children:!1,parents:!0,siblings:!0})),10);case 10:if(!n){a.n=11;break}return a.a(2);case 11:return a.a(2)}},a)})()},n=!1,a.d(f(r(e)),1);case 1:return a.a(2)}},y)}},706:function(e,t,n){var r=n(350).PROPER,a=n(9039),o=n(7452);e.exports=function(e){return a(function(){return!!o[e]()||"​…᠎"!=="​…᠎"[e]()||r&&o[e].name!==e})}},1041:function(e,t,n){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},r(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}n.d(t,{S:function(){return i}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(9085),n(6099),n(7764),n(2953);var i=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.options},(t=[{key:"setup",value:function(e){this.options=Object.assign({},this.options,e)}},{key:"init",value:function(){}},{key:"_configurePageContainer",value:function(e){}},{key:"_configureToolbar",value:function(e){}},{key:"_bindNavigationHandlers",value:function(){}},{key:"extendNavBar",value:function(e){}}])&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},2762:function(e,t,n){var r=n(6518),a=n(3802).trim;r({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return a(this)}})},4160:function(e,t,n){n.d(t,{$x:function(){return v},EF:function(){return c},ND:function(){return y},m0:function(){return f},YH:function(){return d}}),n(2675),n(9463),n(2259),n(8706),n(3418),n(3792),n(2062),n(4782),n(2010),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(1761),n(2953);var r=[],a={},o={},i={};[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, أۇزبېك","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, ","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]].forEach(e=>{var t={name:e[0],nativeName:e[1],iso639_1:e[2],iso639_2T:e[3],iso639_2B:e[4]};a[e[2]]=o[e[3]]=i[e[4]]=t,r.push(t)});var l=r;function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t=e.match(/\S+/g);return t?t.length:0}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(e)}var h={"zh-hans":"中文 (Zhōngwén)"};function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?p(e=e.toLowerCase(),["iso639_1"],t)||p(e,["iso639_2T"],t)||p(e,["iso639_2B","nativeName","name"],t):null}function p(e,t,n){var r,a=u(l);try{for(a.s();!(r=a.n()).done;){var o,i=r.value,s=u(t);try{for(s.s();!(o=s.n()).done;)if(-1!=i[o.value].split(", ").map(function(e){return e.toLowerCase()}).indexOf(e))return n?"".concat(i.nativeName.split(", ")[0]," (").concat(i.iso639_1,")"):i.iso639_1}catch(e){s.e(e)}finally{s.f()}}}catch(e){a.e(e)}finally{a.f()}return h[e]?"".concat(h[e]," (").concat(e,")"):null}function y(){try{return!!window.localStorage}catch(e){return!1}}var v=-1!=location.toString().indexOf("_debugReadAloud=true")},4565:function(e,t,n){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},r(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}n.d(t,{l:function(){return i}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(6099),n(7764),n(2953);var i=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxSize=t,this.entries=[]},(t=[{key:"add",value:function(e){this.entries.length>=this.maxSize&&this.entries.shift(),this.entries.push(e)}}])&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},9073:function(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;return null==e?void 0:e.replace(/\{\{([^}]*?)\}\}/g,function(e,o){if(!o)return e;var i,l=function(e){if(Array.isArray(e))return e}(i=o.split("|").map(function(e){return e.trim()}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(i)||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.")}(),u=l[0],s=r(l).slice(1);if(!(u in n)&&!(u in t))return e;var c=u in n?n[u]:u in t?t[u]:null;return s.map(function(e){return a[e]}).reduce(function(e,t){return t(e)},c&&c.toString())})}n.d(t,{g:function(){return a}}),n(2675),n(9463),n(2259),n(3418),n(3792),n(2062),n(2712),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(5440),n(2762),n(2953);var o={urlencode:encodeURIComponent}}},function(e){e(e.s=296)}]);
2
+ "use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[326],{296:function(e,t,n){n(2675),n(9463),n(2259),n(5700),n(8706),n(2008),n(113),n(3418),n(3792),n(8598),n(2062),n(4782),n(6910),n(9572),n(2010),n(6033),n(8130),n(9085),n(875),n(6099),n(8459),n(3362),n(825),n(7495),n(8781),n(9449),n(7764),n(2762),n(2953);var r=n(4907),a=n(1041),o=n(9073),i=n(4565),l=n(4160),u=n(593),s=n(1669);function c(e){return c="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},c(e)}var f=b().m(N),h=b().m(_),d=b().m(L);function p(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(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 y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=m(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,a=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||m(e,t)||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 m(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return k(s,"_invoke",function(n,r,a){var o,l,u,s=0,c=a||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return o=t,l=0,u=e,h.n=n,i}};function d(n,r){for(l=n,u=r,t=0;!f&&s&&!a&&t<c.length;t++){var a,o=c[t],d=h.p,p=o[2];n>3?(a=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=d&&((a=n<2&&d<o[1])?(l=0,h.v=r,h.n=o[1]):d<p&&(a=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,l=0))}if(a||n>1)return i;throw f=!0,r}return function(a,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(t=l<2?e:u)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,u)):h.n=u:h.v=u);try{if(s=2,o){if(l||(a="next"),t=o[a]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==i)break}catch(t){o=e,l=1,u=t}finally{s=1}}return{value:t,done:f}}}(n,a,o),!0),s}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(k(t={},r,function(){return this}),t),f=s.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,k(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=s,k(f,"constructor",s),k(s,"constructor",u),u.displayName="GeneratorFunction",k(s,a,"GeneratorFunction"),k(f),k(f,a,"Generator"),k(f,r,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(b=function(){return{w:o,m:h}})()}function k(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}k=function(e,t,n,r){function o(t,n){k(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},k(e,t,n,r)}function w(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function S(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){w(o,r,a,i,l,"next",e)}function l(e){w(o,r,a,i,l,"throw",e)}i(void 0)})}}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,T(r.key),r)}}function P(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function A(e,t,n){return(t=T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var R=window.BookReader,B=function(e){function t(e){var n,r,a,o;return j(this,t),A((r=this,o=[e],a=E(a=t),n=function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,C()?Reflect.construct(a,o||[],E(r).constructor):a.apply(r,o))),"options",{enabled:!0,fullDjvuXmlUrl:null,singlePageDjvuXmlUrl:null,jsonp:!1,maxProtectedWords:200}),A(n,"djvuPagesPromise",null),A(n,"pageTextCache",new i.l),A(n,"maxWordRendered",2500),n.rtl="rl"===n.br.pageProgression,n.textSelectionManager=new u.bg(".BRtextLayer",n.br,{selectionElement:[".BRwordElement",".BRspace"]},n.options.maxProtectedWords),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(t,e),P(t,[{key:"init",value:function(){this.options.enabled&&(this.loadData(),this.textSelectionManager.init())}},{key:"_configurePageContainer",value:function(e){return this.br.mode!==this.br.constModeThumb&&e.page&&this.createTextLayer(e),e}},{key:"loadData",value:function(){this.options.singlePageDjvuXmlUrl||(this.djvuPagesPromise=s.ajax({type:"GET",url:(0,o.g)(this.options.fullDjvuXmlUrl,this.br.options.vars),dataType:this.options.jsonp?"jsonp":"html",cache:!0,xhrFields:{withCredentials:this.br.protected},error:function(e){}}).then(function(e){try{var t=s.parseXML(e);return t&&s(t).find("OBJECT")}catch(e){return}}))}},{key:"getPageText",value:(a=S(b().m(function e(t){var n,r,a,i,l;return b().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!this.options.singlePageDjvuXmlUrl){e.n=5;break}if(!(n=this.pageTextCache.entries.find(function(e){return e.index==t}))){e.n=1;break}return e.a(2,n.response);case 1:return e.n=2,s.ajax({type:"GET",url:(0,o.g)(this.options.singlePageDjvuXmlUrl,this.br.options.vars,{pageIndex:t}),dataType:this.options.jsonp?"jsonp":"html",cache:!0,xhrFields:{withCredentials:this.br.protected},error:function(e){}});case 2:return r=e.v,e.p=3,a=s.parseXML(r),i=a&&s(a).find("OBJECT")[0],this.pageTextCache.add({index:t,response:i}),e.a(2,i);case 4:return e.p=4,e.v,e.a(2,void 0);case 5:return e.n=6,this.djvuPagesPromise;case 6:if(!(l=e.v)){e.n=7;break}return e.a(2,l[t]);case 7:return e.a(2)}},e,this,[[3,4]])})),function(e){return a.apply(this,arguments)})},{key:"createTextLayer",value:(n=S(b().m(function e(t){var n,a,o,i,u,c,f,h,d,p,m,g,k,w,S,j,x,P,C,E,O,A,T,R,B,I=this;return b().w(function(e){for(;;)switch(e.n){case 0:if(n=t.page.index,!(a=t.$container).find(".BRtextLayer").length){e.n=1;break}return e.a(2);case 1:return e.n=2,this.getPageText(n);case 2:if(o=e.v){e.n=3;break}return e.a(2);case 3:if(s(o).find("WORD").filter(function(e,t){var n=v(t.getAttribute("coords").split(",").map(parseFloat),4),r=n[0],a=n[3];if(0==r&&0==a)return console.error("Found invalid ocr word coordinates"),!0}).remove(),M(o),!((i=s(o).find("WORD").length)>this.maxWordRendered)){e.n=4;break}return console.log("Page ".concat(n," has too many words (").concat(i," > ").concat(this.maxWordRendered,"). Not rendering text layer.")),e.a(2);case 4:return u=(0,r.Ql)(t.page,"BRtextLayer"),e.n=5,Promise.resolve();case 5:c=parseFloat(t.$container[0].style.width)/t.page.width,f=parseFloat(t.$container[0].style.height)/t.page.height,u.style.transform="scale(".concat(c,", ").concat(f,")"),(h=(0,l.YH)(this.br.options.bookLanguage))&&u.setAttribute("lang",h),u.setAttribute("dir",this.rtl?"rtl":"ltr"),d=s(o).find("PARAGRAPH[coords]").toArray(),p=d.map(function(e){var t=I.renderParagraph(e);return u.appendChild(t),t}),m=z(u,".BRparagraphElement"),g=0,k=y(L(d,p));try{for(k.s();!(w=k.n()).done;)S=v(w.value,2),j=S[0],x=S[1],P=s(j).attr("coords").split(",").map(parseFloat),C=m.get(x),E=v(P,4),O=E[0],A=E[2],T=E[3],R=this.rtl?C.right-A:O-C.left,B=T-(C.top+g),x.style[this.rtl?"marginRight":"marginLeft"]="".concat(R,"px"),x.style.marginTop="".concat(B,"px"),g+=B,u.appendChild(x)}catch(e){k.e(e)}finally{k.f()}a.append(u),this.textSelectionManager.stopPageFlip(a),this.br.trigger("textLayerRendered",{pageIndex:n,pageContainer:t});case 6:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"renderParagraph",value:function(e){var t=document.createElement("p");t.classList.add("BRparagraphElement"),e.getAttribute("x-role")&&(t.classList.add("ocr-role-header-footer"),t.ariaHidden="true");var n=v(s(e).attr("coords").split(",").map(parseFloat),4),r=n[0],a=n[1],o=n[2],i=n[3],l=[],u=s(e).find("LINE[coords]").toArray();if(!u.length)return t;var c,f=y(_(N(u,I)));try{for(f.s();!(c=f.n()).done;){var h=v(c.value,3),d=h[0],m=h[1],g=h[2],b=m.ocrElement==u[u.length-1],k=document.createElement("span");k.classList.add("BRlineElement");var w,S=y(m.words.entries());try{for(S.s();!(w=S.n()).done;){var j=v(w.value,2),x=j[0],P=j[1],C=v(s(P).attr("coords").split(",").map(parseFloat),4),E=C[1],O=C[2],A=C[3],T=E-A;if(l.push(T),0==x&&null!=d&&d.lastWord.textContent.trim().endsWith("-")){var R=v(s((g||d).firstWord).attr("coords").split(",").map(parseFloat),3)[0];s(P).attr("coords","".concat(R,",").concat(E,",").concat(O,",").concat(A))}var B=document.createElement("span");if(B.setAttribute("class","BRwordElement"),B.textContent=P.textContent.trim(),x>0){var M=document.createElement("span");M.classList.add("BRspace"),M.textContent=" ",k.append(M),k.appendChild(document.createTextNode(" "))}k.appendChild(B)}}catch(e){S.e(e)}finally{S.f()}var D=m.lastWord.textContent.trim().endsWith("-"),F=k.children[k.children.length-1];D&&!b&&(F.textContent=F.textContent.trim().slice(0,-1),F.classList.add("BRwordElement--hyphen")),t.appendChild(k),b||D||t.appendChild(document.createTextNode(" "))}}catch(e){f.e(e)}finally{f.f()}l.sort(function(e,t){return e-t});var G=l[Math.floor(.85*l.length)]+4;t.style.left="".concat(r,"px"),t.style.top="".concat(i,"px"),t.style.width="".concat(o-r,"px"),t.style.height="".concat(a-i,"px"),t.style.fontSize="".concat(G,"px");var W,K=z(t,".BRwordElement"),H=y(L(s(e).find("WORD").toArray(),t.querySelectorAll(".BRwordElement")));try{for(H.s();!(W=H.n()).done;){var U=v(W.value,2),q=U[0],X=U[1],$=K.get(X),V=v(s(q).attr("coords").split(",").map(parseFloat),3),J=V[0],Y=V[2]-J;q.textContent.endsWith(" ")&&(Y=Y*(q.textContent.length-1)/q.textContent.length);var Z=Y-$.width;X.style.letterSpacing="".concat(Z/(q.textContent.length-1),"px")}}catch(e){H.e(e)}finally{H.f()}K=z(t,".BRwordElement");var Q,ee=z(t,".BRspace"),te=s(e).find("LINE[coords]").toArray(),ne=Array.from(t.querySelectorAll(".BRlineElement")),re=i,ae=y(L(te,ne));try{for(ae.s();!(Q=ae.n()).done;){var oe,ie=v(Q.value,2),le=ie[0],ue=ie[1],se=s(le).find("WORD").toArray(),ce=this.rtl?o:r,fe=y(L(se,ue.querySelectorAll(".BRwordElement")));try{for(fe.s();!(oe=fe.n()).done;){var he=v(oe.value,2),de=he[0],pe=he[1],ye=K.get(pe),ve=v(s(de).attr("coords").split(",").map(parseFloat),3),me=ve[0],ge=ve[2],be=this.rtl?-(ge-ce):me-ce;if(pe.previousElementSibling){var ke=pe.previousElementSibling;ke.style.letterSpacing="".concat(be-ee.get(ke).width,"px")}else pe.style[this.rtl?"paddingRight":"paddingLeft"]="".concat(be,"px");this.rtl?ce-=be+ye.width:ce+=be+ye.width}}catch(e){fe.e(e)}finally{fe.f()}var we=Math.min.apply(Math,p(se.map(function(e){return parseFloat(s(e).attr("coords").split(",")[3])})))-re;ue.previousElementSibling&&(ue.previousElementSibling.style.lineHeight="".concat(we,"px"),re+=we)}}catch(e){ae.e(e)}finally{ae.f()}return ne[ne.length-1].style.lineHeight="".concat(a-re,"px"),t.appendChild(document.createElement("br")),t}}]);var n,a}(a.S);function z(e,t){var n={position:e.style.position,visibility:e.style.visibility,top:e.style.top,left:e.style.left,transform:e.style.transform};e.style.position="absolute",e.style.visibility="hidden",e.style.top="0",e.style.left="0",e.style.transform="none",document.body.appendChild(e);var r=new Map(Array.from(e.querySelectorAll(t)).map(function(e){var t=e.getBoundingClientRect();return[e,new D(t.left+window.scrollX,t.top+window.scrollY,t.width,t.height)]}));return document.body.removeChild(e),Object.assign(e.style,n),r}function I(e){var t=s(e).find("WORD").toArray();return{ocrElement:e,words:t,firstWord:t[0],lastWord:t[t.length-1]}}function N(e,t){var n,r,a,o;return b().w(function(i){for(;;)switch(i.p=i.n){case 0:n=y(e),i.p=1,n.s();case 2:if((r=n.n()).done){i.n=4;break}return a=r.value,i.n=3,t(a);case 3:i.n=2;break;case 4:i.n=6;break;case 5:i.p=5,o=i.v,n.e(o);case 6:return i.p=6,n.f(),i.f(6);case 7:return i.a(2)}},f,null,[[1,5,6,7]])}function _(e){var t,n,r,a,o,i,l;return b().w(function(u){for(;;)switch(u.p=u.n){case 0:t=void 0,n=void 0,r=void 0,a=y(e),u.p=1,a.s();case 2:if((o=a.n()).done){u.n=5;break}if(i=o.value,void 0===n){u.n=3;break}return r=i,u.n=3,[t,n,r];case 3:t=n,n=i,r=void 0;case 4:u.n=2;break;case 5:u.n=7;break;case 6:u.p=6,l=u.v,a.e(l);case 7:return u.p=7,a.f(),u.f(7);case 8:if(void 0===n){u.n=9;break}return u.n=9,[t,n,r];case 9:return u.a(2)}},h,null,[[1,6,7,8]])}function L(e,t){var n,r,a,o;return b().w(function(i){for(;;)switch(i.n){case 0:n=e[Symbol.iterator](),r=t[Symbol.iterator]();case 1:if(a=n.next(),o=r.next(),!a.done||!o.done){i.n=2;break}return i.a(2);case 2:if(!a.done&&!o.done){i.n=3;break}throw new Error("zip: one of the iterators is done");case 3:return i.n=4,[a.value,o.value];case 4:i.n=1;break;case 5:return i.a(2)}},d)}function M(e){if(!s(e).attr("coords")&&e.children){var t=s(e).children().toArray();if(0!==t.length){var n,r=y(t);try{for(r.s();!(n=r.n()).done;)M(n.value)}catch(e){r.e(e)}finally{r.f()}var a,o=[],i=y(t);try{for(i.s();!(a=i.n()).done;){var l=a.value;s(l).attr("coords")&&o.push(s(l).attr("coords").split(",").map(parseFloat))}}catch(e){i.e(e)}finally{i.f()}var u=function(e){var t,n=1/0,r=-1/0,a=-1/0,o=1/0,i=y(e);try{for(i.s();!(t=i.n()).done;){var l=v(t.value,4),u=l[0],s=l[1],c=l[2],f=l[3];n=Math.min(n,u),r=Math.max(r,s),a=Math.max(a,c),o=Math.min(o,f)}}catch(e){i.e(e)}finally{i.f()}return[n,r,a,o]}(o);Math.abs(u[0])!=1/0&&s(e).attr("coords",u.join(","))}}}null==R||R.registerPlugin("textSelection",B);var D=function(){return P(function e(t,n,r,a){j(this,e),this.x=t,this.y=n,this.width=r,this.height=a},[{key:"right",get:function(){return this.x+this.width}},{key:"bottom",get:function(){return this.y+this.height}},{key:"top",get:function(){return this.y}},{key:"left",get:function(){return this.x}}])}()},593:function(e,t,n){n.d(t,{bg:function(){return w}}),n(2675),n(9463),n(2259),n(5700),n(113),n(3418),n(3792),n(8598),n(4782),n(9572),n(2010),n(8130),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(5440),n(2953);var r=n(1669);function a(e){return a="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},a(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var u=function(){return e=function e(t,n){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"selecting",!1),i(this,"startedInSelector",!1),i(this,"target",null),i(this,"_onSelectionChange",function(){var e=window.getSelection();if(!a.selecting&&e.toString()){var t=r(e.anchorNode).closest(a.selector)[0];if(!t)return;a.target=t,a.selecting=!0,a.handler("started",a.target)}!a.selecting||!e.isCollapsed&&e.toString()&&r(e.anchorNode).closest(a.selector)[0]||(a.selecting=!1,a.handler("cleared",a.target))}),this.selector=t,this.handler=n},(t=[{key:"attach",value:function(){document.addEventListener("selectionchange",this._onSelectionChange)}},{key:"detach",value:function(){document.removeEventListener("selectionchange",this._onSelectionChange)}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),s=n(1669);function c(e){return c="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},c(e)}function f(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(c(e)+" is not iterable")}function h(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return d(s,"_invoke",function(n,r,a){var o,l,u,s=0,c=a||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return o=t,l=0,u=e,h.n=n,i}};function d(n,r){for(l=n,u=r,t=0;!f&&s&&!a&&t<c.length;t++){var a,o=c[t],d=h.p,p=o[2];n>3?(a=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=d&&((a=n<2&&d<o[1])?(l=0,h.v=r,h.n=o[1]):d<p&&(a=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,l=0))}if(a||n>1)return i;throw f=!0,r}return function(a,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(t=l<2?e:u)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,u)):h.n=u:h.v=u);try{if(s=2,o){if(l||(a="next"),t=o[a]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==i)break}catch(t){o=e,l=1,u=t}finally{s=1}}return{value:t,done:f}}}(n,a,o),!0),s}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(d(t={},r,function(){return this}),t),f=s.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,d(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=s,d(f,"constructor",s),d(s,"constructor",u),u.displayName="GeneratorFunction",d(s,a,"GeneratorFunction"),d(f),d(f,a,"Generator"),d(f,r,function(){return this}),d(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:o,m:p}})()}function d(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}d=function(e,t,n,r){function o(t,n){d(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},d(e,t,n,r)}var p=h().m(S),y=h().m(j);function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function b(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var w=function(){return e=function e(t,n,r,a){var o=this,i=r.selectionElement;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),b(this,"options",{maxProtectedWords:200}),b(this,"_onSelectionChange",function(e,t){if("started"===e)o.textSelectingMode(t);else{if("cleared"!==e)throw new Error("Unknown type ".concat(e));o.defaultMode(t)}}),b(this,"_limitSelection",function(){var e=window.getSelection();if(e.rangeCount){var t=e.getRangeAt(0),n=!!t.startContainer.parentElement.closest(".BRcontainer"),r=!!t.endContainer.parentElement.closest(".BRcontainer");if(n||r)if(n&&r){var a=function(e,t){var n,r=0,a=v(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(r==t)return o;r++}}catch(e){a.e(e)}finally{a.f()}}(S(j(t.startContainer,t.endContainer),function(e){var t;return null===(t=e.classList)||void 0===t?void 0:t.contains(o.selectionElement[0].replace(".",""))}),o.options.maxProtectedWords-1);if(a&&t.endContainer.parentNode!=a){var i=document.createRange();i.setStart(t.startContainer,t.startOffset),i.setEnd(a.firstChild,a.textContent.length),e.removeAllRanges(),e.addRange(i)}}else e.removeAllRanges()}}),this.layer=t,this.br=n,this.selectionElement=i,this.selectionObserver=new u(this.layer,this._onSelectionChange),this.options.maxProtectedWords=a||200},t=[{key:"init",value:function(){var e=this;this.attach(),new u(this.layer,function(t){var n;"started"==t&&(null===(n=e.br.plugins.archiveAnalytics)||void 0===n||n.sendEvent("BookReader","SelectStart"),e.br.refs.$br.find(".BRpagecontainer--hasSelection").removeClass("BRpagecontainer--hasSelection"),s(window.getSelection().anchorNode).closest(".BRpagecontainer").addClass("BRpagecontainer--hasSelection"))}).attach()}},{key:"attach",value:function(){var e=this;this.selectionObserver.attach(),this.br.protected&&(document.addEventListener("selectionchange",this._limitSelection),s(document.body).on("contextmenu dragstart copy",function(t){var n=document.getSelection();if(null!=n&&n.toString()&&s(e.layer).toArray().some(function(e){return n.containsNode(e,!0)}))return t.preventDefault(),!1}))}},{key:"detach",value:function(){this.selectionObserver.detach(),this.br.protected&&document.removeEventListener("selectionchange",this._limitSelection)}},{key:"interceptCopy",value:function(e){e[0].addEventListener("copy",function(e){var t=document.getSelection();e.clipboardData.setData("text/plain",t.toString()),e.preventDefault()})}},{key:"stopPageFlip",value:function(e){var t=this,n=e.find(this.layer);n.length&&(n.each(function(e,n){return t.defaultMode(n)}),this.br.protected||this.interceptCopy(e))}},{key:"defaultMode",value:function(e){var t=this,n=s(e).closest(".BRpagecontainer");e.style.pointerEvents="none",n.find("img").css("pointer-events","auto"),s(e).off(".textSelectPluginHandler");var r=this.mouseIsDown,a=this.mouseIsDown;r&&(e.style.pointerEvents="auto"),s(e).on("mousedown.textSelectPluginHandler",function(e){t.mouseIsDown=!0,s(e.target).is(t.selectionElement.join(", "))&&e.stopPropagation()}),s(e).on("mouseup.textSelectPluginHandler",function(n){t.mouseIsDown=!1,e.style.pointerEvents="none",a&&(a=!1,n.stopPropagation())})}},{key:"textSelectingMode",value:function(e){var t=this,n=s(e).closest(".BRpagecontainer");e.style.pointerEvents="all",n.find("img").css("pointer-events","none"),s(e).off(".textSelectPluginHandler"),s(e).on("mousedown.textSelectPluginHandler",function(e){t.mouseIsDown=!0,e.stopPropagation()}),s(e).on("mouseup.textSelectPluginHandler",function(e){t.mouseIsDown=!1,e.stopPropagation()})}}],t&&g(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function S(e,t){var n,r,a,o;return h().w(function(i){for(;;)switch(i.p=i.n){case 0:n=v(e),i.p=1,n.s();case 2:if((r=n.n()).done){i.n=4;break}if(a=r.value,!t(a)){i.n=3;break}return i.n=3,a;case 3:i.n=2;break;case 4:i.n=6;break;case 5:i.p=5,o=i.v,n.e(o);case 6:return i.p=6,n.f(),i.f(6);case 7:return i.a(2)}},p,null,[[1,5,6,7]])}function j(e,t){var n,r;return h().w(function(a){for(;;)switch(a.n){case 0:return r=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.children,i=void 0===o||o,l=a.parents,u=void 0===l||l,s=a.siblings,c=void 0===s||s;return h().m(function a(){var o;return h().w(function(a){for(;;)switch(a.n){case 0:if(e!==t){a.n=2;break}return n=!0,a.n=1,e;case 1:return a.a(2);case 2:return a.n=3,e;case 3:if(!i||!e.firstChild){a.n=5;break}return a.d(f(r(e.firstChild,{children:!0,parents:!1,siblings:!0})),4);case 4:if(!n){a.n=5;break}return a.a(2);case 5:if(!c){a.n=9;break}o=e.nextSibling;case 6:if(!o){a.n=9;break}return a.d(f(r(o,{children:!0,parents:!1,siblings:!1})),7);case 7:if(!n){a.n=8;break}return a.a(2);case 8:o=o.nextSibling,a.n=6;break;case 9:if(!u||!e.parentNode){a.n=11;break}return a.d(f(r(e.parentNode,{children:!1,parents:!0,siblings:!0})),10);case 10:if(!n){a.n=11;break}return a.a(2);case 11:return a.a(2)}},a)})()},n=!1,a.d(f(r(e)),1);case 1:return a.a(2)}},y)}},706:function(e,t,n){var r=n(350).PROPER,a=n(9039),o=n(7452);e.exports=function(e){return a(function(){return!!o[e]()||"​…᠎"!=="​…᠎"[e]()||r&&o[e].name!==e})}},1041:function(e,t,n){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},r(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}n.d(t,{S:function(){return i}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(9085),n(6099),n(7764),n(2953);var i=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.options},(t=[{key:"setup",value:function(e){this.options=Object.assign({},this.options,e)}},{key:"init",value:function(){}},{key:"_configurePageContainer",value:function(e){}},{key:"_configureToolbar",value:function(e){}},{key:"_bindNavigationHandlers",value:function(){}},{key:"extendNavBar",value:function(e){}}])&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},2762:function(e,t,n){var r=n(6518),a=n(3802).trim;r({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return a(this)}})},4160:function(e,t,n){n.d(t,{$x:function(){return m},EF:function(){return c},ND:function(){return v},m0:function(){return f},YH:function(){return d},_4:function(){return p}}),n(2675),n(9463),n(2259),n(3418),n(4423),n(3792),n(4782),n(2010),n(875),n(6099),n(3362),n(7495),n(8781),n(1699),n(7764),n(1761),n(2953);var r=[],a={},o={},i={};[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, أۇزبېك","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, ","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]].forEach(e=>{var t={name:e[0],nativeName:e[1],iso639_1:e[2],iso639_2T:e[3],iso639_2B:e[4]};a[e[2]]=o[e[3]]=i[e[4]]=t,r.push(t)});var l=r;function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t=e.match(/\S+/g);return t?t.length:0}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(e)}var h={"zh-hans":"中文 (Zhōngwén)"};function d(e){if(!e)return null;if(e=e.toLocaleLowerCase(),h[e])return e;var t=y(e,["iso639_1"])||y(e,["iso639_2T"])||y(e,["iso639_2B","name","nativeName"]);return t?t.iso639_1:null}function p(e){if(!e)return null;if(e=e.toLocaleLowerCase(),h[e])return h[e];var t=y(e,["iso639_1"])||y(e,["iso639_2T"])||y(e,["iso639_2B","name","nativeName"]);return null!=t&&t.nativeName?t.nativeName.split(", ")[0]:null}function y(e,t){if(!e)return null;e=e.toLowerCase();var n,r=u(l);try{for(r.s();!(n=r.n()).done;){var a,o=n.value,i=u(t);try{for(i.s();!(a=i.n()).done;){var s;if(null!==(s=o[a.value])&&void 0!==s&&s.toLowerCase().split(", ").includes(e))return o}}catch(e){i.e(e)}finally{i.f()}}}catch(e){r.e(e)}finally{r.f()}return null}function v(){try{return!!window.localStorage}catch(e){return!1}}var m=-1!=location.toString().indexOf("_debugReadAloud=true")},4565:function(e,t,n){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},r(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}n.d(t,{l:function(){return i}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(6099),n(7764),n(2953);var i=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxSize=t,this.entries=[]},(t=[{key:"add",value:function(e){this.entries.length>=this.maxSize&&this.entries.shift(),this.entries.push(e)}}])&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},9073:function(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;return null==e?void 0:e.replace(/\{\{([^}]*?)\}\}/g,function(e,o){if(!o)return e;var i,l=function(e){if(Array.isArray(e))return e}(i=o.split("|").map(function(e){return e.trim()}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(i)||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.")}(),u=l[0],s=r(l).slice(1);if(!(u in n)&&!(u in t))return e;var c=u in n?n[u]:u in t?t[u]:null;return s.map(function(e){return a[e]}).reduce(function(e,t){return t(e)},c&&c.toString())})}n.d(t,{g:function(){return a}}),n(2675),n(9463),n(2259),n(3418),n(3792),n(2062),n(2712),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(5440),n(2762),n(2953);var o={urlencode:encodeURIComponent}}},function(e){e(e.s=296)}]);
3
3
  //# sourceMappingURL=plugin.text_selection.js.map