@internetarchive/bookreader 5.0.0-70-a3 → 5.0.0-70-a2
Sign up to get free protection for your applications and to get access to all the features.
- package/BookReader/BookReader.js +1 -1
- package/BookReader/ia-bookreader-bundle.js +8 -11
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReaderDemo/demo-internetarchive.html +1 -1
- package/package.json +2 -2
- package/src/BookNavigator/book-navigator.js +2 -2
- package/src/BookNavigator/sharing.js +4 -4
- package/src/BookNavigator/{viewable-files.js → volumes/volumes-provider.js} +7 -7
- package/src/ia-bookreader/ia-bookreader.js +1 -1
- package/tests/jest/BookNavigator/book-navigator.test.js +2 -2
- package/tests/jest/BookNavigator/sharing/sharing-provider.test.js +1 -1
- package/tests/jest/BookNavigator/volumes/volumes-provider.test.js +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ia-bookreader-bundle.js","mappings":";2SAsDO,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ,EAAWa,MAAIL,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,EAAQC,KAASM,GAChJ,OAAOH,EAAI,GAAKG,GAAKC,OAAOK,eAAeb,EAAQC,EAAKM,GAAIA,CAChE,CAgD6BC,OAAOM,OA0GXN,OAAOM,WCnNrBC,ECiCAC,YCnCJ,MAAMC,EAETC,WAAWC,GACP,OAAwB,iBAAbA,GACO,UAAbA,GAAqC,MAAbA,IAGtBC,QAAQD,EACnB,EAIJF,EAAcI,OAA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,GAAC,CAAAnO,IAAA,kBAAAsB,MAED,SAAgBsM,GACd,IAAMoG,EAAege,GAAOpkB,EAAEO,QAC9BvM,KAAKuP,aAAe6C,CACtB,GAAC,CAAAhU,IAAA,uBAAAsB,MAED,SAAqBsM,GACnB,IAOuB8hC,EAPvBC,EAA2B/hC,EAAEO,OAArBgG,EAAMw7B,EAANx7B,OAAQC,EAAMu7B,EAANv7B,OAChB,GAAKD,EAML,GAFAvS,KAAK4tC,aAAer7B,EAEL,SAAXC,EACU,QAAZs7B,EAAA9tC,KAAKguC,eAAO,IAAAF,GAAZA,EAAcr7B,aAAaF,QACtB,GAAe,WAAXC,EAAqB,KAAAy7B,EAClB,QAAZA,EAAAjuC,KAAKguC,eAAO,IAAAC,GAAZA,EAAcj8B,YAChB,CACF,GAAC,CAAA5T,IAAA,SAAAsB,MAED,WACE,OAAO+nB,EAAAA,EAAAA,IAAI/B,KAAAA,GAAAC,GAAA,0jCAGmB3lB,KAAK2tC,WACjB3tC,KAAKqP,SACTrP,KAAKyR,KACJzR,KAAK+8B,MACJ/8B,KAAK+O,OACG/O,KAAKqQ,eACXrQ,KAAKsP,SACAtP,KAAKwP,cACNxP,KAAKuP,aACTvP,KAAK4tC,aAOJ5tC,KAAK+8B,MACF/8B,KAAKqP,SACPrP,KAAKyR,KACHzR,KAAKsP,SACDtP,KAAK0P,WACH1P,KAAKqQ,eACCrQ,KAAKkuC,iBACNluC,KAAK0R,oBACV1R,KAAKsS,qBACRtS,KAAKmS,gBACInS,KAAKqS,iBAUzC,sFAsECq7B,CAAA,CA/MsB,CAASrkB,EAAAA,IAkNlCvK,OAAO7T,eAAeC,OAAO,gBAAiBwiC,wECjNjCt1B,EAAgB,SAAAA,GAAA,OAAa,MAAAA,EAAAA,EAASvE,EAAAA,EAAA","sources":["webpack://@internetarchive/bookreader/./node_modules/tslib/tslib.es6.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/search-service-error.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/search-params.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/boolean.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/number.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/byte.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/date.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/duration.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/mediatype.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/page-progression.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/string.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/metadata-field.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/boolean.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/date.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/duration.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/number.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/string.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/byte.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/mediatype.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/file.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/review.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/responses/metadata/metadata-response.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/responses/search/search-response-details.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/responses/search/search-response.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/search-service.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/search-backend/default-search-backend.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-ellipses/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-ellipses/icon-ellipses.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menu-slider/styles/menu-slider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-collapse-sidebar/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-collapse-sidebar/icon-collapse-sidebar.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menu-slider/styles/menu-button.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menu-slider/menu-button.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menu-slider/ia-menu-slider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/loader.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/no-theater-available.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/iaux-item-navigator.js","webpack://@internetarchive/bookreader/../src/directives/class-map.ts","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-link/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-link/icon-link.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-share/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-share/icon-share.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-email/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-email/icon-email.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/provider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/email.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-facebook/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-facebook/icon-facebook.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/facebook.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-pinterest/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-pinterest/icon-pinterest.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/pinterest.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-tumblr/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-tumblr/icon-tumblr.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/tumblr.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-twitter/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-twitter/icon-twitter.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/twitter.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-panel.js","webpack://@internetarchive/bookreader/src/directive-helpers.ts","webpack://@internetarchive/bookreader/../src/directives/repeat.ts","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/viewable-files.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-config.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-activity-indicator/src/ia-activity-indicator.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-activity-indicator/ia-activity-indicator.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-close/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-ia-logo/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-template.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager-mode.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager-host-bridge.js","webpack://@internetarchive/bookreader/./node_modules/throttle-debounce/esm/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-search/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-search/icon-search.js","webpack://@internetarchive/bookreader/../src/directives/unsafe-html.ts","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/icon_checkmark.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/icon_close.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/button-base.js","webpack://@internetarchive/bookreader/./src/BookNavigator/search/search-results.js","webpack://@internetarchive/bookreader/./src/BookNavigator/search/search-provider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-dl/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-dl/icon-dl.js","webpack://@internetarchive/bookreader/./src/BookNavigator/downloads/downloads.js","webpack://@internetarchive/bookreader/./src/BookNavigator/downloads/downloads-provider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-visual-adjustment/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-visual-adjustment/icon-visual-adjustment.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-minus/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-minus/icon-magnify-minus.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-plus/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-plus/icon-magnify-plus.js","webpack://@internetarchive/bookreader/./src/BookNavigator/visual-adjustments/visual-adjustments.js","webpack://@internetarchive/bookreader/./src/BookNavigator/visual-adjustments/visual-adjustments-provider.js","webpack://@internetarchive/bookreader/./src/BookNavigator/delete-modal-actions.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmark-button.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-loginCTA.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/ia-bookmarks.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/bookmark-colors.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmark-edit.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-edit-pencil/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-edit-pencil/icon-edit-pencil.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-list.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-bookmark/src/icon-bookmark.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-bookmark/icon-bookmark.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-provider.js","webpack://@internetarchive/bookreader/./src/BookNavigator/sharing.js","webpack://@internetarchive/bookreader/./src/BookNavigator/viewable-files.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/ia-logo.js","webpack://@internetarchive/bookreader/./src/BookNavigator/book-navigator.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/shared-resize-observer/dist/src/shared-resize-observer.js","webpack://@internetarchive/bookreader/./src/ia-bookreader/ia-bookreader.js","webpack://@internetarchive/bookreader/../src/directives/if-defined.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport var SearchServiceErrorType;\n(function (SearchServiceErrorType) {\n SearchServiceErrorType[\"networkError\"] = \"SearchService.NetworkError\";\n SearchServiceErrorType[\"itemNotFound\"] = \"SearchService.ItemNotFound\";\n SearchServiceErrorType[\"decodingError\"] = \"SearchService.DecodingError\";\n SearchServiceErrorType[\"searchEngineError\"] = \"SearchService.SearchEngineError\";\n})(SearchServiceErrorType || (SearchServiceErrorType = {}));\nexport class SearchServiceError extends Error {\n constructor(type, message, details) {\n super(message);\n this.name = type;\n this.type = type;\n this.details = details;\n }\n}\n//# sourceMappingURL=search-service-error.js.map","export class AggregateSearchParams {\n constructor(searchParams) {\n this.searchParams = searchParams;\n }\n /**\n * Generates a query parameter from the given aggregate search params\n *\n * Example:\n *\n * [\n * {\n * \"terms\": {\n * \"field\": \"collection\",\n * \"size\":10\n * }\n * },\n * {\n * \"terms\": {\n * \"field\": \"subjectSorter\",\n * \"size\": 10\n * }\n * }\n * ]\n *\n * @returns {Record<string, AggregateSearchParam>[]}\n * @memberof AggregateSearchParams\n */\n get asSearchParams() {\n return this.searchParams.map(param => {\n return {\n terms: param,\n };\n });\n }\n}\nexport var SortDirection;\n(function (SortDirection) {\n SortDirection[\"Asc\"] = \"asc\";\n SortDirection[\"Desc\"] = \"desc\";\n})(SortDirection || (SortDirection = {}));\nexport class SortParam {\n constructor(field, direction) {\n this.field = field;\n this.direction = direction;\n }\n get asString() {\n return `${this.field} ${this.direction}`;\n }\n}\n/**\n * SearchParams provides an encapsulation to all of the search parameters\n * available for searching.\n *\n * It also provides an `asUrlSearchParams` method for converting the\n * parameters to an IA-style query string. ie. it converts the `fields` array\n * to `fl=identifier,collection` and `sort` to `sort=date+desc,downloads+asc`\n */\nexport class SearchParams {\n constructor(options) {\n this.query = options.query;\n this.sort = options.sort;\n this.rows = options.rows;\n this.page = options.page;\n this.fields = options.fields;\n this.aggregations = options.aggregations;\n }\n /**\n * Return a URLSearchParams representation of the parameters for use in network requests.\n *\n * @readonly\n * @type {URLSearchParams}\n * @memberof SearchParams\n */\n get asUrlSearchParams() {\n const params = new URLSearchParams();\n params.append('q', this.query);\n params.append('output', 'json');\n if (this.rows) {\n params.append('rows', String(this.rows));\n }\n if (this.page) {\n params.append('page', String(this.page));\n }\n if (this.fields) {\n params.append('fl', this.fields.join(','));\n }\n if (this.sort) {\n const sortStrings = this.sort.map(sort => sort.asString);\n params.append('sort', sortStrings.join(','));\n }\n if (this.aggregations) {\n const searchParams = this.aggregations.asSearchParams;\n const stringified = JSON.stringify(searchParams);\n params.append('user_aggs', stringified);\n }\n return params;\n }\n}\n//# sourceMappingURL=search-params.js.map","export class BooleanParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue === 'string' &&\n (rawValue === 'false' || rawValue === '0')) {\n return false;\n }\n return Boolean(rawValue);\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nBooleanParser.shared = new BooleanParser();\n//# sourceMappingURL=boolean.js.map","export class NumberParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue === 'number')\n return rawValue;\n if (typeof rawValue === 'boolean')\n return undefined;\n const value = parseFloat(rawValue);\n if (Number.isNaN(value)) {\n return undefined;\n }\n return value;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nNumberParser.shared = new NumberParser();\n//# sourceMappingURL=number.js.map","import { NumberParser } from './number';\n/**\n * The ByteParser is a unit-specific NumberParser\n * that returns a value in bytes\n *\n * @export\n * @class ByteParser\n * @implements {FieldParserInterface<Byte>}\n */\nexport class ByteParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n const parser = NumberParser.shared;\n return parser.parseValue(rawValue);\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nByteParser.shared = new ByteParser();\n//# sourceMappingURL=byte.js.map","export class DateParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n // try different date parsing\n return this.parseJSDate(rawValue) || this.parseBracketDate(rawValue);\n }\n // handles \"[yyyy]\" format\n parseBracketDate(rawValue) {\n if (typeof rawValue !== 'string')\n return undefined;\n const yearMatch = rawValue.match(/\\[([0-9]{4})\\]/);\n if (!yearMatch || yearMatch.length < 2) {\n return undefined;\n }\n return this.parseJSDate(yearMatch[1]);\n }\n parseJSDate(rawValue) {\n if (typeof rawValue !== 'string')\n return undefined;\n let parsedValue = rawValue;\n // fix for Safari not supporting `yyyy-mm-dd HH:MM:SS` format, insert a `T` into the space\n if (parsedValue.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}\\s{1}[0-9]{2}:[0-9]{2}:[0-9]{2}$/)) {\n parsedValue = parsedValue.replace(' ', 'T');\n }\n const parsed = Date.parse(parsedValue);\n if (Number.isNaN(parsed)) {\n return undefined;\n }\n let date = new Date(parsedValue);\n // the `Date(string)` constructor parses some strings as GMT and some in the local timezone\n // this attempts to detect cases that get parsed as GMT and adjusts accordingly\n const dateWithTimeZone = parsedValue.indexOf('Z') > -1 || // ISO8601 with GMT timezone\n parsedValue.indexOf('+') > -1 || // ISO8601 with positive timezone offset\n parsedValue.match(/^[0-9]{4}$/) || // just the year, ie `2020`\n parsedValue.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/) || // YYYY-MM-DD format\n parsedValue.match(/^.*?-[0-9]{2}:[0-9]{2}$/) || // `YYYY-MM-DDTHH:mm:ss-00:00` format\n parsedValue.match(/^.*?-[0-9]{4}$/); // `YYYY-MM-DDTHH:mm:ss-0000` format\n if (dateWithTimeZone) {\n date = new Date(date.getTime() + date.getTimezoneOffset() * 1000 * 60);\n }\n return date;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nDateParser.shared = new DateParser();\n//# sourceMappingURL=date.js.map","/**\n * Parses duration format to a `Duration` (number of seconds with decimal)\n *\n * Can parse hh:mm:ss.ms, hh:mm:ss, mm:ss, mm:ss.ms, and s.ms formats\n */\nexport class DurationParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue === 'number')\n return rawValue;\n if (typeof rawValue === 'boolean')\n return undefined;\n const componentArray = rawValue.split(':');\n let seconds;\n // if there are no colons in the string, we can assume it's in sss.ms format so just parse it\n if (componentArray.length === 1) {\n seconds = this.parseNumberFormat(componentArray[0]);\n }\n else {\n seconds = this.parseColonSeparatedFormat(componentArray);\n }\n return seconds;\n }\n /**\n * Parse sss.ms format\n *\n * @param rawValue\n * @returns\n */\n parseNumberFormat(rawValue) {\n let seconds = parseFloat(rawValue);\n if (Number.isNaN(seconds))\n seconds = undefined;\n return seconds;\n }\n /**\n * Parse hh:mm:ss.ms format\n *\n * @param componentArray\n * @returns\n */\n parseColonSeparatedFormat(componentArray) {\n // if any of the hh:mm:ss components are NaN, just return undefined\n let hasNaNComponent = false;\n const parsedValue = componentArray\n .map((element, index) => {\n const componentValue = parseFloat(element);\n if (Number.isNaN(componentValue)) {\n hasNaNComponent = true;\n return 0;\n }\n const exponent = componentArray.length - 1 - index;\n const multiplier = 60 ** exponent;\n return componentValue * Math.floor(multiplier);\n })\n .reduce((a, b) => a + b, 0);\n return hasNaNComponent ? undefined : parsedValue;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nDurationParser.shared = new DurationParser();\n//# sourceMappingURL=duration.js.map","export class MediaTypeParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue !== 'string')\n return undefined;\n return rawValue;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nMediaTypeParser.shared = new MediaTypeParser();\n//# sourceMappingURL=mediatype.js.map","export class PageProgressionParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue !== 'string')\n return undefined;\n return rawValue;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nPageProgressionParser.shared = new PageProgressionParser();\n//# sourceMappingURL=page-progression.js.map","export class StringParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n return String(rawValue);\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nStringParser.shared = new StringParser();\n//# sourceMappingURL=string.js.map","/**\n * The MetadataField is responsible for three things:\n * 1. Take in some raw data (strings, arrays, numbers, etc)\n * 2. Normalize the input to an array of the input,\n * ie. [string, string], [number, number], [Date, Date], etc\n * 3. Cast the values to their expected `Type`\n *\n * This class gets instiated with a `Type` and a parser of that type. For instance, the\n * `DateField` is a subclass of `MetadataField` with a `Type` of `Date` and a `DateParser`.\n *\n * When using a `DateField`, you can pass it a string date and it will cast it to a javascript Date,\n * ie:\n *\n * ```\n * const dateField = new DateField('2020-02-13')\n * dateField.value = Date(2020-02-13) // native javascript Date object\n * dateField.values = [Date(2020-02-13)] // the normalized array of values\n * dateField.rawValue = '2020-02-13' // the raw string that was passed in\n * ```\n *\n * @class MetadataField\n * @template Type The type of metadata this is (string, number, Date, etc)\n * @template FieldParserInterfaceType The parser for that type (StringParser, NumberParser, etc)\n */\nexport class MetadataField {\n constructor(parser, rawValue) {\n /**\n * The array of all values for the field.\n *\n * Many fields only contain a single value and\n * can be accessed via the `.value` getter\n *\n * @type {Type[]}\n * @memberof MetadataField\n */\n this.values = [];\n this.parser = parser;\n this.rawValue = rawValue;\n this.processRawValue();\n }\n /**\n * The first value if there are multiple or the only value if there is one\n *\n * @readonly\n * @type {(Type | undefined)}\n * @memberof MetadataField\n */\n get value() {\n return this.values.length > 0 ? this.values[0] : undefined;\n }\n processRawValue() {\n if (this.rawValue === undefined) {\n return;\n }\n if (Array.isArray(this.rawValue)) {\n this.rawValue.forEach(value => {\n this.parseAndPersistValue(value);\n });\n }\n else {\n this.parseAndPersistValue(this.rawValue);\n }\n }\n parseAndPersistValue(value) {\n const parsedValue = this.parser.parseValue(value);\n if (parsedValue !== undefined) {\n this.values.push(parsedValue);\n }\n }\n}\n//# sourceMappingURL=metadata-field.js.map","import { BooleanParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class BooleanField extends MetadataField {\n constructor(rawValue) {\n super(BooleanParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=boolean.js.map","import { DateParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class DateField extends MetadataField {\n constructor(rawValue) {\n super(DateParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=date.js.map","import { DurationParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\n/**\n * The DurationField parses different duration formats\n * and returns a `Duration`, which is a number in seconds\n * with decimals.\n *\n * @export\n * @class DurationField\n * @extends {MetadataField<Duration, DurationParser>}\n */\nexport class DurationField extends MetadataField {\n constructor(rawValue) {\n super(DurationParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=duration.js.map","import { NumberParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class NumberField extends MetadataField {\n constructor(rawValue) {\n super(NumberParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=number.js.map","import { StringParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class StringField extends MetadataField {\n constructor(rawValue) {\n super(StringParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=string.js.map","import { ByteParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\n/**\n * ByteField is a unit-specific number field that\n * returns a value in bytes\n *\n * @export\n * @class ByteField\n * @extends {MetadataField<Byte, ByteParser>}\n */\nexport class ByteField extends MetadataField {\n constructor(rawValue) {\n super(ByteParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=byte.js.map","import { MediaTypeParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class MediaTypeField extends MetadataField {\n constructor(rawValue) {\n super(MediaTypeParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=mediatype.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { BooleanField } from './metadata-fields/field-types/boolean';\nimport { DateField } from './metadata-fields/field-types/date';\nimport { DurationField } from './metadata-fields/field-types/duration';\nimport { NumberField } from './metadata-fields/field-types/number';\nimport { StringField } from './metadata-fields/field-types/string';\nimport { ByteField } from './metadata-fields/field-types/byte';\nimport { MediaTypeField } from './metadata-fields/field-types/mediatype';\n/**\n * Metadata is an expansive model that describes an Item.\n *\n * The fields in here get casted to their respective field types. See `metadata-fields/field-type`.\n *\n * Add additional fields as needed.\n *\n * @export\n * @class Metadata\n */\nexport class Metadata {\n constructor(json) {\n this.rawMetadata = json;\n this.identifier = json.identifier;\n this.addeddate = json.addeddate ? new DateField(json.addeddate) : undefined;\n this.publicdate = json.publicdate\n ? new DateField(json.publicdate)\n : undefined;\n this.indexdate = json.indexdate ? new DateField(json.indexdate) : undefined;\n this.audio_codec = json.audio_codec\n ? new StringField(json.audio_codec)\n : undefined;\n this.audio_sample_rate = json.audio_sample_rate\n ? new NumberField(json.audio_sample_rate)\n : undefined;\n this.collection = json.collection\n ? new StringField(json.collection)\n : undefined;\n this.collections_raw = json.collections_raw\n ? new StringField(json.collections_raw)\n : undefined;\n this.collection_size = json.collection_size\n ? new ByteField(json.collection_size)\n : undefined;\n this.contributor = json.contributor\n ? new StringField(json.contributor)\n : undefined;\n this.coverage = json.coverage ? new StringField(json.coverage) : undefined;\n this.creator = json.creator ? new StringField(json.creator) : undefined;\n this.date = json.date ? new DateField(json.date) : undefined;\n this.description = json.description\n ? new StringField(json.description)\n : undefined;\n this.downloads = json.downloads\n ? new NumberField(json.downloads)\n : undefined;\n this.duration = json.duration\n ? new DurationField(json.duration)\n : undefined;\n this.files_count = json.files_count\n ? new NumberField(json.files_count)\n : undefined;\n this.item_count = json.item_count\n ? new NumberField(json.item_count)\n : undefined;\n this.item_size = json.item_size ? new ByteField(json.item_size) : undefined;\n this.language = json.language ? new StringField(json.language) : undefined;\n this.length = json.length ? new DurationField(json.length) : undefined;\n this.lineage = json.lineage ? new StringField(json.lineage) : undefined;\n this.mediatype = json.mediatype\n ? new MediaTypeField(json.mediatype)\n : undefined;\n this.month = json.month ? new NumberField(json.month) : undefined;\n this.noindex = json.noindex ? new BooleanField(json.noindex) : undefined;\n this.notes = json.notes ? new StringField(json.notes) : undefined;\n this.num_favorites = json.num_favorites\n ? new NumberField(json.num_favorites)\n : undefined;\n this.num_reviews = json.num_reviews\n ? new NumberField(json.num_reviews)\n : undefined;\n this.runtime = json.runtime ? new DurationField(json.runtime) : undefined;\n this.scanner = json.scanner ? new StringField(json.scanner) : undefined;\n this.source = json.source ? new StringField(json.source) : undefined;\n this.start_localtime = json.start_localtime\n ? new DateField(json.start_localtime)\n : undefined;\n this.start_time = json.start_time\n ? new DateField(json.start_time)\n : undefined;\n this.stop_time = json.stop_time ? new DateField(json.stop_time) : undefined;\n this.subject = json.subject ? new StringField(json.subject) : undefined;\n this.taper = json.taper ? new StringField(json.taper) : undefined;\n this.title = json.title ? new StringField(json.title) : undefined;\n this.track = json.track ? new NumberField(json.track) : undefined;\n this.transferer = json.transferer\n ? new StringField(json.transferer)\n : undefined;\n this.type = json.type ? new StringField(json.type) : undefined;\n this.uploader = json.uploader ? new StringField(json.uploader) : undefined;\n this.utc_offset = json.utc_offset\n ? new NumberField(json.utc_offset)\n : undefined;\n this.venue = json.venue ? new StringField(json.venue) : undefined;\n this.week = json.week ? new NumberField(json.week) : undefined;\n this.year = json.year ? new DateField(json.year) : undefined;\n }\n}\n//# sourceMappingURL=metadata.js.map","import { ByteParser, DurationParser, NumberParser, } from '@internetarchive/field-parsers';\n/**\n * This represents an Internet Archive File\n *\n * @export\n * @class File\n */\nexport class File {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(json) {\n this.name = json.name;\n this.source = json.source;\n this.btih = json.btih;\n this.md5 = json.md5;\n this.format = json.format;\n this.mtime = json.mtime;\n this.crc32 = json.crc32;\n this.sha1 = json.sha1;\n this.original = json.original;\n this.title = json.title;\n this.length = json.length\n ? DurationParser.shared.parseValue(json.length)\n : undefined;\n this.size = json.size ? ByteParser.shared.parseValue(json.size) : undefined;\n this.height = json.height\n ? NumberParser.shared.parseValue(json.height)\n : undefined;\n this.width = json.width\n ? NumberParser.shared.parseValue(json.width)\n : undefined;\n this.track = json.track\n ? NumberParser.shared.parseValue(json.track)\n : undefined;\n this.external_identifier = json['external-identifier'];\n this.creator = json.creator;\n this.album = json.album;\n }\n}\n//# sourceMappingURL=file.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { DateParser } from '@internetarchive/field-parsers';\nexport class Review {\n constructor(json) {\n this.reviewbody = json.reviewbody;\n this.reviewtitle = json.reviewtitle;\n this.reviewer = json.reviewer;\n this.reviewdate = DateParser.shared.parseValue(json.reviewdate);\n this.createdate = DateParser.shared.parseValue(json.createdate);\n this.stars = json.stars ? parseFloat(json.stars) : undefined;\n }\n}\n//# sourceMappingURL=review.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { File } from '../../models/file';\nimport { Metadata } from '../../models/metadata';\nimport { Review } from '../../models/review';\n/**\n * The main top-level reponse when fetching Metadata\n *\n * @export\n * @class MetadataResponse\n */\nexport class MetadataResponse {\n constructor(json) {\n var _a, _b;\n this.rawResponse = json;\n this.created = json.created;\n this.d1 = json.d1;\n this.d2 = json.d2;\n this.dir = json.dir;\n this.files = (_a = json.files) === null || _a === void 0 ? void 0 : _a.map((file) => new File(file));\n this.files_count = json.files_count;\n this.item_last_updated = json.item_last_updated;\n this.item_size = json.item_size;\n this.metadata = new Metadata(json.metadata);\n this.server = json.server;\n this.uniq = json.uniq;\n this.workable_servers = json.workable_servers;\n this.speech_vs_music_asr = json.speech_vs_music_asr;\n this.reviews = (_b = json.reviews) === null || _b === void 0 ? void 0 : _b.map((entry) => new Review(entry));\n }\n}\n//# sourceMappingURL=metadata-response.js.map","import { Metadata } from '../../models/metadata';\n/**\n * This is the search response details inside the SearchResponse object that contains\n * the search results, under the `docs` key.\n *\n * @export\n * @class Response\n */\nexport class SearchResponseDetails {\n constructor(json) {\n this.numFound = json.numFound;\n this.start = json.start;\n this.docs = json.docs.map((doc) => new Metadata(doc));\n this.aggregations = json.aggregations;\n }\n}\n//# sourceMappingURL=search-response-details.js.map","import { SearchResponseDetails } from './search-response-details';\n/**\n * The top-level response model when retrieving a response from the advanced search endpoint.\n *\n * @export\n * @class SearchResponse\n */\nexport class SearchResponse {\n constructor(json) {\n this.rawResponse = json;\n this.responseHeader = json.responseHeader;\n this.response = new SearchResponseDetails(json.response);\n }\n}\n//# sourceMappingURL=search-response.js.map","import { SearchResponse } from './responses/search/search-response';\nimport { MetadataResponse } from './responses/metadata/metadata-response';\nimport { DefaultSearchBackend } from './search-backend/default-search-backend';\nimport { SearchServiceError, SearchServiceErrorType, } from './search-service-error';\n/**\n * The Search Service is responsible for taking the raw response provided by\n * the Search Backend and modeling it as a `SearchResponse` or `MetadataResponse`\n * object, depending on the type of response.\n */\nexport class SearchService {\n constructor(searchBackend) {\n this.searchBackend = searchBackend;\n }\n /** @inheritdoc */\n async search(params) {\n const rawResponse = await this.searchBackend.performSearch(params);\n if (rawResponse.error) {\n return rawResponse;\n }\n const modeledResponse = new SearchResponse(rawResponse.success);\n return { success: modeledResponse };\n }\n /** @inheritdoc */\n async fetchMetadata(identifier) {\n var _a;\n const rawResponse = await this.searchBackend.fetchMetadata(identifier);\n if (rawResponse.error) {\n return rawResponse;\n }\n if (((_a = rawResponse.success) === null || _a === void 0 ? void 0 : _a.metadata) === undefined) {\n return {\n error: new SearchServiceError(SearchServiceErrorType.itemNotFound),\n };\n }\n const modeledResponse = new MetadataResponse(rawResponse.success);\n return { success: modeledResponse };\n }\n}\nSearchService.default = new SearchService(new DefaultSearchBackend());\n//# sourceMappingURL=search-service.js.map","import { SearchServiceError, SearchServiceErrorType, } from '../search-service-error';\n/**\n * The DefaultSearchBackend performs a `window.fetch` request to archive.org\n */\nexport class DefaultSearchBackend {\n constructor(baseUrl = 'archive.org') {\n this.baseUrl = baseUrl;\n }\n async performSearch(params) {\n const urlSearchParam = params.asUrlSearchParams;\n const queryAsString = urlSearchParam.toString();\n const url = `https://${this.baseUrl}/advancedsearch.php?${queryAsString}`;\n return this.fetchUrl(url);\n }\n async fetchMetadata(identifier) {\n const url = `https://${this.baseUrl}/metadata/${identifier}`;\n return this.fetchUrl(url);\n }\n async fetchUrl(url) {\n let response;\n // first try the fetch and return a networkError if it fails\n try {\n response = await fetch(url);\n }\n catch (err) {\n const message = err instanceof Error ? err.message : err;\n return this.getErrorResult(SearchServiceErrorType.networkError, message);\n }\n // then try json decoding and return a decodingError if it fails\n try {\n const json = await response.json();\n // the advanced search endpoint doesn't return an HTTP Error 400\n // and instead returns an HTTP 200 with an `error` key in the payload\n const error = json['error'];\n if (error) {\n const forensics = json['forensics'];\n return this.getErrorResult(SearchServiceErrorType.searchEngineError, error, forensics);\n }\n else {\n // success\n return { success: json };\n }\n }\n catch (err) {\n const message = err instanceof Error ? err.message : err;\n return this.getErrorResult(SearchServiceErrorType.decodingError, message);\n }\n }\n getErrorResult(errorType, message, details) {\n const error = new SearchServiceError(errorType, message, details);\n const result = { error };\n return result;\n }\n}\n//# sourceMappingURL=default-search-backend.js.map","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"ellipsesTitleID ellipsesDescID\"\n>\n <title id=\"ellipsesTitleID\">Ellipses icon</title>\n <desc id=\"ellipsesDescID\">An illustration of text ellipses.</desc>\n <path class=\"fill-color\" d=\"m10.5 17.5c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5c-1.38071187 0-2.5-1.1192881-2.5-2.5s1.11928813-2.5 2.5-2.5zm9.5 0c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5-2.5-1.1192881-2.5-2.5 1.1192881-2.5 2.5-2.5zm9.5 0c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5-2.5-1.1192881-2.5-2.5 1.1192881-2.5 2.5-2.5z\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconEllipses extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-ellipses', IAIconEllipses);\n\nexport default IAIconEllipses;\n","import { css } from 'lit';\nconst menuButtonWidth = css `42px`;\nconst sliderWidth = css `var(--menuWidth, 320px)`;\nconst transitionTiming = css `var(--animationTiming, 200ms)`;\nexport default css `\n .main {\n overflow: hidden;\n width: 100%;\n height: 100%;\n }\n\n .animate {\n transition: transform ${transitionTiming} ease-out;\n }\n\n .menu {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: ${sliderWidth};\n padding: 0.5rem 0.5rem 0 0;\n box-sizing: border-box;\n font-size: 1.4rem;\n color: var(--primaryTextColor);\n background: var(--menuSliderBg);\n transform: translateX(calc(${sliderWidth} * -1));\n }\n\n .menu > button.close {\n right: 0.7rem;\n }\n\n button {\n outline: none;\n cursor: pointer;\n }\n\n header {\n margin: 0 0 0.5rem 0;\n }\n\n header * {\n margin: 0;\n display: inline-block;\n }\n header button {\n outline: none;\n cursor: pointer;\n }\n\n header.with-secondary-action .details {\n width: 80%;\n }\n\n header .details {\n font-weight: bold;\n width: 88%;\n }\n\n header .custom-action > *,\n button.close {\n padding: 0;\n background-color: transparent;\n border: 0;\n --iconWidth: var(--menuSliderHeaderIconWidth);\n --iconHeight: var(--menuSliderHeaderIconHeight);\n }\n\n header .custom-action,\n button.close {\n position: absolute;\n }\n button.close {\n right: 0.5rem;\n }\n\n button.close * {\n float: right;\n }\n\n .content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: ${menuButtonWidth};\n z-index: 1;\n transform: translateX(calc(${sliderWidth} * -1));\n transition: transform ${transitionTiming} ease-out;\n background: var(--activeButtonBg);\n border-right: 0.2rem solid;\n border-color: var(--subpanelRightBorderColor);\n padding: 0.5rem 0 0 0.5rem;\n display: flex;\n flex-direction: column;\n }\n\n .open {\n transform: translateX(0);\n }\n\n .menu-list {\n padding: 0;\n margin: 0;\n list-style: none;\n background: var(--menuSliderBg);\n }\n .menu-list li {\n margin-bottom: 0.2rem;\n }\n\n .content > section {\n overflow: auto;\n overscroll-behavior: contain;\n }\n`;\n//# sourceMappingURL=menu-slider.js.map","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 18 18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"collapseSidebarTitleID collapseSidebarDescID\"\n>\n <title id=\"collapseSidebarTitleID\">Collapse sidebar</title>\n <desc id=\"collapseSidebarDescID\">A circle with a left pointing chevron</desc>\n <path d=\"m9 0c4.9705627 0 9 4.02943725 9 9 0 4.9705627-4.0294373 9-9 9-4.97056275 0-9-4.0294373-9-9 0-4.97056275 4.02943725-9 9-9zm1.6976167 5.28352881c-.365258-.3556459-.9328083-.37581056-1.32099801-.06558269l-.09308988.0844372-3 3.08108108-.08194436.09533317c-.27484337.36339327-.26799482.87009349.01656959 1.22592581l.084491.09308363 3 2.91891889.09533796.0818904c.3633964.2746544.8699472.2677153 1.2256839-.0167901l.093059-.0844712.0818904-.095338c.2746544-.3633964.2677153-.8699472-.0167901-1.2256839l-.0844712-.093059-2.283355-2.2222741 2.3024712-2.36338332.0819252-.09530804c.2997677-.39632298.2644782-.96313393-.1007797-1.31877983z\" fill-rule=\"evenodd\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconCollapseSidebar extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-collapse-sidebar', IAIconCollapseSidebar);\n\nexport default IAIconCollapseSidebar;\n","import { css } from 'lit';\nexport default css `\n a {\n display: inline-block;\n text-decoration: none;\n }\n\n .menu-item {\n display: inline-flex;\n width: 100%;\n padding: 0;\n font-size: 1.6rem;\n text-align: left;\n background: transparent;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: none;\n cursor: pointer;\n }\n\n button.menu-item {\n -webkit-appearance: none;\n appearance: none;\n border-radius: 0;\n }\n\n .menu-item:focus {\n outline: none;\n }\n\n .label {\n display: var(--menuButtonLabelDisplay, none);\n padding: 0;\n font-weight: 400;\n color: var(--primaryTextColor);\n text-align: left;\n vertical-align: middle;\n margin-left: 1rem;\n }\n\n .menu-details {\n color: var(--primaryTextColor);\n display: inline-block;\n margin-left: 0.5rem;\n font-style: italic;\n font-size: 1.5rem;\n }\n\n .menu-item > .icon {\n position: relative;\n display: inline-flex;\n z-index: 2;\n min-width: 4.2rem;\n max-width: 4.2rem;\n height: 4.2rem;\n vertical-align: middle;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n\n .menu-item.selected .icon {\n background-color: var(--activeButtonBg);\n border-radius: 1rem 0 0 1rem;\n }\n\n .icon .fill-color {\n fill: #999;\n }\n\n .icon.active .fill-color {\n fill: #fff;\n }\n`;\n//# sourceMappingURL=menu-button.js.map","import { __decorate } from \"tslib\";\nimport { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport menuButtonCSS from './styles/menu-button';\nlet MenuButton = class MenuButton extends LitElement {\n constructor() {\n super(...arguments);\n this.icon = '';\n this.href = '';\n this.label = '';\n this.menuDetails = '';\n this.buttonId = '';\n this.selected = false;\n this.followable = false;\n }\n static get styles() {\n return menuButtonCSS;\n }\n onClick(e) {\n e.preventDefault();\n this.dispatchMenuTypeSelectedEvent();\n }\n dispatchMenuTypeSelectedEvent() {\n this.dispatchEvent(new CustomEvent('menuTypeSelected', {\n bubbles: true,\n composed: true,\n detail: {\n id: this.buttonId,\n },\n }));\n }\n get buttonClass() {\n return this.selected ? 'selected' : '';\n }\n get iconClass() {\n return this.selected ? 'active' : '';\n }\n get menuItem() {\n return html `\n <span class=\"icon ${this.iconClass}\"> ${this.icon} </span>\n <span class=\"label\">${this.label}</span>\n <span class=\"menu-details\">${this.menuDetails}</span>\n `;\n }\n get linkButton() {\n return html `\n <a\n href=\"${this.href}\"\n class=\"menu-item ${this.buttonClass}\"\n @click=${this.followable ? undefined : this.onClick}\n >${this.menuItem}</a\n >\n `;\n }\n get clickButton() {\n return html `\n <button class=\"menu-item ${this.buttonClass}\" @click=${this.onClick}>\n ${this.menuItem}\n </button>\n `;\n }\n render() {\n return this.href ? this.linkButton : this.clickButton;\n }\n};\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"icon\", void 0);\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"href\", void 0);\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"label\", void 0);\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"menuDetails\", void 0);\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"buttonId\", void 0);\n__decorate([\n property({ type: Boolean })\n], MenuButton.prototype, \"selected\", void 0);\n__decorate([\n property({ type: Boolean })\n], MenuButton.prototype, \"followable\", void 0);\nMenuButton = __decorate([\n customElement('menu-button')\n], MenuButton);\nexport { MenuButton };\n//# sourceMappingURL=menu-button.js.map","import { __decorate } from \"tslib\";\nimport { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport menuSliderCSS from './styles/menu-slider';\nimport '@internetarchive/icon-collapse-sidebar';\nimport './menu-button';\nconst sliderEvents = {\n closeDrawer: 'menuSliderClosed',\n};\nlet IaMenuSlider = class IaMenuSlider extends LitElement {\n constructor() {\n super(...arguments);\n this.menus = [];\n this.open = false;\n this.manuallyHandleClose = false;\n this.selectedMenu = '';\n this.selectedMenuAction = nothing;\n this.animateMenuOpen = false;\n }\n static get styles() {\n return menuSliderCSS;\n }\n updated() {\n const { actionButton } = this.selectedMenuDetails || {};\n const actionButtonHasChanged = actionButton !== this.selectedMenuAction;\n if (actionButtonHasChanged) {\n this.selectedMenuAction = actionButton || nothing;\n }\n }\n /**\n * Event handler, captures state of selected menu\n */\n setSelectedMenu({ detail }) {\n const { id } = detail;\n this.selectedMenu = this.selectedMenu === id ? '' : id;\n const { actionButton } = this.selectedMenuDetails || {};\n this.selectedMenuAction = actionButton || nothing;\n }\n /**\n * closes menu drawer\n */\n closeMenu() {\n if (!this.manuallyHandleClose) {\n this.open = false;\n }\n const { closeDrawer } = sliderEvents;\n const drawerClosed = new CustomEvent(closeDrawer, {\n detail: this.selectedMenuDetails,\n });\n this.dispatchEvent(drawerClosed);\n }\n get selectedMenuDetails() {\n const selectedMenu = this.menus.find(menu => menu.id === this.selectedMenu);\n return selectedMenu;\n }\n get selectedMenuComponent() {\n const menuItem = this.selectedMenuDetails;\n return menuItem && (menuItem === null || menuItem === void 0 ? void 0 : menuItem.component)\n ? menuItem.component\n : html ``;\n }\n /* render */\n get sliderDetailsClass() {\n const animate = this.animateMenuOpen ? 'animate' : '';\n const state = this.open ? 'open' : '';\n return `${animate} ${state}`;\n }\n get selectedMenuClass() {\n return this.selectedMenu ? 'open' : '';\n }\n get menuItems() {\n return this.menus.map((menu) => html `\n <li>\n <menu-button\n @menuTypeSelected=${this.setSelectedMenu}\n .icon=${menu.icon}\n .label=${menu.label}\n .menuDetails=${menu.menuDetails}\n .buttonId=${menu.id}\n .selected=${menu.id === this.selectedMenu}\n .followable=${menu.followable}\n .href=${menu.href}\n ></menu-button>\n </li>\n `);\n }\n get renderMenuHeader() {\n const { label = '', menuDetails = '' } = this.selectedMenuDetails || {};\n const headerClass = this.selectedMenuAction ? 'with-secondary-action' : '';\n const actionBlock = this.selectedMenuAction\n ? html `<span class=\"custom-action\">${this.selectedMenuAction}</span>`\n : nothing;\n return html `\n <header class=\"${headerClass}\">\n <div class=\"details\">\n <h3>${label}</h3>\n <span class=\"extra-details\">${menuDetails}</span>\n </div>\n ${actionBlock} ${this.closeButton}\n </header>\n `;\n }\n get closeButton() {\n return html `\n <button\n class=\"close\"\n aria-label=\"Close this menu\"\n @click=${this.closeMenu}\n >\n <ia-icon-collapse-sidebar></ia-icon-collapse-sidebar>\n </button>\n `;\n }\n /** @inheritdoc */\n render() {\n return html `\n <div class=\"main\">\n <div class=\"menu ${this.sliderDetailsClass}\">\n ${this.closeButton}\n <ul class=\"menu-list\">\n ${this.menuItems}\n </ul>\n <div\n class=\"content ${this.selectedMenuClass}\"\n @menuTypeSelected=${this.setSelectedMenu}\n >\n ${this.renderMenuHeader}\n <section>\n <div class=\"selected-menu\">${this.selectedMenuComponent}</div>\n </section>\n </div>\n </div>\n </div>\n `;\n }\n};\n__decorate([\n property({ type: Array })\n], IaMenuSlider.prototype, \"menus\", void 0);\n__decorate([\n property({ type: Boolean })\n], IaMenuSlider.prototype, \"open\", void 0);\n__decorate([\n property({ type: Boolean })\n], IaMenuSlider.prototype, \"manuallyHandleClose\", void 0);\n__decorate([\n property({ type: String })\n], IaMenuSlider.prototype, \"selectedMenu\", void 0);\n__decorate([\n property({ type: Object })\n], IaMenuSlider.prototype, \"selectedMenuAction\", void 0);\n__decorate([\n property({ type: Boolean })\n], IaMenuSlider.prototype, \"animateMenuOpen\", void 0);\nIaMenuSlider = __decorate([\n customElement('ia-menu-slider')\n], IaMenuSlider);\nexport { IaMenuSlider };\n//# sourceMappingURL=ia-menu-slider.js.map","import { __decorate } from \"tslib\";\n/* eslint-disable class-methods-use-this */\nimport { css, html, LitElement, svg, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nlet IAItemNavLoader = class IAItemNavLoader extends LitElement {\n constructor() {\n super(...arguments);\n this.loaderMessage = '';\n }\n get bookIconSvg() {\n return svg `\n <g class=\"bookIcon\" transform=\"matrix(1 0 0 -1 28 67.362264)\">\n <path d=\"m44.71698 31.6981124v-29.99320678s-18.0956599.30735848-18.6322637-.7171698c-.0633962-.12226414-1.890566-.59207545-2.9745282-.59207545-1.3228302 0-3.5122641 0-4.1286791.74547168-.9707547 1.17452827-18.82811278.71660375-18.82811278.71660375v30.040754l1.83849052.7867924.29094339-28.48188608s15.94981097.15339622 17.09094297-1.10716978c.8145283-.90056602 4.997547-.91641507 5.3450942-.3526415.9611321 1.55716977 14.7101883 1.31716978 17.6077354 1.45981128l.3266038 28.22830118z\"/>\n <path d=\"m40.1129424 33.5957539h-12.8337733c-1.8690565 0-3.1098112-.7545283-3.9299999-1.6279245v-26.70452764l1.2362264-.00792453c.4584906.72962262 3.0922641 1.39415091 3.0922641 1.39415091h10.1298111s1.0381131.01754717 1.5141509.47377357c.5643396.54056602.7913207 1.36981129.7913207 1.36981129z\"/>\n <path d=\"m17.3354713 33.5957539h-12.8337733v-25.37660316s0-.75283017.49358489-1.14113205c.52867924-.41433961 1.3415094-.42849055 1.3415094-.42849055h10.59905631s2.2075471-.52698112 3.0928301-1.39415091l1.2.00792453v26.74245214c-.8201886.8581132-2.0530188 1.59-3.8932074 1.59\"/>\n </g>\n `;\n }\n get icon() {\n return this.bookIconSvg;\n }\n get loader() {\n return svg `\n <svg\n height=\"100\"\n viewBox=\"0 0 100 100\"\n width=\"100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"item-loading\"\n >\n <title id=\"item-loading\">Currently loading viewer.</title>\n <desc>Please wait while we load theater.</desc>\n <g fill=\"#333\" fill-rule=\"evenodd\" class=\"book-icon\">\n ${this.icon}\n <path\n class=\"ring\"\n d=\"m17.8618849 11.6970233c18.5864635-15.59603144 45.6875867-15.59603102 64.2740497.000001 1.9271446 1.6170806 2.1785128 4.4902567.5614466 6.4174186-1.6170661 1.9271618-4.4902166 2.1785323-6.4173612.5614517-15.1996922-12.75416882-37.3625282-12.75416916-52.5622206-.000001-15.19969387 12.7541707-19.04823077 34.5805019-9.1273354 51.7641499 9.9208955 17.183646 30.7471499 24.7638499 49.3923323 17.9774983 18.6451823-6.7863521 29.7266014-25.9801026 26.2811129-45.5206248-.436848-2.4775114 1.2174186-4.8400696 3.6949079-5.2769215 2.4774893-.4368518 4.8400264 1.2174296 5.2768744 3.694941 4.2132065 23.8945096-9.3373563 47.3649806-32.137028 55.6634567-22.799672 8.2984758-48.2663986-.9707372-60.39785211-21.9832155-12.1314534-21.012481-7.42539173-47.7021198 11.16107351-63.2981544z\"\n fill-rule=\"nonzero\"\n />\n </g>\n </svg>\n `;\n }\n render() {\n const title = this.loaderMessage\n ? html `<h2>${this.loaderMessage}</h2>`\n : nothing;\n return html `\n <div class=\"place-holder\">\n ${title} ${this.loader}\n <h3>Loading viewer</h3>\n </div>\n `;\n }\n static get styles() {\n return css `\n .place-holder {\n width: 30%;\n margin: auto;\n text-align: center;\n color: var(--primaryTextColor);\n }\n\n .place-holder {\n position: relative;\n }\n\n .place-holder svg {\n display: block;\n width: 60%;\n max-width: 100px;\n height: auto;\n margin: auto;\n }\n\n svg * {\n fill: var(--primaryTextColor);\n }\n\n svg .ring {\n animation: rotate 1.3s infinite linear;\n transform-origin: 50px 50px;\n transform-box: fill-box;\n display: block; // transform won't work on inline style\n }\n\n @keyframes rotate {\n 0% {\n -moz-transform: rotate(-360deg);\n -webkit-transform: rotate(-360deg);\n transform: rotate(-360deg);\n }\n }\n `;\n }\n};\n__decorate([\n property({ type: String })\n], IAItemNavLoader.prototype, \"loaderMessage\", void 0);\nIAItemNavLoader = __decorate([\n customElement('ia-itemnav-loader')\n], IAItemNavLoader);\nexport { IAItemNavLoader };\n//# sourceMappingURL=loader.js.map","import { __decorate } from \"tslib\";\nimport { LitElement, html, css, } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nlet IANoTheaterAvailable = class IANoTheaterAvailable extends LitElement {\n constructor() {\n super(...arguments);\n this.identifier = '';\n }\n emitLoaded() {\n this.dispatchEvent(new CustomEvent('loadingStateUpdated', {\n detail: { loaded: true },\n }));\n }\n updated(changed) {\n if (changed.has('identifier')) {\n this.emitLoaded();\n }\n }\n get downloadUrl() {\n return `/download/${this.identifier}`;\n }\n render() {\n return html `\n <section>\n <h2>THERE IS NO PREVIEW AVAILABLE FOR THIS ITEM</h2>\n <p>\n This item does not appear to have any files that can be experienced on\n Archive.org. <br />\n Please download files in this item to interact with them on your\n computer.\n </p>\n <a href=${this.downloadUrl}>Show all files</a>\n </section>\n `;\n }\n static get styles() {\n return css `\n :host {\n color: var(--primaryTextColor, #fff);\n text-align: center;\n }\n section {\n width: 100%;\n margin: 5%;\n padding: 0 5%;\n }\n p {\n font-size: 1.4rem;\n }\n a {\n color: var(--primaryTextColor, #fff);\n background-color: rgb(25, 72, 128);\n min-height: 35px;\n outline: none;\n cursor: pointer;\n line-height: normal;\n border-radius: 0.4rem;\n text-align: center;\n vertical-align: middle;\n font-size: 1.4rem;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n display: inline-block;\n padding: 0.85rem 1.2rem;\n border: 1px solid rgb(197, 209, 223);\n white-space: nowrap;\n appearance: auto;\n box-sizing: border-box;\n user-select: none;\n text-decoration: none;\n }\n `;\n }\n};\n__decorate([\n property({ type: String })\n], IANoTheaterAvailable.prototype, \"identifier\", void 0);\nIANoTheaterAvailable = __decorate([\n customElement('ia-no-theater-available')\n], IANoTheaterAvailable);\nexport { IANoTheaterAvailable };\n//# sourceMappingURL=no-theater-available.js.map","import { __decorate } from \"tslib\";\nimport { css, html, LitElement, nothing, } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { MetadataResponse } from '@internetarchive/search-service';\nimport '@internetarchive/icon-ellipses/icon-ellipses';\nimport './menu-slider/ia-menu-slider';\nimport './loader';\nimport './no-theater-available';\nlet ItemNavigator = class ItemNavigator extends LitElement {\n constructor() {\n super(...arguments);\n this.viewAvailable = true;\n this.baseHost = 'archive.org';\n this.signedIn = false;\n this.menuContents = [];\n this.menuShortcuts = [];\n this.viewportInFullscreen = null;\n this.menuOpened = false;\n this.loaded = false;\n this.openMenuState = 'shift';\n }\n disconnectedCallback() {\n this.removeResizeObserver();\n }\n updated(changed) {\n if (changed.has('sharedObserver')) {\n const oldObserver = changed.get('sharedObserver');\n oldObserver === null || oldObserver === void 0 ? void 0 : oldObserver.removeObserver(this.resizeObserverConfig);\n this.setResizeObserver();\n }\n }\n /** Shared observer */\n handleResize(entry) {\n const { width } = entry.contentRect;\n if (width <= 600) {\n this.openMenuState = 'overlay';\n return;\n }\n this.openMenuState = 'shift';\n }\n setResizeObserver() {\n var _a, _b;\n (_a = this.sharedObserver) === null || _a === void 0 ? void 0 : _a.addObserver(this.resizeObserverConfig);\n (_b = this.sharedObserver) === null || _b === void 0 ? void 0 : _b.addObserver({\n target: this.headerSlot,\n handler: {\n handleResize: ({ contentRect }) => {\n if (contentRect.height) {\n this.requestUpdate();\n }\n },\n },\n });\n }\n removeResizeObserver() {\n var _a;\n (_a = this.sharedObserver) === null || _a === void 0 ? void 0 : _a.removeObserver(this.resizeObserverConfig);\n }\n get resizeObserverConfig() {\n return {\n handler: this,\n target: this.frame,\n };\n }\n /** End shared observer */\n get loaderTitle() {\n return this.viewportInFullscreen ? 'Internet Archive' : '';\n }\n get loadingArea() {\n return html `\n <div class=\"loading-area\">\n <div class=\"loading-view\">\n <ia-itemnav-loader\n .loaderMessage=${this.loaderTitle}\n ></ia-itemnav-loader>\n </div>\n </div>\n `;\n }\n slotChange(e, type) {\n var _a;\n const slottedContent = (_a = e.target.assignedNodes()) === null || _a === void 0 ? void 0 : _a[0];\n this.dispatchEvent(new CustomEvent('slotChange', {\n detail: { slot: slottedContent, type },\n }));\n this.requestUpdate();\n }\n render() {\n var _a, _b;\n const displayReaderClass = this.loaded ? '' : 'hidden';\n const headerHeight = ((_b = (_a = this.headerSlot) === null || _a === void 0 ? void 0 : _a.assignedNodes()[0]) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;\n return html `\n <div id=\"frame\" class=${this.menuClass}>\n <slot\n name=\"header\"\n style=${`height: ${headerHeight}px`}\n @slotchange=${(e) => this.slotChange(e, 'header')}\n ></slot>\n <div class=\"menu-and-reader\">\n ${this.shouldRenderMenu ? this.renderSideMenu : nothing}\n <div id=\"reader\" class=${displayReaderClass}>\n ${this.renderViewport}\n </div>\n ${!this.loaded ? this.loadingArea : nothing}\n </div>\n </div>\n `;\n }\n get noTheaterView() {\n var _a, _b;\n return html `<ia-no-theater-available\n .identifier=${(_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.identifier}\n @loadingStateUpdated=${this.loadingStateUpdated}\n ></ia-no-theater-available>`;\n }\n get renderViewport() {\n if (!this.viewAvailable) {\n return this.noTheaterView;\n }\n const slotVisibility = !this.loaded ? 'opacity: 0;' : 'opacity: 1;';\n return html `\n <div slot=\"main\" style=${slotVisibility}>\n <slot\n name=\"main\"\n @slotchange=${(e) => this.slotChange(e, 'main')}\n ></slot>\n </div>\n `;\n }\n loadingStateUpdated(e) {\n const { loaded } = e.detail;\n this.loaded = loaded !== null && loaded !== void 0 ? loaded : false;\n }\n /** Fullscreen Management */\n manageViewportFullscreen(e) {\n const fullscreenStatus = !!e.detail.isFullScreen;\n this.viewportInFullscreen = !fullscreenStatus ? null : fullscreenStatus;\n const event = new CustomEvent('fullscreenToggled', {\n detail: e.detail,\n });\n this.dispatchEvent(event);\n }\n /** End Fullscreen Management */\n /** Side menu */\n get shouldRenderMenu() {\n var _a;\n return !!((_a = this.menuContents) === null || _a === void 0 ? void 0 : _a.length);\n }\n toggleMenu() {\n this.menuOpened = !this.menuOpened;\n }\n closeMenu() {\n this.menuOpened = false;\n }\n setOpenMenu(e) {\n const { id } = e.detail;\n this.openMenu = id !== this.openMenu ? id : undefined;\n }\n setMenuContents(e) {\n const updatedContents = [...e.detail];\n this.menuContents = updatedContents;\n }\n setMenuShortcuts(e) {\n this.menuShortcuts = [...e.detail];\n }\n /** Toggles Side Menu & Sets viewable subpanel */\n manageSideMenuEvents(e) {\n const { menuId, action } = e.detail;\n if (!menuId) {\n return;\n }\n if (action === 'open') {\n this.openShortcut(menuId);\n }\n else if (action === 'toggle') {\n this.openMenu = menuId;\n this.toggleMenu();\n }\n }\n get menuToggleButton() {\n return html `\n <button\n class=\"toggle-menu\"\n @click=${this.toggleMenu}\n title=\"Toggle theater side panels\"\n >\n <div>\n <ia-icon-ellipses\n style=\"width: var(--iconWidth); height: var(--iconHeight);\"\n ></ia-icon-ellipses>\n </div>\n </button>\n `;\n }\n get selectedMenuId() {\n return this.openMenu || '';\n }\n get renderSideMenu() {\n const drawerState = this.menuOpened ? '' : 'hidden';\n return html `\n <nav>\n <div class=\"minimized\">${this.shortcuts} ${this.menuToggleButton}</div>\n <div id=\"menu\" class=${drawerState}>\n <ia-menu-slider\n .menus=${this.menuContents}\n .selectedMenu=${this.selectedMenuId}\n @menuTypeSelected=${this.setOpenMenu}\n @menuSliderClosed=${this.closeMenu}\n manuallyHandleClose\n open\n ></ia-menu-slider>\n </div>\n </nav>\n `;\n }\n /** End Side menu */\n /** Menu Shortcuts */\n openShortcut(selectedMenuId = '') {\n this.openMenu = selectedMenuId;\n this.menuOpened = true;\n }\n get shortcuts() {\n const shortcuts = this.menuShortcuts.map(({ icon, id }) => {\n if (id === 'fullscreen') {\n return html `${icon}`;\n }\n return html `\n <button class=\"shortcut ${id}\" @click=\"${() => this.openShortcut(id)}\">\n ${icon}\n </button>\n `;\n });\n return html `<div class=\"shortcuts\">${shortcuts}</div>`;\n }\n /** End Menu Shortcuts */\n /** Misc Render */\n get menuClass() {\n var _a, _b;\n const hasMenuOrShortcuts = ((_a = this.menuContents) === null || _a === void 0 ? void 0 : _a.length) || ((_b = this.menuShortcuts) === null || _b === void 0 ? void 0 : _b.length);\n const drawerState = this.menuOpened && hasMenuOrShortcuts ? 'open' : '';\n const fullscreenState = this.viewportInFullscreen ? 'fullscreen' : '';\n return `${drawerState} ${fullscreenState} ${this.openMenuState}`;\n }\n static get styles() {\n const subnavWidth = css `var(--menuWidth, 320px)`;\n const transitionTiming = css `var(--animationTiming, 200ms)`;\n const transitionEffect = css `transform ${transitionTiming} ease-out`;\n const menuMargin = css `var(--theaterMenuMargin, 42px)`;\n const theaterBg = css `var(--theaterBgColor, #000)`;\n return css `\n :host,\n #frame,\n .menu-and-reader {\n position: relative;\n overflow: hidden;\n display: block;\n }\n\n :host,\n #frame,\n .loading-area,\n .loading-view {\n min-height: inherit;\n height: inherit;\n }\n\n slot {\n display: block;\n width: 100%;\n }\n\n slot * {\n display: block;\n height: inherit;\n }\n\n #frame {\n background-color: ${theaterBg};\n color-scheme: dark;\n display: flex;\n flex-direction: column;\n }\n\n #frame.fullscreen {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 9;\n }\n\n .loading-view {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .loading-area {\n width: 100%;\n }\n\n ia-itemnav-loader {\n display: block;\n width: 100%;\n }\n\n .hidden {\n display: none !important;\n }\n\n button {\n cursor: pointer;\n padding: 0;\n border: 0;\n }\n\n button:focus,\n button:active {\n outline: none;\n }\n\n .menu-and-reader {\n position: relative;\n display: flex;\n flex: 1;\n }\n\n nav button {\n background: none;\n }\n\n nav .minimized {\n background: rgba(0, 0, 0, 0.7);\n padding-top: 6px;\n position: absolute;\n width: ${menuMargin};\n z-index: 2;\n left: 0;\n border-bottom-right-radius: 5%;\n }\n\n nav .minimized button {\n width: var(--iconWidth);\n height: var(--iconHeight);\n margin-bottom: 0.2rem;\n margin: auto;\n display: inline-flex;\n vertical-align: middle;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n width: ${menuMargin};\n height: ${menuMargin};\n }\n\n nav .minimized button.toggle-menu > * {\n border: 2px solid var(--iconStrokeColor);\n border-radius: var(--iconWidth);\n width: var(--iconWidth);\n height: var(--iconHeight);\n margin: auto;\n }\n\n ia-icon-ellipses {\n width: var(--iconWidth);\n height: var(--iconHeight);\n }\n\n #menu {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n overflow: hidden;\n transform: translateX(-${subnavWidth});\n width: ${subnavWidth};\n transform: translateX(calc(${subnavWidth} * -1));\n transition: ${transitionEffect};\n }\n\n #reader {\n position: relative;\n z-index: 1;\n transform: translateX(0);\n width: 100%;\n display: flex;\n }\n\n #reader > * {\n width: 100%;\n display: flex;\n flex: 1;\n }\n\n .open.overlay #reader {\n transition: none;\n }\n\n .open #menu {\n width: ${subnavWidth};\n transform: translateX(0);\n transition: ${transitionEffect};\n }\n\n .open.shift #reader {\n width: calc(100% - ${subnavWidth});\n margin-left: ${subnavWidth};\n transition: ${transitionEffect};\n }\n `;\n }\n};\n__decorate([\n property({\n type: Object,\n converter: (value) => {\n if (value && typeof value === 'string') {\n return new MetadataResponse(JSON.parse(atob(value)));\n }\n return value;\n },\n })\n], ItemNavigator.prototype, \"item\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ItemNavigator.prototype, \"viewAvailable\", void 0);\n__decorate([\n property({ type: String })\n], ItemNavigator.prototype, \"baseHost\", void 0);\n__decorate([\n property({ type: Boolean })\n], ItemNavigator.prototype, \"signedIn\", void 0);\n__decorate([\n property({ type: Array })\n], ItemNavigator.prototype, \"menuContents\", void 0);\n__decorate([\n property({ type: Array })\n], ItemNavigator.prototype, \"menuShortcuts\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true, attribute: true })\n], ItemNavigator.prototype, \"viewportInFullscreen\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ItemNavigator.prototype, \"menuOpened\", void 0);\n__decorate([\n property({ type: String, reflect: true })\n], ItemNavigator.prototype, \"openMenu\", void 0);\n__decorate([\n property({ attribute: false })\n], ItemNavigator.prototype, \"modal\", void 0);\n__decorate([\n property({ attribute: false })\n], ItemNavigator.prototype, \"sharedObserver\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true, attribute: true })\n], ItemNavigator.prototype, \"loaded\", void 0);\n__decorate([\n state()\n], ItemNavigator.prototype, \"openMenuState\", void 0);\n__decorate([\n query('#frame')\n], ItemNavigator.prototype, \"frame\", void 0);\n__decorate([\n query('slot[name=\"header\"]')\n], ItemNavigator.prototype, \"headerSlot\", void 0);\n__decorate([\n query('slot[name=\"main\"]')\n], ItemNavigator.prototype, \"mainSlot\", void 0);\nItemNavigator = __decorate([\n customElement('iaux-item-navigator')\n], ItemNavigator);\nexport { ItemNavigator };\n//# sourceMappingURL=iaux-item-navigator.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of class names to truthy values.\n */\nexport interface ClassInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nclass ClassMapDirective extends Directive {\n /**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\n private _previousClasses?: Set<string>;\n private _staticClasses?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'class' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n '`classMap()` can only be used in the `class` attribute ' +\n 'and must be the only part in the attribute.'\n );\n }\n }\n\n render(classInfo: ClassInfo) {\n // Add spaces to ensure separation from static classes\n return (\n ' ' +\n Object.keys(classInfo)\n .filter((key) => classInfo[key])\n .join(' ') +\n ' '\n );\n }\n\n override update(part: AttributePart, [classInfo]: DirectiveParameters<this>) {\n // Remember dynamic classes on the first render\n if (this._previousClasses === undefined) {\n this._previousClasses = new Set();\n if (part.strings !== undefined) {\n this._staticClasses = new Set(\n part.strings\n .join(' ')\n .split(/\\s/)\n .filter((s) => s !== '')\n );\n }\n for (const name in classInfo) {\n if (classInfo[name] && !this._staticClasses?.has(name)) {\n this._previousClasses.add(name);\n }\n }\n return this.render(classInfo);\n }\n\n const classList = part.element.classList;\n\n // Remove old classes that no longer apply\n // We use forEach() instead of for-of so that we don't require down-level\n // iteration.\n this._previousClasses.forEach((name) => {\n if (!(name in classInfo)) {\n classList.remove(name);\n this._previousClasses!.delete(name);\n }\n });\n\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n const value = !!classInfo[name];\n if (\n value !== this._previousClasses.has(name) &&\n !this._staticClasses?.has(name)\n ) {\n if (value) {\n classList.add(name);\n this._previousClasses.add(name);\n } else {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsey, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {ClassMapDirective};\n","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"linkTitleID linkDescID\">\n <title id=\"linkTitleID\">Link icon</title>\n <desc id=\"linkDescID\">Two chain links linked together</desc>\n <path d=\"m7.80511706 12.3659763c1.2669254-2.2579539 4.09819784-2.9949938 6.41200864-1.7733458l.2295791.12871 1.6067188.9559859 3.5467013-6.31849361c1.2682451-2.26030597 4.104098-2.99652769 6.4192376-1.76952182l.2223501.12488594 3.2168204 1.91103915c2.2770002 1.3527136 3.1866331 4.21502324 2.0564431 6.51290984l-.1198433.2278304-5.2002499 9.2680474c-1.2669254 2.2579539-4.0981978 2.9949938-6.4120086 1.7733458l-.2295791-.12871-1.6096554-.9558482-3.5437647 6.3183559c-1.2682451 2.260306-4.104098 2.9965277-6.41923761 1.7695218l-.22235013-.1248859-3.21682032-1.9110392c-2.27700024-1.3527136-3.18663314-4.2150232-2.05644312-6.5129098l.11984332-.2278304zm13.93955474-5.73311741-3.563271 6.35055051c1.889633 1.4530595 2.5776248 4.0429866 1.5410255 6.156875l-.1223014.2328355-.4183304.7430134 1.6096554.9558483c1.1431442.6791157 2.5155496.3977368 3.1667361-.5628389l.0921501-.1491451 5.2002498-9.2680474c.5752467-1.0252226.2110342-2.4011579-.8559335-3.14755806l-.1742742-.11247814-3.2168203-1.91103915c-1.1402863-.67741793-2.5086889-.39913772-3.1618387.55564729zm-11.79500786 7.00714351-5.20024982 9.2680474c-.57524673 1.0252226-.21103426 2.4011579.85593348 3.1475581l.17427416.1124781 3.21682032 1.9110392c1.14028632.6774179 2.50868892.3991377 3.16183872-.5556473l.0970474-.1563368 3.5622708-6.3513198c-1.8888875-1.4532134-2.5764504-4.042623-1.5400057-6.1561456l.1222818-.2327956.4153938-.7428758-1.6067188-.9559859c-1.1431442-.6791157-2.5155496-.3977368-3.1667361.5628389zm6.97653866 1.5796652-.3817806.6812386c-.5117123.9119895-.2800268 2.1014993.528439 2.8785267l.382717-.6803391c.5119098-.9123415.2798478-2.1024176-.5293754-2.8794262z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconLink extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-link', IAIconLink);\n\nexport default IAIconLink;\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"shareTitleID shareDescID\"\n>\n <title id=\"shareTitleID\">Share icon</title>\n <desc id=\"shareDescID\">A square with an arrow arcing out from the center of the square</desc>\n <g class=\"fill-color\">\n <path d=\"M70.6784759,10 L70.6784759,21.3240186 C64.5020053,21.66334 58.9104278,22.5826126 53.9037433,24.0818363 C48.8970588,25.5810601 44.8495989,27.4085163 41.7613636,29.5642049 C38.6731283,31.7198935 35.9982175,34.0552229 33.736631,36.5701929 C31.4750446,39.085163 29.8217469,41.5657574 28.776738,44.011976 C27.7317291,46.4581947 26.9173351,48.6848525 26.3335561,50.6919494 C25.7497772,52.6990464 25.4088681,54.3324462 25.3108289,55.592149 L25.2372995,57.4085163 C29.0296346,54.1661122 33.1751337,51.5524507 37.6737968,49.5675316 C42.1724599,47.5826126 46.2934492,46.3118208 50.0367647,45.7551564 C53.7800802,45.1984919 57.2571301,44.8713684 60.4679144,44.7737858 C63.6786988,44.6762031 66.1831551,44.7726769 67.9812834,45.0632069 L70.6784759,45.499002 L70.6784759,57.4051896 L100,33.3765802 L70.6784759,10 Z M76.4438503,62.4883566 L82.8609626,57.1157685 C82.9099822,57.0669772 82.9946524,57.0303837 83.1149733,57.005988 C83.2352941,56.9815924 83.4536542,56.9571967 83.7700535,56.9328011 C84.0864528,56.9084054 84.3905971,56.9449989 84.6824866,57.0425815 C84.9743761,57.1401641 85.217246,57.2854291 85.4110963,57.4783766 C85.6049465,57.671324 85.7263815,57.8409847 85.7754011,57.9873586 L85.8489305,58.2035928 L85.8489305,90 L0,90 L0,17.910845 L43.1784759,17.910845 C43.2765152,17.9596363 43.410205,18.0317143 43.5795455,18.1270792 C43.7488859,18.222444 43.9438503,18.4519849 44.1644385,18.8157019 C44.3850267,19.1794189 44.469697,19.5542249 44.4184492,19.9401198 C44.4184492,20.2794411 44.3092692,20.582169 44.0909091,20.8483034 C43.872549,21.1144378 43.6664439,21.3206919 43.4725936,21.4670659 L43.1818182,21.6134398 C40.557041,23.06609 38.2954545,24.396762 36.3970588,25.6054558 L30.7820856,29.8170326 L11.5274064,29.8170326 L11.5274064,78.1669993 L74.1811497,78.1669993 L74.1811497,65.5355955 C74.1811497,65.1009093 74.3995098,64.6407186 74.8362299,64.1550233 L76.4438503,62.4883566 Z\" id=\"Shape\"></path>\n </g>\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconShare extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-share', IAIconShare);\n\nexport default IAIconShare;\n","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"emailTitleID emailDescID\">\n <title id=\"emailTitleID\">Email icon</title>\n <desc id=\"emailDescID\">An illustration of an envelope</desc>\n <path d=\"m32 7.04156803v19.91686397c0 .5752421-.4763773 1.041568-1.0640184 1.041568h-27.87196316c-.58764116 0-1.06401844-.4663259-1.06401844-1.041568v-19.91686397c0-.57524214.47637728-1.04156803 1.06401844-1.04156803h27.87196316c.5876411 0 1.0640184.46632589 1.0640184 1.04156803zm-26.25039901 1.19676167 10.04327011 10.1323738c.5135662.4194048.8817166.6291071 1.1044511.6291071.1198794 0 .2695514-.0503424.4490158-.1510273.1794644-.100685.3291364-.2013699.4490158-.3020548l.1798191-.1510273 10.1198794-10.15841306zm16.77212271 9.7303286 6.8831353 6.7889404v-13.5778809zm-17.92871075-6.6379131v13.350819l6.78098955-6.6629107zm22.09008685 14.2059464-5.9074304-5.8588202-.9757049.9551179-.3594018.3295984c-.0342324.0304241-.0665646.0587822-.0969964.0850743l-.1597867.1329606c-.0684912.0540844-.1198794.0895749-.1541644.1064714-.6674943.3687151-1.3523675.5530727-2.0546196.5530727-.65047 0-1.3782586-.218035-2.1833659-.6541048l-.6682036-.4520405-1.0278418-1.0311524-5.95850326 5.832781z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconEmail extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-email', IAIconEmail);\n\nexport default IAIconEmail;\n","export default class Provider {\n constructor(params) {\n this.promoCopy =\n ' : Free Download, Borrow, and Streaming : Internet Archive';\n this.description = (params === null || params === void 0 ? void 0 : params.description) || '';\n this.creator = (params === null || params === void 0 ? void 0 : params.creator) || '';\n this.fileSubPrefix = (params === null || params === void 0 ? void 0 : params.fileSubPrefix) || '';\n this.identifier = (params === null || params === void 0 ? void 0 : params.identifier) || '';\n this.baseHost = (params === null || params === void 0 ? void 0 : params.baseHost) || '';\n }\n get encodedDescription() {\n return this.encodeString(this.description);\n }\n get encodedCreator() {\n return this.encodeString(this.creator);\n }\n get encodedPromoCopy() {\n return this.encodeString(this.promoCopy);\n }\n get itemPath() {\n const encodedFileSubPrefix = this.fileSubPrefix\n ? encodeURIComponent(this.fileSubPrefix)\n : '';\n return encodedFileSubPrefix\n ? `${this.identifier}/${encodedFileSubPrefix}`\n : this.identifier;\n }\n get url() {\n return `https://${this.baseHost}/details/${this.itemPath}`;\n }\n encodeString(str) {\n if (!str)\n return '';\n return encodeURIComponent(str.replace(/\\s/g, '+')).replace(/%2B/g, '+');\n }\n}\n//# sourceMappingURL=provider.js.map","import '@internetarchive/icon-email/icon-email';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Email';\n this.icon = html `<ia-icon-email></ia-icon-email>`;\n this.class = 'email';\n }\n get url() {\n return `mailto:?body=https://${this.baseHost}/details/${this.itemPath}&subject=${this.description} : ${this.creator}${this.promoCopy}`;\n }\n}\n//# sourceMappingURL=email.js.map","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"facebookTitleID facebookDescID\">\n <title id=\"facebookTitleID\">Facebook icon</title>\n <desc id=\"facebookDescID\">A lowercase f</desc>\n <path d=\"m30.91057 19.2442068.2670004-5.3339402h-5.7329237c-.0890001-3.4962895.25183-5.42243459 1.0224903-5.77843514.3560005-.17800028.8004955-.28925046 1.333485-.33375053s1.0442346-.0520853 1.5337353-.02275571c.4895008.02932959 1.045246.01466479 1.6672356-.04399439.0890001-1.59997977.1335002-3.24445961.1335002-4.93343953-2.1633102-.20732987-3.6742898-.28115953-4.5329389-.22148898-2.8146294.17800028-4.7847688 1.25965538-5.9104183 3.2449653-.1780003.3256596-.3261653.68873971-.444495 1.08924034-.1183298.40050062-.2144095.76358074-.2882391 1.08924034-.0738297.32565959-.125915.7848194-.1562559 1.37747942-.030341.59266002-.052591 1.04474028-.0667501 1.35624078-.0141592.3115005-.0217444.8449956-.0227558 1.6004854v1.5777298h-3.8229605v5.3339401h3.8669549v14.622824h5.8224296c0-.3560006-.0146648-1.6819003-.0439944-3.9776994-.0293296-2.295799-.0515796-4.2957737-.0667501-5.9999241s-.0075853-3.2525506.0227557-4.6452005h5.4219289z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconFacebook extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-facebook', IAIconFacebook);\n\nexport default IAIconFacebook;\n","import '@internetarchive/icon-facebook/icon-facebook';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Facebook';\n this.icon = html `<ia-icon-facebook></ia-icon-facebook>`;\n this.class = 'facebook';\n }\n get url() {\n return `https://www.facebook.com/sharer/sharer.php?u=https://${this.baseHost}/details/${this.itemPath}`;\n }\n}\n//# sourceMappingURL=facebook.js.map","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"pinterestTitleID pinterestDescID\">\n <title id=\"pinterestTitleID\">Pinterest icon</title>\n <desc id=\"pinterestDescID\">A stylized letter p</desc>\n <path d=\"m11.9051049 30.5873434.653491-1.0742755.4207845-.839975c.2805229-.591861.5371377-1.2533214.7698443-1.9843813.2327065-.7310599.4659444-1.6029125.6997135-2.6155579.2337692-1.0126455.4128151-1.752206.5371377-2.2186817.0308151.030815.0775689.0855382.1402615.1641697.0626927.0786314.1094465.1333547.1402615.1641697.1243227.1870153.2178304.311338.280523.372968 1.1210293.964829 2.3817888 1.4631823 3.7822785 1.4950599 1.4939973 0 2.8790795-.3426843 4.1552465-1.0280529 2.1166733-1.1826593 3.6733633-3.1128487 4.6700699-5.7905679.4048457-1.1518444.6848374-2.5996192.8399751-4.3433245.1243226-1.587505-.0781002-3.0974411-.6072685-4.5298084-.903199-2.36638128-2.5528653-4.20306294-4.948999-5.51004497-1.276167-.65349101-2.5990879-1.05833667-3.9687625-1.21453696-1.525875-.21783034-3.1293188-.17107651-4.8103315.14026149-2.7701643.52916833-5.02709913 1.743174-6.77080442 3.64201699-1.99235065 2.14748836-2.98852598 4.62225355-2.98852598 7.42429545 0 2.9571797.9494215 5.0584455 2.84826449 6.3037975l.83997504.4207845c.12432268 0 .22526845.0154075.3028373.0462225s.1551377.0074381.23270656-.0701308c.07756885-.0775688.13229208-.1243226.16416969-.1402614s.07066204-.0860696.11635328-.2103923c.04569124-.1243226.07703756-.2098609.09403895-.2566147.01700139-.0467539.04834771-.1476996.09403895-.3028373s.06906816-.2486454.07013074-.280523l.14026149-.5132295c.06269263-.311338.09403895-.5291684.09403895-.653491-.03081502-.1243227-.12432268-.2799917-.28052297-.467007-.15620029-.1870154-.23376915-.2959305-.23270656-.3267455-.62267599-.8096914-.9494215-1.7904592-.98023652-2.9423035-.03081502-1.55669.28052297-2.9731185.93401399-4.24928547 1.18265932-2.45882635 3.17501002-3.93741618 5.97705192-4.43576949 1.6183201-.311338 3.1356943-.25661476 4.5521228.16416969 1.4164285.42078446 2.5135496 1.09765239 3.2913633 2.03060379.8405063 1.02752164 1.3229208 2.28828114 1.4472435 3.78227848.1243227 1.4004897-.0313463 2.9725872-.467007 4.7162925-.3740306 1.3696746-.9186065 2.5528653-1.6337275 3.5495719-.9967066 1.245352-2.0863896 1.8834355-3.269049 1.9142505-1.7118277.0626926-2.7547568-.6375522-3.1287874-2.1007345-.0935077-.4664757 0-1.2134744.2805229-2.240996.7469987-2.5842117 1.1359055-3.9384788 1.1667206-4.0628015.1870153-1.0275216.2024228-1.7904591.0462225-2.2888124-.1870153-.65349104-.5759222-1.15928246-1.1667205-1.51737429-.5907984-.35809182-1.2756357-.39687625-2.054512-.11635327-1.1826594.43566067-1.9610044 1.40048968-2.335035 2.89448706-.311338 1.306982-.2491767 2.6299028.186484 3.9687625 0 .0626926.0313463.1402615.094039.2327065.0626926.0924451.0940389.1700139.0940389.2327066 0 .0935076-.0313463.2491766-.0940389.467007-.0626927.2178303-.094039.3580918-.094039.4207844-.0935076.4356607-.3038999 1.3308903-.6311767 2.6856887-.3272768 1.3547985-.5838915 2.3897582-.7698443 3.1048793-.7778136 3.2068876-1.12049796 5.5881451-1.02805289 7.1437725l.37296809 2.7558194c.653491-.591861 1.2294131-1.2299445 1.7277664-1.9142505z\" class=\"fill-color\" />\n</svg>\n`;\n","import { css, LitElement } from 'lit';\nimport icon from './index.js';\n\nclass IAIconPinterest extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-pinterest', IAIconPinterest);\n\nexport default IAIconPinterest;\n","import '@internetarchive/icon-pinterest/icon-pinterest';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Pinterest';\n this.icon = html `<ia-icon-pinterest></ia-icon-pinterest>`;\n this.class = 'pinterest';\n }\n get url() {\n return `http://www.pinterest.com/pin/create/button/?url=https://${this.baseHost}/details/${this.itemPath}&description=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`;\n }\n}\n//# sourceMappingURL=pinterest.js.map","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"tumblrTitleID tumblrDescID\">\n <title id=\"tumblrTitleID\">Tumblr icon</title>\n <desc id=\"tumblrDescID\">A lowercase letter t</desc>\n <path d=\"m8.50321407 8.54544475v5.32088575c.15641786.0310693.6819176.0310693 1.57649923 0 .8945816-.0310693 1.3574071.0160703 1.3884764.1414189.0942792 1.5695354.1333837 3.2253149.1173133 4.9673385-.0160703 1.7420236-.0316049 3.3426283-.0466039 4.8018141s.2046288 2.824628.6588835 4.0963267c.4542546 1.2716986 1.1999178 2.2209194 2.2369897 2.8476622 1.2556283.784232 2.9896167 1.207953 5.2019653 1.271163 2.2123485.0632099 4.1659648-.2506972 5.8608487-.9417213-.0310693-.3449764-.0230341-1.4045467.0241055-3.1787109.0471397-1.7741643-.0080351-2.75499-.1655244-2.9424772-3.5472571 1.0360005-5.697467.6904885-6.4506298-1.0365361-.7220934-1.6638147-.8635123-4.9909084-.4242566-9.981281v-.046604h6.7318605v-5.32088568h-6.7318605v-6.54383772h-4.0497228c-.2828378 1.28669763-.6122795 2.35376743-.9883252 3.20120941-.3760457.84744199-.98029 1.60060471-1.812733 2.25948817-.832443.65888347-1.87594303 1.01993018-3.1305 1.08314014z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconTumblr extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-tumblr', IAIconTumblr);\n\nexport default IAIconTumblr;\n","import '@internetarchive/icon-tumblr/icon-tumblr';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Tumblr';\n this.icon = html `<ia-icon-tumblr></ia-icon-tumblr>`;\n this.class = 'tumblr';\n }\n get url() {\n return `https://www.tumblr.com/share/video?embed=%3Ciframe+width%3D%22640%22+height%3D%22480%22+frameborder%3D%220%22+allowfullscreen+src%3D%22https%3A%2F%2F${this.baseHost}%2Fembed%2F%22+webkitallowfullscreen%3D%22true%22+mozallowfullscreen%3D%22true%22%26gt%3B%26lt%3B%2Fiframe%3E&name=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`;\n }\n}\n//# sourceMappingURL=tumblr.js.map","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"twitterTitleID twitterDescID\">\n <title id=\"twitterTitleID\">Twitter icon</title>\n <desc id=\"twitterDescID\">The Twitter logo, a cartoon bird</desc>\n <path d=\"m31.5297453 8.76273313c-.3135031.40766104-.7447036.83083673-1.2936015 1.26952707-.5488979.4386904-.9169698.7837578-1.1042157 1.0352022.1562166 2.319709-.1417719 4.5297454-.8939653 6.6301092-.7521935 2.1003638-1.8023754 3.9182538-3.1505457 5.45367-1.3481704 1.5354162-2.9627648 2.8284828-4.8437835 3.8791996-1.8810186 1.0507169-3.8321207 1.7483416-5.8533062 2.092874s-4.1215493.2894286-6.30109136-.1653114c-2.17954205-.45474-4.2092874-1.3401455-6.08923604-2.6562165 2.72737.4697196 5.67408517-.2514445 8.8401455-2.1634924-3.0719024-.7521935-4.88979241-2.2881447-5.45367-4.6078537 1.12882516.0631287 1.86550396.0631287 2.21003638 0-2.91568586-1.2850417-4.38904344-3.3693558-4.42007276-6.2529424.21934517.0310293.53284828.1487267.94050931.3530922s.78375775.3060133 1.12829017.3049433c-.81532206-.7211641-1.41076396-1.9045581-1.7863257-3.5501819-.37556173-1.64562376-.17173122-3.17355015.61149155-4.58377912 1.81789001 1.88101862 3.6908838 3.36989086 5.61898138 4.46661672 1.92809757 1.0967259 4.22426707 1.7547614 6.88850847 1.9741066-.2503745-1.1908838-.1722662-2.32719882.2343248-3.40894502.4065911-1.0817462 1.0416221-1.93612241 1.9050931-2.56312861.863471-.62700621 1.8114702-1.0817462 2.8439975-1.36421999 1.0325272-.28247378 2.0827091-.27444896 3.1505456.02407447s1.9767815.87042585 2.726835 1.71570726c1.3791997-.37663172 2.6802911-.87845068 3.9032742-1.50545688-.0310293.37663171-.1407019.74470361-.3290178 1.1042157-.1883158.35951209-.3530922.62593623-.4943291.79927242s-.3841216.4317355-.728654.77519795c-.3445324.34346244-.5638776.57832227-.6580355.70457949.2193452-.09415792.6895998-.23539482 1.410764-.42371067.7211641-.18831586 1.2069334-.39214638 1.4573079-.61149155 0 .44350524-.1567516.86668093-.4702547 1.27434196z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconTwitter extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-twitter', IAIconTwitter);\n\nexport default IAIconTwitter;\n","import '@internetarchive/icon-twitter/icon-twitter';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class TwitterProvider extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Twitter';\n this.icon = html `<ia-icon-twitter></ia-icon-twitter>`;\n this.class = 'twitter';\n }\n get url() {\n return `https://twitter.com/intent/tweet?url=https://${this.baseHost}/details/${this.itemPath}&via=internetarchive&text=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`;\n }\n}\n//# sourceMappingURL=twitter.js.map","import { __decorate } from \"tslib\";\n/* eslint-disable lit-a11y/click-events-have-key-events */\n/* eslint-disable lit-a11y/list */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { css, html, LitElement, nothing, } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport '@internetarchive/icon-link/icon-link';\nimport '@internetarchive/icon-share/icon-share';\nimport EmailProvider from './share-providers/email';\nimport FacebookProvider from './share-providers/facebook';\nimport PinterestProvider from './share-providers/pinterest';\nimport TumblrProvider from './share-providers/tumblr';\nimport TwitterProvider from './share-providers/twitter';\nconst copyToClipboard = (options) => {\n const currentTarget = options.currentTarget;\n const textarea = currentTarget.querySelector('textarea');\n const note = currentTarget.querySelector('small');\n textarea.select();\n document.execCommand('copy');\n textarea.blur();\n note.classList.add('visible');\n clearTimeout(note.timeout);\n note.timeout = setTimeout(() => note.classList.remove('visible'), 4000);\n};\nexport const iauxShareIcon = html `<ia-icon-share\n style=\"width: var(--iconWidth); height: var(--iconHeight);\"\n></ia-icon-share>`;\nlet IauxSharingOptions = class IauxSharingOptions extends LitElement {\n constructor() {\n super(...arguments);\n this.baseHost = 'archive.org';\n this.creator = '';\n this.description = '';\n this.embedOptionsVisible = false;\n this.identifier = '';\n this.sharingOptions = [];\n this.type = '';\n this.renderHeader = false;\n this.fileSubPrefix = '';\n }\n updated(changed) {\n if (changed.has('sharingOptions') && !this.sharingOptions.length) {\n this.loadProviders();\n }\n }\n loadProviders() {\n const { baseHost, creator, description, identifier, type, fileSubPrefix } = this;\n const params = {\n baseHost,\n creator,\n description,\n identifier,\n type,\n fileSubPrefix,\n };\n this.sharingOptions = [\n new TwitterProvider(params),\n new FacebookProvider(params),\n new TumblrProvider(params),\n new PinterestProvider(params),\n new EmailProvider(params),\n ];\n }\n get sharingItems() {\n return this.sharingOptions.map(option => html `<li>\n <a\n class=\"${ifDefined(option.class)}\"\n href=\"${option.url}\"\n target=\"_blank\"\n >\n ${option.icon} ${option.name}\n </a>\n </li>`);\n }\n get embedOption() {\n return html `<li>\n <a href=\"#\" @click=${this.toggleEmbedOptions}>\n <ia-icon-link></ia-icon-link>\n Get an embeddable link\n </a>\n </li>`;\n }\n get iframeEmbed() {\n return html `<iframe\n src=\"https://${this.baseHost}/embed/${this.identifier}\" width=\"560\"\n height=\"384\" frameborder=\"0\" webkitallowfullscreen=\"true\"\n mozallowfullscreen=\"true\" allowfullscreen></iframe>`;\n }\n get bbcodeEmbed() {\n return `[archiveorg ${this.identifier} width=560 height=384 frameborder=0 webkitallowfullscreen=true mozallowfullscreen=true]`;\n }\n get helpURL() {\n return `https://${this.baseHost}/help/audio.php?identifier=${this.identifier}`;\n }\n toggleEmbedOptions(e) {\n e.preventDefault();\n this.embedOptionsVisible = !this.embedOptionsVisible;\n }\n get header() {\n const header = html `<header><h3>Share this ${this.type}</h3></header>`;\n return this.renderHeader ? header : nothing;\n }\n render() {\n return html `\n ${this.header}\n <ul>\n ${this.sharingItems} ${this.embedOption}\n <div\n class=${classMap({ visible: this.embedOptionsVisible, embed: true })}\n >\n <h4>Embed</h4>\n <div class=\"code\" @click=${copyToClipboard}>\n <textarea readonly>${this.iframeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <h4>\n Embed for wordpress.com hosted blogs and archive.org item\n <description> tags\n </h4>\n <div class=\"code\" @click=${copyToClipboard}>\n <textarea readonly>${this.bbcodeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <p>\n Want more?\n <a href=${this.helpURL}\n >Advanced embedding details, examples, and help</a\n >!\n </p>\n </div>\n </ul>\n `;\n }\n get providerIcon() {\n return html `<ia-icon-share\n style=\"width: var(--iconWidth); height: var(--iconHeight);\"\n ></ia-icon-share>`;\n }\n static get styles() {\n return css `\n :host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n header {\n display: flex;\n align-items: baseline;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.6rem;\n }\n\n h4 {\n font-size: 1.4rem;\n }\n\n ul {\n padding: 0 0 2rem 0;\n list-style: none;\n }\n\n li {\n padding: 0 0 1rem 0;\n }\n\n li a {\n font-size: 1.6rem;\n text-decoration: none;\n color: var(--shareLinkColor);\n }\n\n li a * {\n display: inline-block;\n padding: 0.2rem;\n margin-right: 1rem;\n vertical-align: middle;\n border: 1px solid var(--shareIconBorder);\n border-radius: 7px;\n background: var(--shareIconBg);\n }\n\n .embed {\n display: none;\n }\n .embed.visible {\n display: block;\n width: 95%;\n }\n\n .embed a {\n color: var(--shareLinkColor);\n }\n\n .code {\n position: relative;\n }\n\n textarea {\n display: block;\n width: 100%;\n height: 120px;\n padding: 0.8rem 1rem;\n box-sizing: border-box;\n resize: none;\n cursor: pointer;\n font:\n normal 1.4rem 'Helvetica Neue',\n Helvetica,\n Arial,\n sans-serif;\n color: var(--textareaColor, #fff);\n background: var(--textareaBg, #151515);\n }\n\n small {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3rem;\n padding: 0.5rem 1rem;\n box-sizing: border-box;\n font:\n normal 1.2rem/2rem 'Helvetica Neue',\n Helvetica,\n Arial,\n sans-serif;\n color: var(--textareaBg, #151515);\n background: var(--textareaColor, #fff);\n opacity: 0;\n transition: opacity 300ms linear;\n }\n small.visible {\n opacity: 1;\n }\n `;\n }\n};\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"baseHost\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"creator\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"description\", void 0);\n__decorate([\n property({ type: Boolean })\n], IauxSharingOptions.prototype, \"embedOptionsVisible\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"identifier\", void 0);\n__decorate([\n property({ type: Array })\n], IauxSharingOptions.prototype, \"sharingOptions\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"type\", void 0);\n__decorate([\n property({ type: Boolean })\n], IauxSharingOptions.prototype, \"renderHeader\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"fileSubPrefix\", void 0);\nIauxSharingOptions = __decorate([\n customElement('iaux-in-share-panel')\n], IauxSharingOptions);\nexport { IauxSharingOptions };\n//# sourceMappingURL=share-panel.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n _$LH,\n Part,\n DirectiveParent,\n TemplateResult,\n CompiledTemplateResult,\n} from './lit-html.js';\nimport {\n DirectiveResult,\n DirectiveClass,\n PartInfo,\n AttributePartInfo,\n} from './directive.js';\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\n\nconst {_ChildPart: ChildPart} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\n\nconst ENABLE_SHADYDOM_NOPATCH = true;\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM!.wrap\n : (node: Node) => node;\n\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\n\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n} as const;\n\nexport type TemplateResultType =\n (typeof TemplateResultType)[keyof typeof TemplateResultType];\n\ntype IsTemplateResult = {\n (val: unknown): val is TemplateResult | CompiledTemplateResult;\n <T extends TemplateResultType>(\n val: unknown,\n type: T\n ): val is TemplateResult<T>;\n};\n\n/**\n * Tests if a value is a TemplateResult or a CompiledTemplateResult.\n */\nexport const isTemplateResult: IsTemplateResult = (\n value: unknown,\n type?: TemplateResultType\n): value is TemplateResult =>\n type === undefined\n ? // This property needs to remain unminified.\n (value as TemplateResult)?.['_$litType$'] !== undefined\n : (value as TemplateResult)?.['_$litType$'] === type;\n\n/**\n * Tests if a value is a CompiledTemplateResult.\n */\nexport const isCompiledTemplateResult = (\n value: unknown\n): value is CompiledTemplateResult => {\n return (value as CompiledTemplateResult)?.['_$litType$']?.h != null;\n};\n\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value: unknown): value is DirectiveResult =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'] !== undefined;\n\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value: unknown): DirectiveClass | undefined =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'];\n\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part: PartInfo) =>\n (part as AttributePartInfo).strings === undefined;\n\nconst createMarker = () => document.createComment('');\n\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (\n containerPart: ChildPart,\n refPart?: ChildPart,\n part?: ChildPart\n): ChildPart => {\n const container = wrap(containerPart._$startNode).parentNode!;\n\n const refNode =\n refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(\n startNode,\n endNode,\n containerPart,\n containerPart.options\n );\n } else {\n const endNode = wrap(part._$endNode!).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (\n part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent!._$isConnected\n ) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start: Node | null = part._$startNode;\n while (start !== endNode) {\n const n: Node | null = wrap(start!).nextSibling;\n wrap(container).insertBefore(start!, refNode);\n start = n;\n }\n }\n }\n\n return part;\n};\n\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = <T extends ChildPart>(\n part: T,\n value: unknown,\n directiveParent: DirectiveParent = part\n): T => {\n part._$setValue(value, directiveParent);\n return part;\n};\n\n// A sentinel value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part: Part, value: unknown = RESET_VALUE) =>\n (part._$committedValue = value);\n\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being committed.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part: ChildPart) => part._$committedValue;\n\n/**\n * Removes a ChildPart from the DOM, including any of its content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part: ChildPart) => {\n part._$notifyConnectionChanged?.(false, true);\n let start: ChildNode | null = part._$startNode;\n const end: ChildNode | null = wrap(part._$endNode!).nextSibling;\n while (start !== end) {\n const n: ChildNode | null = wrap(start!).nextSibling;\n (wrap(start!) as ChildNode).remove();\n start = n;\n }\n};\n\nexport const clearPart = (part: ChildPart) => {\n part._$clear();\n};\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ChildPart, noChange} from '../lit-html.js';\nimport {directive, Directive, PartInfo, PartType} from '../directive.js';\nimport {\n insertPart,\n getCommittedValue,\n removePart,\n setCommittedValue,\n setChildPartValue,\n} from '../directive-helpers.js';\n\nexport type KeyFn<T> = (item: T, index: number) => unknown;\nexport type ItemTemplate<T> = (item: T, index: number) => unknown;\n\n// Helper for generating a map of array item to its index over a subset\n// of an array (used to lazily generate `newKeyToIndexMap` and\n// `oldKeyToIndexMap`)\nconst generateMap = (list: unknown[], start: number, end: number) => {\n const map = new Map<unknown, number>();\n for (let i = start; i <= end; i++) {\n map.set(list[i], i);\n }\n return map;\n};\n\nclass RepeatDirective extends Directive {\n private _itemKeys?: unknown[];\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.CHILD) {\n throw new Error('repeat() can only be used in text expressions');\n }\n }\n\n private _getValuesAndKeys<T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ) {\n let keyFn: KeyFn<T> | undefined;\n if (template === undefined) {\n template = keyFnOrTemplate;\n } else if (keyFnOrTemplate !== undefined) {\n keyFn = keyFnOrTemplate as KeyFn<T>;\n }\n const keys = [];\n const values = [];\n let index = 0;\n for (const item of items) {\n keys[index] = keyFn ? keyFn(item, index) : index;\n values[index] = template!(item, index);\n index++;\n }\n return {\n values,\n keys,\n };\n }\n\n render<T>(items: Iterable<T>, template: ItemTemplate<T>): Array<unknown>;\n render<T>(\n items: Iterable<T>,\n keyFn: KeyFn<T> | ItemTemplate<T>,\n template: ItemTemplate<T>\n ): Array<unknown>;\n render<T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ) {\n return this._getValuesAndKeys(items, keyFnOrTemplate, template).values;\n }\n\n override update<T>(\n containerPart: ChildPart,\n [items, keyFnOrTemplate, template]: [\n Iterable<T>,\n KeyFn<T> | ItemTemplate<T>,\n ItemTemplate<T>\n ]\n ) {\n // Old part & key lists are retrieved from the last update (which may\n // be primed by hydration)\n const oldParts = getCommittedValue(\n containerPart\n ) as Array<ChildPart | null>;\n const {values: newValues, keys: newKeys} = this._getValuesAndKeys(\n items,\n keyFnOrTemplate,\n template\n );\n\n // We check that oldParts, the committed value, is an Array as an\n // indicator that the previous value came from a repeat() call. If\n // oldParts is not an Array then this is the first render and we return\n // an array for lit-html's array handling to render, and remember the\n // keys.\n if (!Array.isArray(oldParts)) {\n this._itemKeys = newKeys;\n return newValues;\n }\n\n // In SSR hydration it's possible for oldParts to be an array but for us\n // to not have item keys because the update() hasn't run yet. We set the\n // keys to an empty array. This will cause all oldKey/newKey comparisons\n // to fail and execution to fall to the last nested brach below which\n // reuses the oldPart.\n const oldKeys = (this._itemKeys ??= []);\n\n // New part list will be built up as we go (either reused from\n // old parts or created for new keys in this update). This is\n // saved in the above cache at the end of the update.\n const newParts: ChildPart[] = [];\n\n // Maps from key to index for current and previous update; these\n // are generated lazily only when needed as a performance\n // optimization, since they are only required for multiple\n // non-contiguous changes in the list, which are less common.\n let newKeyToIndexMap!: Map<unknown, number>;\n let oldKeyToIndexMap!: Map<unknown, number>;\n\n // Head and tail pointers to old parts and new values\n let oldHead = 0;\n let oldTail = oldParts.length - 1;\n let newHead = 0;\n let newTail = newValues.length - 1;\n\n // Overview of O(n) reconciliation algorithm (general approach\n // based on ideas found in ivi, vue, snabbdom, etc.):\n //\n // * We start with the list of old parts and new values (and\n // arrays of their respective keys), head/tail pointers into\n // each, and we build up the new list of parts by updating\n // (and when needed, moving) old parts or creating new ones.\n // The initial scenario might look like this (for brevity of\n // the diagrams, the numbers in the array reflect keys\n // associated with the old parts or new values, although keys\n // and parts/values are actually stored in parallel arrays\n // indexed using the same head/tail pointers):\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [ , , , , , , ]\n // newKeys: [0, 2, 1, 4, 3, 7, 6] <- reflects the user's new\n // item order\n // newHead ^ ^ newTail\n //\n // * Iterate old & new lists from both sides, updating,\n // swapping, or removing parts at the head/tail locations\n // until neither head nor tail can move.\n //\n // * Example below: keys at head pointers match, so update old\n // part 0 in-place (no need to move it) and record part 0 in\n // the `newParts` list. The last thing we do is advance the\n // `oldHead` and `newHead` pointers (will be reflected in the\n // next diagram).\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , ] <- heads matched: update 0\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: head pointers don't match, but tail\n // pointers do, so update part 6 in place (no need to move\n // it), and record part 6 in the `newParts` list. Last,\n // advance the `oldTail` and `oldHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- tails matched: update 6\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldTail\n // & newTail\n // newHead ^ ^ newTail\n //\n // * If neither head nor tail match; next check if one of the\n // old head/tail items was removed. We first need to generate\n // the reverse map of new keys to index (`newKeyToIndexMap`),\n // which is done once lazily as a performance optimization,\n // since we only hit this case if multiple non-contiguous\n // changes were made. Note that for contiguous removal\n // anywhere in the list, the head and tails would advance\n // from either end and pass each other before we get to this\n // case and removals would be handled in the final while loop\n // without needing to generate the map.\n //\n // * Example below: The key at `oldTail` was removed (no longer\n // in the `newKeyToIndexMap`), so remove that part from the\n // DOM and advance just the `oldTail` pointer.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- 5 not in new map: remove\n // newKeys: [0, 2, 1, 4, 3, 7, 6] 5 and advance oldTail\n // newHead ^ ^ newTail\n //\n // * Once head and tail cannot move, any mismatches are due to\n // either new or moved items; if a new key is in the previous\n // \"old key to old index\" map, move the old part to the new\n // location, otherwise create and insert a new part. Note\n // that when moving an old part we null its position in the\n // oldParts array if it lies between the head and tail so we\n // know to skip it when the pointers get there.\n //\n // * Example below: neither head nor tail match, and neither\n // were removed; so find the `newHead` key in the\n // `oldKeyToIndexMap`, and move that old part's DOM into the\n // next head position (before `oldParts[oldHead]`). Last,\n // null the part in the `oldPart` array since it was\n // somewhere in the remaining oldParts still to be scanned\n // (between the head and tail pointers) so that we know to\n // skip that old part on future iterations.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, , , , , 6] <- stuck: update & move 2\n // newKeys: [0, 2, 1, 4, 3, 7, 6] into place and advance\n // newHead\n // newHead ^ ^ newTail\n //\n // * Note that for moves/insertions like the one above, a part\n // inserted at the head pointer is inserted before the\n // current `oldParts[oldHead]`, and a part inserted at the\n // tail pointer is inserted before `newParts[newTail+1]`. The\n // seeming asymmetry lies in the fact that new parts are\n // moved into place outside in, so to the right of the head\n // pointer are old parts, and to the right of the tail\n // pointer are new parts.\n //\n // * We always restart back from the top of the algorithm,\n // allowing matching and simple updates in place to\n // continue...\n //\n // * Example below: the head pointers once again match, so\n // simply update part 1 and record it in the `newParts`\n // array. Last, advance both head pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, , , , 6] <- heads matched: update 1\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * As mentioned above, items that were moved as a result of\n // being stuck (the final else clause in the code below) are\n // marked with null, so we always advance old pointers over\n // these so we're comparing the next actual old value on\n // either end.\n //\n // * Example below: `oldHead` is null (already placed in\n // newParts), so advance `oldHead`.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6] <- old head already used:\n // newParts: [0, 2, 1, , , , 6] advance oldHead\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ ^ newTail\n //\n // * Note it's not critical to mark old parts as null when they\n // are moved from head to tail or tail to head, since they\n // will be outside the pointer range and never visited again.\n //\n // * Example below: Here the old tail key matches the new head\n // key, so the part at the `oldTail` position and move its\n // DOM to the new head position (before `oldParts[oldHead]`).\n // Last, advance `oldTail` and `newHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, , , 6] <- old tail matches new\n // newKeys: [0, 2, 1, 4, 3, 7, 6] head: update & move 4,\n // advance oldTail & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: Old and new head keys match, so update the\n // old head part in place, and advance the `oldHead` and\n // `newHead` pointers.\n //\n // oldHead v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, ,6] <- heads match: update 3\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance oldHead &\n // newHead\n // newHead ^ ^ newTail\n //\n // * Once the new or old pointers move past each other then all\n // we have left is additions (if old list exhausted) or\n // removals (if new list exhausted). Those are handled in the\n // final while loops at the end.\n //\n // * Example below: `oldHead` exceeded `oldTail`, so we're done\n // with the main loop. Create the remaining part and insert\n // it at the new head position, and the update is complete.\n //\n // (oldHead > oldTail)\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, 7 ,6] <- create and insert 7\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ newTail\n //\n // * Note that the order of the if/else clauses is not\n // important to the algorithm, as long as the null checks\n // come first (to ensure we're always working on valid old\n // parts) and that the final else clause comes last (since\n // that's where the expensive moves occur). The order of\n // remaining clauses is is just a simple guess at which cases\n // will be most common.\n //\n // * Note, we could calculate the longest\n // increasing subsequence (LIS) of old items in new position,\n // and only move those not in the LIS set. However that costs\n // O(nlogn) time and adds a bit more code, and only helps\n // make rare types of mutations require fewer moves. The\n // above handles removes, adds, reversal, swaps, and single\n // moves of contiguous items in linear time, in the minimum\n // number of moves. As the number of multiple moves where LIS\n // might help approaches a random shuffle, the LIS\n // optimization becomes less helpful, so it seems not worth\n // the code at this point. Could reconsider if a compelling\n // case arises.\n\n while (oldHead <= oldTail && newHead <= newTail) {\n if (oldParts[oldHead] === null) {\n // `null` means old part at head has already been used\n // below; skip\n oldHead++;\n } else if (oldParts[oldTail] === null) {\n // `null` means old part at tail has already been used\n // below; skip\n oldTail--;\n } else if (oldKeys[oldHead] === newKeys[newHead]) {\n // Old head matches new head; update in place\n newParts[newHead] = setChildPartValue(\n oldParts[oldHead]!,\n newValues[newHead]\n );\n oldHead++;\n newHead++;\n } else if (oldKeys[oldTail] === newKeys[newTail]) {\n // Old tail matches new tail; update in place\n newParts[newTail] = setChildPartValue(\n oldParts[oldTail]!,\n newValues[newTail]\n );\n oldTail--;\n newTail--;\n } else if (oldKeys[oldHead] === newKeys[newTail]) {\n // Old head matches new tail; update and move to new tail\n newParts[newTail] = setChildPartValue(\n oldParts[oldHead]!,\n newValues[newTail]\n );\n insertPart(containerPart, newParts[newTail + 1], oldParts[oldHead]!);\n oldHead++;\n newTail--;\n } else if (oldKeys[oldTail] === newKeys[newHead]) {\n // Old tail matches new head; update and move to new head\n newParts[newHead] = setChildPartValue(\n oldParts[oldTail]!,\n newValues[newHead]\n );\n insertPart(containerPart, oldParts[oldHead]!, oldParts[oldTail]!);\n oldTail--;\n newHead++;\n } else {\n if (newKeyToIndexMap === undefined) {\n // Lazily generate key-to-index maps, used for removals &\n // moves below\n newKeyToIndexMap = generateMap(newKeys, newHead, newTail);\n oldKeyToIndexMap = generateMap(oldKeys, oldHead, oldTail);\n }\n if (!newKeyToIndexMap.has(oldKeys[oldHead])) {\n // Old head is no longer in new list; remove\n removePart(oldParts[oldHead]!);\n oldHead++;\n } else if (!newKeyToIndexMap.has(oldKeys[oldTail])) {\n // Old tail is no longer in new list; remove\n removePart(oldParts[oldTail]!);\n oldTail--;\n } else {\n // Any mismatches at this point are due to additions or\n // moves; see if we have an old part we can reuse and move\n // into place\n const oldIndex = oldKeyToIndexMap.get(newKeys[newHead]);\n const oldPart = oldIndex !== undefined ? oldParts[oldIndex] : null;\n if (oldPart === null) {\n // No old part for this value; create a new one and\n // insert it\n const newPart = insertPart(containerPart, oldParts[oldHead]!);\n setChildPartValue(newPart, newValues[newHead]);\n newParts[newHead] = newPart;\n } else {\n // Reuse old part\n newParts[newHead] = setChildPartValue(oldPart, newValues[newHead]);\n insertPart(containerPart, oldParts[oldHead]!, oldPart);\n // This marks the old part as having been used, so that\n // it will be skipped in the first two checks above\n oldParts[oldIndex as number] = null;\n }\n newHead++;\n }\n }\n }\n // Add parts for any remaining new values\n while (newHead <= newTail) {\n // For all remaining additions, we insert before last new\n // tail, since old pointers are no longer valid\n const newPart = insertPart(containerPart, newParts[newTail + 1]);\n setChildPartValue(newPart, newValues[newHead]);\n newParts[newHead++] = newPart;\n }\n // Remove any remaining unused old parts\n while (oldHead <= oldTail) {\n const oldPart = oldParts[oldHead++];\n if (oldPart !== null) {\n removePart(oldPart);\n }\n }\n\n // Save order of new parts for next round\n this._itemKeys = newKeys;\n // Directly set part value, bypassing it's dirty-checking\n setCommittedValue(containerPart, newParts);\n return noChange;\n }\n}\n\nexport interface RepeatDirectiveFn {\n <T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ): unknown;\n <T>(items: Iterable<T>, template: ItemTemplate<T>): unknown;\n <T>(\n items: Iterable<T>,\n keyFn: KeyFn<T> | ItemTemplate<T>,\n template: ItemTemplate<T>\n ): unknown;\n}\n\n/**\n * A directive that repeats a series of values (usually `TemplateResults`)\n * generated from an iterable, and updates those items efficiently when the\n * iterable changes based on user-provided `keys` associated with each item.\n *\n * Note that if a `keyFn` is provided, strict key-to-DOM mapping is maintained,\n * meaning previous DOM for a given key is moved into the new position if\n * needed, and DOM will never be reused with values for different keys (new DOM\n * will always be created for new keys). This is generally the most efficient\n * way to use `repeat` since it performs minimum unnecessary work for insertions\n * and removals.\n *\n * The `keyFn` takes two parameters, the item and its index, and returns a unique key value.\n *\n * ```js\n * html`\n * <ol>\n * ${repeat(this.items, (item) => item.id, (item, index) => {\n * return html`<li>${index}: ${item.name}</li>`;\n * })}\n * </ol>\n * `\n * ```\n *\n * **Important**: If providing a `keyFn`, keys *must* be unique for all items in a\n * given call to `repeat`. The behavior when two or more items have the same key\n * is undefined.\n *\n * If no `keyFn` is provided, this directive will perform similar to mapping\n * items to values, and DOM will be reused against potentially different items.\n */\nexport const repeat = directive(RepeatDirective) as RepeatDirectiveFn;\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {RepeatDirective};\n","import { __decorate } from \"tslib\";\n/* eslint-disable max-classes-per-file */\n/* eslint-disable lit-a11y/list */\nimport { css, html, LitElement, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\n// sort icons\nconst sortAscIcon = html `\n <svg\n name=\"sort-asc\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g fill=\"none\" fill-rule=\"evenodd\">\n <path\n d=\"m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z\"\n fill=\"#fff\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z\"\n fill=\"#fff\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612\"\n stroke=\"#fff\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.661538\"\n transform=\"matrix(1 0 0 -1 0 18.692308)\"\n />\n </g>\n </svg>\n`;\nconst sortDescIcon = html `\n <svg\n name=\"sort-desc\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g fill=\"none\" fill-rule=\"evenodd\">\n <path\n d=\"m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z\"\n fill=\"#fff\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z\"\n fill=\"#fff\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612\"\n stroke=\"#fff\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.661538\"\n />\n </g>\n </svg>\n`;\nconst sortNeutralIcon = html `\n <svg\n name=\"sort-neutral\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g fill=\"#fff\" fill-rule=\"evenodd\">\n <path\n d=\"m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z\"\n fill-rule=\"nonzero\"\n />\n <circle cx=\"13\" cy=\"9\" r=\"2\" />\n </g>\n </svg>\n`;\n/* icon for menu shortcut & menu icon */\nexport const viewableFilesIcon = html `\n <svg\n height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"volumesTitleID volumesDescID\"\n >\n <title id=\"volumesTitleID\">Viewable Files</title>\n <g fill=\"#ffffff\">\n <path\n fill=\"#ffffff\"\n d=\"m9.83536396 0h10.07241114c.1725502.47117517.3378411.76385809.4958725.87804878.1295523.11419069.3199719.1998337.5712586.25692905.2512868.05709534.4704647.08564301.6575337.08564301h.2806036v15.24362526h-4.3355343v3.8106985h-4.44275v3.7250554h-12.01318261c-.27306495 0-.50313194-.085643-.69020098-.256929-.18706903-.1712861-.30936193-.3425721-.36687867-.5138581l-.06449694-.2785477v-14.2159091c0-.32815965.08627512-.5922949.25882537-.79240577.17255024-.20011086.34510049-.32150776.51765073-.36419068l.25882537-.0640244h3.36472977v-2.54767184c0-.31374722.08627513-.57067627.25882537-.77078714.17255025-.20011086.34510049-.32150776.51765074-.36419068l.25882536-.06402439h3.36472978v-2.56929047c0-.32815964.08627512-.5922949.25882537-.79240576.17255024-.20011087.34510049-.31430156.51765073-.34257207zm10.78355264 15.6294346v-13.53076498c-.2730649-.08536585-.4456152-.16380266-.5176507-.23531042-.1725502-.1424612-.2730649-.27078714-.3015441-.38497783v13.36031043h-9.87808272c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144124-.08962561.006929-.13988296.0640244-.05025735.0570953-.07538603.1427383-.07538603.256929s.02149898.210643.06449694.289357c.04299795.078714.08599591.1322062.12899387.1604767l.06449693.0216187h10.71905571zm-10.2449613-2.4412417h7.98003v-11.60421286h-7.98003zm1.6827837-9.41990022h4.6153002c.1725502 0 .3199718.05349224.4422647.16047672s.1834393.23891353.1834393.39578714c0 .15687362-.0611464.28519956-.1834393.38497783s-.2697145.1496674-.4422647.1496674h-4.6153002c-.1725503 0-.3199719-.04988913-.4422647-.1496674-.1222929-.09977827-.1834394-.22810421-.1834394-.38497783 0-.15687361.0611465-.28880266.1834394-.39578714.1222928-.10698448.2697144-.16047672.4422647-.16047672zm-6.08197737 13.50997782h7.72120467v-.8131929h-3.79610541c-.27306495 0-.49950224-.085643-.67931188-.256929-.17980964-.1712861-.29847284-.3425721-.35598958-.5138581l-.06449694-.2785477v-10.02023282h-2.82530086zm6.77217827-11.36890243h3.2139578c.1295522 0 .240956.05709534.3342113.17128603.0932554.11419069.139883.24972284.139883.40659645 0 .15687362-.0466276.28880267-.139883.39578714-.0932553.10698448-.2046591.16047672-.3342113.16047672h-3.2139578c-.1295523 0-.2373264-.05349224-.3233223-.16047672-.0859959-.10698447-.1289938-.23891352-.1289938-.39578714 0-.15687361.0429979-.29240576.1289938-.40659645s.19377-.17128603.3233223-.17128603zm-11.15043132 15.11557653h7.69942646v-.7491685h-3.79610539c-.25854616 0-.48135376-.0892462-.66842279-.2677384-.18706904-.1784922-.30936193-.3605876-.36687868-.546286l-.06449694-.2569291v-10.04101994h-2.80352266zm14.62237682-4.5606985h-.8191949v2.1410754h-9.89986085s-.04299796.0285477-.12899387.085643c-.08599592.0570954-.12201369.1427384-.10805331.2569291 0 .1141907.01786928.210643.05360784.289357.03573856.0787139.07538603.125.1189424.138858l.06449694.0432373h10.71905575v-2.9542683zm-4.3991936 3.8106985h-.8191949v2.077051h-9.8563045c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144125-.08962561.0105321-.13988296.0748337-.05025735.0643015-.07538603.1607538-.07538603.289357 0 .1141906.02149898.2070399.06449694.2785476.04299795.0715078.08599591.1141907.12899387.1280488l.06449693.0216186h10.69811519v-2.8686252z\"\n />\n </g>\n </svg>\n`;\n/* <iaux-in-sort-files-button> side panel header button */\nlet IauxSortFilesButton = class IauxSortFilesButton extends LitElement {\n constructor() {\n super(...arguments);\n this.fileListRaw = [];\n this.fileListSorted = [];\n this.sortOrderBy = 'default';\n }\n render() {\n return html `<div class=\"sort-multi-file-list\">${this.sortButton}</div>`;\n }\n get sortButton() {\n const sortIcons = {\n default: html `\n <button\n class=\"sort-by neutral-icon\"\n aria-label=\"Sort volumes in initial order\"\n @click=${() => this.sortVolumes('title_asc')}\n >\n ${sortNeutralIcon}\n </button>\n `,\n title_asc: html `\n <button\n class=\"sort-by asc-icon\"\n aria-label=\"Sort volumes in ascending order\"\n @click=${() => this.sortVolumes('title_desc')}\n >\n ${sortAscIcon}\n </button>\n `,\n title_desc: html `\n <button\n class=\"sort-by desc-icon\"\n aria-label=\"Sort volumes in descending order\"\n @click=${() => this.sortVolumes('default')}\n >\n ${sortDescIcon}\n </button>\n `,\n };\n return sortIcons[this.sortOrderBy];\n }\n sortVolumes(sortType) {\n this.sortOrderBy = sortType;\n let sortedFiles = [];\n sortedFiles = this.fileListRaw.sort((a, b) => {\n if (sortType === 'title_asc')\n return a.title.localeCompare(b.title);\n if (sortType === 'title_desc')\n return b.title.localeCompare(a.title);\n return a.orig_sort - b.orig_sort;\n });\n this.dispatchEvent(new CustomEvent('fileListSorted', {\n detail: {\n sortType,\n sortedFiles,\n },\n bubbles: true,\n composed: true,\n }));\n this.fileListSorted = sortedFiles;\n }\n static get styles() {\n return css `\n button.sort-by {\n padding: 0px;\n background-color: transparent;\n border: 0px;\n --iconWidth: var(--menuSliderHeaderIconWidth);\n --iconHeight: var(--menuSliderHeaderIconHeight);\n }\n `;\n }\n};\n__decorate([\n property({ type: Array })\n], IauxSortFilesButton.prototype, \"fileListRaw\", void 0);\n__decorate([\n property({ type: Array })\n], IauxSortFilesButton.prototype, \"fileListSorted\", void 0);\n__decorate([\n property({ type: String, reflect: true })\n], IauxSortFilesButton.prototype, \"sortOrderBy\", void 0);\nIauxSortFilesButton = __decorate([\n customElement('iaux-in-sort-files-button')\n], IauxSortFilesButton);\nexport { IauxSortFilesButton };\n/* <iaux-in-viewable-files-panel> side panel menu */\nlet IauxViewableFiles = class IauxViewableFiles extends LitElement {\n constructor() {\n super(...arguments);\n this.baseHost = 'archive.org';\n this.sortOrderBy = 'default';\n this.subPrefix = '';\n this.fileList = [];\n this.addSortToUrl = false;\n }\n firstUpdated() {\n const activeFile = this.shadowRoot.querySelector('.content.active');\n // allow for css animations to run before scrolling to active file\n setTimeout(() => {\n // scroll active file into view if needed\n // note: `scrollIntoViewIfNeeded` handles auto-scroll gracefully for Chrome, Safari\n // Firefox does not have this capability yet as it does not support `scrollIntoViewIfNeeded`\n activeFile === null || activeFile === void 0 ? void 0 : activeFile.scrollIntoViewIfNeeded(true);\n // Todo: support `scrollIntoView` or `parentContainer.crollTop = x` for FF & \"IE 11\"\n // currently, the hard `position: absolutes` misaligns subpanel when `scrollIntoView` is applied :(\n }, 350);\n }\n volumeItemWithImageTitle(item) {\n const hrefUrl = this.fileUrl(item);\n return html `\n <li class=\"content active\">\n <div class=\"separator\"></div>\n <a class=\"container\" href=\"${hrefUrl}\">\n <div class=\"image\">\n <img src=\"${item.image}\" alt=\"preview\" />\n </div>\n <div class=\"text\">\n <p class=\"item-title\">${item.title}</p>\n <small>by: ${item.author}</small>\n </div>\n </a>\n </li>\n `;\n }\n fileUrl(item) {\n const baseUrl = `//${this.baseHost}${item.url_path}`;\n let hrefUrl = baseUrl;\n if (this.addSortToUrl) {\n hrefUrl =\n this.sortOrderBy === 'default'\n ? `${baseUrl}`\n : `${baseUrl}?sort=${this.sortOrderBy}`;\n }\n return hrefUrl;\n }\n get pdfLabel() {\n return html `<span class=\"pdf-label\"\n ><span class=\"sr-only\">view this</span> PDF</span\n >`;\n }\n fileLi(item) {\n var _a;\n const activeClass = this.subPrefix === item.file_subprefix ? ' active' : '';\n const hrefUrl = this.fileUrl(item);\n const isPdf = ((_a = item.file_source) !== null && _a !== void 0 ? _a : '').match(/^[^+]+\\.pdf$/i);\n return html `\n <li>\n <div class=\"separator\"></div>\n <div class=\"content${activeClass}\">\n <a href=${hrefUrl}>\n <p class=\"item-title\">\n ${item.title}${isPdf ? this.pdfLabel : nothing}\n </p>\n </a>\n </div>\n </li>\n `;\n }\n get fileListTemplate() {\n const filesDisplay = repeat(this.fileList, file => file === null || file === void 0 ? void 0 : file.file_prefix, this.fileLi.bind(this));\n return html `\n <ul>\n ${filesDisplay}\n <div class=\"separator\"></div>\n </ul>\n `;\n }\n render() {\n return html ` ${this.fileList.length ? this.fileListTemplate : nothing} `;\n }\n static get styles() {\n return css `\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-top: 14px;\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n a {\n color: #ffffff;\n text-decoration: none;\n }\n\n img {\n width: 35px;\n height: 45px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n\n ul > li:first-child .separator {\n display: none;\n }\n\n li {\n cursor: pointer;\n outline: none;\n position: relative;\n }\n\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: 0.2rem 0 0.4rem 0.2rem;\n }\n\n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n\n li.content a {\n display: flex;\n }\n\n small {\n font-style: italic;\n white-space: initial;\n }\n\n .container {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .item-title {\n margin-block-start: 0em;\n margin-block-end: 0em;\n font-size: 14px;\n font-weight: bold;\n word-wrap: break-word;\n padding-left: 5px;\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n .text {\n padding-left: 10px;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: 0.7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n\n .pdf-label {\n border: 1px solid;\n padding: 2px 5px;\n border-radius: 20px;\n display: inline-block;\n margin-left: 5px;\n font-size: 0.9rem;\n }\n\n .pdf-label .sr-only {\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n padding: 0;\n border: 0;\n height: 1px;\n width: 1px;\n overflow: hidden;\n }\n `;\n }\n};\n__decorate([\n property({ type: String })\n], IauxViewableFiles.prototype, \"baseHost\", void 0);\n__decorate([\n property({ type: String })\n], IauxViewableFiles.prototype, \"sortOrderBy\", void 0);\n__decorate([\n property({ type: String })\n], IauxViewableFiles.prototype, \"subPrefix\", void 0);\n__decorate([\n property({ type: Array })\n], IauxViewableFiles.prototype, \"fileList\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], IauxViewableFiles.prototype, \"addSortToUrl\", void 0);\nIauxViewableFiles = __decorate([\n customElement('iaux-in-viewable-files-panel')\n], IauxViewableFiles);\nexport { IauxViewableFiles };\n//# sourceMappingURL=viewable-files.js.map","/**\r\n * Configuration to show a modal\r\n *\r\n * @export\r\n * @class ModalConfig\r\n */\r\nexport class ModalConfig {\r\n constructor(options) {\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n this.title = options === null || options === void 0 ? void 0 : options.title;\r\n this.subtitle = options === null || options === void 0 ? void 0 : options.subtitle;\r\n this.headline = options === null || options === void 0 ? void 0 : options.headline;\r\n this.message = options === null || options === void 0 ? void 0 : options.message;\r\n this.headerColor = (_a = options === null || options === void 0 ? void 0 : options.headerColor) !== null && _a !== void 0 ? _a : '#55A183';\r\n this.bodyColor = (_b = options === null || options === void 0 ? void 0 : options.bodyColor) !== null && _b !== void 0 ? _b : '#f5f5f7';\r\n this.showProcessingIndicator = (_c = options === null || options === void 0 ? void 0 : options.showProcessingIndicator) !== null && _c !== void 0 ? _c : false;\r\n this.processingImageMode = (_d = options === null || options === void 0 ? void 0 : options.processingImageMode) !== null && _d !== void 0 ? _d : 'complete';\r\n this.showCloseButton = (_e = options === null || options === void 0 ? void 0 : options.showCloseButton) !== null && _e !== void 0 ? _e : true;\r\n this.showHeaderLogo = (_f = options === null || options === void 0 ? void 0 : options.showHeaderLogo) !== null && _f !== void 0 ? _f : true;\r\n this.closeOnBackdropClick = (_g = options === null || options === void 0 ? void 0 : options.closeOnBackdropClick) !== null && _g !== void 0 ? _g : true;\r\n }\r\n}\r\n//# sourceMappingURL=modal-config.js.map","import { LitElement, html, css } from 'lit';\r\n\r\nconst IAActivityIndicatorMode = Object.freeze({\r\n processing: 'processing',\r\n complete: 'complete',\r\n});\r\n\r\nclass IAActivityIndicator extends LitElement {\r\n static get properties() {\r\n return {\r\n mode: { type: String },\r\n };\r\n }\r\n\r\n constructor() {\r\n super();\r\n this.mode = IAActivityIndicatorMode.processing;\r\n }\r\n\r\n render() {\r\n return html`\r\n <div class=\"${this.mode}\">\r\n <svg\r\n viewBox=\"0 0 120 120\"\r\n preserveAspectRatio=\"none\"\r\n version=\"1.1\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n aria-labelledby=\"indicatorTitle indicatorDescription\"\r\n >\r\n <title id=\"indicatorTitle\">Activity Indicator</title>\r\n <desc id=\"indicatorDescription\">\r\n A rotating activity indicator with three dots in the middle.\r\n </desc>\r\n <g\r\n id=\"icons/check-ring---squared\"\r\n stroke=\"none\"\r\n stroke-width=\"1\"\r\n fill=\"none\"\r\n fill-rule=\"evenodd\"\r\n >\r\n <path\r\n id=\"completed-ring\"\r\n class=\"loaded-indicator\"\r\n d=\"M60,10 C70.5816709,10 80.3955961,13.2871104 88.4763646,18.8959201 L78.3502633,29.0214223 C72.9767592,25.8315427 66.7022695,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 L95.995,59.46 L108.327675,47.128668 C109.350926,50.9806166 109.925886,55.015198 109.993301,59.1731586 L110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z\"\r\n ></path>\r\n <polygon\r\n id=\"check\"\r\n class=\"loaded-indicator\"\r\n transform=\"translate(75.000000, 41.500000) rotate(44.000000) translate(-75.000000, -41.500000) \"\r\n points=\"96 85 54 85 54 65 76 64.999 76 -2 96 -2\"\r\n ></polygon>\r\n <path\r\n id=\"activity-ring\"\r\n class=\"activity-indicator\"\r\n d=\"M60,10 C69.8019971,10 78.9452178,12.8205573 86.6623125,17.6943223 L76.4086287,27.9484118 C71.4880919,25.4243078 65.9103784,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 C96,53.3014663 94.1704984,47.0302355 90.9839104,41.6587228 L101.110332,31.5326452 C106.715332,39.6116982 110,49.4222615 110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z\"\r\n ></path>\r\n <g\r\n id=\"activity-dots\"\r\n class=\"activity-indicator\"\r\n transform=\"translate(40.000000, 55.000000)\"\r\n >\r\n <circle id=\"left-dot\" cx=\"5\" cy=\"5\" r=\"5\"></circle>\r\n <circle id=\"middle-dot\" cx=\"20\" cy=\"5\" r=\"5\"></circle>\r\n <circle id=\"right-dot\" cx=\"35\" cy=\"5\" r=\"5\"></circle>\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n `;\r\n }\r\n\r\n static get styles() {\r\n const checkmarkColorCss = css`var(--activityIndicatorCheckmarkColor, #31A481)`;\r\n const completedRingColorCss = css`var(--activityIndicatorCompletedRingColor, #31A481)`;\r\n const loadingRingColorCss = css`var(--activityIndicatorLoadingRingColor, #333333)`;\r\n const loadingDotColorCss = css`var(--activityIndicatorLoadingDotColor, #333333)`;\r\n\r\n return css`\r\n #completed-ring {\r\n fill: ${completedRingColorCss};\r\n }\r\n\r\n #check {\r\n fill: ${checkmarkColorCss};\r\n }\r\n\r\n #activity-ring {\r\n fill: ${loadingRingColorCss};\r\n }\r\n\r\n #activity-dots {\r\n fill: ${loadingDotColorCss};\r\n }\r\n\r\n .activity-indicator {\r\n opacity: 0;\r\n transition: opacity 0.25s ease-out;\r\n }\r\n\r\n .processing .activity-indicator {\r\n opacity: 1;\r\n }\r\n\r\n .loaded-indicator {\r\n opacity: 1;\r\n transition: opacity 0.25s ease-out;\r\n }\r\n\r\n .processing .loaded-indicator {\r\n opacity: 0;\r\n }\r\n\r\n .image {\r\n border: 1px solid red;\r\n display: inline-block;\r\n }\r\n\r\n .processing #activity-ring {\r\n animation: rotate 1.3s infinite linear;\r\n transform-origin: 50px 50px;\r\n transform-box: fill-box;\r\n }\r\n\r\n .processing #left-dot {\r\n opacity: 0;\r\n animation: dot 1.3s infinite;\r\n animation-delay: 0.2s;\r\n }\r\n\r\n .processing #middle-dot {\r\n opacity: 0;\r\n animation: dot 1.3s infinite;\r\n animation-delay: 0.4s;\r\n }\r\n\r\n .processing #right-dot {\r\n opacity: 0;\r\n animation: dot 1.3s infinite;\r\n animation-delay: 0.6s;\r\n }\r\n\r\n @keyframes rotate {\r\n 0% {\r\n transform: rotate(-360deg);\r\n }\r\n 100% {\r\n /* This frame is supposed to be inferred, but Safari doesn't rotate it unless we're explicit */\r\n transform: rotate(0deg);\r\n }\r\n }\r\n\r\n @keyframes dot {\r\n 0% {\r\n opacity: 0;\r\n }\r\n 25% {\r\n opacity: 1;\r\n }\r\n 100% {\r\n opacity: 0;\r\n }\r\n }\r\n `;\r\n }\r\n}\r\n\r\nexport { IAActivityIndicator, IAActivityIndicatorMode };\r\n","import { IAActivityIndicator } from './src/ia-activity-indicator.js';\r\n\r\nwindow.customElements.define('ia-activity-indicator', IAActivityIndicator);\r\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"closeTitleID closeDescID\"\n>\n <title id=\"closeTitleID\">Close icon</title>\n <desc id=\"closeDescID\">A line drawing of an X</desc>\n <path d=\"m29.1923882 10.8076118c.5857864.5857865.5857864 1.535534 0 2.1213204l-7.0711162 7.0703398 7.0711162 7.0717958c.5857864.5857864.5857864 1.5355339 0 2.1213204-.5857865.5857864-1.535534.5857864-2.1213204 0l-7.0717958-7.0711162-7.0703398 7.0711162c-.5857864.5857864-1.5355339.5857864-2.1213204 0-.5857864-.5857865-.5857864-1.535534 0-2.1213204l7.0706602-7.0717958-7.0706602-7.0703398c-.5857864-.5857864-.5857864-1.5355339 0-2.1213204.5857865-.5857864 1.535534-.5857864 2.1213204 0l7.0703398 7.0706602 7.0717958-7.0706602c.5857864-.5857864 1.5355339-.5857864 2.1213204 0z\" class=\"fill-color\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import { html } from 'lit';\n\nexport default html`\n<svg\n class=\"ia-logo\"\n viewBox=\"0 0 27 30\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"logoTitleID logoDescID\"\n>\n <title id=\"logoTitleID\">Internet Archive logo</title>\n <desc id=\"logoDescID\">A line drawing of the Internet Archive headquarters building façade.</desc>\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <mask id=\"mask-2\" class=\"fill-color\">\n <path d=\"M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z\" id=\"path-1\"></path>\n </mask>\n <use class=\"fill-color\" xlink:href=\"#path-1\"></use>\n <g mask=\"url(#mask-2)\" class=\"fill-color\">\n <path d=\"M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z\" id=\"swatch\"></path>\n </g>\n </g>\n</svg>\n`;\n","import { __decorate } from \"tslib\";\r\nimport { LitElement, html, css, nothing } from 'lit';\r\nimport { property, customElement } from 'lit/decorators.js';\r\nimport '@internetarchive/ia-activity-indicator/ia-activity-indicator';\r\nimport closeIcon from '@internetarchive/icon-close/index.js';\r\nimport iaIcon from '@internetarchive/icon-ia-logo/index.js';\r\nimport { ModalConfig } from './modal-config';\r\nlet ModalTemplate = class ModalTemplate extends LitElement {\r\n constructor() {\r\n super(...arguments);\r\n /**\r\n * The ModalConfig that displayed the template\r\n *\r\n * @type {ModalConfig}\r\n * @memberof ModalTemplate\r\n */\r\n this.config = new ModalConfig();\r\n }\r\n /** @inheritdoc */\r\n render() {\r\n return html `\r\n <div class=\"modal-wrapper\">\r\n <div class=\"modal-container\">\r\n <header style=\"background-color: ${this.config.headerColor}\">\r\n ${this.config.showCloseButton ? this.closeButtonTemplate : ''}\r\n ${this.config.showHeaderLogo\r\n ? html `<div class=\"logo-icon\">${iaIcon}</div>`\r\n : nothing}\r\n ${this.config.title\r\n ? html `<h1 class=\"title\">${this.config.title}</h1>`\r\n : ''}\r\n ${this.config.subtitle\r\n ? html `<h2 class=\"subtitle\">${this.config.subtitle}</h2>`\r\n : ''}\r\n </header>\r\n <section\r\n class=\"modal-body\"\r\n style=\"background-color: ${this.config.bodyColor}\"\r\n >\r\n <div class=\"content\">\r\n <div\r\n class=\"processing-logo ${this.config.showProcessingIndicator\r\n ? ''\r\n : 'hidden'}\"\r\n >\r\n <ia-activity-indicator\r\n .mode=${this.config.processingImageMode}\r\n ></ia-activity-indicator>\r\n </div>\r\n ${this.config.headline\r\n ? html ` <h1 class=\"headline\">${this.config.headline}</h1> `\r\n : ''}\r\n ${this.config.message\r\n ? html ` <p class=\"message\">${this.config.message}</p> `\r\n : ''}\r\n\r\n <div class=\"slot-container\">\r\n <slot> </slot>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n `;\r\n }\r\n /**\r\n * Dispatch the `closeButtonPressed` event to the consumer\r\n *\r\n * @private\r\n * @memberof ModalTemplate\r\n */\r\n handleCloseButton() {\r\n const event = new Event('closeButtonPressed');\r\n this.dispatchEvent(event);\r\n }\r\n /**\r\n * The close button template\r\n *\r\n * @readonly\r\n * @private\r\n * @type {TemplateResult}\r\n * @memberof ModalTemplate\r\n */\r\n get closeButtonTemplate() {\r\n return html `\r\n <button\r\n type=\"button\"\r\n class=\"close-button\"\r\n tabindex=\"0\"\r\n @click=${this.handleCloseButton}\r\n >\r\n ${closeIcon}\r\n </button>\r\n `;\r\n }\r\n /** @inheritdoc */\r\n static get styles() {\r\n const modalLogoSize = css `var(--modalLogoSize, 6.5rem)`;\r\n const processingImageSize = css `var(--processingImageSize, 7.5rem)`;\r\n const modalCornerRadius = css `var(--modalCornerRadius, 1rem)`;\r\n const modalBorder = css `var(--modalBorder, 2px solid black)`;\r\n // if the content of the modal is too big to fit on screen, this sets the bottom margin\r\n // it's not exact, but a close estimation\r\n const modalBottomMarginCss = css `var(--modalBottomMargin, 2.5rem)`;\r\n const modalTopMarginCss = css `var(--modalTopMargin, 5rem)`;\r\n const modalHeaderBottomPaddingCss = css `var(--modalHeaderBottomPadding, 0.5em)`;\r\n const modalBottomPadding = css `var(--modalBottomPadding, 2rem)`;\r\n const scrollOffset = css `var(--modalScrollOffset, 5px)`;\r\n const titleFontSize = css `var(--modalTitleFontSize, 1.8rem)`;\r\n const subtitleFontSize = css `var(--modalSubtitleFontSize, 1.4rem)`;\r\n const headlineFontSize = css `var(--modalHeadlineFontSize, 1.6rem)`;\r\n const messageFontSize = css `var(--modalMessageFontSize, 1.4rem)`;\r\n const titleLineHeight = css `var(--modalTitleLineHeight, normal)`;\r\n const subtitleLineHeight = css `var(--modalSubtitleLineHeight, normal)`;\r\n const headlineLineHeight = css `var(--modalHeadlineLineHeight, normal)`;\r\n const messageLineHeight = css `var(--modalMessageLineHeight, normal)`;\r\n return css `\r\n .processing-logo {\r\n margin: auto;\r\n width: ${processingImageSize};\r\n height: ${processingImageSize};\r\n }\r\n\r\n .processing-logo.hidden {\r\n height: 1rem;\r\n }\r\n\r\n .processing-logo.hidden ia-activity-indicator {\r\n display: none;\r\n }\r\n\r\n .modal-wrapper {\r\n outline: none;\r\n }\r\n\r\n .modal-container {\r\n border-radius: ${modalCornerRadius};\r\n width: 100%;\r\n margin-top: ${modalTopMarginCss};\r\n }\r\n\r\n header {\r\n position: relative;\r\n background-color: #36a483;\r\n color: white;\r\n border-radius: calc(${modalCornerRadius}) calc(${modalCornerRadius}) 0 0;\r\n border: ${modalBorder};\r\n border-bottom: 0;\r\n text-align: center;\r\n padding-bottom: ${modalHeaderBottomPaddingCss};\r\n }\r\n\r\n .title {\r\n margin: 0;\r\n padding: 0;\r\n font-size: ${titleFontSize};\r\n font-weight: bold;\r\n line-height: ${titleLineHeight};\r\n }\r\n\r\n .subtitle {\r\n margin: 0;\r\n padding: 0;\r\n font-weight: normal;\r\n padding-top: 0;\r\n font-size: ${subtitleFontSize};\r\n line-height: ${subtitleLineHeight};\r\n }\r\n\r\n .modal-body {\r\n background-color: #f5f5f7;\r\n border-radius: 0 0 calc(${modalCornerRadius}) calc(${modalCornerRadius});\r\n border: ${modalBorder};\r\n border-top: 0;\r\n padding: 0 1rem calc(${modalBottomPadding} - ${scrollOffset}) 1rem;\r\n color: #333;\r\n margin-bottom: 2.5rem;\r\n min-height: 5rem;\r\n }\r\n\r\n .content {\r\n overflow-y: auto;\r\n max-height: calc(100vh - (16.5rem + ${modalBottomMarginCss}));\r\n min-height: 5rem;\r\n padding: 0 0 calc(${scrollOffset}) 0;\r\n }\r\n\r\n .headline {\r\n font-size: ${headlineFontSize};\r\n font-weight: bold;\r\n text-align: center;\r\n line-height: ${headlineLineHeight};\r\n margin: 0;\r\n padding: 0;\r\n }\r\n\r\n .message {\r\n margin: 1rem 0 0 0;\r\n text-align: center;\r\n font-size: ${messageFontSize};\r\n line-height: ${messageLineHeight};\r\n }\r\n\r\n .logo-icon {\r\n border-radius: 100%;\r\n border: 3px solid #fff;\r\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),\r\n 0 2px 2px 0 rgba(0, 0, 0, 0.08);\r\n width: ${modalLogoSize};\r\n height: ${modalLogoSize};\r\n margin: -2.9rem auto 0.5rem auto;\r\n background-color: black;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .logo-icon svg {\r\n width: calc(${modalLogoSize} * 0.65);\r\n height: calc(${modalLogoSize} * 0.65);\r\n }\r\n\r\n .logo-icon svg .fill-color {\r\n fill: white;\r\n }\r\n\r\n .logo-icon svg .stroke-color {\r\n stroke: red;\r\n }\r\n\r\n .close-button {\r\n position: absolute;\r\n right: 1.2rem;\r\n top: 1.2rem;\r\n width: 2rem;\r\n height: 2rem;\r\n border-radius: 100%;\r\n border: 0;\r\n padding: 0;\r\n cursor: pointer;\r\n background-color: white;\r\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),\r\n 0 4px 4px 0 rgba(0, 0, 0, 0.08);\r\n }\r\n\r\n .sr-only {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n }\r\n\r\n slot::slotted(.sr-only) {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n }\r\n `;\r\n }\r\n};\r\n__decorate([\r\n property({ type: Object })\r\n], ModalTemplate.prototype, \"config\", void 0);\r\nModalTemplate = __decorate([\r\n customElement('modal-template')\r\n], ModalTemplate);\r\nexport { ModalTemplate };\r\n//# sourceMappingURL=modal-template.js.map","/**\r\n * Various modes the modal can be in\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nexport var ModalManagerMode;\r\n(function (ModalManagerMode) {\r\n ModalManagerMode[\"Open\"] = \"open\";\r\n ModalManagerMode[\"Closed\"] = \"closed\";\r\n})(ModalManagerMode || (ModalManagerMode = {}));\r\n//# sourceMappingURL=modal-manager-mode.js.map","import { throttle } from 'throttle-debounce';\r\nimport { ModalManagerMode } from './modal-manager-mode';\r\n/**\r\n * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the\r\n * host that sets up environment-specific changes when the modal opens and closes.\r\n *\r\n * For instance, when the modal opens, this adds a class to the `<body>` tag for styling\r\n * and adds a `resize` listener to fix a Safari shadow root issue.\r\n *\r\n * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass\r\n * them into the `ModalManager` if this one does not work for their environment.\r\n *\r\n * @export\r\n * @class ModalManagerHostBridge\r\n * @implements {ModalManagerHostBridgeInterface}\r\n */\r\nexport class ModalManagerHostBridge {\r\n constructor(modalManager) {\r\n this.windowResizeThrottler = throttle(100, this.updateModalContainerHeight, { noLeading: false, noTrailing: false }).bind(this);\r\n this.modalManager = modalManager;\r\n }\r\n /**\r\n * Handle the mode change\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n handleModeChange(mode) {\r\n switch (mode) {\r\n case ModalManagerMode.Open:\r\n this.startResizeListener();\r\n this.stopDocumentScroll();\r\n break;\r\n case ModalManagerMode.Closed:\r\n this.stopResizeListener();\r\n this.resumeDocumentScroll();\r\n break;\r\n }\r\n }\r\n // This is a workaround for Safari. Safari does not update shadowRoot elements calculated\r\n // based on the viewport size (ie. `calc(100vh - 10px)`). It does an initial calculation correctly,\r\n // but resizing the window does not cause the calculation to update. Firefox and Chrome both handle\r\n // this correctly.\r\n // It doesn't matter what css variable you set, it is just forcing Safari to do an update.\r\n // Also note that the value has to change on each update for Safari to do the update,\r\n // ie. you can't just set a static value.\r\n updateModalContainerHeight() {\r\n this.modalManager.style.setProperty('--containerHeight', `${window.innerHeight}px`);\r\n }\r\n stopDocumentScroll() {\r\n document.body.classList.add('modal-manager-open');\r\n }\r\n resumeDocumentScroll() {\r\n document.body.classList.remove('modal-manager-open');\r\n }\r\n startResizeListener() {\r\n window.addEventListener('resize', this.windowResizeThrottler);\r\n }\r\n stopResizeListener() {\r\n window.removeEventListener('resize', this.windowResizeThrottler);\r\n }\r\n}\r\n//# sourceMappingURL=modal-manager-host-bridge.js.map","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)\n * are most useful.\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,\n * as-is, to `callback` when the throttled-function is executed.\n * @param {object} [options] - An object to configure options.\n * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds\n * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed\n * one final time after the last throttled-function call. (After the throttled-function has not been called for\n * `delay` milliseconds, the internal counter is reset).\n * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback\n * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that\n * callback will never executed if both noLeading = true and noTrailing = true.\n * @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is\n * false (at end), schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function} A new, throttled, function.\n */\nfunction throttle (delay, callback, options) {\n var _ref = options || {},\n _ref$noTrailing = _ref.noTrailing,\n noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,\n _ref$noLeading = _ref.noLeading,\n noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,\n _ref$debounceMode = _ref.debounceMode,\n debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n\n\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel(options) {\n var _ref2 = options || {},\n _ref2$upcomingOnly = _ref2.upcomingOnly,\n upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;\n\n clearExistingTimeout();\n cancelled = !upcomingOnly;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n\n function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (!noLeading && debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`\n * and noLeading != true.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n if (noLeading) {\n /*\n * In throttle mode with noLeading, if `delay` time has\n * been exceeded, update `lastExec` and schedule `callback`\n * to execute after `delay` ms.\n */\n lastExec = Date.now();\n\n if (!noTrailing) {\n timeoutID = setTimeout(debounceMode ? clear : exec, delay);\n }\n } else {\n /*\n * In throttle mode without noLeading, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n }\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n}\n\n/* eslint-disable no-undefined */\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n * @param {object} [options] - An object to configure options.\n * @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n *\n * @returns {Function} A new, debounced function.\n */\n\nfunction debounce (delay, callback, options) {\n var _ref = options || {},\n _ref$atBegin = _ref.atBegin,\n atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;\n\n return throttle(delay, callback, {\n debounceMode: atBegin !== false\n });\n}\n\nexport { debounce, throttle };\n//# sourceMappingURL=index.js.map\n","import { __awaiter, __decorate } from \"tslib\";\r\nimport { LitElement, html, css, } from 'lit';\r\nimport { property, customElement, query } from 'lit/decorators.js';\r\nimport './modal-template';\r\nimport { ModalManagerHostBridge } from './modal-manager-host-bridge';\r\nimport { ModalManagerMode } from './modal-manager-mode';\r\nlet ModalManager = class ModalManager extends LitElement {\r\n constructor() {\r\n super(...arguments);\r\n /**\r\n * The current mode of the ModalManager\r\n *\r\n * Current options are `modal` or `closed`\r\n *\r\n * @type {ModalManagerMode}\r\n * @memberof ModalManager\r\n */\r\n this.mode = ModalManagerMode.Closed;\r\n /**\r\n * Thie hostBridge handles environmental-specific interactions such as adding classes\r\n * to the body tag or event listeners needed to support the modal manager in the host environment.\r\n *\r\n * There is a default `ModalManagerHostBridge`, but consumers can override it with a custom\r\n * `ModalManagerHostBridgeInterface`\r\n *\r\n * @type {ModalManagerHostBridgeInterface}\r\n * @memberof ModalManager\r\n */\r\n this.hostBridge = new ModalManagerHostBridge(this);\r\n /**\r\n * Whether the modal should close if the user taps on the backdrop\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n this.closeOnBackdropClick = true;\r\n }\r\n /** @inheritdoc */\r\n render() {\r\n return html `\r\n <div class=\"container\">\r\n <div class=\"backdrop\" @click=${this.backdropClicked}></div>\r\n <modal-template\r\n @closeButtonPressed=${this.closeButtonPressed}\r\n tabindex=\"0\"\r\n >\r\n ${this.customModalContent}\r\n </modal-template>\r\n </div>\r\n `;\r\n }\r\n /** @inheritdoc */\r\n getMode() {\r\n return this.mode;\r\n }\r\n /** @inheritdoc */\r\n closeModal() {\r\n this.mode = ModalManagerMode.Closed;\r\n }\r\n /**\r\n * Call the userClosedModalCallback and reset it if it exists\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n callUserClosedModalCallback() {\r\n // we assign the callback to a temp var and undefine it before calling it\r\n // otherwise, we run into the potential for an infinite loop if the\r\n // callback triggers another `showModal()`, which would execute `userClosedModalCallback`\r\n const callback = this.userClosedModalCallback;\r\n this.userClosedModalCallback = undefined;\r\n if (callback)\r\n callback();\r\n }\r\n /** @inheritdoc */\r\n showModal(options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.closeOnBackdropClick = options.config.closeOnBackdropClick;\r\n this.userClosedModalCallback = options.userClosedModalCallback;\r\n this.modalTemplate.config = options.config;\r\n this.customModalContent = options.customModalContent;\r\n this.mode = ModalManagerMode.Open;\r\n yield this.modalTemplate.updateComplete;\r\n this.modalTemplate.focus();\r\n });\r\n }\r\n /** @inheritdoc */\r\n updated(changed) {\r\n /* istanbul ignore else */\r\n if (changed.has('mode')) {\r\n this.handleModeChange();\r\n }\r\n }\r\n /**\r\n * Called when the backdrop is clicked\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n backdropClicked() {\r\n if (this.closeOnBackdropClick) {\r\n this.closeModal();\r\n this.callUserClosedModalCallback();\r\n }\r\n }\r\n /**\r\n * Handle the mode change\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n handleModeChange() {\r\n this.hostBridge.handleModeChange(this.mode);\r\n this.emitModeChangeEvent();\r\n }\r\n /**\r\n * Emit a modeChange event\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n emitModeChangeEvent() {\r\n const event = new CustomEvent('modeChanged', {\r\n detail: { mode: this.mode },\r\n });\r\n this.dispatchEvent(event);\r\n }\r\n /**\r\n * Called when the modal close button is pressed. Closes the modal.\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n closeButtonPressed() {\r\n this.closeModal();\r\n this.callUserClosedModalCallback();\r\n }\r\n /** @inheritdoc */\r\n static get styles() {\r\n const modalBackdropColor = css `var(--modalBackdropColor, rgba(10, 10, 10, 0.9))`;\r\n const modalBackdropZindex = css `var(--modalBackdropZindex, 1000)`;\r\n const modalWidth = css `var(--modalWidth, 32rem)`;\r\n const modalMaxWidth = css `var(--modalMaxWidth, 95%)`;\r\n const modalZindex = css `var(--modalZindex, 2000)`;\r\n return css `\r\n .container {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n\r\n .backdrop {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n background-color: ${modalBackdropColor};\r\n width: 100%;\r\n height: 100%;\r\n z-index: ${modalBackdropZindex};\r\n }\r\n\r\n modal-template {\r\n outline: 0;\r\n position: fixed;\r\n top: 0;\r\n left: 50%;\r\n transform: translate(-50%, 0);\r\n z-index: ${modalZindex};\r\n width: ${modalWidth};\r\n max-width: ${modalMaxWidth};\r\n }\r\n `;\r\n }\r\n};\r\n__decorate([\r\n property({ type: String, reflect: true })\r\n], ModalManager.prototype, \"mode\", void 0);\r\n__decorate([\r\n property({ type: Object })\r\n], ModalManager.prototype, \"customModalContent\", void 0);\r\n__decorate([\r\n property({ type: Object })\r\n], ModalManager.prototype, \"hostBridge\", void 0);\r\n__decorate([\r\n query('modal-template')\r\n], ModalManager.prototype, \"modalTemplate\", void 0);\r\nModalManager = __decorate([\r\n customElement('modal-manager')\r\n], ModalManager);\r\nexport { ModalManager };\r\n//# sourceMappingURL=modal-manager.js.map","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"searchTitleID searchDescID\"\n>\n <title id=\"searchTitleID\">Search icon</title>\n <desc id=\"searchDescID\">Search for something.</desc>\n <path\n class=\"fill-color\"\n fill=\"none\"\n d=\"m17.0555551 41.3194459c0-12.7430552 10.3541664-23.1027772 23.0847216-23.1027772 12.7166664 0 23.0777773 10.359722 23.0777773 23.1027772 0 12.7361108-10.3611109 23.0986106-23.0777773 23.0986106-12.7305552 0-23.0847216-10.3624998-23.0847216-23.0986106zm-17.24305512 0c0 22.2916661 18.04583292 40.3472213 40.32777672 40.3472213 8.9208332 0 17.145833-2.9319449 23.8194439-7.8527776l24.1513883 24.0777771c1.2125 1.1402778 2.8430555 1.8430556 4.6374999 1.8430556 3.7444443 0 6.7805554-3.0361111 6.7805554-6.7791665 0-2.0652778-.9222222-3.9069444-2.3736111-5.1499999l-23.718055-23.7458328c4.4152777-6.4791665 7.0152776-14.3055552 7.0152776-22.7402772 0-22.2791661-18.0458328-40.34861006-40.312499-40.34861006-22.2819438 0-40.32777672 18.06944396-40.32777672 40.34861006z\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconSearch extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-search', IAIconSearch);\n\nexport default IAIconSearch;\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing, TemplateResult, noChange} from '../lit-html.js';\nimport {directive, Directive, PartInfo, PartType} from '../directive.js';\n\nconst HTML_RESULT = 1;\n\nexport class UnsafeHTMLDirective extends Directive {\n static directiveName = 'unsafeHTML';\n static resultType = HTML_RESULT;\n\n private _value: unknown = nothing;\n private _templateResult?: TemplateResult;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.CHILD) {\n throw new Error(\n `${\n (this.constructor as typeof UnsafeHTMLDirective).directiveName\n }() can only be used in child bindings`\n );\n }\n }\n\n render(value: string | typeof nothing | typeof noChange | undefined | null) {\n if (value === nothing || value == null) {\n this._templateResult = undefined;\n return (this._value = value);\n }\n if (value === noChange) {\n return value;\n }\n if (typeof value != 'string') {\n throw new Error(\n `${\n (this.constructor as typeof UnsafeHTMLDirective).directiveName\n }() called with a non-string value`\n );\n }\n if (value === this._value) {\n return this._templateResult;\n }\n this._value = value;\n const strings = [value] as unknown as TemplateStringsArray;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (strings as any).raw = strings;\n // WARNING: impersonating a TemplateResult like this is extremely\n // dangerous. Third-party directives should not do this.\n return (this._templateResult = {\n // Cast to a known set of integers that satisfy ResultType so that we\n // don't have to export ResultType and possibly encourage this pattern.\n // This property needs to remain unminified.\n ['_$litType$']: (this.constructor as typeof UnsafeHTMLDirective)\n .resultType as 1 | 2,\n strings,\n values: [],\n });\n }\n}\n\n/**\n * Renders the result as HTML, rather than text.\n *\n * The values `undefined`, `null`, and `nothing`, will all result in no content\n * (empty string) being rendered.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeHTML = directive(UnsafeHTMLDirective);\n","import { css } from 'lit';\n\n// Original SVG object for reference\n// <svg height=\"10\" viewBox=\"0 0 13 10\" width=\"13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m4.33333333 10-4.33333333-4.16666667 1.73333333-1.66666666 2.6 2.5 6.93333337-6.66666667 1.7333333 1.66666667z\" fill=\"#fff\" fill-rule=\"evenodd\"/></svg>\n\nexport default css`data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwIiB2aWV3Qm94PSIwIDAgMTMgMTAiIHdpZHRoPSIxMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNC4zMzMzMzMzMyAxMC00LjMzMzMzMzMzLTQuMTY2NjY2NjcgMS43MzMzMzMzMy0xLjY2NjY2NjY2IDIuNiAyLjUgNi45MzMzMzMzNy02LjY2NjY2NjY3IDEuNzMzMzMzMyAxLjY2NjY2NjY3eiIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+`;\n","import { css } from 'lit';\n\nexport default css`data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDAgNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgYXJpYS1sYWJlbGxlZGJ5PSJjbG9zZVRpdGxlSUQgY2xvc2VEZXNjSUQiPjxwYXRoIGQ9Ik0yOS4xOTIgMTAuODA4YTEuNSAxLjUgMCAwMTAgMi4xMkwyMi4xMjIgMjBsNy4wNyA3LjA3MmExLjUgMS41IDAgMDEtMi4xMiAyLjEyMWwtNy4wNzMtNy4wNy03LjA3IDcuMDdhMS41IDEuNSAwIDAxLTIuMTIxLTIuMTJsNy4wNy03LjA3My03LjA3LTcuMDdhMS41IDEuNSAwIDAxMi4xMi0yLjEyMUwyMCAxNy44NzhsNy4wNzItNy4wN2ExLjUgMS41IDAgMDEyLjEyMSAweiIgY2xhc3M9ImZpbGwtY29sb3IiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==`;\n","import { css } from 'lit';\n\nexport default css`\n .ia-button {\n min-height: 3rem;\n border: none;\n outline: none;\n cursor: pointer;\n color: var(--primaryTextColor);\n line-height: normal;\n border-radius: .4rem;\n text-align: center;\n vertical-align: middle;\n font-size: 1.4rem;\n display: inline-block;\n padding: .6rem 1.2rem;\n border: 1px solid transparent;\n\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n }\n\n .ia-button.link,\n .ia-button.external {\n min-height: unset;\n text-decoration: none;\n }\n\n .ia-button:disabled,\n .ia-button.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .ia-button.transparent {\n background-color: transparent;\n }\n \n .ia-button.slim {\n padding: 0;\n }\n\n .ia-button.primary {\n background-color: var(--primaryCTAFill);\n border-color: var(--primaryCTABorder);\n }\n\n .ia-button.cancel {\n background-color: var(--primaryErrorCTAFill);\n border-color: var(--primaryErrorCTABorder);\n }\n\n .ia-button.external {\n background: var(--secondaryCTAFill);\n border-color: var(--secondaryCTABorder);\n }\n`;\n","/* eslint-disable class-methods-use-this */\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { css, html, LitElement, nothing } from 'lit';\nimport '@internetarchive/ia-activity-indicator/ia-activity-indicator';\nimport checkmarkIcon from '../assets/icon_checkmark.js';\nimport closeIcon from '../assets/icon_close.js';\nimport buttonCSS from '../assets/button-base.js';\n/** @typedef {import('@/src/plugins/search/plugin.search.js').SearchInsideMatch} SearchInsideMatch */\n\nexport class IABookSearchResults extends LitElement {\n static get properties() {\n return {\n results: { type: Array },\n query: { type: String },\n queryInProgress: { type: Boolean },\n renderHeader: { type: Boolean },\n renderSearchAllFiles: { type: Boolean },\n displayResultImages: { type: Boolean },\n errorMessage: { type: String },\n };\n }\n\n constructor() {\n super();\n\n /** @type {SearchInsideMatch[]} */\n this.results = [];\n this.query = '';\n this.queryInProgress = false;\n this.renderHeader = false;\n this.renderSearchAllFields = false;\n this.displayResultImages = false;\n this.errorMessage = '';\n\n this.bindBookReaderListeners();\n }\n\n /** @inheritdoc */\n updated() {\n this.focusOnInputIfNecessary();\n }\n\n bindBookReaderListeners() {\n document.addEventListener('BookReader:SearchCallback', this.setResults.bind(this));\n }\n\n /**\n * Provide immediate input focus if there aren't any results displayed\n */\n focusOnInputIfNecessary() {\n if (this.results.length) {\n return;\n }\n const searchInput = this.shadowRoot.querySelector('input[type=\\'search\\']');\n searchInput.focus();\n }\n\n setResults({ detail }) {\n this.results = detail.results;\n }\n\n setQuery(e) {\n this.query = e.currentTarget.value;\n if (!this.query) {\n this.cancelSearch();\n }\n }\n\n performSearch(e) {\n e.preventDefault();\n const input = e.currentTarget.querySelector('input[type=\"search\"]');\n if (!input || !input.value) {\n return;\n }\n this.dispatchEvent(new CustomEvent('bookSearchInitiated', {\n bubbles: true,\n composed: true,\n detail: {\n query: this.query,\n },\n }));\n }\n\n /**\n * @param {SearchInsideMatch} match\n */\n selectResult(match) {\n this.dispatchEvent(new CustomEvent('resultSelected', {\n bubbles: true,\n composed: true,\n detail: { match },\n }));\n this.dispatchEvent(new CustomEvent('closeMenu', {\n bubbles: true,\n composed: true,\n }));\n }\n\n cancelSearch() {\n this.queryInProgress = false;\n this.dispatchSearchCanceled();\n }\n\n dispatchSearchCanceled() {\n this.dispatchEvent(new Event('bookSearchCanceled'));\n }\n\n get resultsCount() {\n const count = this.results.length;\n return count ? html`<p>(${count} result${count > 1 ? 's' : ''})</p>` : nothing;\n }\n\n get headerSection() {\n const header = html`<header>\n <h3>Search inside</h3>\n ${this.resultsCount}\n </header>`;\n return this.renderHeader ? header : nothing;\n }\n\n get searchMultipleControls() {\n const controls = html`\n <input name=\"all_files\" id=\"all_files\" type=\"checkbox\" />\n <label class=\"checkbox\" for=\"all_files\">Search all files</label>\n `;\n return this.renderSearchAllFiles ? controls : nothing;\n }\n\n get loadingIndicator() {\n return html`\n <div class=\"loading\">\n <ia-activity-indicator mode=\"processing\"></ia-activity-indicator>\n <p>Searching</p>\n <button class=\"ia-button external cancel-search\" @click=${this.cancelSearch}>Cancel</button>\n </div>\n `;\n }\n\n get resultsSet() {\n const resultsClass = this.displayResultImages ? 'show-image' : '';\n return html`\n <ul class=\"results ${resultsClass}\">\n ${this.results.map(match => html`\n <li @click=${this.selectResult.bind(this, match)}>\n ${match.cover ? html`<img src=\"${match.cover}\" />` : nothing}\n <h4>${match.title || nothing}</h4>\n <p class=\"page-num\">Page ${match.displayPageNumber}</p>\n <p>${unsafeHTML(match.html)}</p>\n </li>\n `)}\n </ul>\n `;\n }\n\n get searchForm() {\n return html`\n <form action=\"\" method=\"get\" @submit=${this.performSearch}>\n <fieldset>\n ${this.searchMultipleControls}\n <input\n type=\"search\"\n name=\"query\"\n alt=\"Search inside this book.\"\n @keyup=${this.setQuery}\n @search=${this.setQuery}\n .value=${this.query}\n />\n </fieldset>\n </form>\n `;\n }\n\n get setErrorMessage() {\n return html`\n <p class=\"error-message\">${this.errorMessage}</p>\n `;\n }\n\n get searchCTA() {\n return html`<p class=\"search-cta\"><em>Please enter text to search for</em></p>`;\n }\n\n render() {\n const showSearchCTA = (!this.queryInProgress && !this.errorMessage)\n && (!this.queryInProgress && !this.results.length);\n return html`\n ${this.headerSection}\n ${this.searchForm}\n <div class=\"results-container\">\n ${this.queryInProgress ? this.loadingIndicator : nothing}\n ${this.errorMessage ? this.setErrorMessage : nothing}\n ${this.results.length ? this.resultsSet : nothing}\n ${showSearchCTA ? this.searchCTA : nothing}\n </div>\n `;\n }\n\n static get styles() {\n const searchResultText = css`var(--searchResultText, #adaedc)`;\n const searchResultBg = css`var(--searchResultBg, #272958)`;\n const searchResultBorder = css`var(--searchResultBorder, #adaedc)`;\n const activeButtonBg = css`(--tertiaryBGColor, #333)`;\n\n const mainCSS = css`\n :host {\n display: block;\n height: 100%;\n padding: 1.5rem 1rem 2rem 0;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n mark {\n padding: 0 .2rem;\n color: ${searchResultText};\n background: ${searchResultBg};\n border: 1px solid ${searchResultBorder};\n border-radius: 2px;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 2rem;\n }\n\n header {\n display: flex;\n align-items: center;\n padding: 0 2rem 0 0;\n }\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n\n fieldset {\n padding: 0 0 1rem 0;\n border: none;\n }\n\n [type=\"checkbox\"] {\n display: none;\n }\n\n label {\n display: block;\n text-align: center;\n }\n\n label.checkbox {\n padding-bottom: .5rem;\n font-size: 1.6rem;\n line-height: 150%;\n vertical-align: middle;\n }\n\n label.checkbox:after {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n content: \"\";\n border-radius: 2px;\n }\n :checked + label.checkbox:after {\n background-image: url('${checkmarkIcon}');\n }\n\n label.checkbox[for=\"all_files\"]:after {\n background: ${activeButtonBg} 50% 50% no-repeat;\n border: 1px solid var(--primaryTextColor);\n }\n\n [type=\"search\"] {\n color: var(--primaryTextColor);\n border: 1px solid var(--primaryTextColor);\n -webkit-appearance: textfield;\n width: 100%;\n height: 3rem;\n padding: 0 1.5rem;\n box-sizing: border-box;\n font: normal 1.6rem \"Helvetica qNeue\", Helvetica, Arial, sans-serif;\n border-radius: 1.5rem;\n background: transparent;\n }\n [type=\"search\"]:focus {\n outline: none;\n }\n [type=\"search\"]::-webkit-search-cancel-button {\n width: 18px;\n height: 18px;\n -webkit-appearance: none;\n appearance: none;\n -webkit-mask: url('${closeIcon}') 0 0 no-repeat;\n mask: url('${closeIcon}') 0 0 no-repeat;\n -webkit-mask-size: 100%;\n mask-size: 100%;\n background: #fff;\n }\n\n p.page-num {\n font-weight: bold;\n padding-bottom: 0;\n }\n\n p.search-cta {\n text-align: center;\n }\n\n .results-container {\n padding-bottom: 2rem;\n }\n\n ul {\n padding: 0 0 2rem 0;\n margin: 0;\n list-style: none;\n }\n\n ul.show-image li {\n display: grid;\n }\n\n li {\n cursor: pointer;\n grid-template-columns: 30px 1fr;\n grid-gap: 0 .5rem;\n }\n\n li img {\n display: block;\n width: 100%;\n }\n\n li h4 {\n grid-column: 2 / 3;\n padding: 0 0 2rem 0;\n margin: 0;\n font-weight: normal;\n }\n\n li p {\n grid-column: 2 / 3;\n padding: 0 0 1.5rem 0;\n margin: 0;\n font-size: 1.2rem;\n }\n\n .loading {\n text-align: center;\n }\n\n .loading p {\n padding: 0 0 1rem 0;\n margin: 0;\n font-size: 1.2rem;\n }\n\n ia-activity-indicator {\n display: block;\n width: 40px;\n height: 40px;\n margin: 0 auto;\n }\n `;\n return [buttonCSS, mainCSS];\n }\n}\ncustomElements.define('ia-book-search-results', IABookSearchResults);\n","import { html, nothing } from 'lit';\nimport '@internetarchive/icon-search/icon-search';\nimport './search-results';\n/** @typedef {import('@/src/plugins/search/plugin.search.js').SearchInsideMatch} SearchInsideMatch */\n\nlet searchState = {\n query: '',\n results: [],\n resultsCount: 0,\n queryInProgress: false,\n errorMessage: '',\n};\nexport default class SearchProvider {\n constructor({\n onProviderChange,\n bookreader\n }) {\n /* search menu events */\n this.onBookSearchInitiated = this.onBookSearchInitiated.bind(this);\n /* bookreader search events */\n this.onSearchStarted = this.onSearchStarted.bind(this);\n this.onSearchRequestError = this.onSearchRequestError.bind(this);\n this.onSearchResultsClicked = this.onSearchResultsClicked.bind(this);\n this.onSearchResultsChange = this.onSearchResultsChange.bind(this);\n this.onSearchResultsCleared = this.onSearchResultsCleared.bind(this);\n this.searchCanceledInMenu = this.searchCanceledInMenu.bind(this);\n\n /* class methods */\n this.bindEventListeners = this.bindEventListeners.bind(this);\n this.getMenuDetails = this.getMenuDetails.bind(this);\n this.getComponent = this.getComponent.bind(this);\n this.updateMenu = this.updateMenu.bind(this);\n\n this.onProviderChange = onProviderChange;\n /** @type {import('@/src/BookReader.js').default} */\n this.bookreader = bookreader;\n this.icon = html`<ia-icon-search style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon-search>`;\n this.label = 'Search inside';\n this.menuDetails = this.getMenuDetails();\n this.id = 'search';\n this.component = this.getComponent();\n this.bindEventListeners();\n }\n\n getMenuDetails() {\n const { resultsCount, query, queryInProgress } = searchState;\n if (queryInProgress || !query) { return nothing; }\n const unit = resultsCount === 1 ? 'result' : 'results';\n return html`(${resultsCount} ${unit})`;\n }\n\n bindEventListeners() {\n window.addEventListener('BookReader:SearchStarted', this.onSearchStarted);\n window.addEventListener('BookReader:SearchCallback', this.onSearchResultsChange);\n window.addEventListener('BookReader:SearchCallbackEmpty', (event) => { this.onSearchRequestError(event, 'noResults'); });\n window.addEventListener('BookReader:SearchCallbackNotIndexed', (event) => { this.onSearchRequestError(event, 'notIndexed'); });\n window.addEventListener('BookReader:SearchCallbackError', (event) => { this.onSearchRequestError(event); });\n window.addEventListener('BookReader:SearchResultsCleared', () => { this.onSearchResultsCleared(); });\n window.addEventListener('BookReader:SearchCanceled', (e) => { this.onSearchCanceled(e); });\n }\n\n /**\n * Cancel search handler\n * resets `searchState`\n */\n onSearchCanceled() {\n searchState = {\n query: '',\n results: [],\n resultsCount: 0,\n queryInProgress: false,\n errorMessage: '',\n };\n const updateMenuFor = {\n searchCanceled: true\n };\n this.updateMenu(updateMenuFor);\n\n if (this.bookreader.urlPlugin) {\n this.updateSearchInUrl();\n }\n }\n\n onSearchStarted(e) {\n const { term = '', instance } = e.detail.props;\n if (instance) {\n this.bookreader = instance;\n }\n searchState.query = term;\n searchState.results = [];\n searchState.resultsCount = 0;\n searchState.queryInProgress = true;\n searchState.errorMessage = '';\n this.updateMenu();\n }\n\n onBookSearchInitiated({ detail }) {\n searchState.query = detail.query;\n this.bookreader.search(searchState.query);\n }\n\n onSearchRequestError(event, errorType = 'default') {\n const { detail: { props = {} } } = event;\n const { instance = null } = props;\n if (instance) {\n /* keep bookreader instance reference up-to-date */\n this.bookreader = instance;\n }\n const errorMessages = {\n noResults: '0 results',\n notIndexed: `This book hasn't been indexed for searching yet. We've just started indexing it,\n so search should be available soon. Please try again later. Thanks!`,\n default: 'Sorry, there was an error with your search. Please try again.',\n };\n\n const messageToShow = errorMessages[errorType] ?? errorMessages.default;\n searchState.query = instance?.searchResults?.q || '';\n searchState.results = [];\n searchState.resultsCount = 0;\n searchState.queryInProgress = false;\n searchState.errorMessage = html`<p class=\"error\">${messageToShow}</p>`;\n this.updateMenu();\n }\n\n onSearchResultsChange({ detail: { props = {} } }) {\n const { instance = null, results: searchResults = [] } = props;\n if (instance) {\n /* keep bookreader instance reference up-to-date */\n this.bookreader = instance;\n }\n const results = searchResults.matches || [];\n const resultsCount = results.length;\n const query = searchResults.q;\n const queryInProgress = false;\n searchState = { results, resultsCount, query, queryInProgress, errorMessage: '' };\n this.updateMenu();\n }\n\n searchCanceledInMenu() {\n this.bookreader?.cancelSearchRequest();\n }\n\n onSearchResultsCleared() {\n searchState = {\n query: '',\n results: [],\n resultsCount: 0,\n queryInProgress: false,\n errorMessage: '',\n };\n this.updateMenu({ openMenu: false });\n this.bookreader?.searchView?.clearSearchFieldAndResults(false);\n if (this.bookreader.urlPlugin) {\n this.updateSearchInUrl();\n }\n }\n\n /** update URL `q=<term>` query param in URL */\n updateSearchInUrl() {\n if (this.bookreader.urlPlugin) {\n this.bookreader.urlPlugin.pullFromAddressBar();\n if (searchState.query) {\n this.bookreader.urlPlugin.setUrlParam('q', searchState.query);\n } else {\n this.bookreader.urlPlugin.removeUrlParam('q');\n }\n }\n }\n\n /**\n * Relays how to update side menu given the context of a search update\n @param {{searchCanceled: boolean}} searchUpdates\n */\n updateMenu(searchUpdates = {}) {\n this.menuDetails = this.getMenuDetails();\n this.component = this.getComponent();\n this.onProviderChange(this.bookreader, searchUpdates);\n }\n\n getComponent() {\n const { query, results, queryInProgress, errorMessage } = searchState;\n return html`\n <ia-book-search-results\n .query=${query}\n .results=${results}\n .errorMessage=${errorMessage}\n ?queryInProgress=${queryInProgress}\n ?renderSearchAllFiles=${false}\n @resultSelected=${this.onSearchResultsClicked}\n @bookSearchInitiated=${this.onBookSearchInitiated}\n @bookSearchResultsCleared=${this.onSearchResultsCleared}\n @bookSearchCanceled=${this.searchCanceledInMenu}\n ></ia-book-search-results>\n `;\n }\n\n /**\n * @param {{ detail: {match: SearchInsideMatch} }} param0\n */\n onSearchResultsClicked({ detail }) {\n this.bookreader._searchPluginGoToResult(detail.match.matchIndex);\n }\n}\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"downloadTitleID downloadDescID\"\n>\n <title id=\"downloadTitleID\">Download icon</title>\n <desc id=\"downloadDescID\">An arrow pointing downward at an empty document tray</desc>\n <g class=\"fill-color\">\n\n <path d=\"m50 80 33.3333333-43.3333333h-20v-36.6666667h-26.6666666v36.6666667h-20zm50 20v-13.3333333h-100v13.3333333z\"/>\n </g>\n</svg>\n`;\n","import { css, LitElement } from 'lit';\nimport icon from './index.js';\n\nclass IAIconDl extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-dl', IAIconDl);\n\nexport default IAIconDl;\n","import { css, html, LitElement, nothing } from 'lit';\nimport buttonStyles from '../assets/button-base.js';\nexport class IABookDownloads extends LitElement {\n static get properties() {\n return {\n downloads: { type: Array },\n expiration: { type: Number },\n renderHeader: { type: Boolean },\n isBookProtected: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.downloads = [];\n this.expiration = 0;\n this.renderHeader = false;\n this.isBookProtected = false;\n }\n\n get formatsCount() {\n const count = this.downloads.length;\n return count ? html`<p>${count} format${count > 1 ? 's' : ''}</p>` : html``;\n }\n\n get loanExpiryMessage() {\n return this.expiration\n ? html`<h2>These files will expire in ${this.expiration} days.</h2>`\n : html``;\n }\n\n renderDownloadOptions() {\n return this.downloads.map(option => (\n html`\n <li>\n <a class=\"ia-button link primary\" href=\"${option.url}\">Get ${option.type}</a>\n ${option.note ? html`<p>${option.note}</p>` : html``}\n </li>\n `\n ));\n }\n\n /**\n * checks if downloads list contains an LCP option\n * @return {boolean}\n */\n get hasLCPOption() {\n const regex = /^(LCP)/g;\n const lcpAvailable = this.downloads.some(option => option.type?.match(regex));\n return lcpAvailable;\n }\n\n get header() {\n if (!this.renderHeader) {\n return nothing;\n }\n return html`\n <header>\n <h3>Downloadable files</h3>\n ${this.formatsCount}\n </header>\n `;\n }\n\n get accessProtectedBook() {\n return html`\n <p>To access downloaded books, you need Adobe-compliant software on your device. The Internet Archive will administer this loan, but Adobe may also collect some information.</p>\n <a class=\"ia-button external primary\" href=\"https://www.adobe.com/solutions/ebook/digital-editions/download.html\" rel=\"noopener noreferrer\" target=\"_blank\">Install Adobe Digital Editions</a>\n `;\n }\n\n get installSimplyEAldikoThoriumMsg() {\n return html`\n <p>For LCP downloads, make sure you have SimplyE or Aldiko Next installed on mobile or Thorium on desktop.</p>\n <ul>\n <li><a href=\"https://librarysimplified.org/simplye/\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Install SimplyE</a></li>\n <li><a href=\"https://www.demarque.com/en-aldiko\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Install Aldiko</a></li>\n <li><a href=\"https://www.edrlab.org/software/thorium-reader/\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Install Thorium</a></li>\n </ul>\n `;\n }\n\n render() {\n return html`\n ${this.header}\n ${this.loanExpiryMessage}\n <ul>${this.renderDownloadOptions()}</ul>\n ${this.hasLCPOption\n ? this.installSimplyEAldikoThoriumMsg\n : (this.isBookProtected ? this.accessProtectedBook : nothing)\n }\n `;\n }\n\n static get styles() {\n const mainCss = css`\n :host {\n display: block;\n height: 100%;\n padding: 1.5rem 0;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n a.close ia-icon {\n --iconWidth: 18px;\n --iconHeight: 18px;\n }\n a.close {\n justify-self: end;\n }\n\n header {\n display: flex;\n align-items: center;\n padding: 0 2rem;\n }\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n header div {\n display: flex;\n align-items: baseline;\n } \n\n h2 {\n font-size: 1.6rem;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.4rem;\n }\n\n ul {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n p {\n margin: .3rem 0 0 0;\n }\n\n li,\n ul + p {\n padding-bottom: 1.2rem;\n font-size: 1.2rem;\n line-height: 140%;\n }\n `;\n\n return [buttonStyles, mainCss];\n }\n}\ncustomElements.define('ia-book-downloads', IABookDownloads);\n","import { html } from 'lit';\nimport '@internetarchive/icon-dl/icon-dl';\nimport './downloads';\n\nconst menuBase = {\n pdf: {\n type: 'Encrypted Adobe PDF',\n url: '#',\n note: 'PDF files contain high quality images of pages.',\n },\n lcppdf: {\n type: 'Get LCP PDF',\n url: '#',\n note: 'PDF files contain high quality images of pages.',\n },\n lcpepub: {\n type: 'Get LCP ePub',\n url: '#',\n note: 'ePub files are smaller in size, but may contain errors.',\n },\n epub: {\n type: 'Encrypted Adobe ePub',\n url: '#',\n note: 'ePub files are smaller in size, but may contain errors.',\n },\n};\n\nconst publicMenuBase = {\n pdf: \"PDF\",\n epub: \"ePub\",\n lcppdf: \"LCP PDF\",\n lcpepub: \"LCP ePub\",\n};\n\nexport default class DownloadsProvider {\n\n constructor({ bookreader }) {\n this.icon = html`<ia-icon-dl style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon-dl>`;\n this.label = 'Downloadable files';\n this.menuDetails = '';\n this.downloads = [];\n this.id = 'downloads';\n this.component = '';\n this.isBookProtected = bookreader?.options?.isProtected || false;\n }\n\n update(downloadTypes) {\n this.computeAvailableTypes(downloadTypes);\n this.component = this.menu;\n this.component.isBookProtected = this.isBookProtected;\n\n const ending = this.downloads.length === 1 ? '' : 's';\n this.menuDetails = `(${this.downloads.length} format${ending})`;\n }\n\n /**\n * Generates Download Menu Info for available types\n * sets global `downloads`\n * @param availableTypes\n */\n computeAvailableTypes(availableTypes = []) {\n const menuData = availableTypes.reduce((found, incoming = []) => {\n const [ type = '', link = '' ] = incoming;\n const formattedType = type.toLowerCase();\n const downloadOption = menuBase[formattedType] || null;\n\n if (downloadOption) {\n const menuButtonText = this.isBookProtected ? menuBase[formattedType].type : publicMenuBase[formattedType];\n const menuInfo = Object.assign({}, downloadOption, { url: link, type: menuButtonText});\n found.push(menuInfo);\n }\n return found;\n }, []);\n\n this.downloads = menuData;\n }\n\n get menu () {\n return html`<ia-book-downloads .downloads=${this.downloads}></ia-book-downloads>`;\n }\n}\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"visualAdjustmentTitleID visualAdjustmentDescID\"\n>\n <title id=\"visualAdjustmentTitleID\">Visual adjustment</title>\n <desc id=\"visualAdjustmentDescID\">A circle with its left hemisphere filled</desc>\n <path class=\"fill-color\" d=\"m12 0c6.627417 0 12 5.372583 12 12s-5.372583 12-12 12-12-5.372583-12-12 5.372583-12 12-12zm0 2v20l.2664041-.0034797c5.399703-.1412166 9.7335959-4.562751 9.7335959-9.9965203 0-5.5228475-4.4771525-10-10-10z\" fill-rule=\"evenodd\" />\n</svg>\n`;\n","import { css, LitElement } from 'lit';\nimport icon from './index.js';\n\nclass IAIconVisualAdjustment extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-visual-adjustment', IAIconVisualAdjustment);\n\nexport default IAIconVisualAdjustment;\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"magnify-minusTitleID magnify-minusDescID\"\n>\n <title id=\"magnify-minusTitleID\">Zoom out</title>\n <desc id=\"magnify-minusDescID\">Take a look further.</desc>\n <g\n class=\"fill-color\"\n fill=\"none\"\n fill-rule=\"nonzero\"\n >\n <path d=\"m2.3239824 87.3815869 25.8938394-23.8143095c-4.5929593-6.6937643-6.889439-14.1059452-6.889439-22.2365428 0-7.1360431 1.7567382-13.7186647 5.2702146-19.7478649 3.5134763-6.0292002 8.2852035-10.8003118 14.3151815-14.31333499 6.029978-3.51302314 12.6134488-5.26953471 19.7504125-5.26953471s13.7204346 1.75651157 19.7504126 5.26953471c6.029978 3.51302319 10.8017051 8.28413479 14.3151815 14.31333499 3.5134763 6.0292002 5.2702145 12.6118218 5.2702145 19.7478649s-1.7567382 13.7324143-5.2702145 19.7891137c-3.5134764 6.0566994-8.2852035 10.8415607-14.3151815 14.3545838-6.029978 3.5130232-12.6134489 5.2695347-19.7504126 5.2695347-8.5762743 0-16.3217363-2.5723212-23.2363861-7.7169637l-26.3063807 24.2302349c-1.27200216 1.1618413-2.76631826 1.742762-4.48294825 1.742762-1.826641 0-3.38971397-.6496687-4.68921892-1.949006s-1.94925743-2.8622087-1.94925743-4.688614c0-1.9364022.7746608-3.5955208 2.3239824-4.9773557zm58.3436469-19.9162976c7.1919692 0 13.3331041-2.5585716 18.4234048-7.6757149s7.635451-11.2712357 7.635451-18.4622772-2.5451503-13.3313843-7.635451-18.4210284-11.2314356-7.6344661-18.4234048-7.6344661-13.3331042 2.544822-18.4234049 7.6344661-7.635451 11.2299869-7.635451 18.4210284 2.5451503 13.3451339 7.635451 18.4622772 11.2314357 7.6757149 18.4234049 7.6757149zm-14.9374313-21.3256316h31.2878163v-9.5422233h-31.2878163z\"/>\n </g>\n</svg>\n`;\n","import { css, LitElement } from 'lit';\nimport icon from './index.js';\n\nclass IAIconMagnifyMinus extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-magnify-minus', IAIconMagnifyMinus);\n\nexport default IAIconMagnifyMinus;\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"magnify-plusTitleID magnify-plusDescID\"\n>\n <title id=\"magnify-plusTitleID\">Zoom in</title>\n <desc id=\"magnify-plusDescID\">Take a look closer.</desc>\n <g\n class=\"fill-color\"\n fill=\"none\"\n fill-rule=\"nonzero\"\n >\n <path d=\"m2.40305276 87.4017263 25.81133064-23.7730295c-4.5356618-6.5723551-6.8034928-14.000283-6.8034928-22.2837838 0-7.1236734 1.7429868-13.6948847 5.2289603-19.7136338 3.4859736-6.0187491 8.2577006-10.7953163 14.3151813-14.32970144 6.0574806-3.53438517 12.6547027-5.30157776 19.7916662-5.30157776 10.8429591 0 20.0964884 3.85236545 27.760588 11.5570964 7.6640996 7.7047309 11.4950036 16.9684802 11.4927136 27.791248 0 10.8799585-3.8309059 20.1574336-11.4927136 27.8324254-7.6618077 7.6749917-16.915337 11.5124876-27.760588 11.5124876-8.6312796 0-16.431747-2.5678624-23.4014021-7.7035871l-26.1413636 24.188234c-1.21699671 1.2147305-2.73881553 1.8220957-4.56545649 1.8220957s-3.3897139-.6485425-4.68921882-1.9456276c-1.29950493-1.297085-1.94925739-2.8572473-1.94925739-4.6804867 0-1.8781426.80216353-3.5343852 2.4064906-4.9687279zm58.34020784-19.878343c7.1369635 0 13.264347-2.5678623 18.3821503-7.7035871 5.1178034-5.1357247 7.676705-11.2928753 7.676705-18.4714518s-2.5589016-13.3082755-7.676705-18.3890972c-5.1178033-5.0808217-11.2451868-7.6212325-18.3821503-7.6212325-7.2469746 0-13.4156121 2.5404108-18.5059127 7.6212325s-7.6354509 11.2105207-7.6354509 18.3890972 2.5589016 13.3357271 7.676705 18.4714518c5.1178033 5.1357248 11.2726895 7.7035871 18.4646586 7.7035871zm-13.3594607-21.8685793h10.206958v10.1879511h7.2194718v-10.1879511h10.206958v-7.206028h-10.206958v-10.187951h-7.2194718v10.187951h-10.206958z\"/>\n </g>\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconMagnifyPlus extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-magnify-plus', IAIconMagnifyPlus);\n\nexport default IAIconMagnifyPlus;\n","import { css, html, LitElement } from \"lit\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport { nothing } from \"lit\";\nimport checkmarkIcon from '../assets/icon_checkmark.js';\nimport \"@internetarchive/icon-magnify-minus/icon-magnify-minus\";\nimport \"@internetarchive/icon-magnify-plus/icon-magnify-plus\";\n\nconst namespacedEvent = (eventName) => `visualAdjustment${eventName}`;\n\nconst events = {\n optionChange: namespacedEvent(\"OptionChanged\"),\n zoomIn: namespacedEvent(\"ZoomIn\"),\n zoomOut: namespacedEvent(\"ZoomOut\"),\n};\n\nexport class IABookVisualAdjustments extends LitElement {\n static get properties() {\n return {\n activeCount: { type: Number },\n options: { type: Array },\n renderHeader: { type: Boolean },\n showZoomControls: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n\n this.activeCount = 0;\n this.options = [];\n this.renderHeader = false;\n this.showZoomControls = true;\n }\n\n firstUpdated() {\n this.activeCount = this.activeOptions.length;\n this.emitOptionChangedEvent();\n }\n\n /** Gets list of active options\n * @return array\n */\n get activeOptions() {\n return this.options.reduce(\n (results, option) => (option.active ? [...results, option.id] : results),\n []\n );\n }\n\n /**\n * Returns blob that will be emitted by event\n */\n prepareEventDetails(changedOptionId = \"\") {\n return {\n options: this.options,\n activeCount: this.activeCount,\n changedOptionId,\n };\n }\n\n /**\n * Fires custom event when options change\n * Provides state details: { options, activeCount, changedOptionId }\n *\n * @param { string } changedOptionId\n */\n emitOptionChangedEvent(changedOptionId = \"\") {\n const detail = this.prepareEventDetails(changedOptionId);\n this.dispatchEvent(\n new CustomEvent(events.optionChange, {\n bubbles: true,\n composed: true,\n detail,\n })\n );\n }\n\n emitZoomIn() {\n this.dispatchEvent(new CustomEvent(events.zoomIn));\n }\n\n emitZoomOut() {\n this.dispatchEvent(new CustomEvent(events.zoomOut));\n }\n\n /**\n * Updates adjustment & component state\n * updates params of available ajdustment options list\n * updates active adjustment count\n * triggers custom event\n * @param { string } optionName\n */\n changeActiveStateFor(optionName) {\n const updatedOptions = [...this.options];\n const checkedOption = updatedOptions.find(\n (option) => option.id === optionName\n );\n checkedOption.active = !checkedOption.active;\n this.options = updatedOptions;\n this.activeCount = this.activeOptions.length;\n this.emitOptionChangedEvent(checkedOption.id);\n }\n\n setRangeValue(id, value) {\n const updatedOptions = [...this.options];\n updatedOptions.find((o) => o.id === id).value = value;\n this.options = [...updatedOptions];\n }\n\n /* render */\n rangeSlider(option) {\n return html`\n <div class=${`range${option.active ? \" visible\" : \"\"}`}>\n <input\n type=\"range\"\n name=\"${option.id}_range\"\n min=${option.min || 0}\n max=${option.max || 100}\n step=${option.step || 1}\n .value=${option.value}\n @input=${(e) => this.setRangeValue(option.id, e.target.value)}\n @change=${() => this.emitOptionChangedEvent()}\n />\n <p>${option.value}%</p>\n </div>\n `;\n }\n\n adjustmentCheckbox(option) {\n const formID = `adjustment_${option.id}`;\n return html`<li>\n <label for=\"${formID}\">\n <span class=\"name\">${option.name}</span>\n <input\n type=\"checkbox\"\n name=\"${formID}\"\n id=\"${formID}\"\n @change=${() => this.changeActiveStateFor(option.id)}\n ?checked=${option.active}\n />\n <span class=\"icon\"></span>\n </label>\n ${option.value !== undefined ? this.rangeSlider(option) : nothing}\n </li>`;\n }\n\n get headerSection() {\n const activeAdjustments = this.activeCount\n ? html`<p>(${this.activeCount} active)</p>`\n : nothing;\n const header = html`<header>\n <h3>Visual adjustments</h3>\n ${activeAdjustments}\n </header>`;\n return this.renderHeader ? header : nothing;\n }\n\n get zoomControls() {\n return html`\n <h4>Zoom</h4>\n <button class=\"zoom_out\" @click=${this.emitZoomOut} title=\"zoom out\">\n <ia-icon-magnify-minus></ia-icon-magnify-minus>\n </button>\n <button class=\"zoom_in\" @click=${this.emitZoomIn} title=\"zoom in\">\n <ia-icon-magnify-plus></ia-icon-magnify-plus>\n </button>\n `;\n }\n\n /** @inheritdoc */\n render() {\n return html`\n ${this.headerSection}\n <ul>\n ${repeat(this.options, (option) => option.id, this.adjustmentCheckbox.bind(this))}\n </ul>\n ${this.showZoomControls ? this.zoomControls : nothing}\n `;\n }\n\n static get styles() {\n return css`\n :host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n header {\n display: flex;\n align-items: baseline;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.6rem;\n }\n\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n\n ul {\n padding: 1rem 2rem 0 0;\n list-style: none;\n margin-top: 0;\n }\n\n [type=\"checkbox\"] {\n display: none;\n }\n\n label {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n font-size: 1.4rem;\n font-weight: bold;\n line-height: 150%;\n vertical-align: middle;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n :checked + .icon {\n background-image: url('${checkmarkIcon}');\n }\n\n .range {\n display: none;\n padding-top: .5rem;\n }\n .range.visible {\n display: flex;\n }\n\n .range p {\n margin-left: 1rem;\n }\n\n h4 {\n padding: 1rem 0;\n margin: 0;\n font-size: 1.4rem;\n }\n\n button {\n -webkit-appearance: none;\n appearance: none;\n border: none;\n border-radius: 0;\n background: transparent;\n outline: none;\n cursor: pointer;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n height: 4rem;\n width: 4rem;\n }\n\n button * {\n display: inline-block;\n }`;\n }\n}\ncustomElements.define('ia-book-visual-adjustments', IABookVisualAdjustments);\n","import { html } from 'lit';\nimport '@internetarchive/icon-visual-adjustment/icon-visual-adjustment';\nimport './visual-adjustments';\n\nconst visualAdjustmentOptions = [{\n id: 'brightness',\n name: 'Adjust brightness',\n active: false,\n min: 0,\n max: 150,\n step: 1,\n value: 100,\n}, {\n id: 'contrast',\n name: 'Adjust contrast',\n active: false,\n min: 0,\n max: 150,\n step: 1,\n value: 100,\n}, {\n id: 'invert',\n name: 'Inverted colors (dark mode)',\n active: false,\n}, {\n id: 'grayscale',\n name: 'Grayscale',\n active: false,\n}];\n\nexport default class VisualAdjustmentsProvider {\n constructor(options) {\n const { onProviderChange, bookreader } = options;\n this.onProviderChange = onProviderChange;\n this.bookContainer = bookreader.refs.$brContainer;\n this.bookreader = bookreader;\n\n this.onAdjustmentChange = this.onAdjustmentChange.bind(this);\n this.optionUpdateComplete = this.optionUpdateComplete.bind(this);\n this.updateOptionsCount = this.updateOptionsCount.bind(this);\n this.onZoomIn = this.onZoomIn.bind(this);\n this.onZoomOut = this.onZoomOut.bind(this);\n\n this.activeCount = 0;\n this.icon = html`<ia-icon-visual-adjustment style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon-visual-adjustment>`;\n this.label = 'Visual Adjustments';\n this.menuDetails = this.updateOptionsCount();\n this.id = 'adjustment';\n this.component = html`\n <ia-book-visual-adjustments\n .options=${visualAdjustmentOptions}\n @visualAdjustmentOptionChanged=${this.onAdjustmentChange}\n @visualAdjustmentZoomIn=${this.onZoomIn}\n @visualAdjustmentZoomOut=${this.onZoomOut}\n ></ia-book-visual-adjustments>\n `;\n }\n\n onZoomIn() {\n this.bookreader.zoom(1);\n }\n\n onZoomOut() {\n this.bookreader.zoom(-1);\n }\n\n onAdjustmentChange(event) {\n const { detail } = event;\n const adjustments = {\n brightness: (value) => `brightness(${value}%)`,\n contrast: (value) => `contrast(${value}%)`,\n grayscale: () => 'grayscale(100%)',\n invert: () => 'invert(100%)',\n };\n const filters = detail.options.reduce((values, option) => {\n const newValue = `${option.active ? adjustments[option.id](option.value) : ''}`;\n return newValue ? [...values, newValue] : values;\n }, []).join(' ');\n\n this.bookContainer.css('filter', filters);\n\n this.optionUpdateComplete(event);\n }\n\n optionUpdateComplete(event) {\n this.activeCount = event.detail.activeCount;\n this.updateOptionsCount(event);\n this.onProviderChange();\n }\n\n updateOptionsCount() {\n this.menuDetails = `(${this.activeCount} active)`;\n }\n}\n","import { LitElement, html, css } from 'lit';\n\nexport default class DeleteModalActions extends LitElement {\n static get styles() {\n return css`\n div {\n display: flex;\n justify-content: center;\n padding-top: 2rem;\n }\n\n button {\n appearance: none;\n padding: 0.5rem 1rem;\n margin: 0 .5rem;\n box-sizing: border-box;\n font: 1.3rem \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n color: var(--primaryTextColor);\n border: none;\n border-radius: 4px;\n cursor: pointer;\n background: var(--primaryCTAFill);\n }\n\n .delete {\n background: var(--primaryErrorCTAFill);\n }\n `;\n }\n\n static get properties() {\n return {\n cancelAction: { type: Function },\n deleteAction: { type: Function },\n pageID: { type: String },\n };\n }\n\n render() {\n return html`\n <div>\n <button class=\"delete\" @click=${() => this.deleteAction({ detail: { id: `${this.pageID}` } })}>Delete</button>\n <button @click=${() => this.cancelAction()}>Cancel</button>\n </div>\n `;\n }\n}\n\ncustomElements.define('delete-modal-actions', DeleteModalActions);\n","import { LitElement, html, css } from 'lit';\n\nexport default class BookmarkButton extends LitElement {\n static get styles() {\n return css`\n button {\n -webkit-appearance: none;\n appearance: none;\n outline: 0;\n border: none;\n padding: 0;\n height: 4rem;\n width: 4rem;\n background: transparent;\n cursor: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 16 24' width='16'%3E%3Cg fill='%23333' fill-rule='evenodd'%3E%3Cpath d='m15 0c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1zm-2 2h-10c-.51283584 0-.93550716.38604019-.99327227.88337887l-.00672773.11662113v18l6-4.3181818 6 4.3181818v-18c0-.51283584-.3860402-.93550716-.8833789-.99327227z'/%3E%3Cpath d='m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z' fill-rule='nonzero'/%3E%3C/g%3E%3C/svg%3E\"), pointer;\n position: relative;\n }\n button > * {\n display: block;\n position: absolute;\n top: 0.2rem;\n }\n button.left > * {\n left: 0.2rem;\n }\n\n button.right > * {\n right: 0.2rem;\n }\n `;\n }\n\n static get properties() {\n return {\n side: { type: String },\n state: { type: String },\n };\n }\n\n constructor() {\n super();\n this.state = 'hollow';\n this.side = undefined;\n }\n\n handleClick(e) {\n e.preventDefault();\n this.dispatchEvent(new CustomEvent('bookmarkButtonClicked'));\n }\n\n get title() {\n return `${this.state === 'hollow' ? 'Add' : 'Remove'} bookmark`;\n }\n\n render() {\n const position = this.side || 'right';\n return html`\n <button title=${this.title} @click=${this.handleClick} class=${position}>\n <icon-bookmark state=${this.state}></icon-bookmark>\n </button>\n `;\n }\n}\n\ncustomElements.define('bookmark-button', BookmarkButton);\n","import { LitElement, html } from 'lit';\nimport buttonStyles from '../assets/button-base.js';\n\nclass BookmarksLogin extends LitElement {\n static get properties() {\n return {\n url: { type: String }\n };\n }\n\n static get styles() {\n return buttonStyles;\n }\n\n constructor() {\n super();\n this.url = 'https://archive.org/account/login';\n }\n render() {\n\n return html`\n <p>A free account is required to save and access bookmarks.</p>\n <a class=\"ia-button link primary\" href=\"${this.url}\">Log in</a>\n `;\n }\n}\n\ncustomElements.define('bookmarks-login', BookmarksLogin);\n","import { LitElement, html, css, render } from 'lit';\n// eslint-disable-next-line no-unused-vars\nimport { ModalConfig, ModalManager } from '@internetarchive/modal-manager';\nimport buttonStyles from '../assets/button-base.js';\nimport './bookmarks-loginCTA.js';\n\nconst api = {\n endpoint: '/services/bookmarks.php',\n headers: {\n 'Content-Type': 'application/json',\n },\n delete(page) {\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${page}`, {\n credentials: 'same-origin',\n method: 'DELETE',\n headers: this.headers,\n });\n },\n get(page) {\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${page}`, {\n credentials: 'same-origin',\n method: 'GET',\n headers: this.headers,\n });\n },\n getAll() {\n return fetch(`${this.endpoint}?identifier=${this.identifier}`, {\n credentials: 'same-origin',\n method: 'GET',\n headers: this.headers,\n });\n },\n post(bookmark) {\n return this.sendBookmarkData(bookmark, 'POST');\n },\n put(bookmark) {\n return this.sendBookmarkData(bookmark, 'POST');\n },\n sendBookmarkData(bookmark, method) {\n const notes = {\n note: bookmark.note,\n color: bookmark.color,\n };\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${bookmark.id}`, {\n credentials: 'same-origin',\n method,\n headers: this.headers,\n body: JSON.stringify({\n notes,\n }),\n });\n },\n};\n\nclass IABookmarks extends LitElement {\n static get properties() {\n return {\n activeBookmarkID: { type: String },\n bookmarks: { type: Array },\n bookreader: { type: Object },\n displayMode: { type: String },\n editedBookmark: { type: Object },\n deleteModalConfig: { type: Object},\n modal: { attribute: false },\n loginOptions: { type: Object, attribute: false }\n };\n }\n\n static get styles() {\n const mainCss = css`\n .bookmarks {\n height: 100%;\n overflow: hidden;\n padding-bottom: 20px;\n }\n\n .list ia-bookmark-edit {\n display: none;\n }\n\n .edit ia-bookmarks-list {\n display: none;\n }\n `;\n\n return [buttonStyles, mainCss];\n }\n\n static formatPage(page) {\n return isNaN(+page) ? `(${page.replace(/\\D/g, '')})` : page;\n }\n\n constructor() {\n super();\n this.bookmarks = [];\n this.bookreader = {};\n this.editedBookmark = {};\n /** @type {ModalManager} */\n this.modal = undefined;\n this.loginOptions = {\n loginClicked: () => {},\n loginUrl: '',\n };\n /**\n * Toggles display to either bookmarks or login cta\n * @param {('bookmarks'|'login')} displayMode\n */\n this.displayMode = 'bookmarks';\n\n this.bookmarkColors = [{\n id: 0,\n className: 'red',\n }, {\n id: 1,\n className: 'blue',\n }, {\n id: 2,\n className: 'green',\n }];\n\n // eslint-disable-next-line\n this.defaultColor = this.bookmarkColors[0];\n this.api = api;\n this.deleteModalConfig = new ModalConfig({\n title: 'Delete Bookmark',\n headline: 'This bookmark contains a note. Deleting it will permanently delete the note. Are you sure?',\n headerColor: '#194880',\n });\n }\n\n updated(changed) {\n if (changed.has('displayMode')) {\n this.updateDisplay();\n }\n\n this.emitBookmarksChanged();\n }\n\n setup() {\n this.api.identifier = this.getIdentifier();\n if (this.displayMode === 'login') {\n return;\n }\n this.fetchUserBookmarks();\n this.setBREventListeners();\n }\n\n /**\n * get identifier for current book including sub-files\n *\n * @returns Identifer\n */\n getIdentifier() {\n if (this.bookreader.bookId !== this.bookreader.subPrefix) {\n return `${this.bookreader.bookId}/${this.bookreader.subPrefix}`;\n }\n\n return this.bookreader.bookId;\n }\n\n updateDisplay() {\n if (this.displayMode === 'bookmarks') {\n this.fetchUserBookmarks();\n }\n }\n\n async fetchUserBookmarks() {\n if (!this.api.identifier) {\n return;\n }\n await this.fetchBookmarks();\n this.initializeBookmarks();\n }\n\n setBREventListeners() {\n ['3PageViewSelected'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, (e) => {\n setTimeout(() => {\n // wait a lil bit so bookreader can draw its DOM to attach onto\n this.renderBookmarkButtons();\n }, 100);\n });\n });\n ['pageChanged', '1PageViewSelected', '2PageViewSelected'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, (e) => {\n setTimeout(() => {\n // wait a lil bit so bookreader can draw its DOM to attach onto\n this.renderBookmarkButtons();\n this.markActiveBookmark();\n }, 100);\n });\n });\n ['zoomOut', 'zoomIn', 'resize'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, () => {\n this.renderBookmarkButtons();\n });\n });\n }\n\n initializeBookmarks() {\n this.renderBookmarkButtons();\n this.markActiveBookmark(true);\n this.emitBookmarksChanged();\n }\n\n /**\n * @typedef {object} Bookmark\n * @property {number} id - bookreader page index, becomes key store\n * @property {number} color - color number\n * @property {string} page - bookmark's page label to display\n * @property {string} note - optional, note that one can add\n * @property {string} thumbnail - optional, image url\n */\n /**\n * Formats bookmark view model\n * @param {Object} bookmarkAttrs\n * @param {number} bookmarkAttrs.leafNum\n * @param {string} bookmarkAttrs.notes\n *\n * @returns Bookmark\n */\n formatBookmark({ leafNum = '', notes = {} }) {\n const { note = '', color } = notes;\n const nomalizedParams = {\n note,\n color: this.getBookmarkColor(color) ? color : this.defaultColor.id,\n };\n\n const page = IABookmarks.formatPage(this.bookreader.book.getPageNum(leafNum));\n const thumbnail = this.bookreader.book.getPageURI(`${leafNum}`.replace(/\\D/g, ''), 32); // Request thumbnail 1/32 the size of original image\n const bookmark = {\n ...nomalizedParams,\n id: leafNum,\n leafNum,\n page,\n thumbnail,\n };\n\n return bookmark;\n }\n\n async fetchBookmarks() {\n const resText = await this.api.getAll().then(r=> r.text());\n let parsedResponse;\n try {\n parsedResponse = JSON.parse(resText);\n } catch (e) {\n parsedResponse = {error : e.message};\n }\n\n const {\n success,\n error = 'Something happened while fetching bookmarks.',\n value: bkmrks = [],\n } = parsedResponse;\n\n if (!success) {\n console?.warn('Error fetching bookmarks', error);\n }\n\n const bookmarks = {};\n Object.keys(bkmrks).forEach((leafNum) => {\n const bookmark = bkmrks[leafNum];\n const formattedLeafNum = parseInt(leafNum, 10);\n const formattedBookmark = this.formatBookmark({ ...bookmark, leafNum: formattedLeafNum });\n bookmarks[leafNum] = formattedBookmark;\n });\n\n this.bookmarks = bookmarks;\n return bookmarks;\n }\n\n emitBookmarksChanged() {\n this.dispatchEvent(new CustomEvent('bookmarksChanged', {\n bubbles: true,\n composed: true,\n detail: {\n bookmarks: this.bookmarks,\n },\n }));\n }\n\n emitBookmarkButtonClicked() {\n this.dispatchEvent(new CustomEvent('bookmarkButtonClicked', {\n bubbles: true,\n composed: true,\n detail: {\n editedBookmark: this.editedBookmark,\n },\n }));\n }\n\n bookmarkButtonClicked(pageID) {\n if (this.getBookmark(pageID)) {\n this.confirmDeletion(pageID);\n } else {\n this.createBookmark(pageID);\n }\n }\n\n renderBookmarkButtons() {\n const pages = this.bookreader.$('.BRpagecontainer').not('.BRemptypage').get();\n\n pages.forEach((pageEl) => {\n const existingButton = pageEl.querySelector('.bookmark-button');\n if (existingButton) {\n existingButton.remove();\n }\n const pageID = +pageEl.classList.value.match(/pagediv\\d+/)[0].replace(/\\D/g, '');\n const pageBookmark = this.getBookmark(pageID);\n const bookmarkState = pageBookmark ? 'filled' : 'hollow';\n // eslint-disable-next-line\n const pageData = this.bookreader.book.getPage(pageID);\n const { isViewable } = pageData;\n\n if (!isViewable) { return; }\n\n const bookmarkButton = document.createElement('div');\n ['mousedown', 'mouseup'].forEach((event) => {\n bookmarkButton.addEventListener(event, (e) => e.stopPropagation());\n });\n bookmarkButton.classList.add('bookmark-button', bookmarkState);\n if (pageBookmark) {\n bookmarkButton.classList.add(this.getBookmarkColor(pageBookmark.color));\n }\n const pageSide = (pageEl.getAttribute('data-side') === 'L' && this.bookreader.mode === this.bookreader.constMode2up)\n ? 'left' : 'right';\n\n render(html`\n <bookmark-button\n @bookmarkButtonClicked=${() => this.bookmarkButtonClicked(pageID)}\n state=${bookmarkState}\n side=${pageSide}\n ></bookmark-button>`, bookmarkButton);\n pageEl.appendChild(bookmarkButton);\n });\n }\n\n /**\n * Notes which bookmark is active\n *\n * @param {boolean} atSetup - denotes the first time this is fired\n */\n markActiveBookmark(atSetup = false) {\n const { mode, constMode2up, constModeThumb } = this.bookreader;\n const currentIndex = this.bookreader.currentIndex();\n\n if (mode === constModeThumb) {\n // keep active bookmark the same\n // no syncing until we can verify when a bookmark is \"in view\"\n const requestedPageHasBookmark = this.bookmarks[currentIndex];\n if (atSetup && requestedPageHasBookmark) {\n this.activeBookmarkID = currentIndex;\n }\n return;\n }\n // In 2up, we prefer the right side of the page to bookmark\n // so let's make sure we light that one up.\n if (mode === constMode2up) {\n const pagesInView = this.bookreader.displayedIndices;\n const pagesHaveActiveBookmark = pagesInView.includes(+this.activeBookmarkID);\n if (pagesHaveActiveBookmark) {\n return;\n }\n }\n\n // If a bookmark exists with the current index, set it as active\n if (this.bookmarks[currentIndex]) {\n this.activeBookmarkID = currentIndex;\n return;\n }\n\n // No bookmark for this page\n this.activeBookmarkID = '';\n }\n\n bookmarkEdited({ detail }) {\n const closeEdit = detail.bookmark.id === this.editedBookmark.id;\n this.editedBookmark = closeEdit ? {} : detail.bookmark;\n }\n\n /**\n * Gets bookmark by pageindex\n * @param {number} id\n */\n getBookmark(id) {\n return this.bookmarks[id];\n }\n\n getBookmarkColor(id) {\n return this.bookmarkColors.find((m) => m.id === id)?.className;\n }\n\n /**\n * Adds bookmark for current page\n */\n addBookmark() {\n let pageID = this.bookreader.currentIndex();\n if (this.bookreader.mode === this.bookreader.constMode2up) {\n const pagesInView = this.bookreader.displayedIndices;\n\n // add bookmark to right hand page\n pageID = pagesInView[pagesInView.length - 1];\n }\n this.createBookmark(pageID);\n }\n\n /**\n * Creates bookmark for a given page\n * @param {number} pageID\n */\n createBookmark(pageID) {\n const existingBookmark = this.getBookmark(pageID);\n if (existingBookmark) {\n this.bookmarkEdited({ detail: { bookmark: existingBookmark } });\n this.emitBookmarkButtonClicked();\n return;\n }\n\n this.editedBookmark = this.formatBookmark({ leafNum: pageID });\n\n this.api.post(this.editedBookmark);\n\n this.bookmarks[pageID] = this.editedBookmark;\n this.activeBookmarkID = pageID;\n this.disableAddBookmarkButton = true;\n this.renderBookmarkButtons();\n this.emitBookmarkButtonClicked();\n }\n\n bookmarkSelected({ detail }) {\n const { leafNum } = detail.bookmark;\n this.bookreader.jumpToPage(`${this.bookreader.book.getPageNum(`${leafNum}`.replace(/\\D/g, ''))}`);\n this.activeBookmarkID = leafNum;\n }\n\n saveBookmark({ detail }) {\n const existingBookmark = this.bookmarks[detail.bookmark.id];\n Object.assign(existingBookmark, detail.bookmark);\n this.api.put(existingBookmark);\n this.editedBookmark = {};\n this.renderBookmarkButtons();\n }\n\n confirmDeletion(pageID) {\n const existingBookmark = this.getBookmark(pageID);\n if (existingBookmark.note) {\n this.displayDeletionModal(pageID);\n return;\n }\n this.deleteBookmark({ detail: { id: `${pageID}` } });\n }\n\n displayDeletionModal(pageID) {\n const customModalContent = html`\n <delete-modal-actions\n .deleteAction=${() => this.deleteBookmark({ detail: { id: `${pageID}` } })}\n .cancelAction=${() => this.modal.closeModal()}\n .pageID=${pageID}\n ></delete-modal-actions>\n `;\n\n\n this.modal.showModal({\n config: this.deleteModalConfig,\n customModalContent,\n });\n }\n\n deleteBookmark({ detail }) {\n const { id } = detail;\n const currBookmarks = this.bookmarks;\n delete currBookmarks[id];\n this.bookmarks = { ...currBookmarks };\n\n this.api.delete(detail.id);\n this.editedBookmark = {};\n this.modal.closeModal();\n this.renderBookmarkButtons();\n }\n\n /**\n * Tells us if we should allow user to add bookmark via menu panel\n * returns { Boolean }\n */\n get shouldEnableAddBookmarkButton() {\n const pageToCheck = this.bookreader.mode === this.bookreader.constMode2up\n ? this.bookreader.displayedIndices[this.bookreader.displayedIndices.length - 1]\n : this.bookreader.currentIndex();\n const pageHasBookmark = this.getBookmark(pageToCheck);\n return !!pageHasBookmark;\n }\n\n\n get allowAddingBookmark() {\n return this.bookreader.mode !== this.bookreader.constModeThumb;\n }\n\n get addBookmarkButton() {\n return html`\n <button\n class=\"ia-button primary\"\n tabindex=\"-1\"\n ?disabled=${this.shouldEnableAddBookmarkButton}\n @click=${this.addBookmark}>\n Add bookmark\n </button>\n `;\n }\n\n get bookmarksList() {\n return html`\n <ia-bookmarks-list\n @bookmarkEdited=${this.bookmarkEdited}\n @bookmarkSelected=${this.bookmarkSelected}\n @saveBookmark=${this.saveBookmark}\n @deleteBookmark=${this.deleteBookmark}\n .editedBookmark=${this.editedBookmark}\n .bookmarks=${{ ...this.bookmarks }}\n .activeBookmarkID=${this.activeBookmarkID}\n .bookmarkColors=${this.bookmarkColors}\n .defaultBookmarkColor=${this.defaultColor}>\n </ia-bookmarks-list>\n `;\n }\n\n get bookmarkHelperMessage() {\n return html`<p>Please use 1up or 2up view modes to add bookmark.</p>`;\n }\n\n render() {\n const bookmarks = html`\n ${this.bookmarksList}\n ${this.allowAddingBookmark ? this.addBookmarkButton : this.bookmarkHelperMessage}\n `;\n return html`\n <section class=\"bookmarks\">\n ${ this.displayMode === 'login'\n ? html`<bookmarks-login\n @click=${() => this.loginOptions.loginClicked()}\n .url=${this.loginOptions.loginUrl}></bookmarks-login>`\n : bookmarks\n }\n </section>\n `;\n }\n}\n\ncustomElements.define('ia-bookmarks', IABookmarks);\n","import { css } from 'lit';\n\nexport default css`\n .blue {\n --iconFillColor: var(--blueBookmarkColor, #0023f5);\n }\n\n .red {\n --iconFillColor: var(--redBookmarkColor, #eb3223);\n }\n\n .green {\n --iconFillColor: var(--greenBookmarkColor, #75ef4c);\n }\n`;\n","import { repeat } from 'lit/directives/repeat.js';\nimport { css, html, LitElement, nothing } from 'lit';\nimport bookmarkColorsCSS from '../assets/bookmark-colors.js';\nimport buttonCSS from '../assets/button-base.js';\n\nexport class IABookmarkEdit extends LitElement {\n static get properties() {\n return {\n bookmark: { type: Object },\n bookmarkColors: { type: Array },\n renderHeader: { type: Boolean },\n showBookmark: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.bookmark = {};\n this.bookmarkColors = [];\n this.renderHeader = false;\n this.showBookmark = true;\n }\n\n emitSaveEvent(e) {\n e.preventDefault();\n this.dispatchEvent(new CustomEvent('saveBookmark', {\n detail: {\n bookmark: this.bookmark,\n },\n }));\n }\n\n emitDeleteEvent() {\n this.dispatchEvent(new CustomEvent('deleteBookmark', {\n detail: {\n id: this.bookmark.id,\n },\n }));\n }\n\n emitColorChangedEvent(colorId) {\n this.dispatchEvent(new CustomEvent('bookmarkColorChanged', {\n detail: {\n bookmarkId: this.bookmark.id,\n colorId,\n },\n }));\n }\n\n changeColorTo(id) {\n this.bookmark.color = id;\n this.emitColorChangedEvent(id);\n }\n\n updateNote(e) {\n this.bookmark.note = e.currentTarget.value;\n }\n\n static get headerSection() {\n return html`<header>\n <h3>Edit Bookmark</h3>\n </header>`;\n }\n\n bookmarkColor(color) {\n return html`\n <li>\n <input type=\"radio\" name=\"color\" id=\"color_${color.id}\" .value=${color.id} @change=${() => this.changeColorTo(color.id)} ?checked=${this.bookmark.color === color.id}>\n <label for=\"color_${color.id}\">\n <icon-bookmark class=${color.className}></icon-bookmark>\n </label>\n </li>\n `;\n }\n\n get bookmarkTemplate() {\n return html`\n <div class=\"bookmark\">\n <img src=${this.bookmark.thumbnail} />\n <h4>Page ${this.bookmark.page}</h4>\n </div>\n `;\n }\n\n render() {\n return html`\n ${this.renderHeader ? IABookmarkEdit.headerSection : nothing}\n ${this.showBookmark ? this.bookmarkTemplate : nothing}\n <form action=\"\" method=\"put\" @submit=${this.emitSaveEvent}>\n <fieldset>\n <label for=\"note\">Note <small>(optional)</small></label>\n <textarea rows=\"4\" cols=\"80\" name=\"note\" id=\"note\" @change=${this.updateNote}>${this.bookmark.note}</textarea>\n <label for=\"color\">Bookmark color</label>\n <ul>\n ${repeat(this.bookmarkColors, color => color.id, this.bookmarkColor.bind(this))}\n </ul>\n <div class=\"actions\">\n <button type=\"button\" class=\"ia-button cancel\" @click=${this.emitDeleteEvent}>Delete</button>\n <input class=\"ia-button\" type=\"submit\" value=\"Save\">\n </div>\n </fieldset>\n </form>\n `;\n }\n\n static get styles() {\n const bookmarkEditCSS = css`\n :host {\n display: block;\n padding: 0 1rem 2rem 1rem;\n color: var(--primaryTextColor);\n }\n\n small {\n font-style: italic;\n }\n\n .bookmark {\n display: grid;\n grid-template-columns: 37px 1fr;\n grid-gap: 0 1rem;\n align-items: center;\n }\n\n h4 {\n margin: 0;\n font-size: 1.4rem;\n }\n\n fieldset {\n padding: 2rem 0 0 0;\n border: none;\n }\n\n label {\n display: block;\n font-weight: bold;\n }\n\n p {\n padding: 0;\n margin: .5rem 0;\n font-size: 1.2rem;\n line-height: 120%;\n }\n\n textarea {\n width: 100%;\n margin-bottom: 2rem;\n box-sizing: border-box;\n font: normal 1.4rem \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n resize: vertical;\n }\n\n ul {\n display: grid;\n grid-template-columns: repeat(3, auto);\n grid-gap: 0 2rem;\n justify-content: start;\n padding: 1rem 0 0 0;\n margin: 0 0 2rem 0;\n list-style: none;\n }\n\n li input {\n display: none;\n }\n\n li label {\n display: block;\n min-width: 50px;\n padding-top: .4rem;\n text-align: center;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n }\n\n li input:checked + label {\n border-color: var(--primaryTextColor);\n }\n\n input[type=\"submit\"] {\n background: var(--primaryCTAFill);\n border-color: var(--primaryCTABorder);\n }\n\n button {\n background: var(--primaryErrorCTAFill);\n border-color: var(--primaryErrorCTABorder);\n }\n\n .button {\n -webkit-appearance: none;\n appearance: none;\n padding: .5rem 1rem;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n border: none;\n border-radius: 4px;\n cursor: pointer;\n }\n\n .actions {\n display: grid;\n grid-template-columns: auto auto;\n grid-gap: 0 1rem;\n justify-items: stretch;\n }\n `;\n return [buttonCSS, bookmarkColorsCSS, bookmarkEditCSS];\n }\n}\ncustomElements.define('ia-bookmark-edit', IABookmarkEdit);\n","import { html } from 'lit';\n\nexport default html`\n<svg height=\"20\" viewBox=\"0 0 20 20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"editPencilTitleID editPencilDescID\"><title id=\"editPencilTitleID\">Pencil icon</title><desc id=\"editPencilDescID\">An illustration of a pencil, used to represent an edit action</desc><path class=\"fill-color\" d=\"m15.6111048 9.3708338-9.52237183 9.5222966-5.14363353 1.0897111c-.42296707.0896082-.83849202-.1806298-.92810097-.6035935-.02266463-.1069795-.02266463-.2175207 0-.3245001l1.08971974-5.1435929 9.52237189-9.52229656zm-10.89310224 5.9110366-2.78094924-.5403869-.67567462 3.166657.83033407.8303275 3.16668096-.6756703zm14.82724244-12.05935921c.6114418.61143705.6055516 1.6086709-.0131615 2.22737904l-2.2405581 2.24054036-4.9820147-4.98197536 2.2405581-2.24054036c.618713-.61870814 1.6159506-.62460252 2.2273925-.01316547z\" fill-rule=\"evenodd\"/></svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconEditPencil extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-edit-pencil', IAIconEditPencil);\n\nexport default IAIconEditPencil;\n","import { repeat } from 'lit/directives/repeat.js';\nimport { css, html, LitElement, nothing } from 'lit';\nimport './bookmark-edit.js';\nimport '@internetarchive/icon-edit-pencil/icon-edit-pencil.js';\nimport bookmarkColorsCSS from '../assets/bookmark-colors.js';\n\nexport class IABookmarksList extends LitElement {\n static get properties() {\n return {\n activeBookmarkID: { type: Number },\n bookmarkColors: { type: Array },\n defaultBookmarkColor: { type: Object },\n bookmarks: { type: Object },\n editedBookmark: { type: Object },\n renderHeader: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.activeBookmarkID = undefined;\n this.bookmarkColors = [];\n this.defaultBookmarkColor = {};\n this.bookmarks = {};\n this.editedBookmark = {};\n this.renderHeader = false;\n }\n\n emitEditEvent(e, bookmark) {\n this.dispatchEvent(new CustomEvent('bookmarkEdited', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitSelectedEvent(bookmark) {\n this.activeBookmarkID = bookmark.id;\n this.dispatchEvent(new CustomEvent('bookmarkSelected', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitSaveBookmark(bookmark) {\n this.dispatchEvent(new CustomEvent('saveBookmark', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitDeleteBookmark(id) {\n this.dispatchEvent(new CustomEvent('deleteBookmark', {\n detail: {\n id,\n },\n }));\n }\n\n emitBookmarkColorChanged({ detail }) {\n const { bookmarkId, colorId } = detail;\n this.dispatchEvent(new CustomEvent('bookmarkColorChanged', {\n detail: {\n bookmarkId,\n colorId,\n },\n }));\n }\n\n emitAddBookmark() {\n this.dispatchEvent(new CustomEvent('addBookmark'));\n }\n\n editBookmark(e, bookmark) {\n this.emitEditEvent(e, bookmark);\n this.editedBookmark = this.editedBookmark === bookmark ? {} : bookmark;\n }\n\n saveBookmark({ detail }) {\n const { bookmark } = detail;\n this.editedBookmark = {};\n this.emitSaveBookmark(bookmark);\n }\n\n deleteBookmark({ detail }) {\n const { id } = detail;\n this.editedBookmark = {};\n this.emitDeleteBookmark(id);\n }\n\n bookmarkColorInfo(colorVal = 0) {\n return this.bookmarkColors.find(labelInfo => labelInfo?.id === colorVal);\n }\n\n bookmarkItem(bookmark) {\n const editMode = this.editedBookmark.id === bookmark.id;\n const { className } = this.bookmarkColorInfo(bookmark.color);\n const activeClass = bookmark.id === this.activeBookmarkID ? 'active' : '';\n return html`\n <li\n @click=${() => this.emitSelectedEvent(bookmark)}\n tabindex=\"0\"\n data-pageIndex=${bookmark.id}\n >\n <div class=\"separator\"></div>\n <div class=\"content ${activeClass}\">\n <button\n class=\"edit\"\n @click=${e => this.editBookmark(e, bookmark)}\n title=\"Edit this bookmark\"\n >\n <ia-icon-edit-pencil></ia-icon-edit-pencil>\n </button>\n <h4>\n <icon-bookmark class=${className}></icon-bookmark>\n <span> Page ${bookmark.page}</span>\n </h4>\n ${!editMode && bookmark.note ? html`<p>${bookmark.note}</p>` : nothing}\n ${editMode ? this.editBookmarkComponent : nothing}\n </div>\n </li>\n `;\n }\n\n get editBookmarkComponent() {\n const showBookmark = false;\n return html`\n <ia-bookmark-edit\n .bookmark=${this.editedBookmark}\n .bookmarkColors=${this.bookmarkColors}\n .defaultBookmarkColor=${this.defaultBookmarkColor}\n .showBookmark=${showBookmark}\n @saveBookmark=${this.saveBookmark}\n @deleteBookmark=${this.deleteBookmark}\n @bookmarkColorChanged=${this.emitBookmarkColorChanged}\n ></ia-bookmark-edit>\n `;\n }\n\n sortBookmarks() {\n const sortedKeys = Object.keys(this.bookmarks).sort((a, b) => {\n if (+a > +b) { return 1; }\n if (+a < +b) { return -1; }\n return 0;\n });\n const sortedBookmarks = sortedKeys.map(key => this.bookmarks[key]);\n return sortedBookmarks;\n }\n\n get bookmarksCount() {\n const count = this.bookmarks.length;\n return html`<small>(${count})</small>`;\n }\n\n get headerSection() {\n return html`<header>\n <h3>\n Bookmarks\n ${this.bookmarks.length ? this.bookmarksCount : nothing}\n </h3>\n </header>`;\n }\n\n get bookmarkslist() {\n const sortedBookmarks = this.sortBookmarks();\n const bookmarks = repeat(sortedBookmarks, bookmark => bookmark?.id, this.bookmarkItem.bind(this));\n return html`\n <ul>\n ${bookmarks}\n <div class=\"separator\"></div>\n </ul>\n `;\n }\n\n render() {\n return html`\n ${this.renderHeader ? this.headerSection : nothing}\n ${Object.keys(this.bookmarks).length ? this.bookmarkslist : nothing}\n `;\n }\n\n static get styles() {\n const main = css`\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n icon-bookmark {\n width: 16px;\n height: 24px;\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n small {\n font-style: italic;\n }\n\n h4 {\n margin: 0;\n font-size: 1.4rem;\n }\n h4 * {\n display: inline-block;\n }\n h4 icon-bookmark {\n vertical-align: bottom;\n }\n h4 span {\n vertical-align: top;\n padding-top: 1%;\n }\n\n p {\n padding: 0;\n margin: 5px 0 0 0;\n width: 98%;\n overflow-wrap: break-word;\n }\n\n ia-bookmark-edit {\n margin: 5px 5px 3px 6px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n ul > li:first-child .separator {\n display: none;\n }\n li {\n cursor: pointer;\n outline: none;\n position: relative;\n }\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: .2rem 0 .4rem .2rem;\n }\n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n li button.edit {\n padding: 5px 2px 0 0;\n background: transparent;\n cursor: pointer;\n height: 40px;\n width: 40px;\n position: absolute;\n right: 2px;\n top: 2px;\n text-align: right;\n -webkit-appearance: none;\n appearance: none;\n outline: none;\n box-sizing: border-box;\n border: none;\n }\n li button.edit > * {\n display: block;\n height: 100%;\n width: 100%;\n }\n `;\n\n return [main, bookmarkColorsCSS];\n }\n}\ncustomElements.define('ia-bookmarks-list', IABookmarksList);\n","import { html, css, LitElement } from 'lit';\n\nclass IAIconBookmark extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n #hollow,\n #plus,\n #minus {\n display: none;\n }\n\n .hollow #filled,\n .plus #filled,\n .minus #filled {\n display: none;\n }\n\n .hollow #hollow,\n .plus #hollow,\n .minus #hollow {\n display: block;\n }\n\n .plus #plus {\n display: block;\n }\n\n .minus #minus {\n display: block;\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n static get properties() {\n return {\n state: { type: String },\n };\n }\n\n render() {\n return html`\n <div class=${this.state}>\n <svg\n height=\"24\"\n viewBox=\"0 0 16 24\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"bookmarkTitleID bookmarDescID\"\n >\n <title id=\"bookmarkTitleID\">Bookmark icon</title>\n <desc id=\"bookmarkDescID\">An outline of the shape of a bookmark</desc>\n <path\n id=\"filled\"\n d=\"m1 0h14c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1z\"\n class=\"fill-color\"\n fill-rule=\"evenodd\"\n />\n <g class=\"fill-color\" fill-rule=\"evenodd\">\n <path\n id=\"hollow\"\n d=\"m15 0c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1zm-2 2h-10c-.51283584 0-.93550716.38604019-.99327227.88337887l-.00672773.11662113v18l6-4.3181818 6 4.3181818v-18c0-.51283584-.3860402-.93550716-.8833789-.99327227z\"\n />\n <path\n id=\"plus\"\n d=\"m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z\"\n fill-rule=\"nonzero\"\n />\n <path id=\"minus\" d=\"m11 8.25v1.5h-6v-1.5z\" fill-rule=\"nonzero\" />\n </g>\n </svg>\n </div>\n `;\n }\n}\n\nexport { IAIconBookmark };\n","import { IAIconBookmark } from './src/icon-bookmark.js';\n\nwindow.customElements.define('icon-bookmark', IAIconBookmark);\n","import { html } from 'lit';\nimport '../delete-modal-actions.js';\nimport './bookmark-button.js';\nimport './ia-bookmarks.js';\n\nimport './bookmark-edit.js';\nimport './bookmarks-list.js';\nimport '@internetarchive/icon-bookmark';\n\n\nexport default class BookmarksProvider {\n constructor(options) {\n const {\n baseHost,\n signedIn,\n bookreader,\n modal,\n onProviderChange,\n } = options;\n\n const referrerStr = `referer=${encodeURIComponent(location.href)}`;\n const loginUrl = `https://${baseHost}/account/login?${referrerStr}`;\n\n this.component = document.createElement('ia-bookmarks');\n this.component.bookreader = bookreader;\n this.component.displayMode = signedIn ? 'bookmarks' : 'login';\n this.component.modal = modal;\n this.component.loginOptions = {\n loginClicked: this.bookmarksLoginClicked,\n loginUrl\n };\n this.bindEvents();\n\n this.icon = html`<icon-bookmark state=\"hollow\" style=\"--iconWidth: 16px; --iconHeight: 24px;\"></icon-bookmark>`;\n this.label = 'Bookmarks';\n this.id = 'bookmarks';\n this.onProviderChange = onProviderChange;\n this.component.setup();\n this.updateMenu(this.component.bookmarks.length);\n }\n\n updateMenu(count) {\n this.menuDetails = `(${count})`;\n }\n\n bindEvents() {\n this.component.addEventListener('bookmarksChanged', this.bookmarksChanged.bind(this));\n }\n\n bookmarksChanged({ detail }) {\n const bookmarksLength = Object.keys(detail.bookmarks).length;\n this.updateMenu(bookmarksLength);\n this.onProviderChange(detail.bookmarks, detail.showSidePanel);\n }\n\n bookmarksLoginClicked() {\n window.archive_analytics?.send_event_no_sampling(\n 'BookReader',\n `BookmarksLogin`,\n window.location.path,\n );\n }\n}\n","import { html } from 'lit';\nimport { iauxShareIcon } from '@internetarchive/ia-item-navigator/dist/src/menus/share-panel';\nimport '@internetarchive/ia-item-navigator/dist/src/menus/share-panel';\n\nexport default class SharingProvider {\n constructor({\n item,\n baseHost,\n bookreader\n }) {\n const { identifier, creator, title } = item?.metadata;\n const creatorToUse = Array.isArray(creator) ? creator[0] : creator;\n const subPrefix = bookreader.options.subPrefix || '';\n const label = `Share this book`;\n this.icon = html`${iauxShareIcon}`;\n this.label = label;\n this.id = 'share';\n this.component = html`<iaux-in-share-panel\n .identifier=${identifier}\n .type=${`book`}\n .creator=${creatorToUse}\n .description=${title}\n .baseHost=${baseHost}\n .fileSubPrefix=${subPrefix}\n ></iaux-in-share-panel>`;\n }\n}\n","import { html } from 'lit';\n\nimport { viewableFilesIcon } from '@internetarchive/ia-item-navigator/dist/src/menus/viewable-files';\nimport '@internetarchive/ia-item-navigator/dist/src/menus/viewable-files';\n\n/**\n * * @typedef { 'title_asc' | 'title_desc' | 'default'} SortTypesT\n */\nconst sortTypes = {\n title_asc: 'title_asc',\n title_desc: 'title_desc',\n default: 'default'\n};\nexport default class ViewableFilesProvider {\n /**\n * @param {import('../BookReader').default} bookreader\n */\n constructor({ baseHost, bookreader, onProviderChange }) {\n /** @type {import('../BookReader').default} */\n this.bookreader = bookreader;\n this.onProviderChange = onProviderChange;\n this.baseHost = baseHost;\n\n const files = bookreader.options.multipleBooksList.by_subprefix;\n this.viewableFiles = Object.keys(files).map(item => files[item]);\n this.volumeCount = Object.keys(files).length;\n\n this.id = \"volumes\";\n this.label = `Viewable files (${this.volumeCount})`;\n this.icon = html`${viewableFilesIcon}`;\n this.sortOrderBy = sortTypes.default;\n\n this.component = document.createElement(\"iaux-in-viewable-files-panel\");\n this.component.addSortToUrl = true;\n this.component.subPrefix = bookreader.options.subPrefix || \"\";\n this.component.baseHost = baseHost;\n this.component.fileList = [...this.viewableFiles];\n\n this.sortFilesComponent = document.createElement(\"iaux-in-sort-files-button\");\n this.sortFilesComponent.fileListRaw = this.viewableFiles;\n this.sortFilesComponent.addEventListener('fileListSorted', (e) => this.handleFileListSorted(e));\n this.actionButton = this.sortFilesComponent;\n\n // get sort state from query param\n if (this.bookreader.urlPlugin) {\n this.bookreader.urlPlugin.pullFromAddressBar();\n\n const urlSortValue = this.bookreader.urlPlugin.getUrlParam('sort');\n if (urlSortValue === sortTypes.title_asc || urlSortValue === sortTypes.title_desc) {\n this.sortOrderBy = urlSortValue;\n }\n }\n\n this.sortFilesComponent.sortVolumes(this.sortOrderBy);\n\n this.onProviderChange(this.bookreader);\n }\n\n /** @param { SortTypesT } sortType */\n async handleFileListSorted(event) {\n const { sortType, sortedFiles } = event.detail;\n\n this.viewableFiles = sortedFiles;\n this.sortOrderBy = sortType;\n\n // update the component\n this.component.fileList = [...this.viewableFiles];\n await this.component.updateComplete;\n\n if (this.bookreader.urlPlugin) {\n this.bookreader.urlPlugin.pullFromAddressBar();\n if (this.sortOrderBy !== sortTypes.default) {\n this.bookreader.urlPlugin.setUrlParam('sort', this.sortOrderBy);\n } else {\n this.bookreader.urlPlugin.removeUrlParam('sort');\n }\n }\n\n this.onProviderChange(this.bookreader);\n\n this.multipleFilesClicked(this.sortOrderBy);\n }\n\n /**\n * @param { SortTypesT } orderBy\n */\n multipleFilesClicked(orderBy) {\n window.archive_analytics?.send_event(\n 'BookReader',\n `VolumesSort|${orderBy}`,\n window.location.path,\n );\n }\n\n}\n","import { svg } from 'lit';\n\nexport default svg`\n <svg class=\"ia-logo\" width=\"27\" height=\"30\" viewBox=\"0 0 27 30\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"logoTitleID logoDescID\">\n <title id=\"logoTitleID\">Internet Archive logo</title>\n <desc id=\"logoDescID\">A line drawing of the Internet Archive headquarters building façade.</desc>\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <mask id=\"mask-2\" fill=\"white\">\n <path d=\"M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z\" id=\"path-1\"></path>\n </mask>\n <use fill=\"#FFFFFF\" xlink:href=\"#path-1\"></use>\n <g mask=\"url(#mask-2)\" fill=\"#FFFFFF\">\n <path d=\"M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z\" id=\"swatch\"></path>\n </g>\n </g>\n </svg>\n`;\n","// eslint-disable-next-line no-unused-vars\nimport { SharedResizeObserver } from '@internetarchive/shared-resize-observer';\n// eslint-disable-next-line no-unused-vars\nimport { ModalManager } from '@internetarchive/modal-manager';\nimport { css, html, LitElement, nothing } from 'lit';\nimport SearchProvider from './search/search-provider.js';\nimport DownloadProvider from './downloads/downloads-provider.js';\nimport VisualAdjustmentProvider from './visual-adjustments/visual-adjustments-provider.js';\nimport BookmarksProvider from './bookmarks/bookmarks-provider.js';\nimport SharingProvider from './sharing.js';\nimport ViewableFilesProvider from './viewable-files.js';\nimport iaLogo from './assets/ia-logo.js';\n\nconst events = {\n menuUpdated: 'menuUpdated',\n updateSideMenu: 'updateSideMenu',\n PostInit: 'PostInit',\n ViewportInFullScreen: 'ViewportInFullScreen',\n};\nexport class BookNavigator extends LitElement {\n static get properties() {\n return {\n itemMD: { type: Object },\n bookReaderLoaded: { type: Boolean },\n bookreader: { type: Object },\n bookIsRestricted: { type: Boolean },\n downloadableTypes: { type: Array },\n isAdmin: { type: Boolean },\n lendingInitialized: { type: Boolean },\n lendingStatus: { type: Object },\n menuProviders: { type: Object },\n menuShortcuts: { type: Array },\n signedIn: { type: Boolean },\n loaded: { type: Boolean },\n sharedObserver: { type: Object, attribute: false },\n modal: { type: Object, attribute: false },\n fullscreenBranding: { type: Object },\n };\n }\n\n constructor() {\n super();\n this.itemMD = undefined;\n this.loaded = false;\n this.bookReaderCannotLoad = false;\n this.bookReaderLoaded = false;\n this.bookreader = null;\n this.bookIsRestricted = false;\n this.downloadableTypes = [];\n this.isAdmin = false;\n this.lendingInitialized = false;\n this.lendingStatus = {};\n this.menuProviders = {};\n this.menuShortcuts = [];\n this.signedIn = false;\n /** @type {ModalManager} */\n this.modal = undefined;\n /** @type {SharedResizeObserver} */\n this.sharedObserver = undefined;\n this.fullscreenBranding = iaLogo;\n // Untracked properties\n this.sharedObserverHandler = undefined;\n this.brWidth = 0;\n this.brHeight = 0;\n this.shortcutOrder = [\n /**\n * sets exit FS button (`this.fullscreenBranding1)\n * when `br.options.enableFSLogoShortcut`\n */\n 'fullscreen',\n 'volumes',\n 'search',\n 'bookmarks'\n ];\n }\n\n disconnectedCallback() {\n this.sharedObserver.removeObserver({\n target: this.mainBRContainer,\n handler: this.sharedObserverHandler\n });\n }\n\n firstUpdated() {\n this.bindEventListeners();\n this.emitPostInit();\n this.loaded = true;\n }\n\n updated(changed) {\n if (!this.bookreader || !this.itemMD || !this.bookReaderLoaded) {\n return;\n }\n\n const reload = changed.has('loaded') && this.loaded;\n if (reload\n || changed.has('itemMD')\n || changed.has('bookreader')\n || changed.has('signedIn')\n || changed.has('isAdmin')\n || changed.has('modal')) {\n this.initializeBookSubmenus();\n }\n\n if (changed.has('sharedObserver') && this.bookreader) {\n this.loadSharedObserver();\n this.initializeBookSubmenus();\n }\n\n if (changed.has('downloadableTypes')) {\n this.initializeBookSubmenus();\n }\n }\n\n /**\n * Global event emitter for when Book Navigator loads\n */\n emitPostInit() {\n // emit global event when book nav has loaded with current bookreader selector\n this.dispatchEvent(new CustomEvent(`BrBookNav:${events.PostInit}`, {\n detail: { brSelector: this.bookreader?.el },\n bubbles: true,\n composed: true,\n }));\n }\n\n /**\n * @typedef {{\n * baseHost: string,\n * modal: ModalManager,\n * sharedObserver: SharedResizeObserver,\n * bookreader: BookReader,\n * item: Item,\n * signedIn: boolean,\n * isAdmin: boolean,\n * onProviderChange: (BookReader, object) => void,\n * }} baseProviderConfig\n *\n * @return {baseProviderConfig}\n */\n get baseProviderConfig() {\n return {\n baseHost: this.baseHost,\n modal: this.modal,\n sharedObserver: this.sharedObserver,\n bookreader: this.bookreader,\n item: this.itemMD,\n signedIn: this.signedIn,\n isAdmin: this.isAdmin,\n onProviderChange: () => {}\n };\n }\n\n get isWideEnoughToOpenMenu() {\n return this.brWidth >= 640;\n }\n /**\n * Instantiates books submenus & their update callbacks\n *\n * NOTE: we are doing our best to scope bookreader's instance.\n * If your submenu provider uses a bookreader instance to read, manually\n * manipulate BookReader, please update the navigator's instance of it\n * to keep it in sync.\n */\n initializeBookSubmenus() {\n const providers = {\n share: new SharingProvider(this.baseProviderConfig),\n visualAdjustments: new VisualAdjustmentProvider({\n ...this.baseProviderConfig,\n /** Update menu contents */\n onProviderChange: () => {\n this.updateMenuContents();\n },\n }),\n };\n\n if (this.shouldShowDownloadsMenu()) {\n providers.downloads = new DownloadProvider(this.baseProviderConfig);\n }\n\n if (this.bookreader.options.enableSearch) {\n providers.search = new SearchProvider({\n ...this.baseProviderConfig,\n /**\n * Search specific menu updates\n * @param {BookReader} brInstance\n * @param {{ searchCanceled: boolean }} searchUpdates\n */\n onProviderChange: (brInstance = null, searchUpdates = {}) => {\n if (brInstance) {\n /* refresh br instance reference */\n this.bookreader = brInstance;\n }\n\n this.updateMenuContents();\n\n if (searchUpdates.openMenu === false) {\n return;\n }\n\n if (this.isWideEnoughToOpenMenu && !searchUpdates?.searchCanceled) {\n /* open side search menu */\n setTimeout(() => {\n this.updateSideMenu('search', 'open');\n }, 0);\n }\n },\n });\n }\n\n if (this.bookreader.options.enableBookmarks) {\n providers.bookmarks = new BookmarksProvider({\n ...this.baseProviderConfig,\n onProviderChange: (bookmarks) => {\n const method = Object.keys(bookmarks).length ? 'add' : 'remove';\n this[`${method}MenuShortcut`]('bookmarks');\n this.updateMenuContents();\n }\n });\n }\n\n // add shortcut for volumes if multipleBooksList exists\n if (this.bookreader.options.enableMultipleBooks) {\n providers.volumes = new ViewableFilesProvider({\n ...this.baseProviderConfig,\n onProviderChange: (brInstance = null, volumesUpdates = {}) => {\n if (brInstance) {\n /* refresh br instance reference */\n this.bookreader = brInstance;\n }\n this.updateMenuContents();\n if (this.isWideEnoughToOpenMenu) {\n /* open side search menu */\n setTimeout(() => {\n this.updateSideMenu('volumes', 'open');\n });\n }\n }\n });\n }\n\n Object.assign(this.menuProviders, providers);\n this.addMenuShortcut('search');\n this.addMenuShortcut('volumes');\n this.updateMenuContents();\n }\n\n /** gets element that houses the bookreader in light dom */\n get mainBRContainer() {\n return document.querySelector(this.bookreader?.el);\n }\n\n /** Fullscreen Shortcut */\n addFullscreenShortcut() {\n const closeFS = {\n icon: this.fullscreenShortcut,\n id: 'fullscreen',\n };\n this.menuShortcuts.push(closeFS);\n this.sortMenuShortcuts();\n this.emitMenuShortcutsUpdated();\n }\n\n deleteFullscreenShortcut() {\n const updatedShortcuts = this.menuShortcuts.filter(({ id }) => {\n return id !== 'fullscreen';\n });\n this.menuShortcuts = updatedShortcuts;\n this.sortMenuShortcuts();\n this.emitMenuShortcutsUpdated();\n }\n\n closeFullscreen() {\n this.bookreader.exitFullScreen();\n }\n\n get fullscreenShortcut() {\n return html`\n <button\n @click=${() => this.closeFullscreen()}\n title=\"Exit fullscreen view\"\n >${this.fullscreenBranding}</button>\n `;\n }\n /** End Fullscreen Shortcut */\n\n /**\n * Open side menu\n * @param {string} menuId\n * @param {('open'|'close'|'toggle')} action\n */\n updateSideMenu(menuId = '', action = 'open') {\n if (!menuId) {\n return;\n }\n const event = new CustomEvent(\n events.updateSideMenu, {\n detail: { menuId, action },\n },\n );\n this.dispatchEvent(event);\n }\n\n /**\n * Sets order of menu and emits custom event when done\n */\n updateMenuContents() {\n const {\n search, downloads, visualAdjustments, share, bookmarks, volumes, chapters\n } = this.menuProviders;\n const availableMenus = [volumes, chapters, search, bookmarks, visualAdjustments, share].filter((menu) => !!menu);\n\n if (this.shouldShowDownloadsMenu()) {\n downloads?.update(this.downloadableTypes);\n availableMenus.splice(1, 0, downloads);\n }\n\n const event = new CustomEvent(\n events.menuUpdated, {\n detail: availableMenus,\n },\n );\n this.dispatchEvent(event);\n }\n\n /**\n * Confirms if we should show the downloads menu\n * @returns {bool}\n */\n shouldShowDownloadsMenu() {\n if (!this.downloadableTypes.length) { return false; }\n if (this.bookIsRestricted === false) { return true; }\n if (this.isAdmin) { return true; }\n const { user_loan_record = {} } = this.lendingStatus;\n const hasNoLoanRecord = Array.isArray(user_loan_record); /* (bc PHP assoc. arrays) */\n\n if (hasNoLoanRecord) { return false; }\n\n const hasValidLoan = user_loan_record.type && (user_loan_record.type !== 'SESSION_LOAN');\n return hasValidLoan;\n }\n\n /**\n * Adds a provider object to the menuShortcuts array property if it isn't\n * already added. menuShortcuts are then sorted by shortcutOrder and\n * a menuShortcutsUpdated event is emitted.\n *\n * @param {string} menuId - a string matching the id property of a provider\n */\n addMenuShortcut(menuId) {\n if (this.menuShortcuts.find((m) => m.id === menuId)) {\n // menu is already there\n return;\n }\n\n if (!this.menuProviders[menuId]) {\n // no provider for this menu\n return;\n }\n\n this.menuShortcuts.push(this.menuProviders[menuId]);\n\n this.sortMenuShortcuts();\n this.emitMenuShortcutsUpdated();\n }\n\n /**\n * Removes a provider object from the menuShortcuts array and emits a\n * menuShortcutsUpdated event.\n *\n * @param {string} menuId - a string matching the id property of a provider\n */\n removeMenuShortcut(menuId) {\n this.menuShortcuts = this.menuShortcuts.filter((m) => m.id !== menuId);\n this.emitMenuShortcutsUpdated();\n }\n\n /**\n * Sorts the menuShortcuts property by comparing each provider's id to\n * the id in each iteration over the shortcutOrder array.\n */\n sortMenuShortcuts() {\n this.menuShortcuts = this.shortcutOrder.reduce((shortcuts, id) => {\n const menu = this.menuShortcuts.find((m) => m.id === id);\n if (menu) { shortcuts.push(menu); }\n return shortcuts;\n }, []);\n }\n\n emitMenuShortcutsUpdated() {\n const event = new CustomEvent('menuShortcutsUpdated', {\n detail: this.menuShortcuts,\n });\n this.dispatchEvent(event);\n }\n\n emitLoadingStatusUpdate(loaded) {\n const event = new CustomEvent('loadingStateUpdated', {\n detail: { loaded },\n });\n this.dispatchEvent(event);\n }\n\n /**\n * Core bookreader event handler registry\n *\n * NOTE: we are trying to keep bookreader's instance in scope\n * Please update Book Navigator's instance reference of it to keep it current\n */\n bindEventListeners() {\n window.addEventListener('BookReader:PostInit', (e) => {\n this.bookreader = e.detail.props;\n this.bookreader.shell = this;\n this.bookReaderLoaded = true;\n this.bookReaderCannotLoad = false;\n this.emitLoadingStatusUpdate(true);\n this.loadSharedObserver();\n setTimeout(() => {\n this.bookreader.resize();\n }, 0);\n });\n window.addEventListener('BookReader:fullscreenToggled', (event) => {\n const { detail: { props: brInstance = null } } = event;\n if (brInstance) {\n this.bookreader = brInstance;\n }\n this.manageFullScreenBehavior();\n }, { passive: true });\n window.addEventListener('BookReader:ToggleSearchMenu', (event) => {\n this.dispatchEvent(new CustomEvent(events.updateSideMenu, {\n detail: { menuId: 'search', action: 'toggle' },\n }));\n });\n window.addEventListener('LendingFlow:PostInit', ({ detail }) => {\n const {\n downloadTypesAvailable, lendingStatus, isAdmin, previewType,\n } = detail;\n this.lendingInitialized = true;\n this.downloadableTypes = downloadTypesAvailable;\n this.lendingStatus = lendingStatus;\n this.isAdmin = isAdmin;\n this.bookReaderCannotLoad = previewType === 'singlePagePreview';\n this.emitLoadingStatusUpdate(true);\n });\n window.addEventListener('BRJSIA:PostInit', ({ detail }) => {\n const { isRestricted, downloadURLs } = detail;\n this.bookReaderLoaded = true;\n this.downloadableTypes = downloadURLs;\n this.bookIsRestricted = isRestricted;\n });\n window.addEventListener('contextmenu', (e) => this.manageContextMenuVisibility(e), { capture: true });\n }\n\n /** Display an element's context menu */\n manageContextMenuVisibility(e) {\n window.archive_analytics?.send_event(\n 'BookReader',\n `contextmenu-${this.bookIsRestricted ? 'restricted' : 'unrestricted'}`,\n e.target?.classList?.value\n );\n if (!this.bookIsRestricted) {\n return;\n }\n\n const imagePane = e.target.classList.value.match(/BRscreen|BRpageimage/g);\n if (!imagePane) {\n return;\n }\n\n e.preventDefault();\n return false;\n }\n\n loadSharedObserver() {\n this.sharedObserverHandler = { handleResize: this.handleResize.bind(this) };\n this.sharedObserver?.addObserver({\n target: this.mainBRContainer,\n handler: this.sharedObserverHandler\n });\n }\n\n /**\n * Uses resize observer to fire BookReader's `resize` functionality\n * We do not want to trigger resize IF:\n * - book animation is happening\n * - book is in fullscreen (fullscreen is handled separately)\n *\n * @param { target: HTMLElement, contentRect: DOMRectReadOnly } entry\n */\n handleResize({ contentRect, target }) {\n const startBrWidth = this.brWidth;\n const startBrHeight = this.brHeight;\n const { animating } = this.bookreader;\n\n if (target === this.mainBRContainer) {\n this.brWidth = contentRect.width;\n this.brHeight = contentRect.height;\n }\n\n if (!startBrWidth && this.brWidth) {\n // loading up, let's update side menus\n this.initializeBookSubmenus();\n }\n\n const widthChange = startBrWidth !== this.brWidth;\n const heightChange = startBrHeight !== this.brHeight;\n\n if (!animating && (widthChange || heightChange)) {\n this.bookreader?.resize();\n }\n }\n\n /**\n * Manages Fullscreen behavior\n * This makes sure that controls are _always_ in view\n * We need this to accommodate LOAN BAR during fullscreen\n */\n manageFullScreenBehavior() {\n this.emitFullScreenState();\n\n if (!this.bookreader.options.enableFSLogoShortcut) {\n return;\n }\n\n const isFullScreen = this.bookreader.isFullscreen();\n if (isFullScreen) {\n this.addFullscreenShortcut();\n } else {\n this.deleteFullscreenShortcut();\n }\n }\n\n /**\n * Relays fullscreen toggle events\n */\n emitFullScreenState() {\n const isFullScreen = this.bookreader.isFullscreen();\n const event = new CustomEvent('ViewportInFullScreen', {\n detail: { isFullScreen },\n });\n this.dispatchEvent(event);\n }\n\n get itemImage() {\n const identifier = this.itemMD?.metadata.identifier;\n const url = `https://${this.baseHost}/services/img/${identifier}`;\n return html`<img class=\"cover-img\" src=${url} alt=\"cover image for ${identifier}\">`;\n }\n\n get placeholder() {\n return html`<div class=\"placeholder\">${this.itemImage}</div>`;\n }\n\n render() {\n return html`<div id=\"book-navigator__root\">\n ${this.bookReaderCannotLoad ? this.placeholder : nothing}\n ${!this.bookReaderCannotLoad ? html`<slot name=\"main\"></slot>` : nothing}\n </div>\n `;\n }\n\n static get styles() {\n return css`\n :host,\n #book-navigator__root,\n slot,\n slot > * {\n display: block;\n height: inherit;\n width: inherit;\n }\n .placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n margin: 5%;\n }\n .cover-img {\n max-height: 300px;\n }\n `;\n }\n}\n\ncustomElements.define('book-navigator', BookNavigator);\n","/** @inheritdoc */\nexport class SharedResizeObserver {\n constructor() {\n /**\n * This is the ResizeObserver that dispatches\n * callbacks to all of the handlers.\n *\n * @private\n * @memberof SharedResizeObserver\n */\n this.resizeObserver = new ResizeObserver(entries => {\n // This requestAnimationFrame is to throttle the refresh rate,\n // otherwise you get a bunch of\n // `ResizeObserver loop completed with undelivered notifications` errors\n // The errors are not harmful, but they happen a lot, see:\n // https://stackoverflow.com/a/58701523\n // https://github.com/souporserious/react-measure/issues/104\n // https://github.com/WICG/resize-observer/issues/38\n window.requestAnimationFrame(() => {\n for (const entry of entries) {\n const handlers = this.resizeHandlers.get(entry.target);\n handlers === null || handlers === void 0 ? void 0 : handlers.forEach(handler => {\n handler.handleResize(entry);\n });\n }\n });\n });\n /**\n * A map of all of the observed elements and their resize handlers\n *\n * @private\n * @type {Map<\n * Element,\n * Set<SharedResizeObserverResizeHandlerInterface>\n * >}\n * @memberof SharedResizeObserver\n */\n this.resizeHandlers = new Map();\n }\n /** @inheritdoc */\n shutdown() {\n this.resizeHandlers.forEach((handlers, target) => {\n this.resizeObserver.unobserve(target);\n });\n this.resizeHandlers.clear();\n }\n /** @inheritdoc */\n addObserver(options) {\n var _a;\n const handlers = (_a = this.resizeHandlers.get(options.target)) !== null && _a !== void 0 ? _a : new Set();\n handlers.add(options.handler);\n this.resizeHandlers.set(options.target, handlers);\n this.resizeObserver.observe(options.target, options.options);\n }\n /** @inheritdoc */\n removeObserver(options) {\n const handlers = this.resizeHandlers.get(options.target);\n if (!handlers)\n return;\n handlers.delete(options.handler);\n if (handlers.size === 0) {\n this.resizeObserver.unobserve(options.target);\n this.resizeHandlers.delete(options.target);\n }\n }\n}\n//# sourceMappingURL=shared-resize-observer.js.map","/**\n * BookReaderTemplate to load BookNavigator components\n */\n\nimport { LitElement, html, css } from 'lit';\n\nimport '@internetarchive/ia-item-navigator';\nimport '../BookNavigator/book-navigator.js';\n// eslint-disable-next-line no-unused-vars\nimport { ModalManager } from '@internetarchive/modal-manager';\nimport '@internetarchive/modal-manager';\nimport { SharedResizeObserver } from '@internetarchive/shared-resize-observer';\n\nexport class IaBookReader extends LitElement {\n static get properties() {\n return {\n item: { type: Object },\n baseHost: { type: String },\n signedIn: { type: Boolean },\n fullscreen: { type: Boolean, reflect: true, attribute: true },\n sharedObserver: { type: Object, attribute: false },\n modal: { type: Object, attribute: false },\n loaded: { type: Boolean },\n menuShortcuts: { type: Array },\n menuContents: { type: Array },\n };\n }\n\n constructor() {\n super();\n this.item = undefined;\n this.bookreader = undefined;\n this.baseHost = 'archive.org';\n this.fullscreen = false;\n this.signedIn = false;\n /** @type {ModalManager} */\n this.modal = undefined;\n /** @type {SharedResizeObserver} */\n this.sharedObserver = undefined;\n this.loaded = false;\n this.menuShortcuts = [];\n this.menuContents = [];\n this.openMenuName = '';\n }\n\n updated() {\n if (!this.modal) {\n this.setModalManager();\n }\n\n if (!this.sharedObserver) {\n this.sharedObserver = new SharedResizeObserver();\n }\n }\n\n get itemNav() {\n return this.shadowRoot.querySelector('iaux-item-navigator');\n }\n\n /** Creates modal DOM & attaches to `<body>` */\n setModalManager() {\n let modalManager = document.querySelector('modal-manager');\n if (!modalManager) {\n modalManager = document.createElement(\n 'modal-manager'\n );\n document.body.appendChild(modalManager);\n }\n\n this.modal = modalManager;\n }\n\n manageFullscreen(e) {\n const { detail } = e;\n const fullscreen = !!detail.isFullScreen;\n this.fullscreen = fullscreen;\n this.dispatchEvent(new CustomEvent('fullscreenStateUpdated', { detail: { fullscreen }}));\n\n }\n\n loadingStateUpdated(e) {\n const { loaded } = e.detail;\n this.loaded = loaded || null;\n this.dispatchEvent(new CustomEvent('loadingStateUpdated', { detail: { loaded }}));\n }\n\n setMenuShortcuts(e) {\n this.menuShortcuts = [...e.detail];\n }\n\n setMenuContents(e) {\n const updatedContents = [...e.detail];\n this.menuContents = updatedContents;\n }\n\n manageSideMenuEvents(e) {\n const { menuId, action } = e.detail;\n if (!menuId) {\n return;\n }\n\n this.openMenuName = menuId;\n\n if (action === 'open') {\n this.itemNav?.openShortcut(menuId);\n } else if (action === 'toggle') {\n this.itemNav?.toggleMenu();\n }\n }\n\n render() {\n return html`\n <div class=\"main-component\">\n <iaux-item-navigator\n ?viewportInFullscreen=${this.fullscreen}\n .basehost=${this.baseHost}\n .item=${this.item}\n .modal=${this.modal}\n .loaded=${this.loaded}\n .sharedObserver=${this.sharedObserver}\n ?signedIn=${this.signedIn}\n .menuShortcuts=${this.menuShortcuts}\n .menuContents=${this.menuContents}\n .openMenu=${this.openMenuName}\n >\n <div slot=\"header\">\n <slot name=\"header\"></slot>\n </div>\n <div slot=\"main\">\n <book-navigator\n .modal=${this.modal}\n .baseHost=${this.baseHost}\n .itemMD=${this.item}\n ?signedIn=${this.signedIn}\n ?sideMenuOpen=${this.menuOpened}\n .sharedObserver=${this.sharedObserver}\n @ViewportInFullScreen=${this.manageFullscreen}\n @loadingStateUpdated=${this.loadingStateUpdated}\n @updateSideMenu=${this.manageSideMenuEvents}\n @menuUpdated=${this.setMenuContents}\n @menuShortcutsUpdated=${this.setMenuShortcuts}\n >\n <div slot=\"main\">\n <slot name=\"main\"></slot>\n </div>\n </book-navigator>\n </div>\n </iaux-item-navigator>\n </div>\n `;\n }\n\n static get styles() {\n return css`\n :host {\n display: block;\n --primaryBGColor: var(--black, #000);\n --secondaryBGColor: #222;\n --tertiaryBGColor: #333;\n --primaryTextColor: var(--white, #fff);\n --primaryCTAFill: #194880;\n --primaryCTABorder: #c5d1df;\n --secondaryCTAFill: #333;\n --secondaryCTABorder: #999;\n --primaryErrorCTAFill: #e51c26;\n --primaryErrorCTABorder: #f8c6c8;\n background-color: var(--primaryBGColor);\n position: relative;\n }\n\n :host([fullscreen]),\n iaux-item-navigator[viewportinfullscreen] {\n position: fixed;\n inset: 0;\n height: 100%;\n min-height: unset;\n }\n\n .main-component {\n height: 100%;\n width: 100%;\n min-height: inherit;\n }\n\n div[slot=\"header\"],\n div[slot=\"main\"] {\n display: flex;\n width: 100%;\n }\n\n slot {\n display: block;\n flex: 1;\n }\n\n iaux-item-navigator {\n min-height: var(--br-height, inherit);\n height: var(--br-height, inherit);\n display: block;\n width: 100%;\n color: var(--primaryTextColor);\n --menuButtonLabelDisplay: block;\n --menuWidth: 320px;\n --menuSliderBg: var(--secondaryBGColor);\n --activeButtonBg: var(--tertiaryBGColor);\n --subpanelRightBorderColor: var(--secondaryCTABorder);\n --animationTiming: 100ms;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n --menuSliderHeaderIconHeight: 2rem;\n --menuSliderHeaderIconWidth: 2rem;\n --iconWidth: 2.4rem;\n --iconHeight: 2.4rem;\n --shareLinkColor: var(--primaryTextColor);\n --shareIconBorder: var(--primaryTextColor);\n --shareIconBg: var(--secondaryBGColor);\n --activityIndicatorLoadingDotColor: var(--primaryTextColor);\n --activityIndicatorLoadingRingColor: var(--primaryTextColor);\n }\n `;\n }\n}\n\nwindow.customElements.define(\"ia-bookreader\", IaBookReader);\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing} from '../lit-html.js';\n\n/**\n * For AttributeParts, sets the attribute if the value is defined and removes\n * the attribute if the value is undefined.\n *\n * For other part types, this directive is a no-op.\n */\nexport const ifDefined = <T>(value: T) => value ?? nothing;\n"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","create","SearchServiceErrorType","SortDirection","BooleanParser","parseValue","rawValue","Boolean","shared","NumberParser","value","parseFloat","Number","isNaN","ByteParser","DateParser","this","parseJSDate","parseBracketDate","yearMatch","match","parsedValue","replace","parsed","Date","parse","date","indexOf","getTime","getTimezoneOffset","DurationParser","componentArray","split","seconds","parseNumberFormat","parseColonSeparatedFormat","undefined","hasNaNComponent","map","element","index","componentValue","multiplier","Math","floor","reduce","a","b","MediaTypeParser","StringParser","String","constructor","parser","values","processRawValue","Array","isArray","forEach","parseAndPersistValue","push","BooleanField","super","DateField","DurationField","NumberField","StringField","ByteField","MediaTypeField","Metadata","json","rawMetadata","identifier","addeddate","publicdate","indexdate","audio_codec","audio_sample_rate","collection","collections_raw","collection_size","contributor","coverage","creator","description","downloads","duration","files_count","item_count","item_size","language","lineage","mediatype","month","noindex","notes","num_favorites","num_reviews","runtime","scanner","source","start_localtime","start_time","stop_time","subject","taper","title","track","transferer","type","uploader","utc_offset","venue","week","year","File","name","btih","md5","format","mtime","crc32","sha1","original","size","height","width","external_identifier","album","Review","reviewbody","reviewtitle","reviewer","reviewdate","createdate","stars","MetadataResponse","_a","_b","rawResponse","created","d1","d2","dir","files","file","item_last_updated","metadata","server","uniq","workable_servers","speech_vs_music_asr","reviews","entry","SearchResponseDetails","numFound","start","docs","doc","aggregations","SearchResponse","responseHeader","response","SearchServiceError","Error","message","details","SearchService","searchBackend","async","params","performSearch","error","success","fetchMetadata","itemNotFound","default","baseUrl","queryAsString","asUrlSearchParams","toString","url","fetchUrl","fetch","err","getErrorResult","networkError","forensics","searchEngineError","decodingError","errorType","IAIconEllipses","styles","render","customElements","define","menuButtonWidth","sliderWidth","transitionTiming","IAIconCollapseSidebar","MenuButton","icon","href","label","menuDetails","buttonId","selected","followable","onClick","e","preventDefault","dispatchMenuTypeSelectedEvent","dispatchEvent","CustomEvent","bubbles","composed","detail","id","buttonClass","iconClass","menuItem","linkButton","clickButton","prototype","sliderEvents","closeDrawer","IaMenuSlider","menus","open","manuallyHandleClose","selectedMenu","selectedMenuAction","animateMenuOpen","updated","actionButton","selectedMenuDetails","setSelectedMenu","closeMenu","drawerClosed","find","menu","selectedMenuComponent","component","sliderDetailsClass","selectedMenuClass","menuItems","renderMenuHeader","headerClass","actionBlock","closeButton","IAItemNavLoader","loaderMessage","bookIconSvg","loader","IANoTheaterAvailable","emitLoaded","loaded","changed","has","downloadUrl","ItemNavigator","viewAvailable","baseHost","signedIn","menuContents","menuShortcuts","viewportInFullscreen","menuOpened","openMenuState","disconnectedCallback","removeResizeObserver","oldObserver","get","removeObserver","resizeObserverConfig","setResizeObserver","handleResize","contentRect","sharedObserver","addObserver","headerSlot","handler","requestUpdate","frame","loaderTitle","loadingArea","slotChange","slottedContent","assignedNodes","slot","displayReaderClass","headerHeight","offsetHeight","menuClass","shouldRenderMenu","renderSideMenu","renderViewport","noTheaterView","item","loadingStateUpdated","slotVisibility","manageViewportFullscreen","fullscreenStatus","isFullScreen","event","toggleMenu","setOpenMenu","openMenu","setMenuContents","updatedContents","setMenuShortcuts","manageSideMenuEvents","menuId","action","openShortcut","menuToggleButton","selectedMenuId","drawerState","shortcuts","hasMenuOrShortcuts","subnavWidth","transitionEffect","menuMargin","theaterBg","converter","JSON","atob","reflect","attribute","o","_s","_inherits","_class","_super","t","_this","_classCallCheck","call","ATTRIBUTE","strings","_possibleConstructorReturn","keys","filter","join","_ref","_this2","s","_slicedToArray","it","Set","nt","add","classList","remove","delete","IAIconLink","IAIconShare","IAIconEmail","Provider","promoCopy","fileSubPrefix","encodedDescription","encodeString","encodedCreator","encodedPromoCopy","itemPath","encodedFileSubPrefix","encodeURIComponent","str","class","IAIconFacebook","IAIconPinterest","IAIconTumblr","IAIconTwitter","TwitterProvider","copyToClipboard","options","currentTarget","textarea","querySelector","note","select","document","execCommand","blur","clearTimeout","timeout","setTimeout","iauxShareIcon","IauxSharingOptions","embedOptionsVisible","sharingOptions","renderHeader","loadProviders","sharingItems","option","embedOption","toggleEmbedOptions","iframeEmbed","bbcodeEmbed","helpURL","header","visible","embed","providerIcon","l","I","createComment","n","v","_$AA","parentNode","_$AB","insertBefore","nextSibling","_$AM","u","_$AQ","_$AP","_$AU","f","_$AI","_$AH","p","Map","set","_t","CHILD","_step","_iterator","_createForOfIteratorHelper","done","ct","_ref2","_this$ct","ut","y","x","h","m","j","k","w","A","sortAscIcon","sortDescIcon","sortNeutralIcon","viewableFilesIcon","IauxSortFilesButton","fileListRaw","fileListSorted","sortOrderBy","sortButton","sortVolumes","title_asc","title_desc","sortType","sortedFiles","sort","localeCompare","orig_sort","IauxViewableFiles","subPrefix","fileList","addSortToUrl","firstUpdated","activeFile","shadowRoot","scrollIntoViewIfNeeded","volumeItemWithImageTitle","hrefUrl","fileUrl","image","author","url_path","pdfLabel","fileLi","activeClass","file_subprefix","isPdf","file_source","fileListTemplate","filesDisplay","file_prefix","bind","ModalConfig","_c","_d","_e","_f","_g","subtitle","headline","headerColor","bodyColor","showProcessingIndicator","processingImageMode","showCloseButton","showHeaderLogo","closeOnBackdropClick","IAActivityIndicatorMode","freeze","processing","complete","IAActivityIndicator","properties","mode","checkmarkColorCss","completedRingColorCss","loadingRingColorCss","loadingDotColorCss","window","ModalTemplate","config","closeButtonTemplate","handleCloseButton","Event","modalLogoSize","processingImageSize","modalCornerRadius","modalBorder","modalBottomMarginCss","modalTopMarginCss","modalHeaderBottomPaddingCss","modalBottomPadding","scrollOffset","titleFontSize","subtitleFontSize","headlineFontSize","messageFontSize","titleLineHeight","subtitleLineHeight","headlineLineHeight","messageLineHeight","ModalManagerMode","ModalManagerHostBridge","modalManager","windowResizeThrottler","delay","callback","timeoutID","_ref$noTrailing","noTrailing","_ref$noLeading","noLeading","_ref$debounceMode","debounceMode","cancelled","lastExec","clearExistingTimeout","wrapper","_len","arguments_","_key","self","elapsed","now","exec","apply","clear","cancel","_ref2$upcomingOnly","upcomingOnly","throttle","updateModalContainerHeight","handleModeChange","Open","startResizeListener","stopDocumentScroll","Closed","stopResizeListener","resumeDocumentScroll","style","setProperty","innerHeight","body","addEventListener","removeEventListener","ModalManager","hostBridge","backdropClicked","closeButtonPressed","customModalContent","getMode","closeModal","callUserClosedModalCallback","userClosedModalCallback","showModal","thisArg","_arguments","generator","modalTemplate","updateComplete","focus","P","Promise","resolve","reject","fulfilled","step","next","rejected","result","then","emitModeChangeEvent","modalBackdropColor","modalBackdropZindex","modalWidth","modalMaxWidth","modalZindex","IAIconSearch","_r","et","directiveName","ft","raw","_$litType$","resultType","css","_templateObject","_taggedTemplateLiteral","IABookSearchResults","_LitElement","results","query","queryInProgress","renderSearchAllFields","displayResultImages","errorMessage","bindBookReaderListeners","renderSearchAllFiles","searchResultText","_templateObject12","searchResultBg","_templateObject13","searchResultBorder","_templateObject14","activeButtonBg","_templateObject15","mainCSS","_templateObject16","checkmarkIcon","closeIcon","buttonCSS","focusOnInputIfNecessary","setResults","cancelSearch","input","dispatchSearchCanceled","count","html","nothing","_templateObject2","resultsCount","controls","_templateObject3","_templateObject4","resultsClass","_templateObject5","_templateObject6","selectResult","cover","_templateObject7","displayPageNumber","unsafeHTML","_templateObject8","searchMultipleControls","setQuery","_templateObject9","_templateObject10","showSearchCTA","_templateObject11","headerSection","searchForm","loadingIndicator","setErrorMessage","resultsSet","searchCTA","LitElement","searchState","SearchProvider","onProviderChange","bookreader","onBookSearchInitiated","onSearchStarted","onSearchRequestError","onSearchResultsClicked","onSearchResultsChange","onSearchResultsCleared","searchCanceledInMenu","bindEventListeners","getMenuDetails","getComponent","updateMenu","_searchState","unit","onSearchCanceled","searchCanceled","urlPlugin","updateSearchInUrl","_e$detail$props","props","_e$detail$props$term","term","instance","search","_errorMessages$errorT","_instance$searchResul","_event$detail$props","_props$instance","errorMessages","noResults","notIndexed","messageToShow","searchResults","q","_ref3","_ref3$detail$props","_props$instance2","_props$results","matches","_this$bookreader","cancelSearchRequest","_this$bookreader2","searchView","clearSearchFieldAndResults","pullFromAddressBar","setUrlParam","removeUrlParam","searchUpdates","_searchState2","_ref4","_searchPluginGoToResult","matchIndex","IAIconDl","IABookDownloads","expiration","isBookProtected","mainCss","buttonStyles","regex","some","_option$type","formatsCount","loanExpiryMessage","renderDownloadOptions","hasLCPOption","installSimplyEAldikoThoriumMsg","accessProtectedBook","menuBase","pdf","lcppdf","lcpepub","epub","publicMenuBase","DownloadsProvider","_bookreader$options","isProtected","downloadTypes","computeAvailableTypes","ending","concat","menuData","found","_incoming","_incoming$","_incoming$2","link","formattedType","toLowerCase","downloadOption","menuButtonText","menuInfo","assign","IAIconVisualAdjustment","IAIconMagnifyMinus","IAIconMagnifyPlus","namespacedEvent","eventName","events","optionChange","zoomIn","zoomOut","IABookVisualAdjustments","activeCount","showZoomControls","activeOptions","emitOptionChangedEvent","active","_toConsumableArray","changedOptionId","prepareEventDetails","optionName","updatedOptions","checkedOption","min","max","setRangeValue","_this3","formID","changeActiveStateFor","rangeSlider","activeAdjustments","emitZoomOut","emitZoomIn","repeat","adjustmentCheckbox","zoomControls","visualAdjustmentOptions","VisualAdjustmentsProvider","bookContainer","refs","$brContainer","onAdjustmentChange","optionUpdateComplete","updateOptionsCount","onZoomIn","onZoomOut","zoom","adjustments","brightness","contrast","grayscale","invert","filters","newValue","DeleteModalActions","cancelAction","Function","deleteAction","pageID","BookmarkButton","state","side","position","handleClick","BookmarksLogin","_regeneratorRuntime","exports","Op","hasOwn","hasOwnProperty","obj","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","enumerable","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","context","Context","makeInvokeMethod","tryCatch","fn","arg","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","method","_invoke","AsyncIterator","PromiseImpl","invoke","record","_typeof","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","return","TypeError","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","doneResult","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","iter","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","finish","catch","thrown","delegateYield","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","_defineProperties","descriptor","_toPropertyKey","hint","prim","toPrimitive","res","_toPrimitive","_setPrototypeOf","_getPrototypeOf","api","endpoint","headers","page","credentials","getAll","post","bookmark","sendBookmarkData","put","color","stringify","IABookmarks","subClass","superClass","Constructor","protoProps","staticProps","_fetchBookmarks","_fetchUserBookmarks","Derived","hasNativeReflectConstruct","construct","sham","Proxy","valueOf","_isNativeReflectConstruct","Super","NewTarget","ReferenceError","_assertThisInitialized","bookmarks","editedBookmark","modal","loginOptions","loginClicked","loginUrl","displayMode","bookmarkColors","className","defaultColor","deleteModalConfig","updateDisplay","emitBookmarksChanged","getIdentifier","fetchUserBookmarks","setBREventListeners","bookId","_callee","_context","fetchBookmarks","initializeBookmarks","renderBookmarkButtons","markActiveBookmark","_ref$leafNum","leafNum","_ref$notes","_notes$note","nomalizedParams","getBookmarkColor","formatPage","book","getPageNum","thumbnail","getPageURI","_objectSpread","_callee2","resText","parsedResponse","_parsedResponse","_parsedResponse$error","_parsedResponse$value","bkmrks","_console","_context2","text","console","warn","formattedLeafNum","parseInt","formattedBookmark","formatBookmark","getBookmark","confirmDeletion","createBookmark","_this4","$","not","pageEl","existingButton","pageBookmark","bookmarkState","getPage","isViewable","bookmarkButton","createElement","stopPropagation","pageSide","getAttribute","constMode2up","bookmarkButtonClicked","appendChild","atSetup","constModeThumb","currentIndex","displayedIndices","includes","activeBookmarkID","requestedPageHasBookmark","closeEdit","_this$bookmarkColors$","pagesInView","existingBookmark","bookmarkEdited","emitBookmarkButtonClicked","disableAddBookmarkButton","jumpToPage","displayDeletionModal","deleteBookmark","_this5","_ref5","currBookmarks","pageToCheck","shouldEnableAddBookmarkButton","addBookmark","bookmarkSelected","saveBookmark","_this6","bookmarksList","allowAddingBookmark","addBookmarkButton","bookmarkHelperMessage","IABookmarkEdit","showBookmark","bookmarkEditCSS","bookmarkColorsCSS","colorId","bookmarkId","emitColorChangedEvent","changeColorTo","bookmarkTemplate","emitSaveEvent","updateNote","bookmarkColor","emitDeleteEvent","IAIconEditPencil","IABookmarksList","defaultBookmarkColor","emitEditEvent","emitSaveBookmark","emitDeleteBookmark","colorVal","labelInfo","editMode","bookmarkColorInfo","emitSelectedEvent","editBookmark","editBookmarkComponent","emitBookmarkColorChanged","bookmarksCount","sortedBookmarks","sortBookmarks","bookmarkItem","bookmarkslist","IAIconBookmark","BookmarksProvider","referrerStr","location","bookmarksLoginClicked","bindEvents","setup","bookmarksChanged","bookmarksLength","showSidePanel","_window$archive_analy","archive_analytics","send_event_no_sampling","path","SharingProvider","_createClass","_item$metadata","creatorToUse","arr","_arrayLikeToArray","_arrayWithoutHoles","from","_iterableToArray","minLen","test","_unsupportedIterableToArray","_nonIterableSpread","len","arr2","sortTypes","ViewableFilesProvider","multipleBooksList","by_subprefix","viewableFiles","volumeCount","defineProperties","sortFilesComponent","handleFileListSorted","urlSortValue","getUrlParam","_handleFileListSorted","_event$detail","multipleFilesClicked","_x","orderBy","send_event","svg","BookNavigator","itemMD","bookReaderCannotLoad","bookReaderLoaded","bookIsRestricted","downloadableTypes","isAdmin","lendingInitialized","lendingStatus","menuProviders","fullscreenBranding","iaLogo","sharedObserverHandler","brWidth","brHeight","shortcutOrder","mainBRContainer","emitPostInit","initializeBookSubmenus","loadSharedObserver","brSelector","el","providers","share","baseProviderConfig","visualAdjustments","VisualAdjustmentProvider","updateMenuContents","shouldShowDownloadsMenu","DownloadProvider","enableSearch","brInstance","isWideEnoughToOpenMenu","updateSideMenu","enableBookmarks","enableMultipleBooks","volumes","addMenuShortcut","closeFS","fullscreenShortcut","sortMenuShortcuts","emitMenuShortcutsUpdated","updatedShortcuts","exitFullScreen","closeFullscreen","_this$menuProviders","availableMenus","chapters","update","splice","_this$lendingStatus$u","user_loan_record","shell","emitLoadingStatusUpdate","resize","manageFullScreenBehavior","passive","downloadTypesAvailable","previewType","isRestricted","downloadURLs","manageContextMenuVisibility","capture","_e$target","_this$sharedObserver","startBrWidth","startBrHeight","animating","_this$bookreader3","widthChange","heightChange","emitFullScreenState","enableFSLogoShortcut","isFullscreen","addFullscreenShortcut","deleteFullscreenShortcut","_this$itemMD","itemImage","placeholder","SharedResizeObserver","resizeObserver","ResizeObserver","entries","requestAnimationFrame","handlers","resizeHandlers","shutdown","unobserve","observe","IaBookReader","fullscreen","openMenuName","setModalManager","_this$itemNav","_e$detail","itemNav","_this$itemNav2","manageFullscreen"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"ia-bookreader-bundle.js","mappings":";2SAsDO,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO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KAAKqQ,eACCrQ,KAAKkuC,iBACNluC,KAAK0R,oBACV1R,KAAKsS,qBACRtS,KAAKmS,gBACInS,KAAKqS,iBAUzC,sFAsECq7B,CAAA,CA/MsB,CAASrkB,EAAAA,IAkNlCvK,OAAO7T,eAAeC,OAAO,gBAAiBwiC,wECjNjCt1B,EAAgB,SAAAA,GAAA,OAAa,MAAAA,EAAAA,EAASvE,EAAAA,EAAA","sources":["webpack://@internetarchive/bookreader/./node_modules/tslib/tslib.es6.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/search-service-error.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/search-params.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/boolean.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/number.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/byte.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/date.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/duration.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/mediatype.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/page-progression.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/field-parsers/dist/src/field-types/string.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/metadata-field.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/boolean.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/date.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/duration.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/number.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/string.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/byte.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata-fields/field-types/mediatype.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/metadata.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/file.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/models/review.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/responses/metadata/metadata-response.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/responses/search/search-response-details.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/responses/search/search-response.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/search-service.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/search-service/dist/src/search-backend/default-search-backend.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-ellipses/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-ellipses/icon-ellipses.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menu-slider/styles/menu-slider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-collapse-sidebar/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-collapse-sidebar/icon-collapse-sidebar.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menu-slider/styles/menu-button.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menu-slider/menu-button.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menu-slider/ia-menu-slider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/loader.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/no-theater-available.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/iaux-item-navigator.js","webpack://@internetarchive/bookreader/../src/directives/class-map.ts","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-link/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-link/icon-link.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-share/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-share/icon-share.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-email/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-email/icon-email.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/provider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/email.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-facebook/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-facebook/icon-facebook.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/facebook.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-pinterest/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-pinterest/icon-pinterest.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/pinterest.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-tumblr/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-tumblr/icon-tumblr.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/tumblr.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-twitter/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-twitter/icon-twitter.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/share-providers/twitter.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/iaux-sharing-options.js","webpack://@internetarchive/bookreader/src/directive-helpers.ts","webpack://@internetarchive/bookreader/../src/directives/repeat.ts","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-item-navigator/dist/src/menus/iaux-viewable-files.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-config.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-activity-indicator/src/ia-activity-indicator.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-activity-indicator/ia-activity-indicator.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-close/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-ia-logo/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-template.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager-mode.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager-host-bridge.js","webpack://@internetarchive/bookreader/./node_modules/throttle-debounce/esm/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-search/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-search/icon-search.js","webpack://@internetarchive/bookreader/../src/directives/unsafe-html.ts","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/icon_checkmark.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/icon_close.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/button-base.js","webpack://@internetarchive/bookreader/./src/BookNavigator/search/search-results.js","webpack://@internetarchive/bookreader/./src/BookNavigator/search/search-provider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-dl/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-dl/icon-dl.js","webpack://@internetarchive/bookreader/./src/BookNavigator/downloads/downloads.js","webpack://@internetarchive/bookreader/./src/BookNavigator/downloads/downloads-provider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-visual-adjustment/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-visual-adjustment/icon-visual-adjustment.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-minus/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-minus/icon-magnify-minus.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-plus/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-plus/icon-magnify-plus.js","webpack://@internetarchive/bookreader/./src/BookNavigator/visual-adjustments/visual-adjustments.js","webpack://@internetarchive/bookreader/./src/BookNavigator/visual-adjustments/visual-adjustments-provider.js","webpack://@internetarchive/bookreader/./src/BookNavigator/delete-modal-actions.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmark-button.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-loginCTA.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/ia-bookmarks.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/bookmark-colors.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmark-edit.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-edit-pencil/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-edit-pencil/icon-edit-pencil.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-list.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-bookmark/src/icon-bookmark.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-bookmark/icon-bookmark.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-provider.js","webpack://@internetarchive/bookreader/./src/BookNavigator/sharing.js","webpack://@internetarchive/bookreader/./src/BookNavigator/volumes/volumes-provider.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/ia-logo.js","webpack://@internetarchive/bookreader/./src/BookNavigator/book-navigator.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/shared-resize-observer/dist/src/shared-resize-observer.js","webpack://@internetarchive/bookreader/./src/ia-bookreader/ia-bookreader.js","webpack://@internetarchive/bookreader/../src/directives/if-defined.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport var SearchServiceErrorType;\n(function (SearchServiceErrorType) {\n SearchServiceErrorType[\"networkError\"] = \"SearchService.NetworkError\";\n SearchServiceErrorType[\"itemNotFound\"] = \"SearchService.ItemNotFound\";\n SearchServiceErrorType[\"decodingError\"] = \"SearchService.DecodingError\";\n SearchServiceErrorType[\"searchEngineError\"] = \"SearchService.SearchEngineError\";\n})(SearchServiceErrorType || (SearchServiceErrorType = {}));\nexport class SearchServiceError extends Error {\n constructor(type, message, details) {\n super(message);\n this.name = type;\n this.type = type;\n this.details = details;\n }\n}\n//# sourceMappingURL=search-service-error.js.map","export class AggregateSearchParams {\n constructor(searchParams) {\n this.searchParams = searchParams;\n }\n /**\n * Generates a query parameter from the given aggregate search params\n *\n * Example:\n *\n * [\n * {\n * \"terms\": {\n * \"field\": \"collection\",\n * \"size\":10\n * }\n * },\n * {\n * \"terms\": {\n * \"field\": \"subjectSorter\",\n * \"size\": 10\n * }\n * }\n * ]\n *\n * @returns {Record<string, AggregateSearchParam>[]}\n * @memberof AggregateSearchParams\n */\n get asSearchParams() {\n return this.searchParams.map(param => {\n return {\n terms: param,\n };\n });\n }\n}\nexport var SortDirection;\n(function (SortDirection) {\n SortDirection[\"Asc\"] = \"asc\";\n SortDirection[\"Desc\"] = \"desc\";\n})(SortDirection || (SortDirection = {}));\nexport class SortParam {\n constructor(field, direction) {\n this.field = field;\n this.direction = direction;\n }\n get asString() {\n return `${this.field} ${this.direction}`;\n }\n}\n/**\n * SearchParams provides an encapsulation to all of the search parameters\n * available for searching.\n *\n * It also provides an `asUrlSearchParams` method for converting the\n * parameters to an IA-style query string. ie. it converts the `fields` array\n * to `fl=identifier,collection` and `sort` to `sort=date+desc,downloads+asc`\n */\nexport class SearchParams {\n constructor(options) {\n this.query = options.query;\n this.sort = options.sort;\n this.rows = options.rows;\n this.page = options.page;\n this.fields = options.fields;\n this.aggregations = options.aggregations;\n }\n /**\n * Return a URLSearchParams representation of the parameters for use in network requests.\n *\n * @readonly\n * @type {URLSearchParams}\n * @memberof SearchParams\n */\n get asUrlSearchParams() {\n const params = new URLSearchParams();\n params.append('q', this.query);\n params.append('output', 'json');\n if (this.rows) {\n params.append('rows', String(this.rows));\n }\n if (this.page) {\n params.append('page', String(this.page));\n }\n if (this.fields) {\n params.append('fl', this.fields.join(','));\n }\n if (this.sort) {\n const sortStrings = this.sort.map(sort => sort.asString);\n params.append('sort', sortStrings.join(','));\n }\n if (this.aggregations) {\n const searchParams = this.aggregations.asSearchParams;\n const stringified = JSON.stringify(searchParams);\n params.append('user_aggs', stringified);\n }\n return params;\n }\n}\n//# sourceMappingURL=search-params.js.map","export class BooleanParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue === 'string' &&\n (rawValue === 'false' || rawValue === '0')) {\n return false;\n }\n return Boolean(rawValue);\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nBooleanParser.shared = new BooleanParser();\n//# sourceMappingURL=boolean.js.map","export class NumberParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue === 'number')\n return rawValue;\n if (typeof rawValue === 'boolean')\n return undefined;\n const value = parseFloat(rawValue);\n if (Number.isNaN(value)) {\n return undefined;\n }\n return value;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nNumberParser.shared = new NumberParser();\n//# sourceMappingURL=number.js.map","import { NumberParser } from './number';\n/**\n * The ByteParser is a unit-specific NumberParser\n * that returns a value in bytes\n *\n * @export\n * @class ByteParser\n * @implements {FieldParserInterface<Byte>}\n */\nexport class ByteParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n const parser = NumberParser.shared;\n return parser.parseValue(rawValue);\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nByteParser.shared = new ByteParser();\n//# sourceMappingURL=byte.js.map","export class DateParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n // try different date parsing\n return this.parseJSDate(rawValue) || this.parseBracketDate(rawValue);\n }\n // handles \"[yyyy]\" format\n parseBracketDate(rawValue) {\n if (typeof rawValue !== 'string')\n return undefined;\n const yearMatch = rawValue.match(/\\[([0-9]{4})\\]/);\n if (!yearMatch || yearMatch.length < 2) {\n return undefined;\n }\n return this.parseJSDate(yearMatch[1]);\n }\n parseJSDate(rawValue) {\n if (typeof rawValue !== 'string')\n return undefined;\n let parsedValue = rawValue;\n // fix for Safari not supporting `yyyy-mm-dd HH:MM:SS` format, insert a `T` into the space\n if (parsedValue.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}\\s{1}[0-9]{2}:[0-9]{2}:[0-9]{2}$/)) {\n parsedValue = parsedValue.replace(' ', 'T');\n }\n const parsed = Date.parse(parsedValue);\n if (Number.isNaN(parsed)) {\n return undefined;\n }\n let date = new Date(parsedValue);\n // the `Date(string)` constructor parses some strings as GMT and some in the local timezone\n // this attempts to detect cases that get parsed as GMT and adjusts accordingly\n const dateWithTimeZone = parsedValue.indexOf('Z') > -1 || // ISO8601 with GMT timezone\n parsedValue.indexOf('+') > -1 || // ISO8601 with positive timezone offset\n parsedValue.match(/^[0-9]{4}$/) || // just the year, ie `2020`\n parsedValue.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/) || // YYYY-MM-DD format\n parsedValue.match(/^.*?-[0-9]{2}:[0-9]{2}$/) || // `YYYY-MM-DDTHH:mm:ss-00:00` format\n parsedValue.match(/^.*?-[0-9]{4}$/); // `YYYY-MM-DDTHH:mm:ss-0000` format\n if (dateWithTimeZone) {\n date = new Date(date.getTime() + date.getTimezoneOffset() * 1000 * 60);\n }\n return date;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nDateParser.shared = new DateParser();\n//# sourceMappingURL=date.js.map","/**\n * Parses duration format to a `Duration` (number of seconds with decimal)\n *\n * Can parse hh:mm:ss.ms, hh:mm:ss, mm:ss, mm:ss.ms, and s.ms formats\n */\nexport class DurationParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue === 'number')\n return rawValue;\n if (typeof rawValue === 'boolean')\n return undefined;\n const componentArray = rawValue.split(':');\n let seconds;\n // if there are no colons in the string, we can assume it's in sss.ms format so just parse it\n if (componentArray.length === 1) {\n seconds = this.parseNumberFormat(componentArray[0]);\n }\n else {\n seconds = this.parseColonSeparatedFormat(componentArray);\n }\n return seconds;\n }\n /**\n * Parse sss.ms format\n *\n * @param rawValue\n * @returns\n */\n parseNumberFormat(rawValue) {\n let seconds = parseFloat(rawValue);\n if (Number.isNaN(seconds))\n seconds = undefined;\n return seconds;\n }\n /**\n * Parse hh:mm:ss.ms format\n *\n * @param componentArray\n * @returns\n */\n parseColonSeparatedFormat(componentArray) {\n // if any of the hh:mm:ss components are NaN, just return undefined\n let hasNaNComponent = false;\n const parsedValue = componentArray\n .map((element, index) => {\n const componentValue = parseFloat(element);\n if (Number.isNaN(componentValue)) {\n hasNaNComponent = true;\n return 0;\n }\n const exponent = componentArray.length - 1 - index;\n const multiplier = 60 ** exponent;\n return componentValue * Math.floor(multiplier);\n })\n .reduce((a, b) => a + b, 0);\n return hasNaNComponent ? undefined : parsedValue;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nDurationParser.shared = new DurationParser();\n//# sourceMappingURL=duration.js.map","export class MediaTypeParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue !== 'string')\n return undefined;\n return rawValue;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nMediaTypeParser.shared = new MediaTypeParser();\n//# sourceMappingURL=mediatype.js.map","export class PageProgressionParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n if (typeof rawValue !== 'string')\n return undefined;\n return rawValue;\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nPageProgressionParser.shared = new PageProgressionParser();\n//# sourceMappingURL=page-progression.js.map","export class StringParser {\n /** @inheritdoc */\n parseValue(rawValue) {\n return String(rawValue);\n }\n}\n// use a shared static instance for performance instead of\n// instantiating a new instance for every use\nStringParser.shared = new StringParser();\n//# sourceMappingURL=string.js.map","/**\n * The MetadataField is responsible for three things:\n * 1. Take in some raw data (strings, arrays, numbers, etc)\n * 2. Normalize the input to an array of the input,\n * ie. [string, string], [number, number], [Date, Date], etc\n * 3. Cast the values to their expected `Type`\n *\n * This class gets instiated with a `Type` and a parser of that type. For instance, the\n * `DateField` is a subclass of `MetadataField` with a `Type` of `Date` and a `DateParser`.\n *\n * When using a `DateField`, you can pass it a string date and it will cast it to a javascript Date,\n * ie:\n *\n * ```\n * const dateField = new DateField('2020-02-13')\n * dateField.value = Date(2020-02-13) // native javascript Date object\n * dateField.values = [Date(2020-02-13)] // the normalized array of values\n * dateField.rawValue = '2020-02-13' // the raw string that was passed in\n * ```\n *\n * @class MetadataField\n * @template Type The type of metadata this is (string, number, Date, etc)\n * @template FieldParserInterfaceType The parser for that type (StringParser, NumberParser, etc)\n */\nexport class MetadataField {\n constructor(parser, rawValue) {\n /**\n * The array of all values for the field.\n *\n * Many fields only contain a single value and\n * can be accessed via the `.value` getter\n *\n * @type {Type[]}\n * @memberof MetadataField\n */\n this.values = [];\n this.parser = parser;\n this.rawValue = rawValue;\n this.processRawValue();\n }\n /**\n * The first value if there are multiple or the only value if there is one\n *\n * @readonly\n * @type {(Type | undefined)}\n * @memberof MetadataField\n */\n get value() {\n return this.values.length > 0 ? this.values[0] : undefined;\n }\n processRawValue() {\n if (this.rawValue === undefined) {\n return;\n }\n if (Array.isArray(this.rawValue)) {\n this.rawValue.forEach(value => {\n this.parseAndPersistValue(value);\n });\n }\n else {\n this.parseAndPersistValue(this.rawValue);\n }\n }\n parseAndPersistValue(value) {\n const parsedValue = this.parser.parseValue(value);\n if (parsedValue !== undefined) {\n this.values.push(parsedValue);\n }\n }\n}\n//# sourceMappingURL=metadata-field.js.map","import { BooleanParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class BooleanField extends MetadataField {\n constructor(rawValue) {\n super(BooleanParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=boolean.js.map","import { DateParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class DateField extends MetadataField {\n constructor(rawValue) {\n super(DateParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=date.js.map","import { DurationParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\n/**\n * The DurationField parses different duration formats\n * and returns a `Duration`, which is a number in seconds\n * with decimals.\n *\n * @export\n * @class DurationField\n * @extends {MetadataField<Duration, DurationParser>}\n */\nexport class DurationField extends MetadataField {\n constructor(rawValue) {\n super(DurationParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=duration.js.map","import { NumberParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class NumberField extends MetadataField {\n constructor(rawValue) {\n super(NumberParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=number.js.map","import { StringParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class StringField extends MetadataField {\n constructor(rawValue) {\n super(StringParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=string.js.map","import { ByteParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\n/**\n * ByteField is a unit-specific number field that\n * returns a value in bytes\n *\n * @export\n * @class ByteField\n * @extends {MetadataField<Byte, ByteParser>}\n */\nexport class ByteField extends MetadataField {\n constructor(rawValue) {\n super(ByteParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=byte.js.map","import { MediaTypeParser } from '@internetarchive/field-parsers';\nimport { MetadataField } from '../metadata-field';\nexport class MediaTypeField extends MetadataField {\n constructor(rawValue) {\n super(MediaTypeParser.shared, rawValue);\n }\n}\n//# sourceMappingURL=mediatype.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { BooleanField } from './metadata-fields/field-types/boolean';\nimport { DateField } from './metadata-fields/field-types/date';\nimport { DurationField } from './metadata-fields/field-types/duration';\nimport { NumberField } from './metadata-fields/field-types/number';\nimport { StringField } from './metadata-fields/field-types/string';\nimport { ByteField } from './metadata-fields/field-types/byte';\nimport { MediaTypeField } from './metadata-fields/field-types/mediatype';\n/**\n * Metadata is an expansive model that describes an Item.\n *\n * The fields in here get casted to their respective field types. See `metadata-fields/field-type`.\n *\n * Add additional fields as needed.\n *\n * @export\n * @class Metadata\n */\nexport class Metadata {\n constructor(json) {\n this.rawMetadata = json;\n this.identifier = json.identifier;\n this.addeddate = json.addeddate ? new DateField(json.addeddate) : undefined;\n this.publicdate = json.publicdate\n ? new DateField(json.publicdate)\n : undefined;\n this.indexdate = json.indexdate ? new DateField(json.indexdate) : undefined;\n this.audio_codec = json.audio_codec\n ? new StringField(json.audio_codec)\n : undefined;\n this.audio_sample_rate = json.audio_sample_rate\n ? new NumberField(json.audio_sample_rate)\n : undefined;\n this.collection = json.collection\n ? new StringField(json.collection)\n : undefined;\n this.collections_raw = json.collections_raw\n ? new StringField(json.collections_raw)\n : undefined;\n this.collection_size = json.collection_size\n ? new ByteField(json.collection_size)\n : undefined;\n this.contributor = json.contributor\n ? new StringField(json.contributor)\n : undefined;\n this.coverage = json.coverage ? new StringField(json.coverage) : undefined;\n this.creator = json.creator ? new StringField(json.creator) : undefined;\n this.date = json.date ? new DateField(json.date) : undefined;\n this.description = json.description\n ? new StringField(json.description)\n : undefined;\n this.downloads = json.downloads\n ? new NumberField(json.downloads)\n : undefined;\n this.duration = json.duration\n ? new DurationField(json.duration)\n : undefined;\n this.files_count = json.files_count\n ? new NumberField(json.files_count)\n : undefined;\n this.item_count = json.item_count\n ? new NumberField(json.item_count)\n : undefined;\n this.item_size = json.item_size ? new ByteField(json.item_size) : undefined;\n this.language = json.language ? new StringField(json.language) : undefined;\n this.length = json.length ? new DurationField(json.length) : undefined;\n this.lineage = json.lineage ? new StringField(json.lineage) : undefined;\n this.mediatype = json.mediatype\n ? new MediaTypeField(json.mediatype)\n : undefined;\n this.month = json.month ? new NumberField(json.month) : undefined;\n this.noindex = json.noindex ? new BooleanField(json.noindex) : undefined;\n this.notes = json.notes ? new StringField(json.notes) : undefined;\n this.num_favorites = json.num_favorites\n ? new NumberField(json.num_favorites)\n : undefined;\n this.num_reviews = json.num_reviews\n ? new NumberField(json.num_reviews)\n : undefined;\n this.runtime = json.runtime ? new DurationField(json.runtime) : undefined;\n this.scanner = json.scanner ? new StringField(json.scanner) : undefined;\n this.source = json.source ? new StringField(json.source) : undefined;\n this.start_localtime = json.start_localtime\n ? new DateField(json.start_localtime)\n : undefined;\n this.start_time = json.start_time\n ? new DateField(json.start_time)\n : undefined;\n this.stop_time = json.stop_time ? new DateField(json.stop_time) : undefined;\n this.subject = json.subject ? new StringField(json.subject) : undefined;\n this.taper = json.taper ? new StringField(json.taper) : undefined;\n this.title = json.title ? new StringField(json.title) : undefined;\n this.track = json.track ? new NumberField(json.track) : undefined;\n this.transferer = json.transferer\n ? new StringField(json.transferer)\n : undefined;\n this.type = json.type ? new StringField(json.type) : undefined;\n this.uploader = json.uploader ? new StringField(json.uploader) : undefined;\n this.utc_offset = json.utc_offset\n ? new NumberField(json.utc_offset)\n : undefined;\n this.venue = json.venue ? new StringField(json.venue) : undefined;\n this.week = json.week ? new NumberField(json.week) : undefined;\n this.year = json.year ? new DateField(json.year) : undefined;\n }\n}\n//# sourceMappingURL=metadata.js.map","import { ByteParser, DurationParser, NumberParser, } from '@internetarchive/field-parsers';\n/**\n * This represents an Internet Archive File\n *\n * @export\n * @class File\n */\nexport class File {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(json) {\n this.name = json.name;\n this.source = json.source;\n this.btih = json.btih;\n this.md5 = json.md5;\n this.format = json.format;\n this.mtime = json.mtime;\n this.crc32 = json.crc32;\n this.sha1 = json.sha1;\n this.original = json.original;\n this.title = json.title;\n this.length = json.length\n ? DurationParser.shared.parseValue(json.length)\n : undefined;\n this.size = json.size ? ByteParser.shared.parseValue(json.size) : undefined;\n this.height = json.height\n ? NumberParser.shared.parseValue(json.height)\n : undefined;\n this.width = json.width\n ? NumberParser.shared.parseValue(json.width)\n : undefined;\n this.track = json.track\n ? NumberParser.shared.parseValue(json.track)\n : undefined;\n this.external_identifier = json['external-identifier'];\n this.creator = json.creator;\n this.album = json.album;\n }\n}\n//# sourceMappingURL=file.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { DateParser } from '@internetarchive/field-parsers';\nexport class Review {\n constructor(json) {\n this.reviewbody = json.reviewbody;\n this.reviewtitle = json.reviewtitle;\n this.reviewer = json.reviewer;\n this.reviewdate = DateParser.shared.parseValue(json.reviewdate);\n this.createdate = DateParser.shared.parseValue(json.createdate);\n this.stars = json.stars ? parseFloat(json.stars) : undefined;\n }\n}\n//# sourceMappingURL=review.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { File } from '../../models/file';\nimport { Metadata } from '../../models/metadata';\nimport { Review } from '../../models/review';\n/**\n * The main top-level reponse when fetching Metadata\n *\n * @export\n * @class MetadataResponse\n */\nexport class MetadataResponse {\n constructor(json) {\n var _a, _b;\n this.rawResponse = json;\n this.created = json.created;\n this.d1 = json.d1;\n this.d2 = json.d2;\n this.dir = json.dir;\n this.files = (_a = json.files) === null || _a === void 0 ? void 0 : _a.map((file) => new File(file));\n this.files_count = json.files_count;\n this.item_last_updated = json.item_last_updated;\n this.item_size = json.item_size;\n this.metadata = new Metadata(json.metadata);\n this.server = json.server;\n this.uniq = json.uniq;\n this.workable_servers = json.workable_servers;\n this.speech_vs_music_asr = json.speech_vs_music_asr;\n this.reviews = (_b = json.reviews) === null || _b === void 0 ? void 0 : _b.map((entry) => new Review(entry));\n }\n}\n//# sourceMappingURL=metadata-response.js.map","import { Metadata } from '../../models/metadata';\n/**\n * This is the search response details inside the SearchResponse object that contains\n * the search results, under the `docs` key.\n *\n * @export\n * @class Response\n */\nexport class SearchResponseDetails {\n constructor(json) {\n this.numFound = json.numFound;\n this.start = json.start;\n this.docs = json.docs.map((doc) => new Metadata(doc));\n this.aggregations = json.aggregations;\n }\n}\n//# sourceMappingURL=search-response-details.js.map","import { SearchResponseDetails } from './search-response-details';\n/**\n * The top-level response model when retrieving a response from the advanced search endpoint.\n *\n * @export\n * @class SearchResponse\n */\nexport class SearchResponse {\n constructor(json) {\n this.rawResponse = json;\n this.responseHeader = json.responseHeader;\n this.response = new SearchResponseDetails(json.response);\n }\n}\n//# sourceMappingURL=search-response.js.map","import { SearchResponse } from './responses/search/search-response';\nimport { MetadataResponse } from './responses/metadata/metadata-response';\nimport { DefaultSearchBackend } from './search-backend/default-search-backend';\nimport { SearchServiceError, SearchServiceErrorType, } from './search-service-error';\n/**\n * The Search Service is responsible for taking the raw response provided by\n * the Search Backend and modeling it as a `SearchResponse` or `MetadataResponse`\n * object, depending on the type of response.\n */\nexport class SearchService {\n constructor(searchBackend) {\n this.searchBackend = searchBackend;\n }\n /** @inheritdoc */\n async search(params) {\n const rawResponse = await this.searchBackend.performSearch(params);\n if (rawResponse.error) {\n return rawResponse;\n }\n const modeledResponse = new SearchResponse(rawResponse.success);\n return { success: modeledResponse };\n }\n /** @inheritdoc */\n async fetchMetadata(identifier) {\n var _a;\n const rawResponse = await this.searchBackend.fetchMetadata(identifier);\n if (rawResponse.error) {\n return rawResponse;\n }\n if (((_a = rawResponse.success) === null || _a === void 0 ? void 0 : _a.metadata) === undefined) {\n return {\n error: new SearchServiceError(SearchServiceErrorType.itemNotFound),\n };\n }\n const modeledResponse = new MetadataResponse(rawResponse.success);\n return { success: modeledResponse };\n }\n}\nSearchService.default = new SearchService(new DefaultSearchBackend());\n//# sourceMappingURL=search-service.js.map","import { SearchServiceError, SearchServiceErrorType, } from '../search-service-error';\n/**\n * The DefaultSearchBackend performs a `window.fetch` request to archive.org\n */\nexport class DefaultSearchBackend {\n constructor(baseUrl = 'archive.org') {\n this.baseUrl = baseUrl;\n }\n async performSearch(params) {\n const urlSearchParam = params.asUrlSearchParams;\n const queryAsString = urlSearchParam.toString();\n const url = `https://${this.baseUrl}/advancedsearch.php?${queryAsString}`;\n return this.fetchUrl(url);\n }\n async fetchMetadata(identifier) {\n const url = `https://${this.baseUrl}/metadata/${identifier}`;\n return this.fetchUrl(url);\n }\n async fetchUrl(url) {\n let response;\n // first try the fetch and return a networkError if it fails\n try {\n response = await fetch(url);\n }\n catch (err) {\n const message = err instanceof Error ? err.message : err;\n return this.getErrorResult(SearchServiceErrorType.networkError, message);\n }\n // then try json decoding and return a decodingError if it fails\n try {\n const json = await response.json();\n // the advanced search endpoint doesn't return an HTTP Error 400\n // and instead returns an HTTP 200 with an `error` key in the payload\n const error = json['error'];\n if (error) {\n const forensics = json['forensics'];\n return this.getErrorResult(SearchServiceErrorType.searchEngineError, error, forensics);\n }\n else {\n // success\n return { success: json };\n }\n }\n catch (err) {\n const message = err instanceof Error ? err.message : err;\n return this.getErrorResult(SearchServiceErrorType.decodingError, message);\n }\n }\n getErrorResult(errorType, message, details) {\n const error = new SearchServiceError(errorType, message, details);\n const result = { error };\n return result;\n }\n}\n//# sourceMappingURL=default-search-backend.js.map","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"ellipsesTitleID ellipsesDescID\"\n>\n <title id=\"ellipsesTitleID\">Ellipses icon</title>\n <desc id=\"ellipsesDescID\">An illustration of text ellipses.</desc>\n <path class=\"fill-color\" d=\"m10.5 17.5c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5c-1.38071187 0-2.5-1.1192881-2.5-2.5s1.11928813-2.5 2.5-2.5zm9.5 0c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5-2.5-1.1192881-2.5-2.5 1.1192881-2.5 2.5-2.5zm9.5 0c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5-2.5-1.1192881-2.5-2.5 1.1192881-2.5 2.5-2.5z\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconEllipses extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-ellipses', IAIconEllipses);\n\nexport default IAIconEllipses;\n","import { css } from 'lit';\nconst menuButtonWidth = css `42px`;\nconst sliderWidth = css `var(--menuWidth, 320px)`;\nconst transitionTiming = css `var(--animationTiming, 200ms)`;\nexport default css `\n .main {\n overflow: hidden;\n width: 100%;\n height: 100%;\n }\n\n .animate {\n transition: transform ${transitionTiming} ease-out;\n }\n\n .menu {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: ${sliderWidth};\n padding: 0.5rem 0.5rem 0 0;\n box-sizing: border-box;\n font-size: 1.4rem;\n color: var(--primaryTextColor);\n background: var(--menuSliderBg);\n transform: translateX(calc(${sliderWidth} * -1));\n }\n\n .menu > button.close {\n right: 0.7rem;\n }\n\n button {\n outline: none;\n cursor: pointer;\n }\n\n header {\n margin: 0 0 0.5rem 0;\n }\n\n header * {\n margin: 0;\n display: inline-block;\n }\n header button {\n outline: none;\n cursor: pointer;\n }\n\n header.with-secondary-action .details {\n width: 80%;\n }\n\n header .details {\n font-weight: bold;\n width: 88%;\n }\n\n header .custom-action > *,\n button.close {\n padding: 0;\n background-color: transparent;\n border: 0;\n --iconWidth: var(--menuSliderHeaderIconWidth);\n --iconHeight: var(--menuSliderHeaderIconHeight);\n }\n\n header .custom-action,\n button.close {\n position: absolute;\n }\n button.close {\n right: 0.5rem;\n }\n\n button.close * {\n float: right;\n }\n\n .content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: ${menuButtonWidth};\n z-index: 1;\n transform: translateX(calc(${sliderWidth} * -1));\n transition: transform ${transitionTiming} ease-out;\n background: var(--activeButtonBg);\n border-right: 0.2rem solid;\n border-color: var(--subpanelRightBorderColor);\n padding: 0.5rem 0 0 0.5rem;\n display: flex;\n flex-direction: column;\n }\n\n .open {\n transform: translateX(0);\n }\n\n .menu-list {\n padding: 0;\n margin: 0;\n list-style: none;\n background: var(--menuSliderBg);\n }\n .menu-list li {\n margin-bottom: 0.2rem;\n }\n\n .content > section {\n overflow: auto;\n overscroll-behavior: contain;\n }\n`;\n//# sourceMappingURL=menu-slider.js.map","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 18 18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"collapseSidebarTitleID collapseSidebarDescID\"\n>\n <title id=\"collapseSidebarTitleID\">Collapse sidebar</title>\n <desc id=\"collapseSidebarDescID\">A circle with a left pointing chevron</desc>\n <path d=\"m9 0c4.9705627 0 9 4.02943725 9 9 0 4.9705627-4.0294373 9-9 9-4.97056275 0-9-4.0294373-9-9 0-4.97056275 4.02943725-9 9-9zm1.6976167 5.28352881c-.365258-.3556459-.9328083-.37581056-1.32099801-.06558269l-.09308988.0844372-3 3.08108108-.08194436.09533317c-.27484337.36339327-.26799482.87009349.01656959 1.22592581l.084491.09308363 3 2.91891889.09533796.0818904c.3633964.2746544.8699472.2677153 1.2256839-.0167901l.093059-.0844712.0818904-.095338c.2746544-.3633964.2677153-.8699472-.0167901-1.2256839l-.0844712-.093059-2.283355-2.2222741 2.3024712-2.36338332.0819252-.09530804c.2997677-.39632298.2644782-.96313393-.1007797-1.31877983z\" fill-rule=\"evenodd\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconCollapseSidebar extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-collapse-sidebar', IAIconCollapseSidebar);\n\nexport default IAIconCollapseSidebar;\n","import { css } from 'lit';\nexport default css `\n a {\n display: inline-block;\n text-decoration: none;\n }\n\n .menu-item {\n display: inline-flex;\n width: 100%;\n padding: 0;\n font-size: 1.6rem;\n text-align: left;\n background: transparent;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: none;\n cursor: pointer;\n }\n\n button.menu-item {\n -webkit-appearance: none;\n appearance: none;\n border-radius: 0;\n }\n\n .menu-item:focus {\n outline: none;\n }\n\n .label {\n display: var(--menuButtonLabelDisplay, none);\n padding: 0;\n font-weight: 400;\n color: var(--primaryTextColor);\n text-align: left;\n vertical-align: middle;\n margin-left: 1rem;\n }\n\n .menu-details {\n color: var(--primaryTextColor);\n display: inline-block;\n margin-left: 0.5rem;\n font-style: italic;\n font-size: 1.5rem;\n }\n\n .menu-item > .icon {\n position: relative;\n display: inline-flex;\n z-index: 2;\n min-width: 4.2rem;\n max-width: 4.2rem;\n height: 4.2rem;\n vertical-align: middle;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n\n .menu-item.selected .icon {\n background-color: var(--activeButtonBg);\n border-radius: 1rem 0 0 1rem;\n }\n\n .icon .fill-color {\n fill: #999;\n }\n\n .icon.active .fill-color {\n fill: #fff;\n }\n`;\n//# sourceMappingURL=menu-button.js.map","import { __decorate } from \"tslib\";\nimport { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport menuButtonCSS from './styles/menu-button';\nlet MenuButton = class MenuButton extends LitElement {\n constructor() {\n super(...arguments);\n this.icon = '';\n this.href = '';\n this.label = '';\n this.menuDetails = '';\n this.buttonId = '';\n this.selected = false;\n this.followable = false;\n }\n static get styles() {\n return menuButtonCSS;\n }\n onClick(e) {\n e.preventDefault();\n this.dispatchMenuTypeSelectedEvent();\n }\n dispatchMenuTypeSelectedEvent() {\n this.dispatchEvent(new CustomEvent('menuTypeSelected', {\n bubbles: true,\n composed: true,\n detail: {\n id: this.buttonId,\n },\n }));\n }\n get buttonClass() {\n return this.selected ? 'selected' : '';\n }\n get iconClass() {\n return this.selected ? 'active' : '';\n }\n get menuItem() {\n return html `\n <span class=\"icon ${this.iconClass}\"> ${this.icon} </span>\n <span class=\"label\">${this.label}</span>\n <span class=\"menu-details\">${this.menuDetails}</span>\n `;\n }\n get linkButton() {\n return html `\n <a\n href=\"${this.href}\"\n class=\"menu-item ${this.buttonClass}\"\n @click=${this.followable ? undefined : this.onClick}\n >${this.menuItem}</a\n >\n `;\n }\n get clickButton() {\n return html `\n <button class=\"menu-item ${this.buttonClass}\" @click=${this.onClick}>\n ${this.menuItem}\n </button>\n `;\n }\n render() {\n return this.href ? this.linkButton : this.clickButton;\n }\n};\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"icon\", void 0);\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"href\", void 0);\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"label\", void 0);\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"menuDetails\", void 0);\n__decorate([\n property({ type: String })\n], MenuButton.prototype, \"buttonId\", void 0);\n__decorate([\n property({ type: Boolean })\n], MenuButton.prototype, \"selected\", void 0);\n__decorate([\n property({ type: Boolean })\n], MenuButton.prototype, \"followable\", void 0);\nMenuButton = __decorate([\n customElement('menu-button')\n], MenuButton);\nexport { MenuButton };\n//# sourceMappingURL=menu-button.js.map","import { __decorate } from \"tslib\";\nimport { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport menuSliderCSS from './styles/menu-slider';\nimport '@internetarchive/icon-collapse-sidebar';\nimport './menu-button';\nconst sliderEvents = {\n closeDrawer: 'menuSliderClosed',\n};\nlet IaMenuSlider = class IaMenuSlider extends LitElement {\n constructor() {\n super(...arguments);\n this.menus = [];\n this.open = false;\n this.manuallyHandleClose = false;\n this.selectedMenu = '';\n this.selectedMenuAction = nothing;\n this.animateMenuOpen = false;\n }\n static get styles() {\n return menuSliderCSS;\n }\n updated() {\n const { actionButton } = this.selectedMenuDetails || {};\n const actionButtonHasChanged = actionButton !== this.selectedMenuAction;\n if (actionButtonHasChanged) {\n this.selectedMenuAction = actionButton || nothing;\n }\n }\n /**\n * Event handler, captures state of selected menu\n */\n setSelectedMenu({ detail }) {\n const { id } = detail;\n this.selectedMenu = this.selectedMenu === id ? '' : id;\n const { actionButton } = this.selectedMenuDetails || {};\n this.selectedMenuAction = actionButton || nothing;\n }\n /**\n * closes menu drawer\n */\n closeMenu() {\n if (!this.manuallyHandleClose) {\n this.open = false;\n }\n const { closeDrawer } = sliderEvents;\n const drawerClosed = new CustomEvent(closeDrawer, {\n detail: this.selectedMenuDetails,\n });\n this.dispatchEvent(drawerClosed);\n }\n get selectedMenuDetails() {\n const selectedMenu = this.menus.find(menu => menu.id === this.selectedMenu);\n return selectedMenu;\n }\n get selectedMenuComponent() {\n const menuItem = this.selectedMenuDetails;\n return menuItem && (menuItem === null || menuItem === void 0 ? void 0 : menuItem.component)\n ? menuItem.component\n : html ``;\n }\n /* render */\n get sliderDetailsClass() {\n const animate = this.animateMenuOpen ? 'animate' : '';\n const state = this.open ? 'open' : '';\n return `${animate} ${state}`;\n }\n get selectedMenuClass() {\n return this.selectedMenu ? 'open' : '';\n }\n get menuItems() {\n return this.menus.map((menu) => html `\n <li>\n <menu-button\n @menuTypeSelected=${this.setSelectedMenu}\n .icon=${menu.icon}\n .label=${menu.label}\n .menuDetails=${menu.menuDetails}\n .buttonId=${menu.id}\n .selected=${menu.id === this.selectedMenu}\n .followable=${menu.followable}\n .href=${menu.href}\n ></menu-button>\n </li>\n `);\n }\n get renderMenuHeader() {\n const { label = '', menuDetails = '' } = this.selectedMenuDetails || {};\n const headerClass = this.selectedMenuAction ? 'with-secondary-action' : '';\n const actionBlock = this.selectedMenuAction\n ? html `<span class=\"custom-action\">${this.selectedMenuAction}</span>`\n : nothing;\n return html `\n <header class=\"${headerClass}\">\n <div class=\"details\">\n <h3>${label}</h3>\n <span class=\"extra-details\">${menuDetails}</span>\n </div>\n ${actionBlock} ${this.closeButton}\n </header>\n `;\n }\n get closeButton() {\n return html `\n <button\n class=\"close\"\n aria-label=\"Close this menu\"\n @click=${this.closeMenu}\n >\n <ia-icon-collapse-sidebar></ia-icon-collapse-sidebar>\n </button>\n `;\n }\n /** @inheritdoc */\n render() {\n return html `\n <div class=\"main\">\n <div class=\"menu ${this.sliderDetailsClass}\">\n ${this.closeButton}\n <ul class=\"menu-list\">\n ${this.menuItems}\n </ul>\n <div\n class=\"content ${this.selectedMenuClass}\"\n @menuTypeSelected=${this.setSelectedMenu}\n >\n ${this.renderMenuHeader}\n <section>\n <div class=\"selected-menu\">${this.selectedMenuComponent}</div>\n </section>\n </div>\n </div>\n </div>\n `;\n }\n};\n__decorate([\n property({ type: Array })\n], IaMenuSlider.prototype, \"menus\", void 0);\n__decorate([\n property({ type: Boolean })\n], IaMenuSlider.prototype, \"open\", void 0);\n__decorate([\n property({ type: Boolean })\n], IaMenuSlider.prototype, \"manuallyHandleClose\", void 0);\n__decorate([\n property({ type: String })\n], IaMenuSlider.prototype, \"selectedMenu\", void 0);\n__decorate([\n property({ type: Object })\n], IaMenuSlider.prototype, \"selectedMenuAction\", void 0);\n__decorate([\n property({ type: Boolean })\n], IaMenuSlider.prototype, \"animateMenuOpen\", void 0);\nIaMenuSlider = __decorate([\n customElement('ia-menu-slider')\n], IaMenuSlider);\nexport { IaMenuSlider };\n//# sourceMappingURL=ia-menu-slider.js.map","import { __decorate } from \"tslib\";\n/* eslint-disable class-methods-use-this */\nimport { css, html, LitElement, svg, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nlet IAItemNavLoader = class IAItemNavLoader extends LitElement {\n constructor() {\n super(...arguments);\n this.loaderMessage = '';\n }\n get bookIconSvg() {\n return svg `\n <g class=\"bookIcon\" transform=\"matrix(1 0 0 -1 28 67.362264)\">\n <path d=\"m44.71698 31.6981124v-29.99320678s-18.0956599.30735848-18.6322637-.7171698c-.0633962-.12226414-1.890566-.59207545-2.9745282-.59207545-1.3228302 0-3.5122641 0-4.1286791.74547168-.9707547 1.17452827-18.82811278.71660375-18.82811278.71660375v30.040754l1.83849052.7867924.29094339-28.48188608s15.94981097.15339622 17.09094297-1.10716978c.8145283-.90056602 4.997547-.91641507 5.3450942-.3526415.9611321 1.55716977 14.7101883 1.31716978 17.6077354 1.45981128l.3266038 28.22830118z\"/>\n <path d=\"m40.1129424 33.5957539h-12.8337733c-1.8690565 0-3.1098112-.7545283-3.9299999-1.6279245v-26.70452764l1.2362264-.00792453c.4584906.72962262 3.0922641 1.39415091 3.0922641 1.39415091h10.1298111s1.0381131.01754717 1.5141509.47377357c.5643396.54056602.7913207 1.36981129.7913207 1.36981129z\"/>\n <path d=\"m17.3354713 33.5957539h-12.8337733v-25.37660316s0-.75283017.49358489-1.14113205c.52867924-.41433961 1.3415094-.42849055 1.3415094-.42849055h10.59905631s2.2075471-.52698112 3.0928301-1.39415091l1.2.00792453v26.74245214c-.8201886.8581132-2.0530188 1.59-3.8932074 1.59\"/>\n </g>\n `;\n }\n get icon() {\n return this.bookIconSvg;\n }\n get loader() {\n return svg `\n <svg\n height=\"100\"\n viewBox=\"0 0 100 100\"\n width=\"100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"item-loading\"\n >\n <title id=\"item-loading\">Currently loading viewer.</title>\n <desc>Please wait while we load theater.</desc>\n <g fill=\"#333\" fill-rule=\"evenodd\" class=\"book-icon\">\n ${this.icon}\n <path\n class=\"ring\"\n d=\"m17.8618849 11.6970233c18.5864635-15.59603144 45.6875867-15.59603102 64.2740497.000001 1.9271446 1.6170806 2.1785128 4.4902567.5614466 6.4174186-1.6170661 1.9271618-4.4902166 2.1785323-6.4173612.5614517-15.1996922-12.75416882-37.3625282-12.75416916-52.5622206-.000001-15.19969387 12.7541707-19.04823077 34.5805019-9.1273354 51.7641499 9.9208955 17.183646 30.7471499 24.7638499 49.3923323 17.9774983 18.6451823-6.7863521 29.7266014-25.9801026 26.2811129-45.5206248-.436848-2.4775114 1.2174186-4.8400696 3.6949079-5.2769215 2.4774893-.4368518 4.8400264 1.2174296 5.2768744 3.694941 4.2132065 23.8945096-9.3373563 47.3649806-32.137028 55.6634567-22.799672 8.2984758-48.2663986-.9707372-60.39785211-21.9832155-12.1314534-21.012481-7.42539173-47.7021198 11.16107351-63.2981544z\"\n fill-rule=\"nonzero\"\n />\n </g>\n </svg>\n `;\n }\n render() {\n const title = this.loaderMessage\n ? html `<h2>${this.loaderMessage}</h2>`\n : nothing;\n return html `\n <div class=\"place-holder\">\n ${title} ${this.loader}\n <h3>Loading viewer</h3>\n </div>\n `;\n }\n static get styles() {\n return css `\n .place-holder {\n width: 30%;\n margin: auto;\n text-align: center;\n color: var(--primaryTextColor);\n }\n\n .place-holder {\n position: relative;\n }\n\n .place-holder svg {\n display: block;\n width: 60%;\n max-width: 100px;\n height: auto;\n margin: auto;\n }\n\n svg * {\n fill: var(--primaryTextColor);\n }\n\n svg .ring {\n animation: rotate 1.3s infinite linear;\n transform-origin: 50px 50px;\n transform-box: fill-box;\n display: block; // transform won't work on inline style\n }\n\n @keyframes rotate {\n 0% {\n -moz-transform: rotate(-360deg);\n -webkit-transform: rotate(-360deg);\n transform: rotate(-360deg);\n }\n }\n `;\n }\n};\n__decorate([\n property({ type: String })\n], IAItemNavLoader.prototype, \"loaderMessage\", void 0);\nIAItemNavLoader = __decorate([\n customElement('ia-itemnav-loader')\n], IAItemNavLoader);\nexport { IAItemNavLoader };\n//# sourceMappingURL=loader.js.map","import { __decorate } from \"tslib\";\nimport { LitElement, html, css, } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nlet IANoTheaterAvailable = class IANoTheaterAvailable extends LitElement {\n constructor() {\n super(...arguments);\n this.identifier = '';\n }\n emitLoaded() {\n this.dispatchEvent(new CustomEvent('loadingStateUpdated', {\n detail: { loaded: true },\n }));\n }\n updated(changed) {\n if (changed.has('identifier')) {\n this.emitLoaded();\n }\n }\n get downloadUrl() {\n return `/download/${this.identifier}`;\n }\n render() {\n return html `\n <section>\n <h2>THERE IS NO PREVIEW AVAILABLE FOR THIS ITEM</h2>\n <p>\n This item does not appear to have any files that can be experienced on\n Archive.org. <br />\n Please download files in this item to interact with them on your\n computer.\n </p>\n <a href=${this.downloadUrl}>Show all files</a>\n </section>\n `;\n }\n static get styles() {\n return css `\n :host {\n color: var(--primaryTextColor, #fff);\n text-align: center;\n }\n section {\n width: 100%;\n margin: 5%;\n padding: 0 5%;\n }\n p {\n font-size: 1.4rem;\n }\n a {\n color: var(--primaryTextColor, #fff);\n background-color: rgb(25, 72, 128);\n min-height: 35px;\n outline: none;\n cursor: pointer;\n line-height: normal;\n border-radius: 0.4rem;\n text-align: center;\n vertical-align: middle;\n font-size: 1.4rem;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n display: inline-block;\n padding: 0.85rem 1.2rem;\n border: 1px solid rgb(197, 209, 223);\n white-space: nowrap;\n appearance: auto;\n box-sizing: border-box;\n user-select: none;\n text-decoration: none;\n }\n `;\n }\n};\n__decorate([\n property({ type: String })\n], IANoTheaterAvailable.prototype, \"identifier\", void 0);\nIANoTheaterAvailable = __decorate([\n customElement('ia-no-theater-available')\n], IANoTheaterAvailable);\nexport { IANoTheaterAvailable };\n//# sourceMappingURL=no-theater-available.js.map","import { __decorate } from \"tslib\";\nimport { css, html, LitElement, nothing, } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { MetadataResponse } from '@internetarchive/search-service';\nimport '@internetarchive/icon-ellipses/icon-ellipses';\nimport './menu-slider/ia-menu-slider';\nimport './loader';\nimport './no-theater-available';\nlet ItemNavigator = class ItemNavigator extends LitElement {\n constructor() {\n super(...arguments);\n this.viewAvailable = true;\n this.baseHost = 'archive.org';\n this.signedIn = false;\n this.menuContents = [];\n this.menuShortcuts = [];\n this.viewportInFullscreen = null;\n this.menuOpened = false;\n this.loaded = false;\n this.openMenuState = 'shift';\n }\n disconnectedCallback() {\n this.removeResizeObserver();\n }\n updated(changed) {\n if (changed.has('sharedObserver')) {\n const oldObserver = changed.get('sharedObserver');\n oldObserver === null || oldObserver === void 0 ? void 0 : oldObserver.removeObserver(this.resizeObserverConfig);\n this.setResizeObserver();\n }\n }\n /** Shared observer */\n handleResize(entry) {\n const { width } = entry.contentRect;\n if (width <= 600) {\n this.openMenuState = 'overlay';\n return;\n }\n this.openMenuState = 'shift';\n }\n setResizeObserver() {\n var _a, _b;\n (_a = this.sharedObserver) === null || _a === void 0 ? void 0 : _a.addObserver(this.resizeObserverConfig);\n (_b = this.sharedObserver) === null || _b === void 0 ? void 0 : _b.addObserver({\n target: this.headerSlot,\n handler: {\n handleResize: ({ contentRect }) => {\n if (contentRect.height) {\n this.requestUpdate();\n }\n },\n },\n });\n }\n removeResizeObserver() {\n var _a;\n (_a = this.sharedObserver) === null || _a === void 0 ? void 0 : _a.removeObserver(this.resizeObserverConfig);\n }\n get resizeObserverConfig() {\n return {\n handler: this,\n target: this.frame,\n };\n }\n /** End shared observer */\n get loaderTitle() {\n return this.viewportInFullscreen ? 'Internet Archive' : '';\n }\n get loadingArea() {\n return html `\n <div class=\"loading-area\">\n <div class=\"loading-view\">\n <ia-itemnav-loader\n .loaderMessage=${this.loaderTitle}\n ></ia-itemnav-loader>\n </div>\n </div>\n `;\n }\n slotChange(e, type) {\n var _a;\n const slottedContent = (_a = e.target.assignedNodes()) === null || _a === void 0 ? void 0 : _a[0];\n this.dispatchEvent(new CustomEvent('slotChange', {\n detail: { slot: slottedContent, type },\n }));\n this.requestUpdate();\n }\n render() {\n var _a, _b;\n const displayReaderClass = this.loaded ? '' : 'hidden';\n const headerHeight = ((_b = (_a = this.headerSlot) === null || _a === void 0 ? void 0 : _a.assignedNodes()[0]) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;\n return html `\n <div id=\"frame\" class=${this.menuClass}>\n <slot\n name=\"header\"\n style=${`height: ${headerHeight}px`}\n @slotchange=${(e) => this.slotChange(e, 'header')}\n ></slot>\n <div class=\"menu-and-reader\">\n ${this.shouldRenderMenu ? this.renderSideMenu : nothing}\n <div id=\"reader\" class=${displayReaderClass}>\n ${this.renderViewport}\n </div>\n ${!this.loaded ? this.loadingArea : nothing}\n </div>\n </div>\n `;\n }\n get noTheaterView() {\n var _a, _b;\n return html `<ia-no-theater-available\n .identifier=${(_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.identifier}\n @loadingStateUpdated=${this.loadingStateUpdated}\n ></ia-no-theater-available>`;\n }\n get renderViewport() {\n if (!this.viewAvailable) {\n return this.noTheaterView;\n }\n const slotVisibility = !this.loaded ? 'opacity: 0;' : 'opacity: 1;';\n return html `\n <div slot=\"main\" style=${slotVisibility}>\n <slot\n name=\"main\"\n @slotchange=${(e) => this.slotChange(e, 'main')}\n ></slot>\n </div>\n `;\n }\n loadingStateUpdated(e) {\n const { loaded } = e.detail;\n this.loaded = loaded !== null && loaded !== void 0 ? loaded : false;\n }\n /** Fullscreen Management */\n manageViewportFullscreen(e) {\n const fullscreenStatus = !!e.detail.isFullScreen;\n this.viewportInFullscreen = !fullscreenStatus ? null : fullscreenStatus;\n const event = new CustomEvent('fullscreenToggled', {\n detail: e.detail,\n });\n this.dispatchEvent(event);\n }\n /** End Fullscreen Management */\n /** Side menu */\n get shouldRenderMenu() {\n var _a;\n return !!((_a = this.menuContents) === null || _a === void 0 ? void 0 : _a.length);\n }\n toggleMenu() {\n this.menuOpened = !this.menuOpened;\n }\n closeMenu() {\n this.menuOpened = false;\n }\n setOpenMenu(e) {\n const { id } = e.detail;\n this.openMenu = id !== this.openMenu ? id : undefined;\n }\n setMenuContents(e) {\n const updatedContents = [...e.detail];\n this.menuContents = updatedContents;\n }\n setMenuShortcuts(e) {\n this.menuShortcuts = [...e.detail];\n }\n /** Toggles Side Menu & Sets viewable subpanel */\n manageSideMenuEvents(e) {\n const { menuId, action } = e.detail;\n if (!menuId) {\n return;\n }\n if (action === 'open') {\n this.openShortcut(menuId);\n }\n else if (action === 'toggle') {\n this.openMenu = menuId;\n this.toggleMenu();\n }\n }\n get menuToggleButton() {\n return html `\n <button\n class=\"toggle-menu\"\n @click=${this.toggleMenu}\n title=\"Toggle theater side panels\"\n >\n <div>\n <ia-icon-ellipses\n style=\"width: var(--iconWidth); height: var(--iconHeight);\"\n ></ia-icon-ellipses>\n </div>\n </button>\n `;\n }\n get selectedMenuId() {\n return this.openMenu || '';\n }\n get renderSideMenu() {\n const drawerState = this.menuOpened ? '' : 'hidden';\n return html `\n <nav>\n <div class=\"minimized\">${this.shortcuts} ${this.menuToggleButton}</div>\n <div id=\"menu\" class=${drawerState}>\n <ia-menu-slider\n .menus=${this.menuContents}\n .selectedMenu=${this.selectedMenuId}\n @menuTypeSelected=${this.setOpenMenu}\n @menuSliderClosed=${this.closeMenu}\n manuallyHandleClose\n open\n ></ia-menu-slider>\n </div>\n </nav>\n `;\n }\n /** End Side menu */\n /** Menu Shortcuts */\n openShortcut(selectedMenuId = '') {\n this.openMenu = selectedMenuId;\n this.menuOpened = true;\n }\n get shortcuts() {\n const shortcuts = this.menuShortcuts.map(({ icon, id }) => {\n if (id === 'fullscreen') {\n return html `${icon}`;\n }\n return html `\n <button class=\"shortcut ${id}\" @click=\"${() => this.openShortcut(id)}\">\n ${icon}\n </button>\n `;\n });\n return html `<div class=\"shortcuts\">${shortcuts}</div>`;\n }\n /** End Menu Shortcuts */\n /** Misc Render */\n get menuClass() {\n var _a, _b;\n const hasMenuOrShortcuts = ((_a = this.menuContents) === null || _a === void 0 ? void 0 : _a.length) || ((_b = this.menuShortcuts) === null || _b === void 0 ? void 0 : _b.length);\n const drawerState = this.menuOpened && hasMenuOrShortcuts ? 'open' : '';\n const fullscreenState = this.viewportInFullscreen ? 'fullscreen' : '';\n return `${drawerState} ${fullscreenState} ${this.openMenuState}`;\n }\n static get styles() {\n const subnavWidth = css `var(--menuWidth, 320px)`;\n const transitionTiming = css `var(--animationTiming, 200ms)`;\n const transitionEffect = css `transform ${transitionTiming} ease-out`;\n const menuMargin = css `var(--theaterMenuMargin, 42px)`;\n const theaterBg = css `var(--theaterBgColor, #000)`;\n return css `\n :host,\n #frame,\n .menu-and-reader {\n position: relative;\n overflow: hidden;\n display: block;\n }\n\n :host,\n #frame,\n .loading-area,\n .loading-view {\n min-height: inherit;\n height: inherit;\n }\n\n slot {\n display: block;\n width: 100%;\n }\n\n slot * {\n display: block;\n height: inherit;\n }\n\n #frame {\n background-color: ${theaterBg};\n color-scheme: dark;\n display: flex;\n flex-direction: column;\n }\n\n #frame.fullscreen {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 9;\n }\n\n .loading-view {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .loading-area {\n width: 100%;\n }\n\n ia-itemnav-loader {\n display: block;\n width: 100%;\n }\n\n .hidden {\n display: none !important;\n }\n\n button {\n cursor: pointer;\n padding: 0;\n border: 0;\n }\n\n button:focus,\n button:active {\n outline: none;\n }\n\n .menu-and-reader {\n position: relative;\n display: flex;\n flex: 1;\n }\n\n nav button {\n background: none;\n }\n\n nav .minimized {\n background: rgba(0, 0, 0, 0.7);\n padding-top: 6px;\n position: absolute;\n width: ${menuMargin};\n z-index: 2;\n left: 0;\n border-bottom-right-radius: 5%;\n }\n\n nav .minimized button {\n width: var(--iconWidth);\n height: var(--iconHeight);\n margin-bottom: 0.2rem;\n margin: auto;\n display: inline-flex;\n vertical-align: middle;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n width: ${menuMargin};\n height: ${menuMargin};\n }\n\n nav .minimized button.toggle-menu > * {\n border: 2px solid var(--iconStrokeColor);\n border-radius: var(--iconWidth);\n width: var(--iconWidth);\n height: var(--iconHeight);\n margin: auto;\n }\n\n ia-icon-ellipses {\n width: var(--iconWidth);\n height: var(--iconHeight);\n }\n\n #menu {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n overflow: hidden;\n transform: translateX(-${subnavWidth});\n width: ${subnavWidth};\n transform: translateX(calc(${subnavWidth} * -1));\n transition: ${transitionEffect};\n }\n\n #reader {\n position: relative;\n z-index: 1;\n transform: translateX(0);\n width: 100%;\n display: flex;\n }\n\n #reader > * {\n width: 100%;\n display: flex;\n flex: 1;\n }\n\n .open.overlay #reader {\n transition: none;\n }\n\n .open #menu {\n width: ${subnavWidth};\n transform: translateX(0);\n transition: ${transitionEffect};\n }\n\n .open.shift #reader {\n width: calc(100% - ${subnavWidth});\n margin-left: ${subnavWidth};\n transition: ${transitionEffect};\n }\n `;\n }\n};\n__decorate([\n property({\n type: Object,\n converter: (value) => {\n if (value && typeof value === 'string') {\n return new MetadataResponse(JSON.parse(atob(value)));\n }\n return value;\n },\n })\n], ItemNavigator.prototype, \"item\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ItemNavigator.prototype, \"viewAvailable\", void 0);\n__decorate([\n property({ type: String })\n], ItemNavigator.prototype, \"baseHost\", void 0);\n__decorate([\n property({ type: Boolean })\n], ItemNavigator.prototype, \"signedIn\", void 0);\n__decorate([\n property({ type: Array })\n], ItemNavigator.prototype, \"menuContents\", void 0);\n__decorate([\n property({ type: Array })\n], ItemNavigator.prototype, \"menuShortcuts\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true, attribute: true })\n], ItemNavigator.prototype, \"viewportInFullscreen\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], ItemNavigator.prototype, \"menuOpened\", void 0);\n__decorate([\n property({ type: String, reflect: true })\n], ItemNavigator.prototype, \"openMenu\", void 0);\n__decorate([\n property({ attribute: false })\n], ItemNavigator.prototype, \"modal\", void 0);\n__decorate([\n property({ attribute: false })\n], ItemNavigator.prototype, \"sharedObserver\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true, attribute: true })\n], ItemNavigator.prototype, \"loaded\", void 0);\n__decorate([\n state()\n], ItemNavigator.prototype, \"openMenuState\", void 0);\n__decorate([\n query('#frame')\n], ItemNavigator.prototype, \"frame\", void 0);\n__decorate([\n query('slot[name=\"header\"]')\n], ItemNavigator.prototype, \"headerSlot\", void 0);\n__decorate([\n query('slot[name=\"main\"]')\n], ItemNavigator.prototype, \"mainSlot\", void 0);\nItemNavigator = __decorate([\n customElement('iaux-item-navigator')\n], ItemNavigator);\nexport { ItemNavigator };\n//# sourceMappingURL=iaux-item-navigator.js.map","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of class names to truthy values.\n */\nexport interface ClassInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nclass ClassMapDirective extends Directive {\n /**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\n private _previousClasses?: Set<string>;\n private _staticClasses?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'class' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n '`classMap()` can only be used in the `class` attribute ' +\n 'and must be the only part in the attribute.'\n );\n }\n }\n\n render(classInfo: ClassInfo) {\n // Add spaces to ensure separation from static classes\n return (\n ' ' +\n Object.keys(classInfo)\n .filter((key) => classInfo[key])\n .join(' ') +\n ' '\n );\n }\n\n override update(part: AttributePart, [classInfo]: DirectiveParameters<this>) {\n // Remember dynamic classes on the first render\n if (this._previousClasses === undefined) {\n this._previousClasses = new Set();\n if (part.strings !== undefined) {\n this._staticClasses = new Set(\n part.strings\n .join(' ')\n .split(/\\s/)\n .filter((s) => s !== '')\n );\n }\n for (const name in classInfo) {\n if (classInfo[name] && !this._staticClasses?.has(name)) {\n this._previousClasses.add(name);\n }\n }\n return this.render(classInfo);\n }\n\n const classList = part.element.classList;\n\n // Remove old classes that no longer apply\n // We use forEach() instead of for-of so that we don't require down-level\n // iteration.\n this._previousClasses.forEach((name) => {\n if (!(name in classInfo)) {\n classList.remove(name);\n this._previousClasses!.delete(name);\n }\n });\n\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n const value = !!classInfo[name];\n if (\n value !== this._previousClasses.has(name) &&\n !this._staticClasses?.has(name)\n ) {\n if (value) {\n classList.add(name);\n this._previousClasses.add(name);\n } else {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsey, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {ClassMapDirective};\n","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"linkTitleID linkDescID\">\n <title id=\"linkTitleID\">Link icon</title>\n <desc id=\"linkDescID\">Two chain links linked together</desc>\n <path d=\"m7.80511706 12.3659763c1.2669254-2.2579539 4.09819784-2.9949938 6.41200864-1.7733458l.2295791.12871 1.6067188.9559859 3.5467013-6.31849361c1.2682451-2.26030597 4.104098-2.99652769 6.4192376-1.76952182l.2223501.12488594 3.2168204 1.91103915c2.2770002 1.3527136 3.1866331 4.21502324 2.0564431 6.51290984l-.1198433.2278304-5.2002499 9.2680474c-1.2669254 2.2579539-4.0981978 2.9949938-6.4120086 1.7733458l-.2295791-.12871-1.6096554-.9558482-3.5437647 6.3183559c-1.2682451 2.260306-4.104098 2.9965277-6.41923761 1.7695218l-.22235013-.1248859-3.21682032-1.9110392c-2.27700024-1.3527136-3.18663314-4.2150232-2.05644312-6.5129098l.11984332-.2278304zm13.93955474-5.73311741-3.563271 6.35055051c1.889633 1.4530595 2.5776248 4.0429866 1.5410255 6.156875l-.1223014.2328355-.4183304.7430134 1.6096554.9558483c1.1431442.6791157 2.5155496.3977368 3.1667361-.5628389l.0921501-.1491451 5.2002498-9.2680474c.5752467-1.0252226.2110342-2.4011579-.8559335-3.14755806l-.1742742-.11247814-3.2168203-1.91103915c-1.1402863-.67741793-2.5086889-.39913772-3.1618387.55564729zm-11.79500786 7.00714351-5.20024982 9.2680474c-.57524673 1.0252226-.21103426 2.4011579.85593348 3.1475581l.17427416.1124781 3.21682032 1.9110392c1.14028632.6774179 2.50868892.3991377 3.16183872-.5556473l.0970474-.1563368 3.5622708-6.3513198c-1.8888875-1.4532134-2.5764504-4.042623-1.5400057-6.1561456l.1222818-.2327956.4153938-.7428758-1.6067188-.9559859c-1.1431442-.6791157-2.5155496-.3977368-3.1667361.5628389zm6.97653866 1.5796652-.3817806.6812386c-.5117123.9119895-.2800268 2.1014993.528439 2.8785267l.382717-.6803391c.5119098-.9123415.2798478-2.1024176-.5293754-2.8794262z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconLink extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-link', IAIconLink);\n\nexport default IAIconLink;\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"shareTitleID shareDescID\"\n>\n <title id=\"shareTitleID\">Share icon</title>\n <desc id=\"shareDescID\">A square with an arrow arcing out from the center of the square</desc>\n <g class=\"fill-color\">\n <path d=\"M70.6784759,10 L70.6784759,21.3240186 C64.5020053,21.66334 58.9104278,22.5826126 53.9037433,24.0818363 C48.8970588,25.5810601 44.8495989,27.4085163 41.7613636,29.5642049 C38.6731283,31.7198935 35.9982175,34.0552229 33.736631,36.5701929 C31.4750446,39.085163 29.8217469,41.5657574 28.776738,44.011976 C27.7317291,46.4581947 26.9173351,48.6848525 26.3335561,50.6919494 C25.7497772,52.6990464 25.4088681,54.3324462 25.3108289,55.592149 L25.2372995,57.4085163 C29.0296346,54.1661122 33.1751337,51.5524507 37.6737968,49.5675316 C42.1724599,47.5826126 46.2934492,46.3118208 50.0367647,45.7551564 C53.7800802,45.1984919 57.2571301,44.8713684 60.4679144,44.7737858 C63.6786988,44.6762031 66.1831551,44.7726769 67.9812834,45.0632069 L70.6784759,45.499002 L70.6784759,57.4051896 L100,33.3765802 L70.6784759,10 Z M76.4438503,62.4883566 L82.8609626,57.1157685 C82.9099822,57.0669772 82.9946524,57.0303837 83.1149733,57.005988 C83.2352941,56.9815924 83.4536542,56.9571967 83.7700535,56.9328011 C84.0864528,56.9084054 84.3905971,56.9449989 84.6824866,57.0425815 C84.9743761,57.1401641 85.217246,57.2854291 85.4110963,57.4783766 C85.6049465,57.671324 85.7263815,57.8409847 85.7754011,57.9873586 L85.8489305,58.2035928 L85.8489305,90 L0,90 L0,17.910845 L43.1784759,17.910845 C43.2765152,17.9596363 43.410205,18.0317143 43.5795455,18.1270792 C43.7488859,18.222444 43.9438503,18.4519849 44.1644385,18.8157019 C44.3850267,19.1794189 44.469697,19.5542249 44.4184492,19.9401198 C44.4184492,20.2794411 44.3092692,20.582169 44.0909091,20.8483034 C43.872549,21.1144378 43.6664439,21.3206919 43.4725936,21.4670659 L43.1818182,21.6134398 C40.557041,23.06609 38.2954545,24.396762 36.3970588,25.6054558 L30.7820856,29.8170326 L11.5274064,29.8170326 L11.5274064,78.1669993 L74.1811497,78.1669993 L74.1811497,65.5355955 C74.1811497,65.1009093 74.3995098,64.6407186 74.8362299,64.1550233 L76.4438503,62.4883566 Z\" id=\"Shape\"></path>\n </g>\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconShare extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-share', IAIconShare);\n\nexport default IAIconShare;\n","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"emailTitleID emailDescID\">\n <title id=\"emailTitleID\">Email icon</title>\n <desc id=\"emailDescID\">An illustration of an envelope</desc>\n <path d=\"m32 7.04156803v19.91686397c0 .5752421-.4763773 1.041568-1.0640184 1.041568h-27.87196316c-.58764116 0-1.06401844-.4663259-1.06401844-1.041568v-19.91686397c0-.57524214.47637728-1.04156803 1.06401844-1.04156803h27.87196316c.5876411 0 1.0640184.46632589 1.0640184 1.04156803zm-26.25039901 1.19676167 10.04327011 10.1323738c.5135662.4194048.8817166.6291071 1.1044511.6291071.1198794 0 .2695514-.0503424.4490158-.1510273.1794644-.100685.3291364-.2013699.4490158-.3020548l.1798191-.1510273 10.1198794-10.15841306zm16.77212271 9.7303286 6.8831353 6.7889404v-13.5778809zm-17.92871075-6.6379131v13.350819l6.78098955-6.6629107zm22.09008685 14.2059464-5.9074304-5.8588202-.9757049.9551179-.3594018.3295984c-.0342324.0304241-.0665646.0587822-.0969964.0850743l-.1597867.1329606c-.0684912.0540844-.1198794.0895749-.1541644.1064714-.6674943.3687151-1.3523675.5530727-2.0546196.5530727-.65047 0-1.3782586-.218035-2.1833659-.6541048l-.6682036-.4520405-1.0278418-1.0311524-5.95850326 5.832781z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconEmail extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-email', IAIconEmail);\n\nexport default IAIconEmail;\n","export default class Provider {\n constructor(params) {\n this.promoCopy =\n ' : Free Download, Borrow, and Streaming : Internet Archive';\n this.description = (params === null || params === void 0 ? void 0 : params.description) || '';\n this.creator = (params === null || params === void 0 ? void 0 : params.creator) || '';\n this.fileSubPrefix = (params === null || params === void 0 ? void 0 : params.fileSubPrefix) || '';\n this.identifier = (params === null || params === void 0 ? void 0 : params.identifier) || '';\n this.baseHost = (params === null || params === void 0 ? void 0 : params.baseHost) || '';\n }\n get encodedDescription() {\n return this.encodeString(this.description);\n }\n get encodedCreator() {\n return this.encodeString(this.creator);\n }\n get encodedPromoCopy() {\n return this.encodeString(this.promoCopy);\n }\n get itemPath() {\n const encodedFileSubPrefix = this.fileSubPrefix\n ? encodeURIComponent(this.fileSubPrefix)\n : '';\n return encodedFileSubPrefix\n ? `${this.identifier}/${encodedFileSubPrefix}`\n : this.identifier;\n }\n get url() {\n return `https://${this.baseHost}/details/${this.itemPath}`;\n }\n encodeString(str) {\n if (!str)\n return '';\n return encodeURIComponent(str.replace(/\\s/g, '+')).replace(/%2B/g, '+');\n }\n}\n//# sourceMappingURL=provider.js.map","import '@internetarchive/icon-email/icon-email';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Email';\n this.icon = html `<ia-icon-email></ia-icon-email>`;\n this.class = 'email';\n }\n get url() {\n return `mailto:?body=https://${this.baseHost}/details/${this.itemPath}&subject=${this.description} : ${this.creator}${this.promoCopy}`;\n }\n}\n//# sourceMappingURL=email.js.map","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"facebookTitleID facebookDescID\">\n <title id=\"facebookTitleID\">Facebook icon</title>\n <desc id=\"facebookDescID\">A lowercase f</desc>\n <path d=\"m30.91057 19.2442068.2670004-5.3339402h-5.7329237c-.0890001-3.4962895.25183-5.42243459 1.0224903-5.77843514.3560005-.17800028.8004955-.28925046 1.333485-.33375053s1.0442346-.0520853 1.5337353-.02275571c.4895008.02932959 1.045246.01466479 1.6672356-.04399439.0890001-1.59997977.1335002-3.24445961.1335002-4.93343953-2.1633102-.20732987-3.6742898-.28115953-4.5329389-.22148898-2.8146294.17800028-4.7847688 1.25965538-5.9104183 3.2449653-.1780003.3256596-.3261653.68873971-.444495 1.08924034-.1183298.40050062-.2144095.76358074-.2882391 1.08924034-.0738297.32565959-.125915.7848194-.1562559 1.37747942-.030341.59266002-.052591 1.04474028-.0667501 1.35624078-.0141592.3115005-.0217444.8449956-.0227558 1.6004854v1.5777298h-3.8229605v5.3339401h3.8669549v14.622824h5.8224296c0-.3560006-.0146648-1.6819003-.0439944-3.9776994-.0293296-2.295799-.0515796-4.2957737-.0667501-5.9999241s-.0075853-3.2525506.0227557-4.6452005h5.4219289z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconFacebook extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-facebook', IAIconFacebook);\n\nexport default IAIconFacebook;\n","import '@internetarchive/icon-facebook/icon-facebook';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Facebook';\n this.icon = html `<ia-icon-facebook></ia-icon-facebook>`;\n this.class = 'facebook';\n }\n get url() {\n return `https://www.facebook.com/sharer/sharer.php?u=https://${this.baseHost}/details/${this.itemPath}`;\n }\n}\n//# sourceMappingURL=facebook.js.map","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"pinterestTitleID pinterestDescID\">\n <title id=\"pinterestTitleID\">Pinterest icon</title>\n <desc id=\"pinterestDescID\">A stylized letter p</desc>\n <path d=\"m11.9051049 30.5873434.653491-1.0742755.4207845-.839975c.2805229-.591861.5371377-1.2533214.7698443-1.9843813.2327065-.7310599.4659444-1.6029125.6997135-2.6155579.2337692-1.0126455.4128151-1.752206.5371377-2.2186817.0308151.030815.0775689.0855382.1402615.1641697.0626927.0786314.1094465.1333547.1402615.1641697.1243227.1870153.2178304.311338.280523.372968 1.1210293.964829 2.3817888 1.4631823 3.7822785 1.4950599 1.4939973 0 2.8790795-.3426843 4.1552465-1.0280529 2.1166733-1.1826593 3.6733633-3.1128487 4.6700699-5.7905679.4048457-1.1518444.6848374-2.5996192.8399751-4.3433245.1243226-1.587505-.0781002-3.0974411-.6072685-4.5298084-.903199-2.36638128-2.5528653-4.20306294-4.948999-5.51004497-1.276167-.65349101-2.5990879-1.05833667-3.9687625-1.21453696-1.525875-.21783034-3.1293188-.17107651-4.8103315.14026149-2.7701643.52916833-5.02709913 1.743174-6.77080442 3.64201699-1.99235065 2.14748836-2.98852598 4.62225355-2.98852598 7.42429545 0 2.9571797.9494215 5.0584455 2.84826449 6.3037975l.83997504.4207845c.12432268 0 .22526845.0154075.3028373.0462225s.1551377.0074381.23270656-.0701308c.07756885-.0775688.13229208-.1243226.16416969-.1402614s.07066204-.0860696.11635328-.2103923c.04569124-.1243226.07703756-.2098609.09403895-.2566147.01700139-.0467539.04834771-.1476996.09403895-.3028373s.06906816-.2486454.07013074-.280523l.14026149-.5132295c.06269263-.311338.09403895-.5291684.09403895-.653491-.03081502-.1243227-.12432268-.2799917-.28052297-.467007-.15620029-.1870154-.23376915-.2959305-.23270656-.3267455-.62267599-.8096914-.9494215-1.7904592-.98023652-2.9423035-.03081502-1.55669.28052297-2.9731185.93401399-4.24928547 1.18265932-2.45882635 3.17501002-3.93741618 5.97705192-4.43576949 1.6183201-.311338 3.1356943-.25661476 4.5521228.16416969 1.4164285.42078446 2.5135496 1.09765239 3.2913633 2.03060379.8405063 1.02752164 1.3229208 2.28828114 1.4472435 3.78227848.1243227 1.4004897-.0313463 2.9725872-.467007 4.7162925-.3740306 1.3696746-.9186065 2.5528653-1.6337275 3.5495719-.9967066 1.245352-2.0863896 1.8834355-3.269049 1.9142505-1.7118277.0626926-2.7547568-.6375522-3.1287874-2.1007345-.0935077-.4664757 0-1.2134744.2805229-2.240996.7469987-2.5842117 1.1359055-3.9384788 1.1667206-4.0628015.1870153-1.0275216.2024228-1.7904591.0462225-2.2888124-.1870153-.65349104-.5759222-1.15928246-1.1667205-1.51737429-.5907984-.35809182-1.2756357-.39687625-2.054512-.11635327-1.1826594.43566067-1.9610044 1.40048968-2.335035 2.89448706-.311338 1.306982-.2491767 2.6299028.186484 3.9687625 0 .0626926.0313463.1402615.094039.2327065.0626926.0924451.0940389.1700139.0940389.2327066 0 .0935076-.0313463.2491766-.0940389.467007-.0626927.2178303-.094039.3580918-.094039.4207844-.0935076.4356607-.3038999 1.3308903-.6311767 2.6856887-.3272768 1.3547985-.5838915 2.3897582-.7698443 3.1048793-.7778136 3.2068876-1.12049796 5.5881451-1.02805289 7.1437725l.37296809 2.7558194c.653491-.591861 1.2294131-1.2299445 1.7277664-1.9142505z\" class=\"fill-color\" />\n</svg>\n`;\n","import { css, LitElement } from 'lit';\nimport icon from './index.js';\n\nclass IAIconPinterest extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-pinterest', IAIconPinterest);\n\nexport default IAIconPinterest;\n","import '@internetarchive/icon-pinterest/icon-pinterest';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Pinterest';\n this.icon = html `<ia-icon-pinterest></ia-icon-pinterest>`;\n this.class = 'pinterest';\n }\n get url() {\n return `http://www.pinterest.com/pin/create/button/?url=https://${this.baseHost}/details/${this.itemPath}&description=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`;\n }\n}\n//# sourceMappingURL=pinterest.js.map","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"tumblrTitleID tumblrDescID\">\n <title id=\"tumblrTitleID\">Tumblr icon</title>\n <desc id=\"tumblrDescID\">A lowercase letter t</desc>\n <path d=\"m8.50321407 8.54544475v5.32088575c.15641786.0310693.6819176.0310693 1.57649923 0 .8945816-.0310693 1.3574071.0160703 1.3884764.1414189.0942792 1.5695354.1333837 3.2253149.1173133 4.9673385-.0160703 1.7420236-.0316049 3.3426283-.0466039 4.8018141s.2046288 2.824628.6588835 4.0963267c.4542546 1.2716986 1.1999178 2.2209194 2.2369897 2.8476622 1.2556283.784232 2.9896167 1.207953 5.2019653 1.271163 2.2123485.0632099 4.1659648-.2506972 5.8608487-.9417213-.0310693-.3449764-.0230341-1.4045467.0241055-3.1787109.0471397-1.7741643-.0080351-2.75499-.1655244-2.9424772-3.5472571 1.0360005-5.697467.6904885-6.4506298-1.0365361-.7220934-1.6638147-.8635123-4.9909084-.4242566-9.981281v-.046604h6.7318605v-5.32088568h-6.7318605v-6.54383772h-4.0497228c-.2828378 1.28669763-.6122795 2.35376743-.9883252 3.20120941-.3760457.84744199-.98029 1.60060471-1.812733 2.25948817-.832443.65888347-1.87594303 1.01993018-3.1305 1.08314014z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconTumblr extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-tumblr', IAIconTumblr);\n\nexport default IAIconTumblr;\n","import '@internetarchive/icon-tumblr/icon-tumblr';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Tumblr';\n this.icon = html `<ia-icon-tumblr></ia-icon-tumblr>`;\n this.class = 'tumblr';\n }\n get url() {\n return `https://www.tumblr.com/share/video?embed=%3Ciframe+width%3D%22640%22+height%3D%22480%22+frameborder%3D%220%22+allowfullscreen+src%3D%22https%3A%2F%2F${this.baseHost}%2Fembed%2F%22+webkitallowfullscreen%3D%22true%22+mozallowfullscreen%3D%22true%22%26gt%3B%26lt%3B%2Fiframe%3E&name=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`;\n }\n}\n//# sourceMappingURL=tumblr.js.map","import { html } from 'lit';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"twitterTitleID twitterDescID\">\n <title id=\"twitterTitleID\">Twitter icon</title>\n <desc id=\"twitterDescID\">The Twitter logo, a cartoon bird</desc>\n <path d=\"m31.5297453 8.76273313c-.3135031.40766104-.7447036.83083673-1.2936015 1.26952707-.5488979.4386904-.9169698.7837578-1.1042157 1.0352022.1562166 2.319709-.1417719 4.5297454-.8939653 6.6301092-.7521935 2.1003638-1.8023754 3.9182538-3.1505457 5.45367-1.3481704 1.5354162-2.9627648 2.8284828-4.8437835 3.8791996-1.8810186 1.0507169-3.8321207 1.7483416-5.8533062 2.092874s-4.1215493.2894286-6.30109136-.1653114c-2.17954205-.45474-4.2092874-1.3401455-6.08923604-2.6562165 2.72737.4697196 5.67408517-.2514445 8.8401455-2.1634924-3.0719024-.7521935-4.88979241-2.2881447-5.45367-4.6078537 1.12882516.0631287 1.86550396.0631287 2.21003638 0-2.91568586-1.2850417-4.38904344-3.3693558-4.42007276-6.2529424.21934517.0310293.53284828.1487267.94050931.3530922s.78375775.3060133 1.12829017.3049433c-.81532206-.7211641-1.41076396-1.9045581-1.7863257-3.5501819-.37556173-1.64562376-.17173122-3.17355015.61149155-4.58377912 1.81789001 1.88101862 3.6908838 3.36989086 5.61898138 4.46661672 1.92809757 1.0967259 4.22426707 1.7547614 6.88850847 1.9741066-.2503745-1.1908838-.1722662-2.32719882.2343248-3.40894502.4065911-1.0817462 1.0416221-1.93612241 1.9050931-2.56312861.863471-.62700621 1.8114702-1.0817462 2.8439975-1.36421999 1.0325272-.28247378 2.0827091-.27444896 3.1505456.02407447s1.9767815.87042585 2.726835 1.71570726c1.3791997-.37663172 2.6802911-.87845068 3.9032742-1.50545688-.0310293.37663171-.1407019.74470361-.3290178 1.1042157-.1883158.35951209-.3530922.62593623-.4943291.79927242s-.3841216.4317355-.728654.77519795c-.3445324.34346244-.5638776.57832227-.6580355.70457949.2193452-.09415792.6895998-.23539482 1.410764-.42371067.7211641-.18831586 1.2069334-.39214638 1.4573079-.61149155 0 .44350524-.1567516.86668093-.4702547 1.27434196z\" class=\"fill-color\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconTwitter extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-twitter', IAIconTwitter);\n\nexport default IAIconTwitter;\n","import '@internetarchive/icon-twitter/icon-twitter';\nimport { html } from 'lit';\nimport Provider from './provider';\nexport default class TwitterProvider extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Twitter';\n this.icon = html `<ia-icon-twitter></ia-icon-twitter>`;\n this.class = 'twitter';\n }\n get url() {\n return `https://twitter.com/intent/tweet?url=https://${this.baseHost}/details/${this.itemPath}&via=internetarchive&text=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`;\n }\n}\n//# sourceMappingURL=twitter.js.map","import { __decorate } from \"tslib\";\n/* eslint-disable lit-a11y/click-events-have-key-events */\n/* eslint-disable lit-a11y/list */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { css, html, LitElement, nothing, } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport '@internetarchive/icon-link/icon-link';\nimport '@internetarchive/icon-share/icon-share';\nimport EmailProvider from './share-providers/email';\nimport FacebookProvider from './share-providers/facebook';\nimport PinterestProvider from './share-providers/pinterest';\nimport TumblrProvider from './share-providers/tumblr';\nimport TwitterProvider from './share-providers/twitter';\nconst copyToClipboard = (options) => {\n const currentTarget = options.currentTarget;\n const textarea = currentTarget.querySelector('textarea');\n const note = currentTarget.querySelector('small');\n textarea.select();\n document.execCommand('copy');\n textarea.blur();\n note.classList.add('visible');\n clearTimeout(note.timeout);\n note.timeout = setTimeout(() => note.classList.remove('visible'), 4000);\n};\nexport const iauxShareIcon = html `<ia-icon-share\n style=\"width: var(--iconWidth); height: var(--iconHeight);\"\n></ia-icon-share>`;\nlet IauxSharingOptions = class IauxSharingOptions extends LitElement {\n constructor() {\n super(...arguments);\n this.baseHost = 'archive.org';\n this.creator = '';\n this.description = '';\n this.embedOptionsVisible = false;\n this.identifier = '';\n this.sharingOptions = [];\n this.type = '';\n this.renderHeader = false;\n this.fileSubPrefix = '';\n }\n updated(changed) {\n if (changed.has('sharingOptions') && !this.sharingOptions.length) {\n this.loadProviders();\n }\n }\n loadProviders() {\n const { baseHost, creator, description, identifier, type, fileSubPrefix } = this;\n const params = {\n baseHost,\n creator,\n description,\n identifier,\n type,\n fileSubPrefix,\n };\n this.sharingOptions = [\n new TwitterProvider(params),\n new FacebookProvider(params),\n new TumblrProvider(params),\n new PinterestProvider(params),\n new EmailProvider(params),\n ];\n }\n get sharingItems() {\n return this.sharingOptions.map(option => html `<li>\n <a\n class=\"${ifDefined(option.class)}\"\n href=\"${option.url}\"\n target=\"_blank\"\n >\n ${option.icon} ${option.name}\n </a>\n </li>`);\n }\n get embedOption() {\n return html `<li>\n <a href=\"#\" @click=${this.toggleEmbedOptions}>\n <ia-icon-link></ia-icon-link>\n Get an embeddable link\n </a>\n </li>`;\n }\n get iframeEmbed() {\n return html `<iframe\n src=\"https://${this.baseHost}/embed/${this.identifier}\" width=\"560\"\n height=\"384\" frameborder=\"0\" webkitallowfullscreen=\"true\"\n mozallowfullscreen=\"true\" allowfullscreen></iframe>`;\n }\n get bbcodeEmbed() {\n return `[archiveorg ${this.identifier} width=560 height=384 frameborder=0 webkitallowfullscreen=true mozallowfullscreen=true]`;\n }\n get helpURL() {\n return `https://${this.baseHost}/help/audio.php?identifier=${this.identifier}`;\n }\n toggleEmbedOptions(e) {\n e.preventDefault();\n this.embedOptionsVisible = !this.embedOptionsVisible;\n }\n get header() {\n const header = html `<header><h3>Share this ${this.type}</h3></header>`;\n return this.renderHeader ? header : nothing;\n }\n render() {\n return html `\n ${this.header}\n <ul>\n ${this.sharingItems} ${this.embedOption}\n <div\n class=${classMap({ visible: this.embedOptionsVisible, embed: true })}\n >\n <h4>Embed</h4>\n <div class=\"code\" @click=${copyToClipboard}>\n <textarea readonly>${this.iframeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <h4>\n Embed for wordpress.com hosted blogs and archive.org item\n <description> tags\n </h4>\n <div class=\"code\" @click=${copyToClipboard}>\n <textarea readonly>${this.bbcodeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <p>\n Want more?\n <a href=${this.helpURL}\n >Advanced embedding details, examples, and help</a\n >!\n </p>\n </div>\n </ul>\n `;\n }\n get providerIcon() {\n return html `<ia-icon-share\n style=\"width: var(--iconWidth); height: var(--iconHeight);\"\n ></ia-icon-share>`;\n }\n static get styles() {\n return css `\n :host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n header {\n display: flex;\n align-items: baseline;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.6rem;\n }\n\n h4 {\n font-size: 1.4rem;\n }\n\n ul {\n padding: 0 0 2rem 0;\n list-style: none;\n }\n\n li {\n padding: 0 0 1rem 0;\n }\n\n li a {\n font-size: 1.6rem;\n text-decoration: none;\n color: var(--shareLinkColor);\n }\n\n li a * {\n display: inline-block;\n padding: 0.2rem;\n margin-right: 1rem;\n vertical-align: middle;\n border: 1px solid var(--shareIconBorder);\n border-radius: 7px;\n background: var(--shareIconBg);\n }\n\n .embed {\n display: none;\n }\n .embed.visible {\n display: block;\n width: 95%;\n }\n\n .embed a {\n color: var(--shareLinkColor);\n }\n\n .code {\n position: relative;\n }\n\n textarea {\n display: block;\n width: 100%;\n height: 120px;\n padding: 0.8rem 1rem;\n box-sizing: border-box;\n resize: none;\n cursor: pointer;\n font:\n normal 1.4rem 'Helvetica Neue',\n Helvetica,\n Arial,\n sans-serif;\n color: var(--textareaColor, #fff);\n background: var(--textareaBg, #151515);\n }\n\n small {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3rem;\n padding: 0.5rem 1rem;\n box-sizing: border-box;\n font:\n normal 1.2rem/2rem 'Helvetica Neue',\n Helvetica,\n Arial,\n sans-serif;\n color: var(--textareaBg, #151515);\n background: var(--textareaColor, #fff);\n opacity: 0;\n transition: opacity 300ms linear;\n }\n small.visible {\n opacity: 1;\n }\n `;\n }\n};\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"baseHost\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"creator\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"description\", void 0);\n__decorate([\n property({ type: Boolean })\n], IauxSharingOptions.prototype, \"embedOptionsVisible\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"identifier\", void 0);\n__decorate([\n property({ type: Array })\n], IauxSharingOptions.prototype, \"sharingOptions\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"type\", void 0);\n__decorate([\n property({ type: Boolean })\n], IauxSharingOptions.prototype, \"renderHeader\", void 0);\n__decorate([\n property({ type: String })\n], IauxSharingOptions.prototype, \"fileSubPrefix\", void 0);\nIauxSharingOptions = __decorate([\n customElement('iaux-sharing-options')\n], IauxSharingOptions);\nexport { IauxSharingOptions };\n//# sourceMappingURL=iaux-sharing-options.js.map","/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n _$LH,\n Part,\n DirectiveParent,\n TemplateResult,\n CompiledTemplateResult,\n} from './lit-html.js';\nimport {\n DirectiveResult,\n DirectiveClass,\n PartInfo,\n AttributePartInfo,\n} from './directive.js';\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\n\nconst {_ChildPart: ChildPart} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\n\nconst ENABLE_SHADYDOM_NOPATCH = true;\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM!.wrap\n : (node: Node) => node;\n\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\n\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n} as const;\n\nexport type TemplateResultType =\n (typeof TemplateResultType)[keyof typeof TemplateResultType];\n\ntype IsTemplateResult = {\n (val: unknown): val is TemplateResult | CompiledTemplateResult;\n <T extends TemplateResultType>(\n val: unknown,\n type: T\n ): val is TemplateResult<T>;\n};\n\n/**\n * Tests if a value is a TemplateResult or a CompiledTemplateResult.\n */\nexport const isTemplateResult: IsTemplateResult = (\n value: unknown,\n type?: TemplateResultType\n): value is TemplateResult =>\n type === undefined\n ? // This property needs to remain unminified.\n (value as TemplateResult)?.['_$litType$'] !== undefined\n : (value as TemplateResult)?.['_$litType$'] === type;\n\n/**\n * Tests if a value is a CompiledTemplateResult.\n */\nexport const isCompiledTemplateResult = (\n value: unknown\n): value is CompiledTemplateResult => {\n return (value as CompiledTemplateResult)?.['_$litType$']?.h != null;\n};\n\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value: unknown): value is DirectiveResult =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'] !== undefined;\n\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value: unknown): DirectiveClass | undefined =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'];\n\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part: PartInfo) =>\n (part as AttributePartInfo).strings === undefined;\n\nconst createMarker = () => document.createComment('');\n\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (\n containerPart: ChildPart,\n refPart?: ChildPart,\n part?: ChildPart\n): ChildPart => {\n const container = wrap(containerPart._$startNode).parentNode!;\n\n const refNode =\n refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(\n startNode,\n endNode,\n containerPart,\n containerPart.options\n );\n } else {\n const endNode = wrap(part._$endNode!).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (\n part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent!._$isConnected\n ) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start: Node | null = part._$startNode;\n while (start !== endNode) {\n const n: Node | null = wrap(start!).nextSibling;\n wrap(container).insertBefore(start!, refNode);\n start = n;\n }\n }\n }\n\n return part;\n};\n\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = <T extends ChildPart>(\n part: T,\n value: unknown,\n directiveParent: DirectiveParent = part\n): T => {\n part._$setValue(value, directiveParent);\n return part;\n};\n\n// A sentinel value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part: Part, value: unknown = RESET_VALUE) =>\n (part._$committedValue = value);\n\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being committed.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part: ChildPart) => part._$committedValue;\n\n/**\n * Removes a ChildPart from the DOM, including any of its content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part: ChildPart) => {\n part._$notifyConnectionChanged?.(false, true);\n let start: ChildNode | null = part._$startNode;\n const end: ChildNode | null = wrap(part._$endNode!).nextSibling;\n while (start !== end) {\n const n: ChildNode | null = wrap(start!).nextSibling;\n (wrap(start!) as ChildNode).remove();\n start = n;\n }\n};\n\nexport const clearPart = (part: ChildPart) => {\n part._$clear();\n};\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ChildPart, noChange} from '../lit-html.js';\nimport {directive, Directive, PartInfo, PartType} from '../directive.js';\nimport {\n insertPart,\n getCommittedValue,\n removePart,\n setCommittedValue,\n setChildPartValue,\n} from '../directive-helpers.js';\n\nexport type KeyFn<T> = (item: T, index: number) => unknown;\nexport type ItemTemplate<T> = (item: T, index: number) => unknown;\n\n// Helper for generating a map of array item to its index over a subset\n// of an array (used to lazily generate `newKeyToIndexMap` and\n// `oldKeyToIndexMap`)\nconst generateMap = (list: unknown[], start: number, end: number) => {\n const map = new Map<unknown, number>();\n for (let i = start; i <= end; i++) {\n map.set(list[i], i);\n }\n return map;\n};\n\nclass RepeatDirective extends Directive {\n private _itemKeys?: unknown[];\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.CHILD) {\n throw new Error('repeat() can only be used in text expressions');\n }\n }\n\n private _getValuesAndKeys<T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ) {\n let keyFn: KeyFn<T> | undefined;\n if (template === undefined) {\n template = keyFnOrTemplate;\n } else if (keyFnOrTemplate !== undefined) {\n keyFn = keyFnOrTemplate as KeyFn<T>;\n }\n const keys = [];\n const values = [];\n let index = 0;\n for (const item of items) {\n keys[index] = keyFn ? keyFn(item, index) : index;\n values[index] = template!(item, index);\n index++;\n }\n return {\n values,\n keys,\n };\n }\n\n render<T>(items: Iterable<T>, template: ItemTemplate<T>): Array<unknown>;\n render<T>(\n items: Iterable<T>,\n keyFn: KeyFn<T> | ItemTemplate<T>,\n template: ItemTemplate<T>\n ): Array<unknown>;\n render<T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ) {\n return this._getValuesAndKeys(items, keyFnOrTemplate, template).values;\n }\n\n override update<T>(\n containerPart: ChildPart,\n [items, keyFnOrTemplate, template]: [\n Iterable<T>,\n KeyFn<T> | ItemTemplate<T>,\n ItemTemplate<T>\n ]\n ) {\n // Old part & key lists are retrieved from the last update (which may\n // be primed by hydration)\n const oldParts = getCommittedValue(\n containerPart\n ) as Array<ChildPart | null>;\n const {values: newValues, keys: newKeys} = this._getValuesAndKeys(\n items,\n keyFnOrTemplate,\n template\n );\n\n // We check that oldParts, the committed value, is an Array as an\n // indicator that the previous value came from a repeat() call. If\n // oldParts is not an Array then this is the first render and we return\n // an array for lit-html's array handling to render, and remember the\n // keys.\n if (!Array.isArray(oldParts)) {\n this._itemKeys = newKeys;\n return newValues;\n }\n\n // In SSR hydration it's possible for oldParts to be an array but for us\n // to not have item keys because the update() hasn't run yet. We set the\n // keys to an empty array. This will cause all oldKey/newKey comparisons\n // to fail and execution to fall to the last nested brach below which\n // reuses the oldPart.\n const oldKeys = (this._itemKeys ??= []);\n\n // New part list will be built up as we go (either reused from\n // old parts or created for new keys in this update). This is\n // saved in the above cache at the end of the update.\n const newParts: ChildPart[] = [];\n\n // Maps from key to index for current and previous update; these\n // are generated lazily only when needed as a performance\n // optimization, since they are only required for multiple\n // non-contiguous changes in the list, which are less common.\n let newKeyToIndexMap!: Map<unknown, number>;\n let oldKeyToIndexMap!: Map<unknown, number>;\n\n // Head and tail pointers to old parts and new values\n let oldHead = 0;\n let oldTail = oldParts.length - 1;\n let newHead = 0;\n let newTail = newValues.length - 1;\n\n // Overview of O(n) reconciliation algorithm (general approach\n // based on ideas found in ivi, vue, snabbdom, etc.):\n //\n // * We start with the list of old parts and new values (and\n // arrays of their respective keys), head/tail pointers into\n // each, and we build up the new list of parts by updating\n // (and when needed, moving) old parts or creating new ones.\n // The initial scenario might look like this (for brevity of\n // the diagrams, the numbers in the array reflect keys\n // associated with the old parts or new values, although keys\n // and parts/values are actually stored in parallel arrays\n // indexed using the same head/tail pointers):\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [ , , , , , , ]\n // newKeys: [0, 2, 1, 4, 3, 7, 6] <- reflects the user's new\n // item order\n // newHead ^ ^ newTail\n //\n // * Iterate old & new lists from both sides, updating,\n // swapping, or removing parts at the head/tail locations\n // until neither head nor tail can move.\n //\n // * Example below: keys at head pointers match, so update old\n // part 0 in-place (no need to move it) and record part 0 in\n // the `newParts` list. The last thing we do is advance the\n // `oldHead` and `newHead` pointers (will be reflected in the\n // next diagram).\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , ] <- heads matched: update 0\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: head pointers don't match, but tail\n // pointers do, so update part 6 in place (no need to move\n // it), and record part 6 in the `newParts` list. Last,\n // advance the `oldTail` and `oldHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- tails matched: update 6\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldTail\n // & newTail\n // newHead ^ ^ newTail\n //\n // * If neither head nor tail match; next check if one of the\n // old head/tail items was removed. We first need to generate\n // the reverse map of new keys to index (`newKeyToIndexMap`),\n // which is done once lazily as a performance optimization,\n // since we only hit this case if multiple non-contiguous\n // changes were made. Note that for contiguous removal\n // anywhere in the list, the head and tails would advance\n // from either end and pass each other before we get to this\n // case and removals would be handled in the final while loop\n // without needing to generate the map.\n //\n // * Example below: The key at `oldTail` was removed (no longer\n // in the `newKeyToIndexMap`), so remove that part from the\n // DOM and advance just the `oldTail` pointer.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- 5 not in new map: remove\n // newKeys: [0, 2, 1, 4, 3, 7, 6] 5 and advance oldTail\n // newHead ^ ^ newTail\n //\n // * Once head and tail cannot move, any mismatches are due to\n // either new or moved items; if a new key is in the previous\n // \"old key to old index\" map, move the old part to the new\n // location, otherwise create and insert a new part. Note\n // that when moving an old part we null its position in the\n // oldParts array if it lies between the head and tail so we\n // know to skip it when the pointers get there.\n //\n // * Example below: neither head nor tail match, and neither\n // were removed; so find the `newHead` key in the\n // `oldKeyToIndexMap`, and move that old part's DOM into the\n // next head position (before `oldParts[oldHead]`). Last,\n // null the part in the `oldPart` array since it was\n // somewhere in the remaining oldParts still to be scanned\n // (between the head and tail pointers) so that we know to\n // skip that old part on future iterations.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, , , , , 6] <- stuck: update & move 2\n // newKeys: [0, 2, 1, 4, 3, 7, 6] into place and advance\n // newHead\n // newHead ^ ^ newTail\n //\n // * Note that for moves/insertions like the one above, a part\n // inserted at the head pointer is inserted before the\n // current `oldParts[oldHead]`, and a part inserted at the\n // tail pointer is inserted before `newParts[newTail+1]`. The\n // seeming asymmetry lies in the fact that new parts are\n // moved into place outside in, so to the right of the head\n // pointer are old parts, and to the right of the tail\n // pointer are new parts.\n //\n // * We always restart back from the top of the algorithm,\n // allowing matching and simple updates in place to\n // continue...\n //\n // * Example below: the head pointers once again match, so\n // simply update part 1 and record it in the `newParts`\n // array. Last, advance both head pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, , , , 6] <- heads matched: update 1\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * As mentioned above, items that were moved as a result of\n // being stuck (the final else clause in the code below) are\n // marked with null, so we always advance old pointers over\n // these so we're comparing the next actual old value on\n // either end.\n //\n // * Example below: `oldHead` is null (already placed in\n // newParts), so advance `oldHead`.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6] <- old head already used:\n // newParts: [0, 2, 1, , , , 6] advance oldHead\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ ^ newTail\n //\n // * Note it's not critical to mark old parts as null when they\n // are moved from head to tail or tail to head, since they\n // will be outside the pointer range and never visited again.\n //\n // * Example below: Here the old tail key matches the new head\n // key, so the part at the `oldTail` position and move its\n // DOM to the new head position (before `oldParts[oldHead]`).\n // Last, advance `oldTail` and `newHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, , , 6] <- old tail matches new\n // newKeys: [0, 2, 1, 4, 3, 7, 6] head: update & move 4,\n // advance oldTail & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: Old and new head keys match, so update the\n // old head part in place, and advance the `oldHead` and\n // `newHead` pointers.\n //\n // oldHead v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, ,6] <- heads match: update 3\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance oldHead &\n // newHead\n // newHead ^ ^ newTail\n //\n // * Once the new or old pointers move past each other then all\n // we have left is additions (if old list exhausted) or\n // removals (if new list exhausted). Those are handled in the\n // final while loops at the end.\n //\n // * Example below: `oldHead` exceeded `oldTail`, so we're done\n // with the main loop. Create the remaining part and insert\n // it at the new head position, and the update is complete.\n //\n // (oldHead > oldTail)\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, 7 ,6] <- create and insert 7\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ newTail\n //\n // * Note that the order of the if/else clauses is not\n // important to the algorithm, as long as the null checks\n // come first (to ensure we're always working on valid old\n // parts) and that the final else clause comes last (since\n // that's where the expensive moves occur). The order of\n // remaining clauses is is just a simple guess at which cases\n // will be most common.\n //\n // * Note, we could calculate the longest\n // increasing subsequence (LIS) of old items in new position,\n // and only move those not in the LIS set. However that costs\n // O(nlogn) time and adds a bit more code, and only helps\n // make rare types of mutations require fewer moves. The\n // above handles removes, adds, reversal, swaps, and single\n // moves of contiguous items in linear time, in the minimum\n // number of moves. As the number of multiple moves where LIS\n // might help approaches a random shuffle, the LIS\n // optimization becomes less helpful, so it seems not worth\n // the code at this point. Could reconsider if a compelling\n // case arises.\n\n while (oldHead <= oldTail && newHead <= newTail) {\n if (oldParts[oldHead] === null) {\n // `null` means old part at head has already been used\n // below; skip\n oldHead++;\n } else if (oldParts[oldTail] === null) {\n // `null` means old part at tail has already been used\n // below; skip\n oldTail--;\n } else if (oldKeys[oldHead] === newKeys[newHead]) {\n // Old head matches new head; update in place\n newParts[newHead] = setChildPartValue(\n oldParts[oldHead]!,\n newValues[newHead]\n );\n oldHead++;\n newHead++;\n } else if (oldKeys[oldTail] === newKeys[newTail]) {\n // Old tail matches new tail; update in place\n newParts[newTail] = setChildPartValue(\n oldParts[oldTail]!,\n newValues[newTail]\n );\n oldTail--;\n newTail--;\n } else if (oldKeys[oldHead] === newKeys[newTail]) {\n // Old head matches new tail; update and move to new tail\n newParts[newTail] = setChildPartValue(\n oldParts[oldHead]!,\n newValues[newTail]\n );\n insertPart(containerPart, newParts[newTail + 1], oldParts[oldHead]!);\n oldHead++;\n newTail--;\n } else if (oldKeys[oldTail] === newKeys[newHead]) {\n // Old tail matches new head; update and move to new head\n newParts[newHead] = setChildPartValue(\n oldParts[oldTail]!,\n newValues[newHead]\n );\n insertPart(containerPart, oldParts[oldHead]!, oldParts[oldTail]!);\n oldTail--;\n newHead++;\n } else {\n if (newKeyToIndexMap === undefined) {\n // Lazily generate key-to-index maps, used for removals &\n // moves below\n newKeyToIndexMap = generateMap(newKeys, newHead, newTail);\n oldKeyToIndexMap = generateMap(oldKeys, oldHead, oldTail);\n }\n if (!newKeyToIndexMap.has(oldKeys[oldHead])) {\n // Old head is no longer in new list; remove\n removePart(oldParts[oldHead]!);\n oldHead++;\n } else if (!newKeyToIndexMap.has(oldKeys[oldTail])) {\n // Old tail is no longer in new list; remove\n removePart(oldParts[oldTail]!);\n oldTail--;\n } else {\n // Any mismatches at this point are due to additions or\n // moves; see if we have an old part we can reuse and move\n // into place\n const oldIndex = oldKeyToIndexMap.get(newKeys[newHead]);\n const oldPart = oldIndex !== undefined ? oldParts[oldIndex] : null;\n if (oldPart === null) {\n // No old part for this value; create a new one and\n // insert it\n const newPart = insertPart(containerPart, oldParts[oldHead]!);\n setChildPartValue(newPart, newValues[newHead]);\n newParts[newHead] = newPart;\n } else {\n // Reuse old part\n newParts[newHead] = setChildPartValue(oldPart, newValues[newHead]);\n insertPart(containerPart, oldParts[oldHead]!, oldPart);\n // This marks the old part as having been used, so that\n // it will be skipped in the first two checks above\n oldParts[oldIndex as number] = null;\n }\n newHead++;\n }\n }\n }\n // Add parts for any remaining new values\n while (newHead <= newTail) {\n // For all remaining additions, we insert before last new\n // tail, since old pointers are no longer valid\n const newPart = insertPart(containerPart, newParts[newTail + 1]);\n setChildPartValue(newPart, newValues[newHead]);\n newParts[newHead++] = newPart;\n }\n // Remove any remaining unused old parts\n while (oldHead <= oldTail) {\n const oldPart = oldParts[oldHead++];\n if (oldPart !== null) {\n removePart(oldPart);\n }\n }\n\n // Save order of new parts for next round\n this._itemKeys = newKeys;\n // Directly set part value, bypassing it's dirty-checking\n setCommittedValue(containerPart, newParts);\n return noChange;\n }\n}\n\nexport interface RepeatDirectiveFn {\n <T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ): unknown;\n <T>(items: Iterable<T>, template: ItemTemplate<T>): unknown;\n <T>(\n items: Iterable<T>,\n keyFn: KeyFn<T> | ItemTemplate<T>,\n template: ItemTemplate<T>\n ): unknown;\n}\n\n/**\n * A directive that repeats a series of values (usually `TemplateResults`)\n * generated from an iterable, and updates those items efficiently when the\n * iterable changes based on user-provided `keys` associated with each item.\n *\n * Note that if a `keyFn` is provided, strict key-to-DOM mapping is maintained,\n * meaning previous DOM for a given key is moved into the new position if\n * needed, and DOM will never be reused with values for different keys (new DOM\n * will always be created for new keys). This is generally the most efficient\n * way to use `repeat` since it performs minimum unnecessary work for insertions\n * and removals.\n *\n * The `keyFn` takes two parameters, the item and its index, and returns a unique key value.\n *\n * ```js\n * html`\n * <ol>\n * ${repeat(this.items, (item) => item.id, (item, index) => {\n * return html`<li>${index}: ${item.name}</li>`;\n * })}\n * </ol>\n * `\n * ```\n *\n * **Important**: If providing a `keyFn`, keys *must* be unique for all items in a\n * given call to `repeat`. The behavior when two or more items have the same key\n * is undefined.\n *\n * If no `keyFn` is provided, this directive will perform similar to mapping\n * items to values, and DOM will be reused against potentially different items.\n */\nexport const repeat = directive(RepeatDirective) as RepeatDirectiveFn;\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {RepeatDirective};\n","import { __decorate } from \"tslib\";\n/* eslint-disable max-classes-per-file */\n/* eslint-disable lit-a11y/list */\nimport { css, html, LitElement, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\n// sort icons\nconst sortAscIcon = html `\n <svg\n name=\"sort-asc\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g fill=\"none\" fill-rule=\"evenodd\">\n <path\n d=\"m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z\"\n fill=\"#fff\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z\"\n fill=\"#fff\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612\"\n stroke=\"#fff\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.661538\"\n transform=\"matrix(1 0 0 -1 0 18.692308)\"\n />\n </g>\n </svg>\n`;\nconst sortDescIcon = html `\n <svg\n name=\"sort-desc\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g fill=\"none\" fill-rule=\"evenodd\">\n <path\n d=\"m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z\"\n fill=\"#fff\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z\"\n fill=\"#fff\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612\"\n stroke=\"#fff\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.661538\"\n />\n </g>\n </svg>\n`;\nconst sortNeutralIcon = html `\n <svg\n name=\"sort-neutral\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g fill=\"#fff\" fill-rule=\"evenodd\">\n <path\n d=\"m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z\"\n fill-rule=\"nonzero\"\n />\n <path\n d=\"m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z\"\n fill-rule=\"nonzero\"\n />\n <circle cx=\"13\" cy=\"9\" r=\"2\" />\n </g>\n </svg>\n`;\n/* icon for menu shortcut & menu icon */\nexport const viewableFilesIcon = html `\n <svg\n height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"volumesTitleID volumesDescID\"\n >\n <title id=\"volumesTitleID\">Viewable Files</title>\n <g fill=\"#ffffff\">\n <path\n fill=\"#ffffff\"\n d=\"m9.83536396 0h10.07241114c.1725502.47117517.3378411.76385809.4958725.87804878.1295523.11419069.3199719.1998337.5712586.25692905.2512868.05709534.4704647.08564301.6575337.08564301h.2806036v15.24362526h-4.3355343v3.8106985h-4.44275v3.7250554h-12.01318261c-.27306495 0-.50313194-.085643-.69020098-.256929-.18706903-.1712861-.30936193-.3425721-.36687867-.5138581l-.06449694-.2785477v-14.2159091c0-.32815965.08627512-.5922949.25882537-.79240577.17255024-.20011086.34510049-.32150776.51765073-.36419068l.25882537-.0640244h3.36472977v-2.54767184c0-.31374722.08627513-.57067627.25882537-.77078714.17255025-.20011086.34510049-.32150776.51765074-.36419068l.25882536-.06402439h3.36472978v-2.56929047c0-.32815964.08627512-.5922949.25882537-.79240576.17255024-.20011087.34510049-.31430156.51765073-.34257207zm10.78355264 15.6294346v-13.53076498c-.2730649-.08536585-.4456152-.16380266-.5176507-.23531042-.1725502-.1424612-.2730649-.27078714-.3015441-.38497783v13.36031043h-9.87808272c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144124-.08962561.006929-.13988296.0640244-.05025735.0570953-.07538603.1427383-.07538603.256929s.02149898.210643.06449694.289357c.04299795.078714.08599591.1322062.12899387.1604767l.06449693.0216187h10.71905571zm-10.2449613-2.4412417h7.98003v-11.60421286h-7.98003zm1.6827837-9.41990022h4.6153002c.1725502 0 .3199718.05349224.4422647.16047672s.1834393.23891353.1834393.39578714c0 .15687362-.0611464.28519956-.1834393.38497783s-.2697145.1496674-.4422647.1496674h-4.6153002c-.1725503 0-.3199719-.04988913-.4422647-.1496674-.1222929-.09977827-.1834394-.22810421-.1834394-.38497783 0-.15687361.0611465-.28880266.1834394-.39578714.1222928-.10698448.2697144-.16047672.4422647-.16047672zm-6.08197737 13.50997782h7.72120467v-.8131929h-3.79610541c-.27306495 0-.49950224-.085643-.67931188-.256929-.17980964-.1712861-.29847284-.3425721-.35598958-.5138581l-.06449694-.2785477v-10.02023282h-2.82530086zm6.77217827-11.36890243h3.2139578c.1295522 0 .240956.05709534.3342113.17128603.0932554.11419069.139883.24972284.139883.40659645 0 .15687362-.0466276.28880267-.139883.39578714-.0932553.10698448-.2046591.16047672-.3342113.16047672h-3.2139578c-.1295523 0-.2373264-.05349224-.3233223-.16047672-.0859959-.10698447-.1289938-.23891352-.1289938-.39578714 0-.15687361.0429979-.29240576.1289938-.40659645s.19377-.17128603.3233223-.17128603zm-11.15043132 15.11557653h7.69942646v-.7491685h-3.79610539c-.25854616 0-.48135376-.0892462-.66842279-.2677384-.18706904-.1784922-.30936193-.3605876-.36687868-.546286l-.06449694-.2569291v-10.04101994h-2.80352266zm14.62237682-4.5606985h-.8191949v2.1410754h-9.89986085s-.04299796.0285477-.12899387.085643c-.08599592.0570954-.12201369.1427384-.10805331.2569291 0 .1141907.01786928.210643.05360784.289357.03573856.0787139.07538603.125.1189424.138858l.06449694.0432373h10.71905575v-2.9542683zm-4.3991936 3.8106985h-.8191949v2.077051h-9.8563045c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144125-.08962561.0105321-.13988296.0748337-.05025735.0643015-.07538603.1607538-.07538603.289357 0 .1141906.02149898.2070399.06449694.2785476.04299795.0715078.08599591.1141907.12899387.1280488l.06449693.0216186h10.69811519v-2.8686252z\"\n />\n </g>\n </svg>\n`;\n/* <iaux-sort-viewable-files> side panel header button */\nlet IauxSortFilesButton = class IauxSortFilesButton extends LitElement {\n constructor() {\n super(...arguments);\n this.fileListRaw = [];\n this.fileListSorted = [];\n this.sortOrderBy = 'default';\n }\n render() {\n return html `<div class=\"sort-multi-file-list\">${this.sortButton}</div>`;\n }\n get sortButton() {\n const sortIcons = {\n default: html `\n <button\n class=\"sort-by neutral-icon\"\n aria-label=\"Sort volumes in initial order\"\n @click=${() => this.sortVolumes('title_asc')}\n >\n ${sortNeutralIcon}\n </button>\n `,\n title_asc: html `\n <button\n class=\"sort-by asc-icon\"\n aria-label=\"Sort volumes in ascending order\"\n @click=${() => this.sortVolumes('title_desc')}\n >\n ${sortAscIcon}\n </button>\n `,\n title_desc: html `\n <button\n class=\"sort-by desc-icon\"\n aria-label=\"Sort volumes in descending order\"\n @click=${() => this.sortVolumes('default')}\n >\n ${sortDescIcon}\n </button>\n `,\n };\n return sortIcons[this.sortOrderBy];\n }\n sortVolumes(sortType) {\n this.sortOrderBy = sortType;\n let sortedFiles = [];\n sortedFiles = this.fileListRaw.sort((a, b) => {\n if (sortType === 'title_asc')\n return a.title.localeCompare(b.title);\n if (sortType === 'title_desc')\n return b.title.localeCompare(a.title);\n return a.orig_sort - b.orig_sort;\n });\n this.dispatchEvent(new CustomEvent('fileListSorted', {\n detail: {\n sortType,\n sortedFiles,\n },\n bubbles: true,\n composed: true,\n }));\n this.fileListSorted = sortedFiles;\n }\n static get styles() {\n return css `\n button.sort-by {\n padding: 0px;\n background-color: transparent;\n border: 0px;\n --iconWidth: var(--menuSliderHeaderIconWidth);\n --iconHeight: var(--menuSliderHeaderIconHeight);\n }\n `;\n }\n};\n__decorate([\n property({ type: Array })\n], IauxSortFilesButton.prototype, \"fileListRaw\", void 0);\n__decorate([\n property({ type: Array })\n], IauxSortFilesButton.prototype, \"fileListSorted\", void 0);\n__decorate([\n property({ type: String, reflect: true })\n], IauxSortFilesButton.prototype, \"sortOrderBy\", void 0);\nIauxSortFilesButton = __decorate([\n customElement('iaux-sort-viewable-files')\n], IauxSortFilesButton);\nexport { IauxSortFilesButton };\n/* <iaux-viewable-files> side panel menu */\nlet IauxViewableFiles = class IauxViewableFiles extends LitElement {\n constructor() {\n super(...arguments);\n this.baseHost = 'archive.org';\n this.sortOrderBy = 'default';\n this.subPrefix = '';\n this.fileList = [];\n this.addSortToUrl = false;\n }\n firstUpdated() {\n const activeFile = this.shadowRoot.querySelector('.content.active');\n // allow for css animations to run before scrolling to active file\n setTimeout(() => {\n // scroll active file into view if needed\n // note: `scrollIntoViewIfNeeded` handles auto-scroll gracefully for Chrome, Safari\n // Firefox does not have this capability yet as it does not support `scrollIntoViewIfNeeded`\n activeFile === null || activeFile === void 0 ? void 0 : activeFile.scrollIntoViewIfNeeded(true);\n // Todo: support `scrollIntoView` or `parentContainer.crollTop = x` for FF & \"IE 11\"\n // currently, the hard `position: absolutes` misaligns subpanel when `scrollIntoView` is applied :(\n }, 350);\n }\n volumeItemWithImageTitle(item) {\n const hrefUrl = this.fileUrl(item);\n return html `\n <li class=\"content active\">\n <div class=\"separator\"></div>\n <a class=\"container\" href=\"${hrefUrl}\">\n <div class=\"image\">\n <img src=\"${item.image}\" alt=\"preview\" />\n </div>\n <div class=\"text\">\n <p class=\"item-title\">${item.title}</p>\n <small>by: ${item.author}</small>\n </div>\n </a>\n </li>\n `;\n }\n fileUrl(item) {\n const baseUrl = `//${this.baseHost}${item.url_path}`;\n let hrefUrl = baseUrl;\n if (this.addSortToUrl) {\n hrefUrl =\n this.sortOrderBy === 'default'\n ? `${baseUrl}`\n : `${baseUrl}?sort=${this.sortOrderBy}`;\n }\n return hrefUrl;\n }\n get pdfLabel() {\n return html `<span class=\"pdf-label\"><span class=\"sr-only\">view this</span> PDF</span>`;\n }\n fileLi(item) {\n var _a;\n const activeClass = this.subPrefix === item.file_subprefix ? ' active' : '';\n const hrefUrl = this.fileUrl(item);\n const isPdf = ((_a = item.file_source) !== null && _a !== void 0 ? _a : '').match(/^[^+]+\\.pdf$/i);\n return html `\n <li>\n <div class=\"separator\"></div>\n <div class=\"content${activeClass}\">\n <a href=${hrefUrl}>\n <p class=\"item-title\">${item.title}${isPdf ? this.pdfLabel : nothing}</p>\n </a>\n </div>\n </li>\n `;\n }\n get fileListTemplate() {\n const filesDisplay = repeat(this.fileList, file => file === null || file === void 0 ? void 0 : file.file_prefix, this.fileLi.bind(this));\n return html `\n <ul>\n ${filesDisplay}\n <div class=\"separator\"></div>\n </ul>\n `;\n }\n render() {\n return html ` ${this.fileList.length ? this.fileListTemplate : nothing} `;\n }\n static get styles() {\n return css `\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-top: 14px;\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n a {\n color: #ffffff;\n text-decoration: none;\n }\n\n img {\n width: 35px;\n height: 45px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n\n ul > li:first-child .separator {\n display: none;\n }\n\n li {\n cursor: pointer;\n outline: none;\n position: relative;\n }\n\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: 0.2rem 0 0.4rem 0.2rem;\n }\n\n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n\n li.content a {\n display: flex;\n }\n\n small {\n font-style: italic;\n white-space: initial;\n }\n\n .container {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .item-title {\n margin-block-start: 0em;\n margin-block-end: 0em;\n font-size: 14px;\n font-weight: bold;\n word-wrap: break-word;\n padding-left: 5px;\n /* display: flex; */\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n .text {\n padding-left: 10px;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: 0.7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n\n .pdf-label {\n border: 1px solid;\n padding: 2px 5px;\n border-radius: 20px;\n display: inline-block;\n margin-left: 5px;\n font-size: 0.9rem;\n }\n\n .pdf-label .sr-only {\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n padding: 0;\n border: 0;\n height: 1px;\n width: 1px;\n overflow: hidden;\n }\n `;\n }\n};\n__decorate([\n property({ type: String })\n], IauxViewableFiles.prototype, \"baseHost\", void 0);\n__decorate([\n property({ type: String })\n], IauxViewableFiles.prototype, \"sortOrderBy\", void 0);\n__decorate([\n property({ type: String })\n], IauxViewableFiles.prototype, \"subPrefix\", void 0);\n__decorate([\n property({ type: Array })\n], IauxViewableFiles.prototype, \"fileList\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], IauxViewableFiles.prototype, \"addSortToUrl\", void 0);\nIauxViewableFiles = __decorate([\n customElement('iaux-viewable-files')\n], IauxViewableFiles);\nexport { IauxViewableFiles };\n//# sourceMappingURL=iaux-viewable-files.js.map","/**\r\n * Configuration to show a modal\r\n *\r\n * @export\r\n * @class ModalConfig\r\n */\r\nexport class ModalConfig {\r\n constructor(options) {\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n this.title = options === null || options === void 0 ? void 0 : options.title;\r\n this.subtitle = options === null || options === void 0 ? void 0 : options.subtitle;\r\n this.headline = options === null || options === void 0 ? void 0 : options.headline;\r\n this.message = options === null || options === void 0 ? void 0 : options.message;\r\n this.headerColor = (_a = options === null || options === void 0 ? void 0 : options.headerColor) !== null && _a !== void 0 ? _a : '#55A183';\r\n this.bodyColor = (_b = options === null || options === void 0 ? void 0 : options.bodyColor) !== null && _b !== void 0 ? _b : '#f5f5f7';\r\n this.showProcessingIndicator = (_c = options === null || options === void 0 ? void 0 : options.showProcessingIndicator) !== null && _c !== void 0 ? _c : false;\r\n this.processingImageMode = (_d = options === null || options === void 0 ? void 0 : options.processingImageMode) !== null && _d !== void 0 ? _d : 'complete';\r\n this.showCloseButton = (_e = options === null || options === void 0 ? void 0 : options.showCloseButton) !== null && _e !== void 0 ? _e : true;\r\n this.showHeaderLogo = (_f = options === null || options === void 0 ? void 0 : options.showHeaderLogo) !== null && _f !== void 0 ? _f : true;\r\n this.closeOnBackdropClick = (_g = options === null || options === void 0 ? void 0 : options.closeOnBackdropClick) !== null && _g !== void 0 ? _g : true;\r\n }\r\n}\r\n//# sourceMappingURL=modal-config.js.map","import { LitElement, html, css } from 'lit';\r\n\r\nconst IAActivityIndicatorMode = Object.freeze({\r\n processing: 'processing',\r\n complete: 'complete',\r\n});\r\n\r\nclass IAActivityIndicator extends LitElement {\r\n static get properties() {\r\n return {\r\n mode: { type: String },\r\n };\r\n }\r\n\r\n constructor() {\r\n super();\r\n this.mode = IAActivityIndicatorMode.processing;\r\n }\r\n\r\n render() {\r\n return html`\r\n <div class=\"${this.mode}\">\r\n <svg\r\n viewBox=\"0 0 120 120\"\r\n preserveAspectRatio=\"none\"\r\n version=\"1.1\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n aria-labelledby=\"indicatorTitle indicatorDescription\"\r\n >\r\n <title id=\"indicatorTitle\">Activity Indicator</title>\r\n <desc id=\"indicatorDescription\">\r\n A rotating activity indicator with three dots in the middle.\r\n </desc>\r\n <g\r\n id=\"icons/check-ring---squared\"\r\n stroke=\"none\"\r\n stroke-width=\"1\"\r\n fill=\"none\"\r\n fill-rule=\"evenodd\"\r\n >\r\n <path\r\n id=\"completed-ring\"\r\n class=\"loaded-indicator\"\r\n d=\"M60,10 C70.5816709,10 80.3955961,13.2871104 88.4763646,18.8959201 L78.3502633,29.0214223 C72.9767592,25.8315427 66.7022695,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 L95.995,59.46 L108.327675,47.128668 C109.350926,50.9806166 109.925886,55.015198 109.993301,59.1731586 L110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z\"\r\n ></path>\r\n <polygon\r\n id=\"check\"\r\n class=\"loaded-indicator\"\r\n transform=\"translate(75.000000, 41.500000) rotate(44.000000) translate(-75.000000, -41.500000) \"\r\n points=\"96 85 54 85 54 65 76 64.999 76 -2 96 -2\"\r\n ></polygon>\r\n <path\r\n id=\"activity-ring\"\r\n class=\"activity-indicator\"\r\n d=\"M60,10 C69.8019971,10 78.9452178,12.8205573 86.6623125,17.6943223 L76.4086287,27.9484118 C71.4880919,25.4243078 65.9103784,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 C96,53.3014663 94.1704984,47.0302355 90.9839104,41.6587228 L101.110332,31.5326452 C106.715332,39.6116982 110,49.4222615 110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z\"\r\n ></path>\r\n <g\r\n id=\"activity-dots\"\r\n class=\"activity-indicator\"\r\n transform=\"translate(40.000000, 55.000000)\"\r\n >\r\n <circle id=\"left-dot\" cx=\"5\" cy=\"5\" r=\"5\"></circle>\r\n <circle id=\"middle-dot\" cx=\"20\" cy=\"5\" r=\"5\"></circle>\r\n <circle id=\"right-dot\" cx=\"35\" cy=\"5\" r=\"5\"></circle>\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n `;\r\n }\r\n\r\n static get styles() {\r\n const checkmarkColorCss = css`var(--activityIndicatorCheckmarkColor, #31A481)`;\r\n const completedRingColorCss = css`var(--activityIndicatorCompletedRingColor, #31A481)`;\r\n const loadingRingColorCss = css`var(--activityIndicatorLoadingRingColor, #333333)`;\r\n const loadingDotColorCss = css`var(--activityIndicatorLoadingDotColor, #333333)`;\r\n\r\n return css`\r\n #completed-ring {\r\n fill: ${completedRingColorCss};\r\n }\r\n\r\n #check {\r\n fill: ${checkmarkColorCss};\r\n }\r\n\r\n #activity-ring {\r\n fill: ${loadingRingColorCss};\r\n }\r\n\r\n #activity-dots {\r\n fill: ${loadingDotColorCss};\r\n }\r\n\r\n .activity-indicator {\r\n opacity: 0;\r\n transition: opacity 0.25s ease-out;\r\n }\r\n\r\n .processing .activity-indicator {\r\n opacity: 1;\r\n }\r\n\r\n .loaded-indicator {\r\n opacity: 1;\r\n transition: opacity 0.25s ease-out;\r\n }\r\n\r\n .processing .loaded-indicator {\r\n opacity: 0;\r\n }\r\n\r\n .image {\r\n border: 1px solid red;\r\n display: inline-block;\r\n }\r\n\r\n .processing #activity-ring {\r\n animation: rotate 1.3s infinite linear;\r\n transform-origin: 50px 50px;\r\n transform-box: fill-box;\r\n }\r\n\r\n .processing #left-dot {\r\n opacity: 0;\r\n animation: dot 1.3s infinite;\r\n animation-delay: 0.2s;\r\n }\r\n\r\n .processing #middle-dot {\r\n opacity: 0;\r\n animation: dot 1.3s infinite;\r\n animation-delay: 0.4s;\r\n }\r\n\r\n .processing #right-dot {\r\n opacity: 0;\r\n animation: dot 1.3s infinite;\r\n animation-delay: 0.6s;\r\n }\r\n\r\n @keyframes rotate {\r\n 0% {\r\n transform: rotate(-360deg);\r\n }\r\n 100% {\r\n /* This frame is supposed to be inferred, but Safari doesn't rotate it unless we're explicit */\r\n transform: rotate(0deg);\r\n }\r\n }\r\n\r\n @keyframes dot {\r\n 0% {\r\n opacity: 0;\r\n }\r\n 25% {\r\n opacity: 1;\r\n }\r\n 100% {\r\n opacity: 0;\r\n }\r\n }\r\n `;\r\n }\r\n}\r\n\r\nexport { IAActivityIndicator, IAActivityIndicatorMode };\r\n","import { IAActivityIndicator } from './src/ia-activity-indicator.js';\r\n\r\nwindow.customElements.define('ia-activity-indicator', IAActivityIndicator);\r\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"closeTitleID closeDescID\"\n>\n <title id=\"closeTitleID\">Close icon</title>\n <desc id=\"closeDescID\">A line drawing of an X</desc>\n <path d=\"m29.1923882 10.8076118c.5857864.5857865.5857864 1.535534 0 2.1213204l-7.0711162 7.0703398 7.0711162 7.0717958c.5857864.5857864.5857864 1.5355339 0 2.1213204-.5857865.5857864-1.535534.5857864-2.1213204 0l-7.0717958-7.0711162-7.0703398 7.0711162c-.5857864.5857864-1.5355339.5857864-2.1213204 0-.5857864-.5857865-.5857864-1.535534 0-2.1213204l7.0706602-7.0717958-7.0706602-7.0703398c-.5857864-.5857864-.5857864-1.5355339 0-2.1213204.5857865-.5857864 1.535534-.5857864 2.1213204 0l7.0703398 7.0706602 7.0717958-7.0706602c.5857864-.5857864 1.5355339-.5857864 2.1213204 0z\" class=\"fill-color\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import { html } from 'lit';\n\nexport default html`\n<svg\n class=\"ia-logo\"\n viewBox=\"0 0 27 30\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"logoTitleID logoDescID\"\n>\n <title id=\"logoTitleID\">Internet Archive logo</title>\n <desc id=\"logoDescID\">A line drawing of the Internet Archive headquarters building façade.</desc>\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <mask id=\"mask-2\" class=\"fill-color\">\n <path d=\"M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z\" id=\"path-1\"></path>\n </mask>\n <use class=\"fill-color\" xlink:href=\"#path-1\"></use>\n <g mask=\"url(#mask-2)\" class=\"fill-color\">\n <path d=\"M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z\" id=\"swatch\"></path>\n </g>\n </g>\n</svg>\n`;\n","import { __decorate } from \"tslib\";\r\nimport { LitElement, html, css, nothing } from 'lit';\r\nimport { property, customElement } from 'lit/decorators.js';\r\nimport '@internetarchive/ia-activity-indicator/ia-activity-indicator';\r\nimport closeIcon from '@internetarchive/icon-close/index.js';\r\nimport iaIcon from '@internetarchive/icon-ia-logo/index.js';\r\nimport { ModalConfig } from './modal-config';\r\nlet ModalTemplate = class ModalTemplate extends LitElement {\r\n constructor() {\r\n super(...arguments);\r\n /**\r\n * The ModalConfig that displayed the template\r\n *\r\n * @type {ModalConfig}\r\n * @memberof ModalTemplate\r\n */\r\n this.config = new ModalConfig();\r\n }\r\n /** @inheritdoc */\r\n render() {\r\n return html `\r\n <div class=\"modal-wrapper\">\r\n <div class=\"modal-container\">\r\n <header style=\"background-color: ${this.config.headerColor}\">\r\n ${this.config.showCloseButton ? this.closeButtonTemplate : ''}\r\n ${this.config.showHeaderLogo\r\n ? html `<div class=\"logo-icon\">${iaIcon}</div>`\r\n : nothing}\r\n ${this.config.title\r\n ? html `<h1 class=\"title\">${this.config.title}</h1>`\r\n : ''}\r\n ${this.config.subtitle\r\n ? html `<h2 class=\"subtitle\">${this.config.subtitle}</h2>`\r\n : ''}\r\n </header>\r\n <section\r\n class=\"modal-body\"\r\n style=\"background-color: ${this.config.bodyColor}\"\r\n >\r\n <div class=\"content\">\r\n <div\r\n class=\"processing-logo ${this.config.showProcessingIndicator\r\n ? ''\r\n : 'hidden'}\"\r\n >\r\n <ia-activity-indicator\r\n .mode=${this.config.processingImageMode}\r\n ></ia-activity-indicator>\r\n </div>\r\n ${this.config.headline\r\n ? html ` <h1 class=\"headline\">${this.config.headline}</h1> `\r\n : ''}\r\n ${this.config.message\r\n ? html ` <p class=\"message\">${this.config.message}</p> `\r\n : ''}\r\n\r\n <div class=\"slot-container\">\r\n <slot> </slot>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n `;\r\n }\r\n /**\r\n * Dispatch the `closeButtonPressed` event to the consumer\r\n *\r\n * @private\r\n * @memberof ModalTemplate\r\n */\r\n handleCloseButton() {\r\n const event = new Event('closeButtonPressed');\r\n this.dispatchEvent(event);\r\n }\r\n /**\r\n * The close button template\r\n *\r\n * @readonly\r\n * @private\r\n * @type {TemplateResult}\r\n * @memberof ModalTemplate\r\n */\r\n get closeButtonTemplate() {\r\n return html `\r\n <button\r\n type=\"button\"\r\n class=\"close-button\"\r\n tabindex=\"0\"\r\n @click=${this.handleCloseButton}\r\n >\r\n ${closeIcon}\r\n </button>\r\n `;\r\n }\r\n /** @inheritdoc */\r\n static get styles() {\r\n const modalLogoSize = css `var(--modalLogoSize, 6.5rem)`;\r\n const processingImageSize = css `var(--processingImageSize, 7.5rem)`;\r\n const modalCornerRadius = css `var(--modalCornerRadius, 1rem)`;\r\n const modalBorder = css `var(--modalBorder, 2px solid black)`;\r\n // if the content of the modal is too big to fit on screen, this sets the bottom margin\r\n // it's not exact, but a close estimation\r\n const modalBottomMarginCss = css `var(--modalBottomMargin, 2.5rem)`;\r\n const modalTopMarginCss = css `var(--modalTopMargin, 5rem)`;\r\n const modalHeaderBottomPaddingCss = css `var(--modalHeaderBottomPadding, 0.5em)`;\r\n const modalBottomPadding = css `var(--modalBottomPadding, 2rem)`;\r\n const scrollOffset = css `var(--modalScrollOffset, 5px)`;\r\n const titleFontSize = css `var(--modalTitleFontSize, 1.8rem)`;\r\n const subtitleFontSize = css `var(--modalSubtitleFontSize, 1.4rem)`;\r\n const headlineFontSize = css `var(--modalHeadlineFontSize, 1.6rem)`;\r\n const messageFontSize = css `var(--modalMessageFontSize, 1.4rem)`;\r\n const titleLineHeight = css `var(--modalTitleLineHeight, normal)`;\r\n const subtitleLineHeight = css `var(--modalSubtitleLineHeight, normal)`;\r\n const headlineLineHeight = css `var(--modalHeadlineLineHeight, normal)`;\r\n const messageLineHeight = css `var(--modalMessageLineHeight, normal)`;\r\n return css `\r\n .processing-logo {\r\n margin: auto;\r\n width: ${processingImageSize};\r\n height: ${processingImageSize};\r\n }\r\n\r\n .processing-logo.hidden {\r\n height: 1rem;\r\n }\r\n\r\n .processing-logo.hidden ia-activity-indicator {\r\n display: none;\r\n }\r\n\r\n .modal-wrapper {\r\n outline: none;\r\n }\r\n\r\n .modal-container {\r\n border-radius: ${modalCornerRadius};\r\n width: 100%;\r\n margin-top: ${modalTopMarginCss};\r\n }\r\n\r\n header {\r\n position: relative;\r\n background-color: #36a483;\r\n color: white;\r\n border-radius: calc(${modalCornerRadius}) calc(${modalCornerRadius}) 0 0;\r\n border: ${modalBorder};\r\n border-bottom: 0;\r\n text-align: center;\r\n padding-bottom: ${modalHeaderBottomPaddingCss};\r\n }\r\n\r\n .title {\r\n margin: 0;\r\n padding: 0;\r\n font-size: ${titleFontSize};\r\n font-weight: bold;\r\n line-height: ${titleLineHeight};\r\n }\r\n\r\n .subtitle {\r\n margin: 0;\r\n padding: 0;\r\n font-weight: normal;\r\n padding-top: 0;\r\n font-size: ${subtitleFontSize};\r\n line-height: ${subtitleLineHeight};\r\n }\r\n\r\n .modal-body {\r\n background-color: #f5f5f7;\r\n border-radius: 0 0 calc(${modalCornerRadius}) calc(${modalCornerRadius});\r\n border: ${modalBorder};\r\n border-top: 0;\r\n padding: 0 1rem calc(${modalBottomPadding} - ${scrollOffset}) 1rem;\r\n color: #333;\r\n margin-bottom: 2.5rem;\r\n min-height: 5rem;\r\n }\r\n\r\n .content {\r\n overflow-y: auto;\r\n max-height: calc(100vh - (16.5rem + ${modalBottomMarginCss}));\r\n min-height: 5rem;\r\n padding: 0 0 calc(${scrollOffset}) 0;\r\n }\r\n\r\n .headline {\r\n font-size: ${headlineFontSize};\r\n font-weight: bold;\r\n text-align: center;\r\n line-height: ${headlineLineHeight};\r\n margin: 0;\r\n padding: 0;\r\n }\r\n\r\n .message {\r\n margin: 1rem 0 0 0;\r\n text-align: center;\r\n font-size: ${messageFontSize};\r\n line-height: ${messageLineHeight};\r\n }\r\n\r\n .logo-icon {\r\n border-radius: 100%;\r\n border: 3px solid #fff;\r\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),\r\n 0 2px 2px 0 rgba(0, 0, 0, 0.08);\r\n width: ${modalLogoSize};\r\n height: ${modalLogoSize};\r\n margin: -2.9rem auto 0.5rem auto;\r\n background-color: black;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .logo-icon svg {\r\n width: calc(${modalLogoSize} * 0.65);\r\n height: calc(${modalLogoSize} * 0.65);\r\n }\r\n\r\n .logo-icon svg .fill-color {\r\n fill: white;\r\n }\r\n\r\n .logo-icon svg .stroke-color {\r\n stroke: red;\r\n }\r\n\r\n .close-button {\r\n position: absolute;\r\n right: 1.2rem;\r\n top: 1.2rem;\r\n width: 2rem;\r\n height: 2rem;\r\n border-radius: 100%;\r\n border: 0;\r\n padding: 0;\r\n cursor: pointer;\r\n background-color: white;\r\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),\r\n 0 4px 4px 0 rgba(0, 0, 0, 0.08);\r\n }\r\n\r\n .sr-only {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n }\r\n\r\n slot::slotted(.sr-only) {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n }\r\n `;\r\n }\r\n};\r\n__decorate([\r\n property({ type: Object })\r\n], ModalTemplate.prototype, \"config\", void 0);\r\nModalTemplate = __decorate([\r\n customElement('modal-template')\r\n], ModalTemplate);\r\nexport { ModalTemplate };\r\n//# sourceMappingURL=modal-template.js.map","/**\r\n * Various modes the modal can be in\r\n *\r\n * @export\r\n * @enum {number}\r\n */\r\nexport var ModalManagerMode;\r\n(function (ModalManagerMode) {\r\n ModalManagerMode[\"Open\"] = \"open\";\r\n ModalManagerMode[\"Closed\"] = \"closed\";\r\n})(ModalManagerMode || (ModalManagerMode = {}));\r\n//# sourceMappingURL=modal-manager-mode.js.map","import { throttle } from 'throttle-debounce';\r\nimport { ModalManagerMode } from './modal-manager-mode';\r\n/**\r\n * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the\r\n * host that sets up environment-specific changes when the modal opens and closes.\r\n *\r\n * For instance, when the modal opens, this adds a class to the `<body>` tag for styling\r\n * and adds a `resize` listener to fix a Safari shadow root issue.\r\n *\r\n * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass\r\n * them into the `ModalManager` if this one does not work for their environment.\r\n *\r\n * @export\r\n * @class ModalManagerHostBridge\r\n * @implements {ModalManagerHostBridgeInterface}\r\n */\r\nexport class ModalManagerHostBridge {\r\n constructor(modalManager) {\r\n this.windowResizeThrottler = throttle(100, this.updateModalContainerHeight, { noLeading: false, noTrailing: false }).bind(this);\r\n this.modalManager = modalManager;\r\n }\r\n /**\r\n * Handle the mode change\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n handleModeChange(mode) {\r\n switch (mode) {\r\n case ModalManagerMode.Open:\r\n this.startResizeListener();\r\n this.stopDocumentScroll();\r\n break;\r\n case ModalManagerMode.Closed:\r\n this.stopResizeListener();\r\n this.resumeDocumentScroll();\r\n break;\r\n }\r\n }\r\n // This is a workaround for Safari. Safari does not update shadowRoot elements calculated\r\n // based on the viewport size (ie. `calc(100vh - 10px)`). It does an initial calculation correctly,\r\n // but resizing the window does not cause the calculation to update. Firefox and Chrome both handle\r\n // this correctly.\r\n // It doesn't matter what css variable you set, it is just forcing Safari to do an update.\r\n // Also note that the value has to change on each update for Safari to do the update,\r\n // ie. you can't just set a static value.\r\n updateModalContainerHeight() {\r\n this.modalManager.style.setProperty('--containerHeight', `${window.innerHeight}px`);\r\n }\r\n stopDocumentScroll() {\r\n document.body.classList.add('modal-manager-open');\r\n }\r\n resumeDocumentScroll() {\r\n document.body.classList.remove('modal-manager-open');\r\n }\r\n startResizeListener() {\r\n window.addEventListener('resize', this.windowResizeThrottler);\r\n }\r\n stopResizeListener() {\r\n window.removeEventListener('resize', this.windowResizeThrottler);\r\n }\r\n}\r\n//# sourceMappingURL=modal-manager-host-bridge.js.map","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)\n * are most useful.\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,\n * as-is, to `callback` when the throttled-function is executed.\n * @param {object} [options] - An object to configure options.\n * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds\n * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed\n * one final time after the last throttled-function call. (After the throttled-function has not been called for\n * `delay` milliseconds, the internal counter is reset).\n * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback\n * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that\n * callback will never executed if both noLeading = true and noTrailing = true.\n * @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is\n * false (at end), schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function} A new, throttled, function.\n */\nfunction throttle (delay, callback, options) {\n var _ref = options || {},\n _ref$noTrailing = _ref.noTrailing,\n noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,\n _ref$noLeading = _ref.noLeading,\n noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,\n _ref$debounceMode = _ref.debounceMode,\n debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n\n\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel(options) {\n var _ref2 = options || {},\n _ref2$upcomingOnly = _ref2.upcomingOnly,\n upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;\n\n clearExistingTimeout();\n cancelled = !upcomingOnly;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n\n function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (!noLeading && debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`\n * and noLeading != true.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n if (noLeading) {\n /*\n * In throttle mode with noLeading, if `delay` time has\n * been exceeded, update `lastExec` and schedule `callback`\n * to execute after `delay` ms.\n */\n lastExec = Date.now();\n\n if (!noTrailing) {\n timeoutID = setTimeout(debounceMode ? clear : exec, delay);\n }\n } else {\n /*\n * In throttle mode without noLeading, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n }\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n}\n\n/* eslint-disable no-undefined */\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n * @param {object} [options] - An object to configure options.\n * @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n *\n * @returns {Function} A new, debounced function.\n */\n\nfunction debounce (delay, callback, options) {\n var _ref = options || {},\n _ref$atBegin = _ref.atBegin,\n atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;\n\n return throttle(delay, callback, {\n debounceMode: atBegin !== false\n });\n}\n\nexport { debounce, throttle };\n//# sourceMappingURL=index.js.map\n","import { __awaiter, __decorate } from \"tslib\";\r\nimport { LitElement, html, css, } from 'lit';\r\nimport { property, customElement, query } from 'lit/decorators.js';\r\nimport './modal-template';\r\nimport { ModalManagerHostBridge } from './modal-manager-host-bridge';\r\nimport { ModalManagerMode } from './modal-manager-mode';\r\nlet ModalManager = class ModalManager extends LitElement {\r\n constructor() {\r\n super(...arguments);\r\n /**\r\n * The current mode of the ModalManager\r\n *\r\n * Current options are `modal` or `closed`\r\n *\r\n * @type {ModalManagerMode}\r\n * @memberof ModalManager\r\n */\r\n this.mode = ModalManagerMode.Closed;\r\n /**\r\n * Thie hostBridge handles environmental-specific interactions such as adding classes\r\n * to the body tag or event listeners needed to support the modal manager in the host environment.\r\n *\r\n * There is a default `ModalManagerHostBridge`, but consumers can override it with a custom\r\n * `ModalManagerHostBridgeInterface`\r\n *\r\n * @type {ModalManagerHostBridgeInterface}\r\n * @memberof ModalManager\r\n */\r\n this.hostBridge = new ModalManagerHostBridge(this);\r\n /**\r\n * Whether the modal should close if the user taps on the backdrop\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n this.closeOnBackdropClick = true;\r\n }\r\n /** @inheritdoc */\r\n render() {\r\n return html `\r\n <div class=\"container\">\r\n <div class=\"backdrop\" @click=${this.backdropClicked}></div>\r\n <modal-template\r\n @closeButtonPressed=${this.closeButtonPressed}\r\n tabindex=\"0\"\r\n >\r\n ${this.customModalContent}\r\n </modal-template>\r\n </div>\r\n `;\r\n }\r\n /** @inheritdoc */\r\n getMode() {\r\n return this.mode;\r\n }\r\n /** @inheritdoc */\r\n closeModal() {\r\n this.mode = ModalManagerMode.Closed;\r\n }\r\n /**\r\n * Call the userClosedModalCallback and reset it if it exists\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n callUserClosedModalCallback() {\r\n // we assign the callback to a temp var and undefine it before calling it\r\n // otherwise, we run into the potential for an infinite loop if the\r\n // callback triggers another `showModal()`, which would execute `userClosedModalCallback`\r\n const callback = this.userClosedModalCallback;\r\n this.userClosedModalCallback = undefined;\r\n if (callback)\r\n callback();\r\n }\r\n /** @inheritdoc */\r\n showModal(options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.closeOnBackdropClick = options.config.closeOnBackdropClick;\r\n this.userClosedModalCallback = options.userClosedModalCallback;\r\n this.modalTemplate.config = options.config;\r\n this.customModalContent = options.customModalContent;\r\n this.mode = ModalManagerMode.Open;\r\n yield this.modalTemplate.updateComplete;\r\n this.modalTemplate.focus();\r\n });\r\n }\r\n /** @inheritdoc */\r\n updated(changed) {\r\n /* istanbul ignore else */\r\n if (changed.has('mode')) {\r\n this.handleModeChange();\r\n }\r\n }\r\n /**\r\n * Called when the backdrop is clicked\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n backdropClicked() {\r\n if (this.closeOnBackdropClick) {\r\n this.closeModal();\r\n this.callUserClosedModalCallback();\r\n }\r\n }\r\n /**\r\n * Handle the mode change\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n handleModeChange() {\r\n this.hostBridge.handleModeChange(this.mode);\r\n this.emitModeChangeEvent();\r\n }\r\n /**\r\n * Emit a modeChange event\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n emitModeChangeEvent() {\r\n const event = new CustomEvent('modeChanged', {\r\n detail: { mode: this.mode },\r\n });\r\n this.dispatchEvent(event);\r\n }\r\n /**\r\n * Called when the modal close button is pressed. Closes the modal.\r\n *\r\n * @private\r\n * @memberof ModalManager\r\n */\r\n closeButtonPressed() {\r\n this.closeModal();\r\n this.callUserClosedModalCallback();\r\n }\r\n /** @inheritdoc */\r\n static get styles() {\r\n const modalBackdropColor = css `var(--modalBackdropColor, rgba(10, 10, 10, 0.9))`;\r\n const modalBackdropZindex = css `var(--modalBackdropZindex, 1000)`;\r\n const modalWidth = css `var(--modalWidth, 32rem)`;\r\n const modalMaxWidth = css `var(--modalMaxWidth, 95%)`;\r\n const modalZindex = css `var(--modalZindex, 2000)`;\r\n return css `\r\n .container {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n\r\n .backdrop {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n background-color: ${modalBackdropColor};\r\n width: 100%;\r\n height: 100%;\r\n z-index: ${modalBackdropZindex};\r\n }\r\n\r\n modal-template {\r\n outline: 0;\r\n position: fixed;\r\n top: 0;\r\n left: 50%;\r\n transform: translate(-50%, 0);\r\n z-index: ${modalZindex};\r\n width: ${modalWidth};\r\n max-width: ${modalMaxWidth};\r\n }\r\n `;\r\n }\r\n};\r\n__decorate([\r\n property({ type: String, reflect: true })\r\n], ModalManager.prototype, \"mode\", void 0);\r\n__decorate([\r\n property({ type: Object })\r\n], ModalManager.prototype, \"customModalContent\", void 0);\r\n__decorate([\r\n property({ type: Object })\r\n], ModalManager.prototype, \"hostBridge\", void 0);\r\n__decorate([\r\n query('modal-template')\r\n], ModalManager.prototype, \"modalTemplate\", void 0);\r\nModalManager = __decorate([\r\n customElement('modal-manager')\r\n], ModalManager);\r\nexport { ModalManager };\r\n//# sourceMappingURL=modal-manager.js.map","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"searchTitleID searchDescID\"\n>\n <title id=\"searchTitleID\">Search icon</title>\n <desc id=\"searchDescID\">Search for something.</desc>\n <path\n class=\"fill-color\"\n fill=\"none\"\n d=\"m17.0555551 41.3194459c0-12.7430552 10.3541664-23.1027772 23.0847216-23.1027772 12.7166664 0 23.0777773 10.359722 23.0777773 23.1027772 0 12.7361108-10.3611109 23.0986106-23.0777773 23.0986106-12.7305552 0-23.0847216-10.3624998-23.0847216-23.0986106zm-17.24305512 0c0 22.2916661 18.04583292 40.3472213 40.32777672 40.3472213 8.9208332 0 17.145833-2.9319449 23.8194439-7.8527776l24.1513883 24.0777771c1.2125 1.1402778 2.8430555 1.8430556 4.6374999 1.8430556 3.7444443 0 6.7805554-3.0361111 6.7805554-6.7791665 0-2.0652778-.9222222-3.9069444-2.3736111-5.1499999l-23.718055-23.7458328c4.4152777-6.4791665 7.0152776-14.3055552 7.0152776-22.7402772 0-22.2791661-18.0458328-40.34861006-40.312499-40.34861006-22.2819438 0-40.32777672 18.06944396-40.32777672 40.34861006z\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconSearch extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-search', IAIconSearch);\n\nexport default IAIconSearch;\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing, TemplateResult, noChange} from '../lit-html.js';\nimport {directive, Directive, PartInfo, PartType} from '../directive.js';\n\nconst HTML_RESULT = 1;\n\nexport class UnsafeHTMLDirective extends Directive {\n static directiveName = 'unsafeHTML';\n static resultType = HTML_RESULT;\n\n private _value: unknown = nothing;\n private _templateResult?: TemplateResult;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.CHILD) {\n throw new Error(\n `${\n (this.constructor as typeof UnsafeHTMLDirective).directiveName\n }() can only be used in child bindings`\n );\n }\n }\n\n render(value: string | typeof nothing | typeof noChange | undefined | null) {\n if (value === nothing || value == null) {\n this._templateResult = undefined;\n return (this._value = value);\n }\n if (value === noChange) {\n return value;\n }\n if (typeof value != 'string') {\n throw new Error(\n `${\n (this.constructor as typeof UnsafeHTMLDirective).directiveName\n }() called with a non-string value`\n );\n }\n if (value === this._value) {\n return this._templateResult;\n }\n this._value = value;\n const strings = [value] as unknown as TemplateStringsArray;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (strings as any).raw = strings;\n // WARNING: impersonating a TemplateResult like this is extremely\n // dangerous. Third-party directives should not do this.\n return (this._templateResult = {\n // Cast to a known set of integers that satisfy ResultType so that we\n // don't have to export ResultType and possibly encourage this pattern.\n // This property needs to remain unminified.\n ['_$litType$']: (this.constructor as typeof UnsafeHTMLDirective)\n .resultType as 1 | 2,\n strings,\n values: [],\n });\n }\n}\n\n/**\n * Renders the result as HTML, rather than text.\n *\n * The values `undefined`, `null`, and `nothing`, will all result in no content\n * (empty string) being rendered.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeHTML = directive(UnsafeHTMLDirective);\n","import { css } from 'lit';\n\n// Original SVG object for reference\n// <svg height=\"10\" viewBox=\"0 0 13 10\" width=\"13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m4.33333333 10-4.33333333-4.16666667 1.73333333-1.66666666 2.6 2.5 6.93333337-6.66666667 1.7333333 1.66666667z\" fill=\"#fff\" fill-rule=\"evenodd\"/></svg>\n\nexport default css`data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwIiB2aWV3Qm94PSIwIDAgMTMgMTAiIHdpZHRoPSIxMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNC4zMzMzMzMzMyAxMC00LjMzMzMzMzMzLTQuMTY2NjY2NjcgMS43MzMzMzMzMy0xLjY2NjY2NjY2IDIuNiAyLjUgNi45MzMzMzMzNy02LjY2NjY2NjY3IDEuNzMzMzMzMyAxLjY2NjY2NjY3eiIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+`;\n","import { css } from 'lit';\n\nexport default css`data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDAgNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgYXJpYS1sYWJlbGxlZGJ5PSJjbG9zZVRpdGxlSUQgY2xvc2VEZXNjSUQiPjxwYXRoIGQ9Ik0yOS4xOTIgMTAuODA4YTEuNSAxLjUgMCAwMTAgMi4xMkwyMi4xMjIgMjBsNy4wNyA3LjA3MmExLjUgMS41IDAgMDEtMi4xMiAyLjEyMWwtNy4wNzMtNy4wNy03LjA3IDcuMDdhMS41IDEuNSAwIDAxLTIuMTIxLTIuMTJsNy4wNy03LjA3My03LjA3LTcuMDdhMS41IDEuNSAwIDAxMi4xMi0yLjEyMUwyMCAxNy44NzhsNy4wNzItNy4wN2ExLjUgMS41IDAgMDEyLjEyMSAweiIgY2xhc3M9ImZpbGwtY29sb3IiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==`;\n","import { css } from 'lit';\n\nexport default css`\n .ia-button {\n min-height: 3rem;\n border: none;\n outline: none;\n cursor: pointer;\n color: var(--primaryTextColor);\n line-height: normal;\n border-radius: .4rem;\n text-align: center;\n vertical-align: middle;\n font-size: 1.4rem;\n display: inline-block;\n padding: .6rem 1.2rem;\n border: 1px solid transparent;\n\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n }\n\n .ia-button.link,\n .ia-button.external {\n min-height: unset;\n text-decoration: none;\n }\n\n .ia-button:disabled,\n .ia-button.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .ia-button.transparent {\n background-color: transparent;\n }\n \n .ia-button.slim {\n padding: 0;\n }\n\n .ia-button.primary {\n background-color: var(--primaryCTAFill);\n border-color: var(--primaryCTABorder);\n }\n\n .ia-button.cancel {\n background-color: var(--primaryErrorCTAFill);\n border-color: var(--primaryErrorCTABorder);\n }\n\n .ia-button.external {\n background: var(--secondaryCTAFill);\n border-color: var(--secondaryCTABorder);\n }\n`;\n","/* eslint-disable class-methods-use-this */\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { css, html, LitElement, nothing } from 'lit';\nimport '@internetarchive/ia-activity-indicator/ia-activity-indicator';\nimport checkmarkIcon from '../assets/icon_checkmark.js';\nimport closeIcon from '../assets/icon_close.js';\nimport buttonCSS from '../assets/button-base.js';\n/** @typedef {import('@/src/plugins/search/plugin.search.js').SearchInsideMatch} SearchInsideMatch */\n\nexport class IABookSearchResults extends LitElement {\n static get properties() {\n return {\n results: { type: Array },\n query: { type: String },\n queryInProgress: { type: Boolean },\n renderHeader: { type: Boolean },\n renderSearchAllFiles: { type: Boolean },\n displayResultImages: { type: Boolean },\n errorMessage: { type: String },\n };\n }\n\n constructor() {\n super();\n\n /** @type {SearchInsideMatch[]} */\n this.results = [];\n this.query = '';\n this.queryInProgress = false;\n this.renderHeader = false;\n this.renderSearchAllFields = false;\n this.displayResultImages = false;\n this.errorMessage = '';\n\n this.bindBookReaderListeners();\n }\n\n /** @inheritdoc */\n updated() {\n this.focusOnInputIfNecessary();\n }\n\n bindBookReaderListeners() {\n document.addEventListener('BookReader:SearchCallback', this.setResults.bind(this));\n }\n\n /**\n * Provide immediate input focus if there aren't any results displayed\n */\n focusOnInputIfNecessary() {\n if (this.results.length) {\n return;\n }\n const searchInput = this.shadowRoot.querySelector('input[type=\\'search\\']');\n searchInput.focus();\n }\n\n setResults({ detail }) {\n this.results = detail.results;\n }\n\n setQuery(e) {\n this.query = e.currentTarget.value;\n if (!this.query) {\n this.cancelSearch();\n }\n }\n\n performSearch(e) {\n e.preventDefault();\n const input = e.currentTarget.querySelector('input[type=\"search\"]');\n if (!input || !input.value) {\n return;\n }\n this.dispatchEvent(new CustomEvent('bookSearchInitiated', {\n bubbles: true,\n composed: true,\n detail: {\n query: this.query,\n },\n }));\n }\n\n /**\n * @param {SearchInsideMatch} match\n */\n selectResult(match) {\n this.dispatchEvent(new CustomEvent('resultSelected', {\n bubbles: true,\n composed: true,\n detail: { match },\n }));\n this.dispatchEvent(new CustomEvent('closeMenu', {\n bubbles: true,\n composed: true,\n }));\n }\n\n cancelSearch() {\n this.queryInProgress = false;\n this.dispatchSearchCanceled();\n }\n\n dispatchSearchCanceled() {\n this.dispatchEvent(new Event('bookSearchCanceled'));\n }\n\n get resultsCount() {\n const count = this.results.length;\n return count ? html`<p>(${count} result${count > 1 ? 's' : ''})</p>` : nothing;\n }\n\n get headerSection() {\n const header = html`<header>\n <h3>Search inside</h3>\n ${this.resultsCount}\n </header>`;\n return this.renderHeader ? header : nothing;\n }\n\n get searchMultipleControls() {\n const controls = html`\n <input name=\"all_files\" id=\"all_files\" type=\"checkbox\" />\n <label class=\"checkbox\" for=\"all_files\">Search all files</label>\n `;\n return this.renderSearchAllFiles ? controls : nothing;\n }\n\n get loadingIndicator() {\n return html`\n <div class=\"loading\">\n <ia-activity-indicator mode=\"processing\"></ia-activity-indicator>\n <p>Searching</p>\n <button class=\"ia-button external cancel-search\" @click=${this.cancelSearch}>Cancel</button>\n </div>\n `;\n }\n\n get resultsSet() {\n const resultsClass = this.displayResultImages ? 'show-image' : '';\n return html`\n <ul class=\"results ${resultsClass}\">\n ${this.results.map(match => html`\n <li @click=${this.selectResult.bind(this, match)}>\n ${match.cover ? html`<img src=\"${match.cover}\" />` : nothing}\n <h4>${match.title || nothing}</h4>\n <p class=\"page-num\">Page ${match.displayPageNumber}</p>\n <p>${unsafeHTML(match.html)}</p>\n </li>\n `)}\n </ul>\n `;\n }\n\n get searchForm() {\n return html`\n <form action=\"\" method=\"get\" @submit=${this.performSearch}>\n <fieldset>\n ${this.searchMultipleControls}\n <input\n type=\"search\"\n name=\"query\"\n alt=\"Search inside this book.\"\n @keyup=${this.setQuery}\n @search=${this.setQuery}\n .value=${this.query}\n />\n </fieldset>\n </form>\n `;\n }\n\n get setErrorMessage() {\n return html`\n <p class=\"error-message\">${this.errorMessage}</p>\n `;\n }\n\n get searchCTA() {\n return html`<p class=\"search-cta\"><em>Please enter text to search for</em></p>`;\n }\n\n render() {\n const showSearchCTA = (!this.queryInProgress && !this.errorMessage)\n && (!this.queryInProgress && !this.results.length);\n return html`\n ${this.headerSection}\n ${this.searchForm}\n <div class=\"results-container\">\n ${this.queryInProgress ? this.loadingIndicator : nothing}\n ${this.errorMessage ? this.setErrorMessage : nothing}\n ${this.results.length ? this.resultsSet : nothing}\n ${showSearchCTA ? this.searchCTA : nothing}\n </div>\n `;\n }\n\n static get styles() {\n const searchResultText = css`var(--searchResultText, #adaedc)`;\n const searchResultBg = css`var(--searchResultBg, #272958)`;\n const searchResultBorder = css`var(--searchResultBorder, #adaedc)`;\n const activeButtonBg = css`(--tertiaryBGColor, #333)`;\n\n const mainCSS = css`\n :host {\n display: block;\n height: 100%;\n padding: 1.5rem 1rem 2rem 0;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n mark {\n padding: 0 .2rem;\n color: ${searchResultText};\n background: ${searchResultBg};\n border: 1px solid ${searchResultBorder};\n border-radius: 2px;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 2rem;\n }\n\n header {\n display: flex;\n align-items: center;\n padding: 0 2rem 0 0;\n }\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n\n fieldset {\n padding: 0 0 1rem 0;\n border: none;\n }\n\n [type=\"checkbox\"] {\n display: none;\n }\n\n label {\n display: block;\n text-align: center;\n }\n\n label.checkbox {\n padding-bottom: .5rem;\n font-size: 1.6rem;\n line-height: 150%;\n vertical-align: middle;\n }\n\n label.checkbox:after {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n content: \"\";\n border-radius: 2px;\n }\n :checked + label.checkbox:after {\n background-image: url('${checkmarkIcon}');\n }\n\n label.checkbox[for=\"all_files\"]:after {\n background: ${activeButtonBg} 50% 50% no-repeat;\n border: 1px solid var(--primaryTextColor);\n }\n\n [type=\"search\"] {\n color: var(--primaryTextColor);\n border: 1px solid var(--primaryTextColor);\n -webkit-appearance: textfield;\n width: 100%;\n height: 3rem;\n padding: 0 1.5rem;\n box-sizing: border-box;\n font: normal 1.6rem \"Helvetica qNeue\", Helvetica, Arial, sans-serif;\n border-radius: 1.5rem;\n background: transparent;\n }\n [type=\"search\"]:focus {\n outline: none;\n }\n [type=\"search\"]::-webkit-search-cancel-button {\n width: 18px;\n height: 18px;\n -webkit-appearance: none;\n appearance: none;\n -webkit-mask: url('${closeIcon}') 0 0 no-repeat;\n mask: url('${closeIcon}') 0 0 no-repeat;\n -webkit-mask-size: 100%;\n mask-size: 100%;\n background: #fff;\n }\n\n p.page-num {\n font-weight: bold;\n padding-bottom: 0;\n }\n\n p.search-cta {\n text-align: center;\n }\n\n .results-container {\n padding-bottom: 2rem;\n }\n\n ul {\n padding: 0 0 2rem 0;\n margin: 0;\n list-style: none;\n }\n\n ul.show-image li {\n display: grid;\n }\n\n li {\n cursor: pointer;\n grid-template-columns: 30px 1fr;\n grid-gap: 0 .5rem;\n }\n\n li img {\n display: block;\n width: 100%;\n }\n\n li h4 {\n grid-column: 2 / 3;\n padding: 0 0 2rem 0;\n margin: 0;\n font-weight: normal;\n }\n\n li p {\n grid-column: 2 / 3;\n padding: 0 0 1.5rem 0;\n margin: 0;\n font-size: 1.2rem;\n }\n\n .loading {\n text-align: center;\n }\n\n .loading p {\n padding: 0 0 1rem 0;\n margin: 0;\n font-size: 1.2rem;\n }\n\n ia-activity-indicator {\n display: block;\n width: 40px;\n height: 40px;\n margin: 0 auto;\n }\n `;\n return [buttonCSS, mainCSS];\n }\n}\ncustomElements.define('ia-book-search-results', IABookSearchResults);\n","import { html, nothing } from 'lit';\nimport '@internetarchive/icon-search/icon-search';\nimport './search-results';\n/** @typedef {import('@/src/plugins/search/plugin.search.js').SearchInsideMatch} SearchInsideMatch */\n\nlet searchState = {\n query: '',\n results: [],\n resultsCount: 0,\n queryInProgress: false,\n errorMessage: '',\n};\nexport default class SearchProvider {\n constructor({\n onProviderChange,\n bookreader\n }) {\n /* search menu events */\n this.onBookSearchInitiated = this.onBookSearchInitiated.bind(this);\n /* bookreader search events */\n this.onSearchStarted = this.onSearchStarted.bind(this);\n this.onSearchRequestError = this.onSearchRequestError.bind(this);\n this.onSearchResultsClicked = this.onSearchResultsClicked.bind(this);\n this.onSearchResultsChange = this.onSearchResultsChange.bind(this);\n this.onSearchResultsCleared = this.onSearchResultsCleared.bind(this);\n this.searchCanceledInMenu = this.searchCanceledInMenu.bind(this);\n\n /* class methods */\n this.bindEventListeners = this.bindEventListeners.bind(this);\n this.getMenuDetails = this.getMenuDetails.bind(this);\n this.getComponent = this.getComponent.bind(this);\n this.updateMenu = this.updateMenu.bind(this);\n\n this.onProviderChange = onProviderChange;\n /** @type {import('@/src/BookReader.js').default} */\n this.bookreader = bookreader;\n this.icon = html`<ia-icon-search style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon-search>`;\n this.label = 'Search inside';\n this.menuDetails = this.getMenuDetails();\n this.id = 'search';\n this.component = this.getComponent();\n this.bindEventListeners();\n }\n\n getMenuDetails() {\n const { resultsCount, query, queryInProgress } = searchState;\n if (queryInProgress || !query) { return nothing; }\n const unit = resultsCount === 1 ? 'result' : 'results';\n return html`(${resultsCount} ${unit})`;\n }\n\n bindEventListeners() {\n window.addEventListener('BookReader:SearchStarted', this.onSearchStarted);\n window.addEventListener('BookReader:SearchCallback', this.onSearchResultsChange);\n window.addEventListener('BookReader:SearchCallbackEmpty', (event) => { this.onSearchRequestError(event, 'noResults'); });\n window.addEventListener('BookReader:SearchCallbackNotIndexed', (event) => { this.onSearchRequestError(event, 'notIndexed'); });\n window.addEventListener('BookReader:SearchCallbackError', (event) => { this.onSearchRequestError(event); });\n window.addEventListener('BookReader:SearchResultsCleared', () => { this.onSearchResultsCleared(); });\n window.addEventListener('BookReader:SearchCanceled', (e) => { this.onSearchCanceled(e); });\n }\n\n /**\n * Cancel search handler\n * resets `searchState`\n */\n onSearchCanceled() {\n searchState = {\n query: '',\n results: [],\n resultsCount: 0,\n queryInProgress: false,\n errorMessage: '',\n };\n const updateMenuFor = {\n searchCanceled: true\n };\n this.updateMenu(updateMenuFor);\n\n if (this.bookreader.urlPlugin) {\n this.updateSearchInUrl();\n }\n }\n\n onSearchStarted(e) {\n const { term = '', instance } = e.detail.props;\n if (instance) {\n this.bookreader = instance;\n }\n searchState.query = term;\n searchState.results = [];\n searchState.resultsCount = 0;\n searchState.queryInProgress = true;\n searchState.errorMessage = '';\n this.updateMenu();\n }\n\n onBookSearchInitiated({ detail }) {\n searchState.query = detail.query;\n this.bookreader.search(searchState.query);\n }\n\n onSearchRequestError(event, errorType = 'default') {\n const { detail: { props = {} } } = event;\n const { instance = null } = props;\n if (instance) {\n /* keep bookreader instance reference up-to-date */\n this.bookreader = instance;\n }\n const errorMessages = {\n noResults: '0 results',\n notIndexed: `This book hasn't been indexed for searching yet. We've just started indexing it,\n so search should be available soon. Please try again later. Thanks!`,\n default: 'Sorry, there was an error with your search. Please try again.',\n };\n\n const messageToShow = errorMessages[errorType] ?? errorMessages.default;\n searchState.query = instance?.searchResults?.q || '';\n searchState.results = [];\n searchState.resultsCount = 0;\n searchState.queryInProgress = false;\n searchState.errorMessage = html`<p class=\"error\">${messageToShow}</p>`;\n this.updateMenu();\n }\n\n onSearchResultsChange({ detail: { props = {} } }) {\n const { instance = null, results: searchResults = [] } = props;\n if (instance) {\n /* keep bookreader instance reference up-to-date */\n this.bookreader = instance;\n }\n const results = searchResults.matches || [];\n const resultsCount = results.length;\n const query = searchResults.q;\n const queryInProgress = false;\n searchState = { results, resultsCount, query, queryInProgress, errorMessage: '' };\n this.updateMenu();\n }\n\n searchCanceledInMenu() {\n this.bookreader?.cancelSearchRequest();\n }\n\n onSearchResultsCleared() {\n searchState = {\n query: '',\n results: [],\n resultsCount: 0,\n queryInProgress: false,\n errorMessage: '',\n };\n this.updateMenu({ openMenu: false });\n this.bookreader?.searchView?.clearSearchFieldAndResults(false);\n if (this.bookreader.urlPlugin) {\n this.updateSearchInUrl();\n }\n }\n\n /** update URL `q=<term>` query param in URL */\n updateSearchInUrl() {\n if (this.bookreader.urlPlugin) {\n this.bookreader.urlPlugin.pullFromAddressBar();\n if (searchState.query) {\n this.bookreader.urlPlugin.setUrlParam('q', searchState.query);\n } else {\n this.bookreader.urlPlugin.removeUrlParam('q');\n }\n }\n }\n\n /**\n * Relays how to update side menu given the context of a search update\n @param {{searchCanceled: boolean}} searchUpdates\n */\n updateMenu(searchUpdates = {}) {\n this.menuDetails = this.getMenuDetails();\n this.component = this.getComponent();\n this.onProviderChange(this.bookreader, searchUpdates);\n }\n\n getComponent() {\n const { query, results, queryInProgress, errorMessage } = searchState;\n return html`\n <ia-book-search-results\n .query=${query}\n .results=${results}\n .errorMessage=${errorMessage}\n ?queryInProgress=${queryInProgress}\n ?renderSearchAllFiles=${false}\n @resultSelected=${this.onSearchResultsClicked}\n @bookSearchInitiated=${this.onBookSearchInitiated}\n @bookSearchResultsCleared=${this.onSearchResultsCleared}\n @bookSearchCanceled=${this.searchCanceledInMenu}\n ></ia-book-search-results>\n `;\n }\n\n /**\n * @param {{ detail: {match: SearchInsideMatch} }} param0\n */\n onSearchResultsClicked({ detail }) {\n this.bookreader._searchPluginGoToResult(detail.match.matchIndex);\n }\n}\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"downloadTitleID downloadDescID\"\n>\n <title id=\"downloadTitleID\">Download icon</title>\n <desc id=\"downloadDescID\">An arrow pointing downward at an empty document tray</desc>\n <g class=\"fill-color\">\n\n <path d=\"m50 80 33.3333333-43.3333333h-20v-36.6666667h-26.6666666v36.6666667h-20zm50 20v-13.3333333h-100v13.3333333z\"/>\n </g>\n</svg>\n`;\n","import { css, LitElement } from 'lit';\nimport icon from './index.js';\n\nclass IAIconDl extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-dl', IAIconDl);\n\nexport default IAIconDl;\n","import { css, html, LitElement, nothing } from 'lit';\nimport buttonStyles from '../assets/button-base.js';\nexport class IABookDownloads extends LitElement {\n static get properties() {\n return {\n downloads: { type: Array },\n expiration: { type: Number },\n renderHeader: { type: Boolean },\n isBookProtected: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.downloads = [];\n this.expiration = 0;\n this.renderHeader = false;\n this.isBookProtected = false;\n }\n\n get formatsCount() {\n const count = this.downloads.length;\n return count ? html`<p>${count} format${count > 1 ? 's' : ''}</p>` : html``;\n }\n\n get loanExpiryMessage() {\n return this.expiration\n ? html`<h2>These files will expire in ${this.expiration} days.</h2>`\n : html``;\n }\n\n renderDownloadOptions() {\n return this.downloads.map(option => (\n html`\n <li>\n <a class=\"ia-button link primary\" href=\"${option.url}\">Get ${option.type}</a>\n ${option.note ? html`<p>${option.note}</p>` : html``}\n </li>\n `\n ));\n }\n\n /**\n * checks if downloads list contains an LCP option\n * @return {boolean}\n */\n get hasLCPOption() {\n const regex = /^(LCP)/g;\n const lcpAvailable = this.downloads.some(option => option.type?.match(regex));\n return lcpAvailable;\n }\n\n get header() {\n if (!this.renderHeader) {\n return nothing;\n }\n return html`\n <header>\n <h3>Downloadable files</h3>\n ${this.formatsCount}\n </header>\n `;\n }\n\n get accessProtectedBook() {\n return html`\n <p>To access downloaded books, you need Adobe-compliant software on your device. The Internet Archive will administer this loan, but Adobe may also collect some information.</p>\n <a class=\"ia-button external primary\" href=\"https://www.adobe.com/solutions/ebook/digital-editions/download.html\" rel=\"noopener noreferrer\" target=\"_blank\">Install Adobe Digital Editions</a>\n `;\n }\n\n get installSimplyEAldikoThoriumMsg() {\n return html`\n <p>For LCP downloads, make sure you have SimplyE or Aldiko Next installed on mobile or Thorium on desktop.</p>\n <ul>\n <li><a href=\"https://librarysimplified.org/simplye/\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Install SimplyE</a></li>\n <li><a href=\"https://www.demarque.com/en-aldiko\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Install Aldiko</a></li>\n <li><a href=\"https://www.edrlab.org/software/thorium-reader/\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Install Thorium</a></li>\n </ul>\n `;\n }\n\n render() {\n return html`\n ${this.header}\n ${this.loanExpiryMessage}\n <ul>${this.renderDownloadOptions()}</ul>\n ${this.hasLCPOption\n ? this.installSimplyEAldikoThoriumMsg\n : (this.isBookProtected ? this.accessProtectedBook : nothing)\n }\n `;\n }\n\n static get styles() {\n const mainCss = css`\n :host {\n display: block;\n height: 100%;\n padding: 1.5rem 0;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n a.close ia-icon {\n --iconWidth: 18px;\n --iconHeight: 18px;\n }\n a.close {\n justify-self: end;\n }\n\n header {\n display: flex;\n align-items: center;\n padding: 0 2rem;\n }\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n header div {\n display: flex;\n align-items: baseline;\n } \n\n h2 {\n font-size: 1.6rem;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.4rem;\n }\n\n ul {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n p {\n margin: .3rem 0 0 0;\n }\n\n li,\n ul + p {\n padding-bottom: 1.2rem;\n font-size: 1.2rem;\n line-height: 140%;\n }\n `;\n\n return [buttonStyles, mainCss];\n }\n}\ncustomElements.define('ia-book-downloads', IABookDownloads);\n","import { html } from 'lit';\nimport '@internetarchive/icon-dl/icon-dl';\nimport './downloads';\n\nconst menuBase = {\n pdf: {\n type: 'Encrypted Adobe PDF',\n url: '#',\n note: 'PDF files contain high quality images of pages.',\n },\n lcppdf: {\n type: 'Get LCP PDF',\n url: '#',\n note: 'PDF files contain high quality images of pages.',\n },\n lcpepub: {\n type: 'Get LCP ePub',\n url: '#',\n note: 'ePub files are smaller in size, but may contain errors.',\n },\n epub: {\n type: 'Encrypted Adobe ePub',\n url: '#',\n note: 'ePub files are smaller in size, but may contain errors.',\n },\n};\n\nconst publicMenuBase = {\n pdf: \"PDF\",\n epub: \"ePub\",\n lcppdf: \"LCP PDF\",\n lcpepub: \"LCP ePub\",\n};\n\nexport default class DownloadsProvider {\n\n constructor({ bookreader }) {\n this.icon = html`<ia-icon-dl style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon-dl>`;\n this.label = 'Downloadable files';\n this.menuDetails = '';\n this.downloads = [];\n this.id = 'downloads';\n this.component = '';\n this.isBookProtected = bookreader?.options?.isProtected || false;\n }\n\n update(downloadTypes) {\n this.computeAvailableTypes(downloadTypes);\n this.component = this.menu;\n this.component.isBookProtected = this.isBookProtected;\n\n const ending = this.downloads.length === 1 ? '' : 's';\n this.menuDetails = `(${this.downloads.length} format${ending})`;\n }\n\n /**\n * Generates Download Menu Info for available types\n * sets global `downloads`\n * @param availableTypes\n */\n computeAvailableTypes(availableTypes = []) {\n const menuData = availableTypes.reduce((found, incoming = []) => {\n const [ type = '', link = '' ] = incoming;\n const formattedType = type.toLowerCase();\n const downloadOption = menuBase[formattedType] || null;\n\n if (downloadOption) {\n const menuButtonText = this.isBookProtected ? menuBase[formattedType].type : publicMenuBase[formattedType];\n const menuInfo = Object.assign({}, downloadOption, { url: link, type: menuButtonText});\n found.push(menuInfo);\n }\n return found;\n }, []);\n\n this.downloads = menuData;\n }\n\n get menu () {\n return html`<ia-book-downloads .downloads=${this.downloads}></ia-book-downloads>`;\n }\n}\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"visualAdjustmentTitleID visualAdjustmentDescID\"\n>\n <title id=\"visualAdjustmentTitleID\">Visual adjustment</title>\n <desc id=\"visualAdjustmentDescID\">A circle with its left hemisphere filled</desc>\n <path class=\"fill-color\" d=\"m12 0c6.627417 0 12 5.372583 12 12s-5.372583 12-12 12-12-5.372583-12-12 5.372583-12 12-12zm0 2v20l.2664041-.0034797c5.399703-.1412166 9.7335959-4.562751 9.7335959-9.9965203 0-5.5228475-4.4771525-10-10-10z\" fill-rule=\"evenodd\" />\n</svg>\n`;\n","import { css, LitElement } from 'lit';\nimport icon from './index.js';\n\nclass IAIconVisualAdjustment extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-visual-adjustment', IAIconVisualAdjustment);\n\nexport default IAIconVisualAdjustment;\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"magnify-minusTitleID magnify-minusDescID\"\n>\n <title id=\"magnify-minusTitleID\">Zoom out</title>\n <desc id=\"magnify-minusDescID\">Take a look further.</desc>\n <g\n class=\"fill-color\"\n fill=\"none\"\n fill-rule=\"nonzero\"\n >\n <path d=\"m2.3239824 87.3815869 25.8938394-23.8143095c-4.5929593-6.6937643-6.889439-14.1059452-6.889439-22.2365428 0-7.1360431 1.7567382-13.7186647 5.2702146-19.7478649 3.5134763-6.0292002 8.2852035-10.8003118 14.3151815-14.31333499 6.029978-3.51302314 12.6134488-5.26953471 19.7504125-5.26953471s13.7204346 1.75651157 19.7504126 5.26953471c6.029978 3.51302319 10.8017051 8.28413479 14.3151815 14.31333499 3.5134763 6.0292002 5.2702145 12.6118218 5.2702145 19.7478649s-1.7567382 13.7324143-5.2702145 19.7891137c-3.5134764 6.0566994-8.2852035 10.8415607-14.3151815 14.3545838-6.029978 3.5130232-12.6134489 5.2695347-19.7504126 5.2695347-8.5762743 0-16.3217363-2.5723212-23.2363861-7.7169637l-26.3063807 24.2302349c-1.27200216 1.1618413-2.76631826 1.742762-4.48294825 1.742762-1.826641 0-3.38971397-.6496687-4.68921892-1.949006s-1.94925743-2.8622087-1.94925743-4.688614c0-1.9364022.7746608-3.5955208 2.3239824-4.9773557zm58.3436469-19.9162976c7.1919692 0 13.3331041-2.5585716 18.4234048-7.6757149s7.635451-11.2712357 7.635451-18.4622772-2.5451503-13.3313843-7.635451-18.4210284-11.2314356-7.6344661-18.4234048-7.6344661-13.3331042 2.544822-18.4234049 7.6344661-7.635451 11.2299869-7.635451 18.4210284 2.5451503 13.3451339 7.635451 18.4622772 11.2314357 7.6757149 18.4234049 7.6757149zm-14.9374313-21.3256316h31.2878163v-9.5422233h-31.2878163z\"/>\n </g>\n</svg>\n`;\n","import { css, LitElement } from 'lit';\nimport icon from './index.js';\n\nclass IAIconMagnifyMinus extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-magnify-minus', IAIconMagnifyMinus);\n\nexport default IAIconMagnifyMinus;\n","import { html } from 'lit';\n\nexport default html`\n<svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"magnify-plusTitleID magnify-plusDescID\"\n>\n <title id=\"magnify-plusTitleID\">Zoom in</title>\n <desc id=\"magnify-plusDescID\">Take a look closer.</desc>\n <g\n class=\"fill-color\"\n fill=\"none\"\n fill-rule=\"nonzero\"\n >\n <path d=\"m2.40305276 87.4017263 25.81133064-23.7730295c-4.5356618-6.5723551-6.8034928-14.000283-6.8034928-22.2837838 0-7.1236734 1.7429868-13.6948847 5.2289603-19.7136338 3.4859736-6.0187491 8.2577006-10.7953163 14.3151813-14.32970144 6.0574806-3.53438517 12.6547027-5.30157776 19.7916662-5.30157776 10.8429591 0 20.0964884 3.85236545 27.760588 11.5570964 7.6640996 7.7047309 11.4950036 16.9684802 11.4927136 27.791248 0 10.8799585-3.8309059 20.1574336-11.4927136 27.8324254-7.6618077 7.6749917-16.915337 11.5124876-27.760588 11.5124876-8.6312796 0-16.431747-2.5678624-23.4014021-7.7035871l-26.1413636 24.188234c-1.21699671 1.2147305-2.73881553 1.8220957-4.56545649 1.8220957s-3.3897139-.6485425-4.68921882-1.9456276c-1.29950493-1.297085-1.94925739-2.8572473-1.94925739-4.6804867 0-1.8781426.80216353-3.5343852 2.4064906-4.9687279zm58.34020784-19.878343c7.1369635 0 13.264347-2.5678623 18.3821503-7.7035871 5.1178034-5.1357247 7.676705-11.2928753 7.676705-18.4714518s-2.5589016-13.3082755-7.676705-18.3890972c-5.1178033-5.0808217-11.2451868-7.6212325-18.3821503-7.6212325-7.2469746 0-13.4156121 2.5404108-18.5059127 7.6212325s-7.6354509 11.2105207-7.6354509 18.3890972 2.5589016 13.3357271 7.676705 18.4714518c5.1178033 5.1357248 11.2726895 7.7035871 18.4646586 7.7035871zm-13.3594607-21.8685793h10.206958v10.1879511h7.2194718v-10.1879511h10.206958v-7.206028h-10.206958v-10.187951h-7.2194718v10.187951h-10.206958z\"/>\n </g>\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconMagnifyPlus extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-magnify-plus', IAIconMagnifyPlus);\n\nexport default IAIconMagnifyPlus;\n","import { css, html, LitElement } from \"lit\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport { nothing } from \"lit\";\nimport checkmarkIcon from '../assets/icon_checkmark.js';\nimport \"@internetarchive/icon-magnify-minus/icon-magnify-minus\";\nimport \"@internetarchive/icon-magnify-plus/icon-magnify-plus\";\n\nconst namespacedEvent = (eventName) => `visualAdjustment${eventName}`;\n\nconst events = {\n optionChange: namespacedEvent(\"OptionChanged\"),\n zoomIn: namespacedEvent(\"ZoomIn\"),\n zoomOut: namespacedEvent(\"ZoomOut\"),\n};\n\nexport class IABookVisualAdjustments extends LitElement {\n static get properties() {\n return {\n activeCount: { type: Number },\n options: { type: Array },\n renderHeader: { type: Boolean },\n showZoomControls: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n\n this.activeCount = 0;\n this.options = [];\n this.renderHeader = false;\n this.showZoomControls = true;\n }\n\n firstUpdated() {\n this.activeCount = this.activeOptions.length;\n this.emitOptionChangedEvent();\n }\n\n /** Gets list of active options\n * @return array\n */\n get activeOptions() {\n return this.options.reduce(\n (results, option) => (option.active ? [...results, option.id] : results),\n []\n );\n }\n\n /**\n * Returns blob that will be emitted by event\n */\n prepareEventDetails(changedOptionId = \"\") {\n return {\n options: this.options,\n activeCount: this.activeCount,\n changedOptionId,\n };\n }\n\n /**\n * Fires custom event when options change\n * Provides state details: { options, activeCount, changedOptionId }\n *\n * @param { string } changedOptionId\n */\n emitOptionChangedEvent(changedOptionId = \"\") {\n const detail = this.prepareEventDetails(changedOptionId);\n this.dispatchEvent(\n new CustomEvent(events.optionChange, {\n bubbles: true,\n composed: true,\n detail,\n })\n );\n }\n\n emitZoomIn() {\n this.dispatchEvent(new CustomEvent(events.zoomIn));\n }\n\n emitZoomOut() {\n this.dispatchEvent(new CustomEvent(events.zoomOut));\n }\n\n /**\n * Updates adjustment & component state\n * updates params of available ajdustment options list\n * updates active adjustment count\n * triggers custom event\n * @param { string } optionName\n */\n changeActiveStateFor(optionName) {\n const updatedOptions = [...this.options];\n const checkedOption = updatedOptions.find(\n (option) => option.id === optionName\n );\n checkedOption.active = !checkedOption.active;\n this.options = updatedOptions;\n this.activeCount = this.activeOptions.length;\n this.emitOptionChangedEvent(checkedOption.id);\n }\n\n setRangeValue(id, value) {\n const updatedOptions = [...this.options];\n updatedOptions.find((o) => o.id === id).value = value;\n this.options = [...updatedOptions];\n }\n\n /* render */\n rangeSlider(option) {\n return html`\n <div class=${`range${option.active ? \" visible\" : \"\"}`}>\n <input\n type=\"range\"\n name=\"${option.id}_range\"\n min=${option.min || 0}\n max=${option.max || 100}\n step=${option.step || 1}\n .value=${option.value}\n @input=${(e) => this.setRangeValue(option.id, e.target.value)}\n @change=${() => this.emitOptionChangedEvent()}\n />\n <p>${option.value}%</p>\n </div>\n `;\n }\n\n adjustmentCheckbox(option) {\n const formID = `adjustment_${option.id}`;\n return html`<li>\n <label for=\"${formID}\">\n <span class=\"name\">${option.name}</span>\n <input\n type=\"checkbox\"\n name=\"${formID}\"\n id=\"${formID}\"\n @change=${() => this.changeActiveStateFor(option.id)}\n ?checked=${option.active}\n />\n <span class=\"icon\"></span>\n </label>\n ${option.value !== undefined ? this.rangeSlider(option) : nothing}\n </li>`;\n }\n\n get headerSection() {\n const activeAdjustments = this.activeCount\n ? html`<p>(${this.activeCount} active)</p>`\n : nothing;\n const header = html`<header>\n <h3>Visual adjustments</h3>\n ${activeAdjustments}\n </header>`;\n return this.renderHeader ? header : nothing;\n }\n\n get zoomControls() {\n return html`\n <h4>Zoom</h4>\n <button class=\"zoom_out\" @click=${this.emitZoomOut} title=\"zoom out\">\n <ia-icon-magnify-minus></ia-icon-magnify-minus>\n </button>\n <button class=\"zoom_in\" @click=${this.emitZoomIn} title=\"zoom in\">\n <ia-icon-magnify-plus></ia-icon-magnify-plus>\n </button>\n `;\n }\n\n /** @inheritdoc */\n render() {\n return html`\n ${this.headerSection}\n <ul>\n ${repeat(this.options, (option) => option.id, this.adjustmentCheckbox.bind(this))}\n </ul>\n ${this.showZoomControls ? this.zoomControls : nothing}\n `;\n }\n\n static get styles() {\n return css`\n :host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n header {\n display: flex;\n align-items: baseline;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.6rem;\n }\n\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n\n ul {\n padding: 1rem 2rem 0 0;\n list-style: none;\n margin-top: 0;\n }\n\n [type=\"checkbox\"] {\n display: none;\n }\n\n label {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n font-size: 1.4rem;\n font-weight: bold;\n line-height: 150%;\n vertical-align: middle;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n :checked + .icon {\n background-image: url('${checkmarkIcon}');\n }\n\n .range {\n display: none;\n padding-top: .5rem;\n }\n .range.visible {\n display: flex;\n }\n\n .range p {\n margin-left: 1rem;\n }\n\n h4 {\n padding: 1rem 0;\n margin: 0;\n font-size: 1.4rem;\n }\n\n button {\n -webkit-appearance: none;\n appearance: none;\n border: none;\n border-radius: 0;\n background: transparent;\n outline: none;\n cursor: pointer;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n height: 4rem;\n width: 4rem;\n }\n\n button * {\n display: inline-block;\n }`;\n }\n}\ncustomElements.define('ia-book-visual-adjustments', IABookVisualAdjustments);\n","import { html } from 'lit';\nimport '@internetarchive/icon-visual-adjustment/icon-visual-adjustment';\nimport './visual-adjustments';\n\nconst visualAdjustmentOptions = [{\n id: 'brightness',\n name: 'Adjust brightness',\n active: false,\n min: 0,\n max: 150,\n step: 1,\n value: 100,\n}, {\n id: 'contrast',\n name: 'Adjust contrast',\n active: false,\n min: 0,\n max: 150,\n step: 1,\n value: 100,\n}, {\n id: 'invert',\n name: 'Inverted colors (dark mode)',\n active: false,\n}, {\n id: 'grayscale',\n name: 'Grayscale',\n active: false,\n}];\n\nexport default class VisualAdjustmentsProvider {\n constructor(options) {\n const { onProviderChange, bookreader } = options;\n this.onProviderChange = onProviderChange;\n this.bookContainer = bookreader.refs.$brContainer;\n this.bookreader = bookreader;\n\n this.onAdjustmentChange = this.onAdjustmentChange.bind(this);\n this.optionUpdateComplete = this.optionUpdateComplete.bind(this);\n this.updateOptionsCount = this.updateOptionsCount.bind(this);\n this.onZoomIn = this.onZoomIn.bind(this);\n this.onZoomOut = this.onZoomOut.bind(this);\n\n this.activeCount = 0;\n this.icon = html`<ia-icon-visual-adjustment style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon-visual-adjustment>`;\n this.label = 'Visual Adjustments';\n this.menuDetails = this.updateOptionsCount();\n this.id = 'adjustment';\n this.component = html`\n <ia-book-visual-adjustments\n .options=${visualAdjustmentOptions}\n @visualAdjustmentOptionChanged=${this.onAdjustmentChange}\n @visualAdjustmentZoomIn=${this.onZoomIn}\n @visualAdjustmentZoomOut=${this.onZoomOut}\n ></ia-book-visual-adjustments>\n `;\n }\n\n onZoomIn() {\n this.bookreader.zoom(1);\n }\n\n onZoomOut() {\n this.bookreader.zoom(-1);\n }\n\n onAdjustmentChange(event) {\n const { detail } = event;\n const adjustments = {\n brightness: (value) => `brightness(${value}%)`,\n contrast: (value) => `contrast(${value}%)`,\n grayscale: () => 'grayscale(100%)',\n invert: () => 'invert(100%)',\n };\n const filters = detail.options.reduce((values, option) => {\n const newValue = `${option.active ? adjustments[option.id](option.value) : ''}`;\n return newValue ? [...values, newValue] : values;\n }, []).join(' ');\n\n this.bookContainer.css('filter', filters);\n\n this.optionUpdateComplete(event);\n }\n\n optionUpdateComplete(event) {\n this.activeCount = event.detail.activeCount;\n this.updateOptionsCount(event);\n this.onProviderChange();\n }\n\n updateOptionsCount() {\n this.menuDetails = `(${this.activeCount} active)`;\n }\n}\n","import { LitElement, html, css } from 'lit';\n\nexport default class DeleteModalActions extends LitElement {\n static get styles() {\n return css`\n div {\n display: flex;\n justify-content: center;\n padding-top: 2rem;\n }\n\n button {\n appearance: none;\n padding: 0.5rem 1rem;\n margin: 0 .5rem;\n box-sizing: border-box;\n font: 1.3rem \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n color: var(--primaryTextColor);\n border: none;\n border-radius: 4px;\n cursor: pointer;\n background: var(--primaryCTAFill);\n }\n\n .delete {\n background: var(--primaryErrorCTAFill);\n }\n `;\n }\n\n static get properties() {\n return {\n cancelAction: { type: Function },\n deleteAction: { type: Function },\n pageID: { type: String },\n };\n }\n\n render() {\n return html`\n <div>\n <button class=\"delete\" @click=${() => this.deleteAction({ detail: { id: `${this.pageID}` } })}>Delete</button>\n <button @click=${() => this.cancelAction()}>Cancel</button>\n </div>\n `;\n }\n}\n\ncustomElements.define('delete-modal-actions', DeleteModalActions);\n","import { LitElement, html, css } from 'lit';\n\nexport default class BookmarkButton extends LitElement {\n static get styles() {\n return css`\n button {\n -webkit-appearance: none;\n appearance: none;\n outline: 0;\n border: none;\n padding: 0;\n height: 4rem;\n width: 4rem;\n background: transparent;\n cursor: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 16 24' width='16'%3E%3Cg fill='%23333' fill-rule='evenodd'%3E%3Cpath d='m15 0c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1zm-2 2h-10c-.51283584 0-.93550716.38604019-.99327227.88337887l-.00672773.11662113v18l6-4.3181818 6 4.3181818v-18c0-.51283584-.3860402-.93550716-.8833789-.99327227z'/%3E%3Cpath d='m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z' fill-rule='nonzero'/%3E%3C/g%3E%3C/svg%3E\"), pointer;\n position: relative;\n }\n button > * {\n display: block;\n position: absolute;\n top: 0.2rem;\n }\n button.left > * {\n left: 0.2rem;\n }\n\n button.right > * {\n right: 0.2rem;\n }\n `;\n }\n\n static get properties() {\n return {\n side: { type: String },\n state: { type: String },\n };\n }\n\n constructor() {\n super();\n this.state = 'hollow';\n this.side = undefined;\n }\n\n handleClick(e) {\n e.preventDefault();\n this.dispatchEvent(new CustomEvent('bookmarkButtonClicked'));\n }\n\n get title() {\n return `${this.state === 'hollow' ? 'Add' : 'Remove'} bookmark`;\n }\n\n render() {\n const position = this.side || 'right';\n return html`\n <button title=${this.title} @click=${this.handleClick} class=${position}>\n <icon-bookmark state=${this.state}></icon-bookmark>\n </button>\n `;\n }\n}\n\ncustomElements.define('bookmark-button', BookmarkButton);\n","import { LitElement, html } from 'lit';\nimport buttonStyles from '../assets/button-base.js';\n\nclass BookmarksLogin extends LitElement {\n static get properties() {\n return {\n url: { type: String }\n };\n }\n\n static get styles() {\n return buttonStyles;\n }\n\n constructor() {\n super();\n this.url = 'https://archive.org/account/login';\n }\n render() {\n\n return html`\n <p>A free account is required to save and access bookmarks.</p>\n <a class=\"ia-button link primary\" href=\"${this.url}\">Log in</a>\n `;\n }\n}\n\ncustomElements.define('bookmarks-login', BookmarksLogin);\n","import { LitElement, html, css, render } from 'lit';\n// eslint-disable-next-line no-unused-vars\nimport { ModalConfig, ModalManager } from '@internetarchive/modal-manager';\nimport buttonStyles from '../assets/button-base.js';\nimport './bookmarks-loginCTA.js';\n\nconst api = {\n endpoint: '/services/bookmarks.php',\n headers: {\n 'Content-Type': 'application/json',\n },\n delete(page) {\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${page}`, {\n credentials: 'same-origin',\n method: 'DELETE',\n headers: this.headers,\n });\n },\n get(page) {\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${page}`, {\n credentials: 'same-origin',\n method: 'GET',\n headers: this.headers,\n });\n },\n getAll() {\n return fetch(`${this.endpoint}?identifier=${this.identifier}`, {\n credentials: 'same-origin',\n method: 'GET',\n headers: this.headers,\n });\n },\n post(bookmark) {\n return this.sendBookmarkData(bookmark, 'POST');\n },\n put(bookmark) {\n return this.sendBookmarkData(bookmark, 'POST');\n },\n sendBookmarkData(bookmark, method) {\n const notes = {\n note: bookmark.note,\n color: bookmark.color,\n };\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${bookmark.id}`, {\n credentials: 'same-origin',\n method,\n headers: this.headers,\n body: JSON.stringify({\n notes,\n }),\n });\n },\n};\n\nclass IABookmarks extends LitElement {\n static get properties() {\n return {\n activeBookmarkID: { type: String },\n bookmarks: { type: Array },\n bookreader: { type: Object },\n displayMode: { type: String },\n editedBookmark: { type: Object },\n deleteModalConfig: { type: Object},\n modal: { attribute: false },\n loginOptions: { type: Object, attribute: false }\n };\n }\n\n static get styles() {\n const mainCss = css`\n .bookmarks {\n height: 100%;\n overflow: hidden;\n padding-bottom: 20px;\n }\n\n .list ia-bookmark-edit {\n display: none;\n }\n\n .edit ia-bookmarks-list {\n display: none;\n }\n `;\n\n return [buttonStyles, mainCss];\n }\n\n static formatPage(page) {\n return isNaN(+page) ? `(${page.replace(/\\D/g, '')})` : page;\n }\n\n constructor() {\n super();\n this.bookmarks = [];\n this.bookreader = {};\n this.editedBookmark = {};\n /** @type {ModalManager} */\n this.modal = undefined;\n this.loginOptions = {\n loginClicked: () => {},\n loginUrl: '',\n };\n /**\n * Toggles display to either bookmarks or login cta\n * @param {('bookmarks'|'login')} displayMode\n */\n this.displayMode = 'bookmarks';\n\n this.bookmarkColors = [{\n id: 0,\n className: 'red',\n }, {\n id: 1,\n className: 'blue',\n }, {\n id: 2,\n className: 'green',\n }];\n\n // eslint-disable-next-line\n this.defaultColor = this.bookmarkColors[0];\n this.api = api;\n this.deleteModalConfig = new ModalConfig({\n title: 'Delete Bookmark',\n headline: 'This bookmark contains a note. Deleting it will permanently delete the note. Are you sure?',\n headerColor: '#194880',\n });\n }\n\n updated(changed) {\n if (changed.has('displayMode')) {\n this.updateDisplay();\n }\n\n this.emitBookmarksChanged();\n }\n\n setup() {\n this.api.identifier = this.getIdentifier();\n if (this.displayMode === 'login') {\n return;\n }\n this.fetchUserBookmarks();\n this.setBREventListeners();\n }\n\n /**\n * get identifier for current book including sub-files\n *\n * @returns Identifer\n */\n getIdentifier() {\n if (this.bookreader.bookId !== this.bookreader.subPrefix) {\n return `${this.bookreader.bookId}/${this.bookreader.subPrefix}`;\n }\n\n return this.bookreader.bookId;\n }\n\n updateDisplay() {\n if (this.displayMode === 'bookmarks') {\n this.fetchUserBookmarks();\n }\n }\n\n async fetchUserBookmarks() {\n if (!this.api.identifier) {\n return;\n }\n await this.fetchBookmarks();\n this.initializeBookmarks();\n }\n\n setBREventListeners() {\n ['3PageViewSelected'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, (e) => {\n setTimeout(() => {\n // wait a lil bit so bookreader can draw its DOM to attach onto\n this.renderBookmarkButtons();\n }, 100);\n });\n });\n ['pageChanged', '1PageViewSelected', '2PageViewSelected'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, (e) => {\n setTimeout(() => {\n // wait a lil bit so bookreader can draw its DOM to attach onto\n this.renderBookmarkButtons();\n this.markActiveBookmark();\n }, 100);\n });\n });\n ['zoomOut', 'zoomIn', 'resize'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, () => {\n this.renderBookmarkButtons();\n });\n });\n }\n\n initializeBookmarks() {\n this.renderBookmarkButtons();\n this.markActiveBookmark(true);\n this.emitBookmarksChanged();\n }\n\n /**\n * @typedef {object} Bookmark\n * @property {number} id - bookreader page index, becomes key store\n * @property {number} color - color number\n * @property {string} page - bookmark's page label to display\n * @property {string} note - optional, note that one can add\n * @property {string} thumbnail - optional, image url\n */\n /**\n * Formats bookmark view model\n * @param {Object} bookmarkAttrs\n * @param {number} bookmarkAttrs.leafNum\n * @param {string} bookmarkAttrs.notes\n *\n * @returns Bookmark\n */\n formatBookmark({ leafNum = '', notes = {} }) {\n const { note = '', color } = notes;\n const nomalizedParams = {\n note,\n color: this.getBookmarkColor(color) ? color : this.defaultColor.id,\n };\n\n const page = IABookmarks.formatPage(this.bookreader.book.getPageNum(leafNum));\n const thumbnail = this.bookreader.book.getPageURI(`${leafNum}`.replace(/\\D/g, ''), 32); // Request thumbnail 1/32 the size of original image\n const bookmark = {\n ...nomalizedParams,\n id: leafNum,\n leafNum,\n page,\n thumbnail,\n };\n\n return bookmark;\n }\n\n async fetchBookmarks() {\n const resText = await this.api.getAll().then(r=> r.text());\n let parsedResponse;\n try {\n parsedResponse = JSON.parse(resText);\n } catch (e) {\n parsedResponse = {error : e.message};\n }\n\n const {\n success,\n error = 'Something happened while fetching bookmarks.',\n value: bkmrks = [],\n } = parsedResponse;\n\n if (!success) {\n console?.warn('Error fetching bookmarks', error);\n }\n\n const bookmarks = {};\n Object.keys(bkmrks).forEach((leafNum) => {\n const bookmark = bkmrks[leafNum];\n const formattedLeafNum = parseInt(leafNum, 10);\n const formattedBookmark = this.formatBookmark({ ...bookmark, leafNum: formattedLeafNum });\n bookmarks[leafNum] = formattedBookmark;\n });\n\n this.bookmarks = bookmarks;\n return bookmarks;\n }\n\n emitBookmarksChanged() {\n this.dispatchEvent(new CustomEvent('bookmarksChanged', {\n bubbles: true,\n composed: true,\n detail: {\n bookmarks: this.bookmarks,\n },\n }));\n }\n\n emitBookmarkButtonClicked() {\n this.dispatchEvent(new CustomEvent('bookmarkButtonClicked', {\n bubbles: true,\n composed: true,\n detail: {\n editedBookmark: this.editedBookmark,\n },\n }));\n }\n\n bookmarkButtonClicked(pageID) {\n if (this.getBookmark(pageID)) {\n this.confirmDeletion(pageID);\n } else {\n this.createBookmark(pageID);\n }\n }\n\n renderBookmarkButtons() {\n const pages = this.bookreader.$('.BRpagecontainer').not('.BRemptypage').get();\n\n pages.forEach((pageEl) => {\n const existingButton = pageEl.querySelector('.bookmark-button');\n if (existingButton) {\n existingButton.remove();\n }\n const pageID = +pageEl.classList.value.match(/pagediv\\d+/)[0].replace(/\\D/g, '');\n const pageBookmark = this.getBookmark(pageID);\n const bookmarkState = pageBookmark ? 'filled' : 'hollow';\n // eslint-disable-next-line\n const pageData = this.bookreader.book.getPage(pageID);\n const { isViewable } = pageData;\n\n if (!isViewable) { return; }\n\n const bookmarkButton = document.createElement('div');\n ['mousedown', 'mouseup'].forEach((event) => {\n bookmarkButton.addEventListener(event, (e) => e.stopPropagation());\n });\n bookmarkButton.classList.add('bookmark-button', bookmarkState);\n if (pageBookmark) {\n bookmarkButton.classList.add(this.getBookmarkColor(pageBookmark.color));\n }\n const pageSide = (pageEl.getAttribute('data-side') === 'L' && this.bookreader.mode === this.bookreader.constMode2up)\n ? 'left' : 'right';\n\n render(html`\n <bookmark-button\n @bookmarkButtonClicked=${() => this.bookmarkButtonClicked(pageID)}\n state=${bookmarkState}\n side=${pageSide}\n ></bookmark-button>`, bookmarkButton);\n pageEl.appendChild(bookmarkButton);\n });\n }\n\n /**\n * Notes which bookmark is active\n *\n * @param {boolean} atSetup - denotes the first time this is fired\n */\n markActiveBookmark(atSetup = false) {\n const { mode, constMode2up, constModeThumb } = this.bookreader;\n const currentIndex = this.bookreader.currentIndex();\n\n if (mode === constModeThumb) {\n // keep active bookmark the same\n // no syncing until we can verify when a bookmark is \"in view\"\n const requestedPageHasBookmark = this.bookmarks[currentIndex];\n if (atSetup && requestedPageHasBookmark) {\n this.activeBookmarkID = currentIndex;\n }\n return;\n }\n // In 2up, we prefer the right side of the page to bookmark\n // so let's make sure we light that one up.\n if (mode === constMode2up) {\n const pagesInView = this.bookreader.displayedIndices;\n const pagesHaveActiveBookmark = pagesInView.includes(+this.activeBookmarkID);\n if (pagesHaveActiveBookmark) {\n return;\n }\n }\n\n // If a bookmark exists with the current index, set it as active\n if (this.bookmarks[currentIndex]) {\n this.activeBookmarkID = currentIndex;\n return;\n }\n\n // No bookmark for this page\n this.activeBookmarkID = '';\n }\n\n bookmarkEdited({ detail }) {\n const closeEdit = detail.bookmark.id === this.editedBookmark.id;\n this.editedBookmark = closeEdit ? {} : detail.bookmark;\n }\n\n /**\n * Gets bookmark by pageindex\n * @param {number} id\n */\n getBookmark(id) {\n return this.bookmarks[id];\n }\n\n getBookmarkColor(id) {\n return this.bookmarkColors.find((m) => m.id === id)?.className;\n }\n\n /**\n * Adds bookmark for current page\n */\n addBookmark() {\n let pageID = this.bookreader.currentIndex();\n if (this.bookreader.mode === this.bookreader.constMode2up) {\n const pagesInView = this.bookreader.displayedIndices;\n\n // add bookmark to right hand page\n pageID = pagesInView[pagesInView.length - 1];\n }\n this.createBookmark(pageID);\n }\n\n /**\n * Creates bookmark for a given page\n * @param {number} pageID\n */\n createBookmark(pageID) {\n const existingBookmark = this.getBookmark(pageID);\n if (existingBookmark) {\n this.bookmarkEdited({ detail: { bookmark: existingBookmark } });\n this.emitBookmarkButtonClicked();\n return;\n }\n\n this.editedBookmark = this.formatBookmark({ leafNum: pageID });\n\n this.api.post(this.editedBookmark);\n\n this.bookmarks[pageID] = this.editedBookmark;\n this.activeBookmarkID = pageID;\n this.disableAddBookmarkButton = true;\n this.renderBookmarkButtons();\n this.emitBookmarkButtonClicked();\n }\n\n bookmarkSelected({ detail }) {\n const { leafNum } = detail.bookmark;\n this.bookreader.jumpToPage(`${this.bookreader.book.getPageNum(`${leafNum}`.replace(/\\D/g, ''))}`);\n this.activeBookmarkID = leafNum;\n }\n\n saveBookmark({ detail }) {\n const existingBookmark = this.bookmarks[detail.bookmark.id];\n Object.assign(existingBookmark, detail.bookmark);\n this.api.put(existingBookmark);\n this.editedBookmark = {};\n this.renderBookmarkButtons();\n }\n\n confirmDeletion(pageID) {\n const existingBookmark = this.getBookmark(pageID);\n if (existingBookmark.note) {\n this.displayDeletionModal(pageID);\n return;\n }\n this.deleteBookmark({ detail: { id: `${pageID}` } });\n }\n\n displayDeletionModal(pageID) {\n const customModalContent = html`\n <delete-modal-actions\n .deleteAction=${() => this.deleteBookmark({ detail: { id: `${pageID}` } })}\n .cancelAction=${() => this.modal.closeModal()}\n .pageID=${pageID}\n ></delete-modal-actions>\n `;\n\n\n this.modal.showModal({\n config: this.deleteModalConfig,\n customModalContent,\n });\n }\n\n deleteBookmark({ detail }) {\n const { id } = detail;\n const currBookmarks = this.bookmarks;\n delete currBookmarks[id];\n this.bookmarks = { ...currBookmarks };\n\n this.api.delete(detail.id);\n this.editedBookmark = {};\n this.modal.closeModal();\n this.renderBookmarkButtons();\n }\n\n /**\n * Tells us if we should allow user to add bookmark via menu panel\n * returns { Boolean }\n */\n get shouldEnableAddBookmarkButton() {\n const pageToCheck = this.bookreader.mode === this.bookreader.constMode2up\n ? this.bookreader.displayedIndices[this.bookreader.displayedIndices.length - 1]\n : this.bookreader.currentIndex();\n const pageHasBookmark = this.getBookmark(pageToCheck);\n return !!pageHasBookmark;\n }\n\n\n get allowAddingBookmark() {\n return this.bookreader.mode !== this.bookreader.constModeThumb;\n }\n\n get addBookmarkButton() {\n return html`\n <button\n class=\"ia-button primary\"\n tabindex=\"-1\"\n ?disabled=${this.shouldEnableAddBookmarkButton}\n @click=${this.addBookmark}>\n Add bookmark\n </button>\n `;\n }\n\n get bookmarksList() {\n return html`\n <ia-bookmarks-list\n @bookmarkEdited=${this.bookmarkEdited}\n @bookmarkSelected=${this.bookmarkSelected}\n @saveBookmark=${this.saveBookmark}\n @deleteBookmark=${this.deleteBookmark}\n .editedBookmark=${this.editedBookmark}\n .bookmarks=${{ ...this.bookmarks }}\n .activeBookmarkID=${this.activeBookmarkID}\n .bookmarkColors=${this.bookmarkColors}\n .defaultBookmarkColor=${this.defaultColor}>\n </ia-bookmarks-list>\n `;\n }\n\n get bookmarkHelperMessage() {\n return html`<p>Please use 1up or 2up view modes to add bookmark.</p>`;\n }\n\n render() {\n const bookmarks = html`\n ${this.bookmarksList}\n ${this.allowAddingBookmark ? this.addBookmarkButton : this.bookmarkHelperMessage}\n `;\n return html`\n <section class=\"bookmarks\">\n ${ this.displayMode === 'login'\n ? html`<bookmarks-login\n @click=${() => this.loginOptions.loginClicked()}\n .url=${this.loginOptions.loginUrl}></bookmarks-login>`\n : bookmarks\n }\n </section>\n `;\n }\n}\n\ncustomElements.define('ia-bookmarks', IABookmarks);\n","import { css } from 'lit';\n\nexport default css`\n .blue {\n --iconFillColor: var(--blueBookmarkColor, #0023f5);\n }\n\n .red {\n --iconFillColor: var(--redBookmarkColor, #eb3223);\n }\n\n .green {\n --iconFillColor: var(--greenBookmarkColor, #75ef4c);\n }\n`;\n","import { repeat } from 'lit/directives/repeat.js';\nimport { css, html, LitElement, nothing } from 'lit';\nimport bookmarkColorsCSS from '../assets/bookmark-colors.js';\nimport buttonCSS from '../assets/button-base.js';\n\nexport class IABookmarkEdit extends LitElement {\n static get properties() {\n return {\n bookmark: { type: Object },\n bookmarkColors: { type: Array },\n renderHeader: { type: Boolean },\n showBookmark: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.bookmark = {};\n this.bookmarkColors = [];\n this.renderHeader = false;\n this.showBookmark = true;\n }\n\n emitSaveEvent(e) {\n e.preventDefault();\n this.dispatchEvent(new CustomEvent('saveBookmark', {\n detail: {\n bookmark: this.bookmark,\n },\n }));\n }\n\n emitDeleteEvent() {\n this.dispatchEvent(new CustomEvent('deleteBookmark', {\n detail: {\n id: this.bookmark.id,\n },\n }));\n }\n\n emitColorChangedEvent(colorId) {\n this.dispatchEvent(new CustomEvent('bookmarkColorChanged', {\n detail: {\n bookmarkId: this.bookmark.id,\n colorId,\n },\n }));\n }\n\n changeColorTo(id) {\n this.bookmark.color = id;\n this.emitColorChangedEvent(id);\n }\n\n updateNote(e) {\n this.bookmark.note = e.currentTarget.value;\n }\n\n static get headerSection() {\n return html`<header>\n <h3>Edit Bookmark</h3>\n </header>`;\n }\n\n bookmarkColor(color) {\n return html`\n <li>\n <input type=\"radio\" name=\"color\" id=\"color_${color.id}\" .value=${color.id} @change=${() => this.changeColorTo(color.id)} ?checked=${this.bookmark.color === color.id}>\n <label for=\"color_${color.id}\">\n <icon-bookmark class=${color.className}></icon-bookmark>\n </label>\n </li>\n `;\n }\n\n get bookmarkTemplate() {\n return html`\n <div class=\"bookmark\">\n <img src=${this.bookmark.thumbnail} />\n <h4>Page ${this.bookmark.page}</h4>\n </div>\n `;\n }\n\n render() {\n return html`\n ${this.renderHeader ? IABookmarkEdit.headerSection : nothing}\n ${this.showBookmark ? this.bookmarkTemplate : nothing}\n <form action=\"\" method=\"put\" @submit=${this.emitSaveEvent}>\n <fieldset>\n <label for=\"note\">Note <small>(optional)</small></label>\n <textarea rows=\"4\" cols=\"80\" name=\"note\" id=\"note\" @change=${this.updateNote}>${this.bookmark.note}</textarea>\n <label for=\"color\">Bookmark color</label>\n <ul>\n ${repeat(this.bookmarkColors, color => color.id, this.bookmarkColor.bind(this))}\n </ul>\n <div class=\"actions\">\n <button type=\"button\" class=\"ia-button cancel\" @click=${this.emitDeleteEvent}>Delete</button>\n <input class=\"ia-button\" type=\"submit\" value=\"Save\">\n </div>\n </fieldset>\n </form>\n `;\n }\n\n static get styles() {\n const bookmarkEditCSS = css`\n :host {\n display: block;\n padding: 0 1rem 2rem 1rem;\n color: var(--primaryTextColor);\n }\n\n small {\n font-style: italic;\n }\n\n .bookmark {\n display: grid;\n grid-template-columns: 37px 1fr;\n grid-gap: 0 1rem;\n align-items: center;\n }\n\n h4 {\n margin: 0;\n font-size: 1.4rem;\n }\n\n fieldset {\n padding: 2rem 0 0 0;\n border: none;\n }\n\n label {\n display: block;\n font-weight: bold;\n }\n\n p {\n padding: 0;\n margin: .5rem 0;\n font-size: 1.2rem;\n line-height: 120%;\n }\n\n textarea {\n width: 100%;\n margin-bottom: 2rem;\n box-sizing: border-box;\n font: normal 1.4rem \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n resize: vertical;\n }\n\n ul {\n display: grid;\n grid-template-columns: repeat(3, auto);\n grid-gap: 0 2rem;\n justify-content: start;\n padding: 1rem 0 0 0;\n margin: 0 0 2rem 0;\n list-style: none;\n }\n\n li input {\n display: none;\n }\n\n li label {\n display: block;\n min-width: 50px;\n padding-top: .4rem;\n text-align: center;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n }\n\n li input:checked + label {\n border-color: var(--primaryTextColor);\n }\n\n input[type=\"submit\"] {\n background: var(--primaryCTAFill);\n border-color: var(--primaryCTABorder);\n }\n\n button {\n background: var(--primaryErrorCTAFill);\n border-color: var(--primaryErrorCTABorder);\n }\n\n .button {\n -webkit-appearance: none;\n appearance: none;\n padding: .5rem 1rem;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n border: none;\n border-radius: 4px;\n cursor: pointer;\n }\n\n .actions {\n display: grid;\n grid-template-columns: auto auto;\n grid-gap: 0 1rem;\n justify-items: stretch;\n }\n `;\n return [buttonCSS, bookmarkColorsCSS, bookmarkEditCSS];\n }\n}\ncustomElements.define('ia-bookmark-edit', IABookmarkEdit);\n","import { html } from 'lit';\n\nexport default html`\n<svg height=\"20\" viewBox=\"0 0 20 20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"editPencilTitleID editPencilDescID\"><title id=\"editPencilTitleID\">Pencil icon</title><desc id=\"editPencilDescID\">An illustration of a pencil, used to represent an edit action</desc><path class=\"fill-color\" d=\"m15.6111048 9.3708338-9.52237183 9.5222966-5.14363353 1.0897111c-.42296707.0896082-.83849202-.1806298-.92810097-.6035935-.02266463-.1069795-.02266463-.2175207 0-.3245001l1.08971974-5.1435929 9.52237189-9.52229656zm-10.89310224 5.9110366-2.78094924-.5403869-.67567462 3.166657.83033407.8303275 3.16668096-.6756703zm14.82724244-12.05935921c.6114418.61143705.6055516 1.6086709-.0131615 2.22737904l-2.2405581 2.24054036-4.9820147-4.98197536 2.2405581-2.24054036c.618713-.61870814 1.6159506-.62460252 2.2273925-.01316547z\" fill-rule=\"evenodd\"/></svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit';\n\nclass IAIconEditPencil extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-edit-pencil', IAIconEditPencil);\n\nexport default IAIconEditPencil;\n","import { repeat } from 'lit/directives/repeat.js';\nimport { css, html, LitElement, nothing } from 'lit';\nimport './bookmark-edit.js';\nimport '@internetarchive/icon-edit-pencil/icon-edit-pencil.js';\nimport bookmarkColorsCSS from '../assets/bookmark-colors.js';\n\nexport class IABookmarksList extends LitElement {\n static get properties() {\n return {\n activeBookmarkID: { type: Number },\n bookmarkColors: { type: Array },\n defaultBookmarkColor: { type: Object },\n bookmarks: { type: Object },\n editedBookmark: { type: Object },\n renderHeader: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.activeBookmarkID = undefined;\n this.bookmarkColors = [];\n this.defaultBookmarkColor = {};\n this.bookmarks = {};\n this.editedBookmark = {};\n this.renderHeader = false;\n }\n\n emitEditEvent(e, bookmark) {\n this.dispatchEvent(new CustomEvent('bookmarkEdited', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitSelectedEvent(bookmark) {\n this.activeBookmarkID = bookmark.id;\n this.dispatchEvent(new CustomEvent('bookmarkSelected', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitSaveBookmark(bookmark) {\n this.dispatchEvent(new CustomEvent('saveBookmark', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitDeleteBookmark(id) {\n this.dispatchEvent(new CustomEvent('deleteBookmark', {\n detail: {\n id,\n },\n }));\n }\n\n emitBookmarkColorChanged({ detail }) {\n const { bookmarkId, colorId } = detail;\n this.dispatchEvent(new CustomEvent('bookmarkColorChanged', {\n detail: {\n bookmarkId,\n colorId,\n },\n }));\n }\n\n emitAddBookmark() {\n this.dispatchEvent(new CustomEvent('addBookmark'));\n }\n\n editBookmark(e, bookmark) {\n this.emitEditEvent(e, bookmark);\n this.editedBookmark = this.editedBookmark === bookmark ? {} : bookmark;\n }\n\n saveBookmark({ detail }) {\n const { bookmark } = detail;\n this.editedBookmark = {};\n this.emitSaveBookmark(bookmark);\n }\n\n deleteBookmark({ detail }) {\n const { id } = detail;\n this.editedBookmark = {};\n this.emitDeleteBookmark(id);\n }\n\n bookmarkColorInfo(colorVal = 0) {\n return this.bookmarkColors.find(labelInfo => labelInfo?.id === colorVal);\n }\n\n bookmarkItem(bookmark) {\n const editMode = this.editedBookmark.id === bookmark.id;\n const { className } = this.bookmarkColorInfo(bookmark.color);\n const activeClass = bookmark.id === this.activeBookmarkID ? 'active' : '';\n return html`\n <li\n @click=${() => this.emitSelectedEvent(bookmark)}\n tabindex=\"0\"\n data-pageIndex=${bookmark.id}\n >\n <div class=\"separator\"></div>\n <div class=\"content ${activeClass}\">\n <button\n class=\"edit\"\n @click=${e => this.editBookmark(e, bookmark)}\n title=\"Edit this bookmark\"\n >\n <ia-icon-edit-pencil></ia-icon-edit-pencil>\n </button>\n <h4>\n <icon-bookmark class=${className}></icon-bookmark>\n <span> Page ${bookmark.page}</span>\n </h4>\n ${!editMode && bookmark.note ? html`<p>${bookmark.note}</p>` : nothing}\n ${editMode ? this.editBookmarkComponent : nothing}\n </div>\n </li>\n `;\n }\n\n get editBookmarkComponent() {\n const showBookmark = false;\n return html`\n <ia-bookmark-edit\n .bookmark=${this.editedBookmark}\n .bookmarkColors=${this.bookmarkColors}\n .defaultBookmarkColor=${this.defaultBookmarkColor}\n .showBookmark=${showBookmark}\n @saveBookmark=${this.saveBookmark}\n @deleteBookmark=${this.deleteBookmark}\n @bookmarkColorChanged=${this.emitBookmarkColorChanged}\n ></ia-bookmark-edit>\n `;\n }\n\n sortBookmarks() {\n const sortedKeys = Object.keys(this.bookmarks).sort((a, b) => {\n if (+a > +b) { return 1; }\n if (+a < +b) { return -1; }\n return 0;\n });\n const sortedBookmarks = sortedKeys.map(key => this.bookmarks[key]);\n return sortedBookmarks;\n }\n\n get bookmarksCount() {\n const count = this.bookmarks.length;\n return html`<small>(${count})</small>`;\n }\n\n get headerSection() {\n return html`<header>\n <h3>\n Bookmarks\n ${this.bookmarks.length ? this.bookmarksCount : nothing}\n </h3>\n </header>`;\n }\n\n get bookmarkslist() {\n const sortedBookmarks = this.sortBookmarks();\n const bookmarks = repeat(sortedBookmarks, bookmark => bookmark?.id, this.bookmarkItem.bind(this));\n return html`\n <ul>\n ${bookmarks}\n <div class=\"separator\"></div>\n </ul>\n `;\n }\n\n render() {\n return html`\n ${this.renderHeader ? this.headerSection : nothing}\n ${Object.keys(this.bookmarks).length ? this.bookmarkslist : nothing}\n `;\n }\n\n static get styles() {\n const main = css`\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n icon-bookmark {\n width: 16px;\n height: 24px;\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n small {\n font-style: italic;\n }\n\n h4 {\n margin: 0;\n font-size: 1.4rem;\n }\n h4 * {\n display: inline-block;\n }\n h4 icon-bookmark {\n vertical-align: bottom;\n }\n h4 span {\n vertical-align: top;\n padding-top: 1%;\n }\n\n p {\n padding: 0;\n margin: 5px 0 0 0;\n width: 98%;\n overflow-wrap: break-word;\n }\n\n ia-bookmark-edit {\n margin: 5px 5px 3px 6px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n ul > li:first-child .separator {\n display: none;\n }\n li {\n cursor: pointer;\n outline: none;\n position: relative;\n }\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: .2rem 0 .4rem .2rem;\n }\n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n li button.edit {\n padding: 5px 2px 0 0;\n background: transparent;\n cursor: pointer;\n height: 40px;\n width: 40px;\n position: absolute;\n right: 2px;\n top: 2px;\n text-align: right;\n -webkit-appearance: none;\n appearance: none;\n outline: none;\n box-sizing: border-box;\n border: none;\n }\n li button.edit > * {\n display: block;\n height: 100%;\n width: 100%;\n }\n `;\n\n return [main, bookmarkColorsCSS];\n }\n}\ncustomElements.define('ia-bookmarks-list', IABookmarksList);\n","import { html, css, LitElement } from 'lit';\n\nclass IAIconBookmark extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n #hollow,\n #plus,\n #minus {\n display: none;\n }\n\n .hollow #filled,\n .plus #filled,\n .minus #filled {\n display: none;\n }\n\n .hollow #hollow,\n .plus #hollow,\n .minus #hollow {\n display: block;\n }\n\n .plus #plus {\n display: block;\n }\n\n .minus #minus {\n display: block;\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n static get properties() {\n return {\n state: { type: String },\n };\n }\n\n render() {\n return html`\n <div class=${this.state}>\n <svg\n height=\"24\"\n viewBox=\"0 0 16 24\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"bookmarkTitleID bookmarDescID\"\n >\n <title id=\"bookmarkTitleID\">Bookmark icon</title>\n <desc id=\"bookmarkDescID\">An outline of the shape of a bookmark</desc>\n <path\n id=\"filled\"\n d=\"m1 0h14c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1z\"\n class=\"fill-color\"\n fill-rule=\"evenodd\"\n />\n <g class=\"fill-color\" fill-rule=\"evenodd\">\n <path\n id=\"hollow\"\n d=\"m15 0c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1zm-2 2h-10c-.51283584 0-.93550716.38604019-.99327227.88337887l-.00672773.11662113v18l6-4.3181818 6 4.3181818v-18c0-.51283584-.3860402-.93550716-.8833789-.99327227z\"\n />\n <path\n id=\"plus\"\n d=\"m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z\"\n fill-rule=\"nonzero\"\n />\n <path id=\"minus\" d=\"m11 8.25v1.5h-6v-1.5z\" fill-rule=\"nonzero\" />\n </g>\n </svg>\n </div>\n `;\n }\n}\n\nexport { IAIconBookmark };\n","import { IAIconBookmark } from './src/icon-bookmark.js';\n\nwindow.customElements.define('icon-bookmark', IAIconBookmark);\n","import { html } from 'lit';\nimport '../delete-modal-actions.js';\nimport './bookmark-button.js';\nimport './ia-bookmarks.js';\n\nimport './bookmark-edit.js';\nimport './bookmarks-list.js';\nimport '@internetarchive/icon-bookmark';\n\n\nexport default class BookmarksProvider {\n constructor(options) {\n const {\n baseHost,\n signedIn,\n bookreader,\n modal,\n onProviderChange,\n } = options;\n\n const referrerStr = `referer=${encodeURIComponent(location.href)}`;\n const loginUrl = `https://${baseHost}/account/login?${referrerStr}`;\n\n this.component = document.createElement('ia-bookmarks');\n this.component.bookreader = bookreader;\n this.component.displayMode = signedIn ? 'bookmarks' : 'login';\n this.component.modal = modal;\n this.component.loginOptions = {\n loginClicked: this.bookmarksLoginClicked,\n loginUrl\n };\n this.bindEvents();\n\n this.icon = html`<icon-bookmark state=\"hollow\" style=\"--iconWidth: 16px; --iconHeight: 24px;\"></icon-bookmark>`;\n this.label = 'Bookmarks';\n this.id = 'bookmarks';\n this.onProviderChange = onProviderChange;\n this.component.setup();\n this.updateMenu(this.component.bookmarks.length);\n }\n\n updateMenu(count) {\n this.menuDetails = `(${count})`;\n }\n\n bindEvents() {\n this.component.addEventListener('bookmarksChanged', this.bookmarksChanged.bind(this));\n }\n\n bookmarksChanged({ detail }) {\n const bookmarksLength = Object.keys(detail.bookmarks).length;\n this.updateMenu(bookmarksLength);\n this.onProviderChange(detail.bookmarks, detail.showSidePanel);\n }\n\n bookmarksLoginClicked() {\n window.archive_analytics?.send_event_no_sampling(\n 'BookReader',\n `BookmarksLogin`,\n window.location.path,\n );\n }\n}\n","import { html } from 'lit';\nimport { iauxShareIcon } from '@internetarchive/ia-item-navigator';\nimport '@internetarchive/ia-item-navigator';\n\nexport default class SharingProvider {\n constructor({\n item,\n baseHost,\n bookreader\n }) {\n const { identifier, creator, title } = item?.metadata;\n const creatorToUse = Array.isArray(creator) ? creator[0] : creator;\n const subPrefix = bookreader.options.subPrefix || '';\n const label = `Share this book`;\n this.icon = html`${iauxShareIcon}`;\n this.label = label;\n this.id = 'share';\n this.component = html`<iaux-sharing-options\n .identifier=${identifier}\n .type=${`book`}\n .creator=${creatorToUse}\n .description=${title}\n .baseHost=${baseHost}\n .fileSubPrefix=${subPrefix}\n ></iaux-sharing-options>`;\n }\n}\n","import { html } from 'lit';\n\nimport { viewableFilesIcon } from '@internetarchive/ia-item-navigator';\nimport '@internetarchive/ia-item-navigator';\n\n/**\n * * @typedef { 'title_asc' | 'title_desc' | 'default'} SortTypesT\n */\nconst sortTypes = {\n title_asc: 'title_asc',\n title_desc: 'title_desc',\n default: 'default'\n};\nexport default class VolumesProvider {\n /**\n * @param {import('../../BookReader').default} bookreader\n */\n constructor({ baseHost, bookreader, onProviderChange }) {\n /** @type {import('../../BookReader').default} */\n this.bookreader = bookreader;\n this.onProviderChange = onProviderChange;\n this.baseHost = baseHost;\n\n const files = bookreader.options.multipleBooksList.by_subprefix;\n this.viewableFiles = Object.keys(files).map(item => files[item]);\n this.volumeCount = Object.keys(files).length;\n\n this.id = \"volumes\";\n this.label = `Viewable files (${this.volumeCount})`;\n this.icon = html`${viewableFilesIcon}`;\n this.sortOrderBy = sortTypes.default;\n\n this.component = document.createElement(\"iaux-viewable-files\");\n this.component.addSortToUrl = true;\n this.component.subPrefix = bookreader.options.subPrefix || \"\";\n this.component.baseHost = baseHost;\n this.component.fileList = [...this.viewableFiles];\n\n this.sortFilesComponent = document.createElement(\"iaux-sort-viewable-files\");\n this.sortFilesComponent.fileListRaw = this.viewableFiles;\n this.sortFilesComponent.addEventListener('fileListSorted', (e) => this.handleFileListSorted(e));\n this.actionButton = this.sortFilesComponent;\n\n // get sort state from query param\n if (this.bookreader.urlPlugin) {\n this.bookreader.urlPlugin.pullFromAddressBar();\n\n const urlSortValue = this.bookreader.urlPlugin.getUrlParam('sort');\n if (urlSortValue === sortTypes.title_asc || urlSortValue === sortTypes.title_desc) {\n this.sortOrderBy = urlSortValue;\n }\n }\n\n this.sortFilesComponent.sortVolumes(this.sortOrderBy);\n\n this.onProviderChange(this.bookreader);\n }\n\n /** @param { SortTypesT } sortType */\n async handleFileListSorted(event) {\n const { sortType, sortedFiles } = event.detail;\n\n this.viewableFiles = sortedFiles;\n this.sortOrderBy = sortType;\n\n // update the component\n this.component.fileList = [...this.viewableFiles];\n await this.component.updateComplete;\n\n if (this.bookreader.urlPlugin) {\n this.bookreader.urlPlugin.pullFromAddressBar();\n if (this.sortOrderBy !== sortTypes.default) {\n this.bookreader.urlPlugin.setUrlParam('sort', this.sortOrderBy);\n } else {\n this.bookreader.urlPlugin.removeUrlParam('sort');\n }\n }\n\n this.onProviderChange(this.bookreader);\n\n this.multipleFilesClicked(this.sortOrderBy);\n }\n\n /**\n * @param { SortTypesT } orderBy\n */\n multipleFilesClicked(orderBy) {\n window.archive_analytics?.send_event(\n 'BookReader',\n `VolumesSort|${orderBy}`,\n window.location.path,\n );\n }\n\n}\n","import { svg } from 'lit';\n\nexport default svg`\n <svg class=\"ia-logo\" width=\"27\" height=\"30\" viewBox=\"0 0 27 30\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"logoTitleID logoDescID\">\n <title id=\"logoTitleID\">Internet Archive logo</title>\n <desc id=\"logoDescID\">A line drawing of the Internet Archive headquarters building façade.</desc>\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <mask id=\"mask-2\" fill=\"white\">\n <path d=\"M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z\" id=\"path-1\"></path>\n </mask>\n <use fill=\"#FFFFFF\" xlink:href=\"#path-1\"></use>\n <g mask=\"url(#mask-2)\" fill=\"#FFFFFF\">\n <path d=\"M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z\" id=\"swatch\"></path>\n </g>\n </g>\n </svg>\n`;\n","// eslint-disable-next-line no-unused-vars\nimport { SharedResizeObserver } from '@internetarchive/shared-resize-observer';\n// eslint-disable-next-line no-unused-vars\nimport { ModalManager } from '@internetarchive/modal-manager';\nimport { css, html, LitElement, nothing } from 'lit';\nimport SearchProvider from './search/search-provider.js';\nimport DownloadProvider from './downloads/downloads-provider.js';\nimport VisualAdjustmentProvider from './visual-adjustments/visual-adjustments-provider.js';\nimport BookmarksProvider from './bookmarks/bookmarks-provider.js';\nimport SharingProvider from './sharing.js';\nimport VolumesProvider from './volumes/volumes-provider.js';\nimport iaLogo from './assets/ia-logo.js';\n\nconst events = {\n menuUpdated: 'menuUpdated',\n updateSideMenu: 'updateSideMenu',\n PostInit: 'PostInit',\n ViewportInFullScreen: 'ViewportInFullScreen',\n};\nexport class BookNavigator extends LitElement {\n static get properties() {\n return {\n itemMD: { type: Object },\n bookReaderLoaded: { type: Boolean },\n bookreader: { type: Object },\n bookIsRestricted: { type: Boolean },\n downloadableTypes: { type: Array },\n isAdmin: { type: Boolean },\n lendingInitialized: { type: Boolean },\n lendingStatus: { type: Object },\n menuProviders: { type: Object },\n menuShortcuts: { type: Array },\n signedIn: { type: Boolean },\n loaded: { type: Boolean },\n sharedObserver: { type: Object, attribute: false },\n modal: { type: Object, attribute: false },\n fullscreenBranding: { type: Object },\n };\n }\n\n constructor() {\n super();\n this.itemMD = undefined;\n this.loaded = false;\n this.bookReaderCannotLoad = false;\n this.bookReaderLoaded = false;\n this.bookreader = null;\n this.bookIsRestricted = false;\n this.downloadableTypes = [];\n this.isAdmin = false;\n this.lendingInitialized = false;\n this.lendingStatus = {};\n this.menuProviders = {};\n this.menuShortcuts = [];\n this.signedIn = false;\n /** @type {ModalManager} */\n this.modal = undefined;\n /** @type {SharedResizeObserver} */\n this.sharedObserver = undefined;\n this.fullscreenBranding = iaLogo;\n // Untracked properties\n this.sharedObserverHandler = undefined;\n this.brWidth = 0;\n this.brHeight = 0;\n this.shortcutOrder = [\n /**\n * sets exit FS button (`this.fullscreenBranding1)\n * when `br.options.enableFSLogoShortcut`\n */\n 'fullscreen',\n 'volumes',\n 'search',\n 'bookmarks'\n ];\n }\n\n disconnectedCallback() {\n this.sharedObserver.removeObserver({\n target: this.mainBRContainer,\n handler: this.sharedObserverHandler\n });\n }\n\n firstUpdated() {\n this.bindEventListeners();\n this.emitPostInit();\n this.loaded = true;\n }\n\n updated(changed) {\n if (!this.bookreader || !this.itemMD || !this.bookReaderLoaded) {\n return;\n }\n\n const reload = changed.has('loaded') && this.loaded;\n if (reload\n || changed.has('itemMD')\n || changed.has('bookreader')\n || changed.has('signedIn')\n || changed.has('isAdmin')\n || changed.has('modal')) {\n this.initializeBookSubmenus();\n }\n\n if (changed.has('sharedObserver') && this.bookreader) {\n this.loadSharedObserver();\n this.initializeBookSubmenus();\n }\n\n if (changed.has('downloadableTypes')) {\n this.initializeBookSubmenus();\n }\n }\n\n /**\n * Global event emitter for when Book Navigator loads\n */\n emitPostInit() {\n // emit global event when book nav has loaded with current bookreader selector\n this.dispatchEvent(new CustomEvent(`BrBookNav:${events.PostInit}`, {\n detail: { brSelector: this.bookreader?.el },\n bubbles: true,\n composed: true,\n }));\n }\n\n /**\n * @typedef {{\n * baseHost: string,\n * modal: ModalManager,\n * sharedObserver: SharedResizeObserver,\n * bookreader: BookReader,\n * item: Item,\n * signedIn: boolean,\n * isAdmin: boolean,\n * onProviderChange: (BookReader, object) => void,\n * }} baseProviderConfig\n *\n * @return {baseProviderConfig}\n */\n get baseProviderConfig() {\n return {\n baseHost: this.baseHost,\n modal: this.modal,\n sharedObserver: this.sharedObserver,\n bookreader: this.bookreader,\n item: this.itemMD,\n signedIn: this.signedIn,\n isAdmin: this.isAdmin,\n onProviderChange: () => {}\n };\n }\n\n get isWideEnoughToOpenMenu() {\n return this.brWidth >= 640;\n }\n /**\n * Instantiates books submenus & their update callbacks\n *\n * NOTE: we are doing our best to scope bookreader's instance.\n * If your submenu provider uses a bookreader instance to read, manually\n * manipulate BookReader, please update the navigator's instance of it\n * to keep it in sync.\n */\n initializeBookSubmenus() {\n const providers = {\n share: new SharingProvider(this.baseProviderConfig),\n visualAdjustments: new VisualAdjustmentProvider({\n ...this.baseProviderConfig,\n /** Update menu contents */\n onProviderChange: () => {\n this.updateMenuContents();\n },\n }),\n };\n\n if (this.shouldShowDownloadsMenu()) {\n providers.downloads = new DownloadProvider(this.baseProviderConfig);\n }\n\n if (this.bookreader.options.enableSearch) {\n providers.search = new SearchProvider({\n ...this.baseProviderConfig,\n /**\n * Search specific menu updates\n * @param {BookReader} brInstance\n * @param {{ searchCanceled: boolean }} searchUpdates\n */\n onProviderChange: (brInstance = null, searchUpdates = {}) => {\n if (brInstance) {\n /* refresh br instance reference */\n this.bookreader = brInstance;\n }\n\n this.updateMenuContents();\n\n if (searchUpdates.openMenu === false) {\n return;\n }\n\n if (this.isWideEnoughToOpenMenu && !searchUpdates?.searchCanceled) {\n /* open side search menu */\n setTimeout(() => {\n this.updateSideMenu('search', 'open');\n }, 0);\n }\n },\n });\n }\n\n if (this.bookreader.options.enableBookmarks) {\n providers.bookmarks = new BookmarksProvider({\n ...this.baseProviderConfig,\n onProviderChange: (bookmarks) => {\n const method = Object.keys(bookmarks).length ? 'add' : 'remove';\n this[`${method}MenuShortcut`]('bookmarks');\n this.updateMenuContents();\n }\n });\n }\n\n // add shortcut for volumes if multipleBooksList exists\n if (this.bookreader.options.enableMultipleBooks) {\n providers.volumes = new VolumesProvider({\n ...this.baseProviderConfig,\n onProviderChange: (brInstance = null, volumesUpdates = {}) => {\n if (brInstance) {\n /* refresh br instance reference */\n this.bookreader = brInstance;\n }\n this.updateMenuContents();\n if (this.isWideEnoughToOpenMenu) {\n /* open side search menu */\n setTimeout(() => {\n this.updateSideMenu('volumes', 'open');\n });\n }\n }\n });\n }\n\n Object.assign(this.menuProviders, providers);\n this.addMenuShortcut('search');\n this.addMenuShortcut('volumes');\n this.updateMenuContents();\n }\n\n /** gets element that houses the bookreader in light dom */\n get mainBRContainer() {\n return document.querySelector(this.bookreader?.el);\n }\n\n /** Fullscreen Shortcut */\n addFullscreenShortcut() {\n const closeFS = {\n icon: this.fullscreenShortcut,\n id: 'fullscreen',\n };\n this.menuShortcuts.push(closeFS);\n this.sortMenuShortcuts();\n this.emitMenuShortcutsUpdated();\n }\n\n deleteFullscreenShortcut() {\n const updatedShortcuts = this.menuShortcuts.filter(({ id }) => {\n return id !== 'fullscreen';\n });\n this.menuShortcuts = updatedShortcuts;\n this.sortMenuShortcuts();\n this.emitMenuShortcutsUpdated();\n }\n\n closeFullscreen() {\n this.bookreader.exitFullScreen();\n }\n\n get fullscreenShortcut() {\n return html`\n <button\n @click=${() => this.closeFullscreen()}\n title=\"Exit fullscreen view\"\n >${this.fullscreenBranding}</button>\n `;\n }\n /** End Fullscreen Shortcut */\n\n /**\n * Open side menu\n * @param {string} menuId\n * @param {('open'|'close'|'toggle')} action\n */\n updateSideMenu(menuId = '', action = 'open') {\n if (!menuId) {\n return;\n }\n const event = new CustomEvent(\n events.updateSideMenu, {\n detail: { menuId, action },\n },\n );\n this.dispatchEvent(event);\n }\n\n /**\n * Sets order of menu and emits custom event when done\n */\n updateMenuContents() {\n const {\n search, downloads, visualAdjustments, share, bookmarks, volumes, chapters\n } = this.menuProviders;\n const availableMenus = [volumes, chapters, search, bookmarks, visualAdjustments, share].filter((menu) => !!menu);\n\n if (this.shouldShowDownloadsMenu()) {\n downloads?.update(this.downloadableTypes);\n availableMenus.splice(1, 0, downloads);\n }\n\n const event = new CustomEvent(\n events.menuUpdated, {\n detail: availableMenus,\n },\n );\n this.dispatchEvent(event);\n }\n\n /**\n * Confirms if we should show the downloads menu\n * @returns {bool}\n */\n shouldShowDownloadsMenu() {\n if (!this.downloadableTypes.length) { return false; }\n if (this.bookIsRestricted === false) { return true; }\n if (this.isAdmin) { return true; }\n const { user_loan_record = {} } = this.lendingStatus;\n const hasNoLoanRecord = Array.isArray(user_loan_record); /* (bc PHP assoc. arrays) */\n\n if (hasNoLoanRecord) { return false; }\n\n const hasValidLoan = user_loan_record.type && (user_loan_record.type !== 'SESSION_LOAN');\n return hasValidLoan;\n }\n\n /**\n * Adds a provider object to the menuShortcuts array property if it isn't\n * already added. menuShortcuts are then sorted by shortcutOrder and\n * a menuShortcutsUpdated event is emitted.\n *\n * @param {string} menuId - a string matching the id property of a provider\n */\n addMenuShortcut(menuId) {\n if (this.menuShortcuts.find((m) => m.id === menuId)) {\n // menu is already there\n return;\n }\n\n if (!this.menuProviders[menuId]) {\n // no provider for this menu\n return;\n }\n\n this.menuShortcuts.push(this.menuProviders[menuId]);\n\n this.sortMenuShortcuts();\n this.emitMenuShortcutsUpdated();\n }\n\n /**\n * Removes a provider object from the menuShortcuts array and emits a\n * menuShortcutsUpdated event.\n *\n * @param {string} menuId - a string matching the id property of a provider\n */\n removeMenuShortcut(menuId) {\n this.menuShortcuts = this.menuShortcuts.filter((m) => m.id !== menuId);\n this.emitMenuShortcutsUpdated();\n }\n\n /**\n * Sorts the menuShortcuts property by comparing each provider's id to\n * the id in each iteration over the shortcutOrder array.\n */\n sortMenuShortcuts() {\n this.menuShortcuts = this.shortcutOrder.reduce((shortcuts, id) => {\n const menu = this.menuShortcuts.find((m) => m.id === id);\n if (menu) { shortcuts.push(menu); }\n return shortcuts;\n }, []);\n }\n\n emitMenuShortcutsUpdated() {\n const event = new CustomEvent('menuShortcutsUpdated', {\n detail: this.menuShortcuts,\n });\n this.dispatchEvent(event);\n }\n\n emitLoadingStatusUpdate(loaded) {\n const event = new CustomEvent('loadingStateUpdated', {\n detail: { loaded },\n });\n this.dispatchEvent(event);\n }\n\n /**\n * Core bookreader event handler registry\n *\n * NOTE: we are trying to keep bookreader's instance in scope\n * Please update Book Navigator's instance reference of it to keep it current\n */\n bindEventListeners() {\n window.addEventListener('BookReader:PostInit', (e) => {\n this.bookreader = e.detail.props;\n this.bookreader.shell = this;\n this.bookReaderLoaded = true;\n this.bookReaderCannotLoad = false;\n this.emitLoadingStatusUpdate(true);\n this.loadSharedObserver();\n setTimeout(() => {\n this.bookreader.resize();\n }, 0);\n });\n window.addEventListener('BookReader:fullscreenToggled', (event) => {\n const { detail: { props: brInstance = null } } = event;\n if (brInstance) {\n this.bookreader = brInstance;\n }\n this.manageFullScreenBehavior();\n }, { passive: true });\n window.addEventListener('BookReader:ToggleSearchMenu', (event) => {\n this.dispatchEvent(new CustomEvent(events.updateSideMenu, {\n detail: { menuId: 'search', action: 'toggle' },\n }));\n });\n window.addEventListener('LendingFlow:PostInit', ({ detail }) => {\n const {\n downloadTypesAvailable, lendingStatus, isAdmin, previewType,\n } = detail;\n this.lendingInitialized = true;\n this.downloadableTypes = downloadTypesAvailable;\n this.lendingStatus = lendingStatus;\n this.isAdmin = isAdmin;\n this.bookReaderCannotLoad = previewType === 'singlePagePreview';\n this.emitLoadingStatusUpdate(true);\n });\n window.addEventListener('BRJSIA:PostInit', ({ detail }) => {\n const { isRestricted, downloadURLs } = detail;\n this.bookReaderLoaded = true;\n this.downloadableTypes = downloadURLs;\n this.bookIsRestricted = isRestricted;\n });\n window.addEventListener('contextmenu', (e) => this.manageContextMenuVisibility(e), { capture: true });\n }\n\n /** Display an element's context menu */\n manageContextMenuVisibility(e) {\n window.archive_analytics?.send_event(\n 'BookReader',\n `contextmenu-${this.bookIsRestricted ? 'restricted' : 'unrestricted'}`,\n e.target?.classList?.value\n );\n if (!this.bookIsRestricted) {\n return;\n }\n\n const imagePane = e.target.classList.value.match(/BRscreen|BRpageimage/g);\n if (!imagePane) {\n return;\n }\n\n e.preventDefault();\n return false;\n }\n\n loadSharedObserver() {\n this.sharedObserverHandler = { handleResize: this.handleResize.bind(this) };\n this.sharedObserver?.addObserver({\n target: this.mainBRContainer,\n handler: this.sharedObserverHandler\n });\n }\n\n /**\n * Uses resize observer to fire BookReader's `resize` functionality\n * We do not want to trigger resize IF:\n * - book animation is happening\n * - book is in fullscreen (fullscreen is handled separately)\n *\n * @param { target: HTMLElement, contentRect: DOMRectReadOnly } entry\n */\n handleResize({ contentRect, target }) {\n const startBrWidth = this.brWidth;\n const startBrHeight = this.brHeight;\n const { animating } = this.bookreader;\n\n if (target === this.mainBRContainer) {\n this.brWidth = contentRect.width;\n this.brHeight = contentRect.height;\n }\n\n if (!startBrWidth && this.brWidth) {\n // loading up, let's update side menus\n this.initializeBookSubmenus();\n }\n\n const widthChange = startBrWidth !== this.brWidth;\n const heightChange = startBrHeight !== this.brHeight;\n\n if (!animating && (widthChange || heightChange)) {\n this.bookreader?.resize();\n }\n }\n\n /**\n * Manages Fullscreen behavior\n * This makes sure that controls are _always_ in view\n * We need this to accommodate LOAN BAR during fullscreen\n */\n manageFullScreenBehavior() {\n this.emitFullScreenState();\n\n if (!this.bookreader.options.enableFSLogoShortcut) {\n return;\n }\n\n const isFullScreen = this.bookreader.isFullscreen();\n if (isFullScreen) {\n this.addFullscreenShortcut();\n } else {\n this.deleteFullscreenShortcut();\n }\n }\n\n /**\n * Relays fullscreen toggle events\n */\n emitFullScreenState() {\n const isFullScreen = this.bookreader.isFullscreen();\n const event = new CustomEvent('ViewportInFullScreen', {\n detail: { isFullScreen },\n });\n this.dispatchEvent(event);\n }\n\n get itemImage() {\n const identifier = this.itemMD?.metadata.identifier;\n const url = `https://${this.baseHost}/services/img/${identifier}`;\n return html`<img class=\"cover-img\" src=${url} alt=\"cover image for ${identifier}\">`;\n }\n\n get placeholder() {\n return html`<div class=\"placeholder\">${this.itemImage}</div>`;\n }\n\n render() {\n return html`<div id=\"book-navigator__root\">\n ${this.bookReaderCannotLoad ? this.placeholder : nothing}\n ${!this.bookReaderCannotLoad ? html`<slot name=\"main\"></slot>` : nothing}\n </div>\n `;\n }\n\n static get styles() {\n return css`\n :host,\n #book-navigator__root,\n slot,\n slot > * {\n display: block;\n height: inherit;\n width: inherit;\n }\n .placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n margin: 5%;\n }\n .cover-img {\n max-height: 300px;\n }\n `;\n }\n}\n\ncustomElements.define('book-navigator', BookNavigator);\n","/** @inheritdoc */\nexport class SharedResizeObserver {\n constructor() {\n /**\n * This is the ResizeObserver that dispatches\n * callbacks to all of the handlers.\n *\n * @private\n * @memberof SharedResizeObserver\n */\n this.resizeObserver = new ResizeObserver(entries => {\n // This requestAnimationFrame is to throttle the refresh rate,\n // otherwise you get a bunch of\n // `ResizeObserver loop completed with undelivered notifications` errors\n // The errors are not harmful, but they happen a lot, see:\n // https://stackoverflow.com/a/58701523\n // https://github.com/souporserious/react-measure/issues/104\n // https://github.com/WICG/resize-observer/issues/38\n window.requestAnimationFrame(() => {\n for (const entry of entries) {\n const handlers = this.resizeHandlers.get(entry.target);\n handlers === null || handlers === void 0 ? void 0 : handlers.forEach(handler => {\n handler.handleResize(entry);\n });\n }\n });\n });\n /**\n * A map of all of the observed elements and their resize handlers\n *\n * @private\n * @type {Map<\n * Element,\n * Set<SharedResizeObserverResizeHandlerInterface>\n * >}\n * @memberof SharedResizeObserver\n */\n this.resizeHandlers = new Map();\n }\n /** @inheritdoc */\n shutdown() {\n this.resizeHandlers.forEach((handlers, target) => {\n this.resizeObserver.unobserve(target);\n });\n this.resizeHandlers.clear();\n }\n /** @inheritdoc */\n addObserver(options) {\n var _a;\n const handlers = (_a = this.resizeHandlers.get(options.target)) !== null && _a !== void 0 ? _a : new Set();\n handlers.add(options.handler);\n this.resizeHandlers.set(options.target, handlers);\n this.resizeObserver.observe(options.target, options.options);\n }\n /** @inheritdoc */\n removeObserver(options) {\n const handlers = this.resizeHandlers.get(options.target);\n if (!handlers)\n return;\n handlers.delete(options.handler);\n if (handlers.size === 0) {\n this.resizeObserver.unobserve(options.target);\n this.resizeHandlers.delete(options.target);\n }\n }\n}\n//# sourceMappingURL=shared-resize-observer.js.map","/**\n * BookReaderTemplate to load BookNavigator components\n */\n\nimport { LitElement, html, css } from 'lit';\n\nimport '@internetarchive/ia-item-navigator';\nimport '../BookNavigator/book-navigator.js';\n// eslint-disable-next-line no-unused-vars\nimport { ModalManager } from '@internetarchive/modal-manager';\nimport '@internetarchive/modal-manager';\nimport { SharedResizeObserver } from '@internetarchive/shared-resize-observer';\n\nexport class IaBookReader extends LitElement {\n static get properties() {\n return {\n item: { type: Object },\n baseHost: { type: String },\n signedIn: { type: Boolean },\n fullscreen: { type: Boolean, reflect: true, attribute: true },\n sharedObserver: { type: Object, attribute: false },\n modal: { type: Object, attribute: false },\n loaded: { type: Boolean },\n menuShortcuts: { type: Array },\n menuContents: { type: Array },\n };\n }\n\n constructor() {\n super();\n this.item = undefined;\n this.bookreader = undefined;\n this.baseHost = 'https://archive.org';\n this.fullscreen = false;\n this.signedIn = false;\n /** @type {ModalManager} */\n this.modal = undefined;\n /** @type {SharedResizeObserver} */\n this.sharedObserver = undefined;\n this.loaded = false;\n this.menuShortcuts = [];\n this.menuContents = [];\n this.openMenuName = '';\n }\n\n updated() {\n if (!this.modal) {\n this.setModalManager();\n }\n\n if (!this.sharedObserver) {\n this.sharedObserver = new SharedResizeObserver();\n }\n }\n\n get itemNav() {\n return this.shadowRoot.querySelector('iaux-item-navigator');\n }\n\n /** Creates modal DOM & attaches to `<body>` */\n setModalManager() {\n let modalManager = document.querySelector('modal-manager');\n if (!modalManager) {\n modalManager = document.createElement(\n 'modal-manager'\n );\n document.body.appendChild(modalManager);\n }\n\n this.modal = modalManager;\n }\n\n manageFullscreen(e) {\n const { detail } = e;\n const fullscreen = !!detail.isFullScreen;\n this.fullscreen = fullscreen;\n this.dispatchEvent(new CustomEvent('fullscreenStateUpdated', { detail: { fullscreen }}));\n\n }\n\n loadingStateUpdated(e) {\n const { loaded } = e.detail;\n this.loaded = loaded || null;\n this.dispatchEvent(new CustomEvent('loadingStateUpdated', { detail: { loaded }}));\n }\n\n setMenuShortcuts(e) {\n this.menuShortcuts = [...e.detail];\n }\n\n setMenuContents(e) {\n const updatedContents = [...e.detail];\n this.menuContents = updatedContents;\n }\n\n manageSideMenuEvents(e) {\n const { menuId, action } = e.detail;\n if (!menuId) {\n return;\n }\n\n this.openMenuName = menuId;\n\n if (action === 'open') {\n this.itemNav?.openShortcut(menuId);\n } else if (action === 'toggle') {\n this.itemNav?.toggleMenu();\n }\n }\n\n render() {\n return html`\n <div class=\"main-component\">\n <iaux-item-navigator\n ?viewportInFullscreen=${this.fullscreen}\n .basehost=${this.baseHost}\n .item=${this.item}\n .modal=${this.modal}\n .loaded=${this.loaded}\n .sharedObserver=${this.sharedObserver}\n ?signedIn=${this.signedIn}\n .menuShortcuts=${this.menuShortcuts}\n .menuContents=${this.menuContents}\n .openMenu=${this.openMenuName}\n >\n <div slot=\"header\">\n <slot name=\"header\"></slot>\n </div>\n <div slot=\"main\">\n <book-navigator\n .modal=${this.modal}\n .baseHost=${this.baseHost}\n .itemMD=${this.item}\n ?signedIn=${this.signedIn}\n ?sideMenuOpen=${this.menuOpened}\n .sharedObserver=${this.sharedObserver}\n @ViewportInFullScreen=${this.manageFullscreen}\n @loadingStateUpdated=${this.loadingStateUpdated}\n @updateSideMenu=${this.manageSideMenuEvents}\n @menuUpdated=${this.setMenuContents}\n @menuShortcutsUpdated=${this.setMenuShortcuts}\n >\n <div slot=\"main\">\n <slot name=\"main\"></slot>\n </div>\n </book-navigator>\n </div>\n </iaux-item-navigator>\n </div>\n `;\n }\n\n static get styles() {\n return css`\n :host {\n display: block;\n --primaryBGColor: var(--black, #000);\n --secondaryBGColor: #222;\n --tertiaryBGColor: #333;\n --primaryTextColor: var(--white, #fff);\n --primaryCTAFill: #194880;\n --primaryCTABorder: #c5d1df;\n --secondaryCTAFill: #333;\n --secondaryCTABorder: #999;\n --primaryErrorCTAFill: #e51c26;\n --primaryErrorCTABorder: #f8c6c8;\n background-color: var(--primaryBGColor);\n position: relative;\n }\n\n :host([fullscreen]),\n iaux-item-navigator[viewportinfullscreen] {\n position: fixed;\n inset: 0;\n height: 100%;\n min-height: unset;\n }\n\n .main-component {\n height: 100%;\n width: 100%;\n min-height: inherit;\n }\n\n div[slot=\"header\"],\n div[slot=\"main\"] {\n display: flex;\n width: 100%;\n }\n\n slot {\n display: block;\n flex: 1;\n }\n\n iaux-item-navigator {\n min-height: var(--br-height, inherit);\n height: var(--br-height, inherit);\n display: block;\n width: 100%;\n color: var(--primaryTextColor);\n --menuButtonLabelDisplay: block;\n --menuWidth: 320px;\n --menuSliderBg: var(--secondaryBGColor);\n --activeButtonBg: var(--tertiaryBGColor);\n --subpanelRightBorderColor: var(--secondaryCTABorder);\n --animationTiming: 100ms;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n --menuSliderHeaderIconHeight: 2rem;\n --menuSliderHeaderIconWidth: 2rem;\n --iconWidth: 2.4rem;\n --iconHeight: 2.4rem;\n --shareLinkColor: var(--primaryTextColor);\n --shareIconBorder: var(--primaryTextColor);\n --shareIconBg: var(--secondaryBGColor);\n --activityIndicatorLoadingDotColor: var(--primaryTextColor);\n --activityIndicatorLoadingRingColor: var(--primaryTextColor);\n }\n `;\n }\n}\n\nwindow.customElements.define(\"ia-bookreader\", IaBookReader);\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing} from '../lit-html.js';\n\n/**\n * For AttributeParts, sets the attribute if the value is defined and removes\n * the attribute if the value is undefined.\n *\n * For other part types, this directive is a no-op.\n */\nexport const ifDefined = <T>(value: T) => value ?? nothing;\n"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","create","SearchServiceErrorType","SortDirection","BooleanParser","parseValue","rawValue","Boolean","shared","NumberParser","value","parseFloat","Number","isNaN","ByteParser","DateParser","this","parseJSDate","parseBracketDate","yearMatch","match","parsedValue","replace","parsed","Date","parse","date","indexOf","getTime","getTimezoneOffset","DurationParser","componentArray","split","seconds","parseNumberFormat","parseColonSeparatedFormat","undefined","hasNaNComponent","map","element","index","componentValue","multiplier","Math","floor","reduce","a","b","MediaTypeParser","StringParser","String","constructor","parser","values","processRawValue","Array","isArray","forEach","parseAndPersistValue","push","BooleanField","super","DateField","DurationField","NumberField","StringField","ByteField","MediaTypeField","Metadata","json","rawMetadata","identifier","addeddate","publicdate","indexdate","audio_codec","audio_sample_rate","collection","collections_raw","collection_size","contributor","coverage","creator","description","downloads","duration","files_count","item_count","item_size","language","lineage","mediatype","month","noindex","notes","num_favorites","num_reviews","runtime","scanner","source","start_localtime","start_time","stop_time","subject","taper","title","track","transferer","type","uploader","utc_offset","venue","week","year","File","name","btih","md5","format","mtime","crc32","sha1","original","size","height","width","external_identifier","album","Review","reviewbody","reviewtitle","reviewer","reviewdate","createdate","stars","MetadataResponse","_a","_b","rawResponse","created","d1","d2","dir","files","file","item_last_updated","metadata","server","uniq","workable_servers","speech_vs_music_asr","reviews","entry","SearchResponseDetails","numFound","start","docs","doc","aggregations","SearchResponse","responseHeader","response","SearchServiceError","Error","message","details","SearchService","searchBackend","async","params","performSearch","error","success","fetchMetadata","itemNotFound","default","baseUrl","queryAsString","asUrlSearchParams","toString","url","fetchUrl","fetch","err","getErrorResult","networkError","forensics","searchEngineError","decodingError","errorType","IAIconEllipses","styles","render","customElements","define","menuButtonWidth","sliderWidth","transitionTiming","IAIconCollapseSidebar","MenuButton","icon","href","label","menuDetails","buttonId","selected","followable","onClick","e","preventDefault","dispatchMenuTypeSelectedEvent","dispatchEvent","CustomEvent","bubbles","composed","detail","id","buttonClass","iconClass","menuItem","linkButton","clickButton","prototype","sliderEvents","closeDrawer","IaMenuSlider","menus","open","manuallyHandleClose","selectedMenu","selectedMenuAction","animateMenuOpen","updated","actionButton","selectedMenuDetails","setSelectedMenu","closeMenu","drawerClosed","find","menu","selectedMenuComponent","component","sliderDetailsClass","selectedMenuClass","menuItems","renderMenuHeader","headerClass","actionBlock","closeButton","IAItemNavLoader","loaderMessage","bookIconSvg","loader","IANoTheaterAvailable","emitLoaded","loaded","changed","has","downloadUrl","ItemNavigator","viewAvailable","baseHost","signedIn","menuContents","menuShortcuts","viewportInFullscreen","menuOpened","openMenuState","disconnectedCallback","removeResizeObserver","oldObserver","get","removeObserver","resizeObserverConfig","setResizeObserver","handleResize","contentRect","sharedObserver","addObserver","headerSlot","handler","requestUpdate","frame","loaderTitle","loadingArea","slotChange","slottedContent","assignedNodes","slot","displayReaderClass","headerHeight","offsetHeight","menuClass","shouldRenderMenu","renderSideMenu","renderViewport","noTheaterView","item","loadingStateUpdated","slotVisibility","manageViewportFullscreen","fullscreenStatus","isFullScreen","event","toggleMenu","setOpenMenu","openMenu","setMenuContents","updatedContents","setMenuShortcuts","manageSideMenuEvents","menuId","action","openShortcut","menuToggleButton","selectedMenuId","drawerState","shortcuts","hasMenuOrShortcuts","subnavWidth","transitionEffect","menuMargin","theaterBg","converter","JSON","atob","reflect","attribute","o","_s","_inherits","_class","_super","t","_this","_classCallCheck","call","ATTRIBUTE","strings","_possibleConstructorReturn","keys","filter","join","_ref","_this2","s","_slicedToArray","it","Set","nt","add","classList","remove","delete","IAIconLink","IAIconShare","IAIconEmail","Provider","promoCopy","fileSubPrefix","encodedDescription","encodeString","encodedCreator","encodedPromoCopy","itemPath","encodedFileSubPrefix","encodeURIComponent","str","class","IAIconFacebook","IAIconPinterest","IAIconTumblr","IAIconTwitter","TwitterProvider","copyToClipboard","options","currentTarget","textarea","querySelector","note","select","document","execCommand","blur","clearTimeout","timeout","setTimeout","iauxShareIcon","IauxSharingOptions","embedOptionsVisible","sharingOptions","renderHeader","loadProviders","sharingItems","option","embedOption","toggleEmbedOptions","iframeEmbed","bbcodeEmbed","helpURL","header","visible","embed","providerIcon","l","I","createComment","n","v","_$AA","parentNode","_$AB","insertBefore","nextSibling","_$AM","u","_$AQ","_$AP","_$AU","f","_$AI","_$AH","p","Map","set","_t","CHILD","_step","_iterator","_createForOfIteratorHelper","done","ct","_ref2","_this$ct","ut","y","x","h","m","j","k","w","A","sortAscIcon","sortDescIcon","sortNeutralIcon","viewableFilesIcon","IauxSortFilesButton","fileListRaw","fileListSorted","sortOrderBy","sortButton","sortVolumes","title_asc","title_desc","sortType","sortedFiles","sort","localeCompare","orig_sort","IauxViewableFiles","subPrefix","fileList","addSortToUrl","firstUpdated","activeFile","shadowRoot","scrollIntoViewIfNeeded","volumeItemWithImageTitle","hrefUrl","fileUrl","image","author","url_path","pdfLabel","fileLi","activeClass","file_subprefix","isPdf","file_source","fileListTemplate","filesDisplay","file_prefix","bind","ModalConfig","_c","_d","_e","_f","_g","subtitle","headline","headerColor","bodyColor","showProcessingIndicator","processingImageMode","showCloseButton","showHeaderLogo","closeOnBackdropClick","IAActivityIndicatorMode","freeze","processing","complete","IAActivityIndicator","properties","mode","checkmarkColorCss","completedRingColorCss","loadingRingColorCss","loadingDotColorCss","window","ModalTemplate","config","closeButtonTemplate","handleCloseButton","Event","modalLogoSize","processingImageSize","modalCornerRadius","modalBorder","modalBottomMarginCss","modalTopMarginCss","modalHeaderBottomPaddingCss","modalBottomPadding","scrollOffset","titleFontSize","subtitleFontSize","headlineFontSize","messageFontSize","titleLineHeight","subtitleLineHeight","headlineLineHeight","messageLineHeight","ModalManagerMode","ModalManagerHostBridge","modalManager","windowResizeThrottler","delay","callback","timeoutID","_ref$noTrailing","noTrailing","_ref$noLeading","noLeading","_ref$debounceMode","debounceMode","cancelled","lastExec","clearExistingTimeout","wrapper","_len","arguments_","_key","self","elapsed","now","exec","apply","clear","cancel","_ref2$upcomingOnly","upcomingOnly","throttle","updateModalContainerHeight","handleModeChange","Open","startResizeListener","stopDocumentScroll","Closed","stopResizeListener","resumeDocumentScroll","style","setProperty","innerHeight","body","addEventListener","removeEventListener","ModalManager","hostBridge","backdropClicked","closeButtonPressed","customModalContent","getMode","closeModal","callUserClosedModalCallback","userClosedModalCallback","showModal","thisArg","_arguments","generator","modalTemplate","updateComplete","focus","P","Promise","resolve","reject","fulfilled","step","next","rejected","result","then","emitModeChangeEvent","modalBackdropColor","modalBackdropZindex","modalWidth","modalMaxWidth","modalZindex","IAIconSearch","_r","et","directiveName","ft","raw","_$litType$","resultType","css","_templateObject","_taggedTemplateLiteral","IABookSearchResults","_LitElement","results","query","queryInProgress","renderSearchAllFields","displayResultImages","errorMessage","bindBookReaderListeners","renderSearchAllFiles","searchResultText","_templateObject12","searchResultBg","_templateObject13","searchResultBorder","_templateObject14","activeButtonBg","_templateObject15","mainCSS","_templateObject16","checkmarkIcon","closeIcon","buttonCSS","focusOnInputIfNecessary","setResults","cancelSearch","input","dispatchSearchCanceled","count","html","nothing","_templateObject2","resultsCount","controls","_templateObject3","_templateObject4","resultsClass","_templateObject5","_templateObject6","selectResult","cover","_templateObject7","displayPageNumber","unsafeHTML","_templateObject8","searchMultipleControls","setQuery","_templateObject9","_templateObject10","showSearchCTA","_templateObject11","headerSection","searchForm","loadingIndicator","setErrorMessage","resultsSet","searchCTA","LitElement","searchState","SearchProvider","onProviderChange","bookreader","onBookSearchInitiated","onSearchStarted","onSearchRequestError","onSearchResultsClicked","onSearchResultsChange","onSearchResultsCleared","searchCanceledInMenu","bindEventListeners","getMenuDetails","getComponent","updateMenu","_searchState","unit","onSearchCanceled","searchCanceled","urlPlugin","updateSearchInUrl","_e$detail$props","props","_e$detail$props$term","term","instance","search","_errorMessages$errorT","_instance$searchResul","_event$detail$props","_props$instance","errorMessages","noResults","notIndexed","messageToShow","searchResults","q","_ref3","_ref3$detail$props","_props$instance2","_props$results","matches","_this$bookreader","cancelSearchRequest","_this$bookreader2","searchView","clearSearchFieldAndResults","pullFromAddressBar","setUrlParam","removeUrlParam","searchUpdates","_searchState2","_ref4","_searchPluginGoToResult","matchIndex","IAIconDl","IABookDownloads","expiration","isBookProtected","mainCss","buttonStyles","regex","some","_option$type","formatsCount","loanExpiryMessage","renderDownloadOptions","hasLCPOption","installSimplyEAldikoThoriumMsg","accessProtectedBook","menuBase","pdf","lcppdf","lcpepub","epub","publicMenuBase","DownloadsProvider","_bookreader$options","isProtected","downloadTypes","computeAvailableTypes","ending","concat","menuData","found","_incoming","_incoming$","_incoming$2","link","formattedType","toLowerCase","downloadOption","menuButtonText","menuInfo","assign","IAIconVisualAdjustment","IAIconMagnifyMinus","IAIconMagnifyPlus","namespacedEvent","eventName","events","optionChange","zoomIn","zoomOut","IABookVisualAdjustments","activeCount","showZoomControls","activeOptions","emitOptionChangedEvent","active","_toConsumableArray","changedOptionId","prepareEventDetails","optionName","updatedOptions","checkedOption","min","max","setRangeValue","_this3","formID","changeActiveStateFor","rangeSlider","activeAdjustments","emitZoomOut","emitZoomIn","repeat","adjustmentCheckbox","zoomControls","visualAdjustmentOptions","VisualAdjustmentsProvider","bookContainer","refs","$brContainer","onAdjustmentChange","optionUpdateComplete","updateOptionsCount","onZoomIn","onZoomOut","zoom","adjustments","brightness","contrast","grayscale","invert","filters","newValue","DeleteModalActions","cancelAction","Function","deleteAction","pageID","BookmarkButton","state","side","position","handleClick","BookmarksLogin","_regeneratorRuntime","exports","Op","hasOwn","hasOwnProperty","obj","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","enumerable","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","context","Context","makeInvokeMethod","tryCatch","fn","arg","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","method","_invoke","AsyncIterator","PromiseImpl","invoke","record","_typeof","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","return","TypeError","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","doneResult","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","iter","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","finish","catch","thrown","delegateYield","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","_defineProperties","descriptor","_toPropertyKey","hint","prim","toPrimitive","res","_toPrimitive","_setPrototypeOf","_getPrototypeOf","api","endpoint","headers","page","credentials","getAll","post","bookmark","sendBookmarkData","put","color","stringify","IABookmarks","subClass","superClass","Constructor","protoProps","staticProps","_fetchBookmarks","_fetchUserBookmarks","Derived","hasNativeReflectConstruct","construct","sham","Proxy","valueOf","_isNativeReflectConstruct","Super","NewTarget","ReferenceError","_assertThisInitialized","bookmarks","editedBookmark","modal","loginOptions","loginClicked","loginUrl","displayMode","bookmarkColors","className","defaultColor","deleteModalConfig","updateDisplay","emitBookmarksChanged","getIdentifier","fetchUserBookmarks","setBREventListeners","bookId","_callee","_context","fetchBookmarks","initializeBookmarks","renderBookmarkButtons","markActiveBookmark","_ref$leafNum","leafNum","_ref$notes","_notes$note","nomalizedParams","getBookmarkColor","formatPage","book","getPageNum","thumbnail","getPageURI","_objectSpread","_callee2","resText","parsedResponse","_parsedResponse","_parsedResponse$error","_parsedResponse$value","bkmrks","_console","_context2","text","console","warn","formattedLeafNum","parseInt","formattedBookmark","formatBookmark","getBookmark","confirmDeletion","createBookmark","_this4","$","not","pageEl","existingButton","pageBookmark","bookmarkState","getPage","isViewable","bookmarkButton","createElement","stopPropagation","pageSide","getAttribute","constMode2up","bookmarkButtonClicked","appendChild","atSetup","constModeThumb","currentIndex","displayedIndices","includes","activeBookmarkID","requestedPageHasBookmark","closeEdit","_this$bookmarkColors$","pagesInView","existingBookmark","bookmarkEdited","emitBookmarkButtonClicked","disableAddBookmarkButton","jumpToPage","displayDeletionModal","deleteBookmark","_this5","_ref5","currBookmarks","pageToCheck","shouldEnableAddBookmarkButton","addBookmark","bookmarkSelected","saveBookmark","_this6","bookmarksList","allowAddingBookmark","addBookmarkButton","bookmarkHelperMessage","IABookmarkEdit","showBookmark","bookmarkEditCSS","bookmarkColorsCSS","colorId","bookmarkId","emitColorChangedEvent","changeColorTo","bookmarkTemplate","emitSaveEvent","updateNote","bookmarkColor","emitDeleteEvent","IAIconEditPencil","IABookmarksList","defaultBookmarkColor","emitEditEvent","emitSaveBookmark","emitDeleteBookmark","colorVal","labelInfo","editMode","bookmarkColorInfo","emitSelectedEvent","editBookmark","editBookmarkComponent","emitBookmarkColorChanged","bookmarksCount","sortedBookmarks","sortBookmarks","bookmarkItem","bookmarkslist","IAIconBookmark","BookmarksProvider","referrerStr","location","bookmarksLoginClicked","bindEvents","setup","bookmarksChanged","bookmarksLength","showSidePanel","_window$archive_analy","archive_analytics","send_event_no_sampling","path","SharingProvider","_createClass","_item$metadata","creatorToUse","arr","_arrayLikeToArray","_arrayWithoutHoles","from","_iterableToArray","minLen","test","_unsupportedIterableToArray","_nonIterableSpread","len","arr2","sortTypes","VolumesProvider","multipleBooksList","by_subprefix","viewableFiles","volumeCount","defineProperties","sortFilesComponent","handleFileListSorted","urlSortValue","getUrlParam","_handleFileListSorted","_event$detail","multipleFilesClicked","_x","orderBy","send_event","svg","BookNavigator","itemMD","bookReaderCannotLoad","bookReaderLoaded","bookIsRestricted","downloadableTypes","isAdmin","lendingInitialized","lendingStatus","menuProviders","fullscreenBranding","iaLogo","sharedObserverHandler","brWidth","brHeight","shortcutOrder","mainBRContainer","emitPostInit","initializeBookSubmenus","loadSharedObserver","brSelector","el","providers","share","baseProviderConfig","visualAdjustments","VisualAdjustmentProvider","updateMenuContents","shouldShowDownloadsMenu","DownloadProvider","enableSearch","brInstance","isWideEnoughToOpenMenu","updateSideMenu","enableBookmarks","enableMultipleBooks","volumes","addMenuShortcut","closeFS","fullscreenShortcut","sortMenuShortcuts","emitMenuShortcutsUpdated","updatedShortcuts","exitFullScreen","closeFullscreen","_this$menuProviders","availableMenus","chapters","update","splice","_this$lendingStatus$u","user_loan_record","shell","emitLoadingStatusUpdate","resize","manageFullScreenBehavior","passive","downloadTypesAvailable","previewType","isRestricted","downloadURLs","manageContextMenuVisibility","capture","_e$target","_this$sharedObserver","startBrWidth","startBrHeight","animating","_this$bookreader3","widthChange","heightChange","emitFullScreenState","enableFSLogoShortcut","isFullscreen","addFullscreenShortcut","deleteFullscreenShortcut","_this$itemMD","itemImage","placeholder","SharedResizeObserver","resizeObserver","ResizeObserver","entries","requestAnimationFrame","handlers","resizeHandlers","shutdown","unobserve","observe","IaBookReader","fullscreen","openMenuName","setModalManager","_this$itemNav","_e$detail","itemNav","_this$itemNav2","manageFullscreen"],"sourceRoot":""}
|