/** * @licstart The following is the entire license notice for the * JavaScript code in this page * * Copyright 2022 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @licend The above is the entire license notice for the * JavaScript code in this page */(()=>{"use strict";var e,t,i,n,a,s=[,(e,t)=>{function i(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function n(e,t){t=s(e,t,"get");return t.get?t.get.call(e):t.value}function a(e,t,i){t=s(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function s(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}Object.defineProperty(t,"__esModule",{value:!0}),t.animationStarted=t.VERTICAL_PADDING=t.UNKNOWN_SCALE=t.TextLayerMode=t.SpreadMode=t.SidebarView=t.ScrollMode=t.SCROLLBAR_PADDING=t.RenderingStates=t.RendererType=t.ProgressBar=t.PresentationModeState=t.OutputScale=t.MIN_SCALE=t.MAX_SCALE=t.MAX_AUTO_SCALE=t.DEFAULT_SCALE_VALUE=t.DEFAULT_SCALE_DELTA=t.DEFAULT_SCALE=t.AutoPrintRegExp=void 0,t.apiPageLayoutToViewerModes=function(e){let t=o.VERTICAL,i=l.NONE;switch(e){case"SinglePage":t=o.PAGE;break;case"OneColumn":break;case"TwoPageLeft":t=o.PAGE;case"TwoColumnLeft":i=l.ODD;break;case"TwoPageRight":t=o.PAGE;case"TwoColumnRight":i=l.EVEN}return{scrollMode:t,spreadMode:i}},t.apiPageModeToSidebarView=function(e){switch(e){case"UseNone":return r.NONE;case"UseThumbs":return r.THUMBS;case"UseOutlines":return r.OUTLINE;case"UseAttachments":return r.ATTACHMENTS;case"UseOC":return r.LAYERS}return r.NONE},t.approximateFraction=function(e){if(Math.floor(e)===e)return[e,1];var t=1/e;{if(8l}:function(e){return(e=e.div).offsetTop+e.clientTop+e.clientHeight>r});0g)break;y<=r||o<=w||b<=l||v>=h||(y=Math.max(0,r-w)+Math.max(0,y-o),b=Math.max(0,l-v)+Math.max(0,b-h),d.push({id:f.id,x:v,y:w,view:f,percent:(m-y)/m*(v=(_-b)/_)*100|0,widthPercent:100*v|0}),c.add(f.id))}var e=d[0],P=d.at(-1);n&&d.sort(function(e,t){var i=e.percent-t.percent;return.001>1;t(e[a])?n=a:i=1+a}return i}function S(n,a,e){if(!(n<2)){let t=a[n].div,i=t.offsetTop+t.clientTop;i>=e&&(t=a[n-1].div,i=t.offsetTop+t.clientTop);for(let e=n-2;0<=e&&!((t=a[e].div).offsetTop+t.clientTop+t.clientHeight<=i);--e)n=e}return n}function c(e){let t=Math.hypot(e.deltaX,e.deltaY);e=Math.atan2(e.deltaY,e.deltaX);return t=-.25*Math.PI{Object.defineProperty(t,"__esModule",{value:!0}),t.compatibilityParams=t.OptionKind=t.AppOptions=void 0;const r=Object.create(null);t.compatibilityParams=r;{var i=navigator.userAgent||"",n=navigator.platform||"",a=navigator.maxTouchPoints||1;const s=/Android/.test(i),d=/\b(iPad|iPhone|iPod)(?=;)/.test(i)||"MacIntel"===n&&1{Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=t.LinkTarget=void 0;var o=i(1);function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,i){if(e!==t)throw new TypeError("Private static access of wrong provenance");return i}function s(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}function n(e,t){t=function(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}(e,t,"get");return t.get?t.get.call(e):t.value}const r={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function a(e,t){var{url:t,target:i,rel:n,enabled:a=!0}=1!1);let s="";switch(i){case r.NONE:break;case r.SELF:s="_self";break;case r.BLANK:s="_blank";break;case r.PARENT:s="_parent";break;case r.TOP:s="_top"}e.target=s,e.rel="string"==typeof n?n:"noopener noreferrer nofollow"}t.LinkTarget=r;var d=new WeakMap,c=new WeakSet;function u(t){let i=1{this.cachePageRef(e+1,a),s(this,c,u).call(this,t,i,n)}).catch(()=>{console.error(`PDFLinkService.#goToDestinationHelper: "${a}" is not `+`a valid page reference, for dest="${t}".`)})}else{if(!Number.isInteger(a))return void console.error(`PDFLinkService.#goToDestinationHelper: "${a}" is not `+`a valid destination reference, for dest="${t}".`);e=a+1}!e||e<1||e>this.pagesCount?console.error(`PDFLinkService.#goToDestinationHelper: "${e}" is not `+`a valid page number, for dest="${t}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:i,explicitDest:n,pageNumber:e})),this.pdfViewer.scrollPageIntoView({pageNumber:e,destArray:n,ignoreDestinationZoom:this._ignoreDestinationZoom}))}function p(t){if(!Array.isArray(t))return!1;var i=t.length;if(i<2)return!1;var e=t[0];if(!("object"==typeof e&&Number.isInteger(e.num)&&Number.isInteger(e.gen)||Number.isInteger(e)&&0<=e))return!1;e=t[1];if("object"!=typeof e||"string"!=typeof e.name)return!1;let n=!0;switch(e.name){case"XYZ":if(5!==i)return!1;break;case"Fit":case"FitB":return 2===i;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==i)return!1;break;case"FitR":if(6!==i)return!1;n=!1;break;default:return!1}for(let e=2;e{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFViewerApplication=e.PDFPrintServiceFactory=e.DefaultExternalServices=void 0;var g=t(1),u=t(5),f=t(2),p=t(6),m=t(7),v=t(3),V=t(9),F=t(10),R=t(12),W=t(13),U=t(15),H=t(16),z=t(17),j=t(19),G=t(20),K=t(21),$=t(22),X=t(23),Z=t(24),Q=t(25),q=t(26),Y=t(27),J=t(29),ee=t(39),te=t(40),ie=t(41);const ne=1e3,w={UNKNOWN:-1,PREVIOUS:0,INITIAL:1},l={AUTOMATIC:0,LIGHT:1,DARK:2},ae=["1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","2.0","2.1","2.2","2.3"],se=["acrobat distiller","acrobat pdfwriter","adobe livecycle","adobe pdf library","adobe photoshop","ghostscript","tcpdf","cairo","dvipdfm","dvips","pdftex","pdfkit","itext","prince","quarkxpress","mac os x","microsoft","openoffice","oracle","luradocument","pdf-xchange","antenna house","aspose.cells","fpdf"];class i{constructor(){throw new Error("Cannot initialize DefaultExternalServices.")}static updateFindControlState(e){}static updateFindMatchesCount(e){}static initPassiveLoading(e){}static reportTelemetry(e){}static createDownloadManager(e){throw new Error("Not implemented: createDownloadManager")}static createPreferences(){throw new Error("Not implemented: createPreferences")}static createL10n(e){throw new Error("Not implemented: createL10n")}static createScripting(e){throw new Error("Not implemented: createScripting")}static get supportsIntegratedFind(){return(0,u.shadow)(this,"supportsIntegratedFind",!1)}static get supportsDocumentFonts(){return(0,u.shadow)(this,"supportsDocumentFonts",!0)}static get supportedMouseWheelZoomModifierKeys(){return(0,u.shadow)(this,"supportedMouseWheelZoomModifierKeys",{ctrlKey:!0,metaKey:!0})}static get isInAutomation(){return(0,u.shadow)(this,"isInAutomation",!1)}static updateEditorStates(e){throw new Error("Not implemented: updateEditorStates")}}e.DefaultExternalServices=i;const d={initialBookmark:document.location.hash.substring(1),_initializedCapability:(0,u.createPromiseCapability)(),appConfig:null,pdfDocument:null,pdfLoadingTask:null,printService:null,pdfViewer:null,pdfThumbnailViewer:null,pdfRenderingQueue:null,pdfPresentationMode:null,pdfDocumentProperties:null,pdfLinkService:null,pdfHistory:null,pdfSidebar:null,pdfSidebarResizer:null,pdfOutlineViewer:null,pdfAttachmentViewer:null,pdfLayerViewer:null,pdfCursorTools:null,pdfScriptingManager:null,store:null,downloadManager:null,overlayManager:null,preferences:null,toolbar:null,secondaryToolbar:null,eventBus:null,l10n:null,annotationEditorParams:null,isInitialViewSet:!1,downloadComplete:!1,isViewerEmbedded:window.parent!==window,url:"",baseUrl:"",_downloadUrl:"",externalServices:i,_boundEvents:Object.create(null),documentInfo:null,metadata:null,_contentDispositionFilename:null,_contentLength:null,_saveInProgress:!1,_docStats:null,_wheelUnusedTicks:0,_PDFBug:null,_hasAnnotationEditors:!1,_title:document.title,_printAnnotationStoragePromise:null,async initialize(e){this.preferences=this.externalServices.createPreferences(),this.appConfig=e,await this._readPreferences(),await this._parseHashParameters(),this._forceCssTheme(),await this._initializeL10n(),this.isViewerEmbedded&&f.AppOptions.get("externalLinkTarget")===v.LinkTarget.NONE&&f.AppOptions.set("externalLinkTarget",v.LinkTarget.TOP),await this._initializeViewerComponents(),this.bindEvents(),this.bindWindowEvents();e=e.appContainer||document.documentElement;this.l10n.translate(e).then(()=>{this.eventBus.dispatch("localized",{source:this})}),this._initializedCapability.resolve()},async _readPreferences(){if(!f.AppOptions.get("disablePreferences")){f.AppOptions._hasUserOptions()&&console.warn('_readPreferences: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.');try{f.AppOptions.setAll(await this.preferences.getAll())}catch(e){console.error(`_readPreferences: "${null==e?void 0:e.message}".`)}}},async _parseHashParameters(){if(f.AppOptions.get("pdfBugEnabled")){var e=document.location.hash.substring(1);if(e){var{mainContainer:t,viewerContainer:i}=this.appConfig,n=(0,g.parseQueryString)(e);if("true"===n.get("disableworker"))try{u.GlobalWorkerOptions.workerSrc||(u.GlobalWorkerOptions.workerSrc=f.AppOptions.get("workerSrc")),await(0,u.loadScript)(u.PDFWorker.workerSrc)}catch(e){console.error(`_parseHashParameters: "${e.message}".`)}if(n.has("disablerange")&&f.AppOptions.set("disableRange","true"===n.get("disablerange")),n.has("disablestream")&&f.AppOptions.set("disableStream","true"===n.get("disablestream")),n.has("disableautofetch")&&f.AppOptions.set("disableAutoFetch","true"===n.get("disableautofetch")),n.has("disablefontface")&&f.AppOptions.set("disableFontFace","true"===n.get("disablefontface")),n.has("disablehistory")&&f.AppOptions.set("disableHistory","true"===n.get("disablehistory")),n.has("verbosity")&&f.AppOptions.set("verbosity",0|n.get("verbosity")),n.has("textlayer"))switch(n.get("textlayer")){case"off":f.AppOptions.set("textLayerMode",g.TextLayerMode.DISABLE);break;case"visible":case"shadow":case"hover":i.classList.add("textLayer-"+n.get("textlayer"));try{await a(this),this._PDFBug.loadCSS()}catch(e){console.error(`_parseHashParameters: "${e.message}".`)}}if(n.has("pdfbug")){f.AppOptions.set("pdfBug",!0),f.AppOptions.set("fontExtraProperties",!0);e=n.get("pdfbug").split(",");try{await a(this),this._PDFBug.init({OPS:u.OPS},t,e)}catch(e){console.error(`_parseHashParameters: "${e.message}".`)}}n.has("locale")&&f.AppOptions.set("locale",n.get("locale"))}}},async _initializeL10n(){this.l10n=this.externalServices.createL10n({locale:f.AppOptions.get("locale")});var e=await this.l10n.getDirection();document.getElementsByTagName("html")[0].dir=e},_forceCssTheme(){var i=f.AppOptions.get("viewerCssTheme");if(i!==l.AUTOMATIC&&Object.values(l).includes(i))try{var n=document.styleSheets[0],a=(null==n?void 0:n.cssRules)||[];for(let e=0,t=a.length;ethis._docFilename),this.pdfCursorTools=new m.PDFCursorTools({container:o,eventBus:i,cursorToolOnLoad:f.AppOptions.get("cursorToolOnLoad")}),this.toolbar=new te.Toolbar(e.toolbar,i,this.l10n),this.secondaryToolbar=new ee.SecondaryToolbar(e.secondaryToolbar,i,this.externalServices),this.supportsFullscreen&&(this.pdfPresentationMode=new $.PDFPresentationMode({container:o,pdfViewer:this.pdfViewer,eventBus:i})),this.passwordPrompt=new R.PasswordPrompt(e.passwordOverlay,this.overlayManager,this.l10n,this.isViewerEmbedded),this.pdfOutlineViewer=new K.PDFOutlineViewer({container:e.sidebar.outlineView,eventBus:i,linkService:a,downloadManager:s}),this.pdfAttachmentViewer=new W.PDFAttachmentViewer({container:e.sidebar.attachmentsView,eventBus:i,downloadManager:s}),this.pdfLayerViewer=new G.PDFLayerViewer({container:e.sidebar.layersView,eventBus:i,l10n:this.l10n}),this.pdfSidebar=new Q.PDFSidebar({elements:e.sidebar,pdfViewer:this.pdfViewer,pdfThumbnailViewer:this.pdfThumbnailViewer,eventBus:i,l10n:this.l10n}),this.pdfSidebar.onToggled=this.forceRendering.bind(this),this.pdfSidebarResizer=new q.PDFSidebarResizer(e.sidebarResizer,i,this.l10n)},run(e){this.initialize(e).then(le)},get initialized(){return this._initializedCapability.settled},get initializedPromise(){return this._initializedCapability.promise},zoomIn(e){this.pdfViewer.isInPresentationMode||this.pdfViewer.increaseScale(e)},zoomOut(e){this.pdfViewer.isInPresentationMode||this.pdfViewer.decreaseScale(e)},zoomReset(){this.pdfViewer.isInPresentationMode||(this.pdfViewer.currentScaleValue=g.DEFAULT_SCALE_VALUE)},get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0},get page(){return this.pdfViewer.currentPageNumber},set page(e){this.pdfViewer.currentPageNumber=e},get supportsPrinting(){return B.instance.supportsPrinting},get supportsFullscreen(){return(0,u.shadow)(this,"supportsFullscreen",document.fullscreenEnabled)},get supportsIntegratedFind(){return this.externalServices.supportsIntegratedFind},get supportsDocumentFonts(){return this.externalServices.supportsDocumentFonts},get loadingBar(){var e=new g.ProgressBar("loadingBar");return(0,u.shadow)(this,"loadingBar",e)},get supportedMouseWheelZoomModifierKeys(){return this.externalServices.supportedMouseWheelZoomModifierKeys},initPassiveLoading(){throw new Error("Not implemented: initPassiveLoading")},setTitleUsingUrl(){var t=0{this.pdfLinkService.externalLinkEnabled=!1,this.passwordPrompt.setUpdateCallback(e,t),this.passwordPrompt.open()},r.onProgress=e=>{var{loaded:e,total:t}=e;this.progress(e/t)},r.onUnsupportedFeature=this.fallback.bind(this),r.promise.then(e=>{this.load(e)},t=>{if(r===this.pdfLoadingTask){let e="loading_error";return t instanceof u.InvalidPDFException?e="invalid_file_error":t instanceof u.MissingPDFException?e="missing_file_error":t instanceof u.UnexpectedResponseException&&(e="unexpected_response_error"),this.l10n.get(e).then(e=>{throw this._documentError(e,{message:null==t?void 0:t.message}),t})}})},_ensureDownloadComplete(){if(!this.pdfDocument||!this.downloadComplete)throw new Error("PDF document not downloaded.")},async download(){var t=this._downloadUrl,i=this._docFilename;try{this._ensureDownloadComplete();var e=await this.pdfDocument.getData(),n=new Blob([e],{type:"application/pdf"});await this.downloadManager.download(n,t,i)}catch(e){await this.downloadManager.downloadUrl(t,i)}},async save(){if(!this._saveInProgress){this._saveInProgress=!0,await this.pdfScriptingManager.dispatchWillSave();var e=this._downloadUrl,t=this._docFilename;try{this._ensureDownloadComplete();var i=await this.pdfDocument.saveDocument(),n=new Blob([i],{type:"application/pdf"});await this.downloadManager.download(n,e,t)}catch(e){console.error("Error when saving the document: "+e.message),await this.download()}finally{await this.pdfScriptingManager.dispatchDidSave(),this._saveInProgress=!1}this._hasAnnotationEditors&&this.externalServices.reportTelemetry({type:"editing",data:{type:"save"}})}},downloadOrSave(){var e;0<(null==(e=this.pdfDocument)?void 0:e.annotationStorage.size)?this.save():this.download()},fallback(e){this.externalServices.reportTelemetry({type:"unsupportedFeature",featureId:e})},_documentError(e){var t=1{this.loadingBar.hide(),this.disableAutoFetchLoadingBarTimeout=null},5e3)))},load(c){(this.pdfDocument=c).getDownloadInfo().then(e=>{e=e.length;this._contentLength=e,this.downloadComplete=!0,this.loadingBar.hide(),a.then(()=>{this.eventBus.dispatch("documentloaded",{source:this})})});const t=c.getPageLayout().catch(function(){}),i=c.getPageMode().catch(function(){}),n=c.getOpenAction().catch(function(){});this.toolbar.setPagesCount(c.numPages,!1),this.secondaryToolbar.setPagesCount(c.numPages),this.pdfLinkService.setDocument(c,null),this.pdfDocumentProperties.setDocument(c);const u=this.pdfViewer,{firstPagePromise:a,onePageRendered:e,pagesPromise:p}=(u.setDocument(c),u),s=(this.pdfThumbnailViewer.setDocument(c),(this.store=new ie.ViewHistory(c.fingerprints[0])).getMultiple({page:null,zoom:g.DEFAULT_SCALE_VALUE,scrollLeft:"0",scrollTop:"0",rotation:null,sidebarView:g.SidebarView.UNKNOWN,scrollMode:g.ScrollMode.UNKNOWN,spreadMode:g.SpreadMode.UNKNOWN}).catch(()=>Object.create(null)));a.then(e=>{this.loadingBar.setWidth(this.appConfig.viewerContainer),this._initializeAnnotationStorageCallbacks(c),Promise.all([g.animationStarted,s,t,i,n]).then(async e=>{var[,e,t,i,n]=e,a=f.AppOptions.get("viewOnLoad"),n=(this._initializePdfHistory({fingerprint:c.fingerprints[0],viewOnLoad:a,initialDest:null==n?void 0:n.dest}),this.initialBookmark),s=f.AppOptions.get("defaultZoomValue");let r=s?"zoom="+s:null,o=null,l=f.AppOptions.get("sidebarViewOnLoad"),h=f.AppOptions.get("scrollModeOnLoad"),d=f.AppOptions.get("spreadModeOnLoad");e.page&&a!==w.INITIAL&&(r=`page=${e.page}&zoom=${s||e.zoom},`+e.scrollLeft+","+e.scrollTop,o=parseInt(e.rotation,10),l===g.SidebarView.UNKNOWN&&(l=0|e.sidebarView),h===g.ScrollMode.UNKNOWN&&(h=0|e.scrollMode),d===g.SpreadMode.UNKNOWN)&&(d=0|e.spreadMode),i&&l===g.SidebarView.UNKNOWN&&(l=(0,g.apiPageModeToSidebarView)(i)),t&&h===g.ScrollMode.UNKNOWN&&d===g.SpreadMode.UNKNOWN&&(a=(0,g.apiPageLayoutToViewerModes)(t),d=a.spreadMode),this.setInitialView(r,{rotation:o,sidebarView:l,scrollMode:h,spreadMode:d}),this.eventBus.dispatch("documentinit",{source:this}),this.isViewerEmbedded||u.focus(),await Promise.race([p,new Promise(e=>{setTimeout(e,1e4)})]),!n&&!r||u.hasEqualPageSizes||(this.initialBookmark=n,u.currentScaleValue=u.currentScaleValue,this.setInitialView(r))}).catch(()=>{this.setInitialView()}).then(function(){u.update()})}),p.then(()=>{this._unblockDocumentLoadEvent(),this._initializeAutoPrint(c,n)},t=>{this.l10n.get("loading_error").then(e=>{this._documentError(e,{message:null==t?void 0:t.message})})}),e.then(e=>{this.externalServices.reportTelemetry({type:"pageInfo",timestamp:e.timestamp}),c.getOutline().then(e=>{c===this.pdfDocument&&this.pdfOutlineViewer.render({outline:e,pdfDocument:c})}),c.getAttachments().then(e=>{c===this.pdfDocument&&this.pdfAttachmentViewer.render({attachments:e})}),u.optionalContentConfigPromise.then(e=>{c===this.pdfDocument&&this.pdfLayerViewer.render({optionalContentConfig:e,pdfDocument:c})})}),this._initializePageLabels(c),this._initializeMetadata(c)},async _scriptingDocProperties(e){return(this.documentInfo||(await new Promise(e=>{this.eventBus._on("metadataloaded",e,{once:!0})}),e===this.pdfDocument))&&(this._contentLength||(await new Promise(e=>{this.eventBus._on("documentloaded",e,{once:!0})}),e===this.pdfDocument))?{...this.documentInfo,baseURL:this.baseUrl,filesize:this._contentLength,filename:this._docFilename,metadata:null==(e=this.metadata)?void 0:e.getRaw(),authors:null==(e=this.metadata)?void 0:e.get("dc:creator"),numPages:this.pagesCount,URL:this.url}:null},async _initializeAutoPrint(e,t){var[t,i]=await Promise.all([t,this.pdfViewer.enableScripting?null:e.getJavaScript()]);if(e===this.pdfDocument){let e=!1;if("Print"===(null==t?void 0:t.action)&&(e=!0),i&&(i.some(e=>!!e&&(console.warn("Warning: JavaScript support is not enabled"),this.fallback(u.UNSUPPORTED_FEATURES.javaScript),!0)),!e))for(const n of i)if(n&&g.AutoPrintRegExp.test(n)){e=!0;break}e&&this.triggerPrinting()}},async _initializeMetadata(a){var{info:s,metadata:r,contentDispositionFilename:o,contentLength:l}=await a.getMetadata();if(a===this.pdfDocument){this.documentInfo=s,this.metadata=r,this._contentDispositionFilename??(this._contentDispositionFilename=o),this._contentLength??(this._contentLength=l),console.log(`PDF ${a.fingerprints[0]} [${s.PDFFormatVersion} `+`${(s.Producer||"-").trim()} / ${(s.Creator||"-").trim()}] `+`(PDF.js: ${u.version||"?"} [${u.build||"?"}])`);let e=s.Title;o=null==r?void 0:r.get("dc:title");(e=!o||"Untitled"===o||/[\uFFF0-\uFFFF]/g.test(o)?e:o)?this.setTitle(e+" - "+(this._contentDispositionFilename||this._title)):this._contentDispositionFilename&&this.setTitle(this._contentDispositionFilename),!s.IsXFAPresent||s.IsAcroFormPresent||a.isPureXfa?!s.IsAcroFormPresent&&!s.IsXFAPresent||this.pdfViewer.renderForms||(console.warn("Warning: Interactive form support is not enabled"),this.fallback(u.UNSUPPORTED_FEATURES.forms)):(a.loadingParams.enableXfa?console.warn("Warning: XFA Foreground documents are not supported"):console.warn("Warning: XFA support is not enabled"),this.fallback(u.UNSUPPORTED_FEATURES.forms)),s.IsSignaturesPresent&&(console.warn("Warning: Digital signatures validation is not supported"),this.fallback(u.UNSUPPORTED_FEATURES.signatures));let t="other",i=(ae.includes(s.PDFFormatVersion)&&(t="v"+s.PDFFormatVersion.replace(".","_")),"other");if(s.Producer){const h=s.Producer.toLowerCase();se.some(function(e){return!!h.includes(e)&&(i=e.replace(/[ .-]/g,"_"),!0)})}let n=null;s.IsXFAPresent?n="xfa":s.IsAcroFormPresent&&(n="acroform"),this.externalServices.reportTelemetry({type:"documentInfo",version:t,generator:i,formType:n}),this.eventBus.dispatch("metadataloaded",{source:this})}},async _initializePageLabels(e){var n=await e.getPageLabels();if(e===this.pdfDocument&&n&&!f.AppOptions.get("disablePageLabels")){var a,s,r=n.length;let t=0,i=0;for(let e=0;e=r||i>=r||({pdfViewer:e,pdfThumbnailViewer:a,toolbar:s}=this,e.setPageLabels(n),a.setPageLabels(n),s.setPagesCount(r,!0),s.setPageNumber(e.currentPageNumber,e.currentPageLabel))}},_initializePdfHistory(e){var{fingerprint:e,viewOnLoad:t,initialDest:i=null}=e;this.pdfHistory&&(this.pdfHistory.initialize({fingerprint:e,resetHistory:t===w.INITIAL,updateUrl:f.AppOptions.get("historyUpdateUrl")}),this.pdfHistory.initialBookmark&&(this.initialBookmark=this.pdfHistory.initialBookmark,this.initialRotation=this.pdfHistory.initialRotation),i)&&!this.initialBookmark&&t===w.UNKNOWN&&(this.initialBookmark=JSON.stringify(i),this.pdfHistory.push({explicitDest:i,pageNumber:null}))},_initializeAnnotationStorageCallbacks(e){e===this.pdfDocument&&(e=e["annotationStorage"],e.onSetModified=()=>{window.addEventListener("beforeunload",De),this._annotationStorageModified=!0},e.onResetModified=()=>{window.removeEventListener("beforeunload",De),delete this._annotationStorageModified},e.onAnnotationEditor=e=>{this._hasAnnotationEditors=!!e,this.setTitle(),e&&this.externalServices.reportTelemetry({type:"editing",data:{type:e}})})},setInitialView(e){var{rotation:t,sidebarView:i,scrollMode:n,spreadMode:a}=1{(0,g.isValidRotation)(e)&&(this.pdfViewer.pagesRotation=e)};this.isInitialViewSet=!0,this.pdfSidebar.setInitialView(i),i=n,n=a,(0,g.isValidScrollMode)(i)&&(this.pdfViewer.scrollMode=i),(0,g.isValidSpreadMode)(n)&&(this.pdfViewer.spreadMode=n),this.initialBookmark?(s(this.initialRotation),delete this.initialRotation,this.pdfLinkService.setHash(this.initialBookmark),this.initialBookmark=null):e&&(s(t),this.pdfLinkService.setHash(e)),this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber,this.pdfViewer.currentPageLabel),this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber),this.pdfViewer.currentScaleValue||(this.pdfViewer.currentScaleValue=g.DEFAULT_SCALE_VALUE)},_cleanup(){this.pdfDocument&&(this.pdfViewer.cleanup(),this.pdfThumbnailViewer.cleanup(),this.pdfDocument.cleanup(this.pdfViewer.renderer===g.RendererType.SVG))},forceRendering(){this.pdfRenderingQueue.printing=!!this.printService,this.pdfRenderingQueue.isThumbnailViewEnabled=this.pdfSidebar.visibleView===g.SidebarView.THUMBS,this.pdfRenderingQueue.renderHighestPriority()},beforePrint(){var e,t,i,n;this._printAnnotationStoragePromise=this.pdfScriptingManager.dispatchWillPrint().catch(()=>{}).then(()=>{var e;return null==(e=this.pdfDocument)?void 0:e.annotationStorage.print}),this.printService||(this.supportsPrinting?this.pdfViewer.pageViewsReady?(n=this.pdfViewer.getPagesOverview(),e=this.appConfig.printContainer,t=f.AppOptions.get("printResolution"),i=this.pdfViewer.optionalContentConfigPromise,n=B.instance.createPrintService(this.pdfDocument,n,e,t,i,this._printAnnotationStoragePromise,this.l10n),this.printService=n,this.forceRendering(),this.setTitle(),n.layout(),this.externalServices.reportTelemetry({type:"print"}),this._hasAnnotationEditors&&this.externalServices.reportTelemetry({type:"editing",data:{type:"print"}})):this.l10n.get("printing_not_ready").then(e=>{window.alert(e)}):this.l10n.get("printing_not_supported").then(e=>{this._otherError(e)}))},afterPrint(){var e;this._printAnnotationStoragePromise&&(this._printAnnotationStoragePromise.then(()=>{this.pdfScriptingManager.dispatchDidPrint()}),this._printAnnotationStoragePromise=null),this.printService&&(this.printService.destroy(),(this.printService=null)!=(e=this.pdfDocument))&&e.annotationStorage.resetModified(),this.forceRendering(),this.setTitle()},rotatePages(e){this.pdfViewer.pagesRotation+=e},requestPresentationMode(){var e;null!=(e=this.pdfPresentationMode)&&e.request()},triggerPrinting(){this.supportsPrinting&&window.print()},bindEvents(){var{eventBus:e,_boundEvents:t}=this;t.beforePrint=this.beforePrint.bind(this),t.afterPrint=this.afterPrint.bind(this),e._on("resize",y),e._on("hashchange",P),e._on("beforeprint",t.beforePrint),e._on("afterprint",t.afterPrint),e._on("pagerendered",n),e._on("updateviewarea",c),e._on("pagechanging",Le),e._on("scalechanging",Ee),e._on("rotationchanging",Se),e._on("sidebarviewchanged",h),e._on("pagemode",s),e._on("namedaction",r),e._on("presentationmodechanged",o),e._on("presentationmode",L),e._on("switchannotationeditormode",he),e._on("switchannotationeditorparams",de),e._on("print",C),e._on("download",T),e._on("firstpage",M),e._on("lastpage",I),e._on("nextpage",A),e._on("previouspage",k),e._on("zoomin",D),e._on("zoomout",N),e._on("zoomreset",ce),e._on("pagenumberchanged",ue),e._on("scalechanged",pe),e._on("rotatecw",ge),e._on("rotateccw",fe),e._on("optionalcontentconfig",me),e._on("switchscrollmode",ve),e._on("scrollmodechanged",_),e._on("switchspreadmode",we),e._on("spreadmodechanged",b),e._on("documentproperties",_e),e._on("findfromurlhash",be),e._on("updatefindmatchescount",ye),e._on("updatefindcontrolstate",Pe),f.AppOptions.get("pdfBug")&&(t.reportPageStatsPDFBug=oe,e._on("pagerendered",t.reportPageStatsPDFBug),e._on("pagechanging",t.reportPageStatsPDFBug)),e._on("fileinputchange",E),e._on("openfile",S)},bindWindowEvents(){const{eventBus:t,_boundEvents:n}=this;!function e(){var t=0{t.dispatch("resize",{source:window})},n.windowHashChange=()=>{t.dispatch("hashchange",{source:window,hash:document.location.hash.substring(1)})},n.windowBeforePrint=()=>{t.dispatch("beforeprint",{source:window})},n.windowAfterPrint=()=>{t.dispatch("afterprint",{source:window})},n.windowUpdateFromSandbox=e=>{t.dispatch("updatefromsandbox",{source:window,detail:e.detail})},window.addEventListener("visibilitychange",Ce),window.addEventListener("wheel",Me,{passive:!1}),window.addEventListener("touchstart",Ie,{passive:!1}),window.addEventListener("click",Ae),window.addEventListener("keydown",ke),window.addEventListener("resize",n.windowResize),window.addEventListener("hashchange",n.windowHashChange),window.addEventListener("beforeprint",n.windowBeforePrint),window.addEventListener("afterprint",n.windowAfterPrint),window.addEventListener("updatefromsandbox",n.windowUpdateFromSandbox)},unbindEvents(){var{eventBus:e,_boundEvents:t}=this;e._off("resize",y),e._off("hashchange",P),e._off("beforeprint",t.beforePrint),e._off("afterprint",t.afterPrint),e._off("pagerendered",n),e._off("updateviewarea",c),e._off("pagechanging",Le),e._off("scalechanging",Ee),e._off("rotationchanging",Se),e._off("sidebarviewchanged",h),e._off("pagemode",s),e._off("namedaction",r),e._off("presentationmodechanged",o),e._off("presentationmode",L),e._off("print",C),e._off("download",T),e._off("firstpage",M),e._off("lastpage",I),e._off("nextpage",A),e._off("previouspage",k),e._off("zoomin",D),e._off("zoomout",N),e._off("zoomreset",ce),e._off("pagenumberchanged",ue),e._off("scalechanged",pe),e._off("rotatecw",ge),e._off("rotateccw",fe),e._off("optionalcontentconfig",me),e._off("switchscrollmode",ve),e._off("scrollmodechanged",_),e._off("switchspreadmode",we),e._off("spreadmodechanged",b),e._off("documentproperties",_e),e._off("findfromurlhash",be),e._off("updatefindmatchescount",ye),e._off("updatefindcontrolstate",Pe),t.reportPageStatsPDFBug&&(e._off("pagerendered",t.reportPageStatsPDFBug),e._off("pagechanging",t.reportPageStatsPDFBug),t.reportPageStatsPDFBug=null),e._off("fileinputchange",E),e._off("openfile",S),t.beforePrint=null,t.afterPrint=null},unbindWindowEvents(){var e,t=this["_boundEvents"];window.removeEventListener("visibilitychange",Ce),window.removeEventListener("wheel",Me,{passive:!1}),window.removeEventListener("touchstart",Ie,{passive:!1}),window.removeEventListener("click",Ae),window.removeEventListener("keydown",ke),window.removeEventListener("resize",t.windowResize),window.removeEventListener("hashchange",t.windowHashChange),window.removeEventListener("beforeprint",t.windowBeforePrint),window.removeEventListener("afterprint",t.windowAfterPrint),window.removeEventListener("updatefromsandbox",t.windowUpdateFromSandbox),null!=(e=t.removeWindowResolutionChange)&&e.call(t),t.windowResize=null,t.windowHashChange=null,t.windowBeforePrint=null,t.windowAfterPrint=null,t.windowUpdateFromSandbox=null},accumulateWheelTicks(e){(0{}},_reportDocumentStatsTelemetry(){var e=this.pdfDocument["stats"];e!==this._docStats&&(this._docStats=e,this.externalServices.reportTelemetry({type:"documentStats",stats:e}))},get scriptingReady(){return this.pdfScriptingManager.ready}};e.PDFViewerApplication=d;{const Ne=["null","http://mozilla.github.io","https://mozilla.github.io"];var re=function(e){if(e)try{var t=new URL(window.location.href).origin||"null";if(!Ne.includes(t))if(new URL(e,window.location.href).origin!==t)throw new Error("file origin does not match viewer's")}catch(t){throw d.l10n.get("loading_error").then(e=>{d._documentError(e,{message:null==t?void 0:t.message})}),t}}}async function a(e){var t=e.appConfig["debuggerScriptPath"],t=(await import(t))["PDFBug"];e._PDFBug=t}function oe(e){var t,e=e["pageNumber"];null!=(t=globalThis.Stats)&&t.enabled&&(t=d.pdfViewer.getPageView(e-1),globalThis.Stats.add(e,null==t||null==(e=t.pdfPage)?void 0:e.stats))}function le(){const{appConfig:e,eventBus:i}=d;var t=document.location.search.substring(1),t=(0,g.parseQueryString)(t).get("file")??f.AppOptions.get("defaultUrl"),n=(re(t),e.openFileInput);n.value=null,n.addEventListener("change",function(e){var t=e.target["files"];t&&0!==t.length&&i.dispatch("fileinputchange",{source:this,fileInput:e.target})}),e.mainContainer.addEventListener("dragover",function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy"===e.dataTransfer.effectAllowed?"copy":"move"}),e.mainContainer.addEventListener("drop",function(e){e.preventDefault();var t=e.dataTransfer["files"];t&&0!==t.length&&i.dispatch("fileinputchange",{source:this,fileInput:e.dataTransfer})}),d.supportsDocumentFonts||(f.AppOptions.set("disableFontFace",!0),d.l10n.get("web_fonts_disabled").then(e=>{console.warn(e)})),d.supportsPrinting||(e.toolbar.print.classList.add("hidden"),e.secondaryToolbar.printButton.classList.add("hidden")),d.supportsFullscreen||e.secondaryToolbar.presentationModeButton.classList.add("hidden"),d.supportsIntegratedFind&&e.toolbar.viewFind.classList.add("hidden"),e.mainContainer.addEventListener("transitionend",function(e){e.target===this&&i.dispatch("resize",{source:this})},!0);try{t?d.open(t):d._hideViewBookmark()}catch(t){d.l10n.get("loading_error").then(e=>{d._documentError(e,t)})}}function n(e){let{pageNumber:t,error:i}=e;var n;t===d.page&&d.toolbar.updateLoadingIndicatorState(!1),d.pdfSidebar.visibleView===g.SidebarView.THUMBS&&(e=d.pdfViewer.getPageView(t-1),n=d.pdfThumbnailViewer.getThumbnail(t-1),e)&&n&&n.setImage(e),i&&d.l10n.get("rendering_error").then(e=>{d._otherError(e,i)}),d._reportDocumentStatsTelemetry()}function s(e){var t=e["mode"];let i;switch(t){case"thumbs":i=g.SidebarView.THUMBS;break;case"bookmarks":case"outline":i=g.SidebarView.OUTLINE;break;case"attachments":i=g.SidebarView.ATTACHMENTS;break;case"layers":i=g.SidebarView.LAYERS;break;case"none":i=g.SidebarView.NONE;break;default:return void console.error('Invalid "pagemode" hash parameter: '+t)}d.pdfSidebar.switchView(i,!0)}function r(e){switch(e.action){case"GoToPage":d.appConfig.toolbar.pageNumber.select();break;case"Find":d.supportsIntegratedFind||d.findBar.toggle();break;case"Print":d.triggerPrinting();break;case"SaveAs":d.downloadOrSave()}}function o(e){d.pdfViewer.presentationModeState=e.state}function h(e){var t,e=e["view"];d.pdfRenderingQueue.isThumbnailViewEnabled=e===g.SidebarView.THUMBS,d.isInitialViewSet&&null!=(t=d.store)&&t.set("sidebarView",e).catch(()=>{})}function c(e){var e=e["location"],t=(d.isInitialViewSet&&null!=(t=d.store)&&t.setMultiple({page:e.pageNumber,zoom:e.scale,scrollLeft:e.left,scrollTop:e.top,rotation:e.rotation}).catch(()=>{}),d.pdfLinkService.getAnchorUrl(e.pdfOpenParams)),e=(d.appConfig.secondaryToolbar.viewBookmarkButton.href=t,d.pdfViewer.getPageView(d.page-1)),t=(null==e?void 0:e.renderingState)!==g.RenderingStates.FINISHED;d.toolbar.updateLoadingIndicatorState(t)}function _(e){var t;d.isInitialViewSet&&!d.pdfViewer.isInPresentationMode&&null!=(t=d.store)&&t.set("scrollMode",e.mode).catch(()=>{})}function b(e){var t;d.isInitialViewSet&&!d.pdfViewer.isInPresentationMode&&null!=(t=d.store)&&t.set("spreadMode",e.mode).catch(()=>{})}function y(){var{pdfDocument:e,pdfViewer:t,pdfRenderingQueue:i}=d;i.printing&&window.matchMedia("print").matches||(t.updateContainerHeightCss(),e&&("auto"!==(i=t.currentScaleValue)&&"page-fit"!==i&&"page-width"!==i||(t.currentScaleValue=i),t.update()))}function P(e){var t,e=e.hash;e&&(d.isInitialViewSet?null!=(t=d.pdfHistory)&&t.popStateInProgress||d.pdfLinkService.setHash(e):d.initialBookmark=e)}var E=function(t){if(null==(i=d.pdfViewer)||!i.isInPresentationMode){var i=t.fileInput.files[0];let e=URL.createObjectURL(i);i.name&&(e={url:e,originalUrl:i.name}),d.open(e)}},S=function(e){d.appConfig.openFileInput.click()};function L(){d.requestPresentationMode()}function he(e){d.pdfViewer.annotationEditorMode=e.mode}function de(e){d.pdfViewer.annotationEditorParams=e}function C(){d.triggerPrinting()}function T(){d.downloadOrSave()}function M(){d.pdfDocument&&(d.page=1)}function I(){d.pdfDocument&&(d.page=d.pagesCount)}function A(){d.pdfViewer.nextPage()}function k(){d.pdfViewer.previousPage()}function D(){d.zoomIn()}function N(){d.zoomOut()}function ce(){d.zoomReset()}function ue(e){var t=d.pdfViewer;""!==e.value&&d.pdfLinkService.goToPage(e.value),e.value!==t.currentPageNumber.toString()&&e.value!==t.currentPageLabel&&d.toolbar.setPageNumber(t.currentPageNumber,t.currentPageLabel)}function pe(e){d.pdfViewer.currentScaleValue=e.value}function ge(){d.rotatePages(90)}function fe(){d.rotatePages(-90)}function me(e){d.pdfViewer.optionalContentConfigPromise=e.promise}function ve(e){d.pdfViewer.scrollMode=e.mode}function we(e){d.pdfViewer.spreadMode=e.mode}function _e(){d.pdfDocumentProperties.open()}function be(e){d.eventBus.dispatch("find",{source:e.source,type:"",query:e.query,phraseSearch:e.phraseSearch,caseSensitive:!1,entireWord:!1,highlightAll:!0,findPrevious:!1,matchDiacritics:!0})}function ye(e){e=e.matchesCount;d.supportsIntegratedFind?d.externalServices.updateFindMatchesCount(e):d.findBar.updateResultsCount(e)}function Pe(e){var{state:e,previous:t,matchesCount:i,rawQuery:n}=e;d.supportsIntegratedFind?d.externalServices.updateFindControlState({result:e,findPrevious:t,matchesCount:i,rawQuery:n}):d.findBar.updateUIState(e,t,i)}function Ee(e){d.toolbar.setPageScale(e.presetValue,e.scale),d.pdfViewer.update()}function Se(e){d.pdfThumbnailViewer.pagesRotation=e.pagesRotation,d.forceRendering(),d.pdfViewer.currentPageNumber=e.pageNumber}function Le(e){var{pageNumber:e,pageLabel:t}=e;d.toolbar.setPageNumber(e,t),d.secondaryToolbar.setPageNumber(e),d.pdfSidebar.visibleView===g.SidebarView.THUMBS&&d.pdfThumbnailViewer.scrollThumbnailIntoView(e)}function Ce(e){"visible"===document.visibilityState&&Te()}let x=null;function Te(){x&&clearTimeout(x),x=setTimeout(function(){x=null},ne)}function Me(t){var{pdfViewer:i,supportedMouseWheelZoomModifierKeys:n}=d;if(!i.isInPresentationMode)if(t.ctrlKey&&n.ctrlKey||t.metaKey&&n.metaKey){if(t.preventDefault(),!x&&"hidden"!==document.visibilityState){var n=t.deltaMode,a=(0,g.normalizeWheelEventDirection)(t),s=i.currentScale;let e=0;(e=n===WheelEvent.DOM_DELTA_LINE||n===WheelEvent.DOM_DELTA_PAGE?1<=Math.abs(a)?Math.sign(a):d.accumulateWheelTicks(a):d.accumulateWheelTicks(a/30))<0?d.zoomOut(-e):0{let t;t="undefined"!=typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:require("../build/pdf.js"),e.exports=t},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WaitOnType=t.EventBus=t.AutomationEventBus=void 0,t.waitOnEventOrTimeout=function(e){let{target:r,name:o,delay:l=0}=e;return new Promise(function(t,e){if("object"!=typeof r||!o||"string"!=typeof o||!(Number.isInteger(l)&&0<=l))throw new Error("waitOnEventOrTimeout - invalid parameters.");function i(e){r instanceof d?r._off(o,n):r.removeEventListener(o,n),s&&clearTimeout(s),t(e)}const n=i.bind(null,h.EVENT);r instanceof d?r._on(o,n):r.addEventListener(o,n);var a=i.bind(null,h.TIMEOUT);const s=setTimeout(a,l)})};const h={EVENT:"event",TIMEOUT:"timeout"};t.WaitOnType=h;class d{constructor(){this._listeners=Object.create(null)}on(e,t){var i=2{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFCursorTools=t.CursorTool=void 0;var s=i(5),a=i(8),r=i(1);function o(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function l(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const h={SELECT:0,HAND:1,ZOOM:2};t.CursorTool=h;var d=new WeakSet,c=new WeakSet;function n(){this.eventBus.dispatch("cursortoolchanged",{source:this,tool:this.active})}function u(){this.eventBus._on("switchcursortool",e=>{this.switchTool(e.tool)});let t=s.AnnotationEditorType.NONE,i=r.PresentationModeState.NORMAL;const n=()=>{var e=this.active;this.switchTool(h.SELECT),this.previouslyActive??(this.previouslyActive=e)},a=()=>{var e=this.previouslyActive;null!==e&&t===s.AnnotationEditorType.NONE&&i===r.PresentationModeState.NORMAL&&(this.previouslyActive=null,this.switchTool(e))};this.eventBus._on("secondarytoolbarreset",e=>{null!==this.previouslyActive&&(t=s.AnnotationEditorType.NONE,i=r.PresentationModeState.NORMAL,a())}),this.eventBus._on("annotationeditormodechanged",e=>{e=e.mode;((t=e)===s.AnnotationEditorType.NONE?a:n)()}),this.eventBus._on("presentationmodechanged",e=>{e=e.state;(i=e)===r.PresentationModeState.NORMAL?a():e===r.PresentationModeState.FULLSCREEN&&n()})}t.PDFCursorTools=class{constructor(e){let{container:t,eventBus:i,cursorToolOnLoad:n=h.SELECT}=e;o(this,c),o(this,d),this.container=t,this.eventBus=i,this.active=h.SELECT,this.previouslyActive=null,this.handTool=new a.GrabToPan({element:this.container}),l(this,c,u).call(this),Promise.resolve().then(()=>{this.switchTool(n)})}get activeTool(){return this.active}switchTool(e){if(null===this.previouslyActive&&e!==this.active){var t=()=>{switch(this.active){case h.SELECT:break;case h.HAND:this.handTool.deactivate();break;case h.ZOOM:}};switch(e){case h.SELECT:t();break;case h.HAND:t(),this.handTool.activate();break;default:h.ZOOM;return void console.error(`switchTool: "${e}" is an unsupported value.`)}this.active=e,l(this,d,n).call(this)}}}},(e,t)=>{function i(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function n(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}Object.defineProperty(t,"__esModule",{value:!0}),t.GrabToPan=void 0;const a="grab-to-pan-grab";var s=new WeakSet,r=new WeakSet,o=new WeakSet;function l(e){if(0===e.button&&!this.ignoreTarget(e.target)){if(e.originalTarget)try{e.originalTarget.tagName}catch(e){return}this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,this.clientXStart=e.clientX,this.clientYStart=e.clientY,this.document.addEventListener("mousemove",this._onMouseMove,!0),this.document.addEventListener("mouseup",this._endPan,!0),this.element.addEventListener("scroll",this._endPan,!0),e.preventDefault(),e.stopPropagation();var t=document.activeElement;t&&!t.contains(e.target)&&t.blur()}}function h(e){var t;this.element.removeEventListener("scroll",this._endPan,!0),1&e.buttons?(t=e.clientX-this.clientXStart,e=e.clientY-this.clientYStart,e=this.scrollTopStart-e,t=this.scrollLeftStart-t,this.element.scrollTo?this.element.scrollTo({top:e,left:t,behavior:"instant"}):(this.element.scrollTop=e,this.element.scrollLeft=t),this.overlay.parentNode||document.body.append(this.overlay)):this._endPan()}function d(){this.element.removeEventListener("scroll",this._endPan,!0),this.document.removeEventListener("mousemove",this._onMouseMove,!0),this.document.removeEventListener("mouseup",this._endPan,!0),this.overlay.remove()}t.GrabToPan=class{constructor(e){i(this,o),i(this,r),i(this,s),this.element=e.element,this.document=e.element.ownerDocument,"function"==typeof e.ignoreTarget&&(this.ignoreTarget=e.ignoreTarget),this.onActiveChanged=e.onActiveChanged,this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.toggle=this.toggle.bind(this),this._onMouseDown=n(this,s,l).bind(this),this._onMouseMove=n(this,r,h).bind(this),this._endPan=n(this,o,d).bind(this),(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}activate(){var e;this.active||(this.active=!0,this.element.addEventListener("mousedown",this._onMouseDown,!0),this.element.classList.add(a),null!=(e=this.onActiveChanged)&&e.call(this,!0))}deactivate(){var e;this.active&&(this.active=!1,this.element.removeEventListener("mousedown",this._onMouseDown,!0),this._endPan(),this.element.classList.remove(a),null!=(e=this.onActiveChanged))&&e.call(this,!1)}toggle(){this.active?this.deactivate():this.activate()}ignoreTarget(e){return e.matches("a[href], a[href] *, input, textarea, button, button *, select, option")}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorParams=void 0;var l=i(5);function n(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}var a=new WeakSet;function s(e){let{editorFreeTextFontSize:n,editorFreeTextColor:a,editorInkColor:s,editorInkThickness:r,editorInkOpacity:o}=e;n.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.FREETEXT_SIZE,value:n.valueAsNumber})}),a.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.FREETEXT_COLOR,value:a.value})}),s.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.INK_COLOR,value:s.value})}),r.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.INK_THICKNESS,value:r.valueAsNumber})}),o.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.INK_OPACITY,value:o.valueAsNumber})}),this.eventBus._on("annotationeditorparamschanged",e=>{for(var[t,i]of e.details)switch(t){case l.AnnotationEditorParamsType.FREETEXT_SIZE:n.value=i;break;case l.AnnotationEditorParamsType.FREETEXT_COLOR:a.value=i;break;case l.AnnotationEditorParamsType.INK_COLOR:s.value=i;break;case l.AnnotationEditorParamsType.INK_THICKNESS:r.value=i;break;case l.AnnotationEditorParamsType.INK_OPACITY:o.value=i}})}t.AnnotationEditorParams=class{constructor(e,t){n(this,a),this.eventBus=t,function(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}(this,a,s).call(this,e)}}},(e,t,i)=>{function n(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function a(e,t,i){t=r(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function s(e,t){t=r(e,t,"get");return t.get?t.get.call(e):t.value}function r(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayManager=void 0;var o=new WeakMap,l=new WeakMap;t.OverlayManager=class{constructor(){n(this,o,{writable:!0,value:new WeakMap}),n(this,l,{writable:!0,value:null})}get active(){return s(this,l)}async register(e){var t=1{a(this,l,null)})}async unregister(e){if(!s(this,o).has(e))throw new Error("The overlay does not exist.");if(s(this,l)===e)throw new Error("The overlay cannot be removed while it is active.");s(this,o).delete(e)}async open(e){if(!s(this,o).has(e))throw new Error("The overlay does not exist.");if(s(this,l)){if(s(this,l)===e)throw new Error("The overlay is already active.");if(!s(this,o).get(e).canForceClose)throw new Error("Another overlay is currently active.");await this.close()}a(this,l,e),e.showModal()}async close(){var e=0{e.exports=function(){"use strict";var n=window.CustomEvent;if(!n||typeof n==="object"){n=function e(t,i){i=i||{};var n=document.createEvent("CustomEvent");n.initCustomEvent(t,!!i.bubbles,!!i.cancelable,i.detail||null);return n};n.prototype=window.Event.prototype}function a(e,t){var i="on"+t.type.toLowerCase();if(typeof e[i]==="function")e[i](t);return e.dispatchEvent(t)}function e(e){while(e&&e!==document.body){var i=window.getComputedStyle(e);var t=function(e,t){return!(i[e]===undefined||i[e]===t)};if(i.opacity<1||t("zIndex","auto")||t("transform","none")||t("mixBlendMode","normal")||t("filter","none")||t("perspective","none")||i["isolation"]==="isolate"||i.position==="fixed"||i.webkitOverflowScrolling==="touch")return true;e=e.parentElement}return false}function r(e){while(e){if(e.localName==="dialog")return e;if(e.parentElement)e=e.parentElement;else if(e.parentNode)e=e.parentNode.host;else e=null}return null}function s(e){while(e&&e.shadowRoot&&e.shadowRoot.activeElement)e=e.shadowRoot.activeElement;if(e&&e.blur&&e!==document.body)e.blur()}function h(e,t){for(var i=0;i=0)e=this.dialog_;if(!e)e=l(this.dialog_);s(document.activeElement);e&&e.focus()},updateZIndex:function(e,t){if(e, the polyfill "+"may not work correctly",e);if(e.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new i(e)},registerDialog:function(e){if(!e.showModal)u.forceRegisterDialog(e)},DialogManager:function(){this.pendingDialogStack=[];var t=this.checkDOM_.bind(this);this.overlay=document.createElement("div");this.overlay.className="_dialog_overlay";this.overlay.addEventListener("click",function(e){this.forwardTab_=undefined;e.stopPropagation();t([])}.bind(this));this.handleKey_=this.handleKey_.bind(this);this.handleFocus_=this.handleFocus_.bind(this);this.zIndexLow_=1e5;this.zIndexHigh_=1e5+150;this.forwardTab_=undefined;if("MutationObserver"in window)this.mo_=new MutationObserver(function(e){var n=[];e.forEach(function(e){for(var t=0,i;i=e.removedNodes[t];++t){if(!(i instanceof Element))continue;else if(i.localName==="dialog")n.push(i);n=n.concat(i.querySelectorAll("dialog"))}});n.length&&t(n)})}};if(u.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,true);document.addEventListener("keydown",this.handleKey_);this.mo_&&this.mo_.observe(document,{childList:true,subtree:true})},u.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,true);document.removeEventListener("keydown",this.handleKey_);this.mo_&&this.mo_.disconnect()},u.DialogManager.prototype.updateStacking=function(){var e=this.zIndexHigh_;for(var t=0,i;i=this.pendingDialogStack[t];++t){i.updateZIndex(--e,--e);if(t===0)this.overlay.style.zIndex=--e}var n=this.pendingDialogStack[0];if(n){var a=n.dialog.parentNode||document.body;a.appendChild(this.overlay)}else if(this.overlay.parentNode)this.overlay.parentNode.removeChild(this.overlay)},u.DialogManager.prototype.containedByTopDialog_=function(e){while(e=r(e)){for(var t=0,i;i=this.pendingDialogStack[t];++t)if(i.dialog===e)return t===0;e=e.parentElement}return false},u.DialogManager.prototype.handleFocus_=function(e){var t=e.composedPath?e.composedPath()[0]:e.target;if(this.containedByTopDialog_(t))return;if(document.activeElement===document.documentElement)return;e.preventDefault();e.stopPropagation();s(t);if(this.forwardTab_===undefined)return;var i=this.pendingDialogStack[0];var n=i.dialog;var a=n.compareDocumentPosition(t);if(a&Node.DOCUMENT_POSITION_PRECEDING)if(this.forwardTab_)i.focus_();else if(t!==document.documentElement)document.documentElement.focus();return false},u.DialogManager.prototype.handleKey_=function(e){this.forwardTab_=undefined;if(e.keyCode===27){e.preventDefault();e.stopPropagation();var t=new n("cancel",{bubbles:false,cancelable:true});var i=this.pendingDialogStack[0];if(i&&a(i.dialog,t))i.dialog.close()}else if(e.keyCode===9)this.forwardTab_=!e.shiftKey},u.DialogManager.prototype.checkDOM_=function(t){var e=this.pendingDialogStack.slice();e.forEach(function(e){if(t.indexOf(e.dialog)!==-1)e.downgradeModal();else e.maybeHideModal()})},u.DialogManager.prototype.pushDialog=function(e){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;if(this.pendingDialogStack.length>=t)return false;if(this.pendingDialogStack.unshift(e)===1)this.blockDocument();this.updateStacking();return true},u.DialogManager.prototype.removeDialog=function(e){var t=this.pendingDialogStack.indexOf(e);if(t===-1)return;this.pendingDialogStack.splice(t,1);if(this.pendingDialogStack.length===0)this.unblockDocument();this.updateStacking()},u.dm=new u.DialogManager,u.formSubmitter=null,u.imagemapUseValue=null,window.HTMLDialogElement===undefined){var p=document.createElement("form");p.setAttribute("method","dialog");if(p.method!=="dialog"){var g=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(g){var f=g.get;g.get=function(){if(o(this))return"dialog";return f.call(this)};var m=g.set;g.set=function(e){if(typeof e==="string"&&e.toLowerCase()==="dialog")return this.setAttribute("method",e);return m.call(this,e)};Object.defineProperty(HTMLFormElement.prototype,"method",g)}}document.addEventListener("click",function(e){u.formSubmitter=null;u.imagemapUseValue=null;if(e.defaultPrevented)return;var t=e.target;if("composedPath"in e){var i=e.composedPath();t=i.shift()||t}if(!t||!o(t.form))return;var n=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!n){if(!(t.localName==="input"&&t.type==="image"))return;u.imagemapUseValue=e.offsetX+","+e.offsetY}var a=r(t);if(!a)return;u.formSubmitter=t},false);document.addEventListener("submit",function(e){var t=e.target;var i=r(t);if(i)return;var n=d(e);var a=n&&n.getAttribute("formmethod")||t.getAttribute("method");if(a==="dialog")e.preventDefault()});var v=HTMLFormElement.prototype.submit;var w=function(){if(!o(this))return v.call(this);var e=r(this);e&&e.close()};HTMLFormElement.prototype.submit=w}return u}()},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordPrompt=void 0;var n=i(5);function a(e,t){r(e,t),t.add(e)}function s(e,t,i){r(e,t),t.set(e,i)}function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,i){t=h(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function l(e,t){t=h(e,t,"get");return t.get?t.get.call(e):t.value}function h(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}function d(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var c=new WeakMap,u=new WeakMap,p=new WeakMap,g=new WeakSet,f=new WeakSet,m=new WeakSet;function v(){var e=this.input.value;0<(null==e?void 0:e.length)&&d(this,m,_).call(this,e)}function w(){d(this,m,_).call(this,new Error("PasswordPrompt cancelled.")),l(this,c).resolve()}function _(e){l(this,u)&&(this.close(),this.input.value="",l(this,u).call(this,e),o(this,u,null))}t.PasswordPrompt=class{constructor(e,t,i){var n=3{13===e.keyCode&&d(this,g,v).call(this)}),this.overlayManager.register(this.dialog,!0),this.dialog.addEventListener("close",d(this,f,w).bind(this))}async open(){l(this,c)&&await l(this,c).promise,o(this,c,(0,n.createPromiseCapability)());try{await this.overlayManager.open(this.dialog)}catch(e){throw o(this,c,null),e}var e=l(this,p)===n.PasswordResponses.INCORRECT_PASSWORD;this._isViewerEmbedded&&!e||this.input.focus(),this.label.textContent=await this.l10n.get("password_"+(e?"invalid":"label"))}async close(){this.overlayManager.active===this.dialog&&this.overlayManager.close(this.dialog)}async setUpdateCallback(e,t){l(this,c)&&await l(this,c).promise,o(this,u,e),o(this,p,t)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFAttachmentViewer=void 0;var h=i(5),n=i(14),a=i(6);function s(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}var r=new WeakSet;class o extends n.BaseTreeViewer{constructor(e){super(e),s(this,r),this.downloadManager=e.downloadManager,this.eventBus._on("fileattachmentannotation",function(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}(this,r,l).bind(this))}reset(){var e=0(this.downloadManager.openOrDownloadData(e,i,n),!1)}render(t){var{attachments:i,keepRenderedCapability:t=!1}=t;if(this._attachments&&this.reset(t),this._attachments=i||null,i){var t=Object.keys(i).sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),n=document.createDocumentFragment();let e=0;for(const l of t){var a=i[l],s=a.content,a=(0,h.getFilenameFromUrl)(a.filename),r=document.createElement("div"),o=(r.className="treeItem",document.createElement("a"));this._bindLink(o,{content:s,filename:a}),o.textContent=this._normalizeTextContent(a),r.append(o),n.append(r),e++}this._finishRendering(n,e)}else this._dispatchEvent(0)}}function l(e){let{filename:i,content:n}=e;const a=this._renderedCapability.promise;a.then(()=>{if(a===this._renderedCapability.promise){var e=this._attachments||Object.create(null);for(const t in e)if(i===t)return;e[i]={filename:i,content:n},this.render({attachments:e,keepRenderedCapability:!0})}})}t.PDFAttachmentViewer=o},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTreeViewer=void 0;var n=i(1);const a="selected";t.BaseTreeViewer=class s{constructor(e){if(this.constructor===s)throw new Error("Cannot initialize BaseTreeViewer.");this.container=e.container,this.eventBus=e.eventBus,this.reset()}reset(){this._pdfDocument=null,this._lastToggleIsShow=!0,this._currentTreeItem=null,this.container.textContent="",this.container.classList.remove("treeWithDeepNesting")}_dispatchEvent(e){throw new Error("Not implemented: _dispatchEvent")}_bindLink(e,t){throw new Error("Not implemented: _bindLink")}_normalizeTextContent(e){return(0,n.removeNullCharacters)(e,!0)||"–"}_addToggleButton(t){var e=1{e.stopPropagation(),i.classList.toggle("treeItemsHidden"),e.shiftKey&&(e=!i.classList.contains("treeItemsHidden"),this._toggleTreeItem(t,e))},t.prepend(i)}_toggleTreeItem(e){var t=1{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDocumentProperties=void 0;var n=i(5),d=i(1);function c(e,t){u(e,t),t.add(e)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(e,t,i){t=a(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function g(e,t){t=a(e,t,"get");return t.get?t.get.call(e):t.value}function a(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}function f(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const m=["en-us","en-lr","my"],l={"8.5x11":"Letter","8.5x14":"Legal"},h={"297x420":"A3","210x297":"A4"};function v(e,t,i){return i[(t?e.width:e.height)+"x"+(t?e.height:e.width)]}var w=new WeakMap,_=new WeakSet,b=new WeakSet,y=new WeakSet,P=new WeakSet,E=new WeakSet,S=new WeakSet;function L(){this.pdfDocument=null,p(this,w,null),this._dataAvailableCapability=(0,n.createPromiseCapability)(),this._currentPageNumber=1,this._pagesRotation=0}function C(){if(0{this._currentPageNumber=e.pageNumber}),i._on("rotationchanging",e=>{this._pagesRotation=e.pagesRotation}),this._isNonMetricLocale=!0,n.getLanguage().then(e=>{this._isNonMetricLocale=m.includes(e)})}async open(){await Promise.all([this.overlayManager.open(this.dialog),this._dataAvailableCapability.promise]);var e,t,i,n,a,s,r,o,l=this._currentPageNumber;const h=this._pagesRotation;g(this,w)&&l===g(this,w)._currentPageNumber&&h===g(this,w)._pagesRotation?f(this,b,C).call(this):({info:e,contentLength:t}=await this.pdfDocument.getMetadata(),[r,o,i,n,a,s]=await Promise.all([this._fileNameLookup(),f(this,y,T).call(this,t),f(this,E,I).call(this,e.CreationDate),f(this,E,I).call(this,e.ModDate),this.pdfDocument.getPage(l).then(e=>f(this,P,M).call(this,(0,d.getPageSizeInches)(e),h)),f(this,S,A).call(this,e.IsLinearized)]),p(this,w,Object.freeze({fileName:r,fileSize:o,title:e.Title,author:e.Author,subject:e.Subject,keywords:e.Keywords,creationDate:i,modificationDate:n,creator:e.Creator,producer:e.Producer,version:e.PDFFormatVersion,pageCount:this.pdfDocument.numPages,pageSize:a,linearized:s,_currentPageNumber:l,_pagesRotation:h})),f(this,b,C).call(this),r=(await this.pdfDocument.getDownloadInfo()).length,t!==r&&((o=Object.assign(Object.create(null),g(this,w))).fileSize=await f(this,y,T).call(this,r),p(this,w,Object.freeze(o)),f(this,b,C).call(this)))}async close(){this.overlayManager.close(this.dialog)}setDocument(e){this.pdfDocument&&(f(this,_,L).call(this),f(this,b,C).call(this,!0)),e&&(this.pdfDocument=e,this._dataAvailableCapability.resolve())}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFindBar=void 0;var s=i(17);function n(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function r(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var o=new WeakSet;function l(){var e;this.opened&&(this.bar.classList.remove("wrapContainers"),e=this.bar.clientHeight,this.bar.firstElementChild.clientHeight{this.toggle()}),this.findField.addEventListener("input",()=>{this.dispatchEvent("")}),this.bar.addEventListener("keydown",e=>{switch(e.keyCode){case 13:e.target===this.findField&&this.dispatchEvent("again",e.shiftKey);break;case 27:this.close()}}),this.findPreviousButton.addEventListener("click",()=>{this.dispatchEvent("again",!0)}),this.findNextButton.addEventListener("click",()=>{this.dispatchEvent("again",!1)}),this.highlightAll.addEventListener("click",()=>{this.dispatchEvent("highlightallchange")}),this.caseSensitive.addEventListener("click",()=>{this.dispatchEvent("casesensitivitychange")}),this.entireWord.addEventListener("click",()=>{this.dispatchEvent("entirewordchange")}),this.matchDiacritics.addEventListener("click",()=>{this.dispatchEvent("diacriticmatchingchange")}),this.eventBus._on("resize",r(this,o,l).bind(this))}reset(){this.updateUIState()}dispatchEvent(e){this.eventBus.dispatch("find",{source:this,type:e,query:this.findField.value,phraseSearch:!0,caseSensitive:this.caseSensitive.checked,entireWord:this.entireWord.checked,highlightAll:this.highlightAll.checked,findPrevious:1{this.findMsg.textContent=e,r(this,o,l).call(this)}),this.updateResultsCount(i)}updateResultsCount(){var{current:e=0,total:t=0}=0{this.findResultsCount.textContent=e,r(this,o,l).call(this)})}open(){this.opened||(this.opened=!0,this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.bar.classList.remove("hidden")),this.findField.select(),this.findField.focus(),r(this,o,l).call(this)}close(){this.opened&&(this.opened=!1,this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"),this.bar.classList.add("hidden"),this.eventBus.dispatch("findbarclose",{source:this}))}toggle(){this.opened?this.close():this.open()}}},(n,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFindController=e.FindState=void 0;var h=t(1),i=t(5),r=t(18);function s(e,t){o(e,t),t.add(e)}function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){t=function(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}(e,t,"get");return t.get?t.get.call(e):t.value}function d(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const a={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3},b=(e.FindState=a,{"‐":"-","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"}),c=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]),V=[...c.values()].map(e=>String.fromCharCode(e)).join(""),F=/\p{M}+/gu,R=/([.*+?^${}()|[\]\\])|(\p{P})|(\s+)|(\p{M})|(\p{L})/gu,W=/([^\p{M}])\p{M}*$/u,U=/^\p{M}*([^\p{M}])/u,H=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,y=new Map,z="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]";let P=null,E=null;function u(e){const c=[];let i;for(;null!==(i=H.exec(e));){let t=i["index"];for(const s of i[0]){let e=y.get(s);e||(e=s.normalize("NFD").length,y.set(s,e)),c.push([e,t++])}}let t;var n;t=0===c.length&&P?P:0{if(o-=v,i){var i=b[e],l=i.length;for(let e=1;e{var e,t;!this._pdfDocument||i&&this._pdfDocument!==i||(d(this,G,ne).call(this),e=!this._highlightMatches,t=!!this._findTimeout,this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),n?this._dirtyMatch?d(this,C,x).call(this):"again"===n?(d(this,C,x).call(this),e&&this._state.highlightAll&&d(this,L,N).call(this)):("highlightallchange"===n?(t?d(this,C,x).call(this):this._highlightMatches=!0,d(this,L,N)):d(this,C,x)).call(this):this._findTimeout=setTimeout(()=>{d(this,C,x).call(this),this._findTimeout=null},250))})}}function Q(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this._state=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=(0,i.createPromiseCapability)()}function q(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,[this._normalizedQuery]=u(this._state.query)),this._normalizedQuery}function Y(e){if(e.query===this._state.query)switch(e.type){case"again":var t=this._selected.pageIdx+1,i=this._linkService;return 1<=t&&t<=i.pagesCount&&t!==i.page&&!i.isPageVisible(t)?!0:!1;case"highlightallchange":return!1}return!0}function J(e,t,i){let n=e.slice(0,t).match(W);if(n){var a=e.charCodeAt(t),s=n[1].charCodeAt(0);if((0,r.getCharacterType)(a)===(0,r.getCharacterType)(s))return!1}if(n=e.slice(t+i).match(U)){a=e.charCodeAt(t+i-1),s=n[1].charCodeAt(0);if((0,r.getCharacterType)(a)===(0,r.getCharacterType)(s))return!1}return!0}function ee(e,t,i,n){for(var a,s,r=[],o=[],l=this._pageDiffs[i];null!==(a=e.exec(n));)t&&!d(this,v,J).call(this,n,a.index,a[0].length)||([a,s]=function(e,t,i){if(!e)return[t,i];const n=t,a=t+i;let s=(0,h.binarySearchFirstItem)(e,e=>e[0]>=n),r=(e[s][0]>n&&--s,(0,h.binarySearchFirstItem)(e,e=>e[0]>=a,s));return e[r][0]>a&&--r,[n+e[s][1],i+e[r][1]-e[s][1]]}(l,a.index,a[0].length),s&&(r.push(a),o.push(s)));this._pageMatches[i]=r,this._pageMatchesLength[i]=o}function te(e,r){const o=this._state["matchDiacritics"];let l=!1;return(e=e.replace(R,(e,t,i,n,a,s)=>t?`[ ]*\\${t}[ ]*`:i?`[ ]*${i}[ ]*`:n?"[ ]+":o?a||s:a?c.has(a.charCodeAt(0))?a:"":r?(l=!0,s+"\\p{M}*"):s)).endsWith("[ ]*")&&(e=e.slice(0,e.length-"[ ]*".length)),o&&r&&(l=!0,e=`${e}(?=[${V}]|[^\\p{M}]|$)`),[l,e]}function ie(e){let t=l(this,f);if(0!==t.length){var{caseSensitive:n,entireWord:a,phraseSearch:s}=this._state,r=this._pageContents[e];const o=this._hasDiacritics[e];let i=!1;s?[i,t]=d(this,_,te).call(this,t,o):(s=t.match(/\S+/g))&&(t=s.sort().reverse().map(e=>{var[e,t]=d(this,_,te).call(this,e,o);return i=i||e,`(${t})`}).join("|"));s="g"+(i?"u":"")+(n?"":"i"),n=(t=new RegExp(t,s),d(this,w,ee).call(this,t,a,e,r),this._state.highlightAll&&d(this,S,D).call(this,e),this._resumePageIdx===e&&(this._resumePageIdx=null,d(this,T,se).call(this)),this._pageMatches[e].length);0this._pdfDocument.getPage(n+1).then(e=>e.getTextContent()).then(e=>{var t=[];for(const i of e.items)t.push(i.str),i.hasEOL&&t.push("\n");[this._pageContents[n],this._pageDiffs[n],this._hasDiacritics[n]]=u(t.join("")),a.resolve()},e=>{console.error("Unable to get text content for page "+(n+1),e),this._pageContents[n]="",this._pageDiffs[n]=null,this._hasDiacritics[n]=!1,a.resolve()}))}}}function D(e){this._scrollMatches&&this._selected.pageIdx===e&&(this._linkService.page=e+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:e})}function N(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}function x(){var e=this._state.findPrevious,t=this._linkService.page-1,i=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=t,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this._matchesCountTotal=0,d(this,L,N).call(this);for(let e=0;e{this._pendingFindMatches.delete(e),d(this,j,ie).call(this,e)}))}if(""===l(this,f))d(this,k,O).call(this,a.FOUND);else if(!this._resumePageIdx){t=this._offset;if(this._pagesToSearch=i,null!==t.matchIdx){var n=this._pageMatches[t.pageIdx].length;if(!e&&t.matchIdx+1=i||t.pageIdx<0)&&(t.pageIdx=e?i-1:0,t.wrapped=!0)}function B(){var e=0{!this._pdfDocument||t&&this._pdfDocument!==t||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),d(this,k,O).call(this,a.FOUND),this._highlightMatches=!1,d(this,L,N).call(this))})}function le(){var t,{pageIdx:i,matchIdx:e}=this._selected;let n=0,a=this._matchesCountTotal;if(-1!==e){for(let e=0;ea?a=0:n,total:a}}function he(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:d(this,A,le).call(this)})}function O(e){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:1{Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterType=void 0,t.getCharacterType=function(e){if(e<11904){if(0==(65408&e))return function(e){return 32===e||9===e||13===e||10===e}(e)?i.SPACE:function(e){return 97<=e&&e<=122||65<=e&&e<=90}(e)||function(e){return 48<=e&&e<=57}(e)||95===e?i.ALPHA_LETTER:i.PUNCT;if(3584==(65408&e))return i.THAI_LETTER;if(160===e)return i.SPACE}else{if(function(e){return 13312<=e&&e<=40959||63744<=e&&e<=64255}(e))return i.HAN_LETTER;if(function(e){return 12448<=e&&e<=12543}(e))return i.KATAKANA_LETTER;if(function(e){return 12352<=e&&e<=12447}(e))return i.HIRAGANA_LETTER;if(function(e){return 65376<=e&&e<=65439}(e))return i.HALFWIDTH_KATAKANA_LETTER}return i.ALPHA_LETTER};const i={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};t.CharacterType=i},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFHistory=void 0,t.isDestArraysEqual=o,t.isDestHashesEqual=a;var s=i(1),n=i(6);function r(){return document.location.hash}function a(e,t){return"string"==typeof e&&"string"==typeof t&&(e===t||(0,s.parseQueryString)(e).get("nameddest")===t)}function o(i,n){if(!Array.isArray(i)||!Array.isArray(n))return!1;if(i.length!==n.length)return!1;for(let e=0,t=i.length;e{this._isPagesLoaded=!1,this.eventBus._on("pagesloaded",e=>{this._isPagesLoaded=!!e.pagesCount},{once:!0})})}initialize(e){var{fingerprint:e,resetHistory:t=!1,updateUrl:i=!1}=e;if(e&&"string"==typeof e){this._initialized&&this.reset();var n,a,s=""!==this._fingerprint&&this._fingerprint!==e,e=(this._fingerprint=e,this._updateUrl=!0===i,this._initialized=!0,this._bindEvents(),window.history.state);if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=r(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(e,!0)||t)return{hash:i,page:n,rotation:a}=this._parseCurrentHash(!0),!i||s||t?void this._pushOrReplaceState(null,!0):void this._pushOrReplaceState({hash:i,page:n,rotation:a},!0);s=e.destination;this._updateInternalState(s,e.uid,!0),void 0!==s.rotation&&(this._initialRotation=s.rotation),s.dest?(this._initialBookmark=JSON.stringify(s.dest),this._destination.page=null):s.hash?this._initialBookmark=s.hash:s.page&&(this._initialBookmark="page="+s.page)}else console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.')}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push(t){var{namedDest:t=null,explicitDest:i,pageNumber:n}=t;if(this._initialized)if(t&&"string"!=typeof t)console.error("PDFHistory.push: "+`"${t}" is not a valid namedDest parameter.`);else if(Array.isArray(i))if(this._isValidPage(n)||null===n&&!this._destination){t=t||JSON.stringify(i);if(t){let e=!1;if(this._destination&&(a(this._destination.hash,t)||o(this._destination.dest,i))){if(this._destination.page)return;e=!0}this._popStateInProgress&&!e||(this._pushOrReplaceState({dest:i,hash:t,page:n,rotation:this.linkService.rotation},e),this._popStateInProgress)||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1}))}}else console.error("PDFHistory.push: "+`"${n}" is not a valid pageNumber parameter.`);else console.error("PDFHistory.push: "+`"${i}" is not a valid explicitDest parameter.`)}pushPage(e){var t;this._initialized&&(this._isValidPage(e)?(null==(t=this._destination)?void 0:t.page)===e||this._popStateInProgress||(this._pushOrReplaceState({dest:null,hash:"page="+e,page:e,rotation:this.linkService.rotation}),this._popStateInProgress)||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})):console.error(`PDFHistory.pushPage: "${e}" is not a valid page number.`))}pushCurrentPosition(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}back(){var e;this._initialized&&!this._popStateInProgress&&(e=window.history.state,this._isValidState(e))&&0=t.first&&this._destination.page<=t.page){if(void 0!==this._destination.dest||!this._destination.first)return;e=!0}this._pushOrReplaceState(t,e)}}else this._pushOrReplaceState(t)}}_isValidPage(e){return Number.isInteger(e)&&0{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null},1e3))}_popState(e){var e=e["state"],t=r(),i=this._currentHash!==t;this._currentHash=t,e?this._isValidState(e)&&(this._popStateInProgress=!0,i&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then(()=>{this._blockHashChange--})),t=e.destination,this._updateInternalState(t,e.uid,!0),(0,s.isValidRotation)(t.rotation)&&(this.linkService.rotation=t.rotation),t.dest?this.linkService.goToDestination(t.dest):t.hash?this.linkService.setHash(t.hash):t.page&&(this.linkService.page=t.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})):(this._uid++,{hash:i,page:e,rotation:t}=this._parseCurrentHash(),this._pushOrReplaceState({hash:i,page:e,rotation:t},!0))}_pageHide(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFLayerViewer=void 0;i=i(14);function n(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function a(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var s=new WeakSet;class r extends i.BaseTreeViewer{constructor(e){super(e),n(this,s),this.l10n=e.l10n,this.eventBus._on("optionalcontentconfigchanged",e=>{a(this,s,o).call(this,e.promise)}),this.eventBus._on("resetlayers",()=>{a(this,s,o).call(this)}),this.eventBus._on("togglelayerstree",this._toggleAllTreeItems.bind(this))}reset(){super.reset(),this._optionalContentConfig=null,this._optionalContentHash=null}_dispatchEvent(e){this.eventBus.dispatch("layersloaded",{source:this,layersCount:e})}_bindLink(t,e){let{groupId:i,input:n}=e;const a=()=>{this._optionalContentConfig.setVisibility(i,n.checked),this._optionalContentHash=this._optionalContentConfig.getHash(),this.eventBus.dispatch("optionalcontentconfig",{source:this,promise:Promise.resolve(this._optionalContentConfig)})};t.onclick=e=>e.target===n?(a(),!0):e.target!==t||(n.checked=!n.checked,a(),!1)}async _setNestedName(e,t){var{name:t=null}=t;"string"==typeof t?e.textContent=this._normalizeTextContent(t):(e.textContent=await this.l10n.get("additional_layers"),e.style.fontStyle="italic")}_addToggleButton(e,t){var{name:t=null}=t;super._addToggleButton(e,null===t)}_toggleAllTreeItems(){this._optionalContentConfig&&super._toggleAllTreeItems()}render(i){var{optionalContentConfig:n,pdfDocument:i}=i,i=(this._optionalContentConfig&&this.reset(),this._optionalContentConfig=n||null,this._pdfDocument=i||null,null==n?void 0:n.getOrder());if(i){this._optionalContentHash=n.getHash();var a=document.createDocumentFragment(),s=[{parent:a,groups:i}];let e=0,t=!1;for(;0{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFOutlineViewer=void 0;var n=i(14),d=i(5),a=i(1);class s extends n.BaseTreeViewer{constructor(e){super(e),this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.eventBus._on("toggleoutlinetree",this._toggleAllTreeItems.bind(this)),this.eventBus._on("currentoutlineitem",this._currentOutlineItem.bind(this)),this.eventBus._on("pagechanging",e=>{this._currentPageNumber=e.pageNumber}),this.eventBus._on("pagesloaded",e=>{this._isPagesLoaded=!!e.pagesCount,this._currentOutlineItemCapability&&!this._currentOutlineItemCapability.settled&&this._currentOutlineItemCapability.resolve(this._isPagesLoaded)}),this.eventBus._on("sidebarviewchanged",e=>{this._sidebarView=e.view})}reset(){super.reset(),this._outline=null,this._pageNumberToDestHashCapability=null,this._currentPageNumber=1,this._isPagesLoaded=null,this._currentOutlineItemCapability&&!this._currentOutlineItemCapability.settled&&this._currentOutlineItemCapability.resolve(!1),this._currentOutlineItemCapability=null}_dispatchEvent(e){var t;this._currentOutlineItemCapability=(0,d.createPromiseCapability)(),0===e||null!=(t=this._pdfDocument)&&t.loadingParams.disableAutoFetch?this._currentOutlineItemCapability.resolve(!1):null!==this._isPagesLoaded&&this._currentOutlineItemCapability.resolve(this._isPagesLoaded),this.eventBus.dispatch("outlineloaded",{source:this,outlineCount:e,currentOutlineItemPromise:this._currentOutlineItemCapability.promise})}_bindLink(e,t){let{url:i,newWindow:n,action:a,attachment:s,dest:r,setOCGState:o}=t;const l=this["linkService"];i?l.addLinkAttributes(e,i,n):a?(e.href=l.getAnchorUrl(""),e.onclick=()=>(l.executeNamedAction(a),!1)):s?(e.href=l.getAnchorUrl(""),e.onclick=()=>(this.downloadManager.openOrDownloadData(e,s.content,s.filename),!1)):o?(e.href=l.getAnchorUrl(""),e.onclick=()=>(l.executeSetOCGState(o),!1)):(e.href=l.getDestinationHash(r),e.onclick=e=>(this._updateCurrentTreeItem(e.target.parentNode),r&&l.goToDestination(r),!1))}_setStyles(e,t){var{bold:t,italic:i}=t;t&&(e.style.fontWeight="bold"),i&&(e.style.fontStyle="italic")}_addToggleButton(e,t){var{count:t,items:i}=t;let n=!1;if(t<0){let e=i.length;if(0a.get(t))&&(h=this.linkService.getDestinationHash(r),n.set(t,h),a.set(t,l))}0{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFPresentationMode=void 0;var n=t(1),i=t(5);function a(e,t){r(e,t),t.add(e)}function s(e,t,i){r(e,t),t.set(e,i)}function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t){t=h(e,t,"get");return t.get?t.get.call(e):t.value}function l(e,t,i){t=h(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function h(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}function d(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const V=3e3,c="pdfPresentationMode",u="pdfPresentationModeControls",F=50,R=.1,p=50,g=Math.PI/6;var f=new WeakMap,m=new WeakMap,v=new WeakSet,w=new WeakSet,_=new WeakSet,b=new WeakSet,y=new WeakSet,P=new WeakSet,E=new WeakSet,S=new WeakSet,L=new WeakSet,C=new WeakSet,T=new WeakSet,M=new WeakSet,I=new WeakSet,A=new WeakSet,k=new WeakSet;function W(e){var t,i;this.active&&(e.preventDefault(),e=(0,n.normalizeWheelEventDelta)(e),t=Date.now(),(i=this.mouseScrollTimeStamp)=R&&(i=this.mouseScrollDelta,d(this,L,x).call(this),0{this.pdfViewer.scrollMode=n.ScrollMode.PAGE,null!==o(this,m).spreadMode&&(this.pdfViewer.spreadMode=n.SpreadMode.NONE),this.pdfViewer.currentPageNumber=o(this,m).pageNumber,this.pdfViewer.currentScaleValue="page-fit",null!==o(this,m).annotationEditorMode&&(this.pdfViewer.annotationEditorMode=i.AnnotationEditorType.NONE)},0),d(this,T,$).call(this),d(this,E,N).call(this),this.contextMenuOpen=!1,window.getSelection().removeAllRanges()}function H(){const e=this.pdfViewer.currentPageNumber;this.container.classList.remove(c),setTimeout(()=>{d(this,k,B).call(this),d(this,w,D).call(this,n.PresentationModeState.NORMAL),this.pdfViewer.scrollMode=o(this,m).scrollMode,null!==o(this,m).spreadMode&&(this.pdfViewer.spreadMode=o(this,m).spreadMode),this.pdfViewer.currentScaleValue=o(this,m).scaleValue,this.pdfViewer.currentPageNumber=e,null!==o(this,m).annotationEditorMode&&(this.pdfViewer.annotationEditorMode=o(this,m).annotationEditorMode),l(this,m,null)},0),d(this,M,X).call(this),d(this,S,G).call(this),d(this,L,x).call(this),this.contextMenuOpen=!1}function z(e){this.contextMenuOpen?(this.contextMenuOpen=!1,e.preventDefault()):0!==e.button||e.target.href&&e.target.classList.contains("internalLink")||(e.preventDefault(),e.shiftKey?this.pdfViewer.previousPage():this.pdfViewer.nextPage())}function j(){this.contextMenuOpen=!0}function N(){this.controlsTimeout?clearTimeout(this.controlsTimeout):this.container.classList.add(u),this.controlsTimeout=setTimeout(()=>{this.container.classList.remove(u),delete this.controlsTimeout},V)}function G(){this.controlsTimeout&&(clearTimeout(this.controlsTimeout),this.container.classList.remove(u),delete this.controlsTimeout)}function x(){this.mouseScrollTimeStamp=0,this.mouseScrollDelta=0}function K(e){if(this.active)if(1p&&(n<=g||n>=Math.PI-g)?e=t:Math.abs(i)>p&&Math.abs(n-Math.PI/2)<=g&&(e=i),0{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFRenderingQueue=void 0;var n=i(5),a=i(1);t.PDFRenderingQueue=class{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1}setViewer(e){this.pdfViewer=e}setThumbnailViewer(e){this.pdfThumbnailViewer=e}isHighestPriority(e){return this.highestPriorityPage===e.renderingId}hasViewer(){return!!this.pdfViewer}renderHighestPriority(e){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.pdfViewer.forceRendering(e)||this.isThumbnailViewEnabled&&null!=(e=this.pdfThumbnailViewer)&&e.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4))}getHighestPriority(e,i,n){var t=3{this.renderHighestPriority()}).catch(e=>{e instanceof n.RenderingCancelledException||console.error(`renderView: "${e}"`)})}return!0}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFScriptingManager=void 0;var h=i(1),r=i(5);t.PDFScriptingManager=class{constructor(e){var{eventBus:e,sandboxBundleSrc:t=null,scriptingFactory:i=null,docPropertiesLookup:n=null}=e;this._pdfDocument=null,this._pdfViewer=null,this._closeCapability=null,this._destroyCapability=null,this._scripting=null,this._mouseState=Object.create(null),this._ready=!1,this._eventBus=e,this._sandboxBundleSrc=t,this._scriptingFactory=i,this._docPropertiesLookup=n}setViewer(e){this._pdfViewer=e}async setDocument(e){if(this._pdfDocument&&await this._destroyScripting(),this._pdfDocument=e){var[t,i,n]=await Promise.all([e.getFieldObjects(),e.getCalculationOrderIds(),e.getJSActions()]);if(t||n){if(e===this._pdfDocument){try{this._scripting=this._createScripting()}catch(e){return console.error(`PDFScriptingManager.setDocument: "${null==e?void 0:e.message}".`),void await this._destroyScripting()}this._internalEvents.set("updatefromsandbox",e=>{(null==e?void 0:e.source)===window&&this._updateFromSandbox(e.detail)}),this._internalEvents.set("dispatcheventinsandbox",e=>{var t;null!=(t=this._scripting)&&t.dispatchEventInSandbox(e.detail)}),this._internalEvents.set("pagechanging",e=>{var{pageNumber:e,previous:t}=e;e!==t&&(this._dispatchPageClose(t),this._dispatchPageOpen(e))}),this._internalEvents.set("pagerendered",e=>{e=e.pageNumber;this._pageOpenPending.has(e)&&e===this._pdfViewer.currentPageNumber&&this._dispatchPageOpen(e)}),this._internalEvents.set("pagesdestroy",async e=>{var t;await this._dispatchPageClose(this._pdfViewer.currentPageNumber),await(null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillClose"})),null!=(t=this._closeCapability)&&t.resolve()}),this._domEvents.set("mousedown",e=>{this._mouseState.isDown=!0}),this._domEvents.set("mouseup",e=>{this._mouseState.isDown=!1});for(var[a,s]of this._internalEvents)this._eventBus._on(a,s);for(var[r,o]of this._domEvents)window.addEventListener(r,o,!0);try{var l=await this._getDocProperties();if(e!==this._pdfDocument)return;await this._scripting.createSandbox({objects:t,calculationOrder:i,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:{...l,actions:n}}),this._eventBus.dispatch("sandboxcreated",{source:this})}catch(e){return console.error(`PDFScriptingManager.setDocument: "${null==e?void 0:e.message}".`),void await this._destroyScripting()}await(null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"Open"})),await this._dispatchPageOpen(this._pdfViewer.currentPageNumber,!0),Promise.resolve().then(()=>{e===this._pdfDocument&&(this._ready=!0)})}}else await this._destroyScripting()}}async dispatchWillSave(e){var t;return null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillSave"})}async dispatchDidSave(e){var t;return null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidSave"})}async dispatchWillPrint(e){var t;return null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillPrint"})}async dispatchDidPrint(e){var t;return null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidPrint"})}get mouseState(){return this._mouseState}get destroyPromise(){var e;return(null==(e=this._destroyCapability)?void 0:e.promise)||null}get ready(){return this._ready}get _internalEvents(){return(0,r.shadow)(this,"_internalEvents",new Map)}get _domEvents(){return(0,r.shadow)(this,"_domEvents",new Map)}get _pageOpenPending(){return(0,r.shadow)(this,"_pageOpenPending",new Set)}get _visitedPages(){return(0,r.shadow)(this,"_visitedPages",new Map)}async _updateFromSandbox(e){var t=this._pdfViewer.isInPresentationMode||this._pdfViewer.isChangingPresentationMode,{id:i,siblings:n,command:a,value:s}=e;if(i){if(!t||!e.focus){delete e.id,delete e.siblings;for(const l of n?[i,...n]:[i]){var r=document.querySelector(`[data-element-id="${l}"]`);r?r.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:e})):null!=(r=this._pdfDocument)&&r.annotationStorage.setValue(l,e)}}}else switch(a){case"clear":console.clear();break;case"error":console.error(s);break;case"layout":if(t)return;var o=(0,h.apiPageLayoutToViewerModes)(s);this._pdfViewer.spreadMode=o.spreadMode;break;case"page-num":this._pdfViewer.currentPageNumber=s+1;break;case"print":await this._pdfViewer.pagesPromise,this._eventBus.dispatch("print",{source:this});break;case"println":console.log(s);break;case"zoom":if(t)return;this._pdfViewer.currentScaleValue=s;break;case"SaveAs":this._eventBus.dispatch("download",{source:this});break;case"FirstPage":this._pdfViewer.currentPageNumber=1;break;case"LastPage":this._pdfViewer.currentPageNumber=this._pdfViewer.pagesCount;break;case"NextPage":this._pdfViewer.nextPage();break;case"PrevPage":this._pdfViewer.previousPage();break;case"ZoomViewIn":if(t)return;this._pdfViewer.increaseScale();break;case"ZoomViewOut":if(t)return;this._pdfViewer.decreaseScale()}}async _dispatchPageOpen(i){var e;const n=this._pdfDocument,a=this._visitedPages;if(1{var e,t=await(a.has(i)?null:null==(t=s.pdfPage)?void 0:t.getJSActions());n===this._pdfDocument&&await(null==(e=this._scripting)?void 0:e.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:i,actions:t}))})(),a.set(i,e))}}async _dispatchPageClose(e){var t,i=this._pdfDocument,n=this._visitedPages;this._closeCapability&&!this._pageOpenPending.has(e)&&(t=n.get(e))&&(n.set(e,null),await t,i===this._pdfDocument)&&await(null==(n=this._scripting)?void 0:n.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:e}))}async _getDocProperties(){if(this._docPropertiesLookup)return this._docPropertiesLookup(this._pdfDocument);throw new Error("_getDocProperties: Unable to lookup properties.")}_createScripting(){if(this._destroyCapability=(0,r.createPromiseCapability)(),this._scripting)throw new Error("_createScripting: Scripting already exists.");if(this._scriptingFactory)return this._scriptingFactory.createScripting({sandboxBundleSrc:this._sandboxBundleSrc});throw new Error("_createScripting: Cannot create scripting.")}async _destroyScripting(){var e;if(this._scripting){this._closeCapability&&(await Promise.race([this._closeCapability.promise,new Promise(e=>{setTimeout(e,1e3)})]).catch(e=>{}),this._closeCapability=null),this._pdfDocument=null;try{await this._scripting.destroySandbox()}catch(e){}for(var[t,i]of this._internalEvents)this._eventBus._off(t,i);this._internalEvents.clear();for(var[n,a]of this._domEvents)window.removeEventListener(n,a,!0);this._domEvents.clear(),this._pageOpenPending.clear(),this._visitedPages.clear(),this._scripting=null,delete this._mouseState.isDown,this._ready=!1,null!=(e=this._destroyCapability)&&e.resolve()}else(this._pdfDocument=null)!=(e=this._destroyCapability)&&e.resolve()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFSidebar=void 0;var l=i(1);function s(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function h(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const n="pdfSidebarNotification";var d=new WeakSet,c=new WeakSet,u=new WeakSet,r=new WeakSet,o=new WeakSet,p=new WeakSet;function g(){this.isInitialViewSet&&!this.isInitialEventDispatched&&(this.isInitialEventDispatched=!0),this.eventBus.dispatch("sidebarviewchanged",{source:this,view:this.visibleView})}function f(){this.onToggled?this.onToggled():(this.pdfViewer.forceRendering(),this.pdfThumbnailViewer.forceRendering())}function m(){var{pdfViewer:t,pdfThumbnailViewer:i}=this,n=t.pagesCount;for(let e=0;e{e.target===this.sidebarContainer&&this.outerContainer.classList.remove("sidebarMoving")}),this.toggleButton.addEventListener("click",()=>{this.toggle()}),this.thumbnailButton.addEventListener("click",()=>{this.switchView(l.SidebarView.THUMBS)}),this.outlineButton.addEventListener("click",()=>{this.switchView(l.SidebarView.OUTLINE)}),this.outlineButton.addEventListener("dblclick",()=>{this.eventBus.dispatch("toggleoutlinetree",{source:this})}),this.attachmentsButton.addEventListener("click",()=>{this.switchView(l.SidebarView.ATTACHMENTS)}),this.layersButton.addEventListener("click",()=>{this.switchView(l.SidebarView.LAYERS)}),this.layersButton.addEventListener("dblclick",()=>{this.eventBus.dispatch("resetlayers",{source:this})}),this._currentOutlineItemButton.addEventListener("click",()=>{this.eventBus.dispatch("currentoutlineitem",{source:this})});const t=(e,t,i)=>{t.disabled=!e,e?h(this,r,a).call(this):this.active===i&&this.switchView(l.SidebarView.THUMBS)};this.eventBus._on("outlineloaded",e=>{t(e.outlineCount,this.outlineButton,l.SidebarView.OUTLINE),e.currentOutlineItemPromise.then(e=>{this.isInitialViewSet&&(this._currentOutlineItemButton.disabled=!e)})}),this.eventBus._on("attachmentsloaded",e=>{t(e.attachmentsCount,this.attachmentsButton,l.SidebarView.ATTACHMENTS)}),this.eventBus._on("layersloaded",e=>{t(e.layersCount,this.layersButton,l.SidebarView.LAYERS)}),this.eventBus._on("presentationmodechanged",e=>{e.state===l.PresentationModeState.NORMAL&&this.visibleView===l.SidebarView.THUMBS&&h(this,u,m).call(this)})}t.PDFSidebar=class{constructor(e){var{elements:e,pdfViewer:t,pdfThumbnailViewer:i,eventBus:n,l10n:a}=e;s(this,p),s(this,o),s(this,r),s(this,u),s(this,c),s(this,d),this.isOpen=!1,this.active=l.SidebarView.THUMBS,this.isInitialViewSet=!1,this.isInitialEventDispatched=!1,this.onToggled=null,this.pdfViewer=t,this.pdfThumbnailViewer=i,this.outerContainer=e.outerContainer,this.sidebarContainer=e.sidebarContainer,this.toggleButton=e.toggleButton,this.thumbnailButton=e.thumbnailButton,this.outlineButton=e.outlineButton,this.attachmentsButton=e.attachmentsButton,this.layersButton=e.layersButton,this.thumbnailView=e.thumbnailView,this.outlineView=e.outlineView,this.attachmentsView=e.attachmentsView,this.layersView=e.layersView,this._outlineOptionsContainer=e.outlineOptionsContainer,this._currentOutlineItemButton=e.currentOutlineItemButton,this.eventBus=n,this.l10n=a,h(this,p,w).call(this)}reset(){this.isInitialViewSet=!1,this.isInitialEventDispatched=!1,h(this,o,v).call(this,!0),this.switchView(l.SidebarView.THUMBS),this.outlineButton.disabled=!1,this.attachmentsButton.disabled=!1,this.layersButton.disabled=!1,this._currentOutlineItemButton.disabled=!0}get visibleView(){return this.isOpen?this.active:l.SidebarView.NONE}setInitialView(){var e=0{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFSidebarResizer=void 0;var n=i(1);const a="sidebarResizing";t.PDFSidebarResizer=class{constructor(e,t,i){this.isRTL=!1,this.sidebarOpen=!1,this._width=null,this._outerContainerWidth=null,this._boundEvents=Object.create(null),this.outerContainer=e.outerContainer,this.resizer=e.resizer,this.eventBus=t,i.getDirection().then(e=>{this.isRTL="rtl"===e}),this._addEventListeners()}get outerContainerWidth(){return this._outerContainerWidth||(this._outerContainerWidth=this.outerContainer.clientWidth)}_updateWidth(){let e=0t?t:e)<200?200:e)!==this._width&&(this._width=e,n.docStyle.setProperty("--sidebar-width",e+"px"),!0)}_mouseMove(e){let t=e.clientX;this.isRTL&&(t=this.outerContainerWidth-t),this._updateWidth(t)}_mouseUp(e){this.outerContainer.classList.remove(a),this.eventBus.dispatch("resize",{source:this});var t=this._boundEvents;window.removeEventListener("mousemove",t.mouseMove),window.removeEventListener("mouseup",t.mouseUp)}_addEventListeners(){const t=this._boundEvents;t.mouseMove=this._mouseMove.bind(this),t.mouseUp=this._mouseUp.bind(this),this.resizer.addEventListener("mousedown",e=>{0===e.button&&(this.outerContainer.classList.add(a),window.addEventListener("mousemove",t.mouseMove),window.addEventListener("mouseup",t.mouseUp))}),this.eventBus._on("sidebarviewchanged",e=>{this.sidebarOpen=!(null==e||!e.view)}),this.eventBus._on("resize",e=>{if((null==e?void 0:e.source)===window&&(this._outerContainerWidth=null,this._width))if(this.sidebarOpen){this.outerContainer.classList.add(a);const t=this._updateWidth(this._width);Promise.resolve().then(()=>{this.outerContainer.classList.remove(a),t&&this.eventBus.dispatch("resize",{source:this})})}else this._updateWidth(this._width)})}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFThumbnailViewer=void 0;var l=i(1),o=i(28);function s(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function n(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const h="selected";var r=new WeakSet,d=new WeakSet;async function a(e){if(e.pdfPage)return e.pdfPage;try{var t=await this.pdfDocument.getPage(e.id);return e.pdfPage||e.setPdfPage(t),t}catch(e){return console.error("Unable to get page for thumb view",e),null}}function c(e){var t;return 1===(null==(t=e.first)?void 0:t.id)||(null==(t=e.last)?void 0:t.id)!==this._thumbnails.length&&this.scroll.down}t.PDFThumbnailViewer=class{constructor(e){var{container:e,linkService:t,renderingQueue:i,l10n:n,pageColors:a}=e;s(this,d),s(this,r),this.container=e,this.linkService=t,this.renderingQueue=i,this.l10n=n,this.pageColors=a||null,!this.pageColors||CSS.supports("color",this.pageColors.background)&&CSS.supports("color",this.pageColors.foreground)||((this.pageColors.background||this.pageColors.foreground)&&console.warn("PDFThumbnailViewer: Ignoring `pageColors`-option, since the browser doesn't support the values used."),this.pageColors=null),this.scroll=(0,l.watchScroll)(this.container,this._scrollUpdated.bind(this)),this._resetView()}_scrollUpdated(){this.renderingQueue.renderHighestPriority()}getThumbnail(e){return this._thumbnails[e]}_getVisibleThumbs(){return(0,l.getVisibleElements)({scrollEl:this.container,views:this._thumbnails})}scrollThumbnailIntoView(t){if(this.pdfDocument){var i=this._thumbnails[t-1];if(i){t!==this._currentPageNumber&&(this._thumbnails[this._currentPageNumber-1].div.classList.remove(h),i.div.classList.add(h));var{first:n,last:a,views:s}=this._getVisibleThumbs();if(0=a.id)e=!0;else for(var{id:r,percent:o}of s)if(r===t){e=o<100;break}e&&(0,l.scrollIntoView)(i.div,{top:-19})}this._currentPageNumber=t}else console.error('scrollThumbnailIntoView: Invalid "pageNumber" parameter.')}}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,l.isValidRotation)(e))throw new Error("Invalid thumbnails rotation angle.");if(this.pdfDocument&&this._pagesRotation!==e){var t={rotation:this._pagesRotation=e};for(const i of this._thumbnails)i.update(t)}}cleanup(){for(const e of this._thumbnails)e.renderingState!==l.RenderingStates.FINISHED&&e.reset();o.TempImageFactory.destroyCanvas()}_resetView(){this._thumbnails=[],this._currentPageNumber=1,this._pageLabels=null,this._pagesRotation=0,this.container.textContent=""}setDocument(s){if(this.pdfDocument&&(this._cancelRendering(),this._resetView()),this.pdfDocument=s){var e=s.getPage(1);const r=s.getOptionalContentConfig();e.then(e=>{var t,i=s.numPages,n=e.getViewport({scale:1});for(let e=1;e<=i;++e){var a=new o.PDFThumbnailView({container:this.container,id:e,defaultViewport:n.clone(),optionalContentConfigPromise:r,linkService:this.linkService,renderingQueue:this.renderingQueue,l10n:this.l10n,pageColors:this.pageColors});this._thumbnails.push(a)}null!=(t=this._thumbnails[0])&&t.setPdfPage(e),this._thumbnails[this._currentPageNumber-1].div.classList.add(h)}).catch(e=>{console.error("Unable to initialize thumbnail viewer",e)})}}_cancelRendering(){for(const e of this._thumbnails)e.cancelRendering()}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("PDFThumbnailViewer_setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let e=0,t=this._thumbnails.length;e{this.renderingQueue.renderView(i)}),!0)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TempImageFactory=t.PDFThumbnailView=void 0;var c=i(1),l=i(5);function a(e,t,i,n){o(e,t),r(i,"set");t=e,e=i,i=n;if(e.set)e.set.call(t,i);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=i}return n}function s(e,t,i){o(e,t),r(i,"get");t=e,e=i;return e.get?e.get.call(t):e.value}function r(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function o(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}class h{static getCanvas(e,t){var i=s(this,h,d)||a(this,h,d,document.createElement("canvas")),n=(i.width=e,i.height=t,i.getContext("2d",{alpha:!1}));return n.save(),n.fillStyle="rgb(255, 255, 255)",n.fillRect(0,0,e,t),n.restore(),[i,i.getContext("2d")]}static destroyCanvas(){var e=s(this,h,d);e&&(e.width=0,e.height=0),a(this,h,d,null)}}t.TempImageFactory=h;var d={writable:!0,value:null};t.PDFThumbnailView=class{constructor(e){let{container:t,id:i,defaultViewport:n,optionalContentConfigPromise:a,linkService:s,renderingQueue:r,l10n:o,pageColors:l}=e;this.id=i,this.renderingId="thumbnail"+i,this.pageLabel=null,this.pdfPage=null,this.rotation=0,this.viewport=n,this.pdfPageRotate=n.rotation,this._optionalContentConfigPromise=a||null,this.pageColors=l||null,this.linkService=s,this.renderingQueue=r,this.renderTask=null,this.renderingState=c.RenderingStates.INITIAL,this.resume=null;var e=this.viewport.width,h=e/this.viewport.height;this.canvasWidth=98,this.canvasHeight=this.canvasWidth/h|0,this.scale=this.canvasWidth/e,this.l10n=o;const d=document.createElement("a");d.href=s.getAnchorUrl("#page="+i),this._thumbPageTitle.then(e=>{d.title=e}),d.onclick=function(){return s.goToPage(i),!1},this.anchor=d;h=document.createElement("div"),h.className="thumbnail",h.setAttribute("data-page-number",this.id),this.div=h,e=document.createElement("div");e.className="thumbnailSelectionRing";e.style.width=this.canvasWidth+2+"px",e.style.height=this.canvasHeight+2+"px",this.ring=e,h.append(e),d.append(h),t.append(d)}setPdfPage(e){this.pdfPage=e,this.pdfPageRotate=e.rotate;var t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:1,rotation:t}),this.reset()}reset(){this.cancelRendering(),this.renderingState=c.RenderingStates.INITIAL;var e=this.viewport.width,t=this.viewport.height,t=(this.canvasHeight=this.canvasWidth/(e/t)|0,this.scale=this.canvasWidth/e,this.div.removeAttribute("data-loaded"),this.ring);t.textContent="";t.style.width=this.canvasWidth+2+"px",t.style.height=this.canvasHeight+2+"px",this.canvas&&(this.canvas.width=0,this.canvas.height=0,delete this.canvas),this.image&&(this.image.removeAttribute("src"),delete this.image)}update(e){var{rotation:e=null}=e,e=("number"==typeof e&&(this.rotation=e),(this.rotation+this.pdfPageRotate)%360);this.viewport=this.viewport.clone({scale:1,rotation:e}),this.reset()}cancelRendering(){this.renderTask&&(this.renderTask.cancel(),this.renderTask=null),this.resume=null}_getPageDrawContext(){var e=0{t.setAttribute("aria-label",e)}),t.style.width=this.canvasWidth+"px",t.style.height=this.canvasHeight+"px",t.src=e.toDataURL(),this.image=t,this.div.setAttribute("data-loaded",!0),this.ring.append(t),e.width=0,e.height=0}draw(){var t=this;if(this.renderingState!==c.RenderingStates.INITIAL)return console.error("Must be in new state before drawing"),Promise.resolve();var e=this["pdfPage"];if(!e)return this.renderingState=c.RenderingStates.FINISHED,Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=c.RenderingStates.RUNNING;async function i(){var e=0{this.renderingQueue.isHighestPriority(this)?e():(this.renderingState=c.RenderingStates.PAUSED,this.resume=()=>{this.renderingState=c.RenderingStates.RUNNING,e()})};e=o.promise.then(function(){return i(null)},function(e){return i(e)});return e.finally(()=>{var e;a.width=0,a.height=0,this.linkService.isPageCached(this.id)||null!=(e=this.pdfPage)&&e.cleanup()}),e}setImage(e){var t,i;this.renderingState===c.RenderingStates.INITIAL&&({thumbnailCanvas:e,pdfPage:t,scale:i}=e,e)&&(this.pdfPage||this.setPdfPage(t),ii.width||t>i.height;)e>>=1,t>>=1;for(r.drawImage(i,0,0,i.width,i.height,0,0,e,t);e>2*a.width;)r.drawImage(s,0,0,e,t,0,0,e>>1,t>>1),e>>=1,t>>=1;n.drawImage(s,0,0,e,t,0,0,a.width,a.height)}return a}get _thumbPageTitle(){return this.l10n.get("thumb_page_title",{page:this.pageLabel??this.id})}get _thumbPageCanvas(){return this.l10n.get("thumb_page_canvas",{page:this.pageLabel??this.id})}setPageLabel(e){this.pageLabel="string"==typeof e?e:null,this._thumbPageTitle.then(e=>{this.anchor.title=e}),this.renderingState===c.RenderingStates.FINISHED&&this._thumbPageCanvas.then(e=>{var t;null!=(t=this.image)&&t.setAttribute("aria-label",e)})}}},(O,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PagesCountLimit=e.PDFViewer=e.PDFPageViewBuffer=void 0;var m=t(5),_=t(1),V=t(30),F=t(32),u=t(31),R=t(33),W=t(23),U=t(3),H=t(35),z=t(36),j=t(37),G=t(38);function i(e,t){a(e,t),t.add(e)}function n(e,t,i){a(e,t),t.set(e,i)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}function w(e,t){t=s(e,t,"get");return t.get?t.get.call(e):t.value}function b(e,t,i){t=s(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function s(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}const r="enablePermissions",y={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};function P(e){return Object.values(m.AnnotationEditorType).includes(e)&&e!==m.AnnotationEditorType.DISABLE}e.PagesCountLimit=y;var o=new WeakMap,l=new WeakMap,h=new WeakSet;class d{constructor(e){i(this,h),n(this,o,{writable:!0,value:new Set}),n(this,l,{writable:!0,value:0}),b(this,l,e)}push(e){var t=w(this,o);t.has(e)&&t.delete(e),t.add(e),t.size>w(this,l)&&v(this,h,c).call(this)}resize(e){var t=1n)break}for(;i.size>w(this,l);)v(this,h,c).call(this)}has(e){return w(this,o).has(e)}[Symbol.iterator](){return w(this,o).keys()}}function c(){var e=w(this,o).keys().next().value;null!=e&&e.destroy(),w(this,o).delete(e)}e.PDFPageViewBuffer=d;var E=new WeakMap,S=new WeakMap,L=new WeakMap,p=new WeakMap,C=new WeakMap,g=new WeakMap,f=new WeakMap,T=new WeakMap,M=new WeakSet,I=new WeakSet,A=new WeakSet,k=new WeakSet,D=new WeakSet,N=new WeakSet,K=new WeakSet,$=new WeakSet,X=new WeakSet;function Z(e){var t={annotationEditorMode:w(this,S),annotationMode:w(this,p),textLayerMode:this.textLayerMode};return e&&(e.includes(m.PermissionFlag.COPY)||this.viewer.classList.add(r),e.includes(m.PermissionFlag.MODIFY_CONTENTS)||(t.annotationEditorMode=m.AnnotationEditorType.DISABLE),e.includes(m.PermissionFlag.MODIFY_ANNOTATIONS)||e.includes(m.PermissionFlag.FILL_INTERACTIVE_FORMS)||w(this,p)!==m.AnnotationMode.ENABLE_FORMS||(t.annotationMode=m.AnnotationMode.ENABLE)),t}function Q(){var e;return"hidden"!==document.visibilityState&&this.container.offsetParent&&0!==this._getVisiblePages().views.length?(e=new Promise(e=>{b(this,T,()=>{"hidden"===document.visibilityState&&(e(),document.removeEventListener("visibilitychange",w(this,T)),b(this,T,null))}),document.addEventListener("visibilitychange",w(this,T))}),Promise.race([this._onePageRenderedCapability.promise,e])):Promise.resolve()}function x(){if(this._scrollMode!==_.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");var e=this._currentPageNumber,t=w(this,f),i=this.viewer;if(i.textContent="",t.pages.length=0,this._spreadMode!==_.SpreadMode.NONE||this.isInPresentationMode){var n=new Set,a=this._spreadMode-1,s=(-1==a?n.add(e-1):e%2!=a?(n.add(e-1),n.add(e)):(n.add(e-2),n.add(e-1)),document.createElement("div"));s.className="spread",this.isInPresentationMode&&((a=document.createElement("div")).className="dummyPage",s.append(a));for(const o of n){var r=this._pages[o];r&&(s.append(r.div),t.pages.push(r))}i.append(s)}else{a=this._pages[e-1];i.append(a.div),t.pages.push(a)}t.scrollDown=e>=t.previousPageNumber,t.previousPageNumber=e}function B(e){let t=1y.FORCE_SCROLL_MODE_PAGE&&(console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document."),t=this._scrollMode=_.ScrollMode.PAGE,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:t})),this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:g})},()=>{}),this._onBeforeDraw=e=>{e=this._pages[e.pageNumber-1];e&&w(this,E).push(e)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=e=>{e.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve({timestamp:e.timestamp}),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null,w(this,T)&&(document.removeEventListener("visibilitychange",w(this,T)),b(this,T,null)))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([e,i]).then(e=>{var[e,t]=e;if(u===this.pdfDocument){this._firstPageCapability.resolve(e),this._optionalContentConfigPromise=f;var{annotationEditorMode:t,annotationMode:i,textLayerMode:n}=v(this,M,Z).call(this,t),a=(t!==m.AnnotationEditorType.DISABLE&&(t=t,p?console.warn("Warning: XFA-editing is not implemented."):P(t)?(b(this,L,new m.AnnotationEditorUIManager(this.container,this.eventBus)),t!==m.AnnotationEditorType.NONE&&w(this,L).updateMode(t)):console.error("Invalid AnnotationEditor mode: "+t)),this._scrollMode===_.ScrollMode.PAGE?null:this.viewer),s=this.currentScale,r=e.getViewport({scale:s*m.PixelsPerInch.PDF_TO_CSS_UNITS}),o=n===_.TextLayerMode.DISABLE||p?null:this,l=i!==m.AnnotationMode.DISABLE?this:null,h=p?this:null,d=w(this,L)?this:null;for(let e=1;e<=g;++e){var c=new R.PDFPageView({container:a,eventBus:this.eventBus,id:e,scale:s,defaultViewport:r.clone(),optionalContentConfigPromise:f,renderingQueue:this.renderingQueue,textLayerFactory:o,textLayerMode:n,annotationLayerFactory:l,annotationMode:i,xfaLayerFactory:h,annotationEditorLayerFactory:d,textHighlighterFactory:this,structTreeLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderer:this.renderer,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,pageColors:this.pageColors,l10n:this.l10n});this._pages.push(c)}t=this._pages[0];t&&(t.setPdfPage(e),this.linkService.cachePageRef(1,e.ref)),this._scrollMode===_.ScrollMode.PAGE?v(this,A,x).call(this):this._spreadMode!==_.SpreadMode.NONE&&this._updateSpreadMode(),v(this,I,Q).call(this).then(async()=>{var e;if(null!=(e=this.findController)&&e.setDocument(u),null!=(e=this._scriptingManager)&&e.setDocument(u),w(this,L)&&this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:w(this,S)}),u.loadingParams.disableAutoFetch||g>y.FORCE_LAZY_PAGE_INIT)this._pagesCapability.resolve();else{let n=g-1;if(n<=0)this._pagesCapability.resolve();else for(let i=2;i<=g;++i){var t=u.getPage(i).then(e=>{var t=this._pages[i-1];t.pdfPage||t.setPdfPage(e),this.linkService.cachePageRef(i,e.ref),0==--n&&this._pagesCapability.resolve()},e=>{console.error(`Unable to get page ${i} to initialize viewer`,e),0==--n&&this._pagesCapability.resolve()});i%y.PAUSE_EAGER_PAGE_INIT==0&&await t}}}),this.eventBus.dispatch("pagesinit",{source:this}),u.getMetadata().then(e=>{e=e.info;u===this.pdfDocument&&e.Language&&(this.viewer.lang=e.Language)}),this.defaultRenderingQueue&&this.update()}}).catch(e=>{console.error("Unable to initialize viewer",e),this._pagesCapability.reject(e)})}}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let e=0,t=this._pages.length;ethis.container.clientWidth}get isVerticalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}_getVisiblePages(){var e=this._scrollMode===_.ScrollMode.PAGE?w(this,f).pages:this._pages,t=this._scrollMode===_.ScrollMode.HORIZONTAL,i=t&&this._isContainerRtl;return(0,_.getVisibleElements)({scrollEl:this.container,views:e,sortByVisibility:!0,horizontal:t,rtl:i})}isPageVisible(e){return!!this.pdfDocument&&(Number.isInteger(e)&&0{this.renderingQueue.renderView(n)}),!0)}createTextLayerBuilder(e){var{textLayerDiv:e,pageIndex:t,viewport:i,eventBus:n,highlighter:a,accessibilityManager:s=null}=e;return new j.TextLayerBuilder({textLayerDiv:e,eventBus:n,pageIndex:t,viewport:i,highlighter:a,accessibilityManager:s})}createTextHighlighter(e){var{pageIndex:e,eventBus:t}=e;return new z.TextHighlighter({eventBus:t,pageIndex:e,findController:this.isInPresentationMode?null:this.findController})}createAnnotationLayerBuilder(e){var{pageDiv:e,pdfPage:t,annotationStorage:i=null==(i=this.pdfDocument)?void 0:i.annotationStorage,imageResourcesPath:n="",renderForms:a=!0,l10n:s=u.NullL10n,enableScripting:r=this.enableScripting,hasJSActionsPromise:o=null==(o=this.pdfDocument)?void 0:o.hasJSActions(),mouseState:l=null==(l=this._scriptingManager)?void 0:l.mouseState,fieldObjectsPromise:h=null==(h=this.pdfDocument)?void 0:h.getFieldObjects(),annotationCanvasMap:d=null,accessibilityManager:c=null}=e;return new F.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,annotationStorage:i,imageResourcesPath:n,renderForms:a,linkService:this.linkService,downloadManager:this.downloadManager,l10n:s,enableScripting:r,hasJSActionsPromise:o,mouseState:l,fieldObjectsPromise:h,annotationCanvasMap:d,accessibilityManager:c})}createAnnotationEditorLayerBuilder(e){var{uiManager:e=w(this,L),pageDiv:t,pdfPage:i,accessibilityManager:n=null,l10n:a,annotationStorage:s=null==(s=this.pdfDocument)?void 0:s.annotationStorage}=e;return new V.AnnotationEditorLayerBuilder({uiManager:e,pageDiv:t,pdfPage:i,annotationStorage:s,accessibilityManager:n,l10n:a})}createXfaLayerBuilder(e){var{pageDiv:e,pdfPage:t,annotationStorage:i=null==(i=this.pdfDocument)?void 0:i.annotationStorage}=e;return new G.XfaLayerBuilder({pageDiv:e,pdfPage:t,annotationStorage:i,linkService:this.linkService})}createStructTreeLayerBuilder(e){e=e.pdfPage;return new H.StructTreeLayerBuilder({pdfPage:e})}get hasEqualPageSizes(){var i=this._pages[0];for(let e=1,t=this._pages.length;e{e=e.pdfPage.getViewport({scale:1});return!this.enablePrintAutoRotate||(0,_.isPortraitOrientation)(e)?{width:e.width,height:e.height,rotation:e.rotation}:{width:e.height,height:e.width,rotation:(e.rotation-90)%360}})}get optionalContentConfigPromise(){return this.pdfDocument?this._optionalContentConfigPromise||(console.error("optionalContentConfigPromise: Not initialized yet."),this.pdfDocument.getOptionalContentConfig()):Promise.resolve(null)}set optionalContentConfigPromise(e){if(!(e instanceof Promise))throw new Error("Invalid optionalContentConfigPromise: "+e);if(this.pdfDocument&&this._optionalContentConfigPromise){var t={optionalContentConfigPromise:this._optionalContentConfigPromise=e};for(const i of this._pages)i.update(t);this.update(),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:e})}}get scrollMode(){return this._scrollMode}set scrollMode(e){if(this._scrollMode!==e){if(!(0,_.isValidScrollMode)(e))throw new Error("Invalid scroll mode: "+e);this.pagesCount>y.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=e,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e}),this._updateScrollMode(this._currentPageNumber))}}_updateScrollMode(){var e=0_.MIN_SCALE;);this.currentScaleValue=t}updateContainerHeightCss(){var e=this.container.clientHeight;e!==w(this,g)&&(b(this,g,e),_.docStyle.setProperty("--viewer-container-height",e+"px"))}get annotationEditorMode(){return w(this,L)?w(this,S):m.AnnotationEditorType.DISABLE}set annotationEditorMode(e){if(!w(this,L))throw new Error("The AnnotationEditor is not enabled.");if(w(this,S)!==e){if(!P(e))throw new Error("Invalid AnnotationEditor mode: "+e);this.pdfDocument&&(b(this,S,e),this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:e}),w(this,L).updateMode(e))}}set annotationEditorParams(e){var{type:e,value:t}=e;if(!w(this,L))throw new Error("The AnnotationEditor is not enabled.");w(this,L).updateParams(e,t)}refresh(){if(this.pdfDocument){var e={};for(const t of this._pages)t.update(e);this.update()}}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayerBuilder=void 0;var a=i(5),n=i(31);function s(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function r(e,t,i){t=o(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function o(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}var l=new WeakMap;t.AnnotationEditorLayerBuilder=class{constructor(e){s(this,l,{writable:!0,value:void 0}),this.pageDiv=e.pageDiv,this.pdfPage=e.pdfPage,this.annotationStorage=e.annotationStorage||null,this.accessibilityManager=e.accessibilityManager,this.l10n=e.l10n||n.NullL10n,this.annotationEditorLayer=null,this.div=null,this._cancelled=!1,r(this,l,e.uiManager)}async render(e){var t,i,n=1{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.fixupLangCode=function(e){return a[null==e?void 0:e.toLowerCase()]||e},t.getL10nFallback=n;const i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading:"Loading…",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image"};function n(e,t){switch(e){case"find_match_count":e=`find_match_count[${1===t.total?"one":"other"}]`;break;case"find_match_count_limit":e=`find_match_count_limit[${1===t.limit?"one":"other"}]`}return i[e]||""}i.print_progress_percent="{{progress}}%";const a={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};t.NullL10n={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(e){var i,t=1t in i?i[t]:"{{"+t+"}}"):e},async translate(e){}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayerBuilder=void 0;var a=i(5),g=i(31);t.AnnotationLayerBuilder=class{constructor(e){var{pageDiv:e,pdfPage:t,linkService:i,downloadManager:n,annotationStorage:a=null,imageResourcesPath:s="",renderForms:r=!0,l10n:o=g.NullL10n,enableScripting:l=!1,hasJSActionsPromise:h=null,fieldObjectsPromise:d=null,mouseState:c=null,annotationCanvasMap:u=null,accessibilityManager:p=null}=e;this.pageDiv=e,this.pdfPage=t,this.linkService=i,this.downloadManager=n,this.imageResourcesPath=s,this.renderForms=r,this.l10n=o,this.annotationStorage=a,this.enableScripting=l,this._hasJSActionsPromise=h,this._fieldObjectsPromise=d,this._mouseState=c,this._annotationCanvasMap=u,this._accessibilityManager=p,this.div=null,this._cancelled=!1}async render(e){var[t,i=!1,n=null]=await Promise.all([this.pdfPage.getAnnotations({intent:1{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFPageView=void 0;var c=i(5),u=i(1),n=i(2),s=i(31),d=i(34);function r(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function p(e,t){t=a(e,t,"get");return t.get?t.get.call(e):t.value}function o(e,t,i){t=a(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function a(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}const l=n.compatibilityParams.maxCanvasPixels||16777216;var g=new WeakMap,f=new WeakMap;t.PDFPageView=class{constructor(e){r(this,g,{writable:!0,value:c.AnnotationMode.ENABLE_FORMS}),r(this,f,{writable:!0,value:{initialOptionalContent:!0,regularAnnotations:!0}});var t=e.container,i=e.defaultViewport;this.id=e.id,this.renderingId="page"+this.id,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=e.scale||u.DEFAULT_SCALE,this.viewport=i,this.pdfPageRotate=i.rotation,this._optionalContentConfigPromise=e.optionalContentConfigPromise||null,this.hasRestrictedScaling=!1,this.textLayerMode=e.textLayerMode??u.TextLayerMode.ENABLE,o(this,g,e.annotationMode??c.AnnotationMode.ENABLE_FORMS),this.imageResourcesPath=e.imageResourcesPath||"",this.useOnlyCssZoom=e.useOnlyCssZoom||!1,this.maxCanvasPixels=e.maxCanvasPixels||l,this.pageColors=e.pageColors||null,this.eventBus=e.eventBus,this.renderingQueue=e.renderingQueue,this.textLayerFactory=e.textLayerFactory,this.annotationLayerFactory=e.annotationLayerFactory,this.annotationEditorLayerFactory=e.annotationEditorLayerFactory,this.xfaLayerFactory=e.xfaLayerFactory,this.textHighlighter=null==(i=e.textHighlighterFactory)?void 0:i.createTextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus}),this.structTreeLayerFactory=e.structTreeLayerFactory,this.renderer=e.renderer||u.RendererType.CANVAS,this.l10n=e.l10n||s.NullL10n,this.paintTask=null,this.paintedViewportMap=new WeakMap,this.renderingState=u.RenderingStates.INITIAL,this.resume=null,this._renderError=null,this._isStandalone=!(null!=(i=this.renderingQueue)&&i.hasViewer()),this._annotationCanvasMap=null,this.annotationLayer=null,this.annotationEditorLayer=null,this.textLayer=null,this.zoomLayer=null,this.xfaLayer=null,this.structTreeLayer=null;const n=document.createElement("div");if(n.className="page",n.style.width=Math.floor(this.viewport.width)+"px",n.style.height=Math.floor(this.viewport.height)+"px",n.setAttribute("data-page-number",this.id),n.setAttribute("role","region"),this.l10n.get("page_landmark",{page:this.id}).then(e=>{n.setAttribute("aria-label",e)}),this.div=n,null!=t&&t.append(n),this._isStandalone){const a=e["optionalContentConfigPromise"];a&&a.then(e=>{a===this._optionalContentConfigPromise&&(p(this,f).initialOptionalContent=e.hasInitialVisibility)})}}setPdfPage(e){this.pdfPage=e,this.pdfPageRotate=e.rotate;var t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:this.scale*c.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:t}),this.reset()}destroy(){var e;this.reset(),null!=(e=this.pdfPage)&&e.cleanup()}async _renderAnnotationLayer(){let t=null;try{await this.annotationLayer.render(this.viewport,"display")}catch(e){console.error(`_renderAnnotationLayer: "${e}".`),t=e}finally{this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:t})}}async _renderAnnotationEditorLayer(){let t=null;try{await this.annotationEditorLayer.render(this.viewport,"display")}catch(e){console.error(`_renderAnnotationEditorLayer: "${e}".`),t=e}finally{this.eventBus.dispatch("annotationeditorlayerrendered",{source:this,pageNumber:this.id,error:t})}}async _renderXfaLayer(){let t=null;try{var e=await this.xfaLayer.render(this.viewport,"display");null!=e&&e.textDivs&&this.textHighlighter&&this._buildXfaTextContentItems(e.textDivs)}catch(e){console.error(`_renderXfaLayer: "${e}".`),t=e}finally{this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:t})}}async _buildXfaTextContentItems(e){var t=[];for(const i of(await this.pdfPage.getTextContent()).items)t.push(i.str);this.textHighlighter.setTextMapping(e,t),this.textHighlighter.enable()}_resetZoomLayer(){var e,t=0{var t;null!=(t=this.loadingIconDiv)&&t.setAttribute("aria-label",e)}),a.append(this.loadingIconDiv)}update(t){let{scale:e=0,rotation:i=null,optionalContentConfigPromise:n=null}=t;this.scale=e||this.scale,"number"==typeof i&&(this.rotation=i),n instanceof Promise&&(this._optionalContentConfigPromise=n).then(e=>{n===this._optionalContentConfigPromise&&(p(this,f).initialOptionalContent=e.hasInitialVisibility)});var t=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*c.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:t}),this._isStandalone&&u.docStyle.setProperty("--scale-factor",this.viewport.scale),this.svg)this.cssTransform({target:this.svg,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0}),this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this._renderError});else{let e=!1;if(this.canvas&&0this.maxCanvasPixels)&&(e=!0),this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&e)return this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0}),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this._renderError});this.zoomLayer||this.canvas.hidden||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0})}}cancelRendering(){var{keepAnnotationLayer:e=!1,keepAnnotationEditorLayer:t=!1,keepXfaLayer:i=!1}=0{this.renderingQueue.isHighestPriority(this)?e():(this.renderingState=u.RenderingStates.PAUSED,this.resume=()=>{this.renderingState=u.RenderingStates.RUNNING,e()})});async function o(){var e=0o(null).then(()=>{var e;s&&(e=n.streamTextContent({includeMarkedContent:!0}),s.setTextContentStream(e),s.render()),this.annotationLayer&&this._renderAnnotationLayer().then(()=>{this.annotationEditorLayerFactory&&(this.annotationEditorLayer||(this.annotationEditorLayer=this.annotationEditorLayerFactory.createAnnotationEditorLayerBuilder({pageDiv:i,pdfPage:n,l10n:this.l10n,accessibilityManager:this._accessibilityManager})),this._renderAnnotationEditorLayer())})}),function(e){return o(e)});return this.xfaLayerFactory&&(this.xfaLayer||(this.xfaLayer=this.xfaLayerFactory.createXfaLayerBuilder({pageDiv:i,pdfPage:n})),this._renderXfaLayer()),this.structTreeLayerFactory&&this.textLayer&&this.canvas&&(this._onTextLayerRendered=e=>{e.pageNumber===this.id&&(this.eventBus._off("textlayerrendered",this._onTextLayerRendered),this._onTextLayerRendered=null,this.canvas)&&this.pdfPage.getStructTree().then(e=>{e&&this.canvas&&((e=this.structTreeLayer.render(e)).classList.add("structTree"),this.canvas.append(e))})},this.eventBus._on("textlayerrendered",this._onTextLayerRendered),this.structTreeLayer=this.structTreeLayerFactory.createStructTreeLayerBuilder({pdfPage:n})),i.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),h}paintOnCanvas(e){const t=(0,c.createPromiseCapability)(),i={promise:t.promise,onRenderContinue(e){e()},cancel(){d.cancel()},get separateAnnots(){return d.separateAnnots}};var n=this.viewport;const a=document.createElement("canvas");a.setAttribute("role","presentation");let s=a.hidden=!0;function r(){s&&(a.hidden=!1,s=!1)}e.append(a);var e=(this.canvas=a).getContext("2d",{alpha:!1}),o=this.outputScale=new u.OutputScale,l=(this.useOnlyCssZoom&&(l=n.clone({scale:c.PixelsPerInch.PDF_TO_CSS_UNITS}),o.sx*=l.width/n.width,o.sy*=l.height/n.height),0l||o.sy>l?(o.sx=l,o.sy=l,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1),(0,u.approximateFraction)(o.sx)),h=(0,u.approximateFraction)(o.sy),l=(a.width=(0,u.roundToDivide)(n.width*o.sx,l[0]),a.height=(0,u.roundToDivide)(n.height*o.sy,h[0]),a.style.width=(0,u.roundToDivide)(n.width,l[1])+"px",a.style.height=(0,u.roundToDivide)(n.height,h[1])+"px",this.paintedViewportMap.set(a,n),o.scaled?[o.sx,0,0,o.sy,0,0]:null),h={canvasContext:e,transform:l,viewport:this.viewport,annotationMode:p(this,g),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:this.pageColors};const d=this.pdfPage.render(h);return d.onContinue=function(e){r(),i.onRenderContinue?i.onRenderContinue(e):e()},d.promise.then(function(){r(),t.resolve()},function(e){r(),t.reject(e)}),i}paintOnSvg(t){let e=!1;const i=()=>{if(e)throw new c.RenderingCancelledException("Rendering cancelled, page "+this.id,"svg")},n=this.pdfPage,a=this.viewport.clone({scale:c.PixelsPerInch.PDF_TO_CSS_UNITS});return{promise:n.getOperatorList({annotationMode:p(this,g)}).then(e=>{return i(),new c.SVGGraphics(n.commonObjs,n.objs).getSVG(e,a).then(e=>{i(),this.svg=e,this.paintedViewportMap.set(e,a),e.style.width=t.style.width,e.style.height=t.style.height,this.renderingState=u.RenderingStates.FINISHED,t.append(e)})}),onRenderContinue(e){e()},cancel(){e=!0},get separateAnnots(){return!1}}}setPageLabel(e){this.pageLabel="string"==typeof e?e:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}get thumbnailCanvas(){var{initialOptionalContent:e,regularAnnotations:t}=p(this,f);return e&&t?this.canvas:null}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextAccessibilityManager=void 0;var s=i(1);function n(e,t,i){a(e,t),t.set(e,i)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function r(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}function o(e,t,i){if(e!==t)throw new TypeError("Private static access of wrong provenance");return i}function l(e,t){t=d(e,t,"get");return t.get?t.get.call(e):t.value}function h(e,t,i){t=d(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function d(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}var c=new WeakMap,u=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakSet;function m(e,t){var i,n,a,s,r,o,e=e.getBoundingClientRect(),t=t.getBoundingClientRect();return 0===e.width&&0===e.height?1:0===t.width&&0===t.height||(i=e.y,n=e.y+e.height,a=e.y+e.height/2,s=t.y,r=t.y+t.height,o=t.y+t.height/2,a<=s&&n<=o)?-1:o<=i&&r<=a?1:e.x+e.width/2-(t.x+t.width/2)}function v(e,t){var i=t.getAttribute("aria-owns");null!=i&&i.includes(e)||t.setAttribute("aria-owns",i?i+" "+e:e),t.removeAttribute("role")}t.TextAccessibilityManager=class w{constructor(){var e,t;a(e=this,t=f),t.add(e),n(this,c,{writable:!0,value:!1}),n(this,u,{writable:!0,value:null}),n(this,p,{writable:!0,value:new Map}),n(this,g,{writable:!0,value:new Map})}setTextMapping(e){h(this,u,e)}enable(){if(l(this,c))throw new Error("TextAccessibilityManager is already enabled.");if(!l(this,u))throw new Error("Text divs and strings have not been set.");if(h(this,c,!0),h(this,u,l(this,u).slice()),l(this,u).sort(o(w,w,m)),0e!==n).join(" "))?t.setAttribute("aria-owns",e):(t.removeAttribute("aria-owns"),t.setAttribute("role","presentation")))}}}else l(this,g).delete(e)}addPointerInTextLayer(t,e){var i,n,a=t.id;a&&(l(this,c)?(e&&this.removePointerInTextLayer(t),(i=l(this,u))&&0!==i.length&&(n=(0,s.binarySearchFirstItem)(i,e=>o(w,w,m).call(w,t,e)<0),n=Math.max(0,n-1),r(this,f,v).call(this,a,i[n]),l(this,p).set(a,n))):l(this,g).set(t,e))}moveElementInDOM(e,t,i,n){if(this.addPointerInTextLayer(i,n),e.hasChildNodes()){if(0!==(n=Array.from(e.childNodes).filter(e=>e!==t)).length){const a=i||t;0===(i=(0,s.binarySearchFirstItem)(n,e=>o(w,w,m).call(w,a,e)<0))?n[0].before(t):n[i-1].after(t)}}else e.append(t)}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StructTreeLayerBuilder=void 0;const s={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},r=/^H(\d+)$/;t.StructTreeLayerBuilder=class{constructor(e){e=e.pdfPage;this.pdfPage=e}render(e){return this._walk(e)}_setAttributes(e,t){void 0!==e.alt&&t.setAttribute("aria-label",e.alt),void 0!==e.id&&t.setAttribute("aria-owns",e.id),void 0!==e.lang&&t.setAttribute("lang",e.lang)}_walk(e){if(!e)return null;var t,i,n=document.createElement("span");if("role"in e&&(t=e["role"],(i=t.match(r))?(n.setAttribute("role","heading"),n.setAttribute("aria-level",i[1])):s[t]&&n.setAttribute("role",s[t])),this._setAttributes(e,n),e.children)if(1===e.children.length&&"id"in e.children[0])this._setAttributes(e.children[0],n);else for(const a of e.children)n.append(this._walk(a));return n}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextHighlighter=void 0;t.TextHighlighter=class{constructor(e){var{findController:e,eventBus:t,pageIndex:i}=e;this.findController=e,this.matches=[],this.eventBus=t,this.pageIdx=i,this._onUpdateTextLayerMatches=null,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}setTextMapping(e,t){this.textDivs=e,this.textContentItemsStr=t}enable(){if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=e=>{e.pageIndex!==this.pageIdx&&-1!==e.pageIndex||this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)),this._updateMatches()}disable(){this.enabled&&(this.enabled=!1,this._onUpdateTextLayerMatches)&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}_convertMatches(i,n){if(!i)return[];var a=this["textContentItemsStr"];let s=0,r=0;var o=a.length-1,l=[];for(let t=0,e=i.length;t=r+a[s].length;)r+=a[s].length,s++;s===a.length&&console.error("Could not find a matching mapping");var h={begin:{divIdx:s,offset:e-r}};for(e+=n[t];s!==o&&e>r+a[s].length;)r+=a[s].length,s++;h.end={divIdx:s,offset:e-r},l.push(h)}return l}_renderMatches(a){if(0!==a.length){var{findController:s,pageIdx:r}=this;const{textContentItemsStr:m,textDivs:v}=this;var o=r===s.selected.pageIdx,l=s.selected.matchIdx,t=s.state.highlightAll;let i=null;var h={divIdx:-1,offset:void 0};let e=l,n=e+1;if(t)e=0,n=a.length;else if(!o)return;for(let t=e;t{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerBuilder=void 0;var n=i(5);function r(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function o(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var l=new WeakSet,h=new WeakSet;function a(){this.renderingDone=!0;var e=document.createElement("div");e.className="endOfContent",this.textLayerDiv.append(e),this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}function d(){const a=this.textLayerDiv;a.addEventListener("mousedown",t=>{var i,n=a.querySelector(".endOfContent");if(n){let e=t.target!==a;(e=e&&"none"!==getComputedStyle(n).getPropertyValue("-moz-user-select"))&&(i=a.getBoundingClientRect(),t=Math.max(0,(t.pageY-i.top)/i.height),n.style.top=(100*t).toFixed(2)+"%"),n.classList.add("active")}}),a.addEventListener("mouseup",()=>{var e=a.querySelector(".endOfContent");e&&(e.style.top="",e.classList.remove("active"))})}t.TextLayerBuilder=class{constructor(e){var{textLayerDiv:e,eventBus:t,pageIndex:i,viewport:n,highlighter:a=null,accessibilityManager:s=null}=e;r(this,h),r(this,l),this.textLayerDiv=e,this.eventBus=t,this.textContent=null,this.textContentItemsStr=[],this.textContentStream=null,this.renderingDone=!1,this.pageNumber=i+1,this.viewport=n,this.textDivs=[],this.textLayerRenderTask=null,this.highlighter=a,this.accessibilityManager=s,o(this,h,d).call(this)}render(){var e,t=0{var e;this.textLayerDiv.append(i),o(this,l,a).call(this),null!=(e=this.highlighter)&&e.enable(),null!=(e=this.accessibilityManager)&&e.enable()},function(e){})}}cancel(){var e;this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),null!=(e=this.highlighter)&&e.disable(),null!=(e=this.accessibilityManager)&&e.disable()}setTextContentStream(e){this.cancel(),this.textContentStream=e}setTextContent(e){this.cancel(),this.textContent=e}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayerBuilder=void 0;var a=i(5);t.XfaLayerBuilder=class{constructor(e){var{pageDiv:e,pdfPage:t,annotationStorage:i=null,linkService:n,xfaHtml:a=null}=e;this.pageDiv=e,this.pdfPage=t,this.annotationStorage=i,this.linkService=n,this.xfaHtml=a,this.div=null,this._cancelled=!1}render(t){let i=1{return this._cancelled||!e?{textDivs:[]}:(e={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:e,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:i},this.div?a.XfaLayer.update(e):(this.div=document.createElement("div"),this.pageDiv.append(this.div),e.div=this.div,a.XfaLayer.render(e)))}).catch(e=>{console.error(e)})}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SecondaryToolbar=void 0;var c=i(1),a=i(7),u=i(29);function n(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function s(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var r=new WeakSet,o=new WeakSet,l=new WeakSet,h=new WeakSet,d=new WeakSet;function p(){this.items.firstPage.disabled=this.pageNumber<=1,this.items.lastPage.disabled=this.pageNumber>=this.pagesCount,this.items.pageRotateCw.disabled=0===this.pagesCount,this.items.pageRotateCcw.disabled=0===this.pagesCount}function g(){this.toggleButton.addEventListener("click",this.toggle.bind(this));for(const{element:n,eventName:a,close:s,eventDetails:r}of this.buttons)n.addEventListener("click",e=>{if(null!==a){var t={source:this};for(const i in r)t[i]=r[i];this.eventBus.dispatch(a,t)}s&&this.close(),this.externalServices.reportTelemetry({type:"buttons",data:{id:n.id}})})}function f(e){let{cursorSelectToolButton:i,cursorHandToolButton:n}=e;this.eventBus._on("cursortoolchanged",function(e){var e=e["tool"],t=e===a.CursorTool.SELECT,e=e===a.CursorTool.HAND;i.classList.toggle("toggled",t),n.classList.toggle("toggled",e),i.setAttribute("aria-checked",t),n.setAttribute("aria-checked",e)})}function m(e){let{scrollPageButton:a,scrollVerticalButton:s,scrollHorizontalButton:r,scrollWrappedButton:o,spreadNoneButton:l,spreadOddButton:h,spreadEvenButton:d}=e;const t=e=>{var e=e["mode"],t=e===c.ScrollMode.PAGE,i=e===c.ScrollMode.VERTICAL,n=e===c.ScrollMode.HORIZONTAL,e=e===c.ScrollMode.WRAPPED,t=(a.classList.toggle("toggled",t),s.classList.toggle("toggled",i),r.classList.toggle("toggled",n),o.classList.toggle("toggled",e),a.setAttribute("aria-checked",t),s.setAttribute("aria-checked",i),r.setAttribute("aria-checked",n),o.setAttribute("aria-checked",e),this.pagesCount>u.PagesCountLimit.FORCE_SCROLL_MODE_PAGE);a.disabled=t,s.disabled=t,r.disabled=t,o.disabled=t,l.disabled=n,h.disabled=n,d.disabled=n};this.eventBus._on("scrollmodechanged",t),this.eventBus._on("secondarytoolbarreset",e=>{e.source===this&&t({mode:c.ScrollMode.VERTICAL})})}function v(e){let{spreadNoneButton:n,spreadOddButton:a,spreadEvenButton:s}=e;function t(e){var e=e["mode"],t=e===c.SpreadMode.NONE,i=e===c.SpreadMode.ODD,e=e===c.SpreadMode.EVEN;n.classList.toggle("toggled",t),a.classList.toggle("toggled",i),s.classList.toggle("toggled",e),n.setAttribute("aria-checked",t),a.setAttribute("aria-checked",i),s.setAttribute("aria-checked",e)}this.eventBus._on("spreadmodechanged",t),this.eventBus._on("secondarytoolbarreset",e=>{e.source===this&&t({mode:c.SpreadMode.NONE})})}t.SecondaryToolbar=class{constructor(e,t,i){n(this,d),n(this,h),n(this,l),n(this,o),n(this,r),this.toolbar=e.toolbar,this.toggleButton=e.toggleButton,this.buttons=[{element:e.presentationModeButton,eventName:"presentationmode",close:!0},{element:e.printButton,eventName:"print",close:!0},{element:e.downloadButton,eventName:"download",close:!0},{element:e.viewBookmarkButton,eventName:null,close:!0},{element:e.firstPageButton,eventName:"firstpage",close:!0},{element:e.lastPageButton,eventName:"lastpage",close:!0},{element:e.pageRotateCwButton,eventName:"rotatecw",close:!1},{element:e.pageRotateCcwButton,eventName:"rotateccw",close:!1},{element:e.cursorSelectToolButton,eventName:"switchcursortool",eventDetails:{tool:a.CursorTool.SELECT},close:!0},{element:e.cursorHandToolButton,eventName:"switchcursortool",eventDetails:{tool:a.CursorTool.HAND},close:!0},{element:e.scrollPageButton,eventName:"switchscrollmode",eventDetails:{mode:c.ScrollMode.PAGE},close:!0},{element:e.scrollVerticalButton,eventName:"switchscrollmode",eventDetails:{mode:c.ScrollMode.VERTICAL},close:!0},{element:e.scrollHorizontalButton,eventName:"switchscrollmode",eventDetails:{mode:c.ScrollMode.HORIZONTAL},close:!0},{element:e.scrollWrappedButton,eventName:"switchscrollmode",eventDetails:{mode:c.ScrollMode.WRAPPED},close:!0},{element:e.spreadNoneButton,eventName:"switchspreadmode",eventDetails:{mode:c.SpreadMode.NONE},close:!0},{element:e.spreadOddButton,eventName:"switchspreadmode",eventDetails:{mode:c.SpreadMode.ODD},close:!0},{element:e.spreadEvenButton,eventName:"switchspreadmode",eventDetails:{mode:c.SpreadMode.EVEN},close:!0},{element:e.documentPropertiesButton,eventName:"documentproperties",close:!0}],this.buttons.push({element:e.openFileButton,eventName:"openfile",close:!0}),this.items={firstPage:e.firstPageButton,lastPage:e.lastPageButton,pageRotateCw:e.pageRotateCwButton,pageRotateCcw:e.pageRotateCcwButton},this.eventBus=t,this.externalServices=i,this.opened=!1,s(this,o,g).call(this),s(this,l,f).call(this,e),s(this,h,m).call(this,e),s(this,d,v).call(this,e),this.reset()}get isOpen(){return this.opened}setPageNumber(e){this.pageNumber=e,s(this,r,p).call(this)}setPagesCount(e){this.pagesCount=e,s(this,r,p).call(this)}reset(){this.pageNumber=0,this.pagesCount=0,s(this,r,p).call(this),this.eventBus.dispatch("secondarytoolbarreset",{source:this})}open(){this.opened||(this.opened=!0,this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.toolbar.classList.remove("hidden"))}close(){this.opened&&(this.opened=!1,this.toolbar.classList.add("hidden"),this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"))}toggle(){this.opened?this.close():this.open()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Toolbar=void 0;var l=i(1),d=i(5);function r(e,t){o(e,t),t.add(e)}function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,i){t=c(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function c(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}function u(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var p=new WeakMap,g=new WeakSet,f=new WeakSet,m=new WeakSet,v=new WeakSet;function w(e){var{pageNumber:t,scaleSelect:i}=this.items;const n=this;for(const{element:a,eventName:s,eventDetails:r}of this.buttons)a.addEventListener("click",e=>{if(null!==s){var t={source:this};if(r)for(const i in r)t[i]=r[i];this.eventBus.dispatch(s,t)}});t.addEventListener("click",function(){this.select()}),t.addEventListener("change",function(){n.eventBus.dispatch("pagenumberchanged",{source:n,value:this.value})}),i.addEventListener("change",function(){"custom"!==this.value&&n.eventBus.dispatch("scalechanged",{source:n,value:this.value})}),i.addEventListener("click",function(e){e=e.target;this.value===n.pageScaleValue&&"OPTION"===e.tagName.toUpperCase()&&this.blur()}),i.oncontextmenu=l.noContextMenuHandler,this.eventBus._on("localized",()=>{h(this,p,!0),u(this,v,y).call(this),u(this,m,b).call(this,!0)}),u(this,f,_).call(this,e)}function _(e){let{editorFreeTextButton:r,editorFreeTextParamsToolbar:o,editorInkButton:l,editorInkParamsToolbar:h}=e;function t(e){var t,i,n,a=1{e.source===this&&t({mode:d.AnnotationEditorType.NONE},!0)})}function b(){var e,t,i=0{o.numPages.textContent=e})),o.pageNumber.max=a),this.hasPageLabels?(o.pageNumber.value=this.pageLabel,this.l10n.get("page_of_pages",{pageNumber:n,pagesCount:a}).then(e=>{o.numPages.textContent=e})):o.pageNumber.value=n,o.previous.disabled=n<=1,o.next.disabled=a<=n,o.zoomOut.disabled=r<=l.MIN_SCALE,o.zoomIn.disabled=r>=l.MAX_SCALE,this.l10n.get("page_scale_percent",{scale:Math.round(1e4*r)/100}).then(e=>{let t=!1;for(const i of o.scaleSelect.options)i.value!==s?i.selected=!1:(i.selected=!0,t=!0);t||(o.customScaleOption.textContent=e,o.customScaleOption.selected=!0)})}}async function y(){var{items:e,l10n:t}=this,t=Promise.all([t.get("page_scale_auto"),t.get("page_scale_actual"),t.get("page_scale_fit"),t.get("page_scale_width")]),e=(await l.animationStarted,getComputedStyle(e.scaleSelect)),i=parseFloat(e.getPropertyValue("--scale-select-width")),n=document.createElement("canvas"),a=n.getContext("2d",{alpha:!1});a.font=e.fontSize+" "+e.fontFamily;let s=0;for(const o of await t){var r=a.measureText(o)["width"];r>s&&(s=r)}(s+=.3*i)>i&&l.docStyle.setProperty("--scale-select-width",s+"px"),n.width=0,n.height=0}t.Toolbar=class{constructor(t,e,i){var n,a,s;r(this,v),r(this,m),r(this,f),r(this,g),s={writable:!0,value:!1},o(n=this,a=p),a.set(n,s),this.toolbar=t.container,this.eventBus=e,this.l10n=i,this.buttons=[{element:t.previous,eventName:"previouspage"},{element:t.next,eventName:"nextpage"},{element:t.zoomIn,eventName:"zoomin"},{element:t.zoomOut,eventName:"zoomout"},{element:t.print,eventName:"print"},{element:t.download,eventName:"download"},{element:t.editorFreeTextButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){var e=t.editorFreeTextButton["classList"];return e.contains("toggled")?d.AnnotationEditorType.NONE:d.AnnotationEditorType.FREETEXT}}},{element:t.editorInkButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){var e=t.editorInkButton["classList"];return e.contains("toggled")?d.AnnotationEditorType.NONE:d.AnnotationEditorType.INK}}}],this.buttons.push({element:t.openFile,eventName:"openfile"}),this.items={numPages:t.numPages,pageNumber:t.pageNumber,scaleSelect:t.scaleSelect,customScaleOption:t.customScaleOption,previous:t.previous,next:t.next,zoomIn:t.zoomIn,zoomOut:t.zoomOut},u(this,g,w).call(this,t),this.reset()}setPageNumber(e,t){this.pageNumber=e,this.pageLabel=t,u(this,m,b).call(this,!1)}setPagesCount(e,t){this.pagesCount=e,this.hasPageLabels=t,u(this,m,b).call(this,!0)}setPageScale(e,t){this.pageScaleValue=(e||t).toString(),this.pageScale=t,u(this,m,b).call(this,!1)}reset(){this.pageNumber=0,this.pageLabel=null,this.hasPageLabels=!1,this.pagesCount=0,this.pageScaleValue=l.DEFAULT_SCALE_VALUE,this.pageScale=l.DEFAULT_SCALE,u(this,m,b).call(this,!0),this.updateLoadingIndicatorState(),this.eventBus.dispatch("toolbarreset",{source:this})}updateLoadingIndicatorState(){var e=this.items["pageNumber"];e.classList.toggle("visiblePageIsLoading",0{Object.defineProperty(t,"__esModule",{value:!0}),t.ViewHistory=void 0;t.ViewHistory=class{constructor(e){var t=1{var i=JSON.parse(e||"{}");let n=-1;if(Array.isArray(i.files)){for(;i.files.length>=this.cacheSize;)i.files.shift();for(let e=0,t=i.files.length;e{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericCom=void 0;var n=i(4),a=i(43),s=i(44),r=i(45),o=i(47);t.GenericCom={};class l extends a.BasePreferences{async _writeToStorage(e){localStorage.setItem("pdfjs.preferences",JSON.stringify(e))}async _readFromStorage(e){return JSON.parse(localStorage.getItem("pdfjs.preferences"))}}class h extends n.DefaultExternalServices{static createDownloadManager(e){return new s.DownloadManager}static createPreferences(){return new l}static createL10n(e){var{locale:e="en-US"}=e;return new r.GenericL10n(e)}static createScripting(e){e=e.sandboxBundleSrc;return new o.GenericScripting(e)}}n.PDFViewerApplication.externalServices=h},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasePreferences=void 0;i(2);function n(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function r(e,t){t=a(e,t,"get");return t.get?t.get.call(e):t.value}function o(e,t,i){t=a(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function a(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}var l=new WeakMap,h=new WeakMap,d=new WeakMap;t.BasePreferences=class s{constructor(){if(n(this,l,{writable:!0,value:Object.freeze({annotationEditorMode:0,annotationMode:2,cursorToolOnLoad:0,defaultZoomValue:"",disablePageLabels:!1,enablePermissions:!1,enablePrintAutoRotate:!0,enableScripting:!0,externalLinkTarget:0,historyUpdateUrl:!1,ignoreDestinationZoom:!1,forcePageColors:!1,pageColorsBackground:"Canvas",pageColorsForeground:"CanvasText",pdfBugEnabled:!1,sidebarViewOnLoad:-1,scrollModeOnLoad:-1,spreadModeOnLoad:-1,textLayerMode:1,useOnlyCssZoom:!1,viewerCssTheme:0,viewOnLoad:0,disableAutoFetch:!1,disableFontFace:!1,disableRange:!1,disableStream:!1,enableXfa:!0,renderer:"canvas"})}),n(this,h,{writable:!0,value:Object.create(null)}),n(this,d,{writable:!0,value:null}),this.constructor===s)throw new Error("Cannot initialize BasePreferences.");o(this,d,this._readFromStorage(r(this,l)).then(e=>{for(const i in r(this,l)){var t=null==e?void 0:e[i];typeof t==typeof r(this,l)[i]&&(r(this,h)[i]=t)}}))}async _writeToStorage(e){throw new Error("Not implemented: _writeToStorage")}async _readFromStorage(e){throw new Error("Not implemented: _readFromStorage")}async reset(){await r(this,d);const t=r(this,h);return o(this,h,Object.create(null)),this._writeToStorage(r(this,l)).catch(e=>{throw o(this,h,t),e})}async set(e,t){await r(this,d);const i=r(this,l)[e],n=r(this,h);if(void 0===i)throw new Error(`Set preference: "${e}" is undefined.`);if(void 0===t)throw new Error("Set preference: no value is specified.");var a=typeof t,s=typeof i;if(a!=s){if("number"!=a||"string"!=s)throw new Error(`Set preference: "${t}" is a ${a}, expected a ${s}.`);t=t.toString()}else if("number"==a&&!Number.isInteger(t))throw new Error(`Set preference: "${t}" must be an integer.`);return r(this,h)[e]=t,this._writeToStorage(r(this,h)).catch(e=>{throw o(this,h,n),e})}async get(e){await r(this,d);var t=r(this,l)[e];if(void 0===t)throw new Error(`Get preference: "${e}" is undefined.`);return r(this,h)[e]??t}async getAll(){await r(this,d);var e=Object.create(null);for(const t in r(this,l))e[t]=r(this,h)[t]??r(this,l)[t];return e}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadManager=void 0;var r=i(5);function n(e,t){var i=document.createElement("a");if(!i.click)throw new Error('DownloadManager: "a.click()" is not supported.');i.href=e,i.target="_parent","download"in i&&(i.download=t),(document.body||document.documentElement).append(i),i.click(),i.remove()}t.DownloadManager=class{constructor(){this._openBlobUrls=new WeakMap}downloadUrl(e,t){(0,r.createValidAbsoluteUrl)(e,"http://example.com")?n(e+"#pdfjs.action=download",t):console.error("downloadUrl - not a valid URL: "+e)}downloadData(e,t,i){n(URL.createObjectURL(new Blob([e],{type:i})),t)}openOrDownloadData(i,e,n){var a=(0,r.isPdfFile)(n),s=a?"application/pdf":"";if(a){let t=this._openBlobUrls.get(i);t||(t=URL.createObjectURL(new Blob([e],{type:s})),this._openBlobUrls.set(i,t)),a="?file="+encodeURIComponent(t+"#"+n);try{return window.open(a),!0}catch(e){console.error("openOrDownloadData: "+e),URL.revokeObjectURL(t),this._openBlobUrls.delete(i)}}return this.downloadData(e,n,s),!1}download(e,t,i){n(URL.createObjectURL(e),i)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericL10n=void 0,i(46);var n=i(31);const a=document.webL10n;t.GenericL10n=class{constructor(i){this._lang=i,this._ready=new Promise((e,t)=>{a.setLanguage((0,n.fixupLangCode)(i),()=>{e(a)})})}async getLanguage(){return(await this._ready).getLanguage()}async getDirection(){return(await this._ready).getDirection()}async get(e){var t=1{function _(e,t,i){t=t||function(e){},i=i||function(){};var n=new XMLHttpRequest;n.open("GET",e,a),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=utf-8"),n.onreadystatechange=function(){4==n.readyState&&(200==n.status||0===n.status?t(n.responseText):i())},n.onerror=i,n.ontimeout=i;try{n.send(null)}catch(e){i()}}function u(e,v,a,t){var w=e.replace(/[^\/]*$/,"")||"./";function i(e,t){var c={},i=/^\s*|\s*$/,u=/^\s*#|^\s*$/,p=/^\s*\[(.*)\]\s*$/,g=/^\s*@import\s+url\((.*)\)\s*$/i,f=/^([^=\s]*)\s*=\s*(.+)$/;function m(e,a,s){var r=e.replace(i,"").split(/[\r\n]+/),o="*",l=v.split("-",1)[0],h=!1,d="";!function e(){for(;;){if(!r.length)return void s();var t,i,n=r.shift();if(!u.test(n)){if(a){if(d=p.exec(n)){o=d[1].toLowerCase(),h="*"!==o&&o!==v&&o!==l;continue}if(h)continue;if(d=g.exec(n))return t=w+d[1],i=e,void _(t,function(e){m(e,!1,i)},function(){console.warn(t+" not found."),i()})}(n=n.match(f))&&3==n.length&&(c[n[1]]=(n=n[2]).lastIndexOf("\\")<0?n:n.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'"))}}}()}m(e,!0,function(){t(c)})}_(e,function(e){f+=e,i(e,function(e){for(var t in e){var i,n=t.lastIndexOf("."),n=0{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericScripting=void 0,t.docPropertiesLookup=async function(e){var t="".split("#")[0];let{info:i,metadata:n,contentDispositionFilename:a,contentLength:s}=await e.getMetadata();{var r;s||(r=(await e.getDownloadInfo())["length"],s=r)}return{...i,baseURL:t,filesize:s,filename:a||(0,o.getPdfFilenameFromUrl)(""),metadata:null==n?void 0:n.getRaw(),authors:null==n?void 0:n.get("dc:creator"),numPages:e.numPages,URL:""}};var o=i(5);t.GenericScripting=class{constructor(e){this._ready=(0,o.loadScript)(e,!0).then(()=>window.pdfjsSandbox.QuickJSSandbox())}async createSandbox(e){(await this._ready).create(e)}async dispatchEventInSandbox(e){const t=await this._ready;setTimeout(()=>t.dispatchEvent(e),0)}async destroySandbox(){(await this._ready).nukeSandbox()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFPrintService=o;var h=i(5),n=i(4),s=i(49);let d=null,a=null,r=null;function o(e,t,i,n){var a=4{var i;this.throwIfInactive(),++this.currentPage>=n?(p(n,n,this.l10n),e()):(p(i=this.currentPage,n,this.l10n),function(e,t,i,n,a,s){var r=d.scratchCanvas;const o=n/h.PixelsPerInch.PDF,l=(r.width=Math.floor(i.width*o),r.height=Math.floor(i.height*o),r.getContext("2d"));return l.save(),l.fillStyle="rgb(255, 255, 255)",l.fillRect(0,0,r.width,r.height),l.restore(),Promise.all([e.getPage(t),s]).then(function(e){var[e,t]=e,t={canvasContext:l,transform:[o,0,0,o,0,0],viewport:e.getViewport({scale:1,rotation:i.rotation}),intent:"print",annotationMode:h.AnnotationMode.ENABLE_STORAGE,optionalContentConfigPromise:a,printAnnotationStorage:t};return e.render(t).promise})}(this.pdfDocument,i+1,this.pagesOverview[i],this._printResolution,this._optionalContentConfigPromise,this._printAnnotationStoragePromise).then(this.useRenderedPage.bind(this)).then(function(){a(e,t)},t))};return new Promise(a)},useRenderedPage(){this.throwIfInactive();const i=document.createElement("img");var e=this.scratchCanvas,e=("toBlob"in e?e.toBlob(function(e){i.src=URL.createObjectURL(e)}):i.src=e.toDataURL(),document.createElement("div"));return e.className="printedPage",e.append(i),this.printContainer.append(e),new Promise(function(e,t){i.onload=e,i.onerror=t})},performPrint(){return this.throwIfInactive(),new Promise(e=>{setTimeout(()=>{this.active?(l.call(window),setTimeout(e,20)):e()},0)})},get active(){return this===d},throwIfInactive(){if(!this.active)throw new Error("This print request was cancelled or completed.")}};const l=window.print;function c(e){var t=document.createEvent("CustomEvent");t.initCustomEvent(e,!1,!1,"custom"),window.dispatchEvent(t)}function u(){d&&(d.destroy(),c("afterprint"))}function p(e,t,i){a=a||document.getElementById("printServiceDialog");e=Math.round(100*e/t),t=a.querySelector("progress");const n=a.querySelector(".relative-progress");t.value=e,i.get("print_progress_percent",{progress:e}).then(e=>{n.textContent=e})}window.print=function(){if(d)console.warn("Ignored window.print() because of a pending print job.");else{f().then(function(){d&&r.open(a)});try{c("beforeprint")}finally{if(!d)return console.error("Expected print service to be initialized."),void f().then(function(){r.active===a&&r.close(a)});const e=d;d.renderPages().then(function(){return e.performPrint()}).catch(function(){}).then(function(){e.active&&u()})}}},window.addEventListener("keydown",function(e){80!==e.keyCode||!e.ctrlKey&&!e.metaKey||e.altKey||e.shiftKey&&!window.chrome&&!window.opera||(window.print(),e.preventDefault(),e.stopImmediatePropagation())},!0),"onbeforeprint"in window&&(t=function(e){"custom"!==e.detail&&e.stopImmediatePropagation()},window.addEventListener("beforeprint",t),window.addEventListener("afterprint",t));let g;function f(){if(!g){if(!(r=n.PDFViewerApplication.overlayManager))throw new Error("The overlay manager has not yet been initialized.");a=a||document.getElementById("printServiceDialog"),g=r.register(a,!0),document.getElementById("printCancel").onclick=u,a.addEventListener("close",u)}return g}n.PDFPrintServiceFactory.instance={supportsPrinting:!0,createPrintService(e,t,i,n,a,s,r){if(d)throw new Error("The print service is created and active.");return d=new o(e,t,i,n,a,s,r)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getXfaHtmlForPrinting=function(e,t){var i=t.allXfaHtml,n=new h.SimpleLinkService,a=Math.round(100*l.PixelsPerInch.PDF_TO_CSS_UNITS)/100;for(const o of i.children){var s=document.createElement("div"),s=(s.className="xfaPrintedPage",e.append(s),new d.XfaLayerBuilder({pageDiv:s,pdfPage:null,annotationStorage:t.annotationStorage,linkService:n,xfaHtml:o})),r=(0,l.getXfaPageViewport)(o,{scale:a});s.render(r,"print")}};var l=i(5),h=i(3),d=i(38)}],r={};function o(e){var t=r[e];return void 0!==t||(t=r[e]={exports:{}},s[e](t,t.exports,o)),t.exports}function l(){var e={appContainer:document.body,mainContainer:document.getElementById("viewerContainer"),viewerContainer:document.getElementById("viewer"),toolbar:{container:document.getElementById("toolbarViewer"),numPages:document.getElementById("numPages"),pageNumber:document.getElementById("pageNumber"),scaleSelect:document.getElementById("scaleSelect"),customScaleOption:document.getElementById("customScaleOption"),previous:document.getElementById("previous"),next:document.getElementById("next"),zoomIn:document.getElementById("zoomIn"),zoomOut:document.getElementById("zoomOut"),viewFind:document.getElementById("viewFind"),openFile:document.getElementById("openFile"),print:document.getElementById("print"),editorFreeTextButton:document.getElementById("editorFreeText"),editorFreeTextParamsToolbar:document.getElementById("editorFreeTextParamsToolbar"),editorInkButton:document.getElementById("editorInk"),editorInkParamsToolbar:document.getElementById("editorInkParamsToolbar"),download:document.getElementById("download")},secondaryToolbar:{toolbar:document.getElementById("secondaryToolbar"),toggleButton:document.getElementById("secondaryToolbarToggle"),presentationModeButton:document.getElementById("presentationMode"),openFileButton:document.getElementById("secondaryOpenFile"),printButton:document.getElementById("secondaryPrint"),downloadButton:document.getElementById("secondaryDownload"),viewBookmarkButton:document.getElementById("viewBookmark"),firstPageButton:document.getElementById("firstPage"),lastPageButton:document.getElementById("lastPage"),pageRotateCwButton:document.getElementById("pageRotateCw"),pageRotateCcwButton:document.getElementById("pageRotateCcw"),cursorSelectToolButton:document.getElementById("cursorSelectTool"),cursorHandToolButton:document.getElementById("cursorHandTool"),scrollPageButton:document.getElementById("scrollPage"),scrollVerticalButton:document.getElementById("scrollVertical"),scrollHorizontalButton:document.getElementById("scrollHorizontal"),scrollWrappedButton:document.getElementById("scrollWrapped"),spreadNoneButton:document.getElementById("spreadNone"),spreadOddButton:document.getElementById("spreadOdd"),spreadEvenButton:document.getElementById("spreadEven"),documentPropertiesButton:document.getElementById("documentProperties")},sidebar:{outerContainer:document.getElementById("outerContainer"),sidebarContainer:document.getElementById("sidebarContainer"),toggleButton:document.getElementById("sidebarToggle"),thumbnailButton:document.getElementById("viewThumbnail"),outlineButton:document.getElementById("viewOutline"),attachmentsButton:document.getElementById("viewAttachments"),layersButton:document.getElementById("viewLayers"),thumbnailView:document.getElementById("thumbnailView"),outlineView:document.getElementById("outlineView"),attachmentsView:document.getElementById("attachmentsView"),layersView:document.getElementById("layersView"),outlineOptionsContainer:document.getElementById("outlineOptionsContainer"),currentOutlineItemButton:document.getElementById("currentOutlineItem")},sidebarResizer:{outerContainer:document.getElementById("outerContainer"),resizer:document.getElementById("sidebarResizer")},findBar:{bar:document.getElementById("findbar"),toggleButton:document.getElementById("viewFind"),findField:document.getElementById("findInput"),highlightAllCheckbox:document.getElementById("findHighlightAll"),caseSensitiveCheckbox:document.getElementById("findMatchCase"),matchDiacriticsCheckbox:document.getElementById("findMatchDiacritics"),entireWordCheckbox:document.getElementById("findEntireWord"),findMsg:document.getElementById("findMsg"),findResultsCount:document.getElementById("findResultsCount"),findPreviousButton:document.getElementById("findPrevious"),findNextButton:document.getElementById("findNext")},passwordOverlay:{dialog:document.getElementById("passwordDialog"),label:document.getElementById("passwordText"),input:document.getElementById("password"),submitButton:document.getElementById("passwordSubmit"),cancelButton:document.getElementById("passwordCancel")},documentProperties:{dialog:document.getElementById("documentPropertiesDialog"),closeButton:document.getElementById("documentPropertiesClose"),fields:{fileName:document.getElementById("fileNameField"),fileSize:document.getElementById("fileSizeField"),title:document.getElementById("titleField"),author:document.getElementById("authorField"),subject:document.getElementById("subjectField"),keywords:document.getElementById("keywordsField"),creationDate:document.getElementById("creationDateField"),modificationDate:document.getElementById("modificationDateField"),creator:document.getElementById("creatorField"),producer:document.getElementById("producerField"),version:document.getElementById("versionField"),pageCount:document.getElementById("pageCountField"),pageSize:document.getElementById("pageSizeField"),linearized:document.getElementById("linearizedField")}},annotationEditorParams:{editorFreeTextFontSize:document.getElementById("editorFreeTextFontSize"),editorFreeTextColor:document.getElementById("editorFreeTextColor"),editorInkColor:document.getElementById("editorInkColor"),editorInkThickness:document.getElementById("editorInkThickness"),editorInkOpacity:document.getElementById("editorInkOpacity")},printContainer:document.getElementById("printContainer"),openFileInput:document.getElementById("fileInput"),debuggerScriptPath:"./debugger.js"},t=document.createEvent("CustomEvent");t.initCustomEvent("webviewerloaded",!0,!0,{source:window});try{parent.document.dispatchEvent(t)}catch(e){console.error("webviewerloaded: "+e),document.dispatchEvent(t)}a.PDFViewerApplication.run(e)}e={},Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"PDFViewerApplication",{enumerable:!0,get:function(){return a.PDFViewerApplication}}),e.PDFViewerApplicationConstants=void 0,Object.defineProperty(e,"PDFViewerApplicationOptions",{enumerable:!0,get:function(){return i.AppOptions}}),t=o(1),i=o(2),n=o(3),a=o(4),n={LinkTarget:n.LinkTarget,RenderingStates:t.RenderingStates,ScrollMode:t.ScrollMode,SpreadMode:t.SpreadMode},e.PDFViewerApplicationConstants=n,window.PDFViewerApplication=a.PDFViewerApplication,window.PDFViewerApplicationConstants=n,window.PDFViewerApplicationOptions=i.AppOptions,o(42),o(48),null!=(e=(t=document).blockUnblockOnload)&&e.call(t,!0),"interactive"===document.readyState||"complete"===document.readyState?l():document.addEventListener("DOMContentLoaded",l,!0)})();