/*!
 * PSPDFKit for Web 2019.2.0 (https://pspdfkit.com/web)
 * 
 * Copyright (c) 2016-2019 PSPDFKit GmbH. All rights reserved.
 * 
 * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
 * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
 * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
 * This notice may not be removed from this file.
 * 
 * PSPDFKit uses several open source third-party components: https://pspdfkit.com/acknowledgements/web/
 */
(window.__PSPDFKitChunk=window.__PSPDFKitChunk||[]).push([[6],{801:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return k});var s,i=n(16),a=n.n(i),r=n(22),o=n.n(r),c=n(27),h=n.n(c),u=n(5),d=n.n(u),f=n(10),l=n.n(f),p=n(8),m=n.n(p),b=n(7),w=n.n(b),g=n(9),y=n.n(g),_=n(126),P=n(6),D=n(4),k=function(t){function e(t){if(d()(this,e),t.baseUrl=t.baseUrl||Object(_.a)(window.document),"string"!=typeof t.pdf)throw new D.a('pdf must be a path to a pdf, not "'+h()(t.pdf)+'"');if("string"!=typeof t.licenseKey)throw new D.a("licenseKey must be set to a string value. Please obtain yours from https://customers.pspdfkit.com.");if(s&&s!==t.licenseKey)throw new D.a("Trying to re-use PSPDFKit for Web with a different licenseKey than the previous one.\nUnfortunately we only allow one licenseKey per instance.\nPlease contact support for further assistance.");return m()(this,w()(e).call(this,t))}return y()(e,t),l()(e,[{key:"load",value:function(){var t=o()(a.a.mark(function t(e){var n,i,r,o,c;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return Object(D.h)("string"==typeof this._state.pdf,"pdf must be a string containing a path"),t.next=3,this.client.load(this._state.baseURL,this._state.licenseKey,{mainThreadOrigin:window.location.origin,disableWebAssembly:this._state.disableWebAssembly,disableWebAssemblyStreaming:this._state.disableWebAssemblyStreaming,disableIndexedDBCaching:this._state.disableIndexedDBCaching,enableAutomaticLinkExtraction:this._state.enableAutomaticLinkExtraction,overrideMemoryLimit:null});case 3:return n=t.sent,i=n.features,this._state=this._state.set("features",Object(P.a)(i)),s=this._state.licenseKey,t.next=9,this.client.openDocumentAt(this._state.pdf,e);case 9:if(r=t.sent,!(this._instantJSON&&this._instantJSON.pdfId&&r.ID.permanent)){t.next=17;break}if(o=this._instantJSON.pdfId,c=r.ID,o.permanent===c.permanent){t.next=15;break}throw new D.a("Could not instantiate from Instant JSON: Permanent PDF ID mismatch.\nPlease use the same PDF document that was used to create this Instant JSON.\n\nFor more information, please visit: https://pspdfkit.com/guides/web/current/importing-exporting/instant-json/");case 15:if(o.changing===c.changing){t.next=17;break}throw new D.a("Could not instantiate from Instant JSON: Changing PDF ID mismatch.\nPlease use the same revision of this PDF document that was used to create this Instant JSON.\n\nFor more information, please visit: https://pspdfkit.com/guides/web/current/importing-exporting/instant-json/");case 17:return this._state=this._state.set("documentResponse",r),t.abrupt("return",{features:i,hasPassword:!1});case 19:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}]),e}(n(792).b)}}]);