citeclaw 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1681) hide show
  1. package/README.md +22 -0
  2. package/package.json +1 -19
  3. package/scripts/botcite.js +56 -5
  4. package/vendor/translators-official/ABC News Australia.js +0 -224
  5. package/vendor/translators-official/ACLS Humanities EBook.js +0 -165
  6. package/vendor/translators-official/ACLWeb.js +0 -600
  7. package/vendor/translators-official/ACM Digital Library.js +0 -708
  8. package/vendor/translators-official/ACM Queue.js +0 -391
  9. package/vendor/translators-official/ACS Publications.js +0 -633
  10. package/vendor/translators-official/ADS Bibcode.js +0 -664
  11. package/vendor/translators-official/AEA Web.js +0 -450
  12. package/vendor/translators-official/AGRIS.js +0 -311
  13. package/vendor/translators-official/AIP.js +0 -295
  14. package/vendor/translators-official/AMS Journals.js +0 -136
  15. package/vendor/translators-official/AMS MathSciNet (Legacy).js +0 -313
  16. package/vendor/translators-official/AMS MathSciNet.js +0 -288
  17. package/vendor/translators-official/APA PsycNET.js +0 -915
  18. package/vendor/translators-official/APN.ru.js +0 -132
  19. package/vendor/translators-official/APS-Physics.js +0 -204
  20. package/vendor/translators-official/APS.js +0 -542
  21. package/vendor/translators-official/ARTFL Encyclopedie.js +0 -283
  22. package/vendor/translators-official/ARTnews.js +0 -155
  23. package/vendor/translators-official/ARTstor.js +0 -619
  24. package/vendor/translators-official/ASCE.js +0 -199
  25. package/vendor/translators-official/ASCO Meeting Library.js +0 -153
  26. package/vendor/translators-official/ASTIS.js +0 -337
  27. package/vendor/translators-official/ATS International Journal.js +0 -290
  28. package/vendor/translators-official/Access Engineering.js +0 -384
  29. package/vendor/translators-official/Access Medicine.js +0 -343
  30. package/vendor/translators-official/Access Science.js +0 -391
  31. package/vendor/translators-official/Adam Matthew Digital.js +0 -405
  32. package/vendor/translators-official/Agencia del ISBN.js +0 -77
  33. package/vendor/translators-official/Ahval News.js +0 -309
  34. package/vendor/translators-official/Air University Journals.js +0 -236
  35. package/vendor/translators-official/Airiti.js +0 -423
  36. package/vendor/translators-official/Alexander Street Press.js +0 -198
  37. package/vendor/translators-official/AllAfrica.js +0 -291
  38. package/vendor/translators-official/Alsharekh.js +0 -242
  39. package/vendor/translators-official/AlterNet.js +0 -134
  40. package/vendor/translators-official/Aluka.js +0 -261
  41. package/vendor/translators-official/Amazon.js +0 -1043
  42. package/vendor/translators-official/American Archive of Public Broadcasting.js +0 -592
  43. package/vendor/translators-official/American Institute of Aeronautics and Astronautics.js +0 -210
  44. package/vendor/translators-official/American Prospect.js +0 -114
  45. package/vendor/translators-official/Anarchist Library.js +0 -382
  46. package/vendor/translators-official/Ancestry.com US Federal Census.js +0 -164
  47. package/vendor/translators-official/Annual Reviews.js +0 -329
  48. package/vendor/translators-official/Antikvarium.hu.js +0 -280
  49. package/vendor/translators-official/AquaDocs.js +0 -390
  50. package/vendor/translators-official/Archeion.js +0 -249
  51. package/vendor/translators-official/Archiv fuer Sozialgeschichte.js +0 -157
  52. package/vendor/translators-official/Archive Ouverte en Sciences de l'Information et de la Communication (AOSIC).js +0 -179
  53. package/vendor/translators-official/Archives Canada.js +0 -142
  54. package/vendor/translators-official/Ariana News.js +0 -203
  55. package/vendor/translators-official/Art Institute of Chicago.js +0 -279
  56. package/vendor/translators-official/Artefacts Canada.js +0 -192
  57. package/vendor/translators-official/Artforum.js +0 -438
  58. package/vendor/translators-official/Atlanta Journal-Constitution.js +0 -311
  59. package/vendor/translators-official/Atypon Journals.js +0 -1204
  60. package/vendor/translators-official/AustLII and NZLII.js +0 -604
  61. package/vendor/translators-official/Australian Dictionary of Biography.js +0 -196
  62. package/vendor/translators-official/BAILII.js +0 -176
  63. package/vendor/translators-official/BBC Genome.js +0 -254
  64. package/vendor/translators-official/BBC.js +0 -430
  65. package/vendor/translators-official/BIBSYS.js +0 -112
  66. package/vendor/translators-official/BOCC.js +0 -217
  67. package/vendor/translators-official/BOE.js +0 -229
  68. package/vendor/translators-official/BOFiP-Impots.js +0 -132
  69. package/vendor/translators-official/Baidu Scholar.js +0 -276
  70. package/vendor/translators-official/Bangkok Post.js +0 -216
  71. package/vendor/translators-official/Baruch Foundation.js +0 -175
  72. package/vendor/translators-official/Beobachter.js +0 -175
  73. package/vendor/translators-official/Bezneng Gajit.js +0 -92
  74. package/vendor/translators-official/BibLaTeX.js +0 -888
  75. package/vendor/translators-official/BibTeX.js +0 -4236
  76. package/vendor/translators-official/Biblio.com.js +0 -216
  77. package/vendor/translators-official/Bibliontology RDF.js +0 -1166
  78. package/vendor/translators-official/Biblioteca Nacional de Maestros.js +0 -213
  79. package/vendor/translators-official/Bibliotheque et Archives Nationale du Quebec (Pistard).js +0 -147
  80. package/vendor/translators-official/Bibliotheque et Archives Nationales du Quebec.js +0 -266
  81. package/vendor/translators-official/Bibliotheque nationale de France.js +0 -872
  82. package/vendor/translators-official/BioMed Central.js +0 -585
  83. package/vendor/translators-official/BioOne.js +0 -233
  84. package/vendor/translators-official/Bioconductor.js +0 -343
  85. package/vendor/translators-official/Blaetter.js +0 -192
  86. package/vendor/translators-official/Blogger.js +0 -244
  87. package/vendor/translators-official/Bloomberg.js +0 -205
  88. package/vendor/translators-official/Bloomsbury Food Library.js +0 -296
  89. package/vendor/translators-official/Bluesky.js +0 -195
  90. package/vendor/translators-official/BnF ISBN.js +0 -129
  91. package/vendor/translators-official/Bookmarks.js +0 -282
  92. package/vendor/translators-official/Bookshop.org.js +0 -223
  93. package/vendor/translators-official/Boston Review.js +0 -332
  94. package/vendor/translators-official/Bosworth Toller's Anglo-Saxon Dictionary Online.js +0 -496
  95. package/vendor/translators-official/Bracero History Archive.js +0 -200
  96. package/vendor/translators-official/Brill.js +0 -434
  97. package/vendor/translators-official/Brukerhandboken.js +0 -153
  98. package/vendor/translators-official/Bryn Mawr Classical Review.js +0 -303
  99. package/vendor/translators-official/Bundesgesetzblatt.js +0 -231
  100. package/vendor/translators-official/Business Standard.js +0 -151
  101. package/vendor/translators-official/CABI - CAB Abstracts.js +0 -317
  102. package/vendor/translators-official/CAOD.js +0 -260
  103. package/vendor/translators-official/CBC.js +0 -439
  104. package/vendor/translators-official/CCfr (BnF).js +0 -162
  105. package/vendor/translators-official/CERN Document Server.js +0 -277
  106. package/vendor/translators-official/CEUR Workshop Proceedings.js +0 -145
  107. package/vendor/translators-official/CFF References.js +0 -170
  108. package/vendor/translators-official/CFF.js +0 -113
  109. package/vendor/translators-official/CIA World Factbook.js +0 -128
  110. package/vendor/translators-official/CLACSO.js +0 -226
  111. package/vendor/translators-official/CLASE.js +0 -135
  112. package/vendor/translators-official/CNKI.js +0 -731
  113. package/vendor/translators-official/COBISS.js +0 -1945
  114. package/vendor/translators-official/COinS.js +0 -336
  115. package/vendor/translators-official/CQ Press.js +0 -418
  116. package/vendor/translators-official/CROSBI.js +0 -227
  117. package/vendor/translators-official/CSIRO Publishing.js +0 -139
  118. package/vendor/translators-official/CSL JSON.js +0 -203
  119. package/vendor/translators-official/CSV.js +0 -294
  120. package/vendor/translators-official/Cairn.info.js +0 -368
  121. package/vendor/translators-official/CalMatters.js +0 -228
  122. package/vendor/translators-official/Calisphere.js +0 -355
  123. package/vendor/translators-official/Camara Brasileira do Livro ISBN.js +0 -842
  124. package/vendor/translators-official/Cambridge Core.js +0 -580
  125. package/vendor/translators-official/Cambridge Engage Preprints.js +0 -276
  126. package/vendor/translators-official/CanLII.js +0 -284
  127. package/vendor/translators-official/Canada.com.js +0 -171
  128. package/vendor/translators-official/Canadian Letters and Images.js +0 -148
  129. package/vendor/translators-official/Canadiana.ca.js +0 -196
  130. package/vendor/translators-official/Cascadilla Proceedings Project.js +0 -390
  131. package/vendor/translators-official/Cell Press.js +0 -516
  132. package/vendor/translators-official/Central and Eastern European Online Library Journals.js +0 -313
  133. package/vendor/translators-official/Champlain Society - Collection.js +0 -220
  134. package/vendor/translators-official/ChatGPT.js +0 -185
  135. package/vendor/translators-official/Chicago Journal of Theoretical Computer Science.js +0 -203
  136. package/vendor/translators-official/Christian Science Monitor.js +0 -148
  137. package/vendor/translators-official/Chronicling America.js +0 -131
  138. package/vendor/translators-official/CiNii Research.js +0 -168
  139. package/vendor/translators-official/Citavi 5 XML.js +0 -516
  140. package/vendor/translators-official/CiteSeer.js +0 -196
  141. package/vendor/translators-official/Citizen Lab.js +0 -347
  142. package/vendor/translators-official/Civilization.ca.js +0 -146
  143. package/vendor/translators-official/Climate Change and Human Health Literature Portal.js +0 -283
  144. package/vendor/translators-official/Clinical Key.js +0 -367
  145. package/vendor/translators-official/Code4Lib Journal.js +0 -143
  146. package/vendor/translators-official/Colorado State Legislature.js +0 -215
  147. package/vendor/translators-official/Columbia University Press.js +0 -238
  148. package/vendor/translators-official/Common-Place.js +0 -218
  149. package/vendor/translators-official/Computer History Museum Archive.js +0 -1319
  150. package/vendor/translators-official/Copernicus.js +0 -461
  151. package/vendor/translators-official/Cornell LII.js +0 -252
  152. package/vendor/translators-official/Cornell University Press.js +0 -235
  153. package/vendor/translators-official/CourtListener.js +0 -265
  154. package/vendor/translators-official/Crossref REST.js +0 -1757
  155. package/vendor/translators-official/Crossref Unixref XML.js +0 -965
  156. package/vendor/translators-official/Current Affairs.js +0 -160
  157. package/vendor/translators-official/DABI.js +0 -476
  158. package/vendor/translators-official/DAI-Zenon.js +0 -392
  159. package/vendor/translators-official/DART-Europe.js +0 -176
  160. package/vendor/translators-official/DBLP Computer Science Bibliography.js +0 -462
  161. package/vendor/translators-official/DBpia.js +0 -233
  162. package/vendor/translators-official/DEPATISnet.js +0 -373
  163. package/vendor/translators-official/DOAJ.js +0 -243
  164. package/vendor/translators-official/DOI Content Negotiation.js +0 -352
  165. package/vendor/translators-official/DOI.js +0 -322
  166. package/vendor/translators-official/DPLA.js +0 -425
  167. package/vendor/translators-official/DSpace Intermediate Metadata.js +0 -208
  168. package/vendor/translators-official/Dagens Nyheter.js +0 -369
  169. package/vendor/translators-official/Dagstuhl Research Online Publication Server.js +0 -276
  170. package/vendor/translators-official/Dar Almandumah.js +0 -253
  171. package/vendor/translators-official/Data.gov.js +0 -225
  172. package/vendor/translators-official/Databrary.js +0 -184
  173. package/vendor/translators-official/Datacite JSON.js +0 -1182
  174. package/vendor/translators-official/Dataverse.js +0 -418
  175. package/vendor/translators-official/Daum News.js +0 -139
  176. package/vendor/translators-official/De Gruyter Brill.js +0 -460
  177. package/vendor/translators-official/Defense Technical Information Center.js +0 -146
  178. package/vendor/translators-official/Delpher.js +0 -413
  179. package/vendor/translators-official/Demographic Research.js +0 -164
  180. package/vendor/translators-official/Denik CZ.js +0 -273
  181. package/vendor/translators-official/Der Freitag.js +0 -236
  182. package/vendor/translators-official/Der Spiegel.js +0 -479
  183. package/vendor/translators-official/Desiring God.js +0 -216
  184. package/vendor/translators-official/Deutsche Fotothek.js +0 -364
  185. package/vendor/translators-official/Deutsche Nationalbibliothek.js +0 -594
  186. package/vendor/translators-official/Dialnet.js +0 -258
  187. package/vendor/translators-official/Die Zeit.js +0 -378
  188. package/vendor/translators-official/DigiZeitschriften.js +0 -269
  189. package/vendor/translators-official/Digital Humanities Quarterly.js +0 -207
  190. package/vendor/translators-official/Digital Spy.js +0 -215
  191. package/vendor/translators-official/Dimensions.js +0 -233
  192. package/vendor/translators-official/Douban.js +0 -316
  193. package/vendor/translators-official/Dreier Neuerscheinungsdienst.js +0 -209
  194. package/vendor/translators-official/DrugBank.ca.js +0 -209
  195. package/vendor/translators-official/Dryad Digital Repository.js +0 -323
  196. package/vendor/translators-official/Duke University Press Books.js +0 -250
  197. package/vendor/translators-official/E-periodica Switzerland.js +0 -347
  198. package/vendor/translators-official/EBSCO Discovery Layer.js +0 -159
  199. package/vendor/translators-official/EBSCOhost.js +0 -592
  200. package/vendor/translators-official/EIDR.js +0 -184
  201. package/vendor/translators-official/EPA National Library Catalog.js +0 -245
  202. package/vendor/translators-official/ERIC.js +0 -986
  203. package/vendor/translators-official/ESpacenet.js +0 -465
  204. package/vendor/translators-official/EUR-Lex.js +0 -418
  205. package/vendor/translators-official/Eastview.js +0 -336
  206. package/vendor/translators-official/Edinburgh University Press Journals.js +0 -178
  207. package/vendor/translators-official/Education Week.js +0 -197
  208. package/vendor/translators-official/El Comercio (Peru).js +0 -347
  209. package/vendor/translators-official/El Pais.js +0 -262
  210. package/vendor/translators-official/Electronic Colloquium on Computational Complexity.js +0 -230
  211. package/vendor/translators-official/Elicit.js +0 -120
  212. package/vendor/translators-official/Elsevier Health Journals.js +0 -531
  213. package/vendor/translators-official/Elsevier Pure.js +0 -420
  214. package/vendor/translators-official/Embedded Metadata.js +0 -1978
  215. package/vendor/translators-official/Emerald Insight.js +0 -626
  216. package/vendor/translators-official/Encyclopedia of Chicago.js +0 -162
  217. package/vendor/translators-official/Encyclopedia of Korean Culture.js +0 -221
  218. package/vendor/translators-official/Endnote XML.js +0 -1407
  219. package/vendor/translators-official/Engineering Village.js +0 -139
  220. package/vendor/translators-official/Envidat.js +0 -331
  221. package/vendor/translators-official/Epicurious.js +0 -144
  222. package/vendor/translators-official/Erudit.js +0 -272
  223. package/vendor/translators-official/Euclid.js +0 -220
  224. package/vendor/translators-official/EurasiaNet.js +0 -109
  225. package/vendor/translators-official/EurogamerUSgamer.js +0 -380
  226. package/vendor/translators-official/Europe PMC.js +0 -448
  227. package/vendor/translators-official/Evernote.js +0 -104
  228. package/vendor/translators-official/F1000 Research.js +0 -655
  229. package/vendor/translators-official/FAO Knowledge Repository.js +0 -598
  230. package/vendor/translators-official/FAOLEX Database.js +0 -811
  231. package/vendor/translators-official/FAZ.NET.js +0 -231
  232. package/vendor/translators-official/Fachportal Padagogik.js +0 -839
  233. package/vendor/translators-official/Factiva.js +0 -302
  234. package/vendor/translators-official/Failed Architecture.js +0 -114
  235. package/vendor/translators-official/Fairfax Australia.js +0 -200
  236. package/vendor/translators-official/Fatcat.js +0 -425
  237. package/vendor/translators-official/Figshare.js +0 -191
  238. package/vendor/translators-official/Financial Times.js +0 -187
  239. package/vendor/translators-official/Finna.js +0 -357
  240. package/vendor/translators-official/Flickr.js +0 -318
  241. package/vendor/translators-official/Foreign Affairs.js +0 -485
  242. package/vendor/translators-official/Foreign Policy.js +0 -146
  243. package/vendor/translators-official/FreeCite.js +0 -95
  244. package/vendor/translators-official/FreePatentsOnline.js +0 -265
  245. package/vendor/translators-official/Frieze.js +0 -243
  246. package/vendor/translators-official/Frontiers.js +0 -667
  247. package/vendor/translators-official/GMS German Medical Science.js +0 -319
  248. package/vendor/translators-official/GPO Access e-CFR.js +0 -134
  249. package/vendor/translators-official/Gale Databases.js +0 -324
  250. package/vendor/translators-official/GaleGDC.js +0 -189
  251. package/vendor/translators-official/Galegroup.js +0 -327
  252. package/vendor/translators-official/Gallica.js +0 -194
  253. package/vendor/translators-official/Game Studies.js +0 -155
  254. package/vendor/translators-official/GameSpot.js +0 -199
  255. package/vendor/translators-official/GameStar GamePro.js +0 -198
  256. package/vendor/translators-official/Gasyrlar Awazy.js +0 -156
  257. package/vendor/translators-official/Gemeinsamer Bibliotheksverbund ISBN.js +0 -23
  258. package/vendor/translators-official/Gene Ontology.js +0 -128
  259. package/vendor/translators-official/GitHub.js +0 -501
  260. package/vendor/translators-official/Globes.js +0 -243
  261. package/vendor/translators-official/Gmail.js +0 -64
  262. package/vendor/translators-official/Goodreads.js +0 -219
  263. package/vendor/translators-official/Google Books.js +0 -552
  264. package/vendor/translators-official/Google Gemini.js +0 -116
  265. package/vendor/translators-official/Google Patents.js +0 -959
  266. package/vendor/translators-official/Google Play.js +0 -186
  267. package/vendor/translators-official/Google Presentation.js +0 -104
  268. package/vendor/translators-official/Google Research.js +0 -221
  269. package/vendor/translators-official/Google Scholar.js +0 -1361
  270. package/vendor/translators-official/Gulag Many Days, Many Lives.js +0 -179
  271. package/vendor/translators-official/HAL.js +0 -536
  272. package/vendor/translators-official/HCSP.js +0 -312
  273. package/vendor/translators-official/HUDOC.js +0 -650
  274. package/vendor/translators-official/Haaretz.js +0 -562
  275. package/vendor/translators-official/Habr.js +0 -232
  276. package/vendor/translators-official/Handelszeitung.js +0 -273
  277. package/vendor/translators-official/Hanrei Watch.js +0 -123
  278. package/vendor/translators-official/Harper's Magazine.js +0 -365
  279. package/vendor/translators-official/Harvard Business Review.js +0 -326
  280. package/vendor/translators-official/Harvard Caselaw Access Project.js +0 -244
  281. package/vendor/translators-official/Harvard University Press Books.js +0 -286
  282. package/vendor/translators-official/HathiTrust.js +0 -311
  283. package/vendor/translators-official/HeinOnline.js +0 -280
  284. package/vendor/translators-official/Heise.js +0 -200
  285. package/vendor/translators-official/Herder.js +0 -236
  286. package/vendor/translators-official/HighBeam.js +0 -198
  287. package/vendor/translators-official/HighWire 2.0.js +0 -1355
  288. package/vendor/translators-official/HighWire.js +0 -209
  289. package/vendor/translators-official/Hindawi Publishers.js +0 -177
  290. package/vendor/translators-official/Hispanic-American Periodical Index.js +0 -236
  291. package/vendor/translators-official/Homeland Security Digital Library.js +0 -426
  292. package/vendor/translators-official/Hrvatska enciklopedija.js +0 -118
  293. package/vendor/translators-official/Huff Post.js +0 -223
  294. package/vendor/translators-official/Human Rights Watch.js +0 -450
  295. package/vendor/translators-official/IBISWorld.js +0 -171
  296. package/vendor/translators-official/IDEA ALM.js +0 -536
  297. package/vendor/translators-official/IEEE Computer Society.js +0 -429
  298. package/vendor/translators-official/IEEE Xplore.js +0 -1000
  299. package/vendor/translators-official/IETF.js +0 -451
  300. package/vendor/translators-official/IGN.js +0 -136
  301. package/vendor/translators-official/IMDb.js +0 -566
  302. package/vendor/translators-official/INSPIRE.js +0 -247
  303. package/vendor/translators-official/IPCC.js +0 -757
  304. package/vendor/translators-official/ISTC.js +0 -181
  305. package/vendor/translators-official/Idref.js +0 -179
  306. package/vendor/translators-official/In These Times.js +0 -196
  307. package/vendor/translators-official/Ined.js +0 -558
  308. package/vendor/translators-official/InfoTrac.js +0 -279
  309. package/vendor/translators-official/Informationssystem Medienpaedagogik.js +0 -305
  310. package/vendor/translators-official/IngentaConnect.js +0 -312
  311. package/vendor/translators-official/Inside Higher Ed.js +0 -167
  312. package/vendor/translators-official/Insignia OPAC.js +0 -114
  313. package/vendor/translators-official/Institute of Contemporary Art.js +0 -180
  314. package/vendor/translators-official/Institute of Physics.js +0 -340
  315. package/vendor/translators-official/Integrum.js +0 -173
  316. package/vendor/translators-official/Intellixir.js +0 -264
  317. package/vendor/translators-official/Inter-Research Science Center.js +0 -185
  318. package/vendor/translators-official/International Nuclear Information System.js +0 -285
  319. package/vendor/translators-official/Internet Archive Scholar.js +0 -106
  320. package/vendor/translators-official/Internet Archive Wayback Machine.js +0 -152
  321. package/vendor/translators-official/Internet Archive.js +0 -552
  322. package/vendor/translators-official/InvenioRDM.js +0 -1250
  323. package/vendor/translators-official/Isidore.js +0 -235
  324. package/vendor/translators-official/J-Stage.js +0 -272
  325. package/vendor/translators-official/JETS.js +0 -122
  326. package/vendor/translators-official/JISC Historical Texts.js +0 -273
  327. package/vendor/translators-official/JRC Publications Repository.js +0 -569
  328. package/vendor/translators-official/JSTOR.js +0 -821
  329. package/vendor/translators-official/Jahrbuch.js +0 -213
  330. package/vendor/translators-official/Japan Times Online.js +0 -138
  331. package/vendor/translators-official/Journal of Electronic Publishing.js +0 -147
  332. package/vendor/translators-official/Journal of Extension.js +0 -288
  333. package/vendor/translators-official/Journal of Machine Learning Research.js +0 -441
  334. package/vendor/translators-official/Journal of Religion and Society.js +0 -174
  335. package/vendor/translators-official/JurPC.js +0 -274
  336. package/vendor/translators-official/Juricaf.js +0 -141
  337. package/vendor/translators-official/Juris.js +0 -728
  338. package/vendor/translators-official/K10plus ISBN.js +0 -386
  339. package/vendor/translators-official/KStudy.js +0 -632
  340. package/vendor/translators-official/Kanopy.js +0 -358
  341. package/vendor/translators-official/Khaama Press.js +0 -249
  342. package/vendor/translators-official/KiM.js +0 -259
  343. package/vendor/translators-official/KitapYurdu.com.js +0 -376
  344. package/vendor/translators-official/Kommersant.js +0 -174
  345. package/vendor/translators-official/Korean National Library.js +0 -621
  346. package/vendor/translators-official/L'Annee Philologique.js +0 -267
  347. package/vendor/translators-official/LA Times.js +0 -239
  348. package/vendor/translators-official/LIBRIS ISBN.js +0 -103
  349. package/vendor/translators-official/LIVIVO.js +0 -260
  350. package/vendor/translators-official/LWN.net.js +0 -350
  351. package/vendor/translators-official/La Croix.js +0 -237
  352. package/vendor/translators-official/La Nacion (Argentina).js +0 -231
  353. package/vendor/translators-official/La Presse.js +0 -218
  354. package/vendor/translators-official/La Republica (Peru).js +0 -174
  355. package/vendor/translators-official/Lagen.nu.js +0 -214
  356. package/vendor/translators-official/Landesbibliographie Baden-Wurttemberg.js +0 -324
  357. package/vendor/translators-official/Lapham's Quarterly.js +0 -1062
  358. package/vendor/translators-official/Le Devoir.js +0 -167
  359. package/vendor/translators-official/Le Figaro.js +0 -225
  360. package/vendor/translators-official/Le Maitron.js +0 -484
  361. package/vendor/translators-official/Le Monde.js +0 -245
  362. package/vendor/translators-official/Le monde diplomatique.js +0 -200
  363. package/vendor/translators-official/Legifrance.js +0 -641
  364. package/vendor/translators-official/Legislative Insight.js +0 -406
  365. package/vendor/translators-official/Lexis+.js +0 -264
  366. package/vendor/translators-official/LexisNexis.js +0 -505
  367. package/vendor/translators-official/Libraries Tasmania.js +0 -778
  368. package/vendor/translators-official/Library Catalog (Aleph).js +0 -385
  369. package/vendor/translators-official/Library Catalog (Amicus).js +0 -254
  370. package/vendor/translators-official/Library Catalog (Aquabrowser).js +0 -253
  371. package/vendor/translators-official/Library Catalog (BiblioCommons).js +0 -249
  372. package/vendor/translators-official/Library Catalog (Blacklight).js +0 -341
  373. package/vendor/translators-official/Library Catalog (Capita Prism).js +0 -162
  374. package/vendor/translators-official/Library Catalog (DRA).js +0 -203
  375. package/vendor/translators-official/Library Catalog (Dynix).js +0 -315
  376. package/vendor/translators-official/Library Catalog (EBSCO Locate).js +0 -442
  377. package/vendor/translators-official/Library Catalog (Encore).js +0 -211
  378. package/vendor/translators-official/Library Catalog (InnoPAC).js +0 -305
  379. package/vendor/translators-official/Library Catalog (Koha).js +0 -225
  380. package/vendor/translators-official/Library Catalog (Mango).js +0 -285
  381. package/vendor/translators-official/Library Catalog (OPALS).js +0 -200
  382. package/vendor/translators-official/Library Catalog (PICA).js +0 -2120
  383. package/vendor/translators-official/Library Catalog (PICA2).js +0 -331
  384. package/vendor/translators-official/Library Catalog (Pika).js +0 -488
  385. package/vendor/translators-official/Library Catalog (Polaris).js +0 -183
  386. package/vendor/translators-official/Library Catalog (Quolto).js +0 -320
  387. package/vendor/translators-official/Library Catalog (RERO ILS).js +0 -754
  388. package/vendor/translators-official/Library Catalog (SIRSI eLibrary).js +0 -407
  389. package/vendor/translators-official/Library Catalog (SIRSI).js +0 -452
  390. package/vendor/translators-official/Library Catalog (SLIMS).js +0 -146
  391. package/vendor/translators-official/Library Catalog (TIND ILS).js +0 -773
  392. package/vendor/translators-official/Library Catalog (TLCYouSeeMore).js +0 -132
  393. package/vendor/translators-official/Library Catalog (TinREAD).js +0 -277
  394. package/vendor/translators-official/Library Catalog (VTLS).js +0 -125
  395. package/vendor/translators-official/Library Catalog (Visual Library 2021).js +0 -765
  396. package/vendor/translators-official/Library Catalog (Voyager 7).js +0 -199
  397. package/vendor/translators-official/Library Catalog (Voyager).js +0 -212
  398. package/vendor/translators-official/Library Genesis.js +0 -337
  399. package/vendor/translators-official/Library Hub Discover.js +0 -359
  400. package/vendor/translators-official/Library of Congress Digital Collections.js +0 -869
  401. package/vendor/translators-official/Library of Congress ISBN.js +0 -86
  402. package/vendor/translators-official/LingBuzz.js +0 -359
  403. package/vendor/translators-official/Lippincott Williams and Wilkins.js +0 -341
  404. package/vendor/translators-official/Literary Hub.js +0 -950
  405. package/vendor/translators-official/Litres.js +0 -236
  406. package/vendor/translators-official/LiveJournal.js +0 -219
  407. package/vendor/translators-official/London Review of Books.js +0 -291
  408. package/vendor/translators-official/LookUs.js +0 -260
  409. package/vendor/translators-official/Lulu.js +0 -264
  410. package/vendor/translators-official/MAB2.js +0 -373
  411. package/vendor/translators-official/MARC.js +0 -1080
  412. package/vendor/translators-official/MARCXML.js +0 -489
  413. package/vendor/translators-official/MCV.js +0 -258
  414. package/vendor/translators-official/MDPI Journals.js +0 -356
  415. package/vendor/translators-official/MEDLINEnbib.js +0 -1561
  416. package/vendor/translators-official/METS.js +0 -384
  417. package/vendor/translators-official/MIDAS Journals.js +0 -343
  418. package/vendor/translators-official/MIT Press Books.js +0 -637
  419. package/vendor/translators-official/MODS.js +0 -2545
  420. package/vendor/translators-official/MPG PuRe.js +0 -541
  421. package/vendor/translators-official/Mailman.js +0 -136
  422. package/vendor/translators-official/Mainichi Daily News.js +0 -189
  423. package/vendor/translators-official/Mastodon.js +0 -198
  424. package/vendor/translators-official/Matbugat.ru.js +0 -110
  425. package/vendor/translators-official/Max Planck Institute for the History of Science Virtual Laboratory Library.js +0 -136
  426. package/vendor/translators-official/Medium.js +0 -208
  427. package/vendor/translators-official/MetaLib.js +0 -126
  428. package/vendor/translators-official/Microbiology Society Journals.js +0 -343
  429. package/vendor/translators-official/Microsoft Academic.js +0 -424
  430. package/vendor/translators-official/Mikromarc.js +0 -207
  431. package/vendor/translators-official/Milli Kutuphane.js +0 -244
  432. package/vendor/translators-official/Musee du Louvre.js +0 -265
  433. package/vendor/translators-official/NASA ADS.js +0 -889
  434. package/vendor/translators-official/NASA NTRS.js +0 -610
  435. package/vendor/translators-official/NCBI Nucleotide.js +0 -227
  436. package/vendor/translators-official/NPR.js +0 -341
  437. package/vendor/translators-official/NRC Research Press.js +0 -181
  438. package/vendor/translators-official/NRC.nl.js +0 -226
  439. package/vendor/translators-official/NTSB Accident Reports.js +0 -226
  440. package/vendor/translators-official/NYPL Menus.js +0 -275
  441. package/vendor/translators-official/NYPL Research Catalog.js +0 -458
  442. package/vendor/translators-official/NYTimes.com.js +0 -947
  443. package/vendor/translators-official/NZZ.ch.js +0 -272
  444. package/vendor/translators-official/Nagoya University OPAC.js +0 -336
  445. package/vendor/translators-official/National Academies Press.js +0 -243
  446. package/vendor/translators-official/National Agriculture Library.js +0 -524
  447. package/vendor/translators-official/National Archives UK Case Law.js +0 -509
  448. package/vendor/translators-official/National Archives of Australia.js +0 -522
  449. package/vendor/translators-official/National Archives of South Africa.js +0 -122
  450. package/vendor/translators-official/National Bureau of Economic Research.js +0 -363
  451. package/vendor/translators-official/National Diet Library Catalogue.js +0 -333
  452. package/vendor/translators-official/National Gallery of Art - USA.js +0 -149
  453. package/vendor/translators-official/National Gallery of Australia.js +0 -252
  454. package/vendor/translators-official/National Library of Australia (new catalog).js +0 -223
  455. package/vendor/translators-official/National Library of Belarus.js +0 -171
  456. package/vendor/translators-official/National Library of Norway.js +0 -310
  457. package/vendor/translators-official/National Library of Poland ISBN.js +0 -140
  458. package/vendor/translators-official/National Post.js +0 -186
  459. package/vendor/translators-official/National Technical Reports Library.js +0 -276
  460. package/vendor/translators-official/National Transportation Library ROSA P.js +0 -562
  461. package/vendor/translators-official/Nature Publishing Group.js +0 -3394
  462. package/vendor/translators-official/Neural Information Processing Systems.js +0 -385
  463. package/vendor/translators-official/New Left Review.js +0 -245
  464. package/vendor/translators-official/New Zealand Herald.js +0 -282
  465. package/vendor/translators-official/Newlines Magazine.js +0 -190
  466. package/vendor/translators-official/News Corp Australia.js +0 -251
  467. package/vendor/translators-official/NewsBank.js +0 -202
  468. package/vendor/translators-official/NewsnetTamedia.js +0 -509
  469. package/vendor/translators-official/Noor Digital Library.js +0 -267
  470. package/vendor/translators-official/Note HTML.js +0 -206
  471. package/vendor/translators-official/Note Markdown.js +0 -1638
  472. package/vendor/translators-official/Notre Dame Philosophical Reviews.js +0 -201
  473. package/vendor/translators-official/OAPEN.js +0 -331
  474. package/vendor/translators-official/OCLC WorldCat FirstSearch.js +0 -213
  475. package/vendor/translators-official/OECD.js +0 -216
  476. package/vendor/translators-official/ORCID.js +0 -104
  477. package/vendor/translators-official/OSF Preprints.js +0 -1287
  478. package/vendor/translators-official/OSTI Energy Citations.js +0 -202
  479. package/vendor/translators-official/OVID Tagged.js +0 -1226
  480. package/vendor/translators-official/OZON.ru.js +0 -465
  481. package/vendor/translators-official/OhioLINK.js +0 -43
  482. package/vendor/translators-official/Old Bailey Online.js +0 -315
  483. package/vendor/translators-official/Open Conf.js +0 -172
  484. package/vendor/translators-official/Open Knowledge Repository.js +0 -811
  485. package/vendor/translators-official/Open WorldCat.js +0 -1394
  486. package/vendor/translators-official/OpenAlex JSON.js +0 -740
  487. package/vendor/translators-official/OpenAlex.js +0 -444
  488. package/vendor/translators-official/OpenEdition Books.js +0 -155
  489. package/vendor/translators-official/OpenEdition Journals.js +0 -432
  490. package/vendor/translators-official/Optical Society of America.js +0 -562
  491. package/vendor/translators-official/Optimization Online.js +0 -418
  492. package/vendor/translators-official/Ovid OCE.js +0 -353
  493. package/vendor/translators-official/Ovid.js +0 -302
  494. package/vendor/translators-official/Oxford Dictionaries Premium.js +0 -194
  495. package/vendor/translators-official/Oxford English Dictionary.js +0 -122
  496. package/vendor/translators-official/Oxford Music and Art Online.js +0 -120
  497. package/vendor/translators-official/Oxford Reference.js +0 -202
  498. package/vendor/translators-official/Oxford University Press.js +0 -277
  499. package/vendor/translators-official/PC Gamer.js +0 -302
  500. package/vendor/translators-official/PC Games.js +0 -128
  501. package/vendor/translators-official/PEI Archival Information Network.js +0 -242
  502. package/vendor/translators-official/PEP Web.js +0 -165
  503. package/vendor/translators-official/PKP Catalog Systems.js +0 -1455
  504. package/vendor/translators-official/PLoS Journals.js +0 -284
  505. package/vendor/translators-official/PRC History Review.js +0 -298
  506. package/vendor/translators-official/Pajhwok Afghan News.js +0 -198
  507. package/vendor/translators-official/Papers Past.js +0 -509
  508. package/vendor/translators-official/Paris Review.js +0 -227
  509. package/vendor/translators-official/Pastebin.js +0 -199
  510. package/vendor/translators-official/Patents - USPTO.js +0 -210
  511. package/vendor/translators-official/Peeters.js +0 -587
  512. package/vendor/translators-official/Perceiving Systems.js +0 -350
  513. package/vendor/translators-official/Perlego.js +0 -416
  514. package/vendor/translators-official/PhilPapers.js +0 -233
  515. package/vendor/translators-official/Philosopher's Imprint.js +0 -169
  516. package/vendor/translators-official/Pleade.js +0 -329
  517. package/vendor/translators-official/Polygon.js +0 -270
  518. package/vendor/translators-official/Potsdamer Neueste Nachrichten.js +0 -188
  519. package/vendor/translators-official/Premium Times.js +0 -144
  520. package/vendor/translators-official/Preprints.org.js +0 -305
  521. package/vendor/translators-official/Prime 9ja Online.js +0 -402
  522. package/vendor/translators-official/Primo 2018.js +0 -126
  523. package/vendor/translators-official/Primo Normalized XML.js +0 -1075
  524. package/vendor/translators-official/Primo.js +0 -322
  525. package/vendor/translators-official/ProMED.js +0 -66
  526. package/vendor/translators-official/ProQuest Ebook Central.js +0 -226
  527. package/vendor/translators-official/ProQuest PolicyFile.js +0 -115
  528. package/vendor/translators-official/ProQuest.js +0 -2210
  529. package/vendor/translators-official/Probing the Past.js +0 -151
  530. package/vendor/translators-official/Project Gutenberg.js +0 -191
  531. package/vendor/translators-official/Project MUSE.js +0 -451
  532. package/vendor/translators-official/Protein Data Bank.js +0 -445
  533. package/vendor/translators-official/PubFactory Journals.js +0 -712
  534. package/vendor/translators-official/PubMed Central.js +0 -563
  535. package/vendor/translators-official/PubMed XML.js +0 -1240
  536. package/vendor/translators-official/PubMed.js +0 -1317
  537. package/vendor/translators-official/PubPub.js +0 -530
  538. package/vendor/translators-official/Public Record Office Victoria.js +0 -252
  539. package/vendor/translators-official/Publications Office of the European Union.js +0 -540
  540. package/vendor/translators-official/Publications du Quebec.js +0 -225
  541. package/vendor/translators-official/PyPI.js +0 -288
  542. package/vendor/translators-official/Qatar Digital Library.js +0 -802
  543. package/vendor/translators-official/Queensland State Archives.js +0 -303
  544. package/vendor/translators-official/R-Packages.js +0 -410
  545. package/vendor/translators-official/RAND.js +0 -283
  546. package/vendor/translators-official/RDF.js +0 -1782
  547. package/vendor/translators-official/REDALYC.js +0 -196
  548. package/vendor/translators-official/RIS.js +0 -7292
  549. package/vendor/translators-official/RSC Publishing.js +0 -250
  550. package/vendor/translators-official/Radio Free Europe Radio Liberty.js +0 -706
  551. package/vendor/translators-official/RePEc - Econpapers.js +0 -725
  552. package/vendor/translators-official/RePEc - IDEAS.js +0 -337
  553. package/vendor/translators-official/Rechtspraak.nl.js +0 -295
  554. package/vendor/translators-official/RefWorks Tagged.js +0 -1185
  555. package/vendor/translators-official/ReferBibIX.js +0 -463
  556. package/vendor/translators-official/Regeringskansliet.js +0 -89
  557. package/vendor/translators-official/Research Square.js +0 -335
  558. package/vendor/translators-official/ResearchGate.js +0 -394
  559. package/vendor/translators-official/Retsinformation.js +0 -348
  560. package/vendor/translators-official/Reuters.js +0 -255
  561. package/vendor/translators-official/Rock, Paper, Shotgun.js +0 -304
  562. package/vendor/translators-official/Roll Call.js +0 -173
  563. package/vendor/translators-official/Russian State Library.js +0 -1517
  564. package/vendor/translators-official/SAE Papers.js +0 -241
  565. package/vendor/translators-official/SAGE Journals.js +0 -429
  566. package/vendor/translators-official/SAGE Knowledge.js +0 -505
  567. package/vendor/translators-official/SAILDART.js +0 -364
  568. package/vendor/translators-official/SALT Research Archives.js +0 -196
  569. package/vendor/translators-official/SFU IPinCH.js +0 -946
  570. package/vendor/translators-official/SIPRI.js +0 -256
  571. package/vendor/translators-official/SIRS Knowledge Source.js +0 -546
  572. package/vendor/translators-official/SLUB Dresden.js +0 -300
  573. package/vendor/translators-official/SORA.js +0 -340
  574. package/vendor/translators-official/SSOAR.js +0 -399
  575. package/vendor/translators-official/SSRN.js +0 -235
  576. package/vendor/translators-official/SVT Nyheter.js +0 -381
  577. package/vendor/translators-official/Sacramento Bee.js +0 -274
  578. package/vendor/translators-official/Safari Books Online.js +0 -391
  579. package/vendor/translators-official/Scholars Portal Journals.js +0 -220
  580. package/vendor/translators-official/Scholia.js +0 -189
  581. package/vendor/translators-official/Schweizer Radio und Fernsehen SRF.js +0 -152
  582. package/vendor/translators-official/SciELO.js +0 -440
  583. package/vendor/translators-official/ScienceDirect.js +0 -1306
  584. package/vendor/translators-official/Scopus.js +0 -418
  585. package/vendor/translators-official/Semantic Scholar.js +0 -513
  586. package/vendor/translators-official/Silverchair.js +0 -886
  587. package/vendor/translators-official/Slate.js +0 -228
  588. package/vendor/translators-official/SlideShare.js +0 -112
  589. package/vendor/translators-official/Springer Link.js +0 -696
  590. package/vendor/translators-official/Stack Exchange.js +0 -134
  591. package/vendor/translators-official/Standard Ebooks.js +0 -198
  592. package/vendor/translators-official/Stanford Encyclopedia of Philosophy.js +0 -285
  593. package/vendor/translators-official/Stanford University Press.js +0 -343
  594. package/vendor/translators-official/State Records Office of Western Australia.js +0 -439
  595. package/vendor/translators-official/Stitcher.js +0 -141
  596. package/vendor/translators-official/Store norske leksikon.js +0 -291
  597. package/vendor/translators-official/Stuff.co.nz.js +0 -446
  598. package/vendor/translators-official/Substack.js +0 -237
  599. package/vendor/translators-official/Sud Ouest.js +0 -181
  600. package/vendor/translators-official/Sueddeutsche.de.js +0 -205
  601. package/vendor/translators-official/Summon 2.js +0 -117
  602. package/vendor/translators-official/Superlib.js +0 -647
  603. package/vendor/translators-official/Svenska Dagbladet.js +0 -274
  604. package/vendor/translators-official/Sveriges radio.js +0 -416
  605. package/vendor/translators-official/TEI.js +0 -648
  606. package/vendor/translators-official/TV by the Numbers.js +0 -194
  607. package/vendor/translators-official/TVNZ.js +0 -165
  608. package/vendor/translators-official/Tagesspiegel.js +0 -249
  609. package/vendor/translators-official/Talis Aspire.js +0 -316
  610. package/vendor/translators-official/TalisPrism.js +0 -445
  611. package/vendor/translators-official/Tatknigafund.js +0 -174
  612. package/vendor/translators-official/Tatpressa.ru.js +0 -121
  613. package/vendor/translators-official/Taylor & Francis eBooks.js +0 -334
  614. package/vendor/translators-official/Taylor and Francis+NEJM.js +0 -813
  615. package/vendor/translators-official/Tesis Doctorals en Xarxa.js +0 -233
  616. package/vendor/translators-official/The Art Newspaper.js +0 -268
  617. package/vendor/translators-official/The Atlantic.js +0 -535
  618. package/vendor/translators-official/The Boston Globe.js +0 -285
  619. package/vendor/translators-official/The Chronicle of Higher Education.js +0 -308
  620. package/vendor/translators-official/The Daily Beast.js +0 -183
  621. package/vendor/translators-official/The Economic Times - The Times of India.js +0 -305
  622. package/vendor/translators-official/The Economist.js +0 -207
  623. package/vendor/translators-official/The Free Dictionary.js +0 -58
  624. package/vendor/translators-official/The Globe and Mail.js +0 -241
  625. package/vendor/translators-official/The Guardian.js +0 -717
  626. package/vendor/translators-official/The Hamilton Spectator.js +0 -129
  627. package/vendor/translators-official/The Hindu.js +0 -318
  628. package/vendor/translators-official/The Independent.js +0 -184
  629. package/vendor/translators-official/The Intercept.js +0 -258
  630. package/vendor/translators-official/The Met.js +0 -276
  631. package/vendor/translators-official/The Microfinance Gateway.js +0 -174
  632. package/vendor/translators-official/The Nation.js +0 -188
  633. package/vendor/translators-official/The National Archives (UK).js +0 -242
  634. package/vendor/translators-official/The New Republic.js +0 -160
  635. package/vendor/translators-official/The New York Review of Books.js +0 -467
  636. package/vendor/translators-official/The New Yorker.js +0 -360
  637. package/vendor/translators-official/The Open Library.js +0 -220
  638. package/vendor/translators-official/The Straits Times.js +0 -528
  639. package/vendor/translators-official/The Telegraph.js +0 -337
  640. package/vendor/translators-official/The Times and Sunday Times.js +0 -180
  641. package/vendor/translators-official/The Times of Israel.js +0 -151
  642. package/vendor/translators-official/TheMarker.js +0 -108
  643. package/vendor/translators-official/Theory of Computing.js +0 -488
  644. package/vendor/translators-official/ThesesFR.js +0 -405
  645. package/vendor/translators-official/Thieme.js +0 -326
  646. package/vendor/translators-official/Time.com.js +0 -557
  647. package/vendor/translators-official/TimesMachine.js +0 -222
  648. package/vendor/translators-official/Tony Blair Institute for Global Change.js +0 -195
  649. package/vendor/translators-official/Toronto Star.js +0 -298
  650. package/vendor/translators-official/Transportation Research Board.js +0 -253
  651. package/vendor/translators-official/Treesearch.js +0 -535
  652. package/vendor/translators-official/Trove.js +0 -616
  653. package/vendor/translators-official/Tumblr.js +0 -179
  654. package/vendor/translators-official/Twitter.js +0 -413
  655. package/vendor/translators-official/UChicago VuFind.js +0 -907
  656. package/vendor/translators-official/UNZ Print Archive.js +0 -276
  657. package/vendor/translators-official/UPCommons.js +0 -227
  658. package/vendor/translators-official/US National Archives Research Catalog.js +0 -275
  659. package/vendor/translators-official/USENIX.js +0 -151
  660. package/vendor/translators-official/Ubiquity Journals.js +0 -228
  661. package/vendor/translators-official/University Press Scholarship.js +0 -301
  662. package/vendor/translators-official/University of California Press Books.js +0 -403
  663. package/vendor/translators-official/University of Chicago Press Books.js +0 -378
  664. package/vendor/translators-official/University of Wisconsin-Madison Libraries Catalog.js +0 -298
  665. package/vendor/translators-official/Unqualified Dublin Core RDF.js +0 -153
  666. package/vendor/translators-official/UpToDate References.js +0 -203
  667. package/vendor/translators-official/Vanity Fair.js +0 -242
  668. package/vendor/translators-official/Verniana-Jules Verne Studies.js +0 -190
  669. package/vendor/translators-official/Verso Books.js +0 -311
  670. package/vendor/translators-official/Vice.js +0 -445
  671. package/vendor/translators-official/Victoria & Albert Museum.js +0 -277
  672. package/vendor/translators-official/Vimeo.js +0 -188
  673. package/vendor/translators-official/VoxEU.js +0 -151
  674. package/vendor/translators-official/WHO.js +0 -458
  675. package/vendor/translators-official/WIPO.js +0 -189
  676. package/vendor/translators-official/Wall Street Journal.js +0 -809
  677. package/vendor/translators-official/Wanfang Data.js +0 -310
  678. package/vendor/translators-official/Washington Monthly.js +0 -195
  679. package/vendor/translators-official/Washington Post.js +0 -447
  680. package/vendor/translators-official/Web of Science Nextgen.js +0 -832
  681. package/vendor/translators-official/Web of Science Tagged.js +0 -1247
  682. package/vendor/translators-official/Web of Science.js +0 -228
  683. package/vendor/translators-official/Welt Online.js +0 -161
  684. package/vendor/translators-official/WestLaw UK.js +0 -190
  685. package/vendor/translators-official/WikiLeaks PlusD.js +0 -182
  686. package/vendor/translators-official/Wikidata QuickStatements.js +0 -324
  687. package/vendor/translators-official/Wikidata.js +0 -911
  688. package/vendor/translators-official/Wikimedia Commons.js +0 -285
  689. package/vendor/translators-official/Wikipedia Citation Templates.js +0 -432
  690. package/vendor/translators-official/Wikipedia.js +0 -385
  691. package/vendor/translators-official/Wikisource.js +0 -399
  692. package/vendor/translators-official/Wikiwand.js +0 -122
  693. package/vendor/translators-official/Wiktionary.js +0 -141
  694. package/vendor/translators-official/Wildlife Biology in Practice.js +0 -172
  695. package/vendor/translators-official/Wiley Online Library.js +0 -1412
  696. package/vendor/translators-official/Wilson Center Digital Archive.js +0 -321
  697. package/vendor/translators-official/Winnipeg Free Press.js +0 -204
  698. package/vendor/translators-official/Wired.js +0 -362
  699. package/vendor/translators-official/Womennews.js +0 -230
  700. package/vendor/translators-official/World Digital Library.js +0 -403
  701. package/vendor/translators-official/World History Connected.js +0 -185
  702. package/vendor/translators-official/World Shakespeare Bibliography Online.js +0 -595
  703. package/vendor/translators-official/WorldCat Discovery Service.js +0 -630
  704. package/vendor/translators-official/XML ContextObject.js +0 -274
  705. package/vendor/translators-official/YPSF.js +0 -224
  706. package/vendor/translators-official/Yandex Books.js +0 -265
  707. package/vendor/translators-official/Ynet.js +0 -171
  708. package/vendor/translators-official/YouTube.js +0 -209
  709. package/vendor/translators-official/ZIPonline.js +0 -267
  710. package/vendor/translators-official/ZOBODAT.js +0 -341
  711. package/vendor/translators-official/Zotero RDF.js +0 -588
  712. package/vendor/translators-official/ZoteroBib.js +0 -94
  713. package/vendor/translators-official/arXiv.org.js +0 -1100
  714. package/vendor/translators-official/artnet.js +0 -207
  715. package/vendor/translators-official/beck-online.js +0 -1339
  716. package/vendor/translators-official/clinicaltrials.gov.js +0 -331
  717. package/vendor/translators-official/dLibra.js +0 -367
  718. package/vendor/translators-official/dejure.org.js +0 -242
  719. package/vendor/translators-official/dhistory.js +0 -103
  720. package/vendor/translators-official/digibib.net.js +0 -245
  721. package/vendor/translators-official/eLibrary.ru.js +0 -867
  722. package/vendor/translators-official/eLife.js +0 -462
  723. package/vendor/translators-official/eMJA.js +0 -246
  724. package/vendor/translators-official/eMedicine.js +0 -123
  725. package/vendor/translators-official/ePrint IACR.js +0 -608
  726. package/vendor/translators-official/ebrary.js +0 -140
  727. package/vendor/translators-official/etatar.ru.js +0 -104
  728. package/vendor/translators-official/feb-web.ru.js +0 -167
  729. package/vendor/translators-official/fishpond.co.nz.js +0 -224
  730. package/vendor/translators-official/fr-online.de.js +0 -209
  731. package/vendor/translators-official/govinfo.js +0 -189
  732. package/vendor/translators-official/informIT database.js +0 -248
  733. package/vendor/translators-official/io-port.js +0 -68
  734. package/vendor/translators-official/jurion.js +0 -377
  735. package/vendor/translators-official/mEDRA.js +0 -597
  736. package/vendor/translators-official/magazines.russ.ru.js +0 -120
  737. package/vendor/translators-official/medes.js +0 -284
  738. package/vendor/translators-official/newshub.co.nz.js +0 -206
  739. package/vendor/translators-official/newspapers.com.js +0 -335
  740. package/vendor/translators-official/openJur.js +0 -161
  741. package/vendor/translators-official/reddit.js +0 -275
  742. package/vendor/translators-official/sbn.it.js +0 -186
  743. package/vendor/translators-official/scinapse.js +0 -273
  744. package/vendor/translators-official/semantics Visual Library.js +0 -643
  745. package/vendor/translators-official/taz.de.js +0 -200
  746. package/vendor/translators-official/unAPI.js +0 -481
  747. package/vendor/translators-official/wiso.js +0 -314
  748. package/vendor/translators-official/zbMATH.js +0 -278
  749. package/vendor/translators-official/zotero.org.js +0 -311
  750. package/vendor/translators_CN/Angle.js +0 -468
  751. package/vendor/translators_CN/Baidu Baike.js +0 -152
  752. package/vendor/translators_CN/Baidu Scholar.js +0 -639
  753. package/vendor/translators_CN/Belt and Road Database.js +0 -496
  754. package/vendor/translators_CN/BiliBili.js +0 -776
  755. package/vendor/translators_CN/CCPINFO.js +0 -416
  756. package/vendor/translators_CN/CHINESE JOURNAL OF LAW.js +0 -169
  757. package/vendor/translators_CN/CNBKSY.js +0 -385
  758. package/vendor/translators_CN/CNKI CHKD.js +0 -692
  759. package/vendor/translators_CN/CNKI Gongjushu.js +0 -271
  760. package/vendor/translators_CN/CNKI Industry.js +0 -726
  761. package/vendor/translators_CN/CNKI Law.js +0 -842
  762. package/vendor/translators_CN/CNKI RefWorks.js +0 -826
  763. package/vendor/translators_CN/CNKI Refer.js +0 -811
  764. package/vendor/translators_CN/CNKI Scholar.js +0 -656
  765. package/vendor/translators_CN/CNKI TIKS.js +0 -1028
  766. package/vendor/translators_CN/CNKI e-Books.js +0 -309
  767. package/vendor/translators_CN/CNKI thinker.js +0 -274
  768. package/vendor/translators_CN/CNKI.js +0 -2381
  769. package/vendor/translators_CN/CNSDA.js +0 -382
  770. package/vendor/translators_CN/CQVIP Knowledge.js +0 -969
  771. package/vendor/translators_CN/CQVIP Qikan.js +0 -418
  772. package/vendor/translators_CN/CQVIP.js +0 -686
  773. package/vendor/translators_CN/CSDN.js +0 -153
  774. package/vendor/translators_CN/China Judgements Online.js +0 -282
  775. package/vendor/translators_CN/China Social Science Library.js +0 -533
  776. package/vendor/translators_CN/ChinaXiv.js +0 -375
  777. package/vendor/translators_CN/Cubox.js +0 -246
  778. package/vendor/translators_CN/Dangdang.js +0 -176
  779. package/vendor/translators_CN/Douban.js +0 -984
  780. package/vendor/translators_CN/Duxiu.js +0 -746
  781. package/vendor/translators_CN/E-Tiller.js +0 -555
  782. package/vendor/translators_CN/Encyclopedia of China 3rd.js +0 -177
  783. package/vendor/translators_CN/Founder.js +0 -483
  784. package/vendor/translators_CN/GFSOSO.js +0 -694
  785. package/vendor/translators_CN/Jd.js +0 -235
  786. package/vendor/translators_CN/Jikan Full Text Database.js +0 -188
  787. package/vendor/translators_CN/KouShare.js +0 -139
  788. package/vendor/translators_CN/LICENSE +0 -661
  789. package/vendor/translators_CN/Lawbank.js +0 -818
  790. package/vendor/translators_CN/MagTech.js +0 -473
  791. package/vendor/translators_CN/Modern History.js +0 -788
  792. package/vendor/translators_CN/NDLTD.js +0 -404
  793. package/vendor/translators_CN/NTU Digital Library of Buddhist Studies.js +0 -957
  794. package/vendor/translators_CN/National Public Service Platform for Standards Information - China.js +0 -348
  795. package/vendor/translators_CN/National Science and Technology Library - China.js +0 -646
  796. package/vendor/translators_CN/National Science and Technology Report Service - China.js +0 -271
  797. package/vendor/translators_CN/National Standards Open System - China.js +0 -296
  798. package/vendor/translators_CN/Ncpssd.js +0 -555
  799. package/vendor/translators_CN/PKULaw.js +0 -1123
  800. package/vendor/translators_CN/PatentStar.js +0 -386
  801. package/vendor/translators_CN/People's Daily Database.js +0 -186
  802. package/vendor/translators_CN/People's Daily Epaper.js +0 -279
  803. package/vendor/translators_CN/People's Daily Online.js +0 -292
  804. package/vendor/translators_CN/Pishu Database.js +0 -383
  805. package/vendor/translators_CN/ProQuestCN Thesis.js +0 -329
  806. package/vendor/translators_CN/Pss-System.js +0 -199
  807. package/vendor/translators_CN/PubScholar.js +0 -588
  808. package/vendor/translators_CN/Publications Data Center - China.js +0 -1119
  809. package/vendor/translators_CN/QStheory.js +0 -251
  810. package/vendor/translators_CN/RDFYBK.js +0 -396
  811. package/vendor/translators_CN/README.md +0 -42
  812. package/vendor/translators_CN/RHHZ.js +0 -383
  813. package/vendor/translators_CN/Rural Studies Database.js +0 -402
  814. package/vendor/translators_CN/SKCTK.js +0 -177
  815. package/vendor/translators_CN/Samson.js +0 -768
  816. package/vendor/translators_CN/SciEngine.js +0 -450
  817. package/vendor/translators_CN/Science Reading.js +0 -338
  818. package/vendor/translators_CN/Sina Weibo.js +0 -254
  819. package/vendor/translators_CN/Soopat.js +0 -427
  820. package/vendor/translators_CN/Spc.org.cn.js +0 -275
  821. package/vendor/translators_CN/Standard Full-text Database - NLC.js +0 -230
  822. package/vendor/translators_CN/SuperLib.js +0 -757
  823. package/vendor/translators_CN/TOAJ.js +0 -422
  824. package/vendor/translators_CN/Wanfang Data.js +0 -3433
  825. package/vendor/translators_CN/Wanfang Med.js +0 -671
  826. package/vendor/translators_CN/Web of Science Tagged.js +0 -1341
  827. package/vendor/translators_CN/Weixin.js +0 -130
  828. package/vendor/translators_CN/Wenjin.js +0 -492
  829. package/vendor/translators_CN/Xinhuanet.js +0 -283
  830. package/vendor/translators_CN/Yiigle.js +0 -394
  831. package/vendor/translators_CN/Zhihu.js +0 -530
  832. package/vendor/translators_CN/Zhihuiya.js +0 -246
  833. package/vendor/translators_CN/Zhizhen.js +0 -869
  834. package/vendor/translators_CN/chaoxingqikan.js +0 -360
  835. package/vendor/translators_CN/doc.taixueshu.js +0 -355
  836. package/vendor/translators_CN/dpaper.js +0 -183
  837. package/vendor/translators_CN/epaper.gmw.cn.js +0 -286
  838. package/vendor/translators_CN/flk.npc.gov.cn.js +0 -344
  839. package/vendor/translators_CN/gov.cn Policy.js +0 -559
  840. package/vendor/translators_CN/incoPat.js +0 -195
  841. package/vendor/translators_CN/pm.tsgyun.js +0 -177
  842. package/vendor/translators_CN/sanmin.com.tw.js +0 -327
  843. package/vendor/translators_CN/sharing.com.tw.js +0 -333
  844. package/vendor/translators_CN/stats.gov.cn.js +0 -170
  845. package/vendor/translators_CN/xiaoyuzhoufm.js +0 -162
  846. package/vendor/translators_CN/zhangqiaokeyan.js +0 -1130
  847. package/vendor/zotero/README.md +0 -120
  848. package/vendor/zotero/config/custom-environment-variables.json +0 -3
  849. package/vendor/zotero/config/default.json5 +0 -16
  850. package/vendor/zotero/config/production.json5 +0 -7
  851. package/vendor/zotero/config/test.json5 +0 -4
  852. package/vendor/zotero/modules/translate/README.md +0 -43
  853. package/vendor/zotero/modules/translate/src/debug.js +0 -186
  854. package/vendor/zotero/modules/translate/src/http.js +0 -158
  855. package/vendor/zotero/modules/translate/src/promise.js +0 -73
  856. package/vendor/zotero/modules/translate/src/proxy.js +0 -354
  857. package/vendor/zotero/modules/translate/src/rdf/identity.js +0 -503
  858. package/vendor/zotero/modules/translate/src/rdf/init.js +0 -56
  859. package/vendor/zotero/modules/translate/src/rdf/n3parser.js +0 -1392
  860. package/vendor/zotero/modules/translate/src/rdf/rdfparser.js +0 -578
  861. package/vendor/zotero/modules/translate/src/rdf/serialize.js +0 -886
  862. package/vendor/zotero/modules/translate/src/rdf/term.js +0 -524
  863. package/vendor/zotero/modules/translate/src/rdf/uri.js +0 -147
  864. package/vendor/zotero/modules/translate/src/repo.js +0 -80
  865. package/vendor/zotero/modules/translate/src/tlds.js +0 -274
  866. package/vendor/zotero/modules/translate/src/translation/sandboxManager.js +0 -112
  867. package/vendor/zotero/modules/translate/src/translation/translate.js +0 -3283
  868. package/vendor/zotero/modules/translate/src/translation/translate_item.js +0 -120
  869. package/vendor/zotero/modules/translate/src/translator.js +0 -186
  870. package/vendor/zotero/modules/translate/src/translators.js +0 -174
  871. package/vendor/zotero/modules/translate/src/utilities_translate.js +0 -487
  872. package/vendor/zotero/modules/translate/src/zotero.js +0 -94
  873. package/vendor/zotero/modules/translators/A Contra Corriente.js +0 -206
  874. package/vendor/zotero/modules/translators/ABC News Australia.js +0 -224
  875. package/vendor/zotero/modules/translators/ACLS Humanities EBook.js +0 -165
  876. package/vendor/zotero/modules/translators/ACLWeb.js +0 -600
  877. package/vendor/zotero/modules/translators/ACM Digital Library.js +0 -710
  878. package/vendor/zotero/modules/translators/ACS Publications.js +0 -633
  879. package/vendor/zotero/modules/translators/ADS Bibcode.js +0 -664
  880. package/vendor/zotero/modules/translators/AEA Web.js +0 -450
  881. package/vendor/zotero/modules/translators/AGRIS.js +0 -311
  882. package/vendor/zotero/modules/translators/AIP.js +0 -295
  883. package/vendor/zotero/modules/translators/AMS Journals.js +0 -136
  884. package/vendor/zotero/modules/translators/AMS MathSciNet (Legacy).js +0 -313
  885. package/vendor/zotero/modules/translators/AMS MathSciNet.js +0 -288
  886. package/vendor/zotero/modules/translators/APA PsycNET.js +0 -915
  887. package/vendor/zotero/modules/translators/APN.ru.js +0 -132
  888. package/vendor/zotero/modules/translators/APS-Physics.js +0 -204
  889. package/vendor/zotero/modules/translators/APS.js +0 -542
  890. package/vendor/zotero/modules/translators/ARTFL Encyclopedie.js +0 -283
  891. package/vendor/zotero/modules/translators/ARTnews.js +0 -155
  892. package/vendor/zotero/modules/translators/ARTstor.js +0 -619
  893. package/vendor/zotero/modules/translators/ASCE.js +0 -199
  894. package/vendor/zotero/modules/translators/ASCO Meeting Library.js +0 -153
  895. package/vendor/zotero/modules/translators/ASTIS.js +0 -337
  896. package/vendor/zotero/modules/translators/ATS International Journal.js +0 -290
  897. package/vendor/zotero/modules/translators/Access Engineering.js +0 -384
  898. package/vendor/zotero/modules/translators/Access Medicine.js +0 -343
  899. package/vendor/zotero/modules/translators/Access Science.js +0 -391
  900. package/vendor/zotero/modules/translators/Adam Matthew Digital.js +0 -405
  901. package/vendor/zotero/modules/translators/Agencia del ISBN.js +0 -77
  902. package/vendor/zotero/modules/translators/Ahval News.js +0 -309
  903. package/vendor/zotero/modules/translators/Air University Journals.js +0 -236
  904. package/vendor/zotero/modules/translators/Airiti.js +0 -423
  905. package/vendor/zotero/modules/translators/Alexander Street Press.js +0 -198
  906. package/vendor/zotero/modules/translators/AllAfrica.js +0 -291
  907. package/vendor/zotero/modules/translators/Alsharekh.js +0 -242
  908. package/vendor/zotero/modules/translators/AlterNet.js +0 -134
  909. package/vendor/zotero/modules/translators/Aluka.js +0 -261
  910. package/vendor/zotero/modules/translators/Amazon.js +0 -1043
  911. package/vendor/zotero/modules/translators/American Archive of Public Broadcasting.js +0 -592
  912. package/vendor/zotero/modules/translators/American Institute of Aeronautics and Astronautics.js +0 -210
  913. package/vendor/zotero/modules/translators/American Prospect.js +0 -114
  914. package/vendor/zotero/modules/translators/Ancestry.com US Federal Census.js +0 -164
  915. package/vendor/zotero/modules/translators/Annual Reviews.js +0 -329
  916. package/vendor/zotero/modules/translators/Antikvarium.hu.js +0 -280
  917. package/vendor/zotero/modules/translators/AquaDocs.js +0 -390
  918. package/vendor/zotero/modules/translators/Archeion.js +0 -249
  919. package/vendor/zotero/modules/translators/Archiv fuer Sozialgeschichte.js +0 -157
  920. package/vendor/zotero/modules/translators/Archive Ouverte en Sciences de l'Information et de la Communication (AOSIC).js +0 -179
  921. package/vendor/zotero/modules/translators/Archives Canada.js +0 -142
  922. package/vendor/zotero/modules/translators/Ariana News.js +0 -203
  923. package/vendor/zotero/modules/translators/Art Institute of Chicago.js +0 -279
  924. package/vendor/zotero/modules/translators/Artefacts Canada.js +0 -192
  925. package/vendor/zotero/modules/translators/Artforum.js +0 -438
  926. package/vendor/zotero/modules/translators/Atlanta Journal Constitution.js +0 -155
  927. package/vendor/zotero/modules/translators/Atlanta Journal-Constitution.js +0 -311
  928. package/vendor/zotero/modules/translators/Atypon Journals.js +0 -1204
  929. package/vendor/zotero/modules/translators/AustLII and NZLII.js +0 -604
  930. package/vendor/zotero/modules/translators/Australian Dictionary of Biography.js +0 -196
  931. package/vendor/zotero/modules/translators/BAILII.js +0 -176
  932. package/vendor/zotero/modules/translators/BBC Genome.js +0 -254
  933. package/vendor/zotero/modules/translators/BBC.js +0 -430
  934. package/vendor/zotero/modules/translators/BIBSYS.js +0 -112
  935. package/vendor/zotero/modules/translators/BOCC.js +0 -217
  936. package/vendor/zotero/modules/translators/BOE.js +0 -229
  937. package/vendor/zotero/modules/translators/BOFiP-Impots.js +0 -132
  938. package/vendor/zotero/modules/translators/Baidu Scholar.js +0 -276
  939. package/vendor/zotero/modules/translators/Bangkok Post.js +0 -216
  940. package/vendor/zotero/modules/translators/Baruch Foundation.js +0 -175
  941. package/vendor/zotero/modules/translators/Beobachter.js +0 -175
  942. package/vendor/zotero/modules/translators/Bezneng Gajit.js +0 -92
  943. package/vendor/zotero/modules/translators/BibLaTeX.js +0 -888
  944. package/vendor/zotero/modules/translators/BibTeX.js +0 -4236
  945. package/vendor/zotero/modules/translators/Biblio.com.js +0 -216
  946. package/vendor/zotero/modules/translators/Bibliontology RDF.js +0 -1166
  947. package/vendor/zotero/modules/translators/Biblioteca Nacional de Maestros.js +0 -213
  948. package/vendor/zotero/modules/translators/Bibliotheque et Archives Nationale du Quebec (Pistard).js +0 -147
  949. package/vendor/zotero/modules/translators/Bibliotheque et Archives Nationales du Quebec.js +0 -266
  950. package/vendor/zotero/modules/translators/Bibliotheque nationale de France.js +0 -872
  951. package/vendor/zotero/modules/translators/BioMed Central.js +0 -585
  952. package/vendor/zotero/modules/translators/BioOne.js +0 -233
  953. package/vendor/zotero/modules/translators/Bioconductor.js +0 -343
  954. package/vendor/zotero/modules/translators/Blaetter.js +0 -192
  955. package/vendor/zotero/modules/translators/Blogger.js +0 -244
  956. package/vendor/zotero/modules/translators/Bloomberg.js +0 -205
  957. package/vendor/zotero/modules/translators/Bloomsbury Food Library.js +0 -296
  958. package/vendor/zotero/modules/translators/Bluesky.js +0 -195
  959. package/vendor/zotero/modules/translators/BnF ISBN.js +0 -129
  960. package/vendor/zotero/modules/translators/Bookmarks.js +0 -282
  961. package/vendor/zotero/modules/translators/Bookshop.org.js +0 -223
  962. package/vendor/zotero/modules/translators/Boston Review.js +0 -332
  963. package/vendor/zotero/modules/translators/Bosworth Toller's Anglo-Saxon Dictionary Online.js +0 -496
  964. package/vendor/zotero/modules/translators/Bracero History Archive.js +0 -200
  965. package/vendor/zotero/modules/translators/Brill Journals.js +0 -168
  966. package/vendor/zotero/modules/translators/Brill.js +0 -434
  967. package/vendor/zotero/modules/translators/Brukerhandboken.js +0 -153
  968. package/vendor/zotero/modules/translators/Bryn Mawr Classical Review.js +0 -303
  969. package/vendor/zotero/modules/translators/Bundesgesetzblatt.js +0 -231
  970. package/vendor/zotero/modules/translators/Business Standard.js +0 -151
  971. package/vendor/zotero/modules/translators/CABI - CAB Abstracts.js +0 -317
  972. package/vendor/zotero/modules/translators/CAOD.js +0 -260
  973. package/vendor/zotero/modules/translators/CBC.js +0 -439
  974. package/vendor/zotero/modules/translators/CCfr (BnF).js +0 -162
  975. package/vendor/zotero/modules/translators/CERN Document Server.js +0 -277
  976. package/vendor/zotero/modules/translators/CEUR Workshop Proceedings.js +0 -145
  977. package/vendor/zotero/modules/translators/CFF References.js +0 -170
  978. package/vendor/zotero/modules/translators/CFF.js +0 -113
  979. package/vendor/zotero/modules/translators/CIA World Factbook.js +0 -128
  980. package/vendor/zotero/modules/translators/CLACSO.js +0 -226
  981. package/vendor/zotero/modules/translators/CLASE.js +0 -135
  982. package/vendor/zotero/modules/translators/CNKI.js +0 -731
  983. package/vendor/zotero/modules/translators/COBISS.js +0 -1945
  984. package/vendor/zotero/modules/translators/COinS.js +0 -336
  985. package/vendor/zotero/modules/translators/CQ Press.js +0 -418
  986. package/vendor/zotero/modules/translators/CROSBI.js +0 -227
  987. package/vendor/zotero/modules/translators/CSIRO Publishing.js +0 -139
  988. package/vendor/zotero/modules/translators/CSL JSON.js +0 -203
  989. package/vendor/zotero/modules/translators/CSV.js +0 -294
  990. package/vendor/zotero/modules/translators/Cairn.info.js +0 -368
  991. package/vendor/zotero/modules/translators/CalMatters.js +0 -228
  992. package/vendor/zotero/modules/translators/Calisphere.js +0 -355
  993. package/vendor/zotero/modules/translators/Camara Brasileira do Livro ISBN.js +0 -842
  994. package/vendor/zotero/modules/translators/Cambridge Core.js +0 -580
  995. package/vendor/zotero/modules/translators/Cambridge Engage Preprints.js +0 -276
  996. package/vendor/zotero/modules/translators/CanLII.js +0 -284
  997. package/vendor/zotero/modules/translators/Canada.com.js +0 -171
  998. package/vendor/zotero/modules/translators/Canadian Letters and Images.js +0 -148
  999. package/vendor/zotero/modules/translators/Canadiana.ca.js +0 -196
  1000. package/vendor/zotero/modules/translators/Cascadilla Proceedings Project.js +0 -390
  1001. package/vendor/zotero/modules/translators/Cell Press.js +0 -516
  1002. package/vendor/zotero/modules/translators/Central and Eastern European Online Library Journals.js +0 -313
  1003. package/vendor/zotero/modules/translators/Champlain Society - Collection.js +0 -220
  1004. package/vendor/zotero/modules/translators/Chicago Journal of Theoretical Computer Science.js +0 -203
  1005. package/vendor/zotero/modules/translators/Christian Science Monitor.js +0 -148
  1006. package/vendor/zotero/modules/translators/Chronicling America.js +0 -131
  1007. package/vendor/zotero/modules/translators/CiNii Research.js +0 -168
  1008. package/vendor/zotero/modules/translators/Citavi 5 XML.js +0 -516
  1009. package/vendor/zotero/modules/translators/CiteSeer.js +0 -196
  1010. package/vendor/zotero/modules/translators/CiteULike.js +0 -170
  1011. package/vendor/zotero/modules/translators/Citizen Lab.js +0 -347
  1012. package/vendor/zotero/modules/translators/Civilization.ca.js +0 -146
  1013. package/vendor/zotero/modules/translators/Climate Change and Human Health Literature Portal.js +0 -283
  1014. package/vendor/zotero/modules/translators/Clinical Key.js +0 -367
  1015. package/vendor/zotero/modules/translators/Code4Lib Journal.js +0 -143
  1016. package/vendor/zotero/modules/translators/Colorado State Legislature.js +0 -215
  1017. package/vendor/zotero/modules/translators/Columbia University Press.js +0 -238
  1018. package/vendor/zotero/modules/translators/Common-Place.js +0 -218
  1019. package/vendor/zotero/modules/translators/Computer History Museum Archive.js +0 -1319
  1020. package/vendor/zotero/modules/translators/Copernicus.js +0 -461
  1021. package/vendor/zotero/modules/translators/Cornell LII.js +0 -252
  1022. package/vendor/zotero/modules/translators/Cornell University Press.js +0 -235
  1023. package/vendor/zotero/modules/translators/CourtListener.js +0 -265
  1024. package/vendor/zotero/modules/translators/CrossRef.js +0 -486
  1025. package/vendor/zotero/modules/translators/Crossref REST.js +0 -1757
  1026. package/vendor/zotero/modules/translators/Crossref Unixref XML.js +0 -965
  1027. package/vendor/zotero/modules/translators/Current Affairs.js +0 -160
  1028. package/vendor/zotero/modules/translators/Cyberpresse.js +0 -131
  1029. package/vendor/zotero/modules/translators/DABI.js +0 -476
  1030. package/vendor/zotero/modules/translators/DAI-Zenon.js +0 -392
  1031. package/vendor/zotero/modules/translators/DART-Europe.js +0 -176
  1032. package/vendor/zotero/modules/translators/DBLP Computer Science Bibliography.js +0 -462
  1033. package/vendor/zotero/modules/translators/DBpia.js +0 -233
  1034. package/vendor/zotero/modules/translators/DEPATISnet.js +0 -373
  1035. package/vendor/zotero/modules/translators/DOAJ.js +0 -243
  1036. package/vendor/zotero/modules/translators/DOI Content Negotiation.js +0 -352
  1037. package/vendor/zotero/modules/translators/DOI.js +0 -322
  1038. package/vendor/zotero/modules/translators/DPLA.js +0 -425
  1039. package/vendor/zotero/modules/translators/DSpace Intermediate Metadata.js +0 -208
  1040. package/vendor/zotero/modules/translators/DTU Orbit.js +0 -155
  1041. package/vendor/zotero/modules/translators/Dagens Nyheter.js +0 -369
  1042. package/vendor/zotero/modules/translators/Dagstuhl Research Online Publication Server.js +0 -276
  1043. package/vendor/zotero/modules/translators/Dar Almandumah.js +0 -253
  1044. package/vendor/zotero/modules/translators/Data.gov.js +0 -225
  1045. package/vendor/zotero/modules/translators/DataCite.js +0 -125
  1046. package/vendor/zotero/modules/translators/Databrary.js +0 -184
  1047. package/vendor/zotero/modules/translators/Datacite JSON.js +0 -1182
  1048. package/vendor/zotero/modules/translators/Dataverse.js +0 -418
  1049. package/vendor/zotero/modules/translators/Daum News.js +0 -139
  1050. package/vendor/zotero/modules/translators/De Gruyter Brill.js +0 -674
  1051. package/vendor/zotero/modules/translators/DeGruyter.js +0 -457
  1052. package/vendor/zotero/modules/translators/Defense Technical Information Center.js +0 -146
  1053. package/vendor/zotero/modules/translators/Delpher.js +0 -413
  1054. package/vendor/zotero/modules/translators/Demographic Research.js +0 -164
  1055. package/vendor/zotero/modules/translators/Denik CZ.js +0 -273
  1056. package/vendor/zotero/modules/translators/Der Freitag.js +0 -236
  1057. package/vendor/zotero/modules/translators/Der Spiegel.js +0 -479
  1058. package/vendor/zotero/modules/translators/Desiring God.js +0 -216
  1059. package/vendor/zotero/modules/translators/Deutsche Fotothek.js +0 -364
  1060. package/vendor/zotero/modules/translators/Deutsche Nationalbibliothek.js +0 -594
  1061. package/vendor/zotero/modules/translators/Dialnet.js +0 -258
  1062. package/vendor/zotero/modules/translators/Die Zeit.js +0 -378
  1063. package/vendor/zotero/modules/translators/DigiZeitschriften.js +0 -269
  1064. package/vendor/zotero/modules/translators/Digital Humanities Quarterly.js +0 -207
  1065. package/vendor/zotero/modules/translators/Digital Medievalist.js +0 -149
  1066. package/vendor/zotero/modules/translators/Digital Spy.js +0 -215
  1067. package/vendor/zotero/modules/translators/Dimensions.js +0 -233
  1068. package/vendor/zotero/modules/translators/Douban.js +0 -316
  1069. package/vendor/zotero/modules/translators/Dreier Neuerscheinungsdienst.js +0 -209
  1070. package/vendor/zotero/modules/translators/DrugBank.ca.js +0 -209
  1071. package/vendor/zotero/modules/translators/Dryad Digital Repository.js +0 -323
  1072. package/vendor/zotero/modules/translators/Duke University Press Books.js +0 -250
  1073. package/vendor/zotero/modules/translators/E-periodica Switzerland.js +0 -347
  1074. package/vendor/zotero/modules/translators/EBSCO Discovery Layer.js +0 -147
  1075. package/vendor/zotero/modules/translators/EBSCOhost.js +0 -592
  1076. package/vendor/zotero/modules/translators/EIDR.js +0 -184
  1077. package/vendor/zotero/modules/translators/EPA National Library Catalog.js +0 -245
  1078. package/vendor/zotero/modules/translators/ERIC.js +0 -986
  1079. package/vendor/zotero/modules/translators/ESpacenet.js +0 -465
  1080. package/vendor/zotero/modules/translators/EUR-Lex.js +0 -423
  1081. package/vendor/zotero/modules/translators/Eastview.js +0 -336
  1082. package/vendor/zotero/modules/translators/Edinburgh University Press Journals.js +0 -178
  1083. package/vendor/zotero/modules/translators/Education Week.js +0 -197
  1084. package/vendor/zotero/modules/translators/El Comercio (Peru).js +0 -347
  1085. package/vendor/zotero/modules/translators/El Pais.js +0 -262
  1086. package/vendor/zotero/modules/translators/Electronic Colloquium on Computational Complexity.js +0 -230
  1087. package/vendor/zotero/modules/translators/Elicit.js +0 -120
  1088. package/vendor/zotero/modules/translators/Elsevier Health Journals.js +0 -531
  1089. package/vendor/zotero/modules/translators/Elsevier Pure.js +0 -420
  1090. package/vendor/zotero/modules/translators/Embedded Metadata.js +0 -1951
  1091. package/vendor/zotero/modules/translators/Emerald Insight.js +0 -626
  1092. package/vendor/zotero/modules/translators/Encyclopedia of Chicago.js +0 -162
  1093. package/vendor/zotero/modules/translators/Encyclopedia of Korean Culture.js +0 -221
  1094. package/vendor/zotero/modules/translators/Endnote XML.js +0 -1407
  1095. package/vendor/zotero/modules/translators/Engineering Village.js +0 -139
  1096. package/vendor/zotero/modules/translators/Envidat.js +0 -331
  1097. package/vendor/zotero/modules/translators/Epicurious.js +0 -144
  1098. package/vendor/zotero/modules/translators/Erudit.js +0 -272
  1099. package/vendor/zotero/modules/translators/Euclid.js +0 -220
  1100. package/vendor/zotero/modules/translators/EurasiaNet.js +0 -109
  1101. package/vendor/zotero/modules/translators/Eurogamer.js +0 -112
  1102. package/vendor/zotero/modules/translators/EurogamerUSgamer.js +0 -380
  1103. package/vendor/zotero/modules/translators/Europe PMC.js +0 -448
  1104. package/vendor/zotero/modules/translators/Evernote.js +0 -104
  1105. package/vendor/zotero/modules/translators/F1000 Research.js +0 -655
  1106. package/vendor/zotero/modules/translators/FAO Publications.js +0 -1139
  1107. package/vendor/zotero/modules/translators/FAZ.NET.js +0 -231
  1108. package/vendor/zotero/modules/translators/Fachportal Padagogik.js +0 -839
  1109. package/vendor/zotero/modules/translators/Factiva.js +0 -302
  1110. package/vendor/zotero/modules/translators/Failed Architecture.js +0 -114
  1111. package/vendor/zotero/modules/translators/Fairfax Australia.js +0 -200
  1112. package/vendor/zotero/modules/translators/Fatcat.js +0 -425
  1113. package/vendor/zotero/modules/translators/Figshare.js +0 -191
  1114. package/vendor/zotero/modules/translators/Financial Times.js +0 -187
  1115. package/vendor/zotero/modules/translators/Finna.js +0 -357
  1116. package/vendor/zotero/modules/translators/Flickr.js +0 -318
  1117. package/vendor/zotero/modules/translators/Foreign Affairs.js +0 -485
  1118. package/vendor/zotero/modules/translators/Foreign Policy.js +0 -146
  1119. package/vendor/zotero/modules/translators/FreeCite.js +0 -95
  1120. package/vendor/zotero/modules/translators/FreePatentsOnline.js +0 -265
  1121. package/vendor/zotero/modules/translators/Frieze.js +0 -243
  1122. package/vendor/zotero/modules/translators/Frontiers.js +0 -667
  1123. package/vendor/zotero/modules/translators/GMS German Medical Science.js +0 -319
  1124. package/vendor/zotero/modules/translators/GPO Access e-CFR.js +0 -134
  1125. package/vendor/zotero/modules/translators/Gale Databases.js +0 -324
  1126. package/vendor/zotero/modules/translators/GaleGDC.js +0 -189
  1127. package/vendor/zotero/modules/translators/Galegroup.js +0 -327
  1128. package/vendor/zotero/modules/translators/Gallica.js +0 -194
  1129. package/vendor/zotero/modules/translators/Game Studies.js +0 -155
  1130. package/vendor/zotero/modules/translators/GameSpot.js +0 -199
  1131. package/vendor/zotero/modules/translators/GameStar GamePro.js +0 -198
  1132. package/vendor/zotero/modules/translators/Gasyrlar Awazy.js +0 -156
  1133. package/vendor/zotero/modules/translators/Gemeinsamer Bibliotheksverbund ISBN.js +0 -23
  1134. package/vendor/zotero/modules/translators/Gene Ontology.js +0 -128
  1135. package/vendor/zotero/modules/translators/Github.js +0 -268
  1136. package/vendor/zotero/modules/translators/Globes.js +0 -243
  1137. package/vendor/zotero/modules/translators/Gmail.js +0 -64
  1138. package/vendor/zotero/modules/translators/Goodreads.js +0 -219
  1139. package/vendor/zotero/modules/translators/Google Books.js +0 -552
  1140. package/vendor/zotero/modules/translators/Google Patents.js +0 -959
  1141. package/vendor/zotero/modules/translators/Google Play.js +0 -186
  1142. package/vendor/zotero/modules/translators/Google Presentation.js +0 -104
  1143. package/vendor/zotero/modules/translators/Google Research.js +0 -221
  1144. package/vendor/zotero/modules/translators/Google Scholar.js +0 -1361
  1145. package/vendor/zotero/modules/translators/Gulag Many Days, Many Lives.js +0 -179
  1146. package/vendor/zotero/modules/translators/HAL Archives Ouvertes.js +0 -429
  1147. package/vendor/zotero/modules/translators/HCSP.js +0 -312
  1148. package/vendor/zotero/modules/translators/HUDOC.js +0 -650
  1149. package/vendor/zotero/modules/translators/Haaretz.js +0 -562
  1150. package/vendor/zotero/modules/translators/Habr.js +0 -232
  1151. package/vendor/zotero/modules/translators/Handelszeitung.js +0 -273
  1152. package/vendor/zotero/modules/translators/Hanrei Watch.js +0 -123
  1153. package/vendor/zotero/modules/translators/Harper's Magazine.js +0 -365
  1154. package/vendor/zotero/modules/translators/Harpers.js +0 -209
  1155. package/vendor/zotero/modules/translators/Harvard Business Review.js +0 -326
  1156. package/vendor/zotero/modules/translators/Harvard Caselaw Access Project.js +0 -244
  1157. package/vendor/zotero/modules/translators/Harvard University Press Books.js +0 -286
  1158. package/vendor/zotero/modules/translators/Hathi Trust.js +0 -164
  1159. package/vendor/zotero/modules/translators/HathiTrust.js +0 -311
  1160. package/vendor/zotero/modules/translators/HeinOnline.js +0 -266
  1161. package/vendor/zotero/modules/translators/Heise.js +0 -200
  1162. package/vendor/zotero/modules/translators/Herder.js +0 -236
  1163. package/vendor/zotero/modules/translators/HighBeam.js +0 -198
  1164. package/vendor/zotero/modules/translators/HighWire 2.0.js +0 -1355
  1165. package/vendor/zotero/modules/translators/HighWire.js +0 -209
  1166. package/vendor/zotero/modules/translators/Hindawi Publishers.js +0 -177
  1167. package/vendor/zotero/modules/translators/Hispanic-American Periodical Index.js +0 -236
  1168. package/vendor/zotero/modules/translators/Homeland Security Digital Library.js +0 -426
  1169. package/vendor/zotero/modules/translators/Hoovers.js +0 -89
  1170. package/vendor/zotero/modules/translators/Huff Post.js +0 -223
  1171. package/vendor/zotero/modules/translators/Human Rights Watch.js +0 -450
  1172. package/vendor/zotero/modules/translators/IBISWorld.js +0 -171
  1173. package/vendor/zotero/modules/translators/IDEA ALM.js +0 -536
  1174. package/vendor/zotero/modules/translators/IEEE Computer Society.js +0 -429
  1175. package/vendor/zotero/modules/translators/IEEE Xplore.js +0 -1000
  1176. package/vendor/zotero/modules/translators/IETF.js +0 -451
  1177. package/vendor/zotero/modules/translators/IGN.js +0 -136
  1178. package/vendor/zotero/modules/translators/IMDb.js +0 -566
  1179. package/vendor/zotero/modules/translators/INSPIRE.js +0 -247
  1180. package/vendor/zotero/modules/translators/IPCC.js +0 -757
  1181. package/vendor/zotero/modules/translators/ISTC.js +0 -181
  1182. package/vendor/zotero/modules/translators/Idref.js +0 -179
  1183. package/vendor/zotero/modules/translators/In These Times.js +0 -196
  1184. package/vendor/zotero/modules/translators/InfoTrac.js +0 -279
  1185. package/vendor/zotero/modules/translators/Informationssystem Medienpaedagogik.js +0 -305
  1186. package/vendor/zotero/modules/translators/IngentaConnect.js +0 -312
  1187. package/vendor/zotero/modules/translators/Inside Higher Ed.js +0 -167
  1188. package/vendor/zotero/modules/translators/Insignia OPAC.js +0 -114
  1189. package/vendor/zotero/modules/translators/Institute of Contemporary Art.js +0 -180
  1190. package/vendor/zotero/modules/translators/Institute of Physics.js +0 -340
  1191. package/vendor/zotero/modules/translators/Integrum.js +0 -173
  1192. package/vendor/zotero/modules/translators/Intellixir.js +0 -264
  1193. package/vendor/zotero/modules/translators/Inter-Research Science Center.js +0 -185
  1194. package/vendor/zotero/modules/translators/International Nuclear Information System.js +0 -285
  1195. package/vendor/zotero/modules/translators/Internet Archive Scholar.js +0 -106
  1196. package/vendor/zotero/modules/translators/Internet Archive Wayback Machine.js +0 -152
  1197. package/vendor/zotero/modules/translators/Internet Archive.js +0 -552
  1198. package/vendor/zotero/modules/translators/InvenioRDM.js +0 -1260
  1199. package/vendor/zotero/modules/translators/Isidore.js +0 -235
  1200. package/vendor/zotero/modules/translators/J-Stage.js +0 -272
  1201. package/vendor/zotero/modules/translators/JETS.js +0 -122
  1202. package/vendor/zotero/modules/translators/JISC Historical Texts.js +0 -273
  1203. package/vendor/zotero/modules/translators/JRC Publications Repository.js +0 -569
  1204. package/vendor/zotero/modules/translators/JSTOR.js +0 -821
  1205. package/vendor/zotero/modules/translators/Jahrbuch.js +0 -213
  1206. package/vendor/zotero/modules/translators/Japan Times Online.js +0 -138
  1207. package/vendor/zotero/modules/translators/Journal of Electronic Publishing.js +0 -147
  1208. package/vendor/zotero/modules/translators/Journal of Extension.js +0 -288
  1209. package/vendor/zotero/modules/translators/Journal of Machine Learning Research.js +0 -441
  1210. package/vendor/zotero/modules/translators/Journal of Religion and Society.js +0 -174
  1211. package/vendor/zotero/modules/translators/JurPC.js +0 -274
  1212. package/vendor/zotero/modules/translators/Juricaf.js +0 -141
  1213. package/vendor/zotero/modules/translators/Juris.js +0 -728
  1214. package/vendor/zotero/modules/translators/K10plus ISBN.js +0 -386
  1215. package/vendor/zotero/modules/translators/KStudy.js +0 -632
  1216. package/vendor/zotero/modules/translators/Kanopy.js +0 -358
  1217. package/vendor/zotero/modules/translators/Khaama Press.js +0 -249
  1218. package/vendor/zotero/modules/translators/KitapYurdu.com.js +0 -376
  1219. package/vendor/zotero/modules/translators/Kommersant.js +0 -174
  1220. package/vendor/zotero/modules/translators/Korean National Library.js +0 -621
  1221. package/vendor/zotero/modules/translators/L'Annee Philologique.js +0 -267
  1222. package/vendor/zotero/modules/translators/LA Times.js +0 -239
  1223. package/vendor/zotero/modules/translators/LIBRIS ISBN.js +0 -103
  1224. package/vendor/zotero/modules/translators/LIVIVO.js +0 -260
  1225. package/vendor/zotero/modules/translators/LWN.net.js +0 -350
  1226. package/vendor/zotero/modules/translators/La Croix.js +0 -237
  1227. package/vendor/zotero/modules/translators/La Nacion (Argentina).js +0 -231
  1228. package/vendor/zotero/modules/translators/La Presse.js +0 -218
  1229. package/vendor/zotero/modules/translators/La Republica (Peru).js +0 -174
  1230. package/vendor/zotero/modules/translators/Lagen.nu.js +0 -214
  1231. package/vendor/zotero/modules/translators/Landesbibliographie Baden-Wurttemberg.js +0 -324
  1232. package/vendor/zotero/modules/translators/Lapham's Quarterly.js +0 -1062
  1233. package/vendor/zotero/modules/translators/Le Devoir.js +0 -167
  1234. package/vendor/zotero/modules/translators/Le Figaro.js +0 -225
  1235. package/vendor/zotero/modules/translators/Le Maitron.js +0 -484
  1236. package/vendor/zotero/modules/translators/Le Monde.js +0 -258
  1237. package/vendor/zotero/modules/translators/Le monde diplomatique.js +0 -200
  1238. package/vendor/zotero/modules/translators/Legifrance.js +0 -641
  1239. package/vendor/zotero/modules/translators/Legislative Insight.js +0 -406
  1240. package/vendor/zotero/modules/translators/Lexis+.js +0 -264
  1241. package/vendor/zotero/modules/translators/LexisNexis.js +0 -505
  1242. package/vendor/zotero/modules/translators/Libraries Tasmania.js +0 -778
  1243. package/vendor/zotero/modules/translators/Library Catalog (Aleph).js +0 -385
  1244. package/vendor/zotero/modules/translators/Library Catalog (Amicus).js +0 -254
  1245. package/vendor/zotero/modules/translators/Library Catalog (Aquabrowser).js +0 -253
  1246. package/vendor/zotero/modules/translators/Library Catalog (BiblioCommons).js +0 -249
  1247. package/vendor/zotero/modules/translators/Library Catalog (Blacklight).js +0 -341
  1248. package/vendor/zotero/modules/translators/Library Catalog (Capita Prism).js +0 -162
  1249. package/vendor/zotero/modules/translators/Library Catalog (DRA).js +0 -203
  1250. package/vendor/zotero/modules/translators/Library Catalog (Dynix).js +0 -315
  1251. package/vendor/zotero/modules/translators/Library Catalog (EBSCO Locate).js +0 -349
  1252. package/vendor/zotero/modules/translators/Library Catalog (Encore).js +0 -211
  1253. package/vendor/zotero/modules/translators/Library Catalog (GEAC).js +0 -104
  1254. package/vendor/zotero/modules/translators/Library Catalog (InnoPAC).js +0 -305
  1255. package/vendor/zotero/modules/translators/Library Catalog (Koha).js +0 -225
  1256. package/vendor/zotero/modules/translators/Library Catalog (Mango).js +0 -285
  1257. package/vendor/zotero/modules/translators/Library Catalog (OPALS).js +0 -200
  1258. package/vendor/zotero/modules/translators/Library Catalog (PICA).js +0 -2120
  1259. package/vendor/zotero/modules/translators/Library Catalog (PICA2).js +0 -331
  1260. package/vendor/zotero/modules/translators/Library Catalog (Pika).js +0 -488
  1261. package/vendor/zotero/modules/translators/Library Catalog (Polaris).js +0 -183
  1262. package/vendor/zotero/modules/translators/Library Catalog (Quolto).js +0 -320
  1263. package/vendor/zotero/modules/translators/Library Catalog (RERO ILS).js +0 -754
  1264. package/vendor/zotero/modules/translators/Library Catalog (SIRSI eLibrary).js +0 -407
  1265. package/vendor/zotero/modules/translators/Library Catalog (SIRSI).js +0 -452
  1266. package/vendor/zotero/modules/translators/Library Catalog (SLIMS).js +0 -146
  1267. package/vendor/zotero/modules/translators/Library Catalog (TIND ILS).js +0 -773
  1268. package/vendor/zotero/modules/translators/Library Catalog (TLCYouSeeMore).js +0 -132
  1269. package/vendor/zotero/modules/translators/Library Catalog (TinREAD).js +0 -277
  1270. package/vendor/zotero/modules/translators/Library Catalog (VTLS).js +0 -125
  1271. package/vendor/zotero/modules/translators/Library Catalog (Visual Library 2021).js +0 -765
  1272. package/vendor/zotero/modules/translators/Library Catalog (Voyager 7).js +0 -199
  1273. package/vendor/zotero/modules/translators/Library Catalog (Voyager).js +0 -212
  1274. package/vendor/zotero/modules/translators/Library Genesis.js +0 -337
  1275. package/vendor/zotero/modules/translators/Library Hub Discover.js +0 -359
  1276. package/vendor/zotero/modules/translators/Library of Congress Digital Collections.js +0 -869
  1277. package/vendor/zotero/modules/translators/Library of Congress ISBN.js +0 -86
  1278. package/vendor/zotero/modules/translators/LingBuzz.js +0 -359
  1279. package/vendor/zotero/modules/translators/Lippincott Williams and Wilkins.js +0 -341
  1280. package/vendor/zotero/modules/translators/Literary Hub.js +0 -950
  1281. package/vendor/zotero/modules/translators/Litres.js +0 -236
  1282. package/vendor/zotero/modules/translators/LiveJournal.js +0 -219
  1283. package/vendor/zotero/modules/translators/London Review of Books.js +0 -291
  1284. package/vendor/zotero/modules/translators/LookUs.js +0 -260
  1285. package/vendor/zotero/modules/translators/Lulu.js +0 -264
  1286. package/vendor/zotero/modules/translators/MAB2.js +0 -373
  1287. package/vendor/zotero/modules/translators/MARC.js +0 -1080
  1288. package/vendor/zotero/modules/translators/MARCXML.js +0 -489
  1289. package/vendor/zotero/modules/translators/MCV.js +0 -258
  1290. package/vendor/zotero/modules/translators/MDPI Journals.js +0 -356
  1291. package/vendor/zotero/modules/translators/MEDLINEnbib.js +0 -1561
  1292. package/vendor/zotero/modules/translators/METS.js +0 -384
  1293. package/vendor/zotero/modules/translators/MIDAS Journals.js +0 -343
  1294. package/vendor/zotero/modules/translators/MIT Press Books.js +0 -637
  1295. package/vendor/zotero/modules/translators/MIT Press Journals.js +0 -176
  1296. package/vendor/zotero/modules/translators/MODS.js +0 -2545
  1297. package/vendor/zotero/modules/translators/MPG PuRe.js +0 -541
  1298. package/vendor/zotero/modules/translators/Mailman.js +0 -136
  1299. package/vendor/zotero/modules/translators/Mainichi Daily News.js +0 -189
  1300. package/vendor/zotero/modules/translators/Mastodon.js +0 -198
  1301. package/vendor/zotero/modules/translators/Matbugat.ru.js +0 -110
  1302. package/vendor/zotero/modules/translators/Max Planck Institute for the History of Science Virtual Laboratory Library.js +0 -136
  1303. package/vendor/zotero/modules/translators/Medium.js +0 -208
  1304. package/vendor/zotero/modules/translators/MetaLib.js +0 -126
  1305. package/vendor/zotero/modules/translators/Microbiology Society Journals.js +0 -343
  1306. package/vendor/zotero/modules/translators/Microsoft Academic.js +0 -424
  1307. package/vendor/zotero/modules/translators/Mikromarc.js +0 -207
  1308. package/vendor/zotero/modules/translators/Milli Kutuphane.js +0 -244
  1309. package/vendor/zotero/modules/translators/Musee du Louvre.js +0 -265
  1310. package/vendor/zotero/modules/translators/NASA ADS.js +0 -889
  1311. package/vendor/zotero/modules/translators/NASA NTRS.js +0 -610
  1312. package/vendor/zotero/modules/translators/NCBI Nucleotide.js +0 -227
  1313. package/vendor/zotero/modules/translators/NPR.js +0 -341
  1314. package/vendor/zotero/modules/translators/NRC Research Press.js +0 -181
  1315. package/vendor/zotero/modules/translators/NRC.nl.js +0 -226
  1316. package/vendor/zotero/modules/translators/NTSB Accident Reports.js +0 -226
  1317. package/vendor/zotero/modules/translators/NYPL Menus.js +0 -275
  1318. package/vendor/zotero/modules/translators/NYPL Research Catalog.js +0 -458
  1319. package/vendor/zotero/modules/translators/NYTimes.com.js +0 -858
  1320. package/vendor/zotero/modules/translators/NZZ.ch.js +0 -272
  1321. package/vendor/zotero/modules/translators/Nagoya University OPAC.js +0 -336
  1322. package/vendor/zotero/modules/translators/National Academies Press.js +0 -243
  1323. package/vendor/zotero/modules/translators/National Agriculture Library.js +0 -524
  1324. package/vendor/zotero/modules/translators/National Archive of the UK.js +0 -237
  1325. package/vendor/zotero/modules/translators/National Archives of Australia.js +0 -522
  1326. package/vendor/zotero/modules/translators/National Archives of South Africa.js +0 -122
  1327. package/vendor/zotero/modules/translators/National Archives of the United States.js +0 -278
  1328. package/vendor/zotero/modules/translators/National Bureau of Economic Research.js +0 -363
  1329. package/vendor/zotero/modules/translators/National Diet Library Catalogue.js +0 -333
  1330. package/vendor/zotero/modules/translators/National Gallery of Art - USA.js +0 -149
  1331. package/vendor/zotero/modules/translators/National Gallery of Australia.js +0 -252
  1332. package/vendor/zotero/modules/translators/National Library of Australia (new catalog).js +0 -223
  1333. package/vendor/zotero/modules/translators/National Library of Belarus.js +0 -171
  1334. package/vendor/zotero/modules/translators/National Library of Norway.js +0 -310
  1335. package/vendor/zotero/modules/translators/National Library of Poland ISBN.js +0 -140
  1336. package/vendor/zotero/modules/translators/National Post.js +0 -186
  1337. package/vendor/zotero/modules/translators/National Technical Reports Library.js +0 -276
  1338. package/vendor/zotero/modules/translators/National Transportation Library ROSA P.js +0 -562
  1339. package/vendor/zotero/modules/translators/Nature Publishing Group.js +0 -3394
  1340. package/vendor/zotero/modules/translators/Neural Information Processing Systems.js +0 -385
  1341. package/vendor/zotero/modules/translators/New Left Review.js +0 -245
  1342. package/vendor/zotero/modules/translators/New Zealand Herald.js +0 -282
  1343. package/vendor/zotero/modules/translators/Newlines Magazine.js +0 -190
  1344. package/vendor/zotero/modules/translators/News Corp Australia.js +0 -251
  1345. package/vendor/zotero/modules/translators/NewsBank.js +0 -202
  1346. package/vendor/zotero/modules/translators/NewsnetTamedia.js +0 -509
  1347. package/vendor/zotero/modules/translators/Noor Digital Library.js +0 -267
  1348. package/vendor/zotero/modules/translators/Note HTML.js +0 -206
  1349. package/vendor/zotero/modules/translators/Note Markdown.js +0 -1638
  1350. package/vendor/zotero/modules/translators/Notre Dame Philosophical Reviews.js +0 -201
  1351. package/vendor/zotero/modules/translators/Nuclear Receptor Signaling.js +0 -241
  1352. package/vendor/zotero/modules/translators/OAPEN.js +0 -331
  1353. package/vendor/zotero/modules/translators/OECD.js +0 -216
  1354. package/vendor/zotero/modules/translators/ORCID.js +0 -104
  1355. package/vendor/zotero/modules/translators/OSF Preprints.js +0 -417
  1356. package/vendor/zotero/modules/translators/OSTI Energy Citations.js +0 -202
  1357. package/vendor/zotero/modules/translators/OVID Tagged.js +0 -1226
  1358. package/vendor/zotero/modules/translators/OZON.ru.js +0 -465
  1359. package/vendor/zotero/modules/translators/OhioLINK.js +0 -43
  1360. package/vendor/zotero/modules/translators/Old Bailey Online.js +0 -315
  1361. package/vendor/zotero/modules/translators/Open Conf.js +0 -172
  1362. package/vendor/zotero/modules/translators/Open Journal Systems.js +0 -729
  1363. package/vendor/zotero/modules/translators/Open Knowledge Repository.js +0 -811
  1364. package/vendor/zotero/modules/translators/OpenAlex JSON.js +0 -740
  1365. package/vendor/zotero/modules/translators/OpenAlex.js +0 -444
  1366. package/vendor/zotero/modules/translators/OpenEdition Books.js +0 -155
  1367. package/vendor/zotero/modules/translators/OpenEdition Journals.js +0 -432
  1368. package/vendor/zotero/modules/translators/Optical Society of America.js +0 -562
  1369. package/vendor/zotero/modules/translators/Optimization Online.js +0 -418
  1370. package/vendor/zotero/modules/translators/Ovid OCE.js +0 -353
  1371. package/vendor/zotero/modules/translators/Ovid.js +0 -302
  1372. package/vendor/zotero/modules/translators/Oxford Dictionaries Premium.js +0 -194
  1373. package/vendor/zotero/modules/translators/Oxford English Dictionary.js +0 -122
  1374. package/vendor/zotero/modules/translators/Oxford Music and Art Online.js +0 -120
  1375. package/vendor/zotero/modules/translators/Oxford Reference.js +0 -202
  1376. package/vendor/zotero/modules/translators/Oxford University Press.js +0 -277
  1377. package/vendor/zotero/modules/translators/PC Gamer.js +0 -302
  1378. package/vendor/zotero/modules/translators/PC Games.js +0 -128
  1379. package/vendor/zotero/modules/translators/PEI Archival Information Network.js +0 -242
  1380. package/vendor/zotero/modules/translators/PEP Web.js +0 -165
  1381. package/vendor/zotero/modules/translators/PKP Catalog Systems.js +0 -1455
  1382. package/vendor/zotero/modules/translators/PLoS Journals.js +0 -284
  1383. package/vendor/zotero/modules/translators/PRC History Review.js +0 -298
  1384. package/vendor/zotero/modules/translators/Pajhwok Afghan News.js +0 -198
  1385. package/vendor/zotero/modules/translators/Papers Past.js +0 -297
  1386. package/vendor/zotero/modules/translators/Paris Review.js +0 -227
  1387. package/vendor/zotero/modules/translators/Pastebin.js +0 -199
  1388. package/vendor/zotero/modules/translators/Patents - USPTO.js +0 -210
  1389. package/vendor/zotero/modules/translators/Peeters.js +0 -587
  1390. package/vendor/zotero/modules/translators/Perceiving Systems.js +0 -350
  1391. package/vendor/zotero/modules/translators/Perlego.js +0 -416
  1392. package/vendor/zotero/modules/translators/PhilPapers.js +0 -233
  1393. package/vendor/zotero/modules/translators/Philosopher's Imprint.js +0 -169
  1394. package/vendor/zotero/modules/translators/Pleade.js +0 -329
  1395. package/vendor/zotero/modules/translators/Polygon.js +0 -270
  1396. package/vendor/zotero/modules/translators/Potsdamer Neueste Nachrichten.js +0 -188
  1397. package/vendor/zotero/modules/translators/Premium Times.js +0 -144
  1398. package/vendor/zotero/modules/translators/Preprints.org.js +0 -305
  1399. package/vendor/zotero/modules/translators/Prime 9ja Online.js +0 -289
  1400. package/vendor/zotero/modules/translators/Primo 2018.js +0 -126
  1401. package/vendor/zotero/modules/translators/Primo Normalized XML.js +0 -987
  1402. package/vendor/zotero/modules/translators/Primo.js +0 -322
  1403. package/vendor/zotero/modules/translators/ProMED.js +0 -66
  1404. package/vendor/zotero/modules/translators/ProQuest Ebook Central.js +0 -226
  1405. package/vendor/zotero/modules/translators/ProQuest PolicyFile.js +0 -115
  1406. package/vendor/zotero/modules/translators/ProQuest.js +0 -2210
  1407. package/vendor/zotero/modules/translators/Probing the Past.js +0 -151
  1408. package/vendor/zotero/modules/translators/Project Gutenberg.js +0 -191
  1409. package/vendor/zotero/modules/translators/Project MUSE.js +0 -451
  1410. package/vendor/zotero/modules/translators/Protein Data Bank.js +0 -445
  1411. package/vendor/zotero/modules/translators/PubFactory Journals.js +0 -712
  1412. package/vendor/zotero/modules/translators/PubMed Central.js +0 -577
  1413. package/vendor/zotero/modules/translators/PubMed XML.js +0 -1139
  1414. package/vendor/zotero/modules/translators/PubMed.js +0 -1317
  1415. package/vendor/zotero/modules/translators/PubPub.js +0 -530
  1416. package/vendor/zotero/modules/translators/Pubget.js +0 -164
  1417. package/vendor/zotero/modules/translators/Public Record Office Victoria.js +0 -252
  1418. package/vendor/zotero/modules/translators/Publications Office of the European Union.js +0 -540
  1419. package/vendor/zotero/modules/translators/Publications du Quebec.js +0 -225
  1420. package/vendor/zotero/modules/translators/PyPI.js +0 -288
  1421. package/vendor/zotero/modules/translators/Qatar Digital Library.js +0 -802
  1422. package/vendor/zotero/modules/translators/Queensland State Archives.js +0 -303
  1423. package/vendor/zotero/modules/translators/R-Packages.js +0 -410
  1424. package/vendor/zotero/modules/translators/RAND.js +0 -283
  1425. package/vendor/zotero/modules/translators/RDF.js +0 -1780
  1426. package/vendor/zotero/modules/translators/REDALYC.js +0 -196
  1427. package/vendor/zotero/modules/translators/RIS.js +0 -7265
  1428. package/vendor/zotero/modules/translators/RSC Publishing.js +0 -250
  1429. package/vendor/zotero/modules/translators/Radio Free Europe Radio Liberty.js +0 -706
  1430. package/vendor/zotero/modules/translators/RePEc - Econpapers.js +0 -725
  1431. package/vendor/zotero/modules/translators/RePEc - IDEAS.js +0 -337
  1432. package/vendor/zotero/modules/translators/Rechtspraak.nl.js +0 -295
  1433. package/vendor/zotero/modules/translators/RefWorks Tagged.js +0 -1185
  1434. package/vendor/zotero/modules/translators/ReferBibIX.js +0 -463
  1435. package/vendor/zotero/modules/translators/Regeringskansliet.js +0 -89
  1436. package/vendor/zotero/modules/translators/Research Square.js +0 -335
  1437. package/vendor/zotero/modules/translators/ResearchGate.js +0 -394
  1438. package/vendor/zotero/modules/translators/Retsinformation.js +0 -348
  1439. package/vendor/zotero/modules/translators/Reuters.js +0 -255
  1440. package/vendor/zotero/modules/translators/Revues.org.js +0 -378
  1441. package/vendor/zotero/modules/translators/Rock, Paper, Shotgun.js +0 -304
  1442. package/vendor/zotero/modules/translators/Roll Call.js +0 -173
  1443. package/vendor/zotero/modules/translators/Russian State Library.js +0 -1517
  1444. package/vendor/zotero/modules/translators/SAE Papers.js +0 -241
  1445. package/vendor/zotero/modules/translators/SAGE Journals.js +0 -427
  1446. package/vendor/zotero/modules/translators/SAGE Knowledge.js +0 -505
  1447. package/vendor/zotero/modules/translators/SAILDART.js +0 -364
  1448. package/vendor/zotero/modules/translators/SALT Research Archives.js +0 -196
  1449. package/vendor/zotero/modules/translators/SFU IPinCH.js +0 -946
  1450. package/vendor/zotero/modules/translators/SIPRI.js +0 -256
  1451. package/vendor/zotero/modules/translators/SIRS Knowledge Source.js +0 -546
  1452. package/vendor/zotero/modules/translators/SLUB Dresden.js +0 -300
  1453. package/vendor/zotero/modules/translators/SORA.js +0 -340
  1454. package/vendor/zotero/modules/translators/SSOAR.js +0 -399
  1455. package/vendor/zotero/modules/translators/SSRN.js +0 -235
  1456. package/vendor/zotero/modules/translators/SVT Nyheter.js +0 -381
  1457. package/vendor/zotero/modules/translators/Sacramento Bee.js +0 -274
  1458. package/vendor/zotero/modules/translators/Safari Books Online.js +0 -391
  1459. package/vendor/zotero/modules/translators/Scholars Portal Journals.js +0 -220
  1460. package/vendor/zotero/modules/translators/Scholia.js +0 -189
  1461. package/vendor/zotero/modules/translators/Schweizer Radio und Fernsehen SRF.js +0 -152
  1462. package/vendor/zotero/modules/translators/SciELO.js +0 -440
  1463. package/vendor/zotero/modules/translators/ScienceDirect.js +0 -1304
  1464. package/vendor/zotero/modules/translators/Scopus.js +0 -418
  1465. package/vendor/zotero/modules/translators/Semantic Scholar.js +0 -513
  1466. package/vendor/zotero/modules/translators/Silverchair.js +0 -886
  1467. package/vendor/zotero/modules/translators/Slate.js +0 -228
  1468. package/vendor/zotero/modules/translators/SlideShare.js +0 -112
  1469. package/vendor/zotero/modules/translators/Spiegel Online.js +0 -343
  1470. package/vendor/zotero/modules/translators/Springer Link.js +0 -696
  1471. package/vendor/zotero/modules/translators/Stack Exchange.js +0 -134
  1472. package/vendor/zotero/modules/translators/Standard Ebooks.js +0 -198
  1473. package/vendor/zotero/modules/translators/Stanford Encyclopedia of Philosophy.js +0 -285
  1474. package/vendor/zotero/modules/translators/Stanford University Press.js +0 -343
  1475. package/vendor/zotero/modules/translators/State Records Office of Western Australia.js +0 -439
  1476. package/vendor/zotero/modules/translators/Stitcher.js +0 -141
  1477. package/vendor/zotero/modules/translators/Store norske leksikon.js +0 -291
  1478. package/vendor/zotero/modules/translators/Stuff.co.nz.js +0 -446
  1479. package/vendor/zotero/modules/translators/Substack.js +0 -237
  1480. package/vendor/zotero/modules/translators/Sud Ouest.js +0 -181
  1481. package/vendor/zotero/modules/translators/Sueddeutsche.de.js +0 -205
  1482. package/vendor/zotero/modules/translators/Summon 2.js +0 -117
  1483. package/vendor/zotero/modules/translators/Superlib.js +0 -647
  1484. package/vendor/zotero/modules/translators/Svenska Dagbladet.js +0 -274
  1485. package/vendor/zotero/modules/translators/Sveriges radio.js +0 -416
  1486. package/vendor/zotero/modules/translators/TEI.js +0 -648
  1487. package/vendor/zotero/modules/translators/TV by the Numbers.js +0 -194
  1488. package/vendor/zotero/modules/translators/TVNZ.js +0 -165
  1489. package/vendor/zotero/modules/translators/Tagesspiegel.js +0 -249
  1490. package/vendor/zotero/modules/translators/Talis Aspire.js +0 -316
  1491. package/vendor/zotero/modules/translators/TalisPrism.js +0 -445
  1492. package/vendor/zotero/modules/translators/Tatknigafund.js +0 -174
  1493. package/vendor/zotero/modules/translators/Tatpressa.ru.js +0 -121
  1494. package/vendor/zotero/modules/translators/Taylor & Francis eBooks.js +0 -334
  1495. package/vendor/zotero/modules/translators/Taylor and Francis+NEJM.js +0 -813
  1496. package/vendor/zotero/modules/translators/Tesis Doctorals en Xarxa.js +0 -233
  1497. package/vendor/zotero/modules/translators/The Art Newspaper.js +0 -268
  1498. package/vendor/zotero/modules/translators/The Atlantic.js +0 -535
  1499. package/vendor/zotero/modules/translators/The Australian.js +0 -105
  1500. package/vendor/zotero/modules/translators/The Boston Globe.js +0 -285
  1501. package/vendor/zotero/modules/translators/The Chronicle of Higher Education.js +0 -308
  1502. package/vendor/zotero/modules/translators/The Daily Beast.js +0 -183
  1503. package/vendor/zotero/modules/translators/The Economic Times - The Times of India.js +0 -305
  1504. package/vendor/zotero/modules/translators/The Economic Times.js +0 -191
  1505. package/vendor/zotero/modules/translators/The Economist.js +0 -207
  1506. package/vendor/zotero/modules/translators/The Free Dictionary.js +0 -58
  1507. package/vendor/zotero/modules/translators/The Globe and Mail.js +0 -241
  1508. package/vendor/zotero/modules/translators/The Guardian.js +0 -717
  1509. package/vendor/zotero/modules/translators/The Hamilton Spectator.js +0 -129
  1510. package/vendor/zotero/modules/translators/The Hindu (old).js +0 -128
  1511. package/vendor/zotero/modules/translators/The Hindu.js +0 -318
  1512. package/vendor/zotero/modules/translators/The Independent.js +0 -184
  1513. package/vendor/zotero/modules/translators/The Intercept.js +0 -258
  1514. package/vendor/zotero/modules/translators/The Met.js +0 -300
  1515. package/vendor/zotero/modules/translators/The Microfinance Gateway.js +0 -174
  1516. package/vendor/zotero/modules/translators/The Nation.js +0 -188
  1517. package/vendor/zotero/modules/translators/The National Archives (UK).js +0 -242
  1518. package/vendor/zotero/modules/translators/The New Republic.js +0 -160
  1519. package/vendor/zotero/modules/translators/The New York Review of Books.js +0 -467
  1520. package/vendor/zotero/modules/translators/The New Yorker.js +0 -360
  1521. package/vendor/zotero/modules/translators/The Open Library.js +0 -220
  1522. package/vendor/zotero/modules/translators/The Straits Times.js +0 -528
  1523. package/vendor/zotero/modules/translators/The Telegraph.js +0 -337
  1524. package/vendor/zotero/modules/translators/The Times and Sunday Times.js +0 -180
  1525. package/vendor/zotero/modules/translators/The Times of Israel.js +0 -151
  1526. package/vendor/zotero/modules/translators/TheMarker.js +0 -108
  1527. package/vendor/zotero/modules/translators/Theory of Computing.js +0 -488
  1528. package/vendor/zotero/modules/translators/ThesesFR.js +0 -350
  1529. package/vendor/zotero/modules/translators/Thieme.js +0 -326
  1530. package/vendor/zotero/modules/translators/Time.com.js +0 -557
  1531. package/vendor/zotero/modules/translators/TimesMachine.js +0 -222
  1532. package/vendor/zotero/modules/translators/Tony Blair Institute for Global Change.js +0 -195
  1533. package/vendor/zotero/modules/translators/Toronto Star.js +0 -331
  1534. package/vendor/zotero/modules/translators/Transportation Research Board.js +0 -253
  1535. package/vendor/zotero/modules/translators/Treesearch.js +0 -535
  1536. package/vendor/zotero/modules/translators/Trove.js +0 -616
  1537. package/vendor/zotero/modules/translators/Tumblr.js +0 -179
  1538. package/vendor/zotero/modules/translators/Twitter.js +0 -413
  1539. package/vendor/zotero/modules/translators/UChicago VuFind.js +0 -907
  1540. package/vendor/zotero/modules/translators/UNZ Print Archive.js +0 -276
  1541. package/vendor/zotero/modules/translators/UPCommons.js +0 -227
  1542. package/vendor/zotero/modules/translators/US National Archives Research Catalog.js +0 -275
  1543. package/vendor/zotero/modules/translators/USENIX.js +0 -151
  1544. package/vendor/zotero/modules/translators/USgamer.js +0 -120
  1545. package/vendor/zotero/modules/translators/Ubiquity Journals.js +0 -228
  1546. package/vendor/zotero/modules/translators/University Press Scholarship.js +0 -301
  1547. package/vendor/zotero/modules/translators/University of California Press Books.js +0 -403
  1548. package/vendor/zotero/modules/translators/University of Chicago Press Books.js +0 -378
  1549. package/vendor/zotero/modules/translators/University of Wisconsin-Madison Libraries Catalog.js +0 -298
  1550. package/vendor/zotero/modules/translators/Unqualified Dublin Core RDF.js +0 -153
  1551. package/vendor/zotero/modules/translators/UpToDate References.js +0 -203
  1552. package/vendor/zotero/modules/translators/Vanity Fair.js +0 -242
  1553. package/vendor/zotero/modules/translators/Verniana-Jules Verne Studies.js +0 -190
  1554. package/vendor/zotero/modules/translators/Verso Books.js +0 -311
  1555. package/vendor/zotero/modules/translators/Vice.js +0 -445
  1556. package/vendor/zotero/modules/translators/Victoria & Albert Museum.js +0 -277
  1557. package/vendor/zotero/modules/translators/Vimeo.js +0 -188
  1558. package/vendor/zotero/modules/translators/VoxEU.js +0 -151
  1559. package/vendor/zotero/modules/translators/WHO.js +0 -458
  1560. package/vendor/zotero/modules/translators/WIPO.js +0 -189
  1561. package/vendor/zotero/modules/translators/Wall Street Journal.js +0 -525
  1562. package/vendor/zotero/modules/translators/Wanfang Data.js +0 -310
  1563. package/vendor/zotero/modules/translators/Washington Monthly.js +0 -195
  1564. package/vendor/zotero/modules/translators/Washington Post.js +0 -447
  1565. package/vendor/zotero/modules/translators/Web of Science Nextgen.js +0 -832
  1566. package/vendor/zotero/modules/translators/Web of Science Tagged.js +0 -1247
  1567. package/vendor/zotero/modules/translators/Web of Science.js +0 -228
  1568. package/vendor/zotero/modules/translators/Welt Online.js +0 -161
  1569. package/vendor/zotero/modules/translators/WestLaw UK.js +0 -190
  1570. package/vendor/zotero/modules/translators/WikiLeaks PlusD.js +0 -182
  1571. package/vendor/zotero/modules/translators/Wikidata QuickStatements.js +0 -324
  1572. package/vendor/zotero/modules/translators/Wikidata.js +0 -911
  1573. package/vendor/zotero/modules/translators/Wikimedia Commons.js +0 -285
  1574. package/vendor/zotero/modules/translators/Wikipedia Citation Templates.js +0 -432
  1575. package/vendor/zotero/modules/translators/Wikipedia.js +0 -385
  1576. package/vendor/zotero/modules/translators/Wikisource.js +0 -399
  1577. package/vendor/zotero/modules/translators/Wikiwand.js +0 -122
  1578. package/vendor/zotero/modules/translators/Wiktionary.js +0 -141
  1579. package/vendor/zotero/modules/translators/Wildlife Biology in Practice.js +0 -172
  1580. package/vendor/zotero/modules/translators/Wiley Online Library.js +0 -1412
  1581. package/vendor/zotero/modules/translators/Wilson Center Digital Archive.js +0 -321
  1582. package/vendor/zotero/modules/translators/Winnipeg Free Press.js +0 -204
  1583. package/vendor/zotero/modules/translators/Wired.js +0 -249
  1584. package/vendor/zotero/modules/translators/Womennews.js +0 -230
  1585. package/vendor/zotero/modules/translators/World Digital Library.js +0 -403
  1586. package/vendor/zotero/modules/translators/World History Connected.js +0 -185
  1587. package/vendor/zotero/modules/translators/World Shakespeare Bibliography Online.js +0 -595
  1588. package/vendor/zotero/modules/translators/XML ContextObject.js +0 -274
  1589. package/vendor/zotero/modules/translators/YPSF.js +0 -224
  1590. package/vendor/zotero/modules/translators/Yandex Books.js +0 -265
  1591. package/vendor/zotero/modules/translators/Ynet.js +0 -171
  1592. package/vendor/zotero/modules/translators/YouTube.js +0 -209
  1593. package/vendor/zotero/modules/translators/ZIPonline.js +0 -267
  1594. package/vendor/zotero/modules/translators/ZOBODAT.js +0 -341
  1595. package/vendor/zotero/modules/translators/Zotero RDF.js +0 -583
  1596. package/vendor/zotero/modules/translators/ZoteroBib.js +0 -94
  1597. package/vendor/zotero/modules/translators/arXiv.org.js +0 -1099
  1598. package/vendor/zotero/modules/translators/artnet.js +0 -207
  1599. package/vendor/zotero/modules/translators/beck-online.js +0 -1339
  1600. package/vendor/zotero/modules/translators/clinicaltrials.gov.js +0 -331
  1601. package/vendor/zotero/modules/translators/dLibra.js +0 -367
  1602. package/vendor/zotero/modules/translators/dejure.org.js +0 -242
  1603. package/vendor/zotero/modules/translators/dhistory.js +0 -103
  1604. package/vendor/zotero/modules/translators/digibib.net.js +0 -245
  1605. package/vendor/zotero/modules/translators/eLibrary.ru.js +0 -867
  1606. package/vendor/zotero/modules/translators/eLife.js +0 -462
  1607. package/vendor/zotero/modules/translators/eMJA.js +0 -246
  1608. package/vendor/zotero/modules/translators/eMedicine.js +0 -123
  1609. package/vendor/zotero/modules/translators/ePrint IACR.js +0 -608
  1610. package/vendor/zotero/modules/translators/ebrary.js +0 -140
  1611. package/vendor/zotero/modules/translators/etatar.ru.js +0 -104
  1612. package/vendor/zotero/modules/translators/feb-web.ru.js +0 -167
  1613. package/vendor/zotero/modules/translators/fishpond.co.nz.js +0 -224
  1614. package/vendor/zotero/modules/translators/fr-online.de.js +0 -209
  1615. package/vendor/zotero/modules/translators/govinfo.js +0 -189
  1616. package/vendor/zotero/modules/translators/informIT database.js +0 -248
  1617. package/vendor/zotero/modules/translators/io-port.js +0 -68
  1618. package/vendor/zotero/modules/translators/jmlr.js +0 -299
  1619. package/vendor/zotero/modules/translators/jurion.js +0 -377
  1620. package/vendor/zotero/modules/translators/mEDRA.js +0 -597
  1621. package/vendor/zotero/modules/translators/magazines.russ.ru.js +0 -120
  1622. package/vendor/zotero/modules/translators/medes.js +0 -284
  1623. package/vendor/zotero/modules/translators/newshub.co.nz.js +0 -206
  1624. package/vendor/zotero/modules/translators/newspapers.com.js +0 -335
  1625. package/vendor/zotero/modules/translators/openJur.js +0 -161
  1626. package/vendor/zotero/modules/translators/reddit.js +0 -275
  1627. package/vendor/zotero/modules/translators/sbn.it.js +0 -186
  1628. package/vendor/zotero/modules/translators/scinapse.js +0 -273
  1629. package/vendor/zotero/modules/translators/semantics Visual Library.js +0 -643
  1630. package/vendor/zotero/modules/translators/taz.de.js +0 -200
  1631. package/vendor/zotero/modules/translators/unAPI.js +0 -481
  1632. package/vendor/zotero/modules/translators/washingtonpost.com.js +0 -257
  1633. package/vendor/zotero/modules/translators/wiso.js +0 -314
  1634. package/vendor/zotero/modules/translators/zbMATH.js +0 -278
  1635. package/vendor/zotero/modules/translators/zotero.org.js +0 -311
  1636. package/vendor/zotero/modules/utilities/README.md +0 -25
  1637. package/vendor/zotero/modules/utilities/cachedTypes.js +0 -193
  1638. package/vendor/zotero/modules/utilities/date.js +0 -958
  1639. package/vendor/zotero/modules/utilities/openurl.js +0 -458
  1640. package/vendor/zotero/modules/utilities/resource/README.md +0 -4
  1641. package/vendor/zotero/modules/utilities/resource/dateFormats.json +0 -1322
  1642. package/vendor/zotero/modules/utilities/resource/schema/global/README.md +0 -15
  1643. package/vendor/zotero/modules/utilities/resource/schema/global/schema.json +0 -12072
  1644. package/vendor/zotero/modules/utilities/resource/zoteroTypeSchemaData.js +0 -5
  1645. package/vendor/zotero/modules/utilities/schema.js +0 -65
  1646. package/vendor/zotero/modules/utilities/utilities.js +0 -1841
  1647. package/vendor/zotero/modules/utilities/utilities_item.js +0 -1082
  1648. package/vendor/zotero/modules/utilities/xregexp-all.js +0 -4652
  1649. package/vendor/zotero/modules/utilities/xregexp-unicode-zotero.js +0 -58
  1650. package/vendor/zotero/modules/zotero-schema/README.md +0 -15
  1651. package/vendor/zotero/modules/zotero-schema/schema.json +0 -12072
  1652. package/vendor/zotero/package-lock.json +0 -4332
  1653. package/vendor/zotero/package.json +0 -44
  1654. package/vendor/zotero/spec.yaml +0 -142
  1655. package/vendor/zotero/src/args.js +0 -43
  1656. package/vendor/zotero/src/cors.js +0 -28
  1657. package/vendor/zotero/src/debug.js +0 -189
  1658. package/vendor/zotero/src/exportEndpoint.js +0 -97
  1659. package/vendor/zotero/src/formats.js +0 -43
  1660. package/vendor/zotero/src/http.js +0 -478
  1661. package/vendor/zotero/src/importEndpoint.js +0 -54
  1662. package/vendor/zotero/src/lambda.js +0 -75
  1663. package/vendor/zotero/src/proxy.js +0 -356
  1664. package/vendor/zotero/src/searchEndpoint.js +0 -97
  1665. package/vendor/zotero/src/server.js +0 -85
  1666. package/vendor/zotero/src/specEndpoint.js +0 -135
  1667. package/vendor/zotero/src/testEndpoint.js +0 -50
  1668. package/vendor/zotero/src/textSearch.js +0 -527
  1669. package/vendor/zotero/src/translation/sandboxManager.js +0 -109
  1670. package/vendor/zotero/src/translation/translate.js +0 -101
  1671. package/vendor/zotero/src/translation/translate_item.js +0 -88
  1672. package/vendor/zotero/src/translators.js +0 -264
  1673. package/vendor/zotero/src/utilities.js +0 -49
  1674. package/vendor/zotero/src/webEndpoint.js +0 -113
  1675. package/vendor/zotero/src/webSession.js +0 -476
  1676. package/vendor/zotero/src/zotero.js +0 -117
  1677. package/vendor/zotero/translate_export +0 -10
  1678. package/vendor/zotero/translate_search +0 -9
  1679. package/vendor/zotero/translate_url +0 -9
  1680. package/vendor/zotero/translate_url_multiple +0 -9
  1681. package/vendor/zotero/translate_url_single +0 -9
@@ -1,3283 +0,0 @@
1
- /*
2
- ***** BEGIN LICENSE BLOCK *****
3
-
4
- Copyright © 2009 Center for History and New Media
5
- George Mason University, Fairfax, Virginia, USA
6
- http://zotero.org
7
-
8
- This file is part of Zotero.
9
-
10
- Zotero is free software: you can redistribute it and/or modify
11
- it under the terms of the GNU Affero General Public License as published by
12
- the Free Software Foundation, either version 3 of the License, or
13
- (at your option) any later version.
14
-
15
- Zotero is distributed in the hope that it will be useful,
16
- but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- GNU Affero General Public License for more details.
19
-
20
- You should have received a copy of the GNU Affero General Public License
21
- along with Zotero. If not, see <http://www.gnu.org/licenses/>.
22
-
23
- ***** END LICENSE BLOCK *****
24
- */
25
-
26
- /**
27
- * @class
28
- * Deprecated class for creating new Zotero.Translate instances<br/>
29
- * <br/>
30
- * New code should use Zotero.Translate.Web, Zotero.Translate.Import, Zotero.Translate.Export, or
31
- * Zotero.Translate.Search
32
- */
33
- Zotero.Translate = function(type) {
34
- Zotero.debug("Translate: WARNING: new Zotero.Translate() is deprecated; please don't use this if you don't have to");
35
- // hack
36
- var translate = Zotero.Translate.newInstance(type);
37
- for(var i in translate) {
38
- this[i] = translate[i];
39
- }
40
- this.constructor = translate.constructor;
41
- this.__proto__ = translate.__proto__;
42
- }
43
-
44
- /**
45
- * Create a new translator by a string type
46
- */
47
- Zotero.Translate.newInstance = function(type) {
48
- return new Zotero.Translate[type.substr(0, 1).toUpperCase()+type.substr(1).toLowerCase()];
49
- }
50
-
51
- /**
52
- * Namespace for Zotero sandboxes
53
- * @namespace
54
- */
55
- Zotero.Translate.Sandbox = {
56
- /**
57
- * Combines a sandbox with the base sandbox
58
- */
59
- "_inheritFromBase":function(sandboxToMerge) {
60
- var newSandbox = {};
61
-
62
- for(var method in Zotero.Translate.Sandbox.Base) {
63
- newSandbox[method] = Zotero.Translate.Sandbox.Base[method];
64
- }
65
-
66
- for(var method in sandboxToMerge) {
67
- newSandbox[method] = sandboxToMerge[method];
68
- }
69
-
70
- return newSandbox;
71
- },
72
-
73
- /**
74
- * Base sandbox. These methods are available to all translators.
75
- * @namespace
76
- */
77
- "Base": {
78
- /**
79
- * Called as {@link Zotero.Item#complete} from translators to save items to the database.
80
- * @param {Zotero.Translate} translate
81
- * @param {SandboxItem} An item created using the Zotero.Item class from the sandbox
82
- */
83
- _itemDone: function (translate, item) {
84
- // https://github.com/zotero/translators/issues/1353
85
- var asyncTranslator = !(translate instanceof Zotero.Translate.Web)
86
- && translate.translator[0].configOptions
87
- && translate.translator[0].configOptions.async;
88
-
89
- var run = async function (async) {
90
- Zotero.debug("Translate: Saving item");
91
-
92
- // warn if itemDone called after translation completed
93
- if(translate._complete) {
94
- Zotero.debug("Translate: WARNING: Zotero.Item#complete() called after Zotero.done(); please fix your code", 2);
95
- }
96
-
97
- const allowedObjects = [
98
- "complete",
99
- "attachments",
100
- "creators",
101
- "tags",
102
- "notes",
103
- "relations",
104
- // Is this still needed?
105
- "seeAlso"
106
- ];
107
-
108
- // Create a new object here, normalizing properties with object values
109
- var newItem = {};
110
- for (let i in item) {
111
- var val = item[i];
112
- if(!val && val !== 0) continue;
113
-
114
- var type = typeof val;
115
- var isObject = type === "object" || type === "xml" || type === "function",
116
- shouldBeObject = allowedObjects.indexOf(i) !== -1;
117
- if(isObject && !shouldBeObject) {
118
- // Convert things that shouldn't be objects to objects
119
- translate._debug("Translate: WARNING: typeof "+i+" is "+type+"; converting to string");
120
- newItem[i] = val.toString();
121
- } else if(shouldBeObject && !isObject) {
122
- translate._debug("Translate: WARNING: typeof "+i+" is "+type+"; converting to array");
123
- newItem[i] = [val];
124
- } else if(type === "string") {
125
- // trim strings
126
- newItem[i] = val.trim();
127
- } else {
128
- newItem[i] = val;
129
- }
130
- }
131
- item = newItem;
132
-
133
- if (item.title) {
134
- item.title = translate._cleanTitle(item.title, item.itemType);
135
- // Short Title is added before this in the web itemDone, so if we removed
136
- // a suffix (e.g., ": a novel") and the short title now matches the title,
137
- // remove it
138
- if (item.title == item.shortTitle) {
139
- delete item.shortTitle;
140
- }
141
- }
142
-
143
- // Clean empty creators
144
- if (item.creators) {
145
- for (var i=0; i<item.creators.length; i++) {
146
- var creator = item.creators[i];
147
- if (!creator.firstName && !creator.lastName) {
148
- item.creators.splice(i, 1);
149
- i--;
150
- }
151
- }
152
- }
153
-
154
- // If we're not in a child translator, canonicalize tags
155
- if (!translate._parentTranslator) {
156
- if(item.tags) item.tags = translate._cleanTags(item.tags);
157
- }
158
-
159
- if(item.attachments) {
160
- var attachments = item.attachments;
161
- for(var j=0; j<attachments.length; j++) {
162
- var attachment = attachments[j];
163
-
164
- // Don't save documents as documents in connector, since we can't pass them around
165
- if((Zotero.isConnector || Zotero.isServer) && attachment.document) {
166
- attachment.url = attachment.document.documentURI || attachment.document.URL;
167
- attachment.mimeType = "text/html";
168
- delete attachment.document;
169
- }
170
-
171
- // If we're not in a child translator, canonicalize tags
172
- if (!translate._parentTranslator) {
173
- if(attachment.tags !== undefined) attachment.tags = translate._cleanTags(attachment.tags);
174
- }
175
- }
176
- }
177
-
178
- // if we're not supposed to save the item or we're in a child translator,
179
- // just return the item array
180
- if(translate._libraryID === false || translate._parentTranslator) {
181
- translate.newItems.push(item);
182
- return translate._runHandler("itemDone", item, item);
183
- }
184
-
185
- // We use this within the connector to keep track of items as they are saved
186
- if(!item.id) item.id = Zotero.Utilities.randomString();
187
-
188
- if(item.notes) {
189
- var notes = item.notes;
190
- for(var j=0; j<notes.length; j++) {
191
- var note = notes[j];
192
- if(!note) {
193
- notes.splice(j--, 1);
194
- } else if(typeof(note) != "object") {
195
- // Convert to object
196
- notes[j] = {"note":note.toString()}
197
- }
198
- // If we're not in a child translator, canonicalize tags
199
- if (!translate._parentTranslator) {
200
- if(note.tags !== undefined) note.tags = translate._cleanTags(note.tags);
201
- }
202
- }
203
- }
204
-
205
- if (item.version) {
206
- translate._debug("Translate: item.version is deprecated; set item.versionNumber instead");
207
- item.versionNumber = item.version;
208
- }
209
-
210
- if (item.accessDate) {
211
- if (Zotero.Date.isSQLDateTime(item.accessDate)) {
212
- translate._debug("Translate: Passing accessDate as SQL is deprecated; pass an ISO 8601 date instead");
213
- item.accessDate = Zotero.Date.sqlToISO8601(item.accessDate);
214
- }
215
- }
216
-
217
- // Fire itemSaving event
218
- translate._runHandler("itemSaving", item);
219
- translate._savingItems++;
220
-
221
- // For synchronous import (when Promise isn't available in the sandbox or the do*
222
- // function doesn't use it) and web translators, queue saves
223
- if (!async || !asyncTranslator) {
224
- Zotero.debug("Translate: Saving via queue");
225
- translate.saveQueue.push(item);
226
- }
227
- // For async import, save items immediately
228
- else {
229
- Zotero.debug("Translate: Saving now");
230
- translate.incrementAsyncProcesses("Zotero.Translate#_saveItems()");
231
- return translate._saveItems([item])
232
- .then(() => translate.decrementAsyncProcesses("Zotero.Translate#_saveItems()"));
233
- }
234
- };
235
-
236
- return run(asyncTranslator);
237
- },
238
-
239
- /**
240
- * Gets translator options that were defined in displayOptions in translator header
241
- *
242
- * @param {Zotero.Translate} translate
243
- * @param {String} option Option to be retrieved
244
- */
245
- "getOption":function(translate, option) {
246
- if(typeof option !== "string") {
247
- throw(new Error("getOption: option must be a string"));
248
- return;
249
- }
250
-
251
- return translate._displayOptions[option];
252
- },
253
-
254
- /**
255
- * Gets a hidden preference that can be defined by hiddenPrefs in translator header
256
- *
257
- * @param {Zotero.Translate} translate
258
- * @param {String} pref Preference to be retrieved
259
- */
260
- "getHiddenPref":function(translate, pref) {
261
- if(typeof(pref) != "string") {
262
- throw(new Error("getPref: preference must be a string"));
263
- }
264
-
265
- var hp = translate._translatorInfo.hiddenPrefs || {};
266
-
267
- var value;
268
- try {
269
- value = Zotero.Prefs.get('translators.' + pref);
270
- } catch(e) {}
271
-
272
- return (value !== undefined ? value : hp[pref]);
273
- },
274
-
275
- /**
276
- * For loading other translators and accessing their methods
277
- *
278
- * @param {Zotero.Translate} translate
279
- * @param {String} type Translator type ("web", "import", "export", or "search")
280
- * @returns {Object} A safeTranslator object, which operates mostly like Zotero.Translate
281
- */
282
- "loadTranslator":function(translate, type) {
283
- const setDefaultHandlers = function(translate, translation) {
284
- if(type !== "export"
285
- && (!translation._handlers['itemDone'] || !translation._handlers['itemDone'].length)) {
286
- translation.setHandler("itemDone", function(obj, item) {
287
- translate.Sandbox._itemDone(translate, item);
288
- });
289
- }
290
- if(!translation._handlers['selectItems'] || !translation._handlers['selectItems'].length) {
291
- translation.setHandler("selectItems", translate._handlers["selectItems"]);
292
- }
293
- }
294
-
295
- if(typeof type !== "string") {
296
- throw(new Error("loadTranslator: type must be a string"));
297
- return;
298
- }
299
-
300
- Zotero.debug("Translate: Creating translate instance of type "+type+" in sandbox");
301
- var translation = Zotero.Translate.newInstance(type);
302
- translation._parentTranslator = translate;
303
- translation.setTranslatorProvider(translate._translatorProvider);
304
-
305
- if(translation instanceof Zotero.Translate.Export && !(translation instanceof Zotero.Translate.Export)) {
306
- throw(new Error("Only export translators may call other export translators"));
307
- }
308
-
309
- /**
310
- * @class Wrapper for {@link Zotero.Translate} for safely calling another translator
311
- * from inside an existing translator
312
- * @inner
313
- */
314
- var safeTranslator = {};
315
- safeTranslator.setSearch = function(arg) {
316
- if(!Zotero.isBookmarklet) arg = JSON.parse(JSON.stringify(arg));
317
- return translation.setSearch(arg);
318
- };
319
- safeTranslator.setDocument = function(arg) {
320
- if (Zotero.isFx && !Zotero.isBookmarklet) {
321
- return translation.setDocument(
322
- Zotero.Translate.DOMWrapper.wrap(arg, arg.SpecialPowers_wrapperOverrides)
323
- );
324
- } else {
325
- return translation.setDocument(arg);
326
- }
327
- };
328
- var errorHandlerSet = false;
329
- safeTranslator.setHandler = function(arg1, arg2) {
330
- if(arg1 === "error") errorHandlerSet = true;
331
- translation.setHandler(arg1,
332
- function(obj, item) {
333
- try {
334
- item = item.wrappedJSObject ? item.wrappedJSObject : item;
335
- if(arg1 == "itemDone") {
336
- Object.defineProperty(
337
- item,
338
- "complete",
339
- {
340
- value: translate._sandboxZotero.Item.prototype.complete,
341
- enumerable: false,
342
- }
343
- );
344
- }
345
- arg2(obj, item);
346
- } catch(e) {
347
- translate.complete(false, e);
348
- }
349
- }
350
- );
351
- };
352
- safeTranslator.setString = function(arg) { translation.setString(arg) };
353
- safeTranslator.setTranslator = function(arg) {
354
- var success = translation.setTranslator(arg);
355
- if(!success) {
356
- throw new Error("Translator "+translate.translator[0].translatorID+" attempted to call invalid translatorID "+arg);
357
- }
358
- };
359
-
360
- var translatorsHandlerSet = false;
361
- safeTranslator.getTranslators = async function () {
362
- if(!translation._handlers["translators"] || !translation._handlers["translators"].length) {
363
- throw new Error('Translator must register a "translators" handler to '+
364
- 'call getTranslators() in this translation environment.');
365
- }
366
- if(!translatorsHandlerSet) {
367
- translation.setHandler("translators", function() {
368
- translate.decrementAsyncProcesses("safeTranslator#getTranslators()");
369
- });
370
- }
371
- translate.incrementAsyncProcesses("safeTranslator#getTranslators()");
372
- return translation.getTranslators();
373
- };
374
-
375
- var doneHandlerSet = false;
376
- safeTranslator.translate = async function () {
377
- translate.incrementAsyncProcesses("safeTranslator#translate()");
378
- setDefaultHandlers(translate, translation);
379
- if(!doneHandlerSet) {
380
- doneHandlerSet = true;
381
- translation.setHandler("done", function() { translate.decrementAsyncProcesses("safeTranslator#translate()") });
382
- }
383
- if(!errorHandlerSet) {
384
- errorHandlerSet = true;
385
- translation.setHandler("error", function(obj, error) { translate.complete(false, error) });
386
- }
387
- return translation.translate(false);
388
- };
389
-
390
- safeTranslator.getTranslatorObject = function (callback) {
391
- translate.incrementAsyncProcesses("safeTranslator#getTranslatorObject()");
392
-
393
- var translator = translation.translator[0];
394
- translator = typeof translator === "object"
395
- ? translator
396
- : translation._translatorProvider.get(translator);
397
- // Zotero.Translators.get returns a value in the client and a promise in connectors
398
- // so we normalize the value to a promise here
399
- var promise = Zotero.Promise.resolve(translator)
400
- .then(function (translator) {
401
- return translation._loadTranslator(translator);
402
- })
403
- .then(function () {
404
- return translation._prepareTranslation();
405
- })
406
- .then(function () {
407
- setDefaultHandlers(translate, translation);
408
- var sandbox = translation._sandboxManager.sandbox;
409
- if (!Zotero.Utilities.isEmpty(sandbox.exports)) {
410
- sandbox.exports.Zotero = sandbox.Zotero;
411
- sandbox = sandbox.exports;
412
- }
413
- else {
414
- translate._debug("COMPAT WARNING: " + translation.translator[0].label + " does "
415
- + "not export any properties. Only detect" + translation._entryFunctionSuffix
416
- + " and do" + translation._entryFunctionSuffix + " will be available in "
417
- + "connectors.");
418
- }
419
-
420
- if (callback) callback(sandbox);
421
- translate.decrementAsyncProcesses("safeTranslator#getTranslatorObject()");
422
-
423
- return sandbox;
424
- })
425
- .catch(function (e) {
426
- translate.complete(false, e);
427
- });
428
-
429
- if (!callback) {
430
- return promise;
431
- }
432
- };
433
-
434
- return safeTranslator;
435
- },
436
-
437
- /**
438
- * Enables asynchronous detection or translation
439
- * @param {Zotero.Translate} translate
440
- * @deprecated
441
- */
442
- "wait":function(translate) {},
443
-
444
- /**
445
- * Sets the return value for detection
446
- *
447
- * @param {Zotero.Translate} translate
448
- */
449
- "done":function(translate, returnValue) {
450
- if(translate._currentState === "detect") {
451
- translate._returnValue = returnValue;
452
- }
453
- },
454
-
455
- /**
456
- * Proxy for translator _debug function
457
- *
458
- * @param {Zotero.Translate} translate
459
- * @param {String} string String to write to console
460
- * @param {String} [level] Level to log as (1 to 5)
461
- */
462
- "debug":function(translate, string, level) {
463
- translate._debug(string, level);
464
- }
465
- },
466
-
467
- /**
468
- * Web functions exposed to sandbox
469
- * @namespace
470
- */
471
- "Web": {
472
- /**
473
- * Lets user pick which items s/he wants to put in his/her library
474
- * @param {Zotero.Translate} translate
475
- * @param {Object} items An set of id => name pairs in object format
476
- * @param {Function} callback If provided, called with a copy of `items`
477
- * filtered to the items that the user selected.
478
- * @returns {Promise<Object?>} If no callback is passed: resolves to
479
- * the same object that would be passed to the callback.
480
- */
481
- selectItems: function (translate, items, callback) {
482
- function helper(translate, items, callback) {
483
- if (Zotero.Utilities.isEmpty(items)) {
484
- throw new Error("Translator called selectItems with no items");
485
- }
486
-
487
- // Some translators pass an array rather than an object to Zotero.selectItems.
488
- // This will break messaging outside of Firefox, so we need to fix it.
489
- if (Object.prototype.toString.call(items) === "[object Array]") {
490
- translate._debug("WARNING: Zotero.selectItems should be called with an object, not an array");
491
- let itemsObj = {};
492
- for (var i in items) itemsObj[i] = items[i];
493
- items = itemsObj;
494
- }
495
-
496
- if (translate._selectedItems) {
497
- // if we have a set of selected items for this translation, use them
498
- return translate._selectedItems;
499
- }
500
- else if (translate._handlers.select) {
501
- // whether the handler operates asynchronously
502
- var haveAsyncHandler = false;
503
- var returnedItems = null;
504
-
505
- var callbackExecuted = false;
506
- // if this translator provides an async callback for selectItems, rig things
507
- // up to pop off the async process
508
- var newCallback = function (selectedItems) {
509
- callbackExecuted = true;
510
- try {
511
- callback(selectedItems);
512
- }
513
- catch (e) {
514
- translate.complete(false, e);
515
- return false;
516
- }
517
- if (haveAsyncHandler) translate.decrementAsyncProcesses("Zotero.selectItems()");
518
- };
519
-
520
- if (Zotero.isFx && !Zotero.isBookmarklet) {
521
- items = Components.utils.cloneInto(items, {});
522
- }
523
-
524
- var returnValue = translate._runHandler("select", items, newCallback);
525
- if (returnValue !== undefined) {
526
- // handler may have returned a value, which makes callback unnecessary
527
- Zotero.debug("WARNING: Returning items from a select handler is deprecated. "
528
- + "Please pass items as to the callback provided as the third argument to "
529
- + "the handler.");
530
-
531
- returnedItems = returnValue;
532
- haveAsyncHandler = false;
533
- }
534
- else {
535
- // if we don't have returnedItems set already, the handler is asynchronous
536
- haveAsyncHandler = !callbackExecuted;
537
- }
538
-
539
- if (haveAsyncHandler) {
540
- // we are running asynchronously, so increment async processes
541
- translate.incrementAsyncProcesses("Zotero.selectItems()");
542
- }
543
- else if (!callbackExecuted) {
544
- // callback didn't get called from handler, so call it here
545
- callback(returnedItems);
546
- }
547
- return false;
548
- }
549
- else { // no handler defined; assume they want all of them
550
- callback(items);
551
- return items;
552
- }
553
- }
554
-
555
- if (callback) {
556
- return helper(translate, items, callback);
557
- }
558
- else {
559
- return new Promise(resolve => helper(translate, items, resolve));
560
- }
561
- },
562
-
563
- /**
564
- * Overloads {@link Zotero.Translate.Sandbox.Base._itemDone} to ensure that no standalone
565
- * items are saved, that an item type is specified, and to add a libraryCatalog and
566
- * shortTitle if relevant.
567
- * @param {Zotero.Translate} translate
568
- * @param {SandboxItem} An item created using the Zotero.Item class from the sandbox
569
- */
570
- "_itemDone":function(translate, item) {
571
- // Only apply checks if there is no parent translator
572
- if(!translate._parentTranslator) {
573
- if(!item.itemType) {
574
- item.itemType = "webpage";
575
- translate._debug("WARNING: No item type specified");
576
- }
577
-
578
- if(item.type == "attachment" || item.type == "note") {
579
- Zotero.debug("Translate: Discarding standalone "+item.type+" in non-import translator", 2);
580
- return;
581
- }
582
-
583
- // store library catalog if this item was captured from a website, and
584
- // libraryCatalog is truly undefined (not false or "")
585
- if(item.repository !== undefined) {
586
- Zotero.debug("Translate: 'repository' field is now 'libraryCatalog'; please fix your code", 2);
587
- item.libraryCatalog = item.repository;
588
- delete item.repository;
589
- }
590
-
591
- // automatically set library catalog
592
- if(item.libraryCatalog === undefined && item.itemType != "webpage") {
593
- item.libraryCatalog = translate.translator[0].label;
594
- }
595
-
596
- // Remove library catalog if not valid for type, so it doesn't get saved to Extra
597
- if (item.libraryCatalog) {
598
- let itemTypeID = Zotero.ItemTypes.getID(item.itemType);
599
- let fieldID = Zotero.ItemFields.getID('libraryCatalog');
600
- if (!Zotero.ItemFields.isValidForType(fieldID, itemTypeID)) {
601
- delete item.libraryCatalog;
602
- }
603
- }
604
-
605
- // automatically set access date if URL is set
606
- if(item.url && typeof item.accessDate == 'undefined') {
607
- item.accessDate = Zotero.Date.dateToISO(new Date());
608
- }
609
-
610
- //consider type-specific "title" alternatives
611
- var altTitle = Zotero.ItemFields.getName(Zotero.ItemFields.getFieldIDFromTypeAndBase(item.itemType, 'title'));
612
- if(altTitle && item[altTitle]) item.title = item[altTitle];
613
-
614
- if(!item.title) {
615
- translate.complete(false, new Error("No title specified for item"));
616
- return;
617
- }
618
-
619
- // create short title
620
- if(item.shortTitle === undefined && Zotero.Utilities.fieldIsValidForType("shortTitle", item.itemType)) {
621
- // only set if changes have been made
622
- var setShortTitle = false;
623
- var title = item.title;
624
-
625
- // shorten to before first colon
626
- var index = title.indexOf(":");
627
- if(index !== -1) {
628
- title = title.substr(0, index);
629
- setShortTitle = true;
630
- }
631
- // shorten to after first question mark
632
- index = title.indexOf("?");
633
- if(index !== -1) {
634
- index++;
635
- if(index != title.length) {
636
- title = title.substr(0, index);
637
- setShortTitle = true;
638
- }
639
- }
640
-
641
- if(setShortTitle) item.shortTitle = title;
642
- }
643
-
644
- /* Clean up ISBNs
645
- * Allow multiple ISBNs, but...
646
- * (1) validate all ISBNs
647
- * (2) convert all ISBNs to ISBN-13
648
- * (3) remove any duplicates
649
- * (4) separate them with space
650
- */
651
- if (item.ISBN) {
652
- // Match ISBNs with groups separated by various dashes or even spaces
653
- var isbnRe = /\b(?:97[89][\s\x2D\xAD\u2010-\u2015\u2043\u2212]*)?(?:\d[\s\x2D\xAD\u2010-\u2015\u2043\u2212]*){9}[\dx](?![\x2D\xAD\u2010-\u2015\u2043\u2212])\b/gi,
654
- validISBNs = [],
655
- isbn;
656
- while (isbn = isbnRe.exec(item.ISBN)) {
657
- var validISBN = Zotero.Utilities.cleanISBN(isbn[0]);
658
- if (!validISBN) {
659
- // Back up and move up one character
660
- isbnRe.lastIndex = isbn.index + 1;
661
- continue;
662
- }
663
-
664
- var isbn13 = Zotero.Utilities.toISBN13(validISBN);
665
- if (validISBNs.indexOf(isbn13) == -1) validISBNs.push(isbn13);
666
- }
667
- item.ISBN = validISBNs.join(' ');
668
- }
669
-
670
- // refuse to save very long tags
671
- if(item.tags) {
672
- for(var i=0; i<item.tags.length; i++) {
673
- var tag = item.tags[i],
674
- tagString = typeof tag === "string" ? tag :
675
- typeof tag === "object" ? (tag.tag || tag.name) : null;
676
- if(tagString && tagString.length > 255) {
677
- translate._debug("WARNING: Skipping unsynchable tag "+JSON.stringify(tagString));
678
- item.tags.splice(i--, 1);
679
- }
680
- }
681
- }
682
-
683
- for(var i=0; i<item.attachments.length; i++) {
684
- var attachment = item.attachments[i];
685
-
686
- // Web translators are not allowed to use attachment.path
687
- if (attachment.path) {
688
- if (!attachment.url) attachment.url = attachment.path;
689
- delete attachment.path;
690
- }
691
-
692
- if (attachment.url) {
693
- // Remap attachment (but not link) URLs
694
- // TODO: provide both proxied and un-proxied URLs (also for documents)
695
- // because whether the attachment is attached as link or file
696
- // depends on Zotero preferences as well.
697
- attachment.url = translate.resolveURL(
698
- attachment.url,
699
- attachment.proxy === false || attachment.snapshot === false
700
- );
701
- }
702
- }
703
- }
704
-
705
- // call super
706
- Zotero.Translate.Sandbox.Base._itemDone(translate, item);
707
- },
708
-
709
- /**
710
- * Tells Zotero to monitor changes to the DOM and re-trigger detectWeb
711
- * Can only be set during the detectWeb call
712
- * @param {DOMNode} target Document node to monitor for changes
713
- * @param {MutationObserverInit} [config] specifies which DOM mutations should be reported
714
- */
715
- "monitorDOMChanges":function(translate, target, config) {
716
- if(translate._currentState != "detect") {
717
- Zotero.debug("Translate: monitorDOMChanges can only be called during the 'detect' stage");
718
- return;
719
- }
720
-
721
- var window = translate.document.defaultView
722
- var mutationObserver = window && ( window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver );
723
- if(!mutationObserver) {
724
- Zotero.debug("Translate: This browser does not support mutation observers.");
725
- return;
726
- }
727
-
728
- var translator = translate._potentialTranslators[0];
729
- if(!translate._registeredDOMObservers[translator.translatorID])
730
- translate._registeredDOMObservers[translator.translatorID] = [];
731
- var obs = translate._registeredDOMObservers[translator.translatorID];
732
-
733
- //do not re-register observer by the same translator for the same node
734
- if(obs.indexOf(target) != -1) {
735
- Zotero.debug("Translate: Already monitoring this node");
736
- return;
737
- }
738
-
739
- obs.push(target);
740
-
741
- var observer = new mutationObserver(function(mutations, observer) {
742
- obs.splice(obs.indexOf(target),1);
743
- observer.disconnect();
744
-
745
- Zotero.debug("Translate: Page modified.");
746
- //we don't really care what got updated
747
- var doc = mutations[0].target.ownerDocument;
748
- translate._runHandler("pageModified", doc);
749
- });
750
-
751
- observer.observe(target, config || {childList: true, subtree: true});
752
- Zotero.debug("Translate: Mutation observer registered on <" + target.nodeName + "> node");
753
- }
754
- },
755
-
756
- /**
757
- * Import functions exposed to sandbox
758
- * @namespace
759
- */
760
- "Import":{
761
- /**
762
- * Saves a collection to the DB
763
- * Called as {@link Zotero.Collection#complete} from the sandbox
764
- * @param {Zotero.Translate} translate
765
- * @param {SandboxCollection} collection
766
- */
767
- "_collectionDone":function(translate, collection) {
768
- translate.newCollections.push(collection);
769
- if(translate._libraryID == false) {
770
- translate._runHandler("collectionDone", collection);
771
- }
772
- },
773
-
774
- /**
775
- * Sets the value of the progress indicator associated with export as a percentage
776
- * @param {Zotero.Translate} translate
777
- * @param {Number} value
778
- */
779
- "setProgress":function(translate, value) {
780
- if(typeof value !== "number") {
781
- translate._progress = null;
782
- } else {
783
- translate._progress = value;
784
- }
785
- }
786
- },
787
-
788
- /**
789
- * Export functions exposed to sandbox
790
- * @namespace
791
- */
792
- "Export":{
793
- /**
794
- * Retrieves the next item to be exported
795
- * @param {Zotero.Translate} translate
796
- * @return {SandboxItem}
797
- */
798
- "nextItem":function(translate) {
799
- var item = translate._itemGetter.nextItem();
800
-
801
- if(translate._displayOptions.hasOwnProperty("exportTags") && !translate._displayOptions["exportTags"]) {
802
- item.tags = [];
803
- }
804
-
805
- translate._runHandler("itemDone", item);
806
-
807
- return item;
808
- },
809
-
810
- /**
811
- * Retrieves the next collection to be exported
812
- * @param {Zotero.Translate} translate
813
- * @return {SandboxCollection}
814
- */
815
- "nextCollection":function(translate) {
816
- if(!translate._translatorInfo.configOptions || !translate._translatorInfo.configOptions.getCollections) {
817
- throw(new Error("getCollections configure option not set; cannot retrieve collection"));
818
- }
819
-
820
- return translate._itemGetter.nextCollection();
821
- },
822
-
823
- /**
824
- * @borrows Zotero.Translate.Sandbox.Import.setProgress as this.setProgress
825
- */
826
- "setProgress":function(translate, value) {
827
- Zotero.Translate.Sandbox.Import.setProgress(translate, value);
828
- }
829
- },
830
-
831
- /**
832
- * Search functions exposed to sandbox
833
- * @namespace
834
- */
835
- "Search":{
836
- /**
837
- * @borrows Zotero.Translate.Sandbox.Web._itemDone as this._itemDone
838
- */
839
- "_itemDone":function(translate, item) {
840
- // Always set library catalog, even if we have a parent translator
841
- if(item.libraryCatalog === undefined) {
842
- item.libraryCatalog = translate.translator[0].label;
843
- }
844
-
845
- Zotero.Translate.Sandbox.Web._itemDone(translate, item);
846
- }
847
- }
848
- }
849
-
850
- /**
851
- * @class Base class for all translation types
852
- *
853
- * @property {String} type The type of translator. This is deprecated; use instanceof instead.
854
- * @property {Zotero.Translator[]} translator The translator currently in use. Usually, only the
855
- * first entry of the Zotero.Translator array is populated; subsequent entries represent
856
- * translators to be used if the first fails.
857
- * @property {String} path The path or URI string of the target
858
- * @property {String} newItems Items created when translate() was called
859
- * @property {String} newCollections Collections created when translate() was called
860
- * @property {Number} runningAsyncProcesses The number of async processes that are running. These
861
- * need to terminate before Zotero.done() is called.
862
- */
863
- Zotero.Translate.Base = function() {}
864
- Zotero.Translate.Base.prototype = {
865
- /**
866
- * Initializes a Zotero.Translate instance
867
- */
868
- "init":function() {
869
- this._handlers = [];
870
- this._currentState = null;
871
- this._translatorInfo = null;
872
- this._translatorProvider = Zotero.Translators;
873
- this.document = null;
874
- this.location = null;
875
- },
876
-
877
- /**
878
- * Sets the location to operate upon
879
- *
880
- * @param {String|nsIFile} location The URL to which the sandbox should be bound or path to local file
881
- */
882
- "setLocation":function(location) {
883
- this.location = location;
884
- if(typeof this.location == "object") { // if a file
885
- this.path = location.path;
886
- } else { // if a url
887
- this.path = location;
888
- }
889
- },
890
-
891
- /**
892
- * Sets the translator to be used for import/export
893
- *
894
- * @param {Array{Zotero.Translator}|Zotero.Translator|string} Translator object or ID
895
- */
896
- "setTranslator":function(translator) {
897
- // Accept an array of translators
898
- if (Array.isArray(translator)) {
899
- this.translator = translator;
900
- return true;
901
- }
902
- if(!translator) {
903
- throw new Error("No translator specified");
904
- }
905
-
906
- this.translator = null;
907
-
908
- if(typeof(translator) == "object") { // passed an object and not an ID
909
- if(translator.translatorID) {
910
- this.translator = [translator];
911
- } else {
912
- throw(new Error("No translatorID specified"));
913
- }
914
- } else {
915
- this.translator = [translator];
916
- }
917
-
918
- return !!this.translator;
919
- },
920
-
921
- /**
922
- * Registers a handler function to be called when translation is complete
923
- *
924
- * @param {String} type Type of handler to register. Legal values are:
925
- * select
926
- * valid: web
927
- * called: when the user needs to select from a list of available items
928
- * passed: an associative array in the form id => text
929
- * returns: a numerically indexed array of ids, as extracted from the passed
930
- * string
931
- * itemDone
932
- * valid: import, web, search
933
- * called: when an item has been processed; may be called asynchronously
934
- * passed: an item object (see Zotero.Item)
935
- * returns: N/A
936
- * collectionDone
937
- * valid: import
938
- * called: when a collection has been processed, after all items have been
939
- * added; may be called asynchronously
940
- * passed: a collection object (see Zotero.Collection)
941
- * returns: N/A
942
- * done
943
- * valid: all
944
- * called: when all processing is finished
945
- * passed: true if successful, false if an error occurred
946
- * returns: N/A
947
- * debug
948
- * valid: all
949
- * called: when Zotero.debug() is called
950
- * passed: string debug message
951
- * returns: true if message should be logged to the console, false if not
952
- * error
953
- * valid: all
954
- * called: when a fatal error occurs
955
- * passed: error object (or string)
956
- * returns: N/A
957
- * translators
958
- * valid: all
959
- * called: when a translator search initiated with Zotero.Translate.getTranslators() is
960
- * complete
961
- * passed: an array of appropriate translators
962
- * returns: N/A
963
- * pageModified
964
- * valid: web
965
- * called: when a web page has been modified
966
- * passed: the document object for the modified page
967
- * returns: N/A
968
- * @param {Function} handler Callback function. All handlers will be passed the current
969
- * translate instance as the first argument. The second argument is dependent on the handler.
970
- */
971
- "setHandler":function(type, handler) {
972
- if(!this._handlers[type]) {
973
- this._handlers[type] = new Array();
974
- }
975
- this._handlers[type].push(handler);
976
- },
977
-
978
- /**
979
- * Clears all handlers for a given function
980
- * @param {String} type See {@link Zotero.Translate.Base#setHandler} for valid values
981
- */
982
- "clearHandlers":function(type) {
983
- this._handlers[type] = new Array();
984
- },
985
-
986
- /**
987
- * Clears a single handler for a given function
988
- * @param {String} type See {@link Zotero.Translate.Base#setHandler} for valid values
989
- * @param {Function} handler Callback function to remove
990
- */
991
- "removeHandler":function(type, handler) {
992
- var handlerIndex = this._handlers[type].indexOf(handler);
993
- if(handlerIndex !== -1) this._handlers[type].splice(handlerIndex, 1);
994
- },
995
-
996
- /**
997
- * Set custom translator provider, as returned by Zotero.Translators.makeTranslatorProvider()
998
- *
999
- * Used by Scaffold to substitute external translator files
1000
- *
1001
- * @param {Object} translatorProvider
1002
- */
1003
- setTranslatorProvider: function (translatorProvider) {
1004
- this._translatorProvider = translatorProvider;
1005
- },
1006
-
1007
- /**
1008
- * Indicates that a new async process is running
1009
- */
1010
- "incrementAsyncProcesses":function(f) {
1011
- this._runningAsyncProcesses++;
1012
- if(this._parentTranslator) {
1013
- this._parentTranslator.incrementAsyncProcesses(f+" from child translator");
1014
- } else {
1015
- //Zotero.debug("Translate: Incremented asynchronous processes to "+this._runningAsyncProcesses+" for "+f, 4);
1016
- //Zotero.debug((new Error()).stack);
1017
- }
1018
- },
1019
-
1020
- /**
1021
- * Indicates that a new async process is finished
1022
- */
1023
- "decrementAsyncProcesses":function(f, by) {
1024
- this._runningAsyncProcesses -= (by ? by : 1);
1025
- if(!this._parentTranslator) {
1026
- //Zotero.debug("Translate: Decremented asynchronous processes to "+this._runningAsyncProcesses+" for "+f, 4);
1027
- //Zotero.debug((new Error()).stack);
1028
- }
1029
- if(this._runningAsyncProcesses === 0) {
1030
- this.complete();
1031
- }
1032
- if(this._parentTranslator) this._parentTranslator.decrementAsyncProcesses(f+" from child translator", by);
1033
- },
1034
-
1035
- /**
1036
- * Clears all handlers for a given function
1037
- * @param {String} type See {@link Zotero.Translate.Base#setHandler} for valid values
1038
- * @param {Any} argument Argument to be passed to handler
1039
- */
1040
- "_runHandler":function(type) {
1041
- var returnValue = undefined;
1042
- if(this._handlers[type]) {
1043
- // compile list of arguments
1044
- if(this._parentTranslator) {
1045
- // if there is a parent translator, make sure we don't pass the Zotero.Translate
1046
- // object, since it could open a security hole
1047
- var args = [null];
1048
- } else {
1049
- var args = [this];
1050
- }
1051
- for(var i=1; i<arguments.length; i++) {
1052
- args.push(arguments[i]);
1053
- }
1054
-
1055
- var handlers = this._handlers[type].slice();
1056
- for(var i=0, n=handlers.length; i<n; i++) {
1057
- if (type != 'debug') {
1058
- Zotero.debug(`Translate: Running handler ${i} for ${type}`, 5);
1059
- }
1060
- try {
1061
- returnValue = handlers[i].apply(null, args);
1062
- } catch(e) {
1063
- if(this._parentTranslator) {
1064
- // throw handler errors if they occur when a translator is
1065
- // called from another translator, so that the
1066
- // "Could Not Translate" dialog will appear if necessary
1067
- throw(e);
1068
- } else {
1069
- // otherwise, fail silently, so as not to interfere with
1070
- // interface cleanup
1071
- Zotero.debug("Translate: "+e+' in handler '+i+' for '+type, 5);
1072
- Zotero.logError(e);
1073
- }
1074
- }
1075
- }
1076
- }
1077
- return returnValue;
1078
- },
1079
-
1080
- /**
1081
- * Gets all applicable translators of a given type
1082
- *
1083
- * For import, you should call this after setLocation; otherwise, you'll just get a list of all
1084
- * import filters, not filters equipped to handle a specific file
1085
- *
1086
- * @param {Boolean} [getAllTranslators] Whether all applicable translators should be returned,
1087
- * rather than just the first available.
1088
- * @param {Boolean} [checkSetTranslator] If true, the appropriate detect function is run on the
1089
- * set document/text/etc. using the translator set by setTranslator.
1090
- * getAllTranslators parameter is meaningless in this context.
1091
- * @return {Promise} Promise for an array of {@link Zotero.Translator} objects
1092
- */
1093
- getTranslators: Zotero.Promise.method(function (getAllTranslators, checkSetTranslator) {
1094
- var potentialTranslators;
1095
-
1096
- // do not allow simultaneous instances of getTranslators
1097
- if(this._currentState === "detect") throw new Error("getTranslators: detection is already running");
1098
- this._currentState = "detect";
1099
- this._getAllTranslators = getAllTranslators;
1100
- this._potentialTranslators = [];
1101
- this._foundTranslators = [];
1102
-
1103
- if(checkSetTranslator) {
1104
- // setTranslator must be called beforehand if checkSetTranslator is set
1105
- if( !this.translator || !this.translator[0] ) {
1106
- return Zotero.Promise.reject(new Error("getTranslators: translator must be set via setTranslator before calling" +
1107
- " getTranslators with the checkSetTranslator flag"));
1108
- }
1109
- var promises = new Array();
1110
- var t;
1111
- for(var i=0, n=this.translator.length; i<n; i++) {
1112
- if(typeof(this.translator[i]) == 'string') {
1113
- t = this._translatorProvider.get(this.translator[i]);
1114
- if(!t) Zotero.debug("getTranslators: could not retrieve translator '" + this.translator[i] + "'");
1115
- } else {
1116
- t = this.translator[i];
1117
- }
1118
- /**TODO: check that the translator is of appropriate type?*/
1119
- if(t) promises.push(t);
1120
- }
1121
- if(!promises.length) return Zotero.Promise.reject(new Error("getTranslators: no valid translators were set"));
1122
- potentialTranslators = Zotero.Promise.all(promises).then(val => [val]);
1123
- } else {
1124
- potentialTranslators = this._getTranslatorsGetPotentialTranslators();
1125
- }
1126
-
1127
- // if detection returns immediately, return found translators
1128
- return potentialTranslators.then(function(result) {
1129
- var allPotentialTranslators = result[0];
1130
- var proxies = result[1];
1131
-
1132
- // this gets passed out by Zotero.Translators.getWebTranslatorsForLocation() because it is
1133
- // specific for each translator, but we want to avoid making a copy of a translator whenever
1134
- // possible.
1135
- this._proxies = proxies ? [] : null;
1136
- this._waitingForRPC = false;
1137
-
1138
- for(var i=0, n=allPotentialTranslators.length; i<n; i++) {
1139
- var translator = allPotentialTranslators[i];
1140
- if(translator.runMode === Zotero.Translator.RUN_MODE_IN_BROWSER) {
1141
- this._potentialTranslators.push(translator);
1142
- if (proxies) {
1143
- this._proxies.push(proxies[i]);
1144
- }
1145
- } else if (this instanceof Zotero.Translate.Web && Zotero.Connector) {
1146
- this._waitingForRPC = true;
1147
- }
1148
- }
1149
-
1150
- // Attach handler for translators, so that we can return a
1151
- // promise that provides them.
1152
- // TODO make this._detect() return a promise
1153
- var deferred = Zotero.Promise.defer();
1154
- var translatorsHandler = function(obj, translators) {
1155
- this.removeHandler("translators", translatorsHandler);
1156
- deferred.resolve(translators);
1157
- }.bind(this);
1158
- this.setHandler("translators", translatorsHandler);
1159
- this._detect();
1160
-
1161
- if(this._waitingForRPC) {
1162
- // Try detect in Zotero Standalone. If this fails, it fails; we shouldn't
1163
- // get hung up about it.
1164
- let html = this.document.documentElement.innerHTML;
1165
- html = html.replace(new RegExp(Zotero.Utilities.quotemeta(ZOTERO_CONFIG.BOOKMARKLET_URL), 'g'), "about:blank");
1166
- Zotero.Connector.callMethod(
1167
- "detect",
1168
- {
1169
- uri: this.location.toString(),
1170
- cookie: this.document.cookie,
1171
- html
1172
- }).catch(() => false).then(function (rpcTranslators) {
1173
- this._waitingForRPC = false;
1174
-
1175
- // if there are translators, add them to the list of found translators
1176
- if (rpcTranslators) {
1177
- for(var i=0, n=rpcTranslators.length; i<n; i++) {
1178
- rpcTranslators[i] = new Zotero.Translator(rpcTranslators[i]);
1179
- rpcTranslators[i].runMode = Zotero.Translator.RUN_MODE_ZOTERO_STANDALONE;
1180
- rpcTranslators[i].proxy = rpcTranslators[i].proxy ? new Zotero.Proxy(rpcTranslators[i].proxy) : null;
1181
- }
1182
- this._foundTranslators = this._foundTranslators.concat(rpcTranslators);
1183
- }
1184
-
1185
- // call _detectTranslatorsCollected to return detected translators
1186
- if (this._currentState === null) {
1187
- this._detectTranslatorsCollected();
1188
- }
1189
- }.bind(this));
1190
- }
1191
-
1192
- return deferred.promise;
1193
- }.bind(this))
1194
- .catch(function(e) {
1195
- Zotero.logError(e);
1196
- this.complete(false, e);
1197
- }.bind(this));
1198
- }),
1199
-
1200
- /**
1201
- * Get all potential translators (without running detect)
1202
- * @return {Promise} Promise for an array of {@link Zotero.Translator} objects
1203
- */
1204
- _getTranslatorsGetPotentialTranslators: async function () {
1205
- var translators = await this._translatorProvider.getAllForType(this.type);
1206
- return [translators];
1207
- },
1208
-
1209
- /**
1210
- * Begins the actual translation. At present, this returns immediately for import/export
1211
- * translators, but new code should use {@link Zotero.Translate.Base#setHandler} to register a
1212
- * "done" handler to determine when execution of web/search translators is complete.
1213
- *
1214
- * @param {Integer|FALSE} [libraryID] Library in which to save items,
1215
- * or NULL for default library;
1216
- * if FALSE, don't save items
1217
- * @param {Boolean} [saveAttachments=true] Exclude attachments (e.g., snapshots) on import
1218
- * @param {Boolean} [linkFiles=false] - Save linked files instead of stored files
1219
- * @returns {Promise} Promise resolved with saved items
1220
- * when translation complete
1221
- */
1222
- translate: Zotero.Promise.method(function (options = {}, ...args) { // initialize properties specific to each translation
1223
- if (typeof options == 'number') {
1224
- Zotero.debug("Translate: translate() now takes an object -- update your code", 2);
1225
- options = {
1226
- libraryID: options,
1227
- saveAttachments: args[0],
1228
- selectedItems: args[1]
1229
- };
1230
- }
1231
-
1232
- var me = this;
1233
- var deferred = Zotero.Promise.defer()
1234
-
1235
- if(!this.translator || !this.translator.length) {
1236
- Zotero.debug("Translate: translate called without specifying a translator. Running detection first.");
1237
- this.setHandler('translators', function(me, translators) {
1238
- if(!translators.length) {
1239
- me.complete(false, "Could not find an appropriate translator");
1240
- } else {
1241
- me.setTranslator(translators);
1242
- deferred.resolve(Zotero.Translate.Base.prototype.translate.call(me, options));
1243
- }
1244
- });
1245
- this.getTranslators();
1246
- return deferred.promise;
1247
- }
1248
-
1249
- this._currentState = "translate";
1250
-
1251
- this._sessionID = options.sessionID;
1252
- this._libraryID = options.libraryID;
1253
- if (options.collections && !Array.isArray(options.collections)) {
1254
- throw new Error("'collections' must be an array");
1255
- }
1256
- this._collections = options.collections;
1257
- this._saveAttachments = options.saveAttachments === undefined || options.saveAttachments;
1258
- this._linkFiles = options.linkFiles;
1259
- this._forceTagType = options.forceTagType;
1260
- this._saveOptions = options.saveOptions;
1261
-
1262
- this._savingAttachments = [];
1263
- this._savingItems = 0;
1264
- this._waitingForSave = false;
1265
-
1266
- // Attach handlers for promise
1267
- var me = this;
1268
- var doneHandler = function (obj, returnValue) {
1269
- if (returnValue) deferred.resolve(me.newItems);
1270
- me.removeHandler("done", doneHandler);
1271
- me.removeHandler("error", errorHandler);
1272
- };
1273
- var errorHandler = function (obj, error) {
1274
- deferred.reject(error);
1275
- me.removeHandler("done", doneHandler);
1276
- me.removeHandler("error", errorHandler);
1277
- };
1278
- this.setHandler("done", doneHandler);
1279
- this.setHandler("error", errorHandler);
1280
-
1281
- // need to get translator first
1282
- if (typeof this.translator[0] !== "object") {
1283
- this.translator[0] = this._translatorProvider.get(this.translator[0]);
1284
- }
1285
-
1286
- // Zotero.Translators.get() returns a promise in the connectors, but we don't expect it to
1287
- // otherwise
1288
- if (!Zotero.isConnector && this.translator[0].then) {
1289
- throw new Error("Translator should not be a promise in non-connector mode");
1290
- }
1291
-
1292
- if (this.noWait) {
1293
- var loadPromise = this._loadTranslator(this.translator[0]);
1294
- if (!loadPromise.isResolved()) {
1295
- return Zotero.Promise.reject(new Error("Load promise is not resolved in noWait mode"));
1296
- }
1297
- this._translateTranslatorLoaded();
1298
- }
1299
- else if (this.translator[0].then) {
1300
- Zotero.Promise.resolve(this.translator[0])
1301
- .then(function (translator) {
1302
- this.translator[0] = translator;
1303
- this._loadTranslator(translator)
1304
- .then(() => this._translateTranslatorLoaded())
1305
- .catch(e => deferred.reject(e));
1306
- }.bind(this));
1307
- }
1308
- else {
1309
- this._loadTranslator(this.translator[0])
1310
- .then(() => this._translateTranslatorLoaded())
1311
- .catch(e => deferred.reject(e));
1312
- }
1313
-
1314
- return deferred.promise;
1315
- }),
1316
-
1317
- /**
1318
- * Called when translator has been retrieved and loaded
1319
- */
1320
- "_translateTranslatorLoaded": Zotero.Promise.method(function() {
1321
- // set display options to default if they don't exist
1322
- if(!this._displayOptions) this._displayOptions = this._translatorInfo.displayOptions || {};
1323
-
1324
- var loadPromise = this._prepareTranslation();
1325
- if (this.noWait) {
1326
- if (!loadPromise.isResolved()) {
1327
- throw new Error("Load promise is not resolved in noWait mode");
1328
- }
1329
- rest.apply(this, arguments);
1330
- } else {
1331
- return loadPromise.then(() => rest.apply(this, arguments))
1332
- }
1333
-
1334
- function rest() {
1335
- Zotero.debug("Translate: Beginning translation with " + this.translator[0].label);
1336
-
1337
- this.incrementAsyncProcesses("Zotero.Translate#translate()");
1338
-
1339
- // translate
1340
- try {
1341
- let fn = this._sandboxManager.sandbox["do" + this._entryFunctionSuffix];
1342
- if (!fn) {
1343
- this.complete(false, new Error(`Translator has no do${this._entryFunctionSuffix} function`));
1344
- }
1345
-
1346
- let maybePromise = Function.prototype.apply.call(
1347
- fn,
1348
- null,
1349
- this._getParameters()
1350
- );
1351
-
1352
- if (maybePromise) {
1353
- maybePromise
1354
- .then(() => this.decrementAsyncProcesses("Zotero.Translate#translate()"))
1355
- .catch(e => this.complete(false, e));
1356
- return;
1357
- }
1358
- } catch (e) {
1359
- this.complete(false, e);
1360
- return false;
1361
- }
1362
-
1363
- this.decrementAsyncProcesses("Zotero.Translate#translate()");
1364
- }
1365
- }),
1366
-
1367
- /**
1368
- * Return the progress of the import operation, or null if progress cannot be determined
1369
- */
1370
- "getProgress":function() { return null },
1371
-
1372
- /**
1373
- * Translate a URL to a form that goes through the appropriate proxy, or
1374
- * convert a relative URL to an absolute one
1375
- *
1376
- * @param {String} url
1377
- * @param {Boolean} dontUseProxy If true, don't convert URLs to variants
1378
- * that use the proxy
1379
- * @type String
1380
- * @private
1381
- */
1382
- "resolveURL":function(url, dontUseProxy) {
1383
- Zotero.debug("Translate: resolving URL " + url);
1384
-
1385
- const hostPortRe = /^([A-Z][-A-Z0-9+.]*):\/\/[^\/]+/i;
1386
- const allowedSchemes = ['http', 'https', 'ftp'];
1387
-
1388
- var m = url.match(hostPortRe),
1389
- resolved;
1390
- if (!m) {
1391
- if (this.location) {
1392
- if (Zotero.isFx) {
1393
- resolved = Services.io.newURI(this.location, "", null).resolve(url);
1394
- }
1395
- else {
1396
- resolved = new URL(url, this.location).toString();
1397
- }
1398
- }
1399
- else if (url.startsWith('//')) {
1400
- // Use HTTPS by default for protocol-relative URL with no associated web page
1401
- resolved = 'https:' + url;
1402
- }
1403
- else {
1404
- throw new Error('Cannot resolve relative URL without an associated web page: ' + url);
1405
- }
1406
- } else if (allowedSchemes.indexOf(m[1].toLowerCase()) == -1) {
1407
- Zotero.debug("Translate: unsupported scheme " + m[1]);
1408
- return url;
1409
- } else {
1410
- resolved = url;
1411
- }
1412
-
1413
- Zotero.debug("Translate: resolved to " + resolved);
1414
-
1415
- // convert proxy to proper if applicable
1416
- if(!dontUseProxy && this.translator && this.translator[0]
1417
- && this._proxy) {
1418
- var proxiedURL = this._proxy.toProxy(resolved);
1419
- if (proxiedURL != resolved) {
1420
- Zotero.debug("Translate: proxified to " + proxiedURL);
1421
- }
1422
- resolved = proxiedURL;
1423
- }
1424
-
1425
- /*var m = hostPortRe.exec(resolved);
1426
- if(!m) {
1427
- throw new Error("Invalid URL supplied for HTTP request: "+url);
1428
- } else if(this._translate.document && this._translate.document.location) {
1429
- var loc = this._translate.document.location;
1430
- if(this._translate._currentState !== "translate" && loc
1431
- && (m[1].toLowerCase() !== loc.protocol.toLowerCase()
1432
- || m[2].toLowerCase() !== loc.host.toLowerCase())) {
1433
- throw new Error("Attempt to access "+m[1]+"//"+m[2]+" from "+loc.protocol+"//"+loc.host
1434
- +" blocked: Cross-site requests are only allowed during translation");
1435
- }
1436
- }*/
1437
-
1438
- return resolved;
1439
- },
1440
-
1441
- /**
1442
- * Executed on translator completion, either automatically from a synchronous scraper or as
1443
- * done() from an asynchronous scraper. Finishes things up and calls callback function(s).
1444
- * @param {Boolean|String} returnValue An item type or a boolean true or false
1445
- * @param {String|Exception} [error] An error that occurred during translation.
1446
- * @return {String|NULL} The exception serialized to a string, or null if translation
1447
- * completed successfully.
1448
- */
1449
- "complete":function(returnValue, error) {
1450
- // allow translation to be aborted for re-running after selecting items
1451
- if(this._aborted) return;
1452
-
1453
- // Make sure this isn't called twice
1454
- if(this._currentState === null) {
1455
- if(!returnValue) {
1456
- Zotero.debug("Translate: WARNING: Zotero.done() called after translator completion with error");
1457
- Zotero.debug(error);
1458
- } else {
1459
- var e = new Error();
1460
- Zotero.debug("Translate: WARNING: Zotero.done() called after translation completion. This should never happen. Please examine the stack below.");
1461
- Zotero.debug(e.stack);
1462
- }
1463
- return;
1464
- }
1465
-
1466
- // reset async processes and propagate them to parent
1467
- if(this._parentTranslator && this._runningAsyncProcesses) {
1468
- this._parentTranslator.decrementAsyncProcesses("Zotero.Translate#complete", this._runningAsyncProcesses);
1469
- }
1470
- this._runningAsyncProcesses = 0;
1471
-
1472
- if(!returnValue && this._returnValue) returnValue = this._returnValue;
1473
-
1474
- var errorString = null;
1475
- if(!returnValue && error) errorString = this._generateErrorString(error);
1476
- if(this._currentState === "detect") {
1477
- if(this._potentialTranslators.length) {
1478
- var lastTranslator = this._potentialTranslators.shift();
1479
- var lastProxy = this._proxies ? this._proxies.shift() : null;
1480
-
1481
- if (returnValue) {
1482
- var dupeTranslator = {proxy: lastProxy ? new Zotero.Proxy(lastProxy) : null};
1483
-
1484
- for (var i in lastTranslator) dupeTranslator[i] = lastTranslator[i];
1485
- if (Zotero.isBookmarklet && returnValue === "server") {
1486
- // In the bookmarklet, the return value from detectWeb can be "server" to
1487
- // indicate the translator should be run on the Zotero server
1488
- dupeTranslator.runMode = Zotero.Translator.RUN_MODE_ZOTERO_SERVER;
1489
- } else {
1490
- // Usually the return value from detectWeb will be either an item type or
1491
- // the string "multiple"
1492
- dupeTranslator.itemType = returnValue;
1493
- }
1494
-
1495
- this._foundTranslators.push(dupeTranslator);
1496
- } else if(error) {
1497
- this._debug("Detect using "+lastTranslator.label+" failed: \n"+errorString, 2);
1498
- }
1499
- }
1500
-
1501
- if(this._potentialTranslators.length && (this._getAllTranslators || !returnValue)) {
1502
- // more translators to try; proceed to next translator
1503
- this._detect();
1504
- } else {
1505
- this._currentState = null;
1506
- if(!this._waitingForRPC) this._detectTranslatorsCollected();
1507
- }
1508
- } else {
1509
- // unset return value is equivalent to true
1510
- if(returnValue === undefined) returnValue = true;
1511
-
1512
- if(returnValue) {
1513
- if(this.saveQueue.length) {
1514
- this._waitingForSave = true;
1515
- this._saveItems(this.saveQueue)
1516
- .catch(e => this._runHandler("error", e))
1517
- .then(() => this.saveQueue = []);
1518
- return;
1519
- }
1520
- this._debug("Translation successful");
1521
- } else {
1522
- if(error) {
1523
- if (!this._parentTranslator) {
1524
- // store in error log if it's the root translator,
1525
- // otherwise it's up to the root translator whether it wants to
1526
- // log an error or not in this case
1527
- Zotero.logError(error);
1528
- }
1529
-
1530
- // report error to debug log
1531
- this._debug("Translation using "+(this.translator && this.translator[0] && this.translator[0].label ? this.translator[0].label : "no translator")+" failed: \n"+errorString, 2);
1532
- }
1533
-
1534
- this._runHandler("error", error);
1535
- }
1536
-
1537
- this._currentState = null;
1538
-
1539
- // call handlers
1540
- this._runHandler("itemsDone", returnValue);
1541
- if(returnValue) {
1542
- this._checkIfDone();
1543
- } else {
1544
- this._runHandler("done", returnValue);
1545
- }
1546
- }
1547
-
1548
- return errorString;
1549
- },
1550
-
1551
- _cleanTitle: function (title, itemType) {
1552
- if (itemType == 'book' || itemType == 'bookSection') {
1553
- return title.replace(/\s*:\s*a novel\s*$/i, '');
1554
- }
1555
- return title;
1556
- },
1557
-
1558
- /**
1559
- * Canonicalize an array of tags such that they are all objects with the tag stored in the
1560
- * "tag" property and a type (if specified) is stored in the "type" property
1561
- * @returns {Object[]} Array of new tag objects
1562
- */
1563
- "_cleanTags":function(tags) {
1564
- var newTags = [];
1565
- if(!tags) return newTags;
1566
- for(var i=0; i<tags.length; i++) {
1567
- var tag = tags[i];
1568
- if(!tag) continue;
1569
- if(typeof(tag) == "object") {
1570
- var tagString = tag.tag || tag.name;
1571
- if(tagString) {
1572
- var newTag = {"tag":tagString};
1573
- if(tag.type) newTag.type = tag.type;
1574
- newTags.push(newTag);
1575
- }
1576
- } else {
1577
- newTags.push({"tag":tag.toString()});
1578
- }
1579
- }
1580
- return newTags;
1581
- },
1582
-
1583
- /**
1584
- * Saves items to the database, taking care to defer attachmentProgress notifications
1585
- * until after save
1586
- */
1587
- _saveItems: Zotero.Promise.method(function (items) {
1588
- var itemDoneEventsDispatched = false;
1589
- var deferredProgress = [];
1590
- var attachmentsWithProgress = [];
1591
-
1592
- function attachmentCallback(attachment, progress, error) {
1593
- // Find by id if available (used in the connector)
1594
- if (attachment.id) {
1595
- var attachmentIndex = this._savingAttachments.findIndex(x => x.id == attachment.id);
1596
- }
1597
- else {
1598
- var attachmentIndex = this._savingAttachments.indexOf(attachment);
1599
- }
1600
- if(progress === false || progress === 100) {
1601
- if(attachmentIndex !== -1) {
1602
- this._savingAttachments.splice(attachmentIndex, 1);
1603
- }
1604
- } else if(attachmentIndex === -1) {
1605
- this._savingAttachments.push(attachment);
1606
- }
1607
-
1608
- if(itemDoneEventsDispatched) {
1609
- // itemDone event has already fired, so we can fire attachmentProgress
1610
- // notifications
1611
- this._runHandler("attachmentProgress", attachment, progress, error);
1612
- this._checkIfDone();
1613
- } else {
1614
- // Defer until after we fire the itemDone event
1615
- deferredProgress.push([attachment, progress, error]);
1616
- attachmentsWithProgress.push(attachment);
1617
- }
1618
- }
1619
-
1620
- return this._itemSaver.saveItems(items.slice(), attachmentCallback.bind(this),
1621
- function(newItems) {
1622
- this._runHandler("itemsDone", newItems);
1623
- // Remove attachments not being saved from item.attachments
1624
- for(var i=0; i<items.length; i++) {
1625
- var item = items[i];
1626
- for(var j=0; j<item.attachments.length; j++) {
1627
- if(attachmentsWithProgress.indexOf(item.attachments[j]) === -1) {
1628
- item.attachments.splice(j--, 1);
1629
- }
1630
- }
1631
- }
1632
-
1633
- // Trigger itemDone events, waiting for them if they return promises
1634
- var maybePromises = [];
1635
- for(var i=0, nItems = items.length; i<nItems; i++) {
1636
- maybePromises.push(this._runHandler("itemDone", newItems[i], items[i]));
1637
- }
1638
- return Zotero.Promise.all(maybePromises).then(() => newItems);
1639
- }.bind(this))
1640
- .then(function (newItems) {
1641
- // Specify that itemDone event was dispatched, so that we don't defer
1642
- // attachmentProgress notifications anymore
1643
- itemDoneEventsDispatched = true;
1644
-
1645
- // Run deferred attachmentProgress notifications
1646
- for(var i=0; i<deferredProgress.length; i++) {
1647
- this._runHandler("attachmentProgress", deferredProgress[i][0],
1648
- deferredProgress[i][1], deferredProgress[i][2]);
1649
- }
1650
-
1651
- this._savingItems -= items.length;
1652
- this.newItems = this.newItems.concat(newItems);
1653
- this._checkIfDone();
1654
- }.bind(this))
1655
- .catch((e) => {
1656
- this._savingItems -= items.length;
1657
- this.complete(false, e);
1658
- throw e;
1659
- });
1660
- }),
1661
-
1662
- /**
1663
- * Checks if saving done, and if so, fires done event
1664
- */
1665
- "_checkIfDone":function() {
1666
- if(!this._savingItems && !this._savingAttachments.length && (!this._currentState || this._waitingForSave)) {
1667
- if (this.newCollections
1668
- && this._libraryID !== false
1669
- && this._itemSaver.saveCollections) {
1670
- var me = this;
1671
- this._itemSaver.saveCollections(this.newCollections)
1672
- .then(function (newCollections) {
1673
- me.newCollections = newCollections;
1674
- me._runHandler("done", true);
1675
- })
1676
- .catch(function (err) {
1677
- me._runHandler("error", err);
1678
- me._runHandler("done", false);
1679
- });
1680
- } else {
1681
- this._runHandler("done", true);
1682
- }
1683
- }
1684
- },
1685
-
1686
- /**
1687
- * Begins running detect code for a translator, first loading it
1688
- */
1689
- _detect: async function() {
1690
- // there won't be any translators if we need an RPC call
1691
- if(!this._potentialTranslators.length) {
1692
- this.complete(true);
1693
- return null;
1694
- }
1695
-
1696
- try {
1697
- await this._loadTranslator(this._potentialTranslators[0]);
1698
- return await this._detectTranslatorLoaded();
1699
- }
1700
- catch (e) {
1701
- this.complete(false, e);
1702
- }
1703
- },
1704
-
1705
- /**
1706
- * Runs detect code for a translator
1707
- */
1708
- _detectTranslatorLoaded: async function () {
1709
- this._prepareDetection();
1710
-
1711
- this.incrementAsyncProcesses("Zotero.Translate#getTranslators");
1712
-
1713
- let fn = this._sandboxManager.sandbox["detect" + this._entryFunctionSuffix];
1714
- if (!fn) {
1715
- this.complete(false, new Error(`Translator has no detect${this._entryFunctionSuffix} function`));
1716
- }
1717
-
1718
- var maybePromise = Function.prototype.apply.call(
1719
- fn,
1720
- null,
1721
- this._getParameters()
1722
- );
1723
- // If detect* returns a promise, wait for it
1724
- var returnValue = (maybePromise && maybePromise.then) ? await maybePromise : maybePromise;
1725
-
1726
- if (returnValue !== undefined) this._returnValue = returnValue;
1727
- this.decrementAsyncProcesses("Zotero.Translate#getTranslators");
1728
-
1729
- // If the translator started an async process in detect* (like loading another translator),
1730
- // wait for it in the promise we return
1731
- if (this._runningAsyncProcesses) {
1732
- return new Promise((resolve, reject) => {
1733
- this.setHandler('translators', () => resolve(this._returnValue));
1734
- this.setHandler('error', (_, err) => reject(err));
1735
- });
1736
- }
1737
-
1738
- // Otherwise, immediately return what detect* returned
1739
- return returnValue;
1740
- },
1741
-
1742
- /**
1743
- * Called when all translators have been collected for detection
1744
- */
1745
- "_detectTranslatorsCollected":function() {
1746
- Zotero.debug("Translate: All translator detect calls and RPC calls complete:");
1747
- this._foundTranslators.sort(function(a, b) {
1748
- // If priority is equal, prioritize translators that run in browser over the client
1749
- if (a.priority == b.priority) {
1750
- return a.runMode - b.runMode;
1751
- }
1752
- return a.priority-b.priority;
1753
- });
1754
- if (this._foundTranslators.length) {
1755
- this._foundTranslators.forEach(function(t) {
1756
- Zotero.debug("\t" + t.label + ": " + t.priority);
1757
- });
1758
- } else {
1759
- Zotero.debug("\tNo suitable translators found");
1760
- }
1761
- this._runHandler("translators", this._foundTranslators);
1762
- },
1763
-
1764
- /**
1765
- * Loads the translator into its sandbox
1766
- * @param {Zotero.Translator} translator
1767
- * @return {Promise}
1768
- */
1769
- _loadTranslator: Zotero.Promise.method(function (translator) {
1770
- var sandboxLocation = this._getSandboxLocation();
1771
- if(!this._sandboxLocation || sandboxLocation !== this._sandboxLocation) {
1772
- this._sandboxLocation = sandboxLocation;
1773
- this._generateSandbox();
1774
- }
1775
-
1776
- this._currentTranslator = translator;
1777
-
1778
- if (this.type == 'web') {
1779
- // Pass on the proxy of the parent translate
1780
- if (this._parentTranslator) {
1781
- this._proxy = this._parentTranslator._proxy;
1782
- } else {
1783
- this._proxy = translator.proxy;
1784
- }
1785
- } else {
1786
- // Use proxy only for web translators
1787
- this._proxy = null;
1788
- }
1789
- this._runningAsyncProcesses = 0;
1790
- this._returnValue = undefined;
1791
- this._aborted = false;
1792
- this.saveQueue = [];
1793
-
1794
- var parse = function(code) {
1795
- Zotero.debug("Translate: Parsing code for " + translator.label + " "
1796
- + "(" + translator.translatorID + ", " + translator.lastUpdated + ")", 4);
1797
- // This might throw but it's better than catching and calling complete(false) here
1798
- // since then other execution paths are not aware of this failing and continue running
1799
- // at least in Import translation detection, causing weird race conditions.
1800
- // The code that calls this function (which is really only code in this file)
1801
- // should expect a throw and call complete(false) after catching.
1802
- this._sandboxManager.eval(
1803
- "var exports = {}, ZOTERO_TRANSLATOR_INFO = " + code,
1804
- [
1805
- "detect" + this._entryFunctionSuffix,
1806
- "do" + this._entryFunctionSuffix,
1807
- "exports",
1808
- "ZOTERO_TRANSLATOR_INFO"
1809
- ],
1810
- (translator.file ? translator.file.path : translator.label)
1811
- );
1812
-
1813
- this._translatorInfo = this._sandboxManager.sandbox.ZOTERO_TRANSLATOR_INFO;
1814
- }.bind(this);
1815
-
1816
- if (this.noWait) {
1817
- let codePromise = this._translatorProvider.getCodeForTranslator(translator);
1818
- if (!codePromise.isResolved()) {
1819
- throw new Error("Code promise is not resolved in noWait mode");
1820
- }
1821
- parse(codePromise.value());
1822
- }
1823
- else {
1824
- return this._translatorProvider.getCodeForTranslator(translator).then(parse);
1825
- }
1826
- }),
1827
-
1828
- /**
1829
- * Generates a sandbox for scraping/scraper detection
1830
- */
1831
- "_generateSandbox":function() {
1832
- Zotero.debug("Translate: Binding sandbox to "+(typeof this._sandboxLocation == "object" ? this._sandboxLocation.document.location : this._sandboxLocation), 4);
1833
- this._sandboxManager = new Zotero.Translate.SandboxManager(this._sandboxLocation);
1834
-
1835
- this._sandboxManager.importObject(this.Sandbox, this);
1836
- this._sandboxManager.importObject({"Utilities":new Zotero.Utilities.Translate(this)});
1837
-
1838
- this._sandboxZotero = this._sandboxManager.sandbox.Zotero;
1839
-
1840
- this._sandboxZotero.Item = this._makeSandboxItem();
1841
- if (this instanceof Zotero.Translate.Export || this instanceof Zotero.Translate.Import) {
1842
- this._sandboxZotero.Collection = this._makeSandboxCollection();
1843
- }
1844
-
1845
- this._sandboxZotero.Utilities.HTTP = this._sandboxZotero.Utilities;
1846
-
1847
- this._sandboxZotero.isBookmarklet = Zotero.isBookmarklet || false;
1848
- this._sandboxZotero.isConnector = Zotero.isConnector || false;
1849
- this._sandboxZotero.isServer = Zotero.isServer || false;
1850
- this._sandboxZotero.parentTranslator = this._parentTranslator
1851
- && this._parentTranslator._currentTranslator ?
1852
- this._parentTranslator._currentTranslator.translatorID : null;
1853
-
1854
- // create shortcuts
1855
- this._sandboxManager.sandbox.Z = this._sandboxZotero;
1856
- this._sandboxManager.sandbox.ZU = this._sandboxZotero.Utilities;
1857
-
1858
- // Add helper functions
1859
- if (this.type == 'web' || this.type == 'search') {
1860
- this._sandboxManager.sandbox.attr = this._attr.bind(this);
1861
- this._sandboxManager.sandbox.text = this._text.bind(this);
1862
- this._sandboxManager.sandbox.innerText = this._innerText.bind(this);
1863
- this._sandboxManager.sandbox.request = this._sandboxZotero.Utilities.request.bind(this._sandboxZotero.Utilities);
1864
- this._sandboxManager.sandbox.requestText = this._sandboxZotero.Utilities.requestText.bind(this._sandboxZotero.Utilities);
1865
- this._sandboxManager.sandbox.requestJSON = this._sandboxZotero.Utilities.requestJSON.bind(this._sandboxZotero.Utilities);
1866
- this._sandboxManager.sandbox.requestDocument = this._sandboxZotero.Utilities.requestDocument.bind(this._sandboxZotero.Utilities);
1867
- }
1868
- },
1869
-
1870
- /**
1871
- * Helper function to extract HTML attribute text
1872
- *
1873
- * Text is automatically trimmed
1874
- */
1875
- _attr: function (selector, attr, index) {
1876
- if (typeof arguments[0] == 'string') {
1877
- var docOrElem = this.document;
1878
- }
1879
- // Document or element passed as first argument
1880
- else {
1881
- [docOrElem, selector, attr, index] = arguments;
1882
- }
1883
- var elem = index
1884
- ? docOrElem.querySelectorAll(selector).item(index)
1885
- : docOrElem.querySelector(selector);
1886
- if (!elem) return "";
1887
- return (elem.hasAttribute(attr) ? elem.getAttribute(attr) : "").trim();
1888
- },
1889
-
1890
- /**
1891
- * Helper function to extract HTML element text
1892
- *
1893
- * Text is extracted using textContent and is automatically trimmed
1894
- */
1895
- _text: function (selector, index) {
1896
- if (typeof arguments[0] == 'string') {
1897
- var docOrElem = this.document;
1898
- }
1899
- // Document or element passed as first argument
1900
- else {
1901
- [docOrElem, selector, index] = arguments;
1902
- }
1903
- var elem = index
1904
- ? docOrElem.querySelectorAll(selector).item(index)
1905
- : docOrElem.querySelector(selector);
1906
- return (elem ? elem.textContent : "").trim();
1907
- },
1908
-
1909
- /**
1910
- * Helper function to extract rendered HTML element text
1911
- *
1912
- * Text is extracted using innerText, not textContent, so it reflects the rendered content, and
1913
- * is automatically trimmed
1914
- */
1915
- _innerText: function (selector, index) {
1916
- if (typeof arguments[0] == 'string') {
1917
- var docOrElem = this.document;
1918
- }
1919
- // Document or element passed as first argument
1920
- else {
1921
- [docOrElem, selector, index] = arguments;
1922
- }
1923
- var elem = index
1924
- ? docOrElem.querySelectorAll(selector).item(index)
1925
- : docOrElem.querySelector(selector);
1926
- return (elem ? elem.innerText : "").trim();
1927
- },
1928
-
1929
- _makeSandboxItem() {
1930
- let sandboxZotero = this._sandboxZotero;
1931
- if (!sandboxZotero) {
1932
- throw new Error('Sandbox must be initialized');
1933
- }
1934
-
1935
- return class {
1936
- itemType;
1937
-
1938
- creators = [];
1939
-
1940
- notes = [];
1941
-
1942
- tags = [];
1943
-
1944
- seeAlso = [];
1945
-
1946
- attachments = [];
1947
-
1948
- constructor(itemType) {
1949
- this.itemType = itemType;
1950
- }
1951
-
1952
- setExtra(field, value) {
1953
- let lines = String(this.extra || '').split('\n');
1954
- let existingIndex = lines.findIndex(line => line.startsWith(field + ': '));
1955
- if (existingIndex !== -1) {
1956
- lines[existingIndex] = `${field}: ${value}`;
1957
- }
1958
- else {
1959
- lines.push(`${field}: ${value}`);
1960
- }
1961
- this.extra = lines.join('\n');
1962
- }
1963
-
1964
- complete() {
1965
- return sandboxZotero._itemDone(this);
1966
- }
1967
- };
1968
- },
1969
-
1970
- _makeSandboxCollection() {
1971
- let sandboxZotero = this._sandboxZotero;
1972
- if (!sandboxZotero) {
1973
- throw new Error('Sandbox must be initialized');
1974
- }
1975
-
1976
- return class {
1977
- complete() {
1978
- return sandboxZotero._collectionDone(this);
1979
- }
1980
- };
1981
- },
1982
-
1983
- /**
1984
- * Logs a debugging message
1985
- * @param {String} string Debug string to log
1986
- * @param {Integer} level Log level (1-5, higher numbers are higher priority)
1987
- */
1988
- "_debug":function(string, level) {
1989
- if(level !== undefined && typeof level !== "number") {
1990
- Zotero.debug("debug: level must be an integer");
1991
- return;
1992
- }
1993
-
1994
- // if handler does not return anything explicitly false, show debug
1995
- // message in console
1996
- if(this._runHandler("debug", string) !== false) {
1997
- if(typeof string == "string") string = "Translate: "+string;
1998
- Zotero.debug(string, level);
1999
- }
2000
- },
2001
- /**
2002
- * Generates a string from an exception
2003
- * @param {String|Exception} error
2004
- */
2005
- _generateErrorString: function (error) {
2006
- var errorString = error;
2007
- if (error.stack && error) {
2008
- let stack = error.stack;
2009
- if (Zotero.isFx) {
2010
- stack = Zotero.Debug.filterStack(stack);
2011
- }
2012
- errorString += "\n\n" + stack;
2013
- }
2014
- if (this.path) {
2015
- errorString += `\nurl => ${this.path}`;
2016
- }
2017
- if (Zotero.Prefs.get("downloadAssociatedFiles")) {
2018
- errorString += "\ndownloadAssociatedFiles => true";
2019
- }
2020
- if (Zotero.Prefs.get("automaticSnapshots")) {
2021
- errorString += "\nautomaticSnapshots => true";
2022
- }
2023
- return errorString;
2024
- },
2025
-
2026
- /**
2027
- * Determines the location where the sandbox should be bound
2028
- * @return {String|document} The location to which to bind the sandbox
2029
- */
2030
- "_getSandboxLocation":function() {
2031
- return (this._parentTranslator ? this._parentTranslator._sandboxLocation : "http://www.example.com/");
2032
- },
2033
-
2034
- /**
2035
- * Gets parameters to be passed to detect* and do* functions
2036
- * @return {Array} A list of parameters
2037
- */
2038
- "_getParameters":function() { return []; },
2039
-
2040
- /**
2041
- * No-op for preparing detection
2042
- */
2043
- "_prepareDetection":function() {},
2044
-
2045
- /**
2046
- * No-op for preparing translation
2047
- */
2048
- "_prepareTranslation": function () { return Zotero.Promise.resolve(); }
2049
- }
2050
-
2051
- /**
2052
- * @class Web translation
2053
- *
2054
- * @property {Document} document The document object to be used for web scraping (set with setDocument)
2055
- * @property {Zotero.CookieSandbox} cookieSandbox A CookieSandbox to manage cookies for
2056
- * this Translate instance.
2057
- */
2058
- Zotero.Translate.Web = function() {
2059
- this._registeredDOMObservers = {}
2060
- this.init();
2061
- }
2062
- Zotero.Translate.Web.prototype = new Zotero.Translate.Base();
2063
- Zotero.Translate.Web.prototype.type = "web";
2064
- Zotero.Translate.Web.prototype._entryFunctionSuffix = "Web";
2065
- Zotero.Translate.Web.prototype.Sandbox = Zotero.Translate.Sandbox._inheritFromBase(Zotero.Translate.Sandbox.Web);
2066
-
2067
- /**
2068
- * Sets the browser to be used for web translation
2069
- * @param {Document} doc An HTML document
2070
- */
2071
- Zotero.Translate.Web.prototype.setDocument = function(doc) {
2072
- this.document = doc;
2073
- try {
2074
- this.rootDocument = doc.defaultView.top.document;
2075
- } catch (e) {
2076
- // Cross-origin frames won't be able to access top.document and will throw an error
2077
- }
2078
- if (!this.rootDocument) {
2079
- this.rootDocument = doc;
2080
- }
2081
- this.setLocation(doc.location.href, this.rootDocument.location.href);
2082
- }
2083
-
2084
- /**
2085
- * Sets a Zotero.CookieSandbox to handle cookie management for XHRs initiated from this
2086
- * translate instance
2087
- *
2088
- * @param {Zotero.CookieSandbox} cookieSandbox
2089
- */
2090
- Zotero.Translate.Web.prototype.setCookieSandbox = function(cookieSandbox) {
2091
- this.cookieSandbox = cookieSandbox;
2092
- }
2093
-
2094
- /**
2095
- * Sets headers to include in HTTP requests. Used by translation-server.
2096
- */
2097
- Zotero.Translate.Web.prototype.setRequestHeaders = function (headers) {
2098
- this.requestHeaders = headers;
2099
- };
2100
-
2101
- /**
2102
- * Sets the location to operate upon
2103
- *
2104
- * @param {String} location The URL of the page to translate
2105
- * @param {String} rootLocation The URL of the root page, within which `location` is embedded
2106
- */
2107
- Zotero.Translate.Web.prototype.setLocation = function(location, rootLocation) {
2108
- this.location = location;
2109
- this.rootLocation = rootLocation || location;
2110
- this.path = this.location;
2111
- }
2112
-
2113
- /**
2114
- * Get potential web translators
2115
- */
2116
- Zotero.Translate.Web.prototype._getTranslatorsGetPotentialTranslators = function() {
2117
- return this._translatorProvider.getWebTranslatorsForLocation(this.location, this.rootLocation);
2118
- }
2119
-
2120
- /**
2121
- * Bind sandbox to document being translated
2122
- */
2123
- Zotero.Translate.Web.prototype._getSandboxLocation = function() {
2124
- if(this._parentTranslator) {
2125
- return this._parentTranslator._sandboxLocation;
2126
- } else if(this.document.defaultView
2127
- && (this.document.defaultView.toString().indexOf("Window") !== -1
2128
- || this.document.defaultView.toString().indexOf("XrayWrapper") !== -1)) {
2129
- return this.document.defaultView;
2130
- } else {
2131
- return this.document.location.toString();
2132
- }
2133
- }
2134
-
2135
- /**
2136
- * Pass document and location to detect* and do* functions
2137
- */
2138
- Zotero.Translate.Web.prototype._getParameters = function() {
2139
- return [this.document, this.location];
2140
- };
2141
-
2142
- /**
2143
- * Prepare translation
2144
- */
2145
- Zotero.Translate.Web.prototype._prepareTranslation = Zotero.Promise.method(function () {
2146
- this._itemSaver = new Zotero.Translate.ItemSaver({
2147
- libraryID: this._libraryID,
2148
- collections: this._collections,
2149
- attachmentMode: Zotero.Translate.ItemSaver[(this._saveAttachments ? "ATTACHMENT_MODE_DOWNLOAD" : "ATTACHMENT_MODE_IGNORE")],
2150
- forceTagType: 1,
2151
- sessionID: this._sessionID,
2152
- cookieSandbox: this._cookieSandbox,
2153
- proxy: this._proxy,
2154
- baseURI: this.location
2155
- });
2156
- this.newItems = [];
2157
- });
2158
-
2159
- /**
2160
- * Overload translate to set selectedItems
2161
- */
2162
- Zotero.Translate.Web.prototype.translate = function (options = {}, ...args) {
2163
- if (typeof options == 'number' || options === false) {
2164
- Zotero.debug("Translate: translate() now takes an object -- update your code", 2);
2165
- options = {
2166
- libraryID: options,
2167
- saveAttachments: args[0],
2168
- selectedItems: args[1]
2169
- };
2170
- }
2171
- this._selectedItems = options.selectedItems;
2172
- return Zotero.Translate.Base.prototype.translate.call(this, options);
2173
- }
2174
-
2175
- /**
2176
- * Overload _translateTranslatorLoaded to send an RPC call if necessary
2177
- */
2178
- Zotero.Translate.Web.prototype._translateTranslatorLoaded = async function() {
2179
- var runMode = this.translator[0].runMode;
2180
- if(runMode === Zotero.Translator.RUN_MODE_IN_BROWSER || this._parentTranslator) {
2181
- Zotero.Translate.Base.prototype._translateTranslatorLoaded.apply(this);
2182
- } else if(runMode === Zotero.Translator.RUN_MODE_ZOTERO_STANDALONE ||
2183
- (runMode === Zotero.Translator.RUN_MODE_ZOTERO_SERVER && await Zotero.Connector.checkIsOnline())) {
2184
- var me = this;
2185
- let html = this.document.documentElement.innerHTML;
2186
- html = html.replace(new RegExp(Zotero.Utilities.quotemeta(ZOTERO_CONFIG.BOOKMARKLET_URL), 'g'), "about:blank")
2187
- // Higher timeout since translation might take a while if additional HTTP requests are made
2188
- Zotero.Connector.callMethod({method: "savePage", timeout: 60*1000}, {
2189
- sessionID: this._sessionID,
2190
- uri: this.location.toString(),
2191
- translatorID: (typeof this.translator[0] === "object"
2192
- ? this.translator[0].translatorID : this.translator[0]),
2193
- cookie: this.document.cookie,
2194
- proxy: this._proxy ? this._proxy.toJSON() : null,
2195
- html
2196
- }).then(me._translateRPCComplete.bind(me), me._translateRPCComplete.bind(me, null));
2197
- } else if(runMode === Zotero.Translator.RUN_MODE_ZOTERO_SERVER) {
2198
- var me = this;
2199
- Zotero.API.createItem({"url":this.document.location.href.toString()}).then(function(response) {
2200
- me._translateServerComplete(201, response);
2201
- }, function(error) {
2202
- me._translateServerComplete(error.status, error.responseText);
2203
- });
2204
- }
2205
- }
2206
-
2207
- /**
2208
- * Called when an call to Zotero Standalone for translation completes
2209
- */
2210
- Zotero.Translate.Web.prototype._translateRPCComplete = async function(obj, failureCode) {
2211
- if(!obj) return this.complete(false, failureCode);
2212
-
2213
- if(obj.selectItems) {
2214
- // if we have to select items, call the selectItems handler and do it
2215
- var me = this;
2216
- this._runHandler("select", obj.selectItems,
2217
- function(selectedItems) {
2218
- Zotero.Connector.callMethod("selectItems",
2219
- {"instanceID":obj.instanceID, "selectedItems":selectedItems})
2220
- .then((obj) => me._translateRPCComplete(obj))
2221
- }
2222
- );
2223
- } else {
2224
- // if we don't have to select items, continue
2225
- for(var i=0, n=obj.items.length; i<n; i++) {
2226
- this._runHandler("itemDone", null, obj.items[i]);
2227
- }
2228
- this.newItems = obj.items;
2229
- let itemSaver = new Zotero.Translate.ItemSaver({
2230
- libraryID: this._libraryID,
2231
- collections: this._collections,
2232
- attachmentMode: Zotero.Translate.ItemSaver[(this._saveAttachments ? "ATTACHMENT_MODE_DOWNLOAD" : "ATTACHMENT_MODE_IGNORE")],
2233
- forceTagType: 1,
2234
- sessionID: this._sessionID,
2235
- cookieSandbox: this._cookieSandbox,
2236
- proxy: this._proxy,
2237
- baseURI: this.location
2238
- });
2239
- await itemSaver._pollForProgress(obj.items, this._runHandler.bind(this, 'attachmentProgress'));
2240
- this.complete(true);
2241
- }
2242
- }
2243
-
2244
- /**
2245
- * Called when an call to the Zotero Translator Server for translation completes
2246
- */
2247
- Zotero.Translate.Web.prototype._translateServerComplete = function(statusCode, response) {
2248
- if(statusCode === 300) {
2249
- // Multiple Choices
2250
- try {
2251
- response = JSON.parse(response);
2252
- } catch(e) {
2253
- Zotero.logError(e);
2254
- this.complete(false, "Invalid JSON response received from server");
2255
- return;
2256
- }
2257
- var me = this;
2258
- this._runHandler("select", response.items,
2259
- function(selectedItems) {
2260
- Zotero.API.createItem({
2261
- url: me.document.location.href.toString(),
2262
- items: selectedItems,
2263
- token: response.token
2264
- }).then(function(response) {
2265
- me._translateServerComplete(201, response);
2266
- }, function(error) {
2267
- me._translateServerComplete(error.status, error.responseText);
2268
- });
2269
- }
2270
- );
2271
- } else if(statusCode === 201) {
2272
- // Created
2273
- try {
2274
- response = JSON.parse(response);
2275
- } catch(e) {
2276
- Zotero.logError(e);
2277
- this.complete(false, "Invalid JSON response received from server");
2278
- return;
2279
- }
2280
-
2281
- let items = [];
2282
- for (let key in response.successful) {
2283
- var item = response.successful[key].data;
2284
-
2285
- if(!("attachments" in item)) item.attachments = [];
2286
- this._runHandler("itemDone", null, item);
2287
- items.push(item);
2288
- }
2289
- this.newItems = items;
2290
- this._runHandler("itemsDone", null, item);
2291
- this.complete(true);
2292
- } else {
2293
- this.complete(false, response);
2294
- }
2295
- }
2296
-
2297
- /**
2298
- * Overload complete to report translation failure
2299
- */
2300
- Zotero.Translate.Web.prototype.complete = async function(returnValue, error) {
2301
- // call super
2302
- var oldState = this._currentState;
2303
- var errorString = Zotero.Translate.Base.prototype.complete.apply(this, [returnValue, error]);
2304
-
2305
- var promise;
2306
- if (Zotero.Prefs.getAsync) {
2307
- promise = Zotero.Prefs.getAsync('reportTranslationFailure');
2308
- } else {
2309
- promise = Zotero.Promise.resolve(Zotero.Prefs.get("reportTranslationFailure"));
2310
- }
2311
- var reportTranslationFailure = await promise;
2312
- // Report translation failure if we failed
2313
- if(oldState == "translate" && errorString && !this._parentTranslator && this.translator.length
2314
- && this.translator[0].inRepository && reportTranslationFailure) {
2315
- // Don't report failure if in private browsing mode
2316
- if (Zotero.isConnector && !Zotero.isBookmarklet && await Zotero.Connector_Browser.isIncognito()) {
2317
- return
2318
- }
2319
-
2320
- var translator = this.translator[0];
2321
- var info = await Zotero.getSystemInfo();
2322
-
2323
- var postBody = "id=" + encodeURIComponent(translator.translatorID) +
2324
- "&lastUpdated=" + encodeURIComponent(translator.lastUpdated) +
2325
- "&diagnostic=" + encodeURIComponent(info) +
2326
- "&errorData=" + encodeURIComponent(errorString);
2327
- return Zotero.HTTP.doPost(ZOTERO_CONFIG.REPOSITORY_URL + "report", postBody);
2328
- }
2329
- }
2330
-
2331
- /**
2332
- * @class Import translation
2333
- */
2334
- Zotero.Translate.Import = function() {
2335
- this.init();
2336
- }
2337
- Zotero.Translate.Import.prototype = new Zotero.Translate.Base();
2338
- Zotero.Translate.Import.prototype.type = "import";
2339
- Zotero.Translate.Import.prototype._entryFunctionSuffix = "Import";
2340
- Zotero.Translate.Import.prototype._io = false;
2341
-
2342
- Zotero.Translate.Import.prototype.Sandbox = Zotero.Translate.Sandbox._inheritFromBase(Zotero.Translate.Sandbox.Import);
2343
-
2344
- /**
2345
- * Sets string for translation and initializes string IO
2346
- */
2347
- Zotero.Translate.Import.prototype.setString = function(string) {
2348
- this._string = string;
2349
- this._io = false;
2350
- }
2351
-
2352
- /**
2353
- * Overload {@link Zotero.Translate.Base#complete} to close file
2354
- */
2355
- Zotero.Translate.Import.prototype.complete = function(returnValue, error) {
2356
- if(this._io) {
2357
- this._progress = null;
2358
- this._io.close(false);
2359
- }
2360
-
2361
- // call super
2362
- Zotero.Translate.Base.prototype.complete.apply(this, [returnValue, error]);
2363
- }
2364
-
2365
- /**
2366
- * Get all potential import translators, ordering translators with the right file extension first
2367
- */
2368
- Zotero.Translate.Import.prototype._getTranslatorsGetPotentialTranslators = async function () {
2369
- var translators = await (this.location
2370
- ? this._translatorProvider.getImportTranslatorsForLocation(this.location)
2371
- : this._translatorProvider.getAllForType(this.type));
2372
- return [translators];
2373
- }
2374
-
2375
- /**
2376
- * Overload {@link Zotero.Translate.Base#getTranslators} to return all translators immediately only
2377
- * if no string or location is set
2378
- */
2379
- Zotero.Translate.Import.prototype.getTranslators = function() {
2380
- if(!this._string && !this.location) {
2381
- if(this._currentState === "detect") throw new Error("getTranslators: detection is already running");
2382
- this._currentState = "detect";
2383
- var me = this;
2384
- return this._translatorProvider.getAllForType(this.type).
2385
- then(function(translators) {
2386
- me._potentialTranslators = [];
2387
- me._foundTranslators = translators;
2388
- me.complete(true);
2389
- return me._foundTranslators;
2390
- });
2391
- } else {
2392
- return Zotero.Translate.Base.prototype.getTranslators.call(this);
2393
- }
2394
- }
2395
-
2396
- /**
2397
- * Overload {@link Zotero.Translate.Base#_loadTranslator} to prepare translator IO
2398
- */
2399
- Zotero.Translate.Import.prototype._loadTranslator = function(translator) {
2400
- return Zotero.Translate.Base.prototype._loadTranslator.call(this, translator)
2401
- .then(function() {
2402
- return this._loadTranslatorPrepareIO(translator);
2403
- }.bind(this));
2404
- }
2405
-
2406
- /**
2407
- * Prepare translator IO
2408
- */
2409
- Zotero.Translate.Import.prototype._loadTranslatorPrepareIO = Zotero.Promise.method(function (translator) {
2410
- var configOptions = this._translatorInfo.configOptions;
2411
- var dataMode = configOptions ? configOptions["dataMode"] : "";
2412
-
2413
- if(!this._io) {
2414
- if(Zotero.Translate.IO.Read && this.location && this.location instanceof Components.interfaces.nsIFile) {
2415
- this._io = new Zotero.Translate.IO.Read(this.location, this._sandboxManager);
2416
- } else {
2417
- this._io = new Zotero.Translate.IO.String(this._string, this.path ? this.path : "", this._sandboxManager);
2418
- }
2419
- }
2420
-
2421
- this._io.init(dataMode);
2422
- this._sandboxManager.importObject(this._io);
2423
- });
2424
-
2425
- /**
2426
- * Prepare translation
2427
- */
2428
- Zotero.Translate.Import.prototype._prepareTranslation = Zotero.Promise.method(function () {
2429
- this._progress = undefined;
2430
-
2431
- var baseURI = null;
2432
- if(this.location) {
2433
- try {
2434
- baseURI = Components.classes["@mozilla.org/network/io-service;1"].
2435
- getService(Components.interfaces.nsIIOService).newFileURI(this.location);
2436
- } catch(e) {}
2437
- }
2438
-
2439
- this._itemSaver = new Zotero.Translate.ItemSaver({
2440
- libraryID: this._libraryID,
2441
- collections: this._collections,
2442
- forceTagType: this._forceTagType,
2443
- attachmentMode: Zotero.Translate.ItemSaver[(this._saveAttachments ? "ATTACHMENT_MODE_FILE" : "ATTACHMENT_MODE_IGNORE")],
2444
- linkFiles: this._linkFiles,
2445
- baseURI,
2446
- saveOptions: Object.assign(
2447
- {
2448
- skipSelect: true
2449
- },
2450
- this._saveOptions || {}
2451
- )
2452
- });
2453
- this.newItems = [];
2454
- this.newCollections = [];
2455
- });
2456
-
2457
- /**
2458
- * Return the progress of the import operation, or null if progress cannot be determined
2459
- */
2460
- Zotero.Translate.Import.prototype.getProgress = function() {
2461
- if(this._progress !== undefined) return this._progress;
2462
- if(Zotero.Translate.IO.rdfDataModes.indexOf(this._mode) !== -1 || this._mode === "xml/e4x" || this._mode == "xml/dom" || !this._io) {
2463
- return null;
2464
- }
2465
- return this._io.bytesRead/this._io.contentLength*100;
2466
- };
2467
-
2468
-
2469
- /**
2470
- * @class Export translation
2471
- */
2472
- Zotero.Translate.Export = function() {
2473
- this.init();
2474
- }
2475
- Zotero.Translate.Export.prototype = new Zotero.Translate.Base();
2476
- Zotero.Translate.Export.prototype.type = "export";
2477
- Zotero.Translate.Export.prototype._entryFunctionSuffix = "Export";
2478
- Zotero.Translate.Export.prototype.Sandbox = Zotero.Translate.Sandbox._inheritFromBase(Zotero.Translate.Sandbox.Export);
2479
-
2480
- /**
2481
- * Sets the items to be exported
2482
- * @param {Zotero.Item[]} items
2483
- */
2484
- Zotero.Translate.Export.prototype.setItems = function(items) {
2485
- this._export = {type: 'items', items: items};
2486
- }
2487
-
2488
- /**
2489
- * Sets the group to be exported (overrides setItems/setCollection)
2490
- * @param {Zotero.Group[]} group
2491
- */
2492
- Zotero.Translate.Export.prototype.setLibraryID = function(libraryID) {
2493
- this._export = {type: 'library', id: libraryID};
2494
- }
2495
-
2496
- /**
2497
- * Sets the collection to be exported (overrides setItems/setGroup)
2498
- * @param {Zotero.Collection[]} collection
2499
- */
2500
- Zotero.Translate.Export.prototype.setCollection = function(collection) {
2501
- this._export = {type: 'collection', collection: collection};
2502
- }
2503
-
2504
- /**
2505
- * Sets the translator to be used for export
2506
- *
2507
- * @param {Zotero.Translator|string} Translator object or ID. If this contains a displayOptions
2508
- * attribute, setDisplayOptions is automatically called with the specified value.
2509
- */
2510
- Zotero.Translate.Export.prototype.setTranslator = function(translator) {
2511
- if(typeof translator == "object" && translator.displayOptions) {
2512
- this._displayOptions = translator.displayOptions;
2513
- }
2514
- return Zotero.Translate.Base.prototype.setTranslator.apply(this, [translator]);
2515
- }
2516
-
2517
- /**
2518
- * Sets translator display options. you can also pass a translator (not ID) to
2519
- * setTranslator that includes a displayOptions argument
2520
- */
2521
- Zotero.Translate.Export.prototype.setDisplayOptions = function(displayOptions) {
2522
- this._displayOptions = displayOptions;
2523
- }
2524
-
2525
- /**
2526
- * Overload {@link Zotero.Translate.Base#complete} to close file and set complete
2527
- */
2528
- Zotero.Translate.Export.prototype.complete = function(returnValue, error) {
2529
- if(this._io) {
2530
- this._progress = null;
2531
- this._io.close(true);
2532
- if(this._io instanceof Zotero.Translate.IO.String) {
2533
- this.string = this._io.string;
2534
- }
2535
- }
2536
-
2537
- // call super
2538
- Zotero.Translate.Base.prototype.complete.apply(this, [returnValue, error]);
2539
- }
2540
-
2541
- /**
2542
- * Overload {@link Zotero.Translate.Base#getTranslators} to return all translators immediately
2543
- */
2544
- Zotero.Translate.Export.prototype.getTranslators = function() {
2545
- if(this._currentState === "detect") {
2546
- return Zotero.Promise.reject(new Error("getTranslators: detection is already running"));
2547
- }
2548
- var me = this;
2549
- return this._translatorProvider.getAllForType(this.type).then(function(translators) {
2550
- me._currentState = "detect";
2551
- me._foundTranslators = translators;
2552
- me._potentialTranslators = [];
2553
- me.complete(true);
2554
- return me._foundTranslators;
2555
- });
2556
- }
2557
-
2558
- /**
2559
- * Does the actual export, after code has been loaded and parsed
2560
- */
2561
- Zotero.Translate.Export.prototype._prepareTranslation = Zotero.Promise.method(function () {
2562
- this._progress = undefined;
2563
-
2564
- // initialize ItemGetter
2565
- this._itemGetter = new Zotero.Translate.ItemGetter();
2566
-
2567
- // Toggle legacy mode for translators pre-4.0.27
2568
- this._itemGetter.legacy = Zotero.Utilities.semverCompare('4.0.27', this._translatorInfo.minVersion) > 0;
2569
-
2570
- var configOptions = this._translatorInfo.configOptions || {},
2571
- getCollections = configOptions.getCollections || false;
2572
- var loadPromise = Zotero.Promise.resolve();
2573
- switch (this._export.type) {
2574
- case 'collection':
2575
- this._itemGetter.setCollection(this._export.collection, getCollections);
2576
- break;
2577
- case 'items':
2578
- this._itemGetter.setItems(this._export.items);
2579
- break;
2580
- case 'library':
2581
- loadPromise = this._itemGetter.setAll(this._export.id, getCollections);
2582
- break;
2583
- default:
2584
- throw new Error('No export set up');
2585
- break;
2586
- }
2587
- delete this._export;
2588
-
2589
- if (this.noWait) {
2590
- if (!loadPromise.isResolved()) {
2591
- throw new Error("Load promise is not resolved in noWait mode");
2592
- }
2593
- rest.apply(this, arguments);
2594
- } else {
2595
- return loadPromise.then(() => rest.apply(this, arguments))
2596
- }
2597
-
2598
- function rest() {
2599
- // export file data, if requested
2600
- if (this._displayOptions.exportFileData) {
2601
- this.location = this._itemGetter.exportFiles(
2602
- this.location,
2603
- this.translator[0].target,
2604
- {
2605
- includeAnnotations: this._displayOptions.includeAnnotations
2606
- }
2607
- );
2608
- }
2609
-
2610
- // initialize IO
2611
- // this is currently hackish since we pass null callbacks to the init function (they have
2612
- // callbacks to be consistent with import, but they are synchronous, so we ignore them)
2613
- if(!this.location) {
2614
- this._io = new Zotero.Translate.IO.String(null, this.path ? this.path : "", this._sandboxManager);
2615
- this._io.init(configOptions["dataMode"], function() {});
2616
- } else if(!Zotero.Translate.IO.Write) {
2617
- throw new Error("Writing to files is not supported in this build of Zotero.");
2618
- } else {
2619
- this._io = new Zotero.Translate.IO.Write(this.location);
2620
- this._io.init(configOptions["dataMode"],
2621
- this._displayOptions["exportCharset"] ? this._displayOptions["exportCharset"] : null,
2622
- function() {});
2623
-
2624
- // For the Note Markdown translator, replace the zotero:// URI scheme in the output if
2625
- // not the official Zotero app
2626
- if (this.translator.translatorID == '1412e9e2-51e1-42ec-aa35-e036a895534b'
2627
- && ZOTERO_CONFIG.ID != 'zotero') {
2628
- this._io.setDataProcessor((data) => {
2629
- return data.replace(/zotero:\/\//g, ZOTERO_CONFIG.ID + '://');
2630
- });
2631
- }
2632
- }
2633
-
2634
- this._sandboxManager.importObject(this._io);
2635
- }
2636
- });
2637
-
2638
- /**
2639
- * Overload Zotero.Translate.Base#translate to make sure that
2640
- * Zotero.Translate.Export#translate is not called without setting a
2641
- * translator first. Doesn't make sense to run detection for export.
2642
- */
2643
- Zotero.Translate.Export.prototype.translate = function() {
2644
- if(!this.translator || !this.translator.length) {
2645
- this.complete(false, new Error("Export translation initiated without setting a translator"));
2646
- } else {
2647
- return Zotero.Translate.Base.prototype.translate.apply(this, arguments);
2648
- }
2649
- };
2650
-
2651
- /**
2652
- * Return the progress of the import operation, or null if progress cannot be determined
2653
- */
2654
- Zotero.Translate.Export.prototype.getProgress = function() {
2655
- if(this._progress !== undefined) return this._progress;
2656
- if(!this._itemGetter) {
2657
- return null;
2658
- }
2659
- return (1-this._itemGetter.numItemsRemaining/this._itemGetter.numItems)*100;
2660
- };
2661
-
2662
- /**
2663
- * @class Search translation
2664
- * @property {Array[]} search Item (in {@link Zotero.Item#serialize} format) to extrapolate data
2665
- * (set with setSearch)
2666
- */
2667
- Zotero.Translate.Search = function() {
2668
- this.init();
2669
- };
2670
- Zotero.Translate.Search.prototype = new Zotero.Translate.Base();
2671
- Zotero.Translate.Search.prototype.type = "search";
2672
- Zotero.Translate.Search.prototype._entryFunctionSuffix = "Search";
2673
- Zotero.Translate.Search.prototype.Sandbox = Zotero.Translate.Sandbox._inheritFromBase(Zotero.Translate.Sandbox.Search);
2674
- Zotero.Translate.Search.prototype.ERROR_NO_RESULTS = "No items returned from any translator";
2675
-
2676
- /**
2677
- * @borrows Zotero.Translate.Web#setCookieSandbox
2678
- */
2679
- Zotero.Translate.Search.prototype.setCookieSandbox = Zotero.Translate.Web.prototype.setCookieSandbox;
2680
-
2681
- /**
2682
- * Sets the item to be used for searching
2683
- * @param {Object} item An item, with as many fields as desired, in the format returned by
2684
- * {@link Zotero.Item#serialize}
2685
- */
2686
- Zotero.Translate.Search.prototype.setSearch = function(search) {
2687
- this.search = search;
2688
- }
2689
-
2690
- /**
2691
- * Set an identifier to use for searching
2692
- *
2693
- * @param {Object} identifier - An object with 'DOI', 'ISBN', or 'PMID'
2694
- */
2695
- Zotero.Translate.Search.prototype.setIdentifier = function (identifier) {
2696
- var search;
2697
- if (identifier.DOI) {
2698
- search = {
2699
- itemType: "journalArticle",
2700
- DOI: identifier.DOI
2701
- };
2702
- }
2703
- else if (identifier.ISBN) {
2704
- search = {
2705
- itemType: "book",
2706
- ISBN: identifier.ISBN
2707
- };
2708
- }
2709
- else if (identifier.PMID) {
2710
- search = {
2711
- itemType: "journalArticle",
2712
- contextObject: "rft_id=info:pmid/" + identifier.PMID
2713
- };
2714
- }
2715
- else if (identifier.arXiv) {
2716
- search = {
2717
- itemType: "journalArticle",
2718
- arXiv: identifier.arXiv
2719
- };
2720
- }
2721
- else if (identifier.adsBibcode) {
2722
- search = {
2723
- itemType: "journalArticle",
2724
- adsBibcode: identifier.adsBibcode
2725
- };
2726
- }
2727
- else {
2728
- throw new Error("Unrecognized identifier");
2729
- }
2730
- this.setSearch(search);
2731
- }
2732
-
2733
- /**
2734
- * Overloads {@link Zotero.Translate.Base#getTranslators} to always return all potential translators
2735
- */
2736
- Zotero.Translate.Search.prototype.getTranslators = function() {
2737
- return Zotero.Translate.Base.prototype.getTranslators.call(this, true);
2738
- }
2739
-
2740
- /**
2741
- * Overload Zotero.Translate.Base#complete to move onto the next translator if
2742
- * translation fails
2743
- */
2744
- Zotero.Translate.Search.prototype.complete = function(returnValue, error) {
2745
- if(this._currentState == "translate"
2746
- && (!this.newItems || !this.newItems.length)
2747
- && !this._savingItems
2748
- //length is 0 only when translate was called without translators
2749
- && this.translator.length) {
2750
- Zotero.debug("Translate: Could not find a result using " + this.translator[0].label
2751
- + (this.translator.length > 1 ? " -- trying next translator" : ""), 3);
2752
- if(error) Zotero.debug(this._generateErrorString(error), 3);
2753
- if(this.translator.length > 1) {
2754
- this.translator.shift();
2755
- // reset async processes and propagate them to parent
2756
- if(this._parentTranslator && this._runningAsyncProcesses) {
2757
- this._parentTranslator.decrementAsyncProcesses("Zotero.Translate.Search#complete", this._runningAsyncProcesses);
2758
- }
2759
- this._runningAsyncProcesses = 0;
2760
- this.translate({
2761
- libraryID: this._libraryID,
2762
- saveAttachments: this._saveAttachments,
2763
- collections: this._collections
2764
- });
2765
- return;
2766
- } else {
2767
- Zotero.debug("No more translators to try");
2768
- error = this.ERROR_NO_RESULTS;
2769
- returnValue = false;
2770
- }
2771
- }
2772
-
2773
- // call super
2774
- Zotero.Translate.Base.prototype.complete.apply(this, [returnValue, error]);
2775
- }
2776
-
2777
- /**
2778
- * Pass search item to detect* and do* functions
2779
- */
2780
- Zotero.Translate.Search.prototype._getParameters = function() {
2781
- return [this.search];
2782
- };
2783
-
2784
- /**
2785
- * Extract sandbox location from translator target
2786
- */
2787
- Zotero.Translate.Search.prototype._getSandboxLocation = function() {
2788
- // generate sandbox for search by extracting domain from translator target
2789
- if(this.translator && this.translator[0] && this.translator[0].target) {
2790
- // so that web translators work too
2791
- const searchSandboxRe = /^http:\/\/[\w.]+\//;
2792
- var tempURL = this.translator[0].target.replace(/\\/g, "").replace(/\^/g, "");
2793
- var m = searchSandboxRe.exec(tempURL);
2794
- if(m) return m[0];
2795
- }
2796
- return Zotero.Translate.Base.prototype._getSandboxLocation.call(this);
2797
- }
2798
-
2799
- Zotero.Translate.Search.prototype._prepareTranslation = Zotero.Translate.Web.prototype._prepareTranslation;
2800
-
2801
- /**
2802
- * IO-related functions
2803
- * @namespace
2804
- */
2805
- Zotero.Translate.IO = {
2806
- /**
2807
- * Parses XML using DOMParser
2808
- */
2809
- "parseDOMXML":function(input, charset, size) {
2810
- try {
2811
- var dp = new DOMParser();
2812
- } catch(e) {
2813
- try {
2814
- var dp = Components.classes["@mozilla.org/xmlextras/domparser;1"]
2815
- .createInstance(Components.interfaces.nsIDOMParser);
2816
- } catch(e) {
2817
- throw new Error("DOMParser not supported");
2818
- }
2819
- }
2820
-
2821
- if(typeof input == "string") {
2822
- var nodes = dp.parseFromString(input, "text/xml");
2823
- } else {
2824
- var nodes = dp.parseFromStream(input, charset, size, "text/xml");
2825
- }
2826
-
2827
- if(nodes.getElementsByTagName("parsererror").length) {
2828
- throw new Error("DOMParser error: loading data into data store failed");
2829
- }
2830
-
2831
- if("normalize" in nodes) nodes.normalize();
2832
-
2833
- return nodes;
2834
- },
2835
-
2836
- /**
2837
- * Names of RDF data modes
2838
- */
2839
- "rdfDataModes":["rdf", "rdf/xml", "rdf/n3"]
2840
- };
2841
-
2842
- /******* String support *******/
2843
-
2844
- /**
2845
- * @class Translate backend for translating from a string
2846
- */
2847
- Zotero.Translate.IO.String = function(string, uri, sandboxManager) {
2848
- if(string && typeof string === "string") {
2849
- this.string = string;
2850
- } else {
2851
- this.string = "";
2852
- }
2853
- this.contentLength = this.string.length;
2854
- this.bytesRead = 0;
2855
- this._uri = uri;
2856
- this._sandboxManager = sandboxManager;
2857
- }
2858
-
2859
- Zotero.Translate.IO.String.prototype = {
2860
- "__exposedProps__":{
2861
- "RDF":"r",
2862
- "read":"r",
2863
- "write":"r",
2864
- "setCharacterSet":"r",
2865
- "getXML":"r"
2866
- },
2867
-
2868
- "_initRDF": function () {
2869
- Zotero.debug("Translate: Initializing RDF data store");
2870
- this._dataStore = new Zotero.RDF.AJAW.IndexedFormula();
2871
- this.RDF = new Zotero.Translate.IO._RDFSandbox(this._dataStore);
2872
-
2873
- if(this.contentLength) {
2874
- try {
2875
- var xml = Zotero.Translate.IO.parseDOMXML(this.string);
2876
- } catch(e) {
2877
- this._xmlInvalid = true;
2878
- throw e;
2879
- }
2880
- var parser = new Zotero.RDF.AJAW.RDFParser(this._dataStore);
2881
- parser.parse(xml, this._uri);
2882
- }
2883
- },
2884
-
2885
- "setCharacterSet":function(charset) {},
2886
-
2887
- "read":function(bytes) {
2888
- // if we are reading in RDF data mode and no string is set, serialize current RDF to the
2889
- // string
2890
- if(Zotero.Translate.IO.rdfDataModes.indexOf(this._mode) !== -1 && this.string === "") {
2891
- this.string = this.RDF.serialize();
2892
- }
2893
-
2894
- // return false if string has been read
2895
- if(this.bytesRead >= this.contentLength) {
2896
- return false;
2897
- }
2898
-
2899
- if(bytes !== undefined) {
2900
- if(this.bytesRead >= this.contentLength) return false;
2901
- var oldPointer = this.bytesRead;
2902
- this.bytesRead += bytes;
2903
- return this.string.substr(oldPointer, bytes);
2904
- } else {
2905
- // bytes not specified; read a line
2906
- var oldPointer = this.bytesRead;
2907
- var lfIndex = this.string.indexOf("\n", this.bytesRead);
2908
-
2909
- if(lfIndex !== -1) {
2910
- // in case we have a CRLF
2911
- this.bytesRead = lfIndex+1;
2912
- if(this.contentLength > lfIndex && this.string.substr(lfIndex-1, 1) === "\r") {
2913
- lfIndex--;
2914
- }
2915
- return this.string.substr(oldPointer, lfIndex-oldPointer);
2916
- }
2917
-
2918
- if(!this._noCR) {
2919
- var crIndex = this.string.indexOf("\r", this.bytesRead);
2920
- if(crIndex === -1) {
2921
- this._noCR = true;
2922
- } else {
2923
- this.bytesRead = crIndex+1;
2924
- return this.string.substr(oldPointer, crIndex-oldPointer-1);
2925
- }
2926
- }
2927
-
2928
- this.bytesRead = this.contentLength;
2929
- return this.string.substr(oldPointer);
2930
- }
2931
- },
2932
-
2933
- "write":function(data) {
2934
- this.string += data;
2935
- this.contentLength = this.string.length;
2936
- },
2937
-
2938
- "getXML":function() {
2939
- try {
2940
- var xml = Zotero.Translate.IO.parseDOMXML(this.string);
2941
- } catch(e) {
2942
- this._xmlInvalid = true;
2943
- throw e;
2944
- }
2945
- return xml;
2946
- },
2947
-
2948
- init: function (newMode) {
2949
- this.bytesRead = 0;
2950
- this._noCR = undefined;
2951
-
2952
- this._mode = newMode;
2953
- if(newMode === "xml/e4x") {
2954
- throw new Error("E4X is not supported");
2955
- } else if(newMode && (Zotero.Translate.IO.rdfDataModes.indexOf(newMode) !== -1
2956
- || newMode.substr(0, 3) === "xml/dom") && this._xmlInvalid) {
2957
- throw new Error("XML known invalid");
2958
- } else if(Zotero.Translate.IO.rdfDataModes.indexOf(this._mode) !== -1) {
2959
- this._initRDF();
2960
- }
2961
- },
2962
-
2963
- "close":function(serialize) {
2964
- // if we are writing in RDF data mode and no string is set, serialize current RDF to the
2965
- // string
2966
- if(serialize && Zotero.Translate.IO.rdfDataModes.indexOf(this._mode) !== -1 && this.string === "") {
2967
- this.string = this.RDF.serialize();
2968
- }
2969
- }
2970
- }
2971
-
2972
- /****** RDF DATA MODE ******/
2973
-
2974
- /**
2975
- * @class An API for handling RDF from the sandbox. This is exposed to translators as Zotero.RDF.
2976
- *
2977
- * @property {Zotero.RDF.AJAW.IndexedFormula} _dataStore
2978
- * @property {Integer[]} _containerCounts
2979
- * @param {Zotero.RDF.AJAW.IndexedFormula} dataStore
2980
- */
2981
- Zotero.Translate.IO._RDFSandbox = function(dataStore) {
2982
- this._dataStore = dataStore;
2983
- }
2984
-
2985
- Zotero.Translate.IO._RDFSandbox.prototype = {
2986
- "_containerCounts":[],
2987
- "__exposedProps__":{
2988
- "addStatement":"r",
2989
- "newResource":"r",
2990
- "newContainer":"r",
2991
- "addContainerElement":"r",
2992
- "getContainerElements":"r",
2993
- "addNamespace":"r",
2994
- "getAllResources":"r",
2995
- "getResourceURI":"r",
2996
- "getArcsIn":"r",
2997
- "getArcsOut":"r",
2998
- "getSources":"r",
2999
- "getTargets":"r",
3000
- "getStatementsMatching":"r",
3001
- "serialize":"r"
3002
- },
3003
-
3004
- /**
3005
- * Gets a resource as a Zotero.RDF.AJAW.Symbol, rather than a string
3006
- * @param {String|Zotero.RDF.AJAW.Symbol} about
3007
- * @return {Zotero.RDF.AJAW.Symbol}
3008
- */
3009
- "_getResource":function(about) {
3010
- return (typeof about == "object" ? about : new Zotero.RDF.AJAW.Symbol(about));
3011
- },
3012
-
3013
- /**
3014
- * Runs a callback to initialize this RDF store
3015
- */
3016
- "_init":function() {
3017
- if(this._prepFunction) {
3018
- this._dataStore = this._prepFunction();
3019
- delete this._prepFunction;
3020
- }
3021
- },
3022
-
3023
- /**
3024
- * Serializes the current RDF to a string
3025
- */
3026
- "serialize":function(dataMode) {
3027
- var serializer = Zotero.RDF.AJAW.Serializer(this._dataStore);
3028
-
3029
- for(var prefix in this._dataStore.namespaces) {
3030
- serializer.suggestPrefix(prefix, this._dataStore.namespaces[prefix]);
3031
- }
3032
-
3033
- // serialize in appropriate format
3034
- if(dataMode == "rdf/n3") {
3035
- return serializer.statementsToN3(this._dataStore.statements);
3036
- }
3037
-
3038
- return serializer.statementsToXML(this._dataStore.statements);
3039
- },
3040
-
3041
- /**
3042
- * Adds an RDF triple
3043
- * @param {String|Zotero.RDF.AJAW.Symbol} about
3044
- * @param {String|Zotero.RDF.AJAW.Symbol} relation
3045
- * @param {String|Zotero.RDF.AJAW.Symbol} value
3046
- * @param {Boolean} literal Whether value should be treated as a literal (true) or a resource
3047
- * (false)
3048
- */
3049
- "addStatement":function(about, relation, value, literal) {
3050
- if(about === null || about === undefined) {
3051
- throw new Error("about must be defined in Zotero.RDF.addStatement");
3052
- }
3053
- if(relation === null || relation === undefined) {
3054
- throw new Error("relation must be defined in Zotero.RDF.addStatement");
3055
- }
3056
- if(value === null || value === undefined) {
3057
- throw new Error("value must be defined in Zotero.RDF.addStatement");
3058
- }
3059
-
3060
- if(literal) {
3061
- // zap chars that Mozilla will mangle
3062
- value = value.toString().replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, '');
3063
- } else {
3064
- value = this._getResource(value);
3065
- }
3066
-
3067
- this._dataStore.add(this._getResource(about), this._getResource(relation), value);
3068
- },
3069
-
3070
- /**
3071
- * Creates a new anonymous resource
3072
- * @return {Zotero.RDF.AJAW.Symbol}
3073
- */
3074
- "newResource":function() {
3075
- return new Zotero.RDF.AJAW.BlankNode();
3076
- },
3077
-
3078
- /**
3079
- * Creates a new container resource
3080
- * @param {String} type The type of the container ("bag", "seq", or "alt")
3081
- * @param {String|Zotero.RDF.AJAW.Symbol} about The URI of the resource
3082
- * @return {Zotero.Translate.RDF.prototype.newContainer
3083
- */
3084
- "newContainer":function(type, about) {
3085
- const rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
3086
- const containerTypes = {"bag":"Bag", "seq":"Seq", "alt":"Alt"};
3087
-
3088
- type = type.toLowerCase();
3089
- if(!containerTypes[type]) {
3090
- throw new Error("Invalid container type in Zotero.RDF.newContainer");
3091
- }
3092
-
3093
- var about = this._getResource(about);
3094
- this.addStatement(about, rdf+"type", rdf+containerTypes[type], false);
3095
- this._containerCounts[about.toNT()] = 1;
3096
-
3097
- return about;
3098
- },
3099
-
3100
- /**
3101
- * Adds a new element to a container
3102
- * @param {String|Zotero.RDF.AJAW.Symbol} about The container
3103
- * @param {String|Zotero.RDF.AJAW.Symbol} element The element to add to the container
3104
- * @param {Boolean} literal Whether element should be treated as a literal (true) or a resource
3105
- * (false)
3106
- */
3107
- "addContainerElement":function(about, element, literal) {
3108
- const rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
3109
-
3110
- var about = this._getResource(about);
3111
- this._dataStore.add(about, new Zotero.RDF.AJAW.Symbol(rdf+"_"+(this._containerCounts[about.toNT()]++)), element, literal);
3112
- },
3113
-
3114
- /**
3115
- * Gets all elements within a container
3116
- * @param {String|Zotero.RDF.AJAW.Symbol} about The container
3117
- * @return {Zotero.RDF.AJAW.Symbol[]}
3118
- */
3119
- "getContainerElements":function(about) {
3120
- const liPrefix = "http://www.w3.org/1999/02/22-rdf-syntax-ns#_";
3121
-
3122
- var about = this._getResource(about);
3123
- var statements = this._dataStore.statementsMatching(about);
3124
- var containerElements = [];
3125
-
3126
- // loop over arcs out looking for list items
3127
- for(var i=0; i<statements.length; i++) {
3128
- var statement = statements[i];
3129
- if(statement.predicate.uri.substr(0, liPrefix.length) == liPrefix) {
3130
- var number = statement.predicate.uri.substr(liPrefix.length);
3131
-
3132
- // make sure these are actually numeric list items
3133
- var intNumber = parseInt(number);
3134
- if(number == intNumber.toString()) {
3135
- // add to element array
3136
- containerElements[intNumber-1] = (statement.object.termType == "literal" ? statement.object.toString() : statement.object);
3137
- }
3138
- }
3139
- }
3140
-
3141
- return containerElements;
3142
- },
3143
-
3144
- /**
3145
- * Adds a namespace for a specific URI
3146
- * @param {String} prefix Namespace prefix
3147
- * @param {String} uri Namespace URI
3148
- */
3149
- "addNamespace":function(prefix, uri) {
3150
- this._dataStore.setPrefixForURI(prefix, uri);
3151
- },
3152
-
3153
- /**
3154
- * Gets the URI a specific resource
3155
- * @param {String|Zotero.RDF.AJAW.Symbol} resource
3156
- * @return {String}
3157
- */
3158
- "getResourceURI":function(resource) {
3159
- if(typeof(resource) == "string") return resource;
3160
-
3161
- if (resource.uri) return resource.uri;
3162
-
3163
- const rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
3164
- var values = this.getStatementsMatching(resource, rdf + 'value');
3165
- if (values && values.length) {
3166
- return values[0][2];
3167
- }
3168
-
3169
- if(resource.toNT == undefined) throw new Error("Zotero.RDF: getResourceURI called on invalid resource");
3170
- return resource.toNT();
3171
- },
3172
-
3173
- /**
3174
- * Gets all resources in the RDF data store
3175
- * @return {Zotero.RDF.AJAW.Symbol[]}
3176
- */
3177
- "getAllResources":function() {
3178
- var returnArray = [];
3179
- for(var i in this._dataStore.subjectIndex) {
3180
- returnArray.push(this._dataStore.subjectIndex[i][0].subject);
3181
- }
3182
- return returnArray;
3183
- },
3184
-
3185
- /**
3186
- * Gets all arcs (predicates) into a resource
3187
- * @return {Zotero.RDF.AJAW.Symbol[]}
3188
- * @deprecated Since 2.1. Use {@link Zotero.Translate.IO["rdf"]._RDFBase#getStatementsMatching}
3189
- */
3190
- "getArcsIn":function(resource) {
3191
- var statements = this._dataStore.objectIndex[this._dataStore.canon(this._getResource(resource))];
3192
- if(!statements) return false;
3193
-
3194
- var returnArray = [];
3195
- for(var i=0; i<statements.length; i++) {
3196
- returnArray.push(statements[i].predicate.uri);
3197
- }
3198
- return returnArray;
3199
- },
3200
-
3201
- /**
3202
- * Gets all arcs (predicates) out of a resource
3203
- * @return {Zotero.RDF.AJAW.Symbol[]}
3204
- * @deprecated Since 2.1. Use {@link Zotero.Translate.IO["rdf"]._RDFBase#getStatementsMatching}
3205
- */
3206
- "getArcsOut":function(resource) {
3207
- var statements = this._dataStore.subjectIndex[this._dataStore.canon(this._getResource(resource))];
3208
- if(!statements) return false;
3209
-
3210
- var returnArray = [];
3211
- for(var i=0; i<statements.length; i++) {
3212
- returnArray.push(statements[i].predicate.uri);
3213
- }
3214
- return returnArray;
3215
- },
3216
-
3217
- /**
3218
- * Gets all subjects whose predicates point to a resource
3219
- * @param {String|Zotero.RDF.AJAW.Symbol} resource Subject that predicates should point to
3220
- * @param {String|Zotero.RDF.AJAW.Symbol} property Predicate
3221
- * @return {Zotero.RDF.AJAW.Symbol[]}
3222
- * @deprecated Since 2.1. Use {@link Zotero.Translate.IO["rdf"]._RDFBase#getStatementsMatching}
3223
- */
3224
- "getSources":function(resource, property) {
3225
- var statements = this._dataStore.statementsMatching(undefined, this._getResource(property), this._getResource(resource));
3226
- if(!statements.length) return false;
3227
-
3228
- var returnArray = [];
3229
- for(var i=0; i<statements.length; i++) {
3230
- returnArray.push(statements[i].subject);
3231
- }
3232
- return returnArray;
3233
- },
3234
-
3235
- /**
3236
- * Gets all objects of a given subject with a given predicate
3237
- * @param {String|Zotero.RDF.AJAW.Symbol} resource Subject
3238
- * @param {String|Zotero.RDF.AJAW.Symbol} property Predicate
3239
- * @return {Zotero.RDF.AJAW.Symbol[]}
3240
- * @deprecated Since 2.1. Use {@link Zotero.Translate.IO["rdf"]._RDFBase#getStatementsMatching}
3241
- */
3242
- "getTargets":function(resource, property) {
3243
- var statements = this._dataStore.statementsMatching(this._getResource(resource), this._getResource(property));
3244
- if(!statements.length) return false;
3245
-
3246
- var returnArray = [];
3247
- for(var i=0; i<statements.length; i++) {
3248
- returnArray.push(statements[i].object.termType == "literal" ? statements[i].object.toString() : statements[i].object);
3249
- }
3250
- return returnArray;
3251
- },
3252
-
3253
- /**
3254
- * Gets statements matching a certain pattern
3255
- *
3256
- * @param {String|Zotero.RDF.AJAW.Symbol} subj Subject
3257
- * @param {String|Zotero.RDF.AJAW.Symbol} predicate Predicate
3258
- * @param {String|Zotero.RDF.AJAW.Symbol} obj Object
3259
- * @param {Boolean} objLiteral Whether the object is a literal (as
3260
- * opposed to a URI)
3261
- * @param {Boolean} justOne Whether to stop when a single result is
3262
- * retrieved
3263
- */
3264
- "getStatementsMatching":function(subj, pred, obj, objLiteral, justOne) {
3265
- var statements = this._dataStore.statementsMatching(
3266
- (subj ? this._getResource(subj) : undefined),
3267
- (pred ? this._getResource(pred) : undefined),
3268
- (obj ? (objLiteral ? objLiteral : this._getResource(obj)) : undefined),
3269
- undefined, justOne);
3270
- if(!statements.length) return false;
3271
-
3272
-
3273
- var returnArray = [];
3274
- for(var i=0; i<statements.length; i++) {
3275
- returnArray.push([statements[i].subject, statements[i].predicate, (statements[i].object.termType == "literal" ? statements[i].object.toString() : statements[i].object)]);
3276
- }
3277
- return returnArray;
3278
- }
3279
- };
3280
-
3281
- if (typeof process === 'object' && process + '' === '[object process]'){
3282
- module.exports = Zotero.Translate;
3283
- }