@internetarchive/bookreader 5.0.0-24-sortingstate-2 → 5.0.0-25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,764 +1,2 @@
1
- (self["webpackChunk_internetarchive_bookreader"] = self["webpackChunk_internetarchive_bookreader"] || []).push([["plugins/plugin.url.js"],{
2
-
3
- /***/ "./src/plugins/plugin.url.js":
4
- /*!***********************************!*\
5
- !*** ./src/plugins/plugin.url.js ***!
6
- \***********************************/
7
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8
-
9
- "use strict";
10
- __webpack_require__.r(__webpack_exports__);
11
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
- /* harmony export */ "UrlPlugin": function() { return /* binding */ UrlPlugin; },
13
- /* harmony export */ "BookreaderUrlPlugin": function() { return /* binding */ BookreaderUrlPlugin; }
14
- /* harmony export */ });
15
- /* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
16
- /* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_0__);
17
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
18
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1__);
19
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
20
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2__);
21
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
22
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__);
23
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
24
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4__);
25
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
26
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__);
27
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
28
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_6__);
29
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
30
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
31
- /* harmony import */ var core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/web.url.js */ "./node_modules/core-js/modules/web.url.js");
32
- /* harmony import */ var core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_8__);
33
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
34
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_9__);
35
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
36
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_10__);
37
- /* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
38
- /* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_11__);
39
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
40
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12__);
41
- /* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
42
- /* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_13__);
43
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
44
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_14__);
45
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
46
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_15__);
47
- /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
48
- /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16__);
49
- /* harmony import */ var core_js_modules_es_object_from_entries_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.from-entries.js */ "./node_modules/core-js/modules/es.object.from-entries.js");
50
- /* harmony import */ var core_js_modules_es_object_from_entries_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_from_entries_js__WEBPACK_IMPORTED_MODULE_17__);
51
- /* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
52
- /* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_18__);
53
- /* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
54
- /* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_19__);
55
- /* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js");
56
- /* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_20__);
57
- /* harmony import */ var core_js_modules_es_string_search_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.string.search.js */ "./node_modules/core-js/modules/es.string.search.js");
58
- /* harmony import */ var core_js_modules_es_string_search_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_search_js__WEBPACK_IMPORTED_MODULE_21__);
59
- /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
60
- /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_22__);
61
- /* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
62
- /* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_23__);
63
- /* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
64
- /* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
65
- /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
66
- /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25__);
67
- /* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
68
- /* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_26__);
69
- /* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
70
- /* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_27__);
71
- /* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
72
- /* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_28__);
73
- /* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
74
- /* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_29__);
75
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
76
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_30__);
77
- /* provided dependency */ var jQuery = __webpack_require__(/*! jquery */ "jquery");
78
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
79
-
80
- function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
81
-
82
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
83
-
84
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
85
-
86
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
87
-
88
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
89
-
90
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
91
-
92
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
93
-
94
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
95
-
96
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
97
-
98
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
99
-
100
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
101
-
102
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
103
-
104
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
105
-
106
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
107
-
108
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
109
-
110
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
111
-
112
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
113
-
114
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- /* global BookReader */
149
-
150
- /**
151
- * Plugin for URL management in BookReader
152
- * Note read more about the url "fragment" here:
153
- * https://openlibrary.org/dev/docs/bookurls
154
- */
155
- jQuery.extend(BookReader.defaultOptions, {
156
- enableUrlPlugin: true,
157
- bookId: '',
158
-
159
- /** @type {string} Defaults can be a urlFragment string */
160
- defaults: null,
161
- updateWindowTitle: false,
162
-
163
- /** @type {'history' | 'hash'} */
164
- urlMode: 'hash',
165
-
166
- /**
167
- * When using 'history' mode, this part of the URL is kept constant
168
- * @example /details/plato/
169
- */
170
- urlHistoryBasePath: '/',
171
-
172
- /** Only these params will be reflected onto the URL */
173
- urlTrackedParams: ['page', 'search', 'mode', 'region', 'highlight', 'view'],
174
-
175
- /** If true, don't update the URL when `page == n0 (eg "/page/n0")` */
176
- urlTrackIndex0: false
177
- });
178
- /** @override */
179
-
180
- BookReader.prototype.setup = function (super_) {
181
- return function (options) {
182
- super_.call(this, options);
183
- this.bookId = options.bookId;
184
- this.defaults = options.defaults;
185
- this.locationPollId = null;
186
- this.oldLocationHash = null;
187
- this.oldUserHash = null;
188
- };
189
- }(BookReader.prototype.setup);
190
- /** @override */
191
-
192
-
193
- BookReader.prototype.init = function (super_) {
194
- return function () {
195
- var _this = this;
196
-
197
- if (this.options.enableUrlPlugin) {
198
- this.bind(BookReader.eventNames.PostInit, function () {
199
- var _this$options = _this.options,
200
- updateWindowTitle = _this$options.updateWindowTitle,
201
- urlMode = _this$options.urlMode;
202
-
203
- if (updateWindowTitle) {
204
- document.title = _this.shortTitle(_this.bookTitle, 50);
205
- }
206
-
207
- if (urlMode === 'hash') {
208
- _this.urlStartLocationPolling();
209
- }
210
- });
211
- this.bind(BookReader.eventNames.fragmentChange, this.urlUpdateFragment.bind(this));
212
- }
213
-
214
- super_.call(this);
215
- };
216
- }(BookReader.prototype.init);
217
- /**
218
- * Returns a shortened version of the title with the maximum number of characters
219
- * @param {number} maximumCharacters
220
- * @return {string}
221
- */
222
-
223
-
224
- BookReader.prototype.shortTitle = function (maximumCharacters) {
225
- if (this.bookTitle.length < maximumCharacters) {
226
- return this.bookTitle;
227
- }
228
-
229
- var title = "".concat(this.bookTitle.substr(0, maximumCharacters - 3), "...");
230
- return title;
231
- };
232
- /**
233
- * Starts polling of window.location to see hash fragment changes
234
- */
235
-
236
-
237
- BookReader.prototype.urlStartLocationPolling = function () {
238
- var _this2 = this;
239
-
240
- this.oldLocationHash = this.urlReadFragment();
241
-
242
- if (this.locationPollId) {
243
- clearInterval(this.locationPollId);
244
- this.locationPollId = null;
245
- }
246
-
247
- var updateHash = function updateHash() {
248
- var newFragment = _this2.urlReadFragment();
249
-
250
- var hasFragmentChange = newFragment != _this2.oldLocationHash && newFragment != _this2.oldUserHash;
251
-
252
- if (!hasFragmentChange) {
253
- return;
254
- }
255
-
256
- var params = _this2.paramsFromFragment(newFragment);
257
-
258
- var updateParams = function updateParams() {
259
- return _this2.updateFromParams(params);
260
- };
261
-
262
- _this2.trigger(BookReader.eventNames.stop);
263
-
264
- if (_this2.animating) {
265
- // Queue change if animating
266
- if (_this2.autoStop) _this2.autoStop();
267
- _this2.animationFinishedCallback = updateParams;
268
- } else {
269
- // update immediately
270
- updateParams();
271
- }
272
-
273
- _this2.oldUserHash = newFragment;
274
- };
275
-
276
- this.locationPollId = setInterval(updateHash, 500);
277
- };
278
- /**
279
- * Update URL from the current parameters.
280
- * Call this instead of manually using window.location.replace
281
- */
282
-
283
-
284
- BookReader.prototype.urlUpdateFragment = function () {
285
- var allParams = this.paramsFromCurrent();
286
- var _this$options2 = this.options,
287
- urlMode = _this$options2.urlMode,
288
- urlTrackIndex0 = _this$options2.urlTrackIndex0,
289
- urlTrackedParams = _this$options2.urlTrackedParams;
290
-
291
- if (!urlTrackIndex0 && typeof allParams.index !== 'undefined' && allParams.index === 0) {
292
- delete allParams.index;
293
- delete allParams.page;
294
- }
295
-
296
- var params = urlTrackedParams.reduce(function (validParams, paramName) {
297
- if (paramName in allParams) {
298
- validParams[paramName] = allParams[paramName];
299
- }
300
-
301
- return validParams;
302
- }, {});
303
- var newFragment = this.fragmentFromParams(params, urlMode);
304
- var currFragment = this.urlReadFragment();
305
- var currQueryString = this.getLocationSearch();
306
- var newQueryString = this.queryStringFromParams(params, currQueryString, urlMode);
307
-
308
- if (currFragment === newFragment && currQueryString === newQueryString) {
309
- return;
310
- }
311
-
312
- if (urlMode === 'history') {
313
- if (window.history && window.history.replaceState) {
314
- var baseWithoutSlash = this.options.urlHistoryBasePath.replace(/\/+$/, '');
315
- var newFragmentWithSlash = newFragment === '' ? '' : "/".concat(newFragment);
316
- var newUrlPath = "".concat(baseWithoutSlash).concat(newFragmentWithSlash).concat(newQueryString);
317
- window.history.replaceState({}, null, newUrlPath);
318
- this.oldLocationHash = newFragment + newQueryString;
319
- }
320
- } else {
321
- var newQueryStringSearch = this.urlParamsFiltersOnlySearch(this.readQueryString());
322
- window.location.replace('#' + newFragment + newQueryStringSearch);
323
- this.oldLocationHash = newFragment + newQueryStringSearch;
324
- }
325
- };
326
- /**
327
- * @private
328
- * Filtering query parameters to select only book search param (?q=foo)
329
- This needs to be updated/URL system modified if future query params are to be added
330
- * @param {string} url
331
- * @return {string}
332
- * */
333
-
334
-
335
- BookReader.prototype.urlParamsFiltersOnlySearch = function (url) {
336
- var params = new URLSearchParams(url);
337
- return params.has('q') ? "?".concat(new URLSearchParams({
338
- q: params.get('q')
339
- })) : '';
340
- };
341
- /**
342
- * Will read either the hash or URL and return the bookreader fragment
343
- * @return {string}
344
- */
345
-
346
-
347
- BookReader.prototype.urlReadFragment = function () {
348
- var _this$options3 = this.options,
349
- urlMode = _this$options3.urlMode,
350
- urlHistoryBasePath = _this$options3.urlHistoryBasePath;
351
-
352
- if (urlMode === 'history') {
353
- return window.location.pathname.substr(urlHistoryBasePath.length);
354
- } else {
355
- return window.location.hash.substr(1);
356
- }
357
- };
358
- /**
359
- * Will read the hash return the bookreader fragment
360
- * @return {string}
361
- */
362
-
363
-
364
- BookReader.prototype.urlReadHashFragment = function () {
365
- return window.location.hash.substr(1);
366
- };
367
-
368
- var UrlPlugin = /*#__PURE__*/function () {
369
- function UrlPlugin() {
370
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
371
-
372
- _classCallCheck(this, UrlPlugin);
373
-
374
- this.bookReaderOptions = options; // the canonical order of elements is important in the path and query string
375
-
376
- this.urlSchema = [{
377
- name: 'page',
378
- position: 'path',
379
- default: 'n0'
380
- }, {
381
- name: 'mode',
382
- position: 'path',
383
- default: '2up'
384
- }, {
385
- name: 'search',
386
- position: 'path',
387
- deprecated_for: 'q'
388
- }, {
389
- name: 'q',
390
- position: 'query_param'
391
- }, {
392
- name: 'sort',
393
- position: 'query_param'
394
- }, {
395
- name: 'view',
396
- position: 'query_param'
397
- }, {
398
- name: 'admin',
399
- position: 'query_param'
400
- }];
401
- this.urlState = {};
402
- this.urlMode = 'hash';
403
- this.urlHistoryBasePath = '/';
404
- this.urlLocationPollId = null;
405
- this.oldLocationHash = null;
406
- this.oldUserHash = null;
407
- }
408
- /**
409
- * Parse JSON object URL state to string format
410
- * Arrange path names in an order that it is positioned on the urlSchema
411
- * @param {object} urlSchema
412
- * @param {string} urlState
413
- * @returns {string}
414
- */
415
-
416
-
417
- _createClass(UrlPlugin, [{
418
- key: "urlStateToUrlString",
419
- value: function urlStateToUrlString(urlSchema, urlState) {
420
- var searchParams = new URLSearchParams();
421
- var pathParams = {};
422
- Object.keys(urlState).forEach(function (key) {
423
- var _schema, _schema2;
424
-
425
- var schema = urlSchema.find(function (schema) {
426
- return schema.name === key;
427
- });
428
-
429
- if ((_schema = schema) !== null && _schema !== void 0 && _schema.deprecated_for) {
430
- schema = urlSchema.find(function (schemaKey) {
431
- return schemaKey.name === schema.deprecated_for;
432
- });
433
- }
434
-
435
- if (((_schema2 = schema) === null || _schema2 === void 0 ? void 0 : _schema2.position) == 'path') {
436
- var _schema3;
437
-
438
- pathParams[(_schema3 = schema) === null || _schema3 === void 0 ? void 0 : _schema3.name] = urlState[key];
439
- } else {
440
- var _schema4;
441
-
442
- searchParams.append(((_schema4 = schema) === null || _schema4 === void 0 ? void 0 : _schema4.name) || key, urlState[key]);
443
- }
444
- });
445
- var strPathParams = urlSchema.filter(function (s) {
446
- return s.position == 'path';
447
- }).map(function (schema) {
448
- return pathParams[schema.name] ? "".concat(schema.name, "/").concat(pathParams[schema.name]) : '';
449
- }).join('/');
450
- var strStrippedTrailingSlash = "".concat(strPathParams.replace(/\/$/, ''));
451
- var concatenatedPath = "/".concat(strStrippedTrailingSlash, "?").concat(searchParams.toString());
452
- return searchParams.toString() ? concatenatedPath : "/".concat(strStrippedTrailingSlash);
453
- }
454
- /**
455
- * Parse string URL and add it in the current urlState
456
- * Example:
457
- * /page/n7/mode/2up => {page: 'n7', mode: '2up'}
458
- * /page/n7/mode/2up/search/hello => {page: 'n7', mode: '2up', q: 'hello'}
459
- * @param {array} urlSchema
460
- * @param {string} urlString
461
- * @returns {object}
462
- */
463
-
464
- }, {
465
- key: "urlStringToUrlState",
466
- value: function urlStringToUrlState(urlSchema, urlString) {
467
- var urlState = {}; // Fetch searchParams from given {urlString}
468
- // Note: whole URL path is needed for URLSearchParams
469
-
470
- var urlPath = new URL(urlString, 'http://example.com');
471
- var urlSearchParamsObj = Object.fromEntries(urlPath.searchParams.entries());
472
- var urlStrSplitSlashObj = Object.fromEntries(urlPath.pathname.match(/[^\\/]+\/[^\\/]+/g).map(function (x) {
473
- return x.split('/');
474
- }));
475
-
476
- var doesKeyExists = function doesKeyExists(_object, _key) {
477
- return Object.keys(_object).some(function (value) {
478
- return value == _key;
479
- });
480
- }; // Add path objects to urlState
481
-
482
-
483
- urlSchema.filter(function (schema) {
484
- return schema.position == 'path';
485
- }).forEach(function (schema) {
486
- if (!urlStrSplitSlashObj[schema.name] && schema.default) {
487
- return urlState[schema.name] = schema.default;
488
- }
489
-
490
- var hasPropertyKey = doesKeyExists(urlStrSplitSlashObj, schema.name);
491
- var hasDeprecatedKey = doesKeyExists(schema, 'deprecated_for') && hasPropertyKey;
492
-
493
- if (hasDeprecatedKey) {
494
- urlState[schema.deprecated_for] = urlStrSplitSlashObj[schema.name];
495
- return;
496
- }
497
-
498
- if (hasPropertyKey) {
499
- urlState[schema.name] = urlStrSplitSlashObj[schema.name];
500
- return;
501
- }
502
- }); // Add searchParams to urlState
503
- // Check if Object value is a Boolean and convert value to Boolean
504
- // Otherwise, return Object value
505
-
506
- var isBooleanValue = function isBooleanValue(value) {
507
- return value === 'true' || (value === 'false' ? false : value);
508
- };
509
-
510
- Object.entries(urlSearchParamsObj).forEach(function (_ref) {
511
- var _ref2 = _slicedToArray(_ref, 2),
512
- key = _ref2[0],
513
- value = _ref2[1];
514
-
515
- urlState[key] = isBooleanValue(value);
516
- });
517
- return urlState;
518
- }
519
- /**
520
- * Add or update key-value to the urlState
521
- * @param {string} key
522
- * @param {string} val
523
- */
524
-
525
- }, {
526
- key: "setUrlParam",
527
- value: function setUrlParam(key, value) {
528
- this.urlState[key] = value;
529
- this.pushToAddressBar();
530
- }
531
- /**
532
- * Delete key-value to the urlState
533
- * @param {string} key
534
- */
535
-
536
- }, {
537
- key: "removeUrlParam",
538
- value: function removeUrlParam(key) {
539
- delete this.urlState[key];
540
- this.pushToAddressBar();
541
- }
542
- /**
543
- * Get key-value from the urlState
544
- * @param {string} key
545
- * @return {string}
546
- */
547
-
548
- }, {
549
- key: "getUrlParam",
550
- value: function getUrlParam(key) {
551
- return this.urlState[key];
552
- }
553
- /**
554
- * Push URL params to addressbar
555
- */
556
-
557
- }, {
558
- key: "pushToAddressBar",
559
- value: function pushToAddressBar() {
560
- var urlStrPath = this.urlStateToUrlString(this.urlSchema, this.urlState);
561
-
562
- if (this.urlMode == 'history') {
563
- if (window.history && window.history.replaceState) {
564
- var newUrlPath = "".concat(this.urlHistoryBasePath).concat(urlStrPath);
565
- window.history.replaceState({}, null, newUrlPath);
566
- }
567
- } else {
568
- window.location.replace('#' + urlStrPath);
569
- }
570
-
571
- this.oldLocationHash = urlStrPath;
572
- }
573
- /**
574
- * Get the url and check if it has changed
575
- * If it was changeed, update the urlState
576
- */
577
-
578
- }, {
579
- key: "listenForHashChanges",
580
- value: function listenForHashChanges() {
581
- var _this3 = this;
582
-
583
- this.oldLocationHash = window.location.hash.substr(1);
584
-
585
- if (this.urlLocationPollId) {
586
- clearInterval(this.urlLocationPollId);
587
- this.urlLocationPollId = null;
588
- } // check if the URL changes
589
-
590
-
591
- var updateHash = function updateHash() {
592
- var newFragment = window.location.hash.substr(1);
593
- var hasFragmentChange = newFragment != _this3.oldLocationHash;
594
-
595
- if (!hasFragmentChange) {
596
- return;
597
- }
598
-
599
- _this3.urlState = _this3.urlStringToUrlState(newFragment);
600
- };
601
-
602
- this.urlLocationPollId = setInterval(updateHash, 500);
603
- }
604
- /**
605
- * Will read either the hash or URL and return the bookreader fragment
606
- */
607
-
608
- }, {
609
- key: "pullFromAddressBar",
610
- value: function pullFromAddressBar() {
611
- var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location;
612
- var path = this.urlMode === 'history' ? location.pathname.substr(this.urlHistoryBasePath.length) + location.search : location.hash.substr(1);
613
- this.urlState = this.urlStringToUrlState(this.urlSchema, path);
614
- }
615
- }]);
616
-
617
- return UrlPlugin;
618
- }();
619
- var BookreaderUrlPlugin = /*#__PURE__*/function (_BookReader) {
620
- _inherits(BookreaderUrlPlugin, _BookReader);
621
-
622
- var _super = _createSuper(BookreaderUrlPlugin);
623
-
624
- function BookreaderUrlPlugin() {
625
- _classCallCheck(this, BookreaderUrlPlugin);
626
-
627
- return _super.apply(this, arguments);
628
- }
629
-
630
- _createClass(BookreaderUrlPlugin, [{
631
- key: "init",
632
- value: function init() {
633
- var _this4 = this;
634
-
635
- if (this.options.enableUrlPlugin) {
636
- this.urlPlugin = new UrlPlugin(this.options);
637
- this.bind(BookReader.eventNames.PostInit, function () {
638
- var urlMode = _this4.options.urlMode;
639
-
640
- if (urlMode === 'hash') {
641
- _this4.urlPlugin.listenForHashChanges();
642
- }
643
- });
644
- }
645
-
646
- _get(_getPrototypeOf(BookreaderUrlPlugin.prototype), "init", this).call(this);
647
- }
648
- }]);
649
-
650
- return BookreaderUrlPlugin;
651
- }(BookReader);
652
- window.BookReader = BookreaderUrlPlugin;
653
- /* harmony default export */ __webpack_exports__["default"] = (BookreaderUrlPlugin);
654
-
655
- /***/ }),
656
-
657
- /***/ "./node_modules/core-js/modules/es.object.entries.js":
658
- /*!***********************************************************!*\
659
- !*** ./node_modules/core-js/modules/es.object.entries.js ***!
660
- \***********************************************************/
661
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
662
-
663
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
664
- var $entries = __webpack_require__(/*! ../internals/object-to-array */ "./node_modules/core-js/internals/object-to-array.js").entries;
665
-
666
- // `Object.entries` method
667
- // https://tc39.es/ecma262/#sec-object.entries
668
- $({ target: 'Object', stat: true }, {
669
- entries: function entries(O) {
670
- return $entries(O);
671
- }
672
- });
673
-
674
-
675
- /***/ }),
676
-
677
- /***/ "./node_modules/core-js/modules/es.object.from-entries.js":
678
- /*!****************************************************************!*\
679
- !*** ./node_modules/core-js/modules/es.object.from-entries.js ***!
680
- \****************************************************************/
681
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
682
-
683
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
684
- var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
685
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
686
-
687
- // `Object.fromEntries` method
688
- // https://github.com/tc39/proposal-object-from-entries
689
- $({ target: 'Object', stat: true }, {
690
- fromEntries: function fromEntries(iterable) {
691
- var obj = {};
692
- iterate(iterable, function (k, v) {
693
- createProperty(obj, k, v);
694
- }, { AS_ENTRIES: true });
695
- return obj;
696
- }
697
- });
698
-
699
-
700
- /***/ }),
701
-
702
- /***/ "./node_modules/core-js/modules/es.string.match.js":
703
- /*!*********************************************************!*\
704
- !*** ./node_modules/core-js/modules/es.string.match.js ***!
705
- \*********************************************************/
706
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
707
-
708
- "use strict";
709
-
710
- var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
711
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
712
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
713
- var toString = __webpack_require__(/*! ../internals/to-string */ "./node_modules/core-js/internals/to-string.js");
714
- var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
715
- var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
716
- var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");
717
-
718
- // @@match logic
719
- fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
720
- return [
721
- // `String.prototype.match` method
722
- // https://tc39.es/ecma262/#sec-string.prototype.match
723
- function match(regexp) {
724
- var O = requireObjectCoercible(this);
725
- var matcher = regexp == undefined ? undefined : regexp[MATCH];
726
- return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](toString(O));
727
- },
728
- // `RegExp.prototype[@@match]` method
729
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
730
- function (string) {
731
- var rx = anObject(this);
732
- var S = toString(string);
733
- var res = maybeCallNative(nativeMatch, rx, S);
734
-
735
- if (res.done) return res.value;
736
-
737
- if (!rx.global) return regExpExec(rx, S);
738
-
739
- var fullUnicode = rx.unicode;
740
- rx.lastIndex = 0;
741
- var A = [];
742
- var n = 0;
743
- var result;
744
- while ((result = regExpExec(rx, S)) !== null) {
745
- var matchStr = toString(result[0]);
746
- A[n] = matchStr;
747
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
748
- n++;
749
- }
750
- return n === 0 ? null : A;
751
- }
752
- ];
753
- });
754
-
755
-
756
- /***/ })
757
-
758
- },
759
- /******/ function(__webpack_require__) { // webpackRuntimeModules
760
- /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
761
- /******/ var __webpack_exports__ = (__webpack_exec__("./src/plugins/plugin.url.js"));
762
- /******/ }
763
- ]);
1
+ "use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[336],{8837:function(t,o,e){var a;e(5827),e(4916),e(5306),e(2222),e(6992),e(1539),e(8783),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","view"],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)}}},function(t){t(t.s=8837)}]);
764
2
  //# sourceMappingURL=plugin.url.js.map