(()=>{"use strict";var n={232:e=>{e.exports=jQuery}},a={};function o(e){var t=a[e];return void 0!==t||(t=a[e]={exports:{}},n[e](t,t.exports,o)),t.exports}var e,i,r,t;function d(){function e(e){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=this._onmousedown.bind(this),this._onmousemove=this._onmousemove.bind(this),this._onmousewheel=this._onmousewheel.bind(this),this._endPan=this._endPan.bind(this),(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}e.prototype={CSS_CLASS_GRAB:"grab-to-pan-grab",activate:function(){this.active||(this.active=!0,this.element.addEventListener("mousedown",this._onmousedown,!0),this.element.addEventListener("mousewheel",this._onmousewheel),this.element.addEventListener("wheel",this._onmousewheel),this.element.addEventListener("DOMMouseScroll",this._onmousewheel),this.element.classList.add(this.CSS_CLASS_GRAB),this.onActiveChanged&&this.onActiveChanged(!0))},deactivate:function(){this.active&&(this.active=!1,this.element.removeEventListener("mousedown",this._onmousedown,!0),this._endPan(),this.element.classList.remove(this.CSS_CLASS_GRAB),this.onActiveChanged)&&this.onActiveChanged(!1)},toggle:function(){this.active?this.deactivate():this.activate()},ignoreTarget:function(e){return e[t]("a[href], a[href] *, input, textarea, button, button *, select, option")},_onmousedown:function(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(),this.document.documentElement.classList.add(this.CSS_CLASS_GRABBING);var t=document.activeElement;t&&!t.contains(e.target)&&t.blur()}},_onmousemove:function(e){var t;this.element.removeEventListener("scroll",this._endPan,!0),function(e){if("buttons"in e&&n)return!(1|e.buttons);if(o||i)return 0===e.which}(e)?this._endPan():(t=e.clientX-this.clientXStart,e=e.clientY-this.clientYStart,this.element.scrollTop=this.scrollTopStart-e,this.element.scrollLeft=this.scrollLeftStart-t,this.overlay.parentNode||document.body.appendChild(this.overlay))},_onmousewheel:function(e){this.element.removeEventListener("scroll",this._endPan,!0);var t=.5,n=(e.deltaMode&&(1==e.deltaMode&&(t=10),2==e.deltaMode)&&(t=1e3),e.deltaY?-e.deltaY:e.wheelDelta||-e.detail),n=(this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,n*t);if(this.element.scrollTop=this.scrollTopStart-n,this.overlay.parentNode||document.body.appendChild(this.overlay),this.element.scrollTop!=this.scrollTopStart||0==n)return e.preventDefault(),!1},_endPan:function(){this.element.removeEventListener("scroll",this._endPan,!0),this.document.removeEventListener("mousemove",this._onmousemove,!0),this.document.removeEventListener("mouseup",this._endPan,!0),this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)}},["webkitM","mozM","msM","oM","m"].some(function(e){e+="atches";return e in document.documentElement&&(t=e),t=(e+="Selector")in document.documentElement?e:t});var t,n=!document.documentMode||9",{class:"pdfemb-pagescontainer",style:a})),e.data("pdfDoc",t),e.data("toolbar")),a=("top"!==a&&"both"!==a||this.addToolbar(!0,"on"===e.data("toolbar-fixed"),n),"bottom"!==a&&"both"!==a||this.addToolbar(!1,"on"===e.data("toolbar-fixed"),n),o.annotationsLayerFactory=void 0!==i.pdfembPremiumAnnotationsLayerFactory?new i.pdfembPremiumAnnotationsLayerFactory:{createAnnotationsLayerBuilder:function(e,t){return null}},o.annotationLayerFactories=Array(),o.textLayerFactory=void 0!==i.pdfembPremiumTextLayerFactory?new i.pdfembPremiumTextLayerFactory:{createTextLayerBuilder:function(e,t){return null}},o.textLayerFactories=Array(),e.on("pdfembGotopage",function(e,t){t>this.numPages||t<=0||(o.gotoPage(t),o.jumpToTop())}),e.on("pdfembGotoHash",function(e,t){t.dest&&("string"==typeof(dest=t.dest)?(destString=dest,o.pdfDoc.getDestination(dest)):Promise.resolve(dest)).then(function(e){e instanceof Array&&!(e.length<1)&&o.pdfDoc.getPageIndex(e[0]).then(function(e){e+=1;e>o.numPages||e<=0||o.currentPageNum==e||(o.gotoPage(e),o.jumpToTop())})})}),e.on("pdfembGotoAction",function(e,t){var n=o.currentPageNum,a=n;switch(t){case"GoBack":--a;break;case"GoForward":case"NextPage":++a;break;case"PrevPage":--a;break;case"LastPage":a=o.pageCount;break;case"FirstPage":a=1}a==n||a>o.pageCount||a<=0||o.gotoPage(a)}),e.on("pdfembMagnify",function(e){o.magnifyEvent(e)}),e.on("pdfembChangeZoom",function(e,t){o.changeZoom(t)}),this.pageCount=t.numPages,(!e.data("pagenum")||e.data("pagenum")<1||e.data("pagenum")>this.pageCount)&&e.data("pagenum",1),e.data("showIsSecure",this.showIsSecure),e.data("pageNumPending",null),"on"==e.data("fullScreen")?parseInt(e.data("startfpzoom")):parseInt(e.data("startzoom")));(isNaN(a)||a<20||800",{class:"pdfemb-inner-div pdfemb-page"+t})).data("pageNum",t),e.append(n))}this.resizeInnerDivs()},e.prototype.addGrabToPan=function(){window.pdfembGrabToPan=d();var n=this,e=n.divContainer,t=e.find("div.pdfemb-pagescontainer"),a=new window.pdfembGrabToPan({element:t[0]});e.data("grabtopan",a),t.on("scroll",function(e){var t=n.getTopVisiblePageNum();n.currentPageNum!==t&&(n.currentPageNum=t,n.updatePageNumDisplay(t),n.renderPage(t,!1),n.prerenderNearbyPages(t),n.deallocateFarAwayPages(t)),e.stopPropagation()}),P(window).on("resize",function(){setTimeout(function(){n.checkForResize()},100)})},e.prototype.resizeInnerDivs=function(o){var i=this,r=i.wantCanvasWidth,d=i.wantCanvasHeight,e=i.wantHeight,s=this.divContainer.find(".pdfemb-pagescontainer").find(".pdfemb-inner-div"),p=(o&&(s=s.filter(".pdfemb-page"+o)),0),t=(s.each(function(e,t){var t=P(t),n=(n=t.data("widthfactor"))||1,a=(a=t.data("heightfactor"))||1,e=(t.data("invalidation-round",this.invalidationRound-1),t.css("width",r*n),d*a+(o==i.numPages||!o&&e==s.length-1?0:2)),e=(t.css("height",e),p+=e,t.find(".pdfemb-the-canvas"));e.css("width",r*n),e.css("height",d*a)}),0);!o&&pthis.pageCount||(this.renderPage(e,!0),this.currentPageNum=e,this.updatePageNumDisplay(e),this.prerenderNearbyPages(e),this.deallocateFarAwayPages(e))},e.prototype.updatePageNumDisplay=function(n){var e=this.divContainer;e.find("div.pdfemb-toolbar .pdfemb-page-num").each(function(e,t){t=P(t);t.is("span")?t.text(n):t.val(n)}),n=g?l&&f.scrollPageIntoView(m):(u=w.data("pending-drawing-round"),g<=u||(0",{class:"pdfemb-the-canvas"}),w.append(o)),l&&f.scrollPageIntoView(m),f.wantCanvasWidth),r=f.wantCanvasHeight,d=f.canvasscale,s=f.zoom,p=(o.css("width",i*n),o.css("height",r*a),f.wantMobile?v.data("grabtopan").deactivate():v.data("grabtopan").activate(),t.getViewport(d*s/100)),c=document.createElement("canvas"),h=(c.width=i*y*f.reducefactor*n,c.height=r*y*f.reducefactor*a,c.getContext("2d")),d={canvasContext:h,viewport:p,transform:[y*f.reducefactor,0,0,y*f.reducefactor,0,0]},d=t.render(d);d.promise.then(function(){"requestAnimationFrame"in window?window.requestAnimationFrame(e):setTimeout(e,1)})}))))},e.prototype.changeZoom=function(e){var t=this,n=t.divContainer,a=t.zoom,e=a+e,a=(t.zoom=e,n.find("span.pdfemb-zoom").text(e+"%"),t.fromZoom=a,t.toZoom=e,n.find(".pdfemb-pagescontainer"));t.pccentreLeft=a.width()/2,t.pccentreTop=a.height()/2,t.resizeViewer(),t.resizeInnerDivs(),t.invalidateAllPages(),t.renderPage(t.currentPageNum),t.prerenderNearbyPages(t.currentPageNum)},e.prototype.queueRenderPage=function(e,t){this.divContainer;this.renderPage(e,t)},e.prototype.addToolbar=function(e,t,n){var a=this.divContainer,o=this,i=P("
",{class:"pdfemb-toolbar pdfemb-toolbar"+(t?"-fixed":"-hover")+" "+(e?" pdfemb-toolbar-top":"pdfemb-toolbar-bottom")}),r=P(''),d=(i.append(r),P('')),s=(i.append(d),i.append(P('
'+pdfemb_trans.objectL10n.page+' 0 /
')),P('')),p=(i.append(s),P(''));i.append(p),i.append(P("
"+pdfemb_trans.objectL10n.zoom+' 100%
')),n&&i.append(P("
"+pdfemb_trans.objectL10n.secure+"
")),e?a.prepend(i):a.append(i),r.on("click",function(e){o.currentPageNum<=1||(o.gotoPage(o.currentPageNum-1),o.jumpToTop())}),d.on("click",function(e){o.currentPageNum>=o.pageCount||0==o.currentPageNum||(o.gotoPage(o.currentPageNum+1),o.jumpToTop())}),p.on("click",function(e){800<=o.zoom||o.changeZoom(10)}),s.on("click",function(e){o.zoom<=20||o.changeZoom(-10)}),o.addMoreToolbar(i),t||(a.on("mouseenter",function(e){var t=a.find("div.pdfemb-toolbar-hover");!0!==t.data("no-hover")&&t.show()}),a.on("mouseleave",function(e){a.find("div.pdfemb-toolbar-hover").hide()}),a.on("pdfembTouchTapped",function(e){var t;e.stopPropagation(),e.preventDefault(),o.locktaps||(o.locktaps=!0,t=(e=a.find("div.pdfemb-toolbar-hover")).is(":visible"),(t=1==e.data("no-hover")?!0:t)?e.hide():e.show(),setTimeout(function(){o.locktaps=!1},250))})),"on"===pdfemb_trans.poweredby&&i.append(P("
",{class:"pdfemb-poweredby"}).append(P('wp-pdf.com')))},e.prototype.magnifyEvent=function(e){var t,n=e.originalEvent.magnification;-1==n?(this.resizeViewer(),this.resizeInnerDivs(),this.invalidateAllPages(),this.renderPage(this.getTopVisiblePageNum())):(t=this.divContainer.find(".pdfemb-pagescontainer").offset(),this.magnifyZoom(n,e.originalEvent.centreLeft-t.left,e.originalEvent.centreTop-t.top))},e.prototype.magnifyZoom=function(e,t,n){var a=this.zoom,e=Math.floor(a*e);this.zoom=e=800<(e=e<20?20:e)?800:e,this.divContainer.find("span.pdfemb-zoom").text(e+"%"),this.fromZoom=a,this.toZoom=e,this.pccentreLeft=t,this.pccentreTop=n,this.resizeViewer(),this.resizeInnerDivs(),this.invalidateAllPages()},e.prototype.pdfembWantMobile=function(e,t){return!1},e.prototype.pdfembMakeMobile=function(){},e.prototype.addMoreToolbar=function(e){},e.prototype.jumpToTop=function(){},e.prototype.preRenderCanvas=function(e,t,n){},i.pdfembPagesViewer=e}),e=i,r=o(232),t=o(232),window.PDFEMB_NS=e,window.PDFEMB_NS.pdfembGetPDF=function(e,t){t(e,!1)},t.fn.pdfEmbedder=function(i){return this.each(function(e,t){var n,a,t=r(t),o=(t.is("a")?(a=t.data(),(n=r("
",{class:t.attr("class"),style:t.attr("style")})).data(r.extend({"pdf-url":t.attr("href")},a)),t.replaceWith(n)):n=t,n.append(r("
",{class:"pdfemb-loadingmsg"}).append(document.createTextNode(pdfemb_trans.objectL10n.loading))),"on"===n.data("disablerightclick")&&n.bind("contextmenu",function(e){e.preventDefault()}),function(e,t){new window.PDFEMB_NS.pdfembPagesViewerUsable(e,n,t).setup()});n.data("pdfDoc")?o(n.data("pdfDoc"),n.data("showIsSecure")):(a=n.data("pdf-url"),window.PDFEMB_NS.pdfembGetPDF(a,function(e,t){null===e?n.empty().append(r("
",{class:"pdfemb-errormsg"}).append(r("").append(document.createTextNode("Failed to load and decrypt PDF")))):pdfjsLib.getDocument(e,i).promise.then(function(e){o(e,t)},function(e){var t=document.createTextNode(e.message);"UnknownErrorException"===e.name&&"Failed to fetch"===e.message&&(t=r("").append(document.createTextNode(e.message+" "+pdfemb_trans.objectL10n.domainerror+" ")).append(r(''+pdfemb_trans.objectL10n.clickhereinfo+""))),n.empty().append(r("
",{class:"pdfemb-errormsg"}).append(t))})}))}),this},t(document).ready(function(e){function t(){n.apply(this,arguments)}var n=window.PDFEMB_NS.pdfembPagesViewer;t.prototype=new n,window.PDFEMB_NS.pdfembPagesViewerUsable=t,e(".pdfemb-viewer").pdfEmbedder(pdfemb_trans.cmap_url)})})();