Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@internetarchive/bookreader

Package Overview
Dependencies
Maintainers
11
Versions
300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@internetarchive/bookreader - npm Package Compare versions

Comparing version 4.23.4 to 4.23.5

2

BookReader/dragscrollable-br.js

@@ -1,1 +0,1 @@

!function(){var t={3099:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},1223:function(t,n,r){var e=r(5112),o=r(30),i=r(3070),u=e("unscopables"),c=Array.prototype;null==c[u]&&i.f(c,u,{configurable:!0,value:o(null)}),t.exports=function(t){c[u][t]=!0}},1530:function(t,n,r){"use strict";var e=r(8710).charAt;t.exports=function(t,n,r){return n+(r?e(t,n).length:1)}},9670:function(t,n,r){var e=r(111);t.exports=function(t){if(!e(t))throw TypeError(String(t)+" is not an object");return t}},1318:function(t,n,r){var e=r(5656),o=r(7466),i=r(1400),u=function(t){return function(n,r,u){var c,a=e(n),f=o(a.length),l=i(u,f);if(t&&r!=r){for(;f>l;)if((c=a[l++])!=c)return!0}else for(;f>l;l++)if((t||l in a)&&a[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},2092:function(t,n,r){var e=r(9974),o=r(8361),i=r(7908),u=r(7466),c=r(5417),a=[].push,f=function(t){var n=1==t,r=2==t,f=3==t,l=4==t,s=6==t,p=5==t||s;return function(d,v,g,h){for(var x,y,b=i(d),m=o(b),E=e(v,g,3),w=u(m.length),S=0,O=h||c,j=n?O(d,w):r?O(d,0):void 0;w>S;S++)if((p||S in m)&&(y=E(x=m[S],S,b),t))if(n)j[S]=y;else if(y)switch(t){case 3:return!0;case 5:return x;case 6:return S;case 2:a.call(j,x)}else if(l)return!1;return s?-1:f||l?l:j}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6)}},9341:function(t,n,r){"use strict";var e=r(7293);t.exports=function(t,n){var r=[][t];return!!r&&e((function(){r.call(null,n||function(){throw 1},1)}))}},9207:function(t,n,r){var e=r(9781),o=r(7293),i=r(6656),u=Object.defineProperty,c={},a=function(t){throw t};t.exports=function(t,n){if(i(c,t))return c[t];n||(n={});var r=[][t],f=!!i(n,"ACCESSORS")&&n.ACCESSORS,l=i(n,0)?n[0]:a,s=i(n,1)?n[1]:void 0;return c[t]=!!r&&!o((function(){if(f&&!e)return!0;var t={length:-1};f?u(t,1,{enumerable:!0,get:a}):t[1]=1,r.call(t,l,s)}))}},5417:function(t,n,r){var e=r(111),o=r(3157),i=r(5112)("species");t.exports=function(t,n){var r;return o(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!o(r.prototype)?e(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===n?0:n)}},4326:function(t){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},9920:function(t,n,r){var e=r(6656),o=r(3887),i=r(1236),u=r(3070);t.exports=function(t,n){for(var r=o(n),c=u.f,a=i.f,f=0;f<r.length;f++){var l=r[f];e(t,l)||c(t,l,a(n,l))}}},8880:function(t,n,r){var e=r(9781),o=r(3070),i=r(9114);t.exports=e?function(t,n,r){return o.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},9114:function(t){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},9781:function(t,n,r){var e=r(7293);t.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(t,n,r){var e=r(7854),o=r(111),i=e.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,n,r){var e=r(7854),o=r(1236).f,i=r(8880),u=r(1320),c=r(3505),a=r(9920),f=r(4705);t.exports=function(t,n){var r,l,s,p,d,v=t.target,g=t.global,h=t.stat;if(r=g?e:h?e[v]||c(v,{}):(e[v]||{}).prototype)for(l in n){if(p=n[l],s=t.noTargetGet?(d=o(r,l))&&d.value:r[l],!f(g?l:v+(h?".":"#")+l,t.forced)&&void 0!==s){if(typeof p==typeof s)continue;a(p,s)}(t.sham||s&&s.sham)&&i(p,"sham",!0),u(r,l,p,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:function(t,n,r){"use strict";r(4916);var e=r(1320),o=r(7293),i=r(5112),u=r(2261),c=r(8880),a=i("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),s=i("replace"),p=!!/./[s]&&""===/./[s]("a","$0"),d=!o((function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,n,r,s){var v=i(t),g=!o((function(){var n={};return n[v]=function(){return 7},7!=""[t](n)})),h=g&&!o((function(){var n=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[a]=function(){return r},r.flags="",r[v]=/./[v]),r.exec=function(){return n=!0,null},r[v](""),!n}));if(!g||!h||"replace"===t&&(!f||!l||p)||"split"===t&&!d){var x=/./[v],y=r(v,""[t],(function(t,n,r,e,o){return n.exec===u?g&&!o?{done:!0,value:x.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=y[0],m=y[1];e(String.prototype,t,b),e(RegExp.prototype,v,2==n?function(t,n){return m.call(t,this,n)}:function(t){return m.call(t,this)})}s&&c(RegExp.prototype[v],"sham",!0)}},9974:function(t,n,r){var e=r(3099);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 0:return function(){return t.call(n)};case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},5005:function(t,n,r){var e=r(857),o=r(7854),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,n){return arguments.length<2?i(e[t])||i(o[t]):e[t]&&e[t][n]||o[t]&&o[t][n]}},7854:function(t,n,r){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof r.g&&r.g)||Function("return this")()},6656:function(t){var n={}.hasOwnProperty;t.exports=function(t,r){return n.call(t,r)}},3501:function(t){t.exports={}},490:function(t,n,r){var e=r(5005);t.exports=e("document","documentElement")},4664:function(t,n,r){var e=r(9781),o=r(7293),i=r(317);t.exports=!e&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,n,r){var e=r(7293),o=r(4326),i="".split;t.exports=e((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},2788:function(t,n,r){var e=r(5465),o=Function.toString;"function"!=typeof e.inspectSource&&(e.inspectSource=function(t){return o.call(t)}),t.exports=e.inspectSource},9909:function(t,n,r){var e,o,i,u=r(8536),c=r(7854),a=r(111),f=r(8880),l=r(6656),s=r(6200),p=r(3501),d=c.WeakMap;if(u){var v=new d,g=v.get,h=v.has,x=v.set;e=function(t,n){return x.call(v,t,n),n},o=function(t){return g.call(v,t)||{}},i=function(t){return h.call(v,t)}}else{var y=s("state");p[y]=!0,e=function(t,n){return f(t,y,n),n},o=function(t){return l(t,y)?t[y]:{}},i=function(t){return l(t,y)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(n){var r;if(!a(n)||(r=o(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},3157:function(t,n,r){var e=r(4326);t.exports=Array.isArray||function(t){return"Array"==e(t)}},4705:function(t,n,r){var e=r(7293),o=/#|\.prototype\./,i=function(t,n){var r=c[u(t)];return r==f||r!=a&&("function"==typeof n?e(n):!!n)},u=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},a=i.NATIVE="N",f=i.POLYFILL="P";t.exports=i},111:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},1913:function(t){t.exports=!1},7850:function(t,n,r){var e=r(111),o=r(4326),i=r(5112)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},133:function(t,n,r){var e=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!e((function(){return!String(Symbol())}))},8536:function(t,n,r){var e=r(7854),o=r(2788),i=e.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},30:function(t,n,r){var e,o=r(9670),i=r(6048),u=r(748),c=r(3501),a=r(490),f=r(317),l=r(6200)("IE_PROTO"),s=function(){},p=function(t){return"<script>"+t+"<\/script>"},d=function(){try{e=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;d=e?function(t){t.write(p("")),t.close();var n=t.parentWindow.Object;return t=null,n}(e):((n=f("iframe")).style.display="none",a.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var r=u.length;r--;)delete d.prototype[u[r]];return d()};c[l]=!0,t.exports=Object.create||function(t,n){var r;return null!==t?(s.prototype=o(t),r=new s,s.prototype=null,r[l]=t):r=d(),void 0===n?r:i(r,n)}},6048:function(t,n,r){var e=r(9781),o=r(3070),i=r(9670),u=r(1956);t.exports=e?Object.defineProperties:function(t,n){i(t);for(var r,e=u(n),c=e.length,a=0;c>a;)o.f(t,r=e[a++],n[r]);return t}},3070:function(t,n,r){var e=r(9781),o=r(4664),i=r(9670),u=r(7593),c=Object.defineProperty;n.f=e?c:function(t,n,r){if(i(t),n=u(n,!0),i(r),o)try{return c(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},1236:function(t,n,r){var e=r(9781),o=r(5296),i=r(9114),u=r(5656),c=r(7593),a=r(6656),f=r(4664),l=Object.getOwnPropertyDescriptor;n.f=e?l:function(t,n){if(t=u(t),n=c(n,!0),f)try{return l(t,n)}catch(t){}if(a(t,n))return i(!o.f.call(t,n),t[n])}},8006:function(t,n,r){var e=r(6324),o=r(748).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},5181:function(t,n){n.f=Object.getOwnPropertySymbols},6324:function(t,n,r){var e=r(6656),o=r(5656),i=r(1318).indexOf,u=r(3501);t.exports=function(t,n){var r,c=o(t),a=0,f=[];for(r in c)!e(u,r)&&e(c,r)&&f.push(r);for(;n.length>a;)e(c,r=n[a++])&&(~i(f,r)||f.push(r));return f}},1956:function(t,n,r){var e=r(6324),o=r(748);t.exports=Object.keys||function(t){return e(t,o)}},5296:function(t,n){"use strict";var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!r.call({1:2},1);n.f=o?function(t){var n=e(this,t);return!!n&&n.enumerable}:r},3887:function(t,n,r){var e=r(5005),o=r(8006),i=r(5181),u=r(9670);t.exports=e("Reflect","ownKeys")||function(t){var n=o.f(u(t)),r=i.f;return r?n.concat(r(t)):n}},857:function(t,n,r){var e=r(7854);t.exports=e},1320:function(t,n,r){var e=r(7854),o=r(8880),i=r(6656),u=r(3505),c=r(2788),a=r(9909),f=a.get,l=a.enforce,s=String(String).split("String");(t.exports=function(t,n,r,c){var a=!!c&&!!c.unsafe,f=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof r&&("string"!=typeof n||i(r,"name")||o(r,"name",n),l(r).source=s.join("string"==typeof n?n:"")),t!==e?(a?!p&&t[n]&&(f=!0):delete t[n],f?t[n]=r:o(t,n,r)):f?t[n]=r:u(n,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||c(this)}))},7651:function(t,n,r){var e=r(4326),o=r(2261);t.exports=function(t,n){var r=t.exec;if("function"==typeof r){var i=r.call(t,n);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==e(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,n)}},2261:function(t,n,r){"use strict";var e,o,i=r(7066),u=r(2999),c=RegExp.prototype.exec,a=String.prototype.replace,f=c,l=(e=/a/,o=/b*/g,c.call(e,"a"),c.call(o,"a"),0!==e.lastIndex||0!==o.lastIndex),s=u.UNSUPPORTED_Y||u.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(l||p||s)&&(f=function(t){var n,r,e,o,u=this,f=s&&u.sticky,d=i.call(u),v=u.source,g=0,h=t;return f&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),h=String(t).slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==t[u.lastIndex-1])&&(v="(?: "+v+")",h=" "+h,g++),r=new RegExp("^(?:"+v+")",d)),p&&(r=new RegExp("^"+v+"$(?!\\s)",d)),l&&(n=u.lastIndex),e=c.call(f?r:u,h),f?e?(e.input=e.input.slice(g),e[0]=e[0].slice(g),e.index=u.lastIndex,u.lastIndex+=e[0].length):u.lastIndex=0:l&&e&&(u.lastIndex=u.global?e.index+e[0].length:n),p&&e&&e.length>1&&a.call(e[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(e[o]=void 0)})),e}),t.exports=f},7066:function(t,n,r){"use strict";var e=r(9670);t.exports=function(){var t=e(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},2999:function(t,n,r){"use strict";var e=r(7293);function o(t,n){return RegExp(t,n)}n.UNSUPPORTED_Y=e((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),n.BROKEN_CARET=e((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},4488:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:function(t,n,r){var e=r(7854),o=r(8880);t.exports=function(t,n){try{o(e,t,n)}catch(r){e[t]=n}return n}},6200:function(t,n,r){var e=r(2309),o=r(9711),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:function(t,n,r){var e=r(7854),o=r(3505),i="__core-js_shared__",u=e[i]||o(i,{});t.exports=u},2309:function(t,n,r){var e=r(1913),o=r(5465);(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.6.5",mode:e?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6707:function(t,n,r){var e=r(9670),o=r(3099),i=r(5112)("species");t.exports=function(t,n){var r,u=e(t).constructor;return void 0===u||null==(r=e(u)[i])?n:o(r)}},8710:function(t,n,r){var e=r(9958),o=r(4488),i=function(t){return function(n,r){var i,u,c=String(o(n)),a=e(r),f=c.length;return a<0||a>=f?t?"":void 0:(i=c.charCodeAt(a))<55296||i>56319||a+1===f||(u=c.charCodeAt(a+1))<56320||u>57343?t?c.charAt(a):i:t?c.slice(a,a+2):u-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},1400:function(t,n,r){var e=r(9958),o=Math.max,i=Math.min;t.exports=function(t,n){var r=e(t);return r<0?o(r+n,0):i(r,n)}},5656:function(t,n,r){var e=r(8361),o=r(4488);t.exports=function(t){return e(o(t))}},9958:function(t){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},7466:function(t,n,r){var e=r(9958),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},7908:function(t,n,r){var e=r(4488);t.exports=function(t){return Object(e(t))}},7593:function(t,n,r){var e=r(111);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},9711:function(t){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},3307:function(t,n,r){var e=r(133);t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:function(t,n,r){var e=r(7854),o=r(2309),i=r(6656),u=r(9711),c=r(133),a=r(3307),f=o("wks"),l=e.Symbol,s=a?l:l&&l.withoutSetter||u;t.exports=function(t){return i(f,t)||(c&&i(l,t)?f[t]=l[t]:f[t]=s("Symbol."+t)),f[t]}},9826:function(t,n,r){"use strict";var e=r(2109),o=r(2092).find,i=r(1223),u=r(9207),c="find",a=!0,f=u(c);c in[]&&Array(1).find((function(){a=!1})),e({target:"Array",proto:!0,forced:a||!f},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(c)},9600:function(t,n,r){"use strict";var e=r(2109),o=r(8361),i=r(5656),u=r(9341),c=[].join,a=o!=Object,f=u("join",",");e({target:"Array",proto:!0,forced:a||!f},{join:function(t){return c.call(i(this),void 0===t?",":t)}})},4916:function(t,n,r){"use strict";var e=r(2109),o=r(2261);e({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},3123:function(t,n,r){"use strict";var e=r(7007),o=r(7850),i=r(9670),u=r(4488),c=r(6707),a=r(1530),f=r(7466),l=r(7651),s=r(2261),p=r(7293),d=[].push,v=Math.min,g=4294967295,h=!p((function(){return!RegExp(g,"y")}));e("split",2,(function(t,n,r){var e;return e="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var e=String(u(this)),i=void 0===r?g:r>>>0;if(0===i)return[];if(void 0===t)return[e];if(!o(t))return n.call(e,t,i);for(var c,a,f,l=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,h=new RegExp(t.source,p+"g");(c=s.call(h,e))&&!((a=h.lastIndex)>v&&(l.push(e.slice(v,c.index)),c.length>1&&c.index<e.length&&d.apply(l,c.slice(1)),f=c[0].length,v=a,l.length>=i));)h.lastIndex===c.index&&h.lastIndex++;return v===e.length?!f&&h.test("")||l.push(""):l.push(e.slice(v)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:n.call(this,t,r)}:n,[function(n,r){var o=u(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,o){var u=r(e,t,this,o,e!==n);if(u.done)return u.value;var s=i(t),p=String(this),d=c(s,RegExp),x=s.unicode,y=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(h?"y":"g"),b=new d(h?s:"^(?:"+s.source+")",y),m=void 0===o?g:o>>>0;if(0===m)return[];if(0===p.length)return null===l(b,p)?[p]:[];for(var E=0,w=0,S=[];w<p.length;){b.lastIndex=h?w:0;var O,j=l(b,h?p:p.slice(w));if(null===j||(O=v(f(b.lastIndex+(h?0:w)),p.length))===E)w=a(p,w,x);else{if(S.push(p.slice(E,w)),S.length===m)return S;for(var P=1;P<=j.length-1;P++)if(S.push(j[P]),S.length===m)return S;w=E=O}}return S.push(p.slice(E)),S}]}),!h)},3609:function(t){"use strict";t.exports=jQuery}},n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},function(){"use strict";r(9826),r(9600),r(4916),r(3123);var t,n,e,o=r(3609);n=function(t,n){for(var r=t.split(" "),e=new Array,o=0;o<r.length;o++)e.push(r[o]+n);return e.join(" ")},e=function(t){var n,r;if(void 0!==t.clientX)n=t.clientX,r=t.clientY;else if(void 0!==t.screenX)n=t.screenX,r=t.screenY;else if(void 0!==t.targetTouches)n=t.targetTouches[0].pageX,r=t.targetTouches[0].pageY;else if(void 0===t.originalEvent){var e="";for(var o in t)e+=", "+o+": "+t[o];console.error("don't understand x and y for "+t.type+" event: "+e)}else void 0!==t.originalEvent.clientX?(n=t.originalEvent.clientX,r=t.originalEvent.clientY):void 0!==t.originalEvent.screenX?(n=t.originalEvent.screenX,r=t.originalEvent.screenY):void 0!==t.originalEvent.targetTouches&&(n=t.originalEvent.targetTouches[0].pageX,r=t.originalEvent.targetTouches[0].pageY);return{left:n,top:r}},(t=o).fn.dragscrollable=function(r){var o=t(this),i=t.extend({dragSelector:">:first",acceptPropagatedEvent:!0,preventDefault:!0,dragstart:"mousedown touchstart",dragcontinue:"mousemove touchmove",dragend:"mouseup touchend",dragMinDistance:5,namespace:".ds",scrollWindow:!1},r||{});i.dragstart=n(i.dragstart,i.namespace),i.dragcontinue=n(i.dragcontinue,i.namespace);var u,c=function(){return!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator)},a={dragStartHandler:function(n){return!!c()||!(n.which>1||!n.data.acceptPropagatedEvent&&n.target!=this)&&(n.data.firstCoord=e(n),n.data.lastCoord=n.data.firstCoord,o.bind(i.dragcontinue,n.data,a.dragContinueHandler),u=function(t){t.data=n.data,a.dragEndHandler(t)},t.each(i.dragend.split(" "),(function(t,n){o.get(0).addEventListener(n,u,!0)})),n.data.preventDefault?(n.preventDefault(),!1):void 0)},dragContinueHandler:function(n){if(c())return!0;var r=e(n),o=r.left-n.data.lastCoord.left,i=r.top-n.data.lastCoord.top,u=n.data.scrollable;return n.data.scrollWindow&&(u=t(window)),u.scrollLeft(u.scrollLeft()-o),u.scrollTop(u.scrollTop()-i),n.data.lastCoord=r,n.data.preventDefault?(n.preventDefault(),!1):void 0},dragEndHandler:function(n){if(c())return!0;o.unbind(i.dragcontinue).unbind(i.dragend),t.each(i.dragend.split(" "),(function(t,n){o.get(0).removeEventListener(n,u,!0)}));var r={left:Math.abs(n.data.lastCoord.left-n.data.firstCoord.left),top:Math.abs(n.data.lastCoord.top-n.data.firstCoord.top)},e=Math.max(r.left,r.top);return n.data.preventDefault&&e>i.dragMinDistance?(n.preventDefault(),n.stopImmediatePropagation(),n.stopPropagation(),!1):void 0}};return this.each((function(){var n={scrollable:t(this),acceptPropagatedEvent:i.acceptPropagatedEvent,preventDefault:i.preventDefault,scrollWindow:i.scrollWindow};t(this).find(i.dragSelector).bind(i.dragstart,n,a.dragStartHandler)}))},t.fn.removedragscrollable=function(n){return void 0===n&&(n=".ds"),this.each((function(){t(document).find("*").andSelf().unbind(n)}))}}()}();
!function(){var t={3099:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},1223:function(t,n,r){var e=r(5112),o=r(30),i=r(3070),u=e("unscopables"),c=Array.prototype;null==c[u]&&i.f(c,u,{configurable:!0,value:o(null)}),t.exports=function(t){c[u][t]=!0}},1530:function(t,n,r){"use strict";var e=r(8710).charAt;t.exports=function(t,n,r){return n+(r?e(t,n).length:1)}},9670:function(t,n,r){var e=r(111);t.exports=function(t){if(!e(t))throw TypeError(String(t)+" is not an object");return t}},1318:function(t,n,r){var e=r(5656),o=r(7466),i=r(1400),u=function(t){return function(n,r,u){var c,a=e(n),f=o(a.length),l=i(u,f);if(t&&r!=r){for(;f>l;)if((c=a[l++])!=c)return!0}else for(;f>l;l++)if((t||l in a)&&a[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},2092:function(t,n,r){var e=r(9974),o=r(8361),i=r(7908),u=r(7466),c=r(5417),a=[].push,f=function(t){var n=1==t,r=2==t,f=3==t,l=4==t,s=6==t,p=7==t,d=5==t||s;return function(v,g,h,x){for(var y,b,m=i(v),E=o(m),w=e(g,h,3),S=u(E.length),O=0,j=x||c,P=n?j(v,S):r||p?j(v,0):void 0;S>O;O++)if((d||O in E)&&(b=w(y=E[O],O,m),t))if(n)P[O]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return O;case 2:a.call(P,y)}else switch(t){case 4:return!1;case 7:a.call(P,y)}return s?-1:f||l?l:P}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},9341:function(t,n,r){"use strict";var e=r(7293);t.exports=function(t,n){var r=[][t];return!!r&&e((function(){r.call(null,n||function(){throw 1},1)}))}},9207:function(t,n,r){var e=r(9781),o=r(7293),i=r(6656),u=Object.defineProperty,c={},a=function(t){throw t};t.exports=function(t,n){if(i(c,t))return c[t];n||(n={});var r=[][t],f=!!i(n,"ACCESSORS")&&n.ACCESSORS,l=i(n,0)?n[0]:a,s=i(n,1)?n[1]:void 0;return c[t]=!!r&&!o((function(){if(f&&!e)return!0;var t={length:-1};f?u(t,1,{enumerable:!0,get:a}):t[1]=1,r.call(t,l,s)}))}},5417:function(t,n,r){var e=r(111),o=r(3157),i=r(5112)("species");t.exports=function(t,n){var r;return o(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!o(r.prototype)?e(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===n?0:n)}},4326:function(t){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},9920:function(t,n,r){var e=r(6656),o=r(3887),i=r(1236),u=r(3070);t.exports=function(t,n){for(var r=o(n),c=u.f,a=i.f,f=0;f<r.length;f++){var l=r[f];e(t,l)||c(t,l,a(n,l))}}},8880:function(t,n,r){var e=r(9781),o=r(3070),i=r(9114);t.exports=e?function(t,n,r){return o.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},9114:function(t){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},9781:function(t,n,r){var e=r(7293);t.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(t,n,r){var e=r(7854),o=r(111),i=e.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,n,r){var e=r(7854),o=r(1236).f,i=r(8880),u=r(1320),c=r(3505),a=r(9920),f=r(4705);t.exports=function(t,n){var r,l,s,p,d,v=t.target,g=t.global,h=t.stat;if(r=g?e:h?e[v]||c(v,{}):(e[v]||{}).prototype)for(l in n){if(p=n[l],s=t.noTargetGet?(d=o(r,l))&&d.value:r[l],!f(g?l:v+(h?".":"#")+l,t.forced)&&void 0!==s){if(typeof p==typeof s)continue;a(p,s)}(t.sham||s&&s.sham)&&i(p,"sham",!0),u(r,l,p,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:function(t,n,r){"use strict";r(4916);var e=r(1320),o=r(7293),i=r(5112),u=r(2261),c=r(8880),a=i("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),s=i("replace"),p=!!/./[s]&&""===/./[s]("a","$0"),d=!o((function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,n,r,s){var v=i(t),g=!o((function(){var n={};return n[v]=function(){return 7},7!=""[t](n)})),h=g&&!o((function(){var n=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[a]=function(){return r},r.flags="",r[v]=/./[v]),r.exec=function(){return n=!0,null},r[v](""),!n}));if(!g||!h||"replace"===t&&(!f||!l||p)||"split"===t&&!d){var x=/./[v],y=r(v,""[t],(function(t,n,r,e,o){return n.exec===u?g&&!o?{done:!0,value:x.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=y[0],m=y[1];e(String.prototype,t,b),e(RegExp.prototype,v,2==n?function(t,n){return m.call(t,this,n)}:function(t){return m.call(t,this)})}s&&c(RegExp.prototype[v],"sham",!0)}},9974:function(t,n,r){var e=r(3099);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 0:return function(){return t.call(n)};case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},5005:function(t,n,r){var e=r(857),o=r(7854),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,n){return arguments.length<2?i(e[t])||i(o[t]):e[t]&&e[t][n]||o[t]&&o[t][n]}},7854:function(t,n,r){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},6656:function(t){var n={}.hasOwnProperty;t.exports=function(t,r){return n.call(t,r)}},3501:function(t){t.exports={}},490:function(t,n,r){var e=r(5005);t.exports=e("document","documentElement")},4664:function(t,n,r){var e=r(9781),o=r(7293),i=r(317);t.exports=!e&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,n,r){var e=r(7293),o=r(4326),i="".split;t.exports=e((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},2788:function(t,n,r){var e=r(5465),o=Function.toString;"function"!=typeof e.inspectSource&&(e.inspectSource=function(t){return o.call(t)}),t.exports=e.inspectSource},9909:function(t,n,r){var e,o,i,u=r(8536),c=r(7854),a=r(111),f=r(8880),l=r(6656),s=r(5465),p=r(6200),d=r(3501),v=c.WeakMap;if(u){var g=s.state||(s.state=new v),h=g.get,x=g.has,y=g.set;e=function(t,n){return n.facade=t,y.call(g,t,n),n},o=function(t){return h.call(g,t)||{}},i=function(t){return x.call(g,t)}}else{var b=p("state");d[b]=!0,e=function(t,n){return n.facade=t,f(t,b,n),n},o=function(t){return l(t,b)?t[b]:{}},i=function(t){return l(t,b)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(n){var r;if(!a(n)||(r=o(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},3157:function(t,n,r){var e=r(4326);t.exports=Array.isArray||function(t){return"Array"==e(t)}},4705:function(t,n,r){var e=r(7293),o=/#|\.prototype\./,i=function(t,n){var r=c[u(t)];return r==f||r!=a&&("function"==typeof n?e(n):!!n)},u=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},a=i.NATIVE="N",f=i.POLYFILL="P";t.exports=i},111:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},1913:function(t){t.exports=!1},7850:function(t,n,r){var e=r(111),o=r(4326),i=r(5112)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},133:function(t,n,r){var e=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!e((function(){return!String(Symbol())}))},8536:function(t,n,r){var e=r(7854),o=r(2788),i=e.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},30:function(t,n,r){var e,o=r(9670),i=r(6048),u=r(748),c=r(3501),a=r(490),f=r(317),l=r(6200)("IE_PROTO"),s=function(){},p=function(t){return"<script>"+t+"<\/script>"},d=function(){try{e=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;d=e?function(t){t.write(p("")),t.close();var n=t.parentWindow.Object;return t=null,n}(e):((n=f("iframe")).style.display="none",a.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var r=u.length;r--;)delete d.prototype[u[r]];return d()};c[l]=!0,t.exports=Object.create||function(t,n){var r;return null!==t?(s.prototype=o(t),r=new s,s.prototype=null,r[l]=t):r=d(),void 0===n?r:i(r,n)}},6048:function(t,n,r){var e=r(9781),o=r(3070),i=r(9670),u=r(1956);t.exports=e?Object.defineProperties:function(t,n){i(t);for(var r,e=u(n),c=e.length,a=0;c>a;)o.f(t,r=e[a++],n[r]);return t}},3070:function(t,n,r){var e=r(9781),o=r(4664),i=r(9670),u=r(7593),c=Object.defineProperty;n.f=e?c:function(t,n,r){if(i(t),n=u(n,!0),i(r),o)try{return c(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},1236:function(t,n,r){var e=r(9781),o=r(5296),i=r(9114),u=r(5656),c=r(7593),a=r(6656),f=r(4664),l=Object.getOwnPropertyDescriptor;n.f=e?l:function(t,n){if(t=u(t),n=c(n,!0),f)try{return l(t,n)}catch(t){}if(a(t,n))return i(!o.f.call(t,n),t[n])}},8006:function(t,n,r){var e=r(6324),o=r(748).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},5181:function(t,n){n.f=Object.getOwnPropertySymbols},6324:function(t,n,r){var e=r(6656),o=r(5656),i=r(1318).indexOf,u=r(3501);t.exports=function(t,n){var r,c=o(t),a=0,f=[];for(r in c)!e(u,r)&&e(c,r)&&f.push(r);for(;n.length>a;)e(c,r=n[a++])&&(~i(f,r)||f.push(r));return f}},1956:function(t,n,r){var e=r(6324),o=r(748);t.exports=Object.keys||function(t){return e(t,o)}},5296:function(t,n){"use strict";var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!r.call({1:2},1);n.f=o?function(t){var n=e(this,t);return!!n&&n.enumerable}:r},3887:function(t,n,r){var e=r(5005),o=r(8006),i=r(5181),u=r(9670);t.exports=e("Reflect","ownKeys")||function(t){var n=o.f(u(t)),r=i.f;return r?n.concat(r(t)):n}},857:function(t,n,r){var e=r(7854);t.exports=e},1320:function(t,n,r){var e=r(7854),o=r(8880),i=r(6656),u=r(3505),c=r(2788),a=r(9909),f=a.get,l=a.enforce,s=String(String).split("String");(t.exports=function(t,n,r,c){var a,f=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof r&&("string"!=typeof n||i(r,"name")||o(r,"name",n),(a=l(r)).source||(a.source=s.join("string"==typeof n?n:""))),t!==e?(f?!d&&t[n]&&(p=!0):delete t[n],p?t[n]=r:o(t,n,r)):p?t[n]=r:u(n,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||c(this)}))},7651:function(t,n,r){var e=r(4326),o=r(2261);t.exports=function(t,n){var r=t.exec;if("function"==typeof r){var i=r.call(t,n);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==e(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,n)}},2261:function(t,n,r){"use strict";var e,o,i=r(7066),u=r(2999),c=RegExp.prototype.exec,a=String.prototype.replace,f=c,l=(e=/a/,o=/b*/g,c.call(e,"a"),c.call(o,"a"),0!==e.lastIndex||0!==o.lastIndex),s=u.UNSUPPORTED_Y||u.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(l||p||s)&&(f=function(t){var n,r,e,o,u=this,f=s&&u.sticky,d=i.call(u),v=u.source,g=0,h=t;return f&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),h=String(t).slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==t[u.lastIndex-1])&&(v="(?: "+v+")",h=" "+h,g++),r=new RegExp("^(?:"+v+")",d)),p&&(r=new RegExp("^"+v+"$(?!\\s)",d)),l&&(n=u.lastIndex),e=c.call(f?r:u,h),f?e?(e.input=e.input.slice(g),e[0]=e[0].slice(g),e.index=u.lastIndex,u.lastIndex+=e[0].length):u.lastIndex=0:l&&e&&(u.lastIndex=u.global?e.index+e[0].length:n),p&&e&&e.length>1&&a.call(e[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(e[o]=void 0)})),e}),t.exports=f},7066:function(t,n,r){"use strict";var e=r(9670);t.exports=function(){var t=e(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},2999:function(t,n,r){"use strict";var e=r(7293);function o(t,n){return RegExp(t,n)}n.UNSUPPORTED_Y=e((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),n.BROKEN_CARET=e((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},4488:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:function(t,n,r){var e=r(7854),o=r(8880);t.exports=function(t,n){try{o(e,t,n)}catch(r){e[t]=n}return n}},6200:function(t,n,r){var e=r(2309),o=r(9711),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:function(t,n,r){var e=r(7854),o=r(3505),i="__core-js_shared__",u=e[i]||o(i,{});t.exports=u},2309:function(t,n,r){var e=r(1913),o=r(5465);(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.8.0",mode:e?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6707:function(t,n,r){var e=r(9670),o=r(3099),i=r(5112)("species");t.exports=function(t,n){var r,u=e(t).constructor;return void 0===u||null==(r=e(u)[i])?n:o(r)}},8710:function(t,n,r){var e=r(9958),o=r(4488),i=function(t){return function(n,r){var i,u,c=String(o(n)),a=e(r),f=c.length;return a<0||a>=f?t?"":void 0:(i=c.charCodeAt(a))<55296||i>56319||a+1===f||(u=c.charCodeAt(a+1))<56320||u>57343?t?c.charAt(a):i:t?c.slice(a,a+2):u-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},1400:function(t,n,r){var e=r(9958),o=Math.max,i=Math.min;t.exports=function(t,n){var r=e(t);return r<0?o(r+n,0):i(r,n)}},5656:function(t,n,r){var e=r(8361),o=r(4488);t.exports=function(t){return e(o(t))}},9958:function(t){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},7466:function(t,n,r){var e=r(9958),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},7908:function(t,n,r){var e=r(4488);t.exports=function(t){return Object(e(t))}},7593:function(t,n,r){var e=r(111);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},9711:function(t){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},3307:function(t,n,r){var e=r(133);t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:function(t,n,r){var e=r(7854),o=r(2309),i=r(6656),u=r(9711),c=r(133),a=r(3307),f=o("wks"),l=e.Symbol,s=a?l:l&&l.withoutSetter||u;t.exports=function(t){return i(f,t)||(c&&i(l,t)?f[t]=l[t]:f[t]=s("Symbol."+t)),f[t]}},9826:function(t,n,r){"use strict";var e=r(2109),o=r(2092).find,i=r(1223),u=r(9207),c="find",a=!0,f=u(c);c in[]&&Array(1).find((function(){a=!1})),e({target:"Array",proto:!0,forced:a||!f},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(c)},9600:function(t,n,r){"use strict";var e=r(2109),o=r(8361),i=r(5656),u=r(9341),c=[].join,a=o!=Object,f=u("join",",");e({target:"Array",proto:!0,forced:a||!f},{join:function(t){return c.call(i(this),void 0===t?",":t)}})},4916:function(t,n,r){"use strict";var e=r(2109),o=r(2261);e({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},3123:function(t,n,r){"use strict";var e=r(7007),o=r(7850),i=r(9670),u=r(4488),c=r(6707),a=r(1530),f=r(7466),l=r(7651),s=r(2261),p=r(7293),d=[].push,v=Math.min,g=4294967295,h=!p((function(){return!RegExp(g,"y")}));e("split",2,(function(t,n,r){var e;return e="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var e=String(u(this)),i=void 0===r?g:r>>>0;if(0===i)return[];if(void 0===t)return[e];if(!o(t))return n.call(e,t,i);for(var c,a,f,l=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,h=new RegExp(t.source,p+"g");(c=s.call(h,e))&&!((a=h.lastIndex)>v&&(l.push(e.slice(v,c.index)),c.length>1&&c.index<e.length&&d.apply(l,c.slice(1)),f=c[0].length,v=a,l.length>=i));)h.lastIndex===c.index&&h.lastIndex++;return v===e.length?!f&&h.test("")||l.push(""):l.push(e.slice(v)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:n.call(this,t,r)}:n,[function(n,r){var o=u(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,o){var u=r(e,t,this,o,e!==n);if(u.done)return u.value;var s=i(t),p=String(this),d=c(s,RegExp),x=s.unicode,y=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(h?"y":"g"),b=new d(h?s:"^(?:"+s.source+")",y),m=void 0===o?g:o>>>0;if(0===m)return[];if(0===p.length)return null===l(b,p)?[p]:[];for(var E=0,w=0,S=[];w<p.length;){b.lastIndex=h?w:0;var O,j=l(b,h?p:p.slice(w));if(null===j||(O=v(f(b.lastIndex+(h?0:w)),p.length))===E)w=a(p,w,x);else{if(S.push(p.slice(E,w)),S.length===m)return S;for(var P=1;P<=j.length-1;P++)if(S.push(j[P]),S.length===m)return S;w=E=O}}return S.push(p.slice(E)),S}]}),!h)},3609:function(t){"use strict";t.exports=jQuery}},n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},function(){"use strict";r(9826),r(9600),r(4916),r(3123);var t,n,e,o=r(3609);n=function(t,n){for(var r=t.split(" "),e=new Array,o=0;o<r.length;o++)e.push(r[o]+n);return e.join(" ")},e=function(t){var n,r;if(void 0!==t.clientX)n=t.clientX,r=t.clientY;else if(void 0!==t.screenX)n=t.screenX,r=t.screenY;else if(void 0!==t.targetTouches)n=t.targetTouches[0].pageX,r=t.targetTouches[0].pageY;else if(void 0===t.originalEvent){var e="";for(var o in t)e+=", "+o+": "+t[o];console.error("don't understand x and y for "+t.type+" event: "+e)}else void 0!==t.originalEvent.clientX?(n=t.originalEvent.clientX,r=t.originalEvent.clientY):void 0!==t.originalEvent.screenX?(n=t.originalEvent.screenX,r=t.originalEvent.screenY):void 0!==t.originalEvent.targetTouches&&(n=t.originalEvent.targetTouches[0].pageX,r=t.originalEvent.targetTouches[0].pageY);return{left:n,top:r}},(t=o).fn.dragscrollable=function(r){var o=t(this),i=t.extend({dragSelector:">:first",acceptPropagatedEvent:!0,preventDefault:!0,dragstart:"mousedown touchstart",dragcontinue:"mousemove touchmove",dragend:"mouseup touchend",dragMinDistance:5,namespace:".ds",scrollWindow:!1},r||{});i.dragstart=n(i.dragstart,i.namespace),i.dragcontinue=n(i.dragcontinue,i.namespace);var u,c=function(){return!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator)},a={dragStartHandler:function(n){return!!c()||!(n.which>1||!n.data.acceptPropagatedEvent&&n.target!=this)&&(n.data.firstCoord=e(n),n.data.lastCoord=n.data.firstCoord,o.bind(i.dragcontinue,n.data,a.dragContinueHandler),u=function(t){t.data=n.data,a.dragEndHandler(t)},t.each(i.dragend.split(" "),(function(t,n){o.get(0).addEventListener(n,u,!0)})),n.data.preventDefault?(n.preventDefault(),!1):void 0)},dragContinueHandler:function(n){if(c())return!0;var r=e(n),o=r.left-n.data.lastCoord.left,i=r.top-n.data.lastCoord.top,u=n.data.scrollable;return n.data.scrollWindow&&(u=t(window)),u.scrollLeft(u.scrollLeft()-o),u.scrollTop(u.scrollTop()-i),n.data.lastCoord=r,n.data.preventDefault?(n.preventDefault(),!1):void 0},dragEndHandler:function(n){if(c())return!0;o.unbind(i.dragcontinue).unbind(i.dragend),t.each(i.dragend.split(" "),(function(t,n){o.get(0).removeEventListener(n,u,!0)}));var r={left:Math.abs(n.data.lastCoord.left-n.data.firstCoord.left),top:Math.abs(n.data.lastCoord.top-n.data.firstCoord.top)},e=Math.max(r.left,r.top);return n.data.preventDefault&&e>i.dragMinDistance?(n.preventDefault(),n.stopImmediatePropagation(),n.stopPropagation(),!1):void 0}};return this.each((function(){var n={scrollable:t(this),acceptPropagatedEvent:i.acceptPropagatedEvent,preventDefault:i.preventDefault,scrollWindow:i.scrollWindow};t(this).find(i.dragSelector).bind(i.dragstart,n,a.dragStartHandler)}))},t.fn.removedragscrollable=function(n){return void 0===n&&(n=".ds"),this.each((function(){t(document).find("*").andSelf().unbind(n)}))}}()}();

@@ -1,2 +0,2 @@

(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[951],{930:function(e,t,n){"use strict";var o={};function r(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null}function a(e,t,n,o,r,a){return document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+(n?"; expires=".concat(n.toUTCString()):"")+(r?"; domain=".concat(r):"")+(o?"; path=".concat(o):"")+(a?"; secure":""),!0}function i(e,t,n){return!!hasItem(e)&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain=".concat(n):"")+(t?"; path=".concat(t):""),!0)}n.r(o),n.d(o,{getItem:function(){return r},removeItem:function(){return i},setItem:function(){return a}}),n(4603),n(4916),n(4723),n(9714),n(5306);var u,c=n(3609);BookReader.docCookies=o,c.extend(BookReader.defaultOptions,{enablePageResume:!0,resumeCookiePath:null}),BookReader.prototype.init=(u=BookReader.prototype.init,function(){var e=this;u.call(this),this.options.enablePageResume&&this.bind(BookReader.eventNames.fragmentChange,(function(){var t=e.paramsFromCurrent();e.updateResumeValue(t.index)}))}),BookReader.prototype.getResumeValue=function(){var e=BookReader.docCookies.getItem("br-resume");return null!==e?parseInt(e):null},BookReader.prototype.getCookiePath=function(e){return e.match(".+?(?=/page/|/mode/|$)")[0]},BookReader.prototype.updateResumeValue=function(e,t){var n=new Date(+new Date+12096e5),o=this.options.resumeCookiePath||this.getCookiePath(window.location.pathname);BookReader.docCookies.setItem(t||"br-resume",e,n,o,null,!1)}},9587:function(e,t,n){var o=n(111),r=n(7674);e.exports=function(e,t,n){var a,i;return r&&"function"==typeof(a=t.constructor)&&a!==n&&o(i=a.prototype)&&i!==n.prototype&&r(e,i),e}},6340:function(e,t,n){"use strict";var o=n(5005),r=n(3070),a=n(5112),i=n(9781),u=a("species");e.exports=function(e){var t=o(e),n=r.f;i&&t&&!t[u]&&n(t,u,{configurable:!0,get:function(){return this}})}},4603:function(e,t,n){var o=n(9781),r=n(7854),a=n(4705),i=n(9587),u=n(3070).f,c=n(8006).f,s=n(7850),p=n(7066),f=n(2999),d=n(1320),l=n(7293),m=n(9909).set,h=n(6340),g=n(5112)("match"),v=r.RegExp,k=v.prototype,R=/a/g,C=/a/g,x=new v(R)!==R,I=f.UNSUPPORTED_Y;if(o&&a("RegExp",!x||I||l((function(){return C[g]=!1,v(R)!=R||v(C)==C||"/a/i"!=v(R,"i")})))){for(var y=function(e,t){var n,o=this instanceof y,r=s(e),a=void 0===t;if(!o&&r&&e.constructor===y&&a)return e;x?r&&!a&&(e=e.source):e instanceof y&&(a&&(t=p.call(e)),e=e.source),I&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var u=i(x?new v(e,t):v(e,t),o?this:k,y);return I&&n&&m(u,{sticky:n}),u},b=function(e){e in y||u(y,e,{configurable:!0,get:function(){return v[e]},set:function(t){v[e]=t}})},w=c(v),B=0;w.length>B;)b(w[B++]);k.constructor=y,y.prototype=k,d(r,"RegExp",y)}h("RegExp")},4723:function(e,t,n){"use strict";var o=n(7007),r=n(9670),a=n(7466),i=n(4488),u=n(1530),c=n(7651);o("match",1,(function(e,t,n){return[function(t){var n=i(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var i=r(e),s=String(this);if(!i.global)return c(i,s);var p=i.unicode;i.lastIndex=0;for(var f,d=[],l=0;null!==(f=c(i,s));){var m=String(f[0]);d[l]=m,""===m&&(i.lastIndex=u(s,a(i.lastIndex),p)),l++}return 0===l?null:d}]}))}},0,[[930,898]]]);
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[951],{930:function(e,t,n){"use strict";var o={};function r(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null}function a(e,t,n,o,r,a){return document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+(n?"; expires=".concat(n.toUTCString()):"")+(r?"; domain=".concat(r):"")+(o?"; path=".concat(o):"")+(a?"; secure":""),!0}function i(e,t,n){return!!hasItem(e)&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain=".concat(n):"")+(t?"; path=".concat(t):""),!0)}n.r(o),n.d(o,{getItem:function(){return r},removeItem:function(){return i},setItem:function(){return a}}),n(4916),n(4723),n(4603),n(9714),n(5306);var u,c=n(3609);BookReader.docCookies=o,c.extend(BookReader.defaultOptions,{enablePageResume:!0,resumeCookiePath:null}),BookReader.prototype.init=(u=BookReader.prototype.init,function(){var e=this;u.call(this),this.options.enablePageResume&&this.bind(BookReader.eventNames.fragmentChange,(function(){var t=e.paramsFromCurrent();e.updateResumeValue(t.index)}))}),BookReader.prototype.getResumeValue=function(){var e=BookReader.docCookies.getItem("br-resume");return null!==e?parseInt(e):null},BookReader.prototype.getCookiePath=function(e){return e.match(".+?(?=/page/|/mode/|$)")[0]},BookReader.prototype.updateResumeValue=function(e,t){var n=new Date(+new Date+12096e5),o=this.options.resumeCookiePath||this.getCookiePath(window.location.pathname);BookReader.docCookies.setItem(t||"br-resume",e,n,o,null,!1)}},9587:function(e,t,n){var o=n(111),r=n(7674);e.exports=function(e,t,n){var a,i;return r&&"function"==typeof(a=t.constructor)&&a!==n&&o(i=a.prototype)&&i!==n.prototype&&r(e,i),e}},6340:function(e,t,n){"use strict";var o=n(5005),r=n(3070),a=n(5112),i=n(9781),u=a("species");e.exports=function(e){var t=o(e),n=r.f;i&&t&&!t[u]&&n(t,u,{configurable:!0,get:function(){return this}})}},4603:function(e,t,n){var o=n(9781),r=n(7854),a=n(4705),i=n(9587),u=n(3070).f,c=n(8006).f,s=n(7850),p=n(7066),f=n(2999),d=n(1320),l=n(7293),m=n(9909).set,h=n(6340),g=n(5112)("match"),v=r.RegExp,k=v.prototype,R=/a/g,C=/a/g,x=new v(R)!==R,I=f.UNSUPPORTED_Y;if(o&&a("RegExp",!x||I||l((function(){return C[g]=!1,v(R)!=R||v(C)==C||"/a/i"!=v(R,"i")})))){for(var y=function(e,t){var n,o=this instanceof y,r=s(e),a=void 0===t;if(!o&&r&&e.constructor===y&&a)return e;x?r&&!a&&(e=e.source):e instanceof y&&(a&&(t=p.call(e)),e=e.source),I&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var u=i(x?new v(e,t):v(e,t),o?this:k,y);return I&&n&&m(u,{sticky:n}),u},b=function(e){e in y||u(y,e,{configurable:!0,get:function(){return v[e]},set:function(t){v[e]=t}})},w=c(v),B=0;w.length>B;)b(w[B++]);k.constructor=y,y.prototype=k,d(r,"RegExp",y)}h("RegExp")},4723:function(e,t,n){"use strict";var o=n(7007),r=n(9670),a=n(7466),i=n(4488),u=n(1530),c=n(7651);o("match",1,(function(e,t,n){return[function(t){var n=i(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var i=r(e),s=String(this);if(!i.global)return c(i,s);var p=i.unicode;i.lastIndex=0;for(var f,d=[],l=0;null!==(f=c(i,s));){var m=String(f[0]);d[l]=m,""===m&&(i.lastIndex=u(s,a(i.lastIndex),p)),l++}return 0===l?null:d}]}))}},0,[[930,898]]]);
//# sourceMappingURL=plugin.resume.js.map

@@ -1,2 +0,2 @@

(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[73],{2728:function(e,t,n){"use strict";n(2222),n(2526),n(9826),n(1817),n(9554),n(2165),n(2772),n(9600),n(1249),n(7042),n(1038),n(4603),n(6992),n(4916),n(4986),n(9714),n(5827),n(5306),n(4765),n(5212),n(4747),n(8309),n(9601),n(1539),n(8674),n(8783),n(3948),n(285),n(5666);var r=n(3609);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,r.key,r)}}var i,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.selector?(this.br=t.br,this.matcher=new RegExp("{{{(.+?)}}}","g"),this.matches=[],this.cacheDOMElements(t.selector),this.bindEvents()):console.warn("BookReader::Search - SearchView must be passed a valid CSS selector")}var t,n;return t=e,(n=[{key:"cacheDOMElements",value:function(e){this.dom={},this.dom.searchTray=this.renderSearchTray(e),this.dom.results=this.dom.searchTray.querySelector('[data-id="results"]'),this.dom.resultsCount=this.dom.searchTray.querySelector('[data-id="results_count"]'),this.dom.searchField=this.dom.searchTray.querySelector('[name="query"]'),this.dom.searchPending=this.dom.searchTray.querySelector('[data-id="searchPending"]'),this.dom.mobileSearch=this.buildMobileDrawer(),this.dom.toolbarSearch=this.buildToolbarSearch()}},{key:"toggleSearchTray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dom.searchTray.classList.contains("hidden");this.dom.searchTray.classList.toggle("hidden",!e)}},{key:"toggleResultsCount",value:function(e){this.dom.resultsCount.classList.toggle("visible",e)}},{key:"updateResultsCount",value:function(e){this.dom.resultsCount.innerText="(".concat(e," result").concat(1!=e?"s":"",")"),this.toggleResultsCount(!0)}},{key:"setQuery",value:function(e){this.br.$('[name="query"]').val(e)}},{key:"emptyMatches",value:function(){this.dom.results.innerHTML="",this.matches=[]}},{key:"removeResultPins",value:function(){this.br.$(".BRnavpos .BRsearch").remove()}},{key:"clearSearchFieldAndResults",value:function(){this.br.removeSearchResults(),this.toggleResultsCount(!1),this.removeResultPins(),this.emptyMatches(),this.setQuery(""),this.teardownSearchNavigation(),this.br.trigger("SearchResultsCleared")}},{key:"toggleSidebar",value:function(){this.br.trigger("ToggleSearchMenu")}},{key:"renderSearchTray",value:function(e){var t=document.createElement("div");return t.setAttribute("id",e.replace(/^#/,"")),t.innerHTML='\n <header>\n <div>\n <h3>Search inside</h3>\n <p data-id="results_count"></p>\n </div>\n <a href="#" class="close"></a>\n </header>\n <form action="" method="get">\n <fieldset>\n <input name="all_files" id="all_files" type="checkbox" />\n <label class="checkbox" for="all_files">Search all files</label>\n <input type="search" name="query" placeholder="Enter a search term" />\n </fieldset>\n </form>\n <div data-id="searchPending" id="search_pending">\n <p>Your search results will appear below</p>\n <div class="loader tc mt20"></div>\n </div>\n <ul data-id="results"></ul>\n ',t}},{key:"renderSearchNavigation",value:function(){var e="BRsearch-navigation";r(".BRnav").before('\n <div class="'.concat(e,'">\n <button class="toggle-sidebar">\n <h4>\n <span class="icon icon-search"></span> Results\n </h4>\n </button>\n <div class="pagination">\n <button class="prev" title="Previous result"><span class="icon icon-chevron hflip"></span></button>\n <span data-id="resultsCount">').concat(this.resultsPosition(),'</span>\n <button class="next" title="Next result"><span class="icon icon-chevron"></button>\n </div>\n <button class="clear" title="Clear search results">\n <span class="icon icon-close"></span>\n </button>\n </div>\n ')),this.dom.searchNavigation=r(".".concat(e))}},{key:"resultsPosition",value:function(){var e="".concat(this.matches.length," result").concat(1===this.matches.length?"":"s");return~this.currentMatchIndex&&(e="".concat(this.currentMatchIndex+1," / ").concat(this.matches.length)),e}},{key:"bindSearchNavigationEvents",value:function(){if(this.dom.searchNavigation){var e="searchNavigation";this.dom.searchNavigation.on("click.".concat(e),".clear",this.clearSearchFieldAndResults.bind(this)).on("click.".concat(e),".prev",this.showPrevResult.bind(this)).on("click.".concat(e),".next",this.showNextResult.bind(this)).on("click.".concat(e),".toggle-sidebar",this.toggleSidebar.bind(this)).on("click.".concat(e),!1)}}},{key:"showPrevResult",value:function(){0!==this.currentMatchIndex&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,n){return t[0]>n}))+1),this.br.$(".BRnavline .BRsearch").eq(--this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"showNextResult",value:function(){this.currentMatchIndex+1!==this.matches.length&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,n){return e[e.length-1]>n}))-1),this.br.$(".BRnavline .BRsearch").eq(++this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"getClosestMatchIndex",value:function(e){var t=function t(n,r){if(1===n.length)return n[0];var a=n.slice(0,n.length/2),i=n.slice(n.length/2);return t(e(a,i,r)?a:i,r)}(this.matches.map((function(e){return e.par[0].page})),this.br.currentIndex()+1);return this.matches.indexOf(this.matches.find((function(e){return e.par[0].page===t})))}},{key:"updateResultsPosition",value:function(){this.dom.searchNavigation.find("[data-id=resultsCount]").text(this.resultsPosition())}},{key:"updateSearchNavigationButtons",value:function(){this.dom.searchNavigation.find(".prev").attr("disabled",!this.currentMatchIndex),this.dom.searchNavigation.find(".next").attr("disabled",this.currentMatchIndex+1===this.matches.length)}},{key:"teardownSearchNavigation",value:function(){this.dom.searchNavigation||(this.dom.searchNavigation=r(".BRsearch-navigation")),this.dom.searchNavigation.length&&(this.dom.searchNavigation.off(".searchNavigation").remove(),this.dom.searchNavigation=null,this.br.resize())}},{key:"setCurrentMatchIndex",value:function(){var e;this.br.mode!==this.br.constModeThumb?(e=this.br.mode===this.br.constMode2up?this.find2upMatchingSearchResult():this.find1upMatchingSearchResult(),this.currentMatchIndex=this.matches.indexOf(e)):this.currentMatchIndex=-1}},{key:"find1upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br.currentIndex()===t.par[0].page-1}))}},{key:"find2upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br._isIndexDisplayed(t.par[0].page-1)}))}},{key:"updateSearchNavigation",value:function(){this.matches.length&&(this.setCurrentMatchIndex(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"renderMatches",value:function(e){var t=this,n=e.map((function(e){return'\n <li data-page="'.concat(e.par[0].page,'" data-page-index="').concat(t.br.leafNumToIndex(e.par[0].page),'">\n <h4>Page ').concat(e.par[0].page,"</h4>\n <p>").concat(e.text.replace(t.matcher,"<mark>$1</mark>"),"</p>\n </li>\n ")}));this.dom.results.innerHTML=n.join("")}},{key:"togglePinsFor",value:function(e){var t=e?"visible":"hidden";this.br.refs.$BRfooter.find(".BRsearch").css({visibility:t})}},{key:"buildMobileDrawer",value:function(){var e=document.createElement("li");return e.innerHTML='\n <span>\n <span class="DrawerIconWrapper">\n <img class="DrawerIcon" src="'.concat(this.br.imagesBaseURL,'icon_search_button.svg" />\n </span>\n Search\n </span>\n <div data-id="search_slot">\n </div>\n '),e.querySelector('[data-id="search_slot"]').appendChild(this.dom.searchTray),e.classList.add("BRmobileMenu__search"),e}},{key:"buildToolbarSearch",value:function(){var e=document.createElement("span");return e.classList.add("BRtoolbarSection","BRtoolbarSectionSearch"),e.innerHTML='\n <form class="BRbooksearch desktop">\n <input type="search" name="query" class="BRsearchInput" value="" placeholder="Search inside"/>\n <button type="submit" class="BRsearchSubmit">\n <img src="'.concat(this.br.imagesBaseURL,'icon_search_button.svg" />\n </button>\n </form>\n '),e}},{key:"renderPins",value:function(e){var t=this;e.forEach((function(e){var n=e.text,a=t.br.leafNumToIndex(e.par[0].page),i=t.br.getPageNum(a),o=t.br.constructor.util.cssPercentage(a,t.br.getNumLeafs()-1),s=n.replace(t.matcher,"<b>$1</b>"),c="";n.length>100&&(c=n.replace(/^(.{100}[^\s]*).*/,"$1").replace(t.matcher,"<b>$1</b>")+"..."),r("<div>").addClass("BRsearch").css({left:o}).attr("title","Search result").append('\n <div class="BRquery">\n <div>'.concat(c||s,"</div>\n <div>").concat("Page"," ").concat(i,"</div>\n </div>\n ")).data({pageIndex:a}).appendTo(t.br.$(".BRnavline")).hover((function(e){var t=e.currentTarget,n=t.querySelector(".BRquery"),a=n.getBoundingClientRect(),i=t.getBoundingClientRect(),o=2*parseInt(getComputedStyle(n).paddingLeft);a.x-o<0&&n.style.setProperty("transform","translateX(-".concat(i.left-o,"px)")),r(".BRsearch,.BRchapter").removeClass("front"),r(e.target).addClass("front")}),(function(e){return r(e.target).removeClass("front")})).click(function(e){this.br._searchPluginGoToResult(+r(e.target).data("pageIndex")),this.br.updateSearchHilites()}.bind(t))}))}},{key:"toggleSearchPending",value:function(e){this.dom.searchPending.classList.toggle("visible",e),e?this.br.showProgressPopup("Search results will appear below..."):this.br.removeProgressPopup()}},{key:"renderErrorModal",value:function(){this.renderModalMessage("\n Sorry, there was an error with your search.\n <br />\n The text may still be processing.\n "),this.delayModalRemovalFor(4e3)}},{key:"renderBookNotIndexedModal",value:function(){this.renderModalMessage("\n <p>\n This book hasn't been indexed for searching yet.\n We've just started indexing it, so search should be available soon.\n <br />\n Please try again later. Thanks!\n </p>\n "),this.delayModalRemovalFor(5e3)}},{key:"renderResultsEmptyModal",value:function(){this.renderModalMessage("No matches were found."),this.delayModalRemovalFor(2e3)}},{key:"renderModalMessage",value:function(e){var t=document.createElement("div");t.classList.add("BRprogresspopup","search_modal"),t.innerHTML=e,document.querySelector(this.br.el).append(t)}},{key:"delayModalRemovalFor",value:function(e){setTimeout(this.br.removeProgressPopup.bind(this.br),e)}},{key:"openMobileMenu",value:function(){this.br.refs.$mmenu.data("mmenu").open()}},{key:"closeMobileMenu",value:function(){this.br.refs.$mmenu.data("mmenu").close()}},{key:"submitHandler",value:function(e){e.preventDefault();var t=e.target.querySelector('[name="query"]').value;return!!t.length&&(this.br.search(t),this.dom.searchField.blur(),this.emptyMatches(),this.toggleSearchPending(!0),!1)}},{key:"handleSearchCallback",value:function(e,t){var n=this,a=t.results,i=t.options;this.matches=a.matches,this.setCurrentMatchIndex(),this.teardownSearchNavigation(),this.renderSearchNavigation(),this.bindSearchNavigationEvents(),this.renderMatches(a.matches),this.renderPins(a.matches),this.updateResultsCount(a.matches.length),this.toggleSearchPending(!1),i.goToFirstResult?r(document).one("BookReader:pageChanged",(function(){n.br.resize()})):this.br.resize()}},{key:"handleNavToggledCallback",value:function(e){var t=this.br.navigationIsVisible();this.togglePinsFor(t),this.toggleSearchTray(!!t&&!!this.dom.results.querySelector("li"))}},{key:"handleSearchStarted",value:function(){this.emptyMatches(),this.br.removeSearchHilites(),this.removeResultPins(),this.toggleSearchPending(!0),this.teardownSearchNavigation(),this.setQuery(this.br.searchTerm)}},{key:"handleSearchCallbackError",value:function(){this.toggleSearchPending(!1),this.renderErrorModal()}},{key:"handleSearchCallbackBookNotIndexed",value:function(){this.toggleSearchPending(!1),this.renderBookNotIndexedModal()}},{key:"handleSearchCallbackEmpty",value:function(){this.toggleSearchPending(!1),this.renderResultsEmptyModal()}},{key:"bindEvents",value:function(){var e=this,t="BookReader:";r(document).on("".concat(t,"SearchCallback"),this.handleSearchCallback.bind(this)).on("".concat(t,"navToggled"),this.handleNavToggledCallback.bind(this)).on("".concat(t,"SearchStarted"),this.handleSearchStarted.bind(this)).on("".concat(t,"SearchCallbackError"),this.handleSearchCallbackError.bind(this)).on("".concat(t,"SearchCallbackBookNotIndexed"),this.handleSearchCallbackBookNotIndexed.bind(this)).on("".concat(t,"SearchCallbackEmpty"),this.handleSearchCallbackEmpty.bind(this)).on("".concat(t,"pageChanged"),this.updateSearchNavigation.bind(this)),this.dom.searchTray.addEventListener("submit",this.submitHandler.bind(this)),this.dom.toolbarSearch.querySelector("form").addEventListener("submit",this.submitHandler.bind(this)),this.dom.searchField.addEventListener("search",(function(){e.dom.searchField.value||e.clearSearchFieldAndResults()})),r(this.dom.results).on("click","li",(function(t){e.br._searchPluginGoToResult(+t.currentTarget.dataset.pageIndex),e.br.updateSearchHilites(),e.closeMobileMenu()}))}}])&&a(t.prototype,n),e}(),s=n(3609),c=n(3609);function h(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.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)?u(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 i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,a)}s.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookId:"",subPrefix:"",bookPath:"",enableSearch:!0,searchInsideUrl:"/fulltext/inside.php",initialSearchTerm:null}),BookReader.prototype.setup=(i=BookReader.prototype.setup,function(e){i.call(this,e),this.searchTerm="",this.searchResults=null,this.searchInsideUrl=e.searchInsideUrl,this.enableSearch=e.enableSearch,this.goToFirstResult=!1,this.bookId=e.bookId,this.server=e.server,this.subPrefix=e.subPrefix,this.bookPath=e.bookPath,this.searchView||(this.searchView=new o({br:this,selector:"#BRsearch_tray"}))}),BookReader.prototype.init=function(e){return function(){e.call(this),this.options.enableSearch&&this.options.initialSearchTerm&&this.search(this.options.initialSearchTerm,{goToFirstResult:this.goToFirstResult,suppressFragmentChange:!0})}}(BookReader.prototype.init),BookReader.prototype.buildMobileDrawerElement=function(e){return function(){var t=e.call(this);if(this.enableSearch)return this.searchView.dom.mobileSearch&&t.find(".BRmobileMenu__moreInfoRow").after(this.searchView.dom.mobileSearch),t}}(BookReader.prototype.buildMobileDrawerElement),BookReader.prototype.buildToolbarElement=function(e){return function(){var t=e.call(this);if(this.enableSearch)return this.searchView.dom.toolbarSearch&&t.find(".BRtoolbarSectionInfo").after(this.searchView.dom.toolbarSearch),t}}(BookReader.prototype.buildToolbarElement),BookReader.prototype.search=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={goToFirstResult:!1,disablePopup:!1,suppressFragmentChange:!1,error:null,success:null},a=s.extend({},r,n);this.suppressFragmentChange=a.suppressFragmentChange,this.searchTerm=t.replace(/\//g," "),a.suppressFragmentChange||this.trigger(BookReader.eventNames.fragmentChange);var i=this.server.replace(/:.+/,""),o="https://".concat(i).concat(this.searchInsideUrl,"?"),h=this.bookPath,u="/".concat(this.subPrefix);this.bookPath.length-this.bookPath.lastIndexOf(u)==u.length&&(h=this.bookPath.substr(0,this.bookPath.length-u.length));var l={item_id:this.bookId,doc:this.subPrefix,path:h,q:t},d=c.param(l).replace(/%2F/g,"/"),f="".concat(o).concat(d),p=function(t){var n=t.error||!t.matches.length,r="function"==typeof a.error,i="function"==typeof a.success;n?r?a.error.call(e,t,a):e.BRSearchCallbackError(t,a):i?a.success.call(e,t,a):e.BRSearchCallback(t,a)};return this.trigger("SearchStarted",{term:this.searchTerm}),c.ajax({url:f,dataType:"jsonp"}).then(p)},BookReader.prototype.BRSearchCallback=function(e,t){this.searchResults=e,this.updateSearchHilites(),this.removeProgressPopup(),t.goToFirstResult&&this._searchPluginGoToResult(e.matches[0].par[0].page),this.trigger("SearchCallback",{results:e,options:t,instance:this})},BookReader.prototype.BRSearchCallbackError=function(e){this._BRSearchCallbackError(e)},BookReader.prototype._BRSearchCallbackError=function(e){this.searchResults=e;var t={term:this.searchTerm,instance:this};if(e.error){var n=Object.assign({},t,{results:e});this.trigger("SearchCallbackError",n)}else if(0==e.matches.length){if(!1===e.indexed)return void this.trigger("SearchCallbackBookNotIndexed",t);this.trigger("SearchCallbackEmpty",t)}},BookReader.prototype.updateSearchHilites=function(){this.constMode2up!=this.mode?this.updateSearchHilites1UP():this.updateSearchHilites2UP()},BookReader.prototype.updateSearchHilites1UP=function(){var e=this,t=this.searchResults;null!=t&&t.matches.forEach((function(t){t.par[0].boxes.forEach((function(t){var n=e.leafNumToIndex(t.page);if(s.inArray(n,e.displayedIndices)>=0){t.div||(t.div=document.createElement("div"),c(t.div).prop("className","BookReaderSearchHilite").appendTo(e.$(".pagediv".concat(n))));var r={width:"".concat((t.r-t.l)/e.reduce,"px"),height:"".concat((t.b-t.t)/e.reduce,"px"),left:"".concat(t.l/e.reduce,"px"),top:"".concat(t.t/e.reduce,"px")};c(t.div).css(r)}else t.div&&(c(t.div).remove(),t.div=null)}))}))},BookReader.prototype.updateSearchHilites2UP=function(){var e=this,t=this.searchResults;null!==t&&t.matches.forEach((function(t){t.par[0].boxes.forEach((function(n){var r=e.leafNumToIndex(t.par[0].page),a=s.inArray(r,e.displayedIndices)>=0,i=e._models.book.getPage(r).isViewable;a&&i?(n.div||(n.div=document.createElement("div"),c(n.div).addClass("BookReaderSearchHilite").appendTo(e.refs.$brTwoPageView)),e.setHilightCss2UP(n.div,r,n.l,n.r,n.t,n.b)):n.div&&(c(n.div).remove(),n.div=null)}))}))},BookReader.prototype.removeSearchHilites=function(){var e=this.searchResults;null!=e&&e.matches&&e.matches.forEach((function(e){e.par[0].boxes.forEach((function(e){null!=e.div&&(c(e.div).remove(),e.div=null)}))}))},BookReader.prototype._searchPluginGoToResult=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._models.book,r=n.getPage(t),a=!1,r.isViewable){e.next=10;break}return e.next=6,fetch("/services/bookreader/request_page?"+new URLSearchParams({id:this.options.bookId,subprefix:this.options.subPrefix,leafNum:r.leafNum})).then((function(e){return e.json()}));case 6:i=e.sent,o=h(i.value);try{for(o.s();!(s=o.n()).done;)c=s.value,n.getPage(n.leafNumToIndex(c)).makeViewable()}catch(e){o.e(e)}finally{o.f()}i.value.length||(n.getPage(t).makeViewable(),a=!0);case 10:this.suppressFragmentChange=!1,this.jumpToIndex(t),a&&n.getPage(t).makeViewable(!1);case 13:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){l(i,r,a,o,s,"next",e)}function s(e){l(i,r,a,o,s,"throw",e)}o(void 0)}))});return function(e){return t.apply(this,arguments)}}(),BookReader.prototype.removeSearchResults=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.removeSearchHilites(),this.searchTerm=null,this.searchResults=null,e||this.trigger(BookReader.eventNames.fragmentChange)},BookReader.prototype.searchHighlightVisible=function(){var e=this,t=this.searchResults,n=[];if(null==t)return!1;if(this.constMode2up==this.mode)n=[this.twoPage.currentIndexL,this.twoPage.currentIndexR];else{if(this.constMode1up!=this.mode)return!1;n=[this.currentIndex()]}return t.matches.some((function(t){return t.par[0].boxes.some((function(t){var r=e.leafNumToIndex(t.page);if(s.inArray(r,n)>=0)return!0}))})),!1}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,a=n(9341),i=n(9207),o=a("forEach"),s=i("forEach");e.exports=o&&s?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},6583:function(e,t,n){"use strict";var r=n(5656),a=n(9958),i=n(7466),o=n(9341),s=n(9207),c=Math.min,h=[].lastIndexOf,u=!!h&&1/[1].lastIndexOf(1,-0)<0,l=o("lastIndexOf"),d=s("indexOf",{ACCESSORS:!0,1:0}),f=u||!l||!d;e.exports=f?function(e){if(u)return h.apply(this,arguments)||0;var t=r(this),n=i(t.length),o=n-1;for(arguments.length>1&&(o=c(o,a(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return-1}:h},6833:function(e,t,n){var r=n(8113);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},842:function(e,t,n){var r=n(7854);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},9587:function(e,t,n){var r=n(111),a=n(7674);e.exports=function(e,t,n){var i,o;return a&&"function"==typeof(i=t.constructor)&&i!==n&&r(o=i.prototype)&&o!==n.prototype&&a(e,o),e}},408:function(e,t,n){var r=n(9670),a=n(7659),i=n(7466),o=n(9974),s=n(1246),c=n(3411),h=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,u,l){var d,f,p,v,g,m,b,y=o(t,n,u?2:1);if(l)d=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(a(f)){for(p=0,v=i(e.length);v>p;p++)if((g=u?y(r(b=e[p])[0],b[1]):y(e[p]))&&g instanceof h)return g;return new h(!1)}d=f.call(e)}for(m=d.next;!(b=m.call(d)).done;)if("object"==typeof(g=c(d,y,b.value,u))&&g&&g instanceof h)return g;return new h(!1)}).stop=function(e){return new h(!0,e)}},5948:function(e,t,n){var r,a,i,o,s,c,h,u,l=n(7854),d=n(1236).f,f=n(4326),p=n(261).set,v=n(6833),g=l.MutationObserver||l.WebKitMutationObserver,m=l.process,b=l.Promise,y="process"==f(m),k=d(l,"queueMicrotask"),S=k&&k.value;S||(r=function(){var e,t;for(y&&(e=m.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?o():i=void 0,e}}i=void 0,e&&e.enter()},y?o=function(){m.nextTick(r)}:g&&!v?(s=!0,c=document.createTextNode(""),new g(r).observe(c,{characterData:!0}),o=function(){c.data=s=!s}):b&&b.resolve?(h=b.resolve(void 0),u=h.then,o=function(){u.call(h,r)}):o=function(){p.call(l,r)}),e.exports=S||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,o()),i=t}},3366:function(e,t,n){var r=n(7854);e.exports=r.Promise},8523:function(e,t,n){"use strict";var r=n(3099),a=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new a(e)}},2534:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9478:function(e,t,n){var r=n(9670),a=n(111),i=n(8523);e.exports=function(e,t){if(r(e),a(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},6340:function(e,t,n){"use strict";var r=n(5005),a=n(3070),i=n(5112),o=n(9781),s=i("species");e.exports=function(e){var t=r(e),n=a.f;o&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},261:function(e,t,n){var r,a,i,o=n(7854),s=n(7293),c=n(4326),h=n(9974),u=n(490),l=n(317),d=n(6833),f=o.location,p=o.setImmediate,v=o.clearImmediate,g=o.process,m=o.MessageChannel,b=o.Dispatch,y=0,k={},S=function(e){if(k.hasOwnProperty(e)){var t=k[e];delete k[e],t()}},R=function(e){return function(){S(e)}},x=function(e){S(e.data)},M=function(e){o.postMessage(e+"",f.protocol+"//"+f.host)};p&&v||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return k[++y]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(y),y},v=function(e){delete k[e]},"process"==c(g)?r=function(e){g.nextTick(R(e))}:b&&b.now?r=function(e){b.now(R(e))}:m&&!d?(i=(a=new m).port2,a.port1.onmessage=x,r=h(i.postMessage,i,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(M)||"file:"===f.protocol?r="onreadystatechange"in l("script")?function(e){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),S(e)}}:function(e){setTimeout(R(e),0)}:(r=M,o.addEventListener("message",x,!1))),e.exports={set:p,clear:v}},9554:function(e,t,n){"use strict";var r=n(2109),a=n(8533);r({target:"Array",proto:!0,forced:[].forEach!=a},{forEach:a})},4986:function(e,t,n){var r=n(2109),a=n(6583);r({target:"Array",proto:!0,forced:a!==[].lastIndexOf},{lastIndexOf:a})},5212:function(e,t,n){"use strict";var r=n(2109),a=n(2092).some,i=n(9341),o=n(9207),s=i("some"),c=o("some");r({target:"Array",proto:!0,forced:!s||!c},{some:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},8674:function(e,t,n){"use strict";var r,a,i,o,s=n(2109),c=n(1913),h=n(7854),u=n(5005),l=n(3366),d=n(1320),f=n(2248),p=n(8003),v=n(6340),g=n(111),m=n(3099),b=n(5787),y=n(4326),k=n(2788),S=n(408),R=n(7072),x=n(6707),M=n(261).set,P=n(5948),w=n(9478),T=n(842),B=n(8523),E=n(2534),C=n(9909),I=n(4705),N=n(5112),_=n(7392),j=N("species"),F="Promise",H=C.get,L=C.set,q=C.getterFor(F),O=l,A=h.TypeError,U=h.document,V=h.process,$=u("fetch"),D=B.f,G=D,z="process"==y(V),Q=!!(U&&U.createEvent&&h.dispatchEvent),W="unhandledrejection",Y=I(F,(function(){if(k(O)===String(O)){if(66===_)return!0;if(!z&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!O.prototype.finally)return!0;if(_>=51&&/native code/.test(O))return!1;var e=O.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[j]=t,!(e.then((function(){}))instanceof t)})),K=Y||!R((function(e){O.all(e).catch((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},J=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;P((function(){for(var a=t.value,i=1==t.state,o=0;r.length>o;){var s,c,h,u=r[o++],l=i?u.ok:u.fail,d=u.resolve,f=u.reject,p=u.domain;try{l?(i||(2===t.rejection&&ne(e,t),t.rejection=1),!0===l?s=a:(p&&p.enter(),s=l(a),p&&(p.exit(),h=!0)),s===u.promise?f(A("Promise-chain cycle")):(c=X(s))?c.call(s,d,f):d(s)):f(a)}catch(e){p&&!h&&p.exit(),f(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&ee(e,t)}))}},Z=function(e,t,n){var r,a;Q?((r=U.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),h.dispatchEvent(r)):r={promise:t,reason:n},(a=h["on"+e])?a(r):e===W&&T("Unhandled promise rejection",n)},ee=function(e,t){M.call(h,(function(){var n,r=t.value;if(te(t)&&(n=E((function(){z?V.emit("unhandledRejection",r,e):Z(W,e,r)})),t.rejection=z||te(t)?2:1,n.error))throw n.value}))},te=function(e){return 1!==e.rejection&&!e.parent},ne=function(e,t){M.call(h,(function(){z?V.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},re=function(e,t,n,r){return function(a){e(t,n,a,r)}},ae=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,J(e,t,!0))},ie=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw A("Promise can't be resolved itself");var a=X(n);a?P((function(){var r={done:!1};try{a.call(n,re(ie,e,r,t),re(ae,e,r,t))}catch(n){ae(e,r,n,t)}})):(t.value=n,t.state=1,J(e,t,!1))}catch(n){ae(e,{done:!1},n,t)}}};Y&&(O=function(e){b(this,O,F),m(e),r.call(this);var t=H(this);try{e(re(ie,this,t),re(ae,this,t))}catch(e){ae(this,t,e)}},(r=function(e){L(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=f(O.prototype,{then:function(e,t){var n=q(this),r=D(x(this,O));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=z?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&J(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r,t=H(e);this.promise=e,this.resolve=re(ie,e,t),this.reject=re(ae,e,t)},B.f=D=function(e){return e===O||e===i?new a(e):G(e)},c||"function"!=typeof l||(o=l.prototype.then,d(l.prototype,"then",(function(e,t){var n=this;return new O((function(e,t){o.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof $&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return w(O,$.apply(h,arguments))}}))),s({global:!0,wrap:!0,forced:Y},{Promise:O}),p(O,F,!1,!0),v(F),i=u(F),s({target:F,stat:!0,forced:Y},{reject:function(e){var t=D(this);return t.reject.call(void 0,e),t.promise}}),s({target:F,stat:!0,forced:c||Y},{resolve:function(e){return w(c&&this===i?O:this,e)}}),s({target:F,stat:!0,forced:K},{all:function(e){var t=this,n=D(t),r=n.resolve,a=n.reject,i=E((function(){var n=m(t.resolve),i=[],o=0,s=1;S(e,(function(e){var c=o++,h=!1;i.push(void 0),s++,n.call(t,e).then((function(e){h||(h=!0,i[c]=e,--s||r(i))}),a)})),--s||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=D(t),r=n.reject,a=E((function(){var a=m(t.resolve);S(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}})},4603:function(e,t,n){var r=n(9781),a=n(7854),i=n(4705),o=n(9587),s=n(3070).f,c=n(8006).f,h=n(7850),u=n(7066),l=n(2999),d=n(1320),f=n(7293),p=n(9909).set,v=n(6340),g=n(5112)("match"),m=a.RegExp,b=m.prototype,y=/a/g,k=/a/g,S=new m(y)!==y,R=l.UNSUPPORTED_Y;if(r&&i("RegExp",!S||R||f((function(){return k[g]=!1,m(y)!=y||m(k)==k||"/a/i"!=m(y,"i")})))){for(var x=function(e,t){var n,r=this instanceof x,a=h(e),i=void 0===t;if(!r&&a&&e.constructor===x&&i)return e;S?a&&!i&&(e=e.source):e instanceof x&&(i&&(t=u.call(e)),e=e.source),R&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=o(S?new m(e,t):m(e,t),r?this:b,x);return R&&n&&p(s,{sticky:n}),s},M=function(e){e in x||s(x,e,{configurable:!0,get:function(){return m[e]},set:function(t){m[e]=t}})},P=c(m),w=0;P.length>w;)M(P[w++]);b.constructor=x,x.prototype=b,d(a,"RegExp",x)}v("RegExp")},4747:function(e,t,n){var r=n(7854),a=n(8324),i=n(8533),o=n(8880);for(var s in a){var c=r[s],h=c&&c.prototype;if(h&&h.forEach!==i)try{o(h,"forEach",i)}catch(e){h.forEach=i}}}},0,[[2728,898]]]);
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[73],{2728:function(e,t,n){"use strict";n(2222),n(9826),n(9554),n(6992),n(4986),n(5827),n(5212),n(9601),n(1539),n(8674),n(4916),n(8783),n(5306),n(4765),n(4747),n(3948),n(285),n(5666),n(2772),n(9600),n(1249),n(7042),n(4603),n(9714);var r=n(3609);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,r.key,r)}}var i,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.selector?(this.br=t.br,this.matcher=new RegExp("{{{(.+?)}}}","g"),this.matches=[],this.cacheDOMElements(t.selector),this.bindEvents()):console.warn("BookReader::Search - SearchView must be passed a valid CSS selector")}var t,n;return t=e,(n=[{key:"cacheDOMElements",value:function(e){this.dom={},this.dom.searchTray=this.renderSearchTray(e),this.dom.results=this.dom.searchTray.querySelector('[data-id="results"]'),this.dom.resultsCount=this.dom.searchTray.querySelector('[data-id="results_count"]'),this.dom.searchField=this.dom.searchTray.querySelector('[name="query"]'),this.dom.searchPending=this.dom.searchTray.querySelector('[data-id="searchPending"]'),this.dom.mobileSearch=this.buildMobileDrawer(),this.dom.toolbarSearch=this.buildToolbarSearch()}},{key:"toggleSearchTray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dom.searchTray.classList.contains("hidden");this.dom.searchTray.classList.toggle("hidden",!e)}},{key:"toggleResultsCount",value:function(e){this.dom.resultsCount.classList.toggle("visible",e)}},{key:"updateResultsCount",value:function(e){this.dom.resultsCount.innerText="(".concat(e," result").concat(1!=e?"s":"",")"),this.toggleResultsCount(!0)}},{key:"setQuery",value:function(e){this.br.$('[name="query"]').val(e)}},{key:"emptyMatches",value:function(){this.dom.results.innerHTML="",this.matches=[]}},{key:"removeResultPins",value:function(){this.br.$(".BRnavpos .BRsearch").remove()}},{key:"clearSearchFieldAndResults",value:function(){this.br.removeSearchResults(),this.toggleResultsCount(!1),this.removeResultPins(),this.emptyMatches(),this.setQuery(""),this.teardownSearchNavigation(),this.br.trigger("SearchResultsCleared")}},{key:"toggleSidebar",value:function(){this.br.trigger("ToggleSearchMenu")}},{key:"renderSearchTray",value:function(e){var t=document.createElement("div");return t.setAttribute("id",e.replace(/^#/,"")),t.innerHTML='\n <header>\n <div>\n <h3>Search inside</h3>\n <p data-id="results_count"></p>\n </div>\n <a href="#" class="close"></a>\n </header>\n <form action="" method="get">\n <fieldset>\n <input name="all_files" id="all_files" type="checkbox" />\n <label class="checkbox" for="all_files">Search all files</label>\n <input type="search" name="query" placeholder="Enter a search term" />\n </fieldset>\n </form>\n <div data-id="searchPending" id="search_pending">\n <p>Your search results will appear below</p>\n <div class="loader tc mt20"></div>\n </div>\n <ul data-id="results"></ul>\n ',t}},{key:"renderSearchNavigation",value:function(){var e="BRsearch-navigation";r(".BRnav").before('\n <div class="'.concat(e,'">\n <button class="toggle-sidebar">\n <h4>\n <span class="icon icon-search"></span> Results\n </h4>\n </button>\n <div class="pagination">\n <button class="prev" title="Previous result"><span class="icon icon-chevron hflip"></span></button>\n <span data-id="resultsCount">').concat(this.resultsPosition(),'</span>\n <button class="next" title="Next result"><span class="icon icon-chevron"></button>\n </div>\n <button class="clear" title="Clear search results">\n <span class="icon icon-close"></span>\n </button>\n </div>\n ')),this.dom.searchNavigation=r(".".concat(e))}},{key:"resultsPosition",value:function(){var e="".concat(this.matches.length," result").concat(1===this.matches.length?"":"s");return~this.currentMatchIndex&&(e="".concat(this.currentMatchIndex+1," / ").concat(this.matches.length)),e}},{key:"bindSearchNavigationEvents",value:function(){if(this.dom.searchNavigation){var e="searchNavigation";this.dom.searchNavigation.on("click.".concat(e),".clear",this.clearSearchFieldAndResults.bind(this)).on("click.".concat(e),".prev",this.showPrevResult.bind(this)).on("click.".concat(e),".next",this.showNextResult.bind(this)).on("click.".concat(e),".toggle-sidebar",this.toggleSidebar.bind(this)).on("click.".concat(e),!1)}}},{key:"showPrevResult",value:function(){0!==this.currentMatchIndex&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,n){return t[0]>n}))+1),this.br.$(".BRnavline .BRsearch").eq(--this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"showNextResult",value:function(){this.currentMatchIndex+1!==this.matches.length&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,n){return e[e.length-1]>n}))-1),this.br.$(".BRnavline .BRsearch").eq(++this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"getClosestMatchIndex",value:function(e){var t=function t(n,r){if(1===n.length)return n[0];var a=n.slice(0,n.length/2),i=n.slice(n.length/2);return t(e(a,i,r)?a:i,r)}(this.matches.map((function(e){return e.par[0].page})),this.br.currentIndex()+1);return this.matches.indexOf(this.matches.find((function(e){return e.par[0].page===t})))}},{key:"updateResultsPosition",value:function(){this.dom.searchNavigation.find("[data-id=resultsCount]").text(this.resultsPosition())}},{key:"updateSearchNavigationButtons",value:function(){this.dom.searchNavigation.find(".prev").attr("disabled",!this.currentMatchIndex),this.dom.searchNavigation.find(".next").attr("disabled",this.currentMatchIndex+1===this.matches.length)}},{key:"teardownSearchNavigation",value:function(){this.dom.searchNavigation||(this.dom.searchNavigation=r(".BRsearch-navigation")),this.dom.searchNavigation.length&&(this.dom.searchNavigation.off(".searchNavigation").remove(),this.dom.searchNavigation=null,this.br.resize())}},{key:"setCurrentMatchIndex",value:function(){var e;this.br.mode!==this.br.constModeThumb?(e=this.br.mode===this.br.constMode2up?this.find2upMatchingSearchResult():this.find1upMatchingSearchResult(),this.currentMatchIndex=this.matches.indexOf(e)):this.currentMatchIndex=-1}},{key:"find1upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br.currentIndex()===t.par[0].page-1}))}},{key:"find2upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br._isIndexDisplayed(t.par[0].page-1)}))}},{key:"updateSearchNavigation",value:function(){this.matches.length&&(this.setCurrentMatchIndex(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"renderMatches",value:function(e){var t=this,n=e.map((function(e){return'\n <li data-page="'.concat(e.par[0].page,'" data-page-index="').concat(t.br.leafNumToIndex(e.par[0].page),'">\n <h4>Page ').concat(e.par[0].page,"</h4>\n <p>").concat(e.text.replace(t.matcher,"<mark>$1</mark>"),"</p>\n </li>\n ")}));this.dom.results.innerHTML=n.join("")}},{key:"togglePinsFor",value:function(e){var t=e?"visible":"hidden";this.br.refs.$BRfooter.find(".BRsearch").css({visibility:t})}},{key:"buildMobileDrawer",value:function(){var e=document.createElement("li");return e.innerHTML='\n <span>\n <span class="DrawerIconWrapper">\n <img class="DrawerIcon" src="'.concat(this.br.imagesBaseURL,'icon_search_button.svg" />\n </span>\n Search\n </span>\n <div data-id="search_slot">\n </div>\n '),e.querySelector('[data-id="search_slot"]').appendChild(this.dom.searchTray),e.classList.add("BRmobileMenu__search"),e}},{key:"buildToolbarSearch",value:function(){var e=document.createElement("span");return e.classList.add("BRtoolbarSection","BRtoolbarSectionSearch"),e.innerHTML='\n <form class="BRbooksearch desktop">\n <input type="search" name="query" class="BRsearchInput" value="" placeholder="Search inside"/>\n <button type="submit" class="BRsearchSubmit">\n <img src="'.concat(this.br.imagesBaseURL,'icon_search_button.svg" />\n </button>\n </form>\n '),e}},{key:"renderPins",value:function(e){var t=this;e.forEach((function(e){var n=e.text,a=t.br.leafNumToIndex(e.par[0].page),i=t.br.getPageNum(a),o=t.br.constructor.util.cssPercentage(a,t.br.getNumLeafs()-1),s=n.replace(t.matcher,"<b>$1</b>"),c="";n.length>100&&(c=n.replace(/^(.{100}[^\s]*).*/,"$1").replace(t.matcher,"<b>$1</b>")+"..."),r("<div>").addClass("BRsearch").css({left:o}).attr("title","Search result").append('\n <div class="BRquery">\n <div>'.concat(c||s,"</div>\n <div>").concat("Page"," ").concat(i,"</div>\n </div>\n ")).data({pageIndex:a}).appendTo(t.br.$(".BRnavline")).hover((function(e){var t=e.currentTarget,n=t.querySelector(".BRquery"),a=n.getBoundingClientRect(),i=t.getBoundingClientRect(),o=2*parseInt(getComputedStyle(n).paddingLeft);a.x-o<0&&n.style.setProperty("transform","translateX(-".concat(i.left-o,"px)")),r(".BRsearch,.BRchapter").removeClass("front"),r(e.target).addClass("front")}),(function(e){return r(e.target).removeClass("front")})).click(function(e){this.br._searchPluginGoToResult(+r(e.target).data("pageIndex")),this.br.updateSearchHilites()}.bind(t))}))}},{key:"toggleSearchPending",value:function(e){this.dom.searchPending.classList.toggle("visible",e),e?this.br.showProgressPopup("Search results will appear below..."):this.br.removeProgressPopup()}},{key:"renderErrorModal",value:function(){this.renderModalMessage("\n Sorry, there was an error with your search.\n <br />\n The text may still be processing.\n "),this.delayModalRemovalFor(4e3)}},{key:"renderBookNotIndexedModal",value:function(){this.renderModalMessage("\n <p>\n This book hasn't been indexed for searching yet.\n We've just started indexing it, so search should be available soon.\n <br />\n Please try again later. Thanks!\n </p>\n "),this.delayModalRemovalFor(5e3)}},{key:"renderResultsEmptyModal",value:function(){this.renderModalMessage("No matches were found."),this.delayModalRemovalFor(2e3)}},{key:"renderModalMessage",value:function(e){var t=document.createElement("div");t.classList.add("BRprogresspopup","search_modal"),t.innerHTML=e,document.querySelector(this.br.el).append(t)}},{key:"delayModalRemovalFor",value:function(e){setTimeout(this.br.removeProgressPopup.bind(this.br),e)}},{key:"openMobileMenu",value:function(){this.br.refs.$mmenu.data("mmenu").open()}},{key:"closeMobileMenu",value:function(){this.br.refs.$mmenu.data("mmenu").close()}},{key:"submitHandler",value:function(e){e.preventDefault();var t=e.target.querySelector('[name="query"]').value;return!!t.length&&(this.br.search(t),this.dom.searchField.blur(),this.emptyMatches(),this.toggleSearchPending(!0),!1)}},{key:"handleSearchCallback",value:function(e,t){var n=this,a=t.results,i=t.options;this.matches=a.matches,this.setCurrentMatchIndex(),this.teardownSearchNavigation(),this.renderSearchNavigation(),this.bindSearchNavigationEvents(),this.renderMatches(a.matches),this.renderPins(a.matches),this.updateResultsCount(a.matches.length),this.toggleSearchPending(!1),i.goToFirstResult?r(document).one("BookReader:pageChanged",(function(){n.br.resize()})):this.br.resize()}},{key:"handleNavToggledCallback",value:function(e){var t=this.br.navigationIsVisible();this.togglePinsFor(t),this.toggleSearchTray(!!t&&!!this.dom.results.querySelector("li"))}},{key:"handleSearchStarted",value:function(){this.emptyMatches(),this.br.removeSearchHilites(),this.removeResultPins(),this.toggleSearchPending(!0),this.teardownSearchNavigation(),this.setQuery(this.br.searchTerm)}},{key:"handleSearchCallbackError",value:function(){this.toggleSearchPending(!1),this.renderErrorModal()}},{key:"handleSearchCallbackBookNotIndexed",value:function(){this.toggleSearchPending(!1),this.renderBookNotIndexedModal()}},{key:"handleSearchCallbackEmpty",value:function(){this.toggleSearchPending(!1),this.renderResultsEmptyModal()}},{key:"bindEvents",value:function(){var e=this,t="BookReader:";r(document).on("".concat(t,"SearchCallback"),this.handleSearchCallback.bind(this)).on("".concat(t,"navToggled"),this.handleNavToggledCallback.bind(this)).on("".concat(t,"SearchStarted"),this.handleSearchStarted.bind(this)).on("".concat(t,"SearchCallbackError"),this.handleSearchCallbackError.bind(this)).on("".concat(t,"SearchCallbackBookNotIndexed"),this.handleSearchCallbackBookNotIndexed.bind(this)).on("".concat(t,"SearchCallbackEmpty"),this.handleSearchCallbackEmpty.bind(this)).on("".concat(t,"pageChanged"),this.updateSearchNavigation.bind(this)),this.dom.searchTray.addEventListener("submit",this.submitHandler.bind(this)),this.dom.toolbarSearch.querySelector("form").addEventListener("submit",this.submitHandler.bind(this)),this.dom.searchField.addEventListener("search",(function(){e.dom.searchField.value||e.clearSearchFieldAndResults()})),r(this.dom.results).on("click","li",(function(t){e.br._searchPluginGoToResult(+t.currentTarget.dataset.pageIndex),e.br.updateSearchHilites(),e.closeMobileMenu()}))}}])&&a(t.prototype,n),e}(),s=n(3609),c=n(3609);function h(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.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)?u(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 i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,a)}s.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookId:"",subPrefix:"",bookPath:"",enableSearch:!0,searchInsideUrl:"/fulltext/inside.php",initialSearchTerm:null}),BookReader.prototype.setup=(i=BookReader.prototype.setup,function(e){i.call(this,e),this.searchTerm="",this.searchResults=null,this.searchInsideUrl=e.searchInsideUrl,this.enableSearch=e.enableSearch,this.goToFirstResult=!1,this.bookId=e.bookId,this.server=e.server,this.subPrefix=e.subPrefix,this.bookPath=e.bookPath,this.searchView||(this.searchView=new o({br:this,selector:"#BRsearch_tray"}))}),BookReader.prototype.init=function(e){return function(){e.call(this),this.options.enableSearch&&this.options.initialSearchTerm&&this.search(this.options.initialSearchTerm,{goToFirstResult:this.goToFirstResult,suppressFragmentChange:!0})}}(BookReader.prototype.init),BookReader.prototype.buildMobileDrawerElement=function(e){return function(){var t=e.call(this);if(this.enableSearch)return this.searchView.dom.mobileSearch&&t.find(".BRmobileMenu__moreInfoRow").after(this.searchView.dom.mobileSearch),t}}(BookReader.prototype.buildMobileDrawerElement),BookReader.prototype.buildToolbarElement=function(e){return function(){var t=e.call(this);if(this.enableSearch)return this.searchView.dom.toolbarSearch&&t.find(".BRtoolbarSectionInfo").after(this.searchView.dom.toolbarSearch),t}}(BookReader.prototype.buildToolbarElement),BookReader.prototype.search=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={goToFirstResult:!1,disablePopup:!1,suppressFragmentChange:!1,error:null,success:null},a=s.extend({},r,n);this.suppressFragmentChange=a.suppressFragmentChange,this.searchTerm=t.replace(/\//g," "),a.suppressFragmentChange||this.trigger(BookReader.eventNames.fragmentChange);var i=this.server.replace(/:.+/,""),o="https://".concat(i).concat(this.searchInsideUrl,"?"),h=this.bookPath,u="/".concat(this.subPrefix);this.bookPath.length-this.bookPath.lastIndexOf(u)==u.length&&(h=this.bookPath.substr(0,this.bookPath.length-u.length));var l={item_id:this.bookId,doc:this.subPrefix,path:h,q:t},d=c.param(l).replace(/%2F/g,"/"),f="".concat(o).concat(d),p=function(t){var n=t.error||!t.matches.length,r="function"==typeof a.error,i="function"==typeof a.success;n?r?a.error.call(e,t,a):e.BRSearchCallbackError(t,a):i?a.success.call(e,t,a):e.BRSearchCallback(t,a)};return this.trigger("SearchStarted",{term:this.searchTerm}),c.ajax({url:f,dataType:"jsonp"}).then(p)},BookReader.prototype.BRSearchCallback=function(e,t){this.searchResults=e,this.updateSearchHilites(),this.removeProgressPopup(),t.goToFirstResult&&this._searchPluginGoToResult(e.matches[0].par[0].page),this.trigger("SearchCallback",{results:e,options:t,instance:this})},BookReader.prototype.BRSearchCallbackError=function(e){this._BRSearchCallbackError(e)},BookReader.prototype._BRSearchCallbackError=function(e){this.searchResults=e;var t={term:this.searchTerm,instance:this};if(e.error){var n=Object.assign({},t,{results:e});this.trigger("SearchCallbackError",n)}else if(0==e.matches.length){if(!1===e.indexed)return void this.trigger("SearchCallbackBookNotIndexed",t);this.trigger("SearchCallbackEmpty",t)}},BookReader.prototype.updateSearchHilites=function(){this.constMode2up!=this.mode?this.updateSearchHilites1UP():this.updateSearchHilites2UP()},BookReader.prototype.updateSearchHilites1UP=function(){var e=this,t=this.searchResults;null!=t&&t.matches.forEach((function(t){t.par[0].boxes.forEach((function(t){var n=e.leafNumToIndex(t.page);if(s.inArray(n,e.displayedIndices)>=0){t.div||(t.div=document.createElement("div"),c(t.div).prop("className","BookReaderSearchHilite").appendTo(e.$(".pagediv".concat(n))));var r={width:"".concat((t.r-t.l)/e.reduce,"px"),height:"".concat((t.b-t.t)/e.reduce,"px"),left:"".concat(t.l/e.reduce,"px"),top:"".concat(t.t/e.reduce,"px")};c(t.div).css(r)}else t.div&&(c(t.div).remove(),t.div=null)}))}))},BookReader.prototype.updateSearchHilites2UP=function(){var e=this,t=this.searchResults;null!==t&&t.matches.forEach((function(t){t.par[0].boxes.forEach((function(n){var r=e.leafNumToIndex(t.par[0].page),a=s.inArray(r,e.displayedIndices)>=0,i=e._models.book.getPage(r).isViewable;a&&i?(n.div||(n.div=document.createElement("div"),c(n.div).addClass("BookReaderSearchHilite").appendTo(e.refs.$brTwoPageView)),e.setHilightCss2UP(n.div,r,n.l,n.r,n.t,n.b)):n.div&&(c(n.div).remove(),n.div=null)}))}))},BookReader.prototype.removeSearchHilites=function(){var e=this.searchResults;null!=e&&e.matches&&e.matches.forEach((function(e){e.par[0].boxes.forEach((function(e){null!=e.div&&(c(e.div).remove(),e.div=null)}))}))},BookReader.prototype._searchPluginGoToResult=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._models.book,r=n.getPage(t),a=!1,r.isViewable){e.next=10;break}return e.next=6,fetch("/services/bookreader/request_page?"+new URLSearchParams({id:this.options.bookId,subprefix:this.options.subPrefix,leafNum:r.leafNum})).then((function(e){return e.json()}));case 6:i=e.sent,o=h(i.value);try{for(o.s();!(s=o.n()).done;)c=s.value,n.getPage(n.leafNumToIndex(c)).makeViewable()}catch(e){o.e(e)}finally{o.f()}i.value.length||(n.getPage(t).makeViewable(),a=!0);case 10:this.suppressFragmentChange=!1,this.jumpToIndex(t),a&&n.getPage(t).makeViewable(!1);case 13:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){l(i,r,a,o,s,"next",e)}function s(e){l(i,r,a,o,s,"throw",e)}o(void 0)}))});return function(e){return t.apply(this,arguments)}}(),BookReader.prototype.removeSearchResults=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.removeSearchHilites(),this.searchTerm=null,this.searchResults=null,e||this.trigger(BookReader.eventNames.fragmentChange)},BookReader.prototype.searchHighlightVisible=function(){var e=this,t=this.searchResults,n=[];if(null==t)return!1;if(this.constMode2up==this.mode)n=[this.twoPage.currentIndexL,this.twoPage.currentIndexR];else{if(this.constMode1up!=this.mode)return!1;n=[this.currentIndex()]}return t.matches.some((function(t){return t.par[0].boxes.some((function(t){var r=e.leafNumToIndex(t.page);if(s.inArray(r,n)>=0)return!0}))})),!1}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,a=n(9341),i=n(9207),o=a("forEach"),s=i("forEach");e.exports=o&&s?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},6583:function(e,t,n){"use strict";var r=n(5656),a=n(9958),i=n(7466),o=n(9341),s=n(9207),c=Math.min,h=[].lastIndexOf,u=!!h&&1/[1].lastIndexOf(1,-0)<0,l=o("lastIndexOf"),d=s("indexOf",{ACCESSORS:!0,1:0}),f=u||!l||!d;e.exports=f?function(e){if(u)return h.apply(this,arguments)||0;var t=r(this),n=i(t.length),o=n-1;for(arguments.length>1&&(o=c(o,a(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return-1}:h},7072:function(e,t,n){var r=n(5112)("iterator"),a=!1;try{var i=0,o={next:function(){return{done:!!i++}},return:function(){a=!0}};o[r]=function(){return this},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},6833:function(e,t,n){var r=n(8113);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},842:function(e,t,n){var r=n(7854);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},9587:function(e,t,n){var r=n(111),a=n(7674);e.exports=function(e,t,n){var i,o;return a&&"function"==typeof(i=t.constructor)&&i!==n&&r(o=i.prototype)&&o!==n.prototype&&a(e,o),e}},408:function(e,t,n){var r=n(9670),a=n(7659),i=n(7466),o=n(9974),s=n(1246),c=n(9212),h=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var u,l,d,f,p,v,g,m=n&&n.that,b=!(!n||!n.AS_ENTRIES),y=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),S=o(t,m,1+b+k),R=function(e){return u&&c(u),new h(!0,e)},x=function(e){return b?(r(e),k?S(e[0],e[1],R):S(e[0],e[1])):k?S(e,R):S(e)};if(y)u=e;else{if("function"!=typeof(l=s(e)))throw TypeError("Target is not iterable");if(a(l)){for(d=0,f=i(e.length);f>d;d++)if((p=x(e[d]))&&p instanceof h)return p;return new h(!1)}u=l.call(e)}for(v=u.next;!(g=v.call(u)).done;){try{p=x(g.value)}catch(e){throw c(u),e}if("object"==typeof p&&p&&p instanceof h)return p}return new h(!1)}},5948:function(e,t,n){var r,a,i,o,s,c,h,u,l=n(7854),d=n(1236).f,f=n(261).set,p=n(6833),v=n(5268),g=l.MutationObserver||l.WebKitMutationObserver,m=l.document,b=l.process,y=l.Promise,k=d(l,"queueMicrotask"),S=k&&k.value;S||(r=function(){var e,t;for(v&&(e=b.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?o():i=void 0,e}}i=void 0,e&&e.enter()},!p&&!v&&g&&m?(s=!0,c=m.createTextNode(""),new g(r).observe(c,{characterData:!0}),o=function(){c.data=s=!s}):y&&y.resolve?(h=y.resolve(void 0),u=h.then,o=function(){u.call(h,r)}):o=v?function(){b.nextTick(r)}:function(){f.call(l,r)}),e.exports=S||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,o()),i=t}},3366:function(e,t,n){var r=n(7854);e.exports=r.Promise},8523:function(e,t,n){"use strict";var r=n(3099),a=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new a(e)}},2534:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9478:function(e,t,n){var r=n(9670),a=n(111),i=n(8523);e.exports=function(e,t){if(r(e),a(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},6340:function(e,t,n){"use strict";var r=n(5005),a=n(3070),i=n(5112),o=n(9781),s=i("species");e.exports=function(e){var t=r(e),n=a.f;o&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},261:function(e,t,n){var r,a,i,o=n(7854),s=n(7293),c=n(9974),h=n(490),u=n(317),l=n(6833),d=n(5268),f=o.location,p=o.setImmediate,v=o.clearImmediate,g=o.process,m=o.MessageChannel,b=o.Dispatch,y=0,k={},S=function(e){if(k.hasOwnProperty(e)){var t=k[e];delete k[e],t()}},R=function(e){return function(){S(e)}},x=function(e){S(e.data)},P=function(e){o.postMessage(e+"",f.protocol+"//"+f.host)};p&&v||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return k[++y]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(y),y},v=function(e){delete k[e]},d?r=function(e){g.nextTick(R(e))}:b&&b.now?r=function(e){b.now(R(e))}:m&&!l?(i=(a=new m).port2,a.port1.onmessage=x,r=c(i.postMessage,i,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts&&f&&"file:"!==f.protocol&&!s(P)?(r=P,o.addEventListener("message",x,!1)):r="onreadystatechange"in u("script")?function(e){h.appendChild(u("script")).onreadystatechange=function(){h.removeChild(this),S(e)}}:function(e){setTimeout(R(e),0)}),e.exports={set:p,clear:v}},9554:function(e,t,n){"use strict";var r=n(2109),a=n(8533);r({target:"Array",proto:!0,forced:[].forEach!=a},{forEach:a})},4986:function(e,t,n){var r=n(2109),a=n(6583);r({target:"Array",proto:!0,forced:a!==[].lastIndexOf},{lastIndexOf:a})},5212:function(e,t,n){"use strict";var r=n(2109),a=n(2092).some,i=n(9341),o=n(9207),s=i("some"),c=o("some");r({target:"Array",proto:!0,forced:!s||!c},{some:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},8674:function(e,t,n){"use strict";var r,a,i,o,s=n(2109),c=n(1913),h=n(7854),u=n(5005),l=n(3366),d=n(1320),f=n(2248),p=n(8003),v=n(6340),g=n(111),m=n(3099),b=n(5787),y=n(2788),k=n(408),S=n(7072),R=n(6707),x=n(261).set,P=n(5948),M=n(9478),w=n(842),T=n(8523),E=n(2534),B=n(9909),I=n(4705),C=n(5112),N=n(5268),_=n(7392),j=C("species"),F="Promise",H=B.get,L=B.set,O=B.getterFor(F),q=l,A=h.TypeError,U=h.document,V=h.process,$=u("fetch"),D=T.f,G=D,z=!!(U&&U.createEvent&&h.dispatchEvent),Q="function"==typeof PromiseRejectionEvent,W="unhandledrejection",Y=I(F,(function(){if(y(q)===String(q)){if(66===_)return!0;if(!N&&!Q)return!0}if(c&&!q.prototype.finally)return!0;if(_>=51&&/native code/.test(q))return!1;var e=q.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[j]=t,!(e.then((function(){}))instanceof t)})),K=Y||!S((function(e){q.all(e).catch((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},J=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;P((function(){for(var r=e.value,a=1==e.state,i=0;n.length>i;){var o,s,c,h=n[i++],u=a?h.ok:h.fail,l=h.resolve,d=h.reject,f=h.domain;try{u?(a||(2===e.rejection&&ne(e),e.rejection=1),!0===u?o=r:(f&&f.enter(),o=u(r),f&&(f.exit(),c=!0)),o===h.promise?d(A("Promise-chain cycle")):(s=X(o))?s.call(o,l,d):l(o)):d(r)}catch(e){f&&!c&&f.exit(),d(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ee(e)}))}},Z=function(e,t,n){var r,a;z?((r=U.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),h.dispatchEvent(r)):r={promise:t,reason:n},!Q&&(a=h["on"+e])?a(r):e===W&&w("Unhandled promise rejection",n)},ee=function(e){x.call(h,(function(){var t,n=e.facade,r=e.value;if(te(e)&&(t=E((function(){N?V.emit("unhandledRejection",r,n):Z(W,n,r)})),e.rejection=N||te(e)?2:1,t.error))throw t.value}))},te=function(e){return 1!==e.rejection&&!e.parent},ne=function(e){x.call(h,(function(){var t=e.facade;N?V.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},re=function(e,t,n){return function(r){e(t,r,n)}},ae=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,J(e,!0))},ie=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw A("Promise can't be resolved itself");var r=X(t);r?P((function(){var n={done:!1};try{r.call(t,re(ie,n,e),re(ae,n,e))}catch(t){ae(n,t,e)}})):(e.value=t,e.state=1,J(e,!1))}catch(t){ae({done:!1},t,e)}}};Y&&(q=function(e){b(this,q,F),m(e),r.call(this);var t=H(this);try{e(re(ie,t),re(ae,t))}catch(e){ae(t,e)}},(r=function(e){L(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=f(q.prototype,{then:function(e,t){var n=O(this),r=D(R(this,q));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=N?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&J(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r,t=H(e);this.promise=e,this.resolve=re(ie,t),this.reject=re(ae,t)},T.f=D=function(e){return e===q||e===i?new a(e):G(e)},c||"function"!=typeof l||(o=l.prototype.then,d(l.prototype,"then",(function(e,t){var n=this;return new q((function(e,t){o.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof $&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return M(q,$.apply(h,arguments))}}))),s({global:!0,wrap:!0,forced:Y},{Promise:q}),p(q,F,!1,!0),v(F),i=u(F),s({target:F,stat:!0,forced:Y},{reject:function(e){var t=D(this);return t.reject.call(void 0,e),t.promise}}),s({target:F,stat:!0,forced:c||Y},{resolve:function(e){return M(c&&this===i?q:this,e)}}),s({target:F,stat:!0,forced:K},{all:function(e){var t=this,n=D(t),r=n.resolve,a=n.reject,i=E((function(){var n=m(t.resolve),i=[],o=0,s=1;k(e,(function(e){var c=o++,h=!1;i.push(void 0),s++,n.call(t,e).then((function(e){h||(h=!0,i[c]=e,--s||r(i))}),a)})),--s||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=D(t),r=n.reject,a=E((function(){var a=m(t.resolve);k(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}})},4603:function(e,t,n){var r=n(9781),a=n(7854),i=n(4705),o=n(9587),s=n(3070).f,c=n(8006).f,h=n(7850),u=n(7066),l=n(2999),d=n(1320),f=n(7293),p=n(9909).set,v=n(6340),g=n(5112)("match"),m=a.RegExp,b=m.prototype,y=/a/g,k=/a/g,S=new m(y)!==y,R=l.UNSUPPORTED_Y;if(r&&i("RegExp",!S||R||f((function(){return k[g]=!1,m(y)!=y||m(k)==k||"/a/i"!=m(y,"i")})))){for(var x=function(e,t){var n,r=this instanceof x,a=h(e),i=void 0===t;if(!r&&a&&e.constructor===x&&i)return e;S?a&&!i&&(e=e.source):e instanceof x&&(i&&(t=u.call(e)),e=e.source),R&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=o(S?new m(e,t):m(e,t),r?this:b,x);return R&&n&&p(s,{sticky:n}),s},P=function(e){e in x||s(x,e,{configurable:!0,get:function(){return m[e]},set:function(t){m[e]=t}})},M=c(m),w=0;M.length>w;)P(M[w++]);b.constructor=x,x.prototype=b,d(a,"RegExp",x)}v("RegExp")},4747:function(e,t,n){var r=n(7854),a=n(8324),i=n(8533),o=n(8880);for(var s in a){var c=r[s],h=c&&c.prototype;if(h&&h.forEach!==i)try{o(h,"forEach",i)}catch(e){h.forEach=i}}}},0,[[2728,898]]]);
//# sourceMappingURL=plugin.search.js.map

@@ -1,2 +0,2 @@

(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[423],{4529:function(t,e,n){"use strict";n(2526),n(1817),n(2165),n(1038),n(2222),n(6992),n(9826),n(1249),n(5827),n(7042),n(8309),n(1539),n(4916),n(9601),n(9714),n(5003),n(8783),n(489),n(5306),n(3123),n(8674),n(3210),n(2419),n(3948),n(4819),n(5666);var r=n(7775);function o(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(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)?i(t,e):void 0}}(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c;return null==t?void 0:t.replace(/\{\{([^}]*?)\}\}/g,(function(t,i){if(!i)return t;var a=o(i.split("|").map((function(t){return t.trim()}))),c=a[0],u=a.slice(1);if(!(c in n)&&!(c in e))return t;var s=c in n?n[c]:c in e?e[c]:null;return u.map((function(t){return r[t]})).reduce((function(t,e){return e(t)}),s&&s.toString())}))}var c={urlencode:encodeURIComponent},u=n(3609);function s(t){return(s="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})(t)}function l(t,e,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return d(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)?d(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 d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function y(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){g(i,r,o,a,c,"next",t)}function c(t){g(i,r,o,a,c,"throw",t)}a(void 0)}))}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e,n){return e&&b(t.prototype,e),n&&b(t,n),t}var x=window.BookReader,S={enabled:!0,fullDjvuXmlUrl:null,singlePageDjvuXmlUrl:null},P=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,n=arguments.length>1?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,r.vU)(),i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:(0,r.G6)();m(this,t),this.options=e,this.optionVariables=n,this.djvuPagesPromise=null,this.svgParagraphElement="text",this.svgWordElement="tspan",this.insertNewlines=o,this.pointerEventsOnParagraph=i,o&&(this.svgParagraphElement="g",this.svgWordElement="text")}var e,n;return w(t,[{key:"init",value:function(){this.options.singlePageDjvuXmlUrl||(this.djvuPagesPromise=u.ajax({type:"GET",url:a(this.options.fullDjvuXmlUrl,this.optionVariables),dataType:"html",error:function(t){}}).then((function(t){try{var e=u.parseXML(t);return e&&u(e).find("OBJECT")}catch(t){return}})))}},{key:"getPageText",value:(n=y(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.singlePageDjvuXmlUrl){t.next=4;break}return t.abrupt("return",u.ajax({type:"GET",url:a(this.options.singlePageDjvuXmlUrl,this.optionVariables,{pageIndex:e}),dataType:"html",error:function(t){}}).then((function(t){try{var e=u.parseXML(t);return e&&u(e).find("OBJECT")[0]}catch(t){return}})));case 4:return t.next=6,this.djvuPagesPromise;case 6:if(!(n=t.sent)){t.next=9;break}return t.abrupt("return",n[e]);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"interceptCopy",value:function(t){t[0].addEventListener("copy",(function(t){var e=document.getSelection();t.clipboardData.setData("text/plain",e.toString()),t.preventDefault()}))}},{key:"defaultMode",value:function(t){var e=this;t.classList.remove("selectingSVG"),u(t).on("mousedown.textSelectPluginHandler",(function(n){u(n.target).is(".BRwordElement")&&(n.stopPropagation(),t.classList.add("selectingSVG"),u(t).one("mouseup.textSelectPluginHandler",(function(n){""!=window.getSelection().toString()?(n.stopPropagation(),u(t).off(".textSelectPluginHandler"),e.textSelectingMode(t)):t.classList.remove("selectingSVG")})))}))}},{key:"textSelectingMode",value:function(t){var e=this;u(t).on("mousedown.textSelectPluginHandler",(function(t){u(t.target).is(".BRwordElement")||""!=window.getSelection().toString()&&window.getSelection().removeAllRanges(),t.stopPropagation()})),u(t).on("mouseup.textSelectPluginHandler",(function(n){n.stopPropagation(),""==window.getSelection().toString()&&(u(t).off(".textSelectPluginHandler"),e.defaultMode(t))}))}},{key:"stopPageFlip",value:function(t){var e=this,n=t.find("svg.textSelectionSVG");n.length&&(n.each((function(t,n){return e.defaultMode(n)})),this.interceptCopy(t))}},{key:"createTextLayer",value:(e=y(regeneratorRuntime.mark((function t(e,n){var r,o,i,a,c=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.find(".textSelectionSVG").length){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.getPageText(e);case 5:if(r=t.sent){t.next=8;break}return t.abrupt("return");case 8:o=u(r).attr("width"),i=u(r).attr("height"),(a=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 ".concat(o," ").concat(i)),n.append(a),a.setAttribute("class","textSelectionSVG"),a.setAttribute("preserveAspectRatio","none"),u(a).css({width:"100%",position:"absolute",height:"100%",top:"0",left:"0"}),u(r).find("PARAGRAPH").each((function(t,e){var n=u(e).find("WORD");if(n.length){var r=document.createElementNS("http://www.w3.org/2000/svg",c.svgParagraphElement);r.setAttribute("class","BRparagElement"),c.pointerEventsOnParagraph&&(r.style.pointerEvents="all");for(var o=[],i=0;i<n.length;i++){var s=n[i],l=h(u(s).attr("coords").split(",").map(parseFloat),4),f=l[0],p=l[1],v=l[2],d=p-l[3];o.push(d);var g=document.createElementNS("http://www.w3.org/2000/svg",c.svgWordElement);if(g.setAttribute("class","BRwordElement"),g.setAttribute("x",f.toString()),g.setAttribute("y",p.toString()),g.setAttribute("textLength",(v-f).toString()),g.setAttribute("lengthAdjust","spacingAndGlyphs"),g.textContent=s.textContent,r.appendChild(g),i<n.length-1){var y=n[i+1],m=h(u(y).attr("coords").split(",").map(parseFloat),4),b=m[0],w=(m[1],m[2],m[3],document.createElementNS("http://www.w3.org/2000/svg",c.svgWordElement));w.setAttribute("class","BRwordElement"),w.setAttribute("x",v.toString()),w.setAttribute("y",p.toString()),b-v>0&&w.setAttribute("textLength",(b-v).toString()),w.setAttribute("lengthAdjust","spacingAndGlyphs"),w.textContent=" ",r.appendChild(w)}i==n.length-1&&c.insertNewlines&&r.appendChild(document.createTextNode("\n"))}o.sort();var x=o[Math.floor(.85*o.length)];r.setAttribute("font-size",x.toString()),a.appendChild(r)}})),this.stopPageFlip(n);case 19:case"end":return t.stop()}}),t,this)}))),function(t,n){return e.apply(this,arguments)})}]),t}(),j=function(t){!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}}),e&&f(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=v(e);if(n){var o=v(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return p(this,t)});function o(){return m(this,o),r.apply(this,arguments)}return w(o,[{key:"init",value:function(){var t=Object.assign({},S,this.options.plugins.textSelection);t.enabled&&(this.textSelectionPlugin=new P(t,this.options.vars),this.options.plugins.textSelection=t,this.textSelectionPlugin.init()),l(v(o.prototype),"init",this).call(this)}},{key:"_createPageContainer",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=l(v(o.prototype),"_createPageContainer",this).call(this,t,n);return this.mode!=this.constModeThumb&&t>0&&(null===(e=this.textSelectionPlugin)||void 0===e||e.createTextLayer(t,r)),r}}]),o}(x);window.BookReader=j},7775:function(t,e,n){"use strict";function r(){var t=arguments.length>0&&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 o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(t)}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/safari/i.test(t)&&!/chrome|chromium/i.test(t)}n.d(e,{i7:function(){return r},vU:function(){return o},G6:function(){return i}})},6833:function(t,e,n){var r=n(8113);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},7065:function(t,e,n){"use strict";var r=n(3099),o=n(111),i=[].slice,a={},c=function(t,e,n){if(!(e in a)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=i.call(arguments,1),a=function(){var r=n.concat(i.call(arguments));return this instanceof a?c(e,r.length,r):e.apply(t,r)};return o(e.prototype)&&(a.prototype=e.prototype),a}},842:function(t,e,n){var r=n(7854);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},408:function(t,e,n){var r=n(9670),o=n(7659),i=n(7466),a=n(9974),c=n(1246),u=n(3411),s=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,f){var p,v,h,d,g,y,m,b=a(e,n,l?2:1);if(f)p=t;else{if("function"!=typeof(v=c(t)))throw TypeError("Target is not iterable");if(o(v)){for(h=0,d=i(t.length);d>h;h++)if((g=l?b(r(m=t[h])[0],m[1]):b(t[h]))&&g instanceof s)return g;return new s(!1)}p=v.call(t)}for(y=p.next;!(m=y.call(p)).done;)if("object"==typeof(g=u(p,b,m.value,l))&&g&&g instanceof s)return g;return new s(!1)}).stop=function(t){return new s(!0,t)}},5948:function(t,e,n){var r,o,i,a,c,u,s,l,f=n(7854),p=n(1236).f,v=n(4326),h=n(261).set,d=n(6833),g=f.MutationObserver||f.WebKitMutationObserver,y=f.process,m=f.Promise,b="process"==v(y),w=p(f,"queueMicrotask"),x=w&&w.value;x||(r=function(){var t,e;for(b&&(t=y.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},b?a=function(){y.nextTick(r)}:g&&!d?(c=!0,u=document.createTextNode(""),new g(r).observe(u,{characterData:!0}),a=function(){u.data=c=!c}):m&&m.resolve?(s=m.resolve(void 0),l=s.then,a=function(){l.call(s,r)}):a=function(){h.call(f,r)}),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},3366:function(t,e,n){var r=n(7854);t.exports=r.Promise},8523:function(t,e,n){"use strict";var r=n(3099),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},2534:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:function(t,e,n){var r=n(9670),o=n(111),i=n(8523);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},6340:function(t,e,n){"use strict";var r=n(5005),o=n(3070),i=n(5112),a=n(9781),c=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},6091:function(t,e,n){var r=n(7293),o=n(1361);t.exports=function(t){return r((function(){return!!o[t]()||"​…᠎"!="​…᠎"[t]()||o[t].name!==t}))}},3111:function(t,e,n){var r=n(4488),o="["+n(1361)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),c=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(i,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},261:function(t,e,n){var r,o,i,a=n(7854),c=n(7293),u=n(4326),s=n(9974),l=n(490),f=n(317),p=n(6833),v=a.location,h=a.setImmediate,d=a.clearImmediate,g=a.process,y=a.MessageChannel,m=a.Dispatch,b=0,w={},x=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},S=function(t){return function(){x(t)}},P=function(t){x(t.data)},j=function(t){a.postMessage(t+"",v.protocol+"//"+v.host)};h&&d||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return w[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(b),b},d=function(t){delete w[t]},"process"==u(g)?r=function(t){g.nextTick(S(t))}:m&&m.now?r=function(t){m.now(S(t))}:y&&!p?(i=(o=new y).port2,o.port1.onmessage=P,r=s(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(j)||"file:"===v.protocol?r="onreadystatechange"in f("script")?function(t){l.appendChild(f("script")).onreadystatechange=function(){l.removeChild(this),x(t)}}:function(t){setTimeout(S(t),0)}:(r=j,a.addEventListener("message",P,!1))),t.exports={set:h,clear:d}},1361:function(t){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},5003:function(t,e,n){var r=n(2109),o=n(7293),i=n(5656),a=n(1236).f,c=n(9781),u=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!c||u,sham:!c},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},489:function(t,e,n){var r=n(2109),o=n(7293),i=n(7908),a=n(9518),c=n(8544);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!c},{getPrototypeOf:function(t){return a(i(t))}})},8674:function(t,e,n){"use strict";var r,o,i,a,c=n(2109),u=n(1913),s=n(7854),l=n(5005),f=n(3366),p=n(1320),v=n(2248),h=n(8003),d=n(6340),g=n(111),y=n(3099),m=n(5787),b=n(4326),w=n(2788),x=n(408),S=n(7072),P=n(6707),j=n(261).set,E=n(5948),A=n(9478),O=n(842),R=n(8523),k=n(2534),C=n(9909),T=n(4705),M=n(5112),D=n(7392),_=M("species"),G="Promise",L=C.get,U=C.set,B=C.getterFor(G),I=f,F=s.TypeError,V=s.document,H=s.process,N=l("fetch"),X=R.f,W=X,$="process"==b(H),J=!!(V&&V.createEvent&&s.dispatchEvent),q="unhandledrejection",z=T(G,(function(){if(w(I)===String(I)){if(66===D)return!0;if(!$&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!I.prototype.finally)return!0;if(D>=51&&/native code/.test(I))return!1;var t=I.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[_]=e,!(t.then((function(){}))instanceof e)})),K=z||!S((function(t){I.all(t).catch((function(){}))})),Q=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},Y=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;E((function(){for(var o=e.value,i=1==e.state,a=0;r.length>a;){var c,u,s,l=r[a++],f=i?l.ok:l.fail,p=l.resolve,v=l.reject,h=l.domain;try{f?(i||(2===e.rejection&&nt(t,e),e.rejection=1),!0===f?c=o:(h&&h.enter(),c=f(o),h&&(h.exit(),s=!0)),c===l.promise?v(F("Promise-chain cycle")):(u=Q(c))?u.call(c,p,v):p(c)):v(o)}catch(t){h&&!s&&h.exit(),v(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&tt(t,e)}))}},Z=function(t,e,n){var r,o;J?((r=V.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},(o=s["on"+t])?o(r):t===q&&O("Unhandled promise rejection",n)},tt=function(t,e){j.call(s,(function(){var n,r=e.value;if(et(e)&&(n=k((function(){$?H.emit("unhandledRejection",r,t):Z(q,t,r)})),e.rejection=$||et(e)?2:1,n.error))throw n.value}))},et=function(t){return 1!==t.rejection&&!t.parent},nt=function(t,e){j.call(s,(function(){$?H.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},rt=function(t,e,n,r){return function(o){t(e,n,o,r)}},ot=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,Y(t,e,!0))},it=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw F("Promise can't be resolved itself");var o=Q(n);o?E((function(){var r={done:!1};try{o.call(n,rt(it,t,r,e),rt(ot,t,r,e))}catch(n){ot(t,r,n,e)}})):(e.value=n,e.state=1,Y(t,e,!1))}catch(n){ot(t,{done:!1},n,e)}}};z&&(I=function(t){m(this,I,G),y(t),r.call(this);var e=L(this);try{t(rt(it,this,e),rt(ot,this,e))}catch(t){ot(this,e,t)}},(r=function(t){U(this,{type:G,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=v(I.prototype,{then:function(t,e){var n=B(this),r=X(P(this,I));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=$?H.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Y(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=L(t);this.promise=t,this.resolve=rt(it,t,e),this.reject=rt(ot,t,e)},R.f=X=function(t){return t===I||t===i?new o(t):W(t)},u||"function"!=typeof f||(a=f.prototype.then,p(f.prototype,"then",(function(t,e){var n=this;return new I((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof N&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return A(I,N.apply(s,arguments))}}))),c({global:!0,wrap:!0,forced:z},{Promise:I}),h(I,G,!1,!0),d(G),i=l(G),c({target:G,stat:!0,forced:z},{reject:function(t){var e=X(this);return e.reject.call(void 0,t),e.promise}}),c({target:G,stat:!0,forced:u||z},{resolve:function(t){return A(u&&this===i?I:this,t)}}),c({target:G,stat:!0,forced:K},{all:function(t){var e=this,n=X(e),r=n.resolve,o=n.reject,i=k((function(){var n=y(e.resolve),i=[],a=0,c=1;x(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=X(e),r=n.reject,o=k((function(){var o=y(e.resolve);x(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},2419:function(t,e,n){var r=n(2109),o=n(5005),i=n(3099),a=n(9670),c=n(111),u=n(30),s=n(7065),l=n(7293),f=o("Reflect","construct"),p=l((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),v=!l((function(){f((function(){}))})),h=p||v;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(v&&!p)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(s.apply(t,r))}var o=n.prototype,l=u(c(o)?o:Object.prototype),h=Function.apply.call(t,l,e);return c(h)?h:l}})},4819:function(t,e,n){var r=n(2109),o=n(111),i=n(9670),a=n(6656),c=n(1236),u=n(9518);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,s,l=arguments.length<3?e:arguments[2];return i(e)===l?e[n]:(r=c.f(e,n))?a(r,"value")?r.value:void 0===r.get?void 0:r.get.call(l):o(s=u(e))?t(s,n,l):void 0}})},3210:function(t,e,n){"use strict";var r=n(2109),o=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return o(this)}})}},0,[[4529,898]]]);
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[423],{4529:function(t,e,n){"use strict";n(2222),n(9826),n(1249),n(9601),n(1539),n(4916),n(9714),n(3123),n(5666);var r=n(7775);function o(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(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)?i(t,e):void 0}}(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a;return null==t?void 0:t.replace(/\{\{([^}]*?)\}\}/g,(function(t,i){if(!i)return t;var u=o(i.split("|").map((function(t){return t.trim()}))),a=u[0],c=u.slice(1);if(!(a in n)&&!(a in e))return t;var s=a in n?n[a]:a in e?e[a]:null;return c.map((function(t){return r[t]})).reduce((function(t,e){return e(t)}),s&&s.toString())}))}n(2526),n(1817),n(2165),n(1038),n(6992),n(5827),n(7042),n(8783),n(5306),n(3210),n(3948);var a={urlencode:encodeURIComponent},c=n(3609);function s(t){return(s="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})(t)}function l(t,e,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return v(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)?v(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 v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function y(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){d(i,r,o,u,a,"next",t)}function a(t){d(i,r,o,u,a,"throw",t)}u(void 0)}))}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e,n){return e&&b(t.prototype,e),n&&b(t,n),t}var S=window.BookReader,x={enabled:!0,fullDjvuXmlUrl:null,singlePageDjvuXmlUrl:null},P=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,n=arguments.length>1?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,r.vU)(),i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:(0,r.G6)();m(this,t),this.options=e,this.optionVariables=n,this.djvuPagesPromise=null,this.svgParagraphElement="text",this.svgWordElement="tspan",this.insertNewlines=o,this.pointerEventsOnParagraph=i,o&&(this.svgParagraphElement="g",this.svgWordElement="text")}var e,n;return w(t,[{key:"init",value:function(){this.options.singlePageDjvuXmlUrl||(this.djvuPagesPromise=c.ajax({type:"GET",url:u(this.options.fullDjvuXmlUrl,this.optionVariables),dataType:"html",error:function(t){}}).then((function(t){try{var e=c.parseXML(t);return e&&c(e).find("OBJECT")}catch(t){return}})))}},{key:"getPageText",value:(n=y(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.singlePageDjvuXmlUrl){t.next=4;break}return t.abrupt("return",c.ajax({type:"GET",url:u(this.options.singlePageDjvuXmlUrl,this.optionVariables,{pageIndex:e}),dataType:"html",error:function(t){}}).then((function(t){try{var e=c.parseXML(t);return e&&c(e).find("OBJECT")[0]}catch(t){return}})));case 4:return t.next=6,this.djvuPagesPromise;case 6:if(!(n=t.sent)){t.next=9;break}return t.abrupt("return",n[e]);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"interceptCopy",value:function(t){t[0].addEventListener("copy",(function(t){var e=document.getSelection();t.clipboardData.setData("text/plain",e.toString()),t.preventDefault()}))}},{key:"defaultMode",value:function(t){var e=this;t.classList.remove("selectingSVG"),c(t).on("mousedown.textSelectPluginHandler",(function(n){c(n.target).is(".BRwordElement")&&(n.stopPropagation(),t.classList.add("selectingSVG"),c(t).one("mouseup.textSelectPluginHandler",(function(n){""!=window.getSelection().toString()?(n.stopPropagation(),c(t).off(".textSelectPluginHandler"),e.textSelectingMode(t)):t.classList.remove("selectingSVG")})))}))}},{key:"textSelectingMode",value:function(t){var e=this;c(t).on("mousedown.textSelectPluginHandler",(function(t){c(t.target).is(".BRwordElement")||""!=window.getSelection().toString()&&window.getSelection().removeAllRanges(),t.stopPropagation()})),c(t).on("mouseup.textSelectPluginHandler",(function(n){n.stopPropagation(),""==window.getSelection().toString()&&(c(t).off(".textSelectPluginHandler"),e.defaultMode(t))}))}},{key:"stopPageFlip",value:function(t){var e=this,n=t.find("svg.textSelectionSVG");n.length&&(n.each((function(t,n){return e.defaultMode(n)})),this.interceptCopy(t))}},{key:"createTextLayer",value:(e=y(regeneratorRuntime.mark((function t(e,n){var r,o,i,u,a=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.find(".textSelectionSVG").length){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.getPageText(e);case 5:if(r=t.sent){t.next=8;break}return t.abrupt("return");case 8:o=c(r).attr("width"),i=c(r).attr("height"),(u=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("xmlns","http://www.w3.org/2000/svg"),u.setAttribute("viewBox","0 0 ".concat(o," ").concat(i)),n.append(u),u.setAttribute("class","textSelectionSVG"),u.setAttribute("preserveAspectRatio","none"),c(u).css({width:"100%",position:"absolute",height:"100%",top:"0",left:"0"}),c(r).find("PARAGRAPH").each((function(t,e){var n=c(e).find("WORD");if(n.length){var r=document.createElementNS("http://www.w3.org/2000/svg",a.svgParagraphElement);r.setAttribute("class","BRparagElement"),a.pointerEventsOnParagraph&&(r.style.pointerEvents="all");for(var o=[],i=0;i<n.length;i++){var s=n[i],l=h(c(s).attr("coords").split(",").map(parseFloat),4),f=l[0],p=l[1],g=l[2],v=p-l[3];o.push(v);var d=document.createElementNS("http://www.w3.org/2000/svg",a.svgWordElement);if(d.setAttribute("class","BRwordElement"),d.setAttribute("x",f.toString()),d.setAttribute("y",p.toString()),d.setAttribute("textLength",(g-f).toString()),d.setAttribute("lengthAdjust","spacingAndGlyphs"),d.textContent=s.textContent,r.appendChild(d),i<n.length-1){var y=n[i+1],m=h(c(y).attr("coords").split(",").map(parseFloat),4),b=m[0],w=(m[1],m[2],m[3],document.createElementNS("http://www.w3.org/2000/svg",a.svgWordElement));w.setAttribute("class","BRwordElement"),w.setAttribute("x",g.toString()),w.setAttribute("y",p.toString()),b-g>0&&w.setAttribute("textLength",(b-g).toString()),w.setAttribute("lengthAdjust","spacingAndGlyphs"),w.textContent=" ",r.appendChild(w)}i==n.length-1&&a.insertNewlines&&r.appendChild(document.createTextNode("\n"))}o.sort();var S=o[Math.floor(.85*o.length)];r.setAttribute("font-size",S.toString()),u.appendChild(r)}})),this.stopPageFlip(n);case 19:case"end":return t.stop()}}),t,this)}))),function(t,n){return e.apply(this,arguments)})}]),t}(),O=function(t){!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}}),e&&f(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=g(e);if(n){var o=g(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return p(this,t)});function o(){return m(this,o),r.apply(this,arguments)}return w(o,[{key:"init",value:function(){var t=Object.assign({},x,this.options.plugins.textSelection);t.enabled&&(this.textSelectionPlugin=new P(t,this.options.vars),this.options.plugins.textSelection=t,this.textSelectionPlugin.init()),l(g(o.prototype),"init",this).call(this)}},{key:"_createPageContainer",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=l(g(o.prototype),"_createPageContainer",this).call(this,t,n);return this.mode!=this.constModeThumb&&t>0&&(null===(e=this.textSelectionPlugin)||void 0===e||e.createTextLayer(t,r)),r}}]),o}(S);window.BookReader=O},7775:function(t,e,n){"use strict";function r(){var t=arguments.length>0&&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 o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(t)}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/safari/i.test(t)&&!/chrome|chromium/i.test(t)}n.d(e,{i7:function(){return r},vU:function(){return o},G6:function(){return i}})},7072:function(t,e,n){var r=n(5112)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[r]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},7235:function(t,e,n){var r=n(857),o=n(6656),i=n(6061),u=n(3070).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||u(e,t,{value:i.f(t)})}},1156:function(t,e,n){var r=n(5656),o=n(8006).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return u.slice()}}(t):o(r(t))}},6091:function(t,e,n){var r=n(7293),o=n(1361);t.exports=function(t){return r((function(){return!!o[t]()||"​…᠎"!="​…᠎"[t]()||o[t].name!==t}))}},3111:function(t,e,n){var r=n(4488),o="["+n(1361)+"]",i=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),a=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(i,"")),2&t&&(n=n.replace(u,"")),n}};t.exports={start:a(1),end:a(2),trim:a(3)}},6061:function(t,e,n){var r=n(5112);e.f=r},1361:function(t){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},1038:function(t,e,n){var r=n(2109),o=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(t){Array.from(t)}))},{from:o})},3210:function(t,e,n){"use strict";var r=n(2109),o=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return o(this)}})},1817:function(t,e,n){"use strict";var r=n(2109),o=n(9781),i=n(7854),u=n(6656),a=n(111),c=n(3070).f,s=n(9920),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var f={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new l(t):void 0===t?l():l(t);return""===t&&(f[e]=!0),e};s(p,l);var g=p.prototype=l.prototype;g.constructor=p;var h=g.toString,v="Symbol(test)"==String(l("test")),d=/^Symbol\((.*)\)[^)]+$/;c(g,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=h.call(t);if(u(f,t))return"";var n=v?e.slice(7,-1):e.replace(d,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},2165:function(t,e,n){n(7235)("iterator")},2526:function(t,e,n){"use strict";var r=n(2109),o=n(7854),i=n(5005),u=n(1913),a=n(9781),c=n(133),s=n(3307),l=n(7293),f=n(6656),p=n(3157),g=n(111),h=n(9670),v=n(7908),d=n(5656),y=n(7593),m=n(9114),b=n(30),w=n(1956),S=n(8006),x=n(1156),P=n(5181),O=n(1236),A=n(3070),j=n(5296),E=n(8880),R=n(1320),k=n(2309),C=n(6200),T=n(3501),D=n(9711),_=n(5112),G=n(6061),N=n(7235),M=n(8003),U=n(9909),B=n(2092).forEach,L=C("hidden"),I="Symbol",V=_("toPrimitive"),X=U.set,H=U.getterFor(I),F=Object.prototype,W=o.Symbol,$=i("JSON","stringify"),J=O.f,z=A.f,Q=x.f,q=j.f,K=k("symbols"),Y=k("op-symbols"),Z=k("string-to-symbol-registry"),tt=k("symbol-to-string-registry"),et=k("wks"),nt=o.QObject,rt=!nt||!nt.prototype||!nt.prototype.findChild,ot=a&&l((function(){return 7!=b(z({},"a",{get:function(){return z(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=J(F,e);r&&delete F[e],z(t,e,n),r&&t!==F&&z(F,e,r)}:z,it=function(t,e){var n=K[t]=b(W.prototype);return X(n,{type:I,tag:t,description:e}),a||(n.description=e),n},ut=s?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof W},at=function(t,e,n){t===F&&at(Y,e,n),h(t);var r=y(e,!0);return h(n),f(K,r)?(n.enumerable?(f(t,L)&&t[L][r]&&(t[L][r]=!1),n=b(n,{enumerable:m(0,!1)})):(f(t,L)||z(t,L,m(1,{})),t[L][r]=!0),ot(t,r,n)):z(t,r,n)},ct=function(t,e){h(t);var n=d(e),r=w(n).concat(pt(n));return B(r,(function(e){a&&!st.call(n,e)||at(t,e,n[e])})),t},st=function(t){var e=y(t,!0),n=q.call(this,e);return!(this===F&&f(K,e)&&!f(Y,e))&&(!(n||!f(this,e)||!f(K,e)||f(this,L)&&this[L][e])||n)},lt=function(t,e){var n=d(t),r=y(e,!0);if(n!==F||!f(K,r)||f(Y,r)){var o=J(n,r);return!o||!f(K,r)||f(n,L)&&n[L][r]||(o.enumerable=!0),o}},ft=function(t){var e=Q(d(t)),n=[];return B(e,(function(t){f(K,t)||f(T,t)||n.push(t)})),n},pt=function(t){var e=t===F,n=Q(e?Y:d(t)),r=[];return B(n,(function(t){!f(K,t)||e&&!f(F,t)||r.push(K[t])})),r};c||(R((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=D(t),n=function(t){this===F&&n.call(Y,t),f(this,L)&&f(this[L],e)&&(this[L][e]=!1),ot(this,e,m(1,t))};return a&&rt&&ot(F,e,{configurable:!0,set:n}),it(e,t)}).prototype,"toString",(function(){return H(this).tag})),R(W,"withoutSetter",(function(t){return it(D(t),t)})),j.f=st,A.f=at,O.f=lt,S.f=x.f=ft,P.f=pt,G.f=function(t){return it(_(t),t)},a&&(z(W.prototype,"description",{configurable:!0,get:function(){return H(this).description}}),u||R(F,"propertyIsEnumerable",st,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),B(w(et),(function(t){N(t)})),r({target:I,stat:!0,forced:!c},{for:function(t){var e=String(t);if(f(Z,e))return Z[e];var n=W(e);return Z[e]=n,tt[n]=e,n},keyFor:function(t){if(!ut(t))throw TypeError(t+" is not a symbol");if(f(tt,t))return tt[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!a},{create:function(t,e){return void 0===e?b(t):ct(b(t),e)},defineProperty:at,defineProperties:ct,getOwnPropertyDescriptor:lt}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ft,getOwnPropertySymbols:pt}),r({target:"Object",stat:!0,forced:l((function(){P.f(1)}))},{getOwnPropertySymbols:function(t){return P.f(v(t))}}),$&&r({target:"JSON",stat:!0,forced:!c||l((function(){var t=W();return"[null]"!=$([t])||"{}"!=$({a:t})||"{}"!=$(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(g(e)||void 0!==t)&&!ut(t))return p(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ut(e))return e}),o[1]=e,$.apply(null,o)}}),W.prototype[V]||E(W.prototype,V,W.prototype.valueOf),M(W,I),T[L]=!0}},0,[[4529,898]]]);
//# sourceMappingURL=plugin.text_selection.js.map

@@ -1,2 +0,2 @@

(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[336],{5894:function(t,o,e){"use strict";var a;e(2222),e(6992),e(5827),e(1539),e(4916),e(8783),e(5306),e(3948),e(285),e(3609).extend(BookReader.defaultOptions,{enableUrlPlugin:!0,bookId:"",defaults:null,updateWindowTitle:!1,urlMode:"hash",urlHistoryBasePath:"/",urlTrackedParams:["page","search","mode","region","highlight"],urlTrackIndex0:!1}),BookReader.prototype.setup=(a=BookReader.prototype.setup,function(t){a.call(this,t),this.bookId=t.bookId,this.defaults=t.defaults,this.locationPollId=null,this.oldLocationHash=null,this.oldUserHash=null}),BookReader.prototype.init=function(t){return function(){var o=this;this.options.enableUrlPlugin&&(this.bind(BookReader.eventNames.PostInit,(function(){var t=o.options,e=t.updateWindowTitle,a=t.urlMode;e&&(document.title=o.shortTitle(50)),"hash"===a&&o.urlStartLocationPolling()})),this.bind(BookReader.eventNames.fragmentChange,this.urlUpdateFragment.bind(this))),t.call(this)}}(BookReader.prototype.init),BookReader.prototype.shortTitle=function(t){return this.bookTitle.length<t?this.bookTitle:"".concat(this.bookTitle.substr(0,t-3),"...")},BookReader.prototype.urlStartLocationPolling=function(){var t=this;this.oldLocationHash=this.urlReadFragment(),this.locationPollId&&(clearInterval(this.locationPollID),this.locationPollId=null),this.locationPollId=setInterval((function(){var o=t.urlReadFragment();if(o!=t.oldLocationHash&&o!=t.oldUserHash){var e=t.paramsFromFragment(o),a=function(){return t.updateFromParams(e)};t.trigger(BookReader.eventNames.stop),t.animating?(t.autoStop&&t.autoStop(),t.animationFinishedCallback=a):a(),t.oldUserHash=o}}),500)},BookReader.prototype.urlUpdateFragment=function(){var t=this.paramsFromCurrent(),o=this.options,e=o.urlMode,a=o.urlTrackIndex0,r=o.urlTrackedParams;a||void 0===t.index||0!==t.index||(delete t.index,delete t.page);var i=r.reduce((function(o,e){return e in t&&(o[e]=t[e]),o}),{}),n=this.fragmentFromParams(i,e),s=this.urlReadFragment(),l=this.getLocationSearch(),h=this.queryStringFromParams(i,l,e);if(s!==n||l!==h)if("history"===e){if(window.history&&window.history.replaceState){var d=this.options.urlHistoryBasePath.replace(/\/+$/,""),u=""===n?"":"/".concat(n),c="".concat(d).concat(u).concat(h);window.history.replaceState({},null,c),this.oldLocationHash=n+h}}else{var p=this.urlParamsFiltersOnlySearch(this.readQueryString());window.location.replace("#"+n+p),this.oldLocationHash=n+p}},BookReader.prototype.urlParamsFiltersOnlySearch=function(t){var o=new URLSearchParams(t);return o.has("q")?"?".concat(new URLSearchParams({q:o.get("q")})):""},BookReader.prototype.urlReadFragment=function(){var t=this.options,o=t.urlMode,e=t.urlHistoryBasePath;return"history"===o?window.location.pathname.substr(e.length):window.location.hash.substr(1)}}},0,[[5894,898]]]);
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[336],{5894:function(t,o,e){"use strict";var a;e(2222),e(6992),e(5827),e(1539),e(4916),e(8783),e(5306),e(3948),e(285),e(3609).extend(BookReader.defaultOptions,{enableUrlPlugin:!0,bookId:"",defaults:null,updateWindowTitle:!1,urlMode:"hash",urlHistoryBasePath:"/",urlTrackedParams:["page","search","mode","region","highlight"],urlTrackIndex0:!1}),BookReader.prototype.setup=(a=BookReader.prototype.setup,function(t){a.call(this,t),this.bookId=t.bookId,this.defaults=t.defaults,this.locationPollId=null,this.oldLocationHash=null,this.oldUserHash=null}),BookReader.prototype.init=function(t){return function(){var o=this;this.options.enableUrlPlugin&&(this.bind(BookReader.eventNames.PostInit,(function(){var t=o.options,e=t.updateWindowTitle,a=t.urlMode;e&&(document.title=o.shortTitle(50)),"hash"===a&&o.urlStartLocationPolling()})),this.bind(BookReader.eventNames.fragmentChange,this.urlUpdateFragment.bind(this))),t.call(this)}}(BookReader.prototype.init),BookReader.prototype.shortTitle=function(t){return this.bookTitle.length<t?this.bookTitle:"".concat(this.bookTitle.substr(0,t-3),"...")},BookReader.prototype.urlStartLocationPolling=function(){var t=this;this.oldLocationHash=this.urlReadFragment(),this.locationPollId&&(clearInterval(this.locationPollID),this.locationPollId=null),this.locationPollId=setInterval((function(){var o=t.urlReadFragment();if(o!=t.oldLocationHash&&o!=t.oldUserHash){var e=t.paramsFromFragment(o),a=function(){return t.updateFromParams(e)};t.trigger(BookReader.eventNames.stop),t.animating?(t.autoStop&&t.autoStop(),t.animationFinishedCallback=a):a(),t.oldUserHash=o}}),500)},BookReader.prototype.urlUpdateFragment=function(){var t=this.paramsFromCurrent(),o=this.options,e=o.urlMode,a=o.urlTrackIndex0,r=o.urlTrackedParams;a||void 0===t.index||0!==t.index||(delete t.index,delete t.page);var i=r.reduce((function(o,e){return e in t&&(o[e]=t[e]),o}),{}),n=this.fragmentFromParams(i,e),s=this.urlReadFragment(),l=this.getLocationSearch(),h=this.queryStringFromParams(i,l,e);if(s!==n||l!==h)if("history"===e){if(window.history&&window.history.replaceState){var d=this.options.urlHistoryBasePath.replace(/\/+$/,""),u=""===n?"":"/".concat(n),c="".concat(d).concat(u).concat(h);window.history.replaceState({},null,c),this.oldLocationHash=n+h}}else{var p=this.urlParamsFiltersOnlySearch(this.readQueryString());window.location.replace("#"+n+p),this.oldLocationHash=n+p}},BookReader.prototype.urlParamsFiltersOnlySearch=function(t){var o=new URLSearchParams(t);return o.has("q")?"?".concat(new URLSearchParams({q:o.get("q")})):""},BookReader.prototype.urlReadFragment=function(){var t=this.options,o=t.urlMode,e=t.urlHistoryBasePath;return"history"===o?window.location.pathname.substr(e.length):window.location.hash.substr(1)},BookReader.prototype.urlReadHashFragment=function(){return window.location.hash.substr(1)}}},0,[[5894,898]]]);
//# sourceMappingURL=plugin.url.js.map

@@ -0,1 +1,4 @@

# 4.24.0
Fix: Bookreader layout when initialized in "ReadAloud" mode @nsharma123
# 4.23.0

@@ -2,0 +5,0 @@ Fix: first search result click now updates url @nsharma123

{
"name": "@internetarchive/bookreader",
"version": "4.23.4",
"version": "4.23.5",
"description": "The Internet Archive BookReader.",

@@ -5,0 +5,0 @@ "repository": {

@@ -191,1 +191,9 @@ /* global BookReader */

};
/**
* Will read the hash return the bookreader fragment
* @return {string}
*/
BookReader.prototype.urlReadHashFragment = function() {
return window.location.hash.substr(1);
};

@@ -100,2 +100,3 @@ import '../src/js/jquery-ui-wrapper.js';

br.urlReadFragment = jest.fn(() => '');
br.urlReadHashFragment = jest.fn(() => '');
br.switchMode = jest.fn();

@@ -128,2 +129,14 @@

test('has suppressFragmentChange false when init with hash fragment', () => {
br.getResumeValue = jest.fn(() => null);
br.urlReadFragment = jest.fn(() => '');
br.urlReadHashFragment = jest.fn(() => 'mode/1up')
br.switchMode = jest.fn();
br.options.urlMode = 'history',
br.init();
expect(br.switchMode.mock.calls[0][1])
.toHaveProperty('suppressFragmentChange', false);
});
test('adds q= term to urlMode=history query string', () => {

@@ -130,0 +143,0 @@ expect(br.queryStringFromParams(

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc