1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a4e0ccfd-e9b0-4ee3-90e7-0acfe196dcec",e._sentryDebugIdIdentifier="sentry-dbid-a4e0ccfd-e9b0-4ee3-90e7-0acfe196dcec")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[962],{86110:function(e,t){"use strict";t.yf=function(e){return void 0===e&&(e=""),!!e.replace(/-/gi,"").replace(/^(\d{2,3})(\d{3,4})(\d{4})$/,"$1-$2-$3").match(/^[0-9]{3}-+[0-9]{4}-+[0-9]{4}$/)},t.vV=function(e){return void 0===e&&(e=""),null!==e.trim().match(/^\w+([\\.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/)},t.eV=function(e){return void 0===e&&(e=""),null!==e.trim().match(/^\d{3}-?\d{2}-?\d{5}$/)}},89469:function(e,t,n){"use strict";var r,o=n(67294),a=n(99299);function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c,l=i(o),u=i(a);t.JJ=void 0,(c=t.JJ||(t.JJ={}))[c.Text=1]="Text",c[c.Link=2]="Link",c[c.FreeText=3]="FreeText",c[c.Line=4]="Line",c[c.Square=5]="Square",c[c.Circle=6]="Circle",c[c.Polygon=7]="Polygon",c[c.Polyline=8]="Polyline",c[c.Highlight=9]="Highlight",c[c.Underline=10]="Underline",c[c.Squiggly=11]="Squiggly",c[c.StrikeOut=12]="StrikeOut",c[c.Stamp=13]="Stamp",c[c.Caret=14]="Caret",c[c.Ink=15]="Ink",c[c.Popup=16]="Popup",c[c.FileAttachment=17]="FileAttachment";var s=function(e,t){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var p,f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};t.m5=void 0,(p=t.m5||(t.m5={})).RightToLeft="RTL",p.LeftToRight="LTR";var h,g=l.createContext({currentTheme:"light",direction:t.m5.LeftToRight,setCurrentTheme:function(){}}),v=function(e){var t=[];return Object.keys(e).forEach(function(n){n&&e[n]&&t.push(n)}),t.join(" ")},m="undefined"!=typeof window?l.useLayoutEffect:l.useEffect,w=function(e){var t=l.useRef(null),n=e.once,r=e.threshold,o=e.onVisibilityChanged;return m(function(){var e=t.current;if(e){var a=new IntersectionObserver(function(t){t.forEach(function(t){var r=t.isIntersecting;o({isVisible:r,ratio:t.intersectionRatio}),r&&n&&(a.unobserve(e),a.disconnect())})},{threshold:r||0});return a.observe(e),function(){a.unobserve(e),a.disconnect()}}},[]),t},y=function(e){var n=e.children,r=e.ignoreDirection,o=e.size,a=l.useContext(g).direction,i=!(void 0!==r&&r)&&a===t.m5.RightToLeft,c="".concat((void 0===o?24:o)||24,"px");return l.createElement("svg",{"aria-hidden":"true",className:v({"rpv-core__icon":!0,"rpv-core__icon--rtl":i}),focusable:"false",height:c,viewBox:"0 0 24 24",width:c},n)},b=function(){return l.createElement(y,{size:16},l.createElement("path",{d:"M23.5,0.499l-16.5,23l-6.5-6.5"}))},E=function(e){var n=e.children,r=e.testId,o=e.onClick,a=l.useContext(g).direction===t.m5.RightToLeft;return l.createElement("button",f({className:v({"rpv-core__primary-button":!0,"rpv-core__primary-button--rtl":a}),type:"button",onClick:o},r?{"data-testid":r}:{}),n)},P=function(e){var t=e.size,n=void 0===t?"4rem":t,r=e.testId,o=l.useState(!1),a=o[0],i=o[1],c=w({onVisibilityChanged:function(e){i(e.isVisible)}});return l.createElement("div",f({},r?{"data-testid":r}:{},{className:v({"rpv-core__spinner":!0,"rpv-core__spinner--animating":a}),ref:c,style:{height:n,width:n}}))},x=function(e){var n=e.ariaLabel,r=e.autoFocus,o=void 0!==r&&r,a=e.placeholder,i=e.testId,c=e.type,u=e.value,s=e.onCh
1ange,d=e.onKeyDown,p=l.useContext(g).direction,h=l.useRef(),w={ref:h,"data-testid":"","aria-label":void 0===n?"":n,className:v({"rpv-core__textbox":!0,"rpv-core__textbox--rtl":p===t.m5.RightToLeft}),placeholder:void 0===a?"":a,value:void 0===u?"":u,onChange:function(e){return s(e.target.value)},onKeyDown:void 0===d?function(){}:d};return i&&(w["data-testid"]=i),m(function(){if(o){var e=h.current;if(e){var t=window.scrollX,n=window.scrollY;e.focus(),window.scrollTo(t,n)}}},[]),"text"===(void 0===c?"text":c)?l.createElement("input",f({type:"text"},w)):l.createElement("input",f({type:"password"},w))};(R=h||(h={}))[R.ExitFullScreen=0]="ExitFullScreen",R[R.FullScreenChange=1]="FullScreenChange",R[R.FullScreenElement=2]="FullScreenElement",R[R.FullScreenEnabled=3]="FullScreenEnabled",R[R.RequestFullScreen=4]="RequestFullScreen";var R,k,S={ExitFullScreen:"exitFullscreen",FullScreenChange:"fullscreenchange",FullScreenElement:"fullscreenElement",FullScreenEnabled:"fullscreenEnabled",RequestFullScreen:"requestFullscreen"},_={ExitFullScreen:"webkitExitFullscreen",FullScreenChange:"webkitfullscreenchange",FullScreenElement:"webkitFullscreenElement",FullScreenEnabled:"webkitFullscreenEnabled",RequestFullScreen:"webkitRequestFullscreen"},C={ExitFullScreen:"msExitFullscreen",FullScreenChange:"msFullscreenChange",FullScreenElement:"msFullscreenElement",FullScreenEnabled:"msFullscreenEnabled",RequestFullScreen:"msRequestFullscreen"},O="undefined"!=typeof window,M=O&&(h.FullScreenEnabled in document&&S||_.FullScreenEnabled in document&&_||C.FullScreenEnabled in document&&C)||S,F=function(e){return O?e[M.ExitFullScreen]():Promise.resolve({})},L=function(){return O?document[M.FullScreenElement]:null},T=function(e,t){var n=l.useRef(),r=function(){n.current&&clearTimeout(n.current)};return l.useEffect(function(){return function(){return r()}},[]),l.useCallback(function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];r(),n.current=setTimeout(function(){e.apply(void 0,o)},t)},[e,t])},I=function(){var e=l.useRef(!1);return l.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),e},D=function(e){var t=l.useRef(e);return l.useEffect(function(){t.current=e},[e]),t.current};(A=k||(k={})).NotRenderedYet="NotRenderedYet",A.Rendering="Rendering",A.Rendered="Rendered";var A,H,N=function(e){var t=e.doc,n=t.numPages,r=t.loadingTask.docId,o=l.useMemo(function(){return Array(n).fill(null).map(function(e,t){return{pageIndex:t,renderStatus:k.NotRenderedYet,visibility:-9999}})},[r]),a=l.useRef({currentRenderingPage:-1,startRange:0,endRange:n-1,visibilities:o}),i=function(e,t){a.current.visibilities[e].visibility=t};return{getHighestPriorityPage:function(){var e=a.current.visibilities.slice(a.current.startRange,a.current.endRange+1).filter(function(e){return e.visibility>-9999});if(!e.length)return -1;for(var t=e[0].pageIndex,r=e[e.length-1].pageIndex,o=e.length,i=0;i<o;i++){if(e[i].renderStatus===k.Rendering)return -1;if(e[i].renderStatus===k.NotRenderedYet)return e[i].pageIndex}return r+1<n&&a.current.visibilities[r+1].renderStatus!==k.Rendered?r+1:t-1>=0&&a.current.visibilities[t-1].renderStatus!==k.Rendered?t-1:-1},isInRange:function(e){return e>=a.current.startRange&&e<=a.current.endRange},markNotRendered:function(){for(var e=0;e<n;e++)a.current.visibilities[e].renderStatus=k.NotRenderedYet},markRendered:function(e){a.current.visibilities[e].renderStatus=k.Rendered},markRendering:function(e){-1!==a.current.currentRenderingPage&&a.current.currentRenderingPage!==e&&a.current.visibilities[a.current.currentRenderingPage].renderStatus===k.Rendering&&(a.current.visibilities[a.current.currentRenderingPage].renderStatus=k.NotRenderedYet),a.current.visibilities[e].renderStatus=k.Rendering,a.current.currentRenderingPage=e},setOutOfRange:function(e){i(e,-9999)},setRange:function(e,t){a.current.startRange=e,a.current.endRange=t;for(var r=0;r<n;r++)(r<e||r>t)&&(a.current.visibilities[r].visibility=-9999,a.current.visibilities[r].renderStatus=k.NotRenderedYet)},setVisibility:i}},z={core:{askingPassword:{requirePasswordToOpen:"This document requires a password to open",submit:"Submit"},wrongPassword:{tryAgain:"The password is wrong. Please try again"},pageLabel:"Page {{pageIndex}}"}},j=l.createContext({l10n:z,setL10n:function(){}});t.$Z=void 0,(H=t.$Z||(t.$Z={})).Close="Close",H.Open="Open",H.Toggle="Toggle";var B,V=function(e){var n=l.useState(e),r=n[0],o=n[1];return{opened:r,toggle:function(e){switch(e){case t.$Z.Close:o(!1);break;case t.$Z.Open:o(!0);break;case t.$Z.Toggle:default:o(function(e){return!e})}}}};t.Ly=void 0,(B=t.Ly||(t.Ly={})).TopLeft="TOP_LEFT",B.TopCenter="TOP_CENTER",B.TopRight="TOP_RIGHT",B.RightTop="RIGHT_TOP",B.RightCenter="RIGHT_CENTER",B.RightBottom="RIGHT_BOTTOM",B.BottomLeft="BOTTOM_LEFT",B.BottomCenter="BOTTOM_CENTER",B.BottomRight="BOTTOM_RIGHT",B.LeftTop="LEFT_TOP",B.LeftCenter="LEFT_CENTER",B.LeftBottom="LEFT_BOTTOM",t.Fi=void 0,(W=t.Fi||(t.Fi={})).Normal="Normal",W.Entering="Entering",W.Entered="Entered",W.EnteredCompletely="EnteredCompletely",W.Exitting="Exitting",W.Exited="Exited",t.B1=void 0,(J=t.B1||(t.B1={}))[J.PreRender=0]="PreRender",J[J.DidRender=1]="DidRender",t.Vc=void 0,(G=t.Vc||(t.Vc={})).Attachments="UseAttachments",G.Bookmarks="UseOutlines",G.ContentGroup="UseOC",G.Default="UserNone",G.FullScreen="FullScreen",G.Thumbnails="UseThumbs",t.Fn=void 0,(q=t.Fn||(t.Fn={})).RequiredPassword="RequiredPassword",q.WrongPassword="WrongPassword",t.Rn=void 0,(U=t.Rn||(t.Rn={})).Backward="Backward",U.Forward="Forward",t.Gd=void 0,(Z=t.Gd||(t.Gd={})).Page="Page",Z.Horizontal="Horizontal",Z.Vertical="Vertical",Z.Wrapped="Wrapped",t.Tq=void 0,($=t.Tq||(t.Tq={})).ActualSize="ActualSize",$.PageFit="PageFit",$.PageWidth="PageWidth",t.wO=void 0,(Y=t.wO||(t.wO={})).DualPage="DualPage",Y.DualPageWithCover="DualPageWithCover",Y.SinglePage="SinglePage";var W,J,G,q,U,Z,$,Y,K,Q=function(e,t){return e.reduce(function(e,n,r){return r%t?e[e.length-1].push(n):e.push([n]),e},[])},X=function(e,n){switch(n[1].name){case"XYZ":return{bottomOffset:function(e,t){return null===n[3]?t:n[3]},leftOffset:function(e,t){return null===n[2]?0:n[2]},pageIndex:e,scaleTo:n[4]};case"Fit":case"FitB":return{bottomOffset:0,leftOffset:0,pageIndex:e,scaleTo:t.Tq.PageFit};case"FitH":case"FitBH":return{bottomOffset:n[2],leftOffset:0,pageIndex:e,scaleTo:t.Tq.PageWidth};default:return{bottomOffset:0,leftOffset:0,pageIndex:e,scaleTo:1}}},ee=new Map,et=new Map,en=function(e,t){return"".concat(e.loadingTask.docId,"___").concat(t.num,"R").concat(0===t.gen?"":t.gen)},er=function(e,t,n){ee.set(en(e,t),n)},eo=function(e,t){if(!e)return Promise.reject("The document is not loaded yet");var n="".concat(e.loadingTask.docId,"___").concat(t),r=et.get(n);return r?Promise.resolve(r):new Promise(function(r,o){e.getPage(t+1).then(function(o){et.set(n,o),o.ref&&er(e,o.ref,t),r(o
1)})})},ea=function(e,t){return new Promise(function(n){new Promise(function(n){"string"==typeof t?e.getDestination(t).then(function(e){n(e)}):n(t)}).then(function(r){if("object"==typeof r[0]&&null!==r[0]){var o,a=r[0],i=(o=en(e,a),ee.has(o)?ee.get(o):null);null===i?e.getPageIndex(a).then(function(r){er(e,a,r),ea(e,t).then(function(e){return n(e)})}):n(X(i,r))}else n(X(r[0],r))})})};(ei=K||(K={}))[ei.Solid=1]="Solid",ei[ei.Dashed=2]="Dashed",ei[ei.Beveled=3]="Beveled",ei[ei.Inset=4]="Inset",ei[ei.Underline=5]="Underline";var ei,ec,el=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"),eu=function(e,t,n,r){var o=parseInt(e,10);return o>=t&&o<=n?o:r},es=function(e){return e.contentsObj?e.contentsObj.str:e.contents||""},ed=function(e){return e.titleObj?e.titleObj.str:e.title||""},ep=function(e){var n=e.annotation,r=l.useContext(g).direction,o=ed(n),a=es(n),i=r===t.m5.RightToLeft,c=l.useRef(),u="";if(n.modificationDate){var s=function(e){var t=el.exec(e);if(!t)return null;var n=parseInt(t[1],10),r=eu(t[2],1,12,1)-1,o=eu(t[3],1,31,1),a=eu(t[4],0,23,0),i=eu(t[5],0,59,0),c=eu(t[6],0,59,0),l=t[7]||"Z",u=eu(t[8],0,23,0),s=eu(t[9],0,59,0);switch(l){case"-":a+=u,i+=s;break;case"+":a-=u,i-=s}return new Date(Date.UTC(n,r,o,a,i,c))}(n.modificationDate);u=s?"".concat(s.toLocaleDateString(),", ").concat(s.toLocaleTimeString()):""}return l.useLayoutEffect(function(){if(c.current){var e=document.querySelector('[data-annotation-id="'.concat(n.id,'"]'));if(e)return e.style.zIndex+=1,function(){e.style.zIndex="".concat(parseInt(e.style.zIndex,10)-1)}}},[]),l.createElement("div",{ref:c,className:v({"rpv-core__annotation-popup-wrapper":!0,"rpv-core__annotation-popup-wrapper--rtl":i}),style:{top:n.annotationType===t.JJ.Popup?"":"100%"}},o&&l.createElement(l.Fragment,null,l.createElement("div",{className:v({"rpv-core__annotation-popup-title":!0,"rpv-core__annotation-popup-title--ltr":!i,"rpv-core__annotation-popup-title--rtl":i})},o),l.createElement("div",{className:"rpv-core__annotation-popup-date"},u)),a&&l.createElement("div",{className:"rpv-core__annotation-popup-content"},a.split("\n").map(function(e,t){return l.createElement(l.Fragment,{key:t},e,l.createElement("br",null))})))};(ef=ec||(ec={})).Click="Click",ef.Hover="Hover";var ef,eh,eg=function(e){var n,r,o,a,i,c,u,s=e.annotation,d=e.children,p=e.ignoreBorder,f=e.hasPopup,h=e.isRenderable,g=e.page,v=e.viewport,m=s.rect,w=(r=(n=V(!1)).opened,o=n.toggle,i=(a=l.useState(ec.Hover))[0],c=a[1],{opened:r,closeOnHover:function(){i===ec.Hover&&o(t.$Z.Close)},openOnHover:function(){i===ec.Hover&&o(t.$Z.Open)},toggleOnClick:function(){switch(i){case ec.Click:r&&c(ec.Hover),o(t.$Z.Toggle);break;case ec.Hover:c(ec.Click),o(t.$Z.Open)}}}),y=w.closeOnHover,b=w.opened,E=w.openOnHover,P=w.toggleOnClick,x=[Math.min((u=[m[0],g.view[3]+g.view[1]-m[1],m[2],g.view[3]+g.view[1]-m[3]])[0],u[2]),Math.min(u[1],u[3]),Math.max(u[0],u[2]),Math.max(u[1],u[3])],R=m[2]-m[0],k=m[3]-m[1],S={borderColor:"",borderRadius:"",borderStyle:"",borderWidth:""};if(!p&&s.borderStyle.width>0){switch(s.borderStyle.style){case K.Dashed:S.borderStyle="dashed";break;case K.Solid:S.borderStyle="solid";break;case K.Underline:S=Object.assign({borderBottomStyle:"solid"},S);case K.Beveled:case K.Inset:}var _=s.borderStyle.width;S.borderWidth="".concat(_,"px"),s.borderStyle.style!==K.Underline&&(R-=2*_,k-=2*_);var C=s.borderStyle,O=C.horizontalCornerRadius,M=C.verticalCornerRadius;(O>0||M>0)&&(S.borderRadius="".concat(O,"px / ").concat(M,"px")),s.color?S.borderColor="rgb(".concat(0|s.color[0],", ").concat(0|s.color[1],", ").concat(0|s.color[2],")"):S.borderWidth="0"}return l.createElement(l.Fragment,null,h&&d({popup:{opened:b,closeOnHover:y,openOnHover:E,toggleOnClick:P}
1,slot:{attrs:{style:Object.assign({height:"".concat(k,"px"),left:"".concat(x[0],"px"),top:"".concat(x[1],"px"),transform:"matrix(".concat(v.transform.join(","),")"),transformOrigin:"-".concat(x[0],"px -").concat(x[1],"px"),width:"".concat(R,"px")},S)},children:l.createElement(l.Fragment,null,f&&b&&l.createElement(ep,{annotation:s}))}}))},ev=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i);return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--caret","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},em=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],p=t.borderStyle.width;return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--circle","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.createElement("circle",{cy:d/2,fill:"none",rx:s/2-p/2,ry:d/2-p/2,stroke:"transparent",strokeWidth:p||1})),e.slot.children)})},ew=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=ed(t),a=es(t),i=!(!1!==t.hasPopup||!o&&!a),c=function(){var e,n,r,o,a,i=t.file;i&&(n=i.filename,o="string"==typeof(r=i.content)?"":URL.createObjectURL(new Blob([r],{type:""})),(a=document.createElement("a")).style.display="none",a.href=o||n,a.setAttribute("download",(e=n.split("/").pop())?e.split("#")[0].split("?")[0]:n),document.body.appendChild(a),a.click(),document.body.removeChild(a),o&&URL.revokeObjectURL(o))};return l.createElement(eg,{annotation:t,hasPopup:i,ignoreBorder:!0,isRenderable:!0,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--file-attachment","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onDoubleClick:c,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},ey=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i);return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--free-text","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eb=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=ed(t),a=es(t),i=!t.parentType||-1!==["Circle","Ink","Line","Polygon","PolyLine","Square"].indexOf(t.parentType);return m(function(){if(t.parentId){var e=document.querySelector('[data-annotation-id="'.concat(t.parentId,'"]')),n=document.querySelector('[data-annotation-id="'.concat(t.id,'"]'));if(e&&n){var r=parseFloat(e.style.left),o=parseFloat(e.style.top)+parseFloat(e.style.height);n.style.left="".concat(r,"px"),n.style.top="".concat(o,"px"),n.style.transformOrigin="-".concat(r,"px -").concat(o,"px")}}},[]),l.createElement(eg,{annotation:t,hasPopup:i,ignoreBorder:!1,isRenderable:!(!o&&!a),page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--popup","data-annotation-id":t.id}),l.createElement(ep,{annotation:t}))})},eE=function(e){var n=e.annotation,r=e.childAnnotation,o=e.page,a=e.viewport,i=!1===n.hasPopup,c=ed(n),u=es(n),s=!!(n.hasPopup||c||u);if(n.quadPoints&&n.quadPoints.length>0){var d=n.quadPoints.map(function(e){return Object.assign({},n,{rect:[e[2].x,e[2].y,e[1].x,e[1].y],quadPoints:[]})});return l.createElement(l.Fragment,null,d.map(function(e,t){return l.createElement(eE,{key:t,annotation:e,childAnnotation:r,page:o,viewport:
1a})}))}return l.createElement(eg,{annotation:n,hasPopup:i,ignoreBorder:!0,isRenderable:s,page:o,viewport:a},function(e){return l.createElement(l.Fragment,null,l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--highlight","data-annotation-id":n.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children),r&&r.annotationType===t.JJ.Popup&&e.popup.opened&&l.createElement(eb,{annotation:r,page:o,viewport:a}))})},eP=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],p=t.borderStyle.width;return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--ink","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.inkLists&&t.inkLists.length&&l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},t.inkLists.map(function(e,t){return l.createElement("polyline",{key:t,fill:"none",stroke:"transparent",strokeWidth:p||1,points:e.map(function(e){return"".concat(e.x-u[0],",").concat(u[3]-e.y)}).join(" ")})})),e.slot.children)})},ex=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],p=t.borderStyle.width;return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--line","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.createElement("line",{stroke:"transparent",strokeWidth:p||1,x1:u[2]-t.lineCoordinates[0],x2:u[2]-t.lineCoordinates[2],y1:u[3]-t.lineCoordinates[1],y2:u[3]-t.lineCoordinates[3]})),e.slot.children)})},eR=/^([^\w]*)(javascript|data|vbscript)/im,ek=/&#(\w+)(^\w|;)?/g,eS=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e_=/^([^:]+):/gm,eC=function(e,t){void 0===t&&(t="about:blank");var n=(e||"").replace(ek,function(e,t){return String.fromCharCode(t)}).replace(eS,"").trim();if(!n)return t;var r=n[0];if("."===r||"/"===r)return n;var o=n.match(e_);if(!o)return n;var a=o[0];return eR.test(a)?t:n},eO=function(e){var t,n=e.annotation,r=e.annotationContainerRef,o=e.doc,a=e.outlines,i=e.page,c=e.pageIndex,u=e.scale,s=e.viewport,d=e.onExecuteNamedAction,p=e.onJumpFromLinkAnnotation,h=e.onJumpToDest,g=l.useRef(),v=a&&a.length&&n.dest&&"string"==typeof n.dest?null===(t=a.find(function(e){return e.dest===n.dest}))||void 0===t?void 0:t.title:"",m=!!(n.url||n.dest||n.action||n.unsafeUrl),w={};if(n.url||n.unsafeUrl){var y=eC(n.url||n.unsafeUrl,"");y?w={"data-target":"external",href:y,rel:"noopener noreferrer nofollow",target:n.newWindow?"_blank":"",title:y}:m=!1}else w={href:"","data-annotation-link":n.id,onClick:function(e){e.preventDefault(),n.action?d(n.action):ea(o,n.dest).then(function(e){var t=g.current,n=r.current;if(t&&n){var o=t.getBoundingClientRect();n.style.setProperty("height","100%"),n.style.setProperty("width","100%");var a=n.getBoundingClientRect();n.style.removeProperty("height"),n.style.removeProperty("width");var i=(o.left-a.left)/u;p({bottomOffset:(a.bottom-o.bottom+o.height)/u,label:v,leftOffset:i,pageIndex:c})}h(e)})}};return v&&(w=Object.assign({},w,{title:v,"aria-label":v})),l.createElement(eg,{annotation:n,hasPopup:!1,ignoreBorder:!1,isRenderable:m,page:i,viewport:s},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--link","data-annotation-id":n.id,"data-testid":"core__annotation--link-".concat(n.id)}),l.createElement("a",f({ref:g},w)))})},eM=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],p=t.borderStyle.width;return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--polygon","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.vertices&&t.vertices.length&&l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.createElement("polygon",{fill:"none",stroke:"transparent",strokeWidth:p||1,points:t.vertices.map(function(e){return"".concat(e.x-u[0],",").concat(u[3]-e.y)}).join(" ")})),e.slot.children)})},eF=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],p=t.borderStyle.width;return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--polyline","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.vertices&&t.vertices.length&&l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.createElement("polyline",{fill:"none",stroke:"transparent",strokeWidth:p||1,points:t.vertices.map(function(e){return"".concat(e.x-u[0],",").concat(u[3]-e.y)}).join(" ")})),e.slot.children)})},eL=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],p=t.borderStyle.width;return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--square","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.createElement("rect",{height:d-p,fill:"none",stroke:"transparent",strokeWidth:p||1,x:p/2,y:p/2,width:s-p})),e.slot.children)})},eT=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i);return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--squiggly","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eI=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i);return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--stamp","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eD=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i);return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--strike-out","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eA=function(){return l.createElement(y,{size:16},l.createElement("path",{d:"M.5,16.5a1,1,0,0,0,1,1h2v4l4-4h15a1,1,0,0,0,1-1V3.5a1,1,0,0,0-1-1H1.5a1,1,0,0,0-1,1Z"}),l.createElement("path",{d:"M7.25,9.75A.25.25,0,1,1,7,10a.25.25,0,0,1,.25-.25"}),l.createElement("path",{d:"M12,9.75a.25.25,0,1,1-.25.25A.25.25,0,0,1,12,9.75"}),l.createElement("path",{d:"M16.75,9.75a.25.25,0,1,1-.25.25.25.25,0,0,1,.25-.25"}))},eH=function(){return l.createElement(y,{size:16},l.createElement("path",{d:"M0.500 12.001 A11.500 11.500 0 1 0 23.500 12.001 A11.500 11.500 0 1 0 0.500 12.001 Z"}),l.createElement("path",{d:"M6.000 12.001 A6.000 6.000 0 1 0 18.000 12.001 A6.000 6.000 0 1 0 6.000 12.001 Z"}),l.createElement("path",{d:"M21.423 5.406L17.415 9.414"}),l.createElement("path",{d:"M14.587 6.585L18.607 2.565"}),l.createElement("path",{d:"M5.405 21.424L9.413 17.416"}),l.createElement("path",{d:"M6.585 14.588L2.577 18.596"}),l.createElement("path",{d:"M18.602 21.419L14.595 17.412"}),l.createElement("path",{d:"M17.419 14.58L21.428 18.589"}),l.createElement("path",{d:"M2.582 5.399L6.588 9.406"}),l.createElement("path",{d:"M9.421 6.581L5.412 2.572"}))},eN=function(){return l.createElement(y,{size:16},l.createElement("path",{d:"M4.000 18.500 A1.500 1.500 0 1 0 7.000 18.500 A1.500 1.500 0 1 0 4.000 18.500 Z"}),l.createElement("path",{d:"M20.5.5l-9.782,9.783a7,7,0,1,0,3,3L17,10h1.5V8.5L19,8h1.5V6.5L21,6h1.5V4.5l1-1V.5Z"}))},ez=function(){return l.createElement(y,{size:16},l.createElement("path",{d:"M2.000 2.500 L22.000 2.500 L22.000 23.500 L2.000 23.500 Z"}),l.createElement("path",{d:"M6 4.5L6 0.5"}),l.createElement("path",{d:"M18 4.5L18 0.5"}),l.createElement("path",{d:"M10 4.5L10 0.5"}),l.createElement("path",{d:"M14 4.5L14 0.5"}))},ej=function(){return l.createElement(y,{size:16},l.createElement("path",{d:"M17.5 0.498L17.5 23.498"}),l.createElement("path",{d:"M10.5 0.498L10.5 23.498"}),l.createElement("path",{d:"M23.5.5H6.5a6,6,0,0,0,0,12h4"}))},eB=function(){return l.createElement(y,{size:16},l.createElement("path",{d:"M2.5 22.995L12 6.005 21.5 22.995 2.5 22.995z"}))},eV=function(e){var n=e.annotation,r=e.childAnnotation,o=e.page,a=e.viewport,i=!1===n.hasPopup,c=ed(n),u=es(n),s=!!(n.hasPopup||c||u),d=n.name?n.name.toLowerCase():"";return l.createElement(eg,{annotation:n,hasPopup:i,ignoreBorder:!1,isRenderable:s,page:o,viewport:
1a},function(e){return l.createElement(l.Fragment,null,l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--text","data-annotation-id":n.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),d&&l.createElement("div",{className:"rpv-core__annotation-text-icon"},"check"===d&&l.createElement(b,null),"comment"===d&&l.createElement(eA,null),"help"===d&&l.createElement(eH,null),"insert"===d&&l.createElement(eB,null),"key"===d&&l.createElement(eN,null),"note"===d&&l.createElement(ez,null),("newparagraph"===d||"paragraph"===d)&&l.createElement(ej,null)),e.slot.children),r&&r.annotationType===t.JJ.Popup&&e.popup.opened&&l.createElement(eb,{annotation:r,page:o,viewport:a}))})},eW=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=ed(t),i=es(t),c=!!(t.hasPopup||a||i);return l.createElement(eg,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.createElement("div",f({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--underline","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eJ=function(e){var n=e.annotations,r=e.doc,o=e.outlines,a=e.page,i=e.pageIndex,c=e.plugins,u=e.rotation,s=e.scale,d=e.onExecuteNamedAction,p=e.onJumpFromLinkAnnotation,f=e.onJumpToDest,h=l.useRef(),g=a.getViewport({rotation:u,scale:s}).clone({dontFlip:!0}),v=n.filter(function(e){return!e.parentId});return m(function(){var e=h.current;e&&c.forEach(function(t){t.onAnnotationLayerRender&&t.onAnnotationLayerRender({annotations:v,container:e,pageIndex:i,rotation:u,scale:s})})},[]),l.createElement("div",{ref:h,className:"rpv-core__annotation-layer","data-testid":"core__annotation-layer-".concat(i)},v.map(function(e){var c=n.find(function(t){return t.parentId===e.id});switch(e.annotationType){case t.JJ.Caret:return l.createElement(ev,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Circle:return l.createElement(em,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.FileAttachment:return l.createElement(ew,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.FreeText:return l.createElement(ey,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Highlight:return l.createElement(eE,{key:e.id,annotation:e,childAnnotation:c,page:a,viewport:g});case t.JJ.Ink:return l.createElement(eP,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Line:return l.createElement(ex,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Link:return l.createElement(eO,{key:e.id,annotation:e,annotationContainerRef:h,doc:r,outlines:o,page:a,pageIndex:i,scale:s,viewport:g,onExecuteNamedAction:d,onJumpFromLinkAnnotation:p,onJumpToDest:f});case t.JJ.Polygon:return l.createElement(eM,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Polyline:return l.createElement(eF,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Popup:return l.createElement(eb,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Square:return l.createElement(eL,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Squiggly:return l.createElement(eT,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Stamp:return l.createElement(eI,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.StrikeOut:return l.createElement(eD,{key:e.id,annotation:e,page:a,viewport:g});case t.JJ.Text:return l.createElement(eV,{key:e.id,annotation:e,childAnnotation:c,page:a,viewport:g});case t.JJ.Underline:return l.createElement(eW,{key:e.id,annotation:e,page:a,viewport:g});default:return l.createElement(l.Fragment,{key:e.id})}}))},eG=function(e){var t=e.page,n=e.renderAnnotations,r=I(),o=l.useState({loading:!0,annotations:[]}),a=o[0],i=o[1];return l.useEffect(function(){t.getAnnotations({intent:"display"}).then(function(e){r.current&&i({loading:!1,annotations:e})})},[]),a.loading?l.createElement(l.Fragment,null):n(a.annotations)},eq=function(e){var t=e.doc,n=e.outlines,r=e.page,o=e.pageIndex,a=e.plugins,i=e.rotation,c=e.scale,u=e.onExecuteNamedAction,s=e.onJumpFromLinkAnnotation,d=e.onJumpToDest;return l.createElement(eG,{page:r,renderAnnotations:function(e){return l.createElement(eJ,{annotations:e,doc:t,outlines:n,page:r,pageIndex:o,plugins:a,rotation:i,scale:c,onExecuteNamedAction:u,onJumpFromLinkAnnotation:s,onJumpToDest:d})}})},eU=function(e,t){var n=e%t;return 0===n?e:Math.floor(e-n)},eZ=function(e){var n=e.canvasLayerRef,r=e.height,o=e.page,a=e.pageIndex,i=e.plugins,c=e.rotation,u=e.scale,s=e.width,d=e.onRenderCanvasCompleted,p=l.useRef();return m(function(){var e=p.current;e&&e.cancel();var r=n.current;
1r.removeAttribute("data-testid"),i.forEach(function(e){e.onCanvasLayerRender&&e.onCanvasLayerRender({ele:r,pageIndex:a,rotation:c,scale:u,status:t.B1.PreRender})});var l=o.getViewport({rotation:c,scale:u}),s=window.devicePixelRatio||1,f=Math.sqrt(16777216/(l.width*l.height)),h=s>f;h?r.style.transform="scale(1, 1)":r.style.removeProperty("transform");var g=Math.min(f,s),v=function(e,t){if(Math.floor(e)===e)return[e,1];var n,r,o=1/e;if(o>8)return[1,8];if(Math.floor(o)===o)return[1,o];for(var a=e>1?o:e,i=0,c=1,l=1,u=1;;){var s=i+l,d=c+u;if(d>8)break;a<=s/d?(l=(n=[s,d])[0],u=n[1]):(i=(r=[s,d])[0],c=r[1])}return a<(i/c+l/u)/2?a===e?[i,c]:[c,i]:a===e?[l,u]:[u,l]}(g,8),m=v[0],w=v[1];r.width=eU(l.width*g,m),r.height=eU(l.height*g,m),r.style.width="".concat(eU(l.width,w),"px"),r.style.height="".concat(eU(l.height,w),"px"),r.hidden=!0;var y=r.getContext("2d",{alpha:!1}),b=h||1!==s?[g,0,0,g,0,0]:null;return p.current=o.render({canvasContext:y,transform:b,viewport:l}),p.current.promise.then(function(){r.hidden=!1,r.setAttribute("data-testid","core__canvas-layer-".concat(a)),i.forEach(function(e){e.onCanvasLayerRender&&e.onCanvasLayerRender({ele:r,pageIndex:a,rotation:c,scale:u,status:t.B1.DidRender})}),d()},function(){d()}),function(){r&&(r.width=0,r.height=0)}},[]),l.createElement("div",{className:"rpv-core__canvas-layer",style:{height:"".concat(r,"px"),width:"".concat(s,"px")}},l.createElement("canvas",{ref:n}))},e$=function(e){var t=e.height,n=e.page,r=e.rotation,o=e.scale,a=e.width,i=l.useRef();return m(function(){var e=i.current,c=n.getViewport({rotation:r,scale:o});n.getOperatorList().then(function(r){var o;(o=i.current)&&(o.innerHTML=""),new u.SVGGraphics(n.commonObjs,n.objs).getSVG(r,c).then(function(n){n.style.height="".concat(t,"px"),n.style.width="".concat(a,"px"),e.appendChild(n)})})},[]),l.createElement("div",{className:"rpv-core__svg-layer",ref:i})},eY=function(e){var n=e.containerRef,r=e.page,o=e.pageIndex,a=e.plugins,i=e.rotation,c=e.scale,s=e.onRenderTextCompleted,d=l.useRef(),p=function(){var e=n.current;e&&([].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")).forEach(function(t){return e.removeChild(t)}),[].slice.call(e.querySelectorAll('br[role="presentation"]')).forEach(function(t){return e.removeChild(t)}))};return m(function(){var e=d.current;e&&e.cancel();var l=n.current;if(l){l.removeAttribute("data-testid");var f=r.getViewport({rotation:i,scale:c});return a.forEach(function(e){e.onTextLayerRender&&e.onTextLayerRender({ele:l,pageIndex:o,scale:c,status:t.B1.PreRender})}),r.getTextContent().then(function(e){p(),d.current=u.renderTextLayer({container:l,textContent:e,textContentSource:e,viewport:f}),d.current.promise.then(function(){l.setAttribute("data-testid","core__text-layer-".concat(o)),[].slice.call(l.children).forEach(function(e){e.classList.contains("rpv-core__text-layer-text--not")||e.classList.add("rpv-core__text-layer-text")}),a.forEach(function(e){e.onTextLayerRender&&e.onTextLayerRender({ele:l,pageIndex:o,scale:c,status:t.B1.DidRender})}),s()},function(){l.removeAttribute("data-testid"),s()})}),function(){var e;p(),null===(e=d.current)||void 0===e||e.cancel()}}},[]),l.createElement("div",{className:"rpv-core__text-layer",ref:n})},eK=function(e){var n=e.doc,r=e.measureRef,o=e.outlines,a=e.pageIndex,i=e.pageRotation,c=e.pageSize,u=e.plugins,s=e.renderPage,d=e.renderQueueKey,p=e.rotation,f=e.scale,h=e.shouldRender,g=e.viewMode,m=e.onExecuteNamedAction,w=e.onJumpFromLinkAnnotation,y=e.onJumpToDest,b=e.onRenderCompleted,E=e.onRotatePage,x=I(),R=l.useState(null),k=R[0],S=R[1],_=l.useState(!1),C=_[0],O=_[1],M=l.useState(!1),F=M[0],L=M[1],T=l.useRef(),D=l.useRef(),A=Math.abs(p+i)%180==0,H=c.pageWidth*f,N=c.pageHeight*f,z=A?H:N,j=A?N:H,B=(c.rotation+p+i)%360,V=l.useRef(0);return l.useEffect(function(){S(null),O(!1),L(!1)},[i,p,f]),l.useEffect(function(){h&&x.current&&!k&&eo(n,a).then(function(e){x.current&&(V.current=d,S(e))})},[h,k]),l.useEffect(function(){C&&F&&(d!==V.current?(S(null),O(!1),L(!1)):b(a))},[C,F]),l.createElement("div",{className:v({"rpv-core__page-layer":!0,"rpv-core__page-layer--dual":g===t.wO.DualPage,"rpv-core__page-layer--dual-cover":g===t.wO.DualPageWithCover,"rpv-core__page-layer--single":g===t.wO.SinglePage}
1),"data-testid":"core__page-layer-".concat(a),ref:r,style:{height:"".concat(j,"px"),width:"".concat(z,"px")}},k?l.createElement(l.Fragment,null,(s||function(e){return l.createElement(l.Fragment,null,e.canvasLayer.children,e.textLayer.children,e.annotationLayer.children)})({annotationLayer:{attrs:{},children:l.createElement(eq,{doc:n,outlines:o,page:k,pageIndex:a,plugins:u,rotation:B,scale:f,onExecuteNamedAction:m,onJumpFromLinkAnnotation:w,onJumpToDest:y})},canvasLayer:{attrs:{},children:l.createElement(eZ,{canvasLayerRef:T,height:j,page:k,pageIndex:a,plugins:u,rotation:B,scale:f,width:z,onRenderCanvasCompleted:function(){x.current&&O(!0)}})},canvasLayerRendered:C,doc:n,height:j,pageIndex:a,rotation:B,scale:f,svgLayer:{attrs:{},children:l.createElement(e$,{height:j,page:k,rotation:B,scale:f,width:z})},textLayer:{attrs:{},children:l.createElement(eY,{containerRef:D,page:k,pageIndex:a,plugins:u,rotation:B,scale:f,onRenderTextCompleted:function(){x.current&&L(!0)}})},textLayerRendered:F,width:z,markRendered:b,onRotatePage:function(e){return E(a,e)}}),u.map(function(e,t){return e.renderPageLayer?l.createElement(l.Fragment,{key:t},e.renderPageLayer({canvasLayerRef:T,canvasLayerRendered:C,doc:n,height:j,pageIndex:a,rotation:B,scale:f,textLayerRef:D,textLayerRendered:F,width:z})):l.createElement(l.Fragment,{key:t})})):l.createElement(P,{testId:"core__page-layer-loading-".concat(a)}))},eQ=function(e,t){var n=t.rect;return e.height!==n.height||e.width!==n.width?n:e};(r=eh||(eh={})).Horizontal="Horizontal",r.Vertical="Vertical",r.Both="Both";var eX=function(e){return 1-Math.pow(1-e,4)},e0={left:0,top:0},e1={capture:!1,passive:!0},e2=function(e){var t=e.elementRef,n=e.enableSmoothScroll,r=e.isRtl,o=e.scrollDirection,a=e.onSmoothScroll,i=l.useState(e0),c=i[0],u=i[1],s=l.useState(t.current),d=s[0],p=s[1],f=r?-1:1,h=l.useRef(o);h.current=o;var g=l.useRef(e0),v=l.useRef(!0),w=l.useCallback(function(){v.current=!0,n&&u(g.current),a(!1)},[]),y=l.useCallback(function(){if(d){switch(h.current){case eh.Horizontal:g.current={left:f*d.scrollLeft,top:0};break;case eh.Both:g.current={left:f*d.scrollLeft,top:d.scrollTop};break;case eh.Vertical:default:g.current={left:0,top:d.scrollTop}}n&&!v.current||u(g.current)}},[d]);return m(function(){p(t.current)}),m(function(){if(d)return d.addEventListener("scroll",y,e1),function(){d.removeEventListener("scroll",y,e1)}},[d]),{scrollOffset:c,scrollTo:l.useCallback(function(e,n){var r=t.current;if(!r)return Promise.resolve();var o={left:0,top:0};switch(h.current){case eh.Horizontal:o.left=f*e.left;break;case eh.Both:o.left=f*e.left,o.top=e.top;break;case eh.Vertical:default:o.top=e.top}return n?(v.current=!1,a(!0),new Promise(function(e,t){!function(e,t,n,r,o,a){void 0===o&&(o=function(e){return e}),void 0===a&&(a=function(){});var i=0,c=0,l=!1;switch(t){case eh.Horizontal:c=e.scrollLeft,i=0;case eh.Both:c=e.scrollLeft,i=e.scrollTop;break;case eh.Vertical:default:c=0,i=e.scrollTop}var u=function(){l||(l=!0,e.scrollLeft=n.left,e.scrollTop=n.top,a())};if(1e-4>=Math.abs(i-n.top)&&t===eh.Vertical)u();else if(1e-4>=Math.abs(c-n.left)&&t===eh.Horizontal)u();else{var s,d=-1,p=c-n.left,f=i-n.top,h=function(r){-1===d&&(d=r);var a=r-d,g=o(Math.min(a/400,1)),v={left:c-p*g,top:i-f*g};switch(t){case eh.Horizontal:e.scrollLeft=v.left;break;case eh.Both:e.scrollLeft=v.left,e.scrollTop=v.top;break;case eh.Vertical:default:e.scrollTop=v.top}1e-4>=Math.abs(v.top-n.top)&&1e-4>=Math.abs(v.left-n.left)&&!l&&(window.cancelAnimationFrame(s),u()),a<400?s=window.requestAnimationFrame(h):window.cancelAnimationFrame(s)};s=window.requestAnimationFrame(h)}}(r,h.current,o,0,eX,function(){w(),e()})})):new Promise(function(e,t){switch(h.current){case eh.Horizontal:r.scrollLeft=o.left;break;case eh.Both:r.scrollLeft=o.left,r.scrollTop=o.top;break;case eh.Vertical:default:r.scrollTop=o.top}e()})},[t])}},e5=function(e,t,n){return Math.max(e,Math.min(n,t))},e9=function(e,n){if(n!==t.wO.DualPageWithCover)return 0;if(!function(e){var t=e.length;if(1===t)return!1;for(var n=1;n<t;n++)if(e[n].height!==e[0].height||e[n].width!==e[0].width)return!0;return!1}(e))return 2*e[0].width;var r=Q(e.slice(1),2).map(function(e){return 2===e.length?e[0].width+e[1].width:e[0].width}),o=[e[0].width].concat(r);return Math.max.apply(Math,o)},e4={left:0,top:0},e3={left:0,top:0},e6={left:0,top:0},e7={left:0,top:0},e8={height:0,width:0},te={left:0,top:0},tt="data-virtual-index",tn=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],tr=function(e){var n,r,o,a,i,c,u,s=e.enableSmoothScroll,d=e.isRtl,p=e.numberOfItems,h=e.parentRef,g=e.setRenderRange,v=e.sizes,w=e.scrollMode,y=e.viewM
1ode,b=l.useState(!1),E=b[0],P=b[1],x=l.useCallback(function(e){return P(e)},[]),R=l.useRef(w);R.current=w;var k=l.useRef(y);k.current=y;var S=w===t.Gd.Wrapped||y===t.wO.DualPageWithCover||y===t.wO.DualPage?eh.Both:w===t.Gd.Horizontal?eh.Horizontal:eh.Vertical,_=e2({elementRef:h,enableSmoothScroll:s,isRtl:d,scrollDirection:S,onSmoothScroll:x}),C=_.scrollOffset,O=_.scrollTo,M=(r=(n=l.useState(h.current))[0],o=n[1],a=l.useRef(!1),c=(i=l.useReducer(eQ,{height:0,width:0}))[0],u=i[1],m(function(){h.current!==r&&o(h.current)}),m(function(){if(r&&!a.current){a.current=!0;var e=r.getBoundingClientRect();u({rect:{height:e.height,width:e.width}})}},[r]),l.useEffect(function(){if(r){var e=new ResizeObserver(function(e,t){e.forEach(function(e){if(e.target===r){var t=e.contentRect;u({rect:{height:t.height,width:t.width}})}})});return e.observe(r),function(){e.unobserve(r)}}},[r]),c),F=l.useRef({scrollOffset:te,measurements:[]});F.current.scrollOffset=C;var L=l.useMemo(function(){return Array(p).fill(-1)},[]),T=l.useState(L),I=T[0],D=T[1],A=l.useMemo(function(){return new IntersectionObserver(function(e){e.forEach(function(e){var t=e.isIntersecting?e.intersectionRatio:-1,n=e.target.getAttribute(tt);if(n){var r=parseInt(n,10);0<=r&&r<p&&D(function(e){return e[r]=t,function(e,t,n){if(n||2==arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],e,!0)})}})},{threshold:tn})},[]),H=l.useMemo(function(){return w===t.Gd.Page&&y===t.wO.SinglePage?function(e,t,n){for(var r=[],o=0;o<e;o++){var a={height:Math.max(t.height,n[o].height),width:Math.max(t.width,n[o].width)},i=0===o?e7:r[o-1].end,c={left:i.left+a.width,top:i.top+a.height};r[o]={index:o,start:i,size:a,end:c,visibility:-1}}return r}(p,M,v):y===t.wO.DualPageWithCover?function(e,n,r,o){for(var a=[],i=0,c=0,l=e6,u=0;u<e;u++){var s=0===u?{height:o===t.Gd.Page?Math.max(n.height,r[u].height):r[u].height,width:o===t.Gd.Page?Math.max(n.width,r[u].width):r[u].width}:{height:o===t.Gd.Page?Math.max(n.height,r[u].height):r[u].height,width:Math.max(n.width/2,r[u].width)};o===t.Gd.Page?l=0===u?e6:{left:u%2==0?s.width:0,top:Math.floor((u-1)/2)*s.height+a[0].end.top}:0===u?(l=e6,i=r[0].height,c=0):u%2==1?(l={left:0,top:i+=c},c=u===e-1?r[u].height:Math.max(r[u].height,r[u+1].height)):l={left:a[u-1].end.left,top:i};var d={left:l.left+s.width,top:l.top+s.height};a[u]={index:u,start:l,size:s,end:d,visibility:-1}}return a}(p,M,v,w):y===t.wO.DualPage?function(e,n,r,o){for(var a=[],i=0,c=0,l=e3,u=0;u<e;u++){var s={height:o===t.Gd.Page?Math.max(n.height,r[u].height):r[u].height,width:Math.max(n.width/2,r[u].width)};o===t.Gd.Page?l={left:u%2==0?0:s.width,top:Math.floor(u/2)*s.height}:u%2==0?(l={left:0,top:i+=c},c=u===e-1?r[u].height:Math.max(r[u].height,r[u+1].height)):l={left:a[u-1].end.left,top:i};var d={left:l.left+s.width,top:l.top+s.height};a[u]={index:u,start:l,size:s,end:d,visibility:-1}}return a}(p,M,v,w):function(e,n,r,o){for(var a=[],i=0,c={left:0,top:0},l=0,u=e4,s=0;s<e;s++){var d=r[s];if(0===s)i=d.width,c={left:0,top:0},l=d.height;else switch(o){case t.Gd.Wrapped:(i+=d.width)<n.width?(u={left:a[s-1].end.left,top:c.top},l=Math.max(l,d.height)):(i=d.width,c={left:(u={left:c.left,top:c.top+l}).left,top:u.top},l=d.height);break;case t.Gd.Horizontal:case t.Gd.Vertical:default:u=a[s-1].end}var p={left:u.left+d.width,top:u.top+d.height};a[s]={index:s,start:u,size:d,end:p,visibility:-1}}return a}(p,M,v,w)},[w,v,y,M]),N=H[p-1]?{height:H[p-1].end.top,width:H[p-1].end.left}:e8;F.current.measurements=H;var z=l.useMemo(function(){var e=function(e,t,n,r){var o=0;switch(e){case eh.Horizontal:o=r.left;break;case eh.Vertical:default:o=r.top}var a=t.length-1,i=function(e,t,n,r){for(;e<=t;){var o=(e+t)/2|0,a=r(o);if(a<n)e=o+1;else{if(!(a>n))return o;t=o-1}}return e>0?e-1:0}(0,a,o,function(n){switch(e){case eh.Horizontal:return t[n].start.left;case eh.Both:case eh.Vertical:default:return t[n].start.top}});if(e===eh.Both)for(var c=t[i].start.top;i-1>=0&&t[i-1].start.top===c&&t[i-1].start.left>=r.left;)i--;for(var l=i;l<=a;
1){var u={top:t[l].start.top-r.top,left:t[l].start.left-r.left},s={height:n.height-u.top,width:n.width-u.left};if(e===eh.Horizontal&&s.width<0||e===eh.Vertical&&s.height<0||e===eh.Both&&(s.width<0||s.height<0))break;l++}return{start:i,end:l}}(S,H,M,C),n=e.start,r=e.end,o=I.slice(e5(0,p,n),e5(0,p,r)),a=n+o.reduce(function(e,t,n,r){return t>r[e]?n:e},0),i=a=e5(0,p-1,a),c=g({endPage:r,numPages:p,startPage:n}),l=c.startPage,u=c.endPage;switch(l=Math.max(l,0),u=Math.min(u,p-1),y){case t.wO.DualPageWithCover:a>0&&(i=a%2==1?a:a-1),l=0===l?0:l%2==1?l:l-1,p-(u=u%2==1?u-1:u)<=2&&(u=p-1);break;case t.wO.DualPage:i=a%2==0?a:a-1,l=l%2==0?l:l-1,u=u%2==1?u:u-1;break;case t.wO.SinglePage:default:i=a}return{startPage:l,endPage:u,maxVisbilityIndex:i}},[H,M,C,y,I]),j=z.startPage,B=z.endPage,V=z.maxVisbilityIndex,W=l.useMemo(function(){for(var e=[],t=function(t){var n=H[t],r=f(f({},n),{visibility:void 0!==I[t]?I[t]:-1,measureRef:function(e){e&&(e.setAttribute(tt,"".concat(t)),A.observe(e))}});e.push(r)},n=j;n<=B;n++)t(n);return e},[j,B,I,H]),J=l.useCallback(function(e,n){var r=F.current.measurements[e5(0,p-1,e)],o=R.current===t.Gd.Page?te:n;return r?O({left:o.left+r.start.left,top:o.top+r.start.top},s):Promise.resolve()},[O,s]),G=l.useCallback(function(e,n){var r=F.current.measurements,o=r[e].start,a=r.find(function(e){return e.start.top-o.top>1e-12});if(!a)return Promise.resolve();var i=a.index;switch(k.current){case t.wO.DualPage:i=i%2==0?i:i+1;break;case t.wO.DualPageWithCover:i=i%2==1?i:i+1}return J(i,n)},[]),q=l.useCallback(function(e,n){for(var r=F.current.measurements,o=r[e].start,a=e,i=!1,c=p-1;c>=0;c--)if(o.top-r[c].start.top>1e-12){i=!0,a=r[c].index;break}if(!i)return Promise.resolve();switch(k.current){case t.wO.DualPage:a=a%2==0?a:a-1;break;case t.wO.DualPageWithCover:a=a%2==0?a-1:a}return a===e&&(a=e-1),J(a,n)},[]),U=l.useCallback(function(e,n){if(k.current===t.wO.DualPageWithCover||k.current===t.wO.DualPage)return G(e,n);switch(R.current){case t.Gd.Wrapped:return G(e,n);case t.Gd.Horizontal:case t.Gd.Vertical:default:return J(e+1,n)}},[]),Z=l.useCallback(function(e,n){if(k.current===t.wO.DualPageWithCover||k.current===t.wO.DualPage)return q(e,n);switch(R.current){case t.Gd.Wrapped:return q(e,n);case t.Gd.Horizontal:case t.Gd.Vertical:default:return J(e-1,n)}},[]),$=l.useCallback(function(){return function(e,n){switch(n){case t.Gd.Horizontal:return{position:"relative",height:"100%",width:"".concat(e.width,"px")};case t.Gd.Vertical:default:return{position:"relative",height:"".concat(e.height,"px"),width:"100%"}}}(N,R.current)},[N]),Y=l.useCallback(function(e){return R.current!==t.Gd.Page?{}:{height:"".concat(M.height,"px"),width:"100%",position:"absolute",top:0,transform:"translateY(".concat(e.start.top,"px)")}},[M]),K=l.useCallback(function(e){return function(e,n,r,o,a){var i,c,l,u,s,d,p,f=n?"right":"left",h=r.length,g=e.start.left*(n?-1:1),v=e.size,m=v.height,w=v.width;if(o===t.wO.DualPageWithCover){var y=a===t.Gd.Page?0:e.start.top;return 0===e.index||h%2==0&&e.index===h-1?((i={height:"".concat(m,"px"),minWidth:"".concat(e9(r,o),"px"),width:"100%"})[f]=0,i.position="absolute",i.top=0,i.transform="translate(".concat(g,"px, ").concat(y,"px)"),i):((c={height:"".concat(m,"px"),width:"".concat(w,"px")})[f]=0,c.position="absolute",c.top=0,c.transform="translate(".concat(g,"px, ").concat(y,"px)"),c)}if(o===t.wO.DualPage)return(l={height:"".concat(m,"px"),width:"".concat(w,"px")})[f]=0,l.position="absolute",l.top=0,l.transform="translate(".concat(g,"px, ").concat(a===t.Gd.Page?0:e.start.top,"px)"),l;switch(a){case t.Gd.Horizontal:return(u={height:"100%",width:"".concat(w,"px")})[f]=0,u.position="absolute",u.top=0,u.transform="translateX(".concat(g,"px)"),u;case t.Gd.Page:return(s={height:"".concat(m,"px"),width:"".concat(w,"px")})[f]=0,s.position="absolute",s.top=0,s;case t.Gd.Wrapped:return(d={height:"".concat(m,"px"),width:"".concat(w,"px")})[f]=0,d.position="absolute",d.top=0,d.transform="translate(".concat(g,"px, ").concat(e.start.top,"px)"),d;case t.Gd.Vertical:default:return(p={height:"".concat(m,"px"),width:"100%"})[f]=0,p.position="absolute",p.top=0,p.transform="translateY(".concat(e.start.top,"px)"),p}}(e,d,v,k.current,R.current)},[d,v]),Q=l.useCallback(function(e,n){var r=F.current,o=r.measurements,a=r.scrollOffset,i=o[e5(0,p-1,n)];return i?O(R.current===t.Gd.Page?{left:i.start.left,top:i.start.top}:{left:a.left*e,top:a.top*e},!1):Promise.resolve()},[]);return l.useEffect(function(){return function(){A.disconnect()}},[]),{boundingClientRect:M,isSmoothScrolling:E,startPage:j,endPage:B,maxVisbilityIndex:V,virtualItems:W,getContainerStyles:$,getItemContainerStyles:Y,getItemStyles:K,scrollToItem:J,scrollToNextItem:U,scrollToPreviousItem:Z,zoom:Q}},to=function(e,n,r,o,a,i){var c=r;switch(!0){case a===t.wO.DualPageWithCover&&i>=3:case a===t.wO.DualPage&&i>=3:c=2*r;break;default:c=r}switch(o){case t.Tq.ActualSize:return 1;case t.Tq.PageFit:return Math.min((e.clientWidth-17)/c,(e.clientHeight-16)/n);case t.Tq.PageWidth:return(e.clientWidth-17)/c}},ta=function(e){var t,n,r=e.getCurrentPage,o=(n=l.useRef([]),l.useEffect(function(){return function(){n.current=[]}},[]),{push:function(e){var t=n.current;t.length+1>50&&t.shift(),t.push(e),n.current=t},map:function(e){return n.current.map(function(t){return e(t)})},pop:function(){var e=n.current;if(0===e.length)return null;var t=e.pop();return n.current=e,t}}),a=(t=l.useRef([]),l.useEffect(function(){return function(){t.current=[]}},[]),{dequeue:function(){var e=t.current;if(0===e.length)return null;var n=e.shift();return t.current=e,n||null},enqueue:function(e){var n=t.current;n.length+1>50&&n.pop(),t.current=[e].concat(n)},map:function(e){return t.current.map(function(t){return e(t)})}}),i=function(){var e=a.dequeue();return e&&o.push(e),e&&e.pageIndex===r()?i():e},c=function(){var e=o.pop();return e&&a.enqueue(e),e&&e.pageIndex===r()?c():e};return{getNextDestination:i,getPreviousDestination:c,markVisitedDestination:l.useCallback(function(e){o.push(e)},[])}},ti=function(e){var t=[];return e.map(function(e){var n;t=t.concat(e).concat((n=[],e.items&&e.items.length>0&&(n=n.concat(ti(e.items))),n))}),t},tc={capture:!1,passive:!0},tl={height:0,width:0},tu={height:0,width:0},ts=function(e){var n,r,o,a,i=e.getCurrentPage,c=e.getCurrentScrollMode,u=e.jumpToPage,s=e.targetRef,d=l.useState(t.Fi.Normal),p=d[0],f=d[1],h=(r=(n=l.useState(tl))[0],o=n[1],a=T(function(){o({height:window.innerHeight,width:window.innerWidth})},100),m(function(){return window.addEventListener("resize",a,tc),function(){window.removeEventListener("resize",a,tc)}},[]),r),g=l.useState(tu),v=g[0],w=g[1],y=l.useRef(tu),b=l.useRef(i()),E=l.useRef(tu),P=l.useState(s.current),x=P[0],R=P[1],k=l.useRef();
1m(function(){s.current!==x&&R(s.current)},[]),m(function(){if(x){var e=new ResizeObserver(function(e){e.forEach(function(e){var t=e.target.getBoundingClientRect();w({height:t.height,width:t.width})})});return e.observe(x),function(){e.unobserve(x),e.disconnect()}}},[x]);var S=l.useCallback(function(e){var n=L();return n&&n!==e?(f(t.Fi.Normal),F(n)):Promise.resolve()},[]),_=l.useCallback(function(e){e&&O&&M.FullScreenEnabled in document&&!0===document[M.FullScreenEnabled]&&(R(e),S(e).then(function(){k.current=e,f(t.Fi.Entering),O&&e[M.RequestFullScreen]()}))},[]),C=l.useCallback(function(){L()&&(f(t.Fi.Exitting),F(document))},[]),I=l.useCallback(function(){x&&L()!==x&&f(t.Fi.Exitting)},[x]);return l.useEffect(function(){switch(p){case t.Fi.Entering:k.current&&(k.current.style.backgroundColor="var(--rpv-core__full-screen-target-background-color)"),b.current=i(),y.current={height:window.innerHeight,width:window.innerWidth};break;case t.Fi.Entered:c()===t.Gd.Page?u(b.current).then(function(){f(t.Fi.EnteredCompletely)}):f(t.Fi.EnteredCompletely);break;case t.Fi.Exitting:k.current&&(k.current.style.backgroundColor="",k.current=null),b.current=i();break;case t.Fi.Exited:f(t.Fi.Normal),c()===t.Gd.Page&&u(b.current)}},[p]),l.useEffect(function(){if(p!==t.Fi.Normal)return p===t.Fi.Entering&&h.height===v.height&&h.width===v.width&&h.height>0&&h.width>0&&(0===E.current.height||h.height==E.current.height)?(E.current={height:window.innerHeight,width:window.innerWidth},void f(t.Fi.Entered)):void(p===t.Fi.Exitting&&y.current.height===h.height&&y.current.width===h.width&&h.height>0&&h.width>0&&f(t.Fi.Exited))},[p,h,v]),l.useEffect(function(){return O&&document.addEventListener(M.FullScreenChange,I),function(){O&&document.removeEventListener(M.FullScreenChange,I)}},[x]),{enterFullScreenMode:_,exitFullScreenMode:C,fullScreenMode:p}},td={buildPageStyles:function(){return{}},transformSize:function(e){return e.size}},tp={left:0,top:0},tf=function(e){var n=e.currentFile,r=e.defaultScale,o=e.doc,a=e.enableSmoothScroll,i=e.initialPage,c=e.initialRotation,u=e.initialScale,s=e.pageLayout,d=e.pageSizes,p=e.plugins,h=e.renderPage,w=e.scrollMode,y=e.setRenderRange,b=e.viewMode,E=e.viewerState,P=e.onDocumentLoad,x=e.onOpenFile,R=e.onPageChange,k=e.onRotate,S=e.onRotatePage,_=e.onZoom,C=o.numPages,O=o.loadingTask.docId,M=l.useContext(j).l10n,F=l.useContext(g),L=F.direction===t.m5.RightToLeft,A=l.useRef(),H=l.useRef(),z=l.useState(i),B=z[0],V=z[1],W=l.useRef(null),J=ta({getCurrentPage:function(){return ew.current.pageIndex}}),G=l.useState(c),q=G[0],U=G[1],Z=D(q),$=l.useState(!1),Y=$[0],K=$[1],X=l.useState(new Map),en=X[0],er=X[1],ea=l.useState(w),ei=ea[0],ec=ea[1],el=D(ei),eu=l.useState(b),es=eu[0],ed=eu[1],ep=D(es),ef=(e0=I(),e2=(e1=l.useState([]))[0],e5=e1[1],l.useEffect(function(){o.getOutline().then(function(e){e0.current&&null!==e&&e5(ti(e))})},[]),e2),eh=l.useState(u),eg=eh[0],ev=eh[1],em=D(eg),ew=l.useRef(E),ey=l.useRef("string"==typeof r?r:null),eb=l.useRef(-1),eE=l.useRef(-1),eP=l.useRef(i),ex=ts({getCurrentPage:function(){return ew.current.pageIndex},getCurrentScrollMode:function(){return ew.current.scrollMode},jumpToPage:function(e){return eW(e)}
1,targetRef:H}),eR=l.useState(-1),ek=eR[0],eS=eR[1],e_=l.useState(0),eC=e_[0],eO=e_[1],eM=N({doc:o});l.useEffect(function(){return function(){ee.clear(),et.clear()}},[O]);var eF=l.useMemo(function(){return Object.assign({},td,s)},[]),eL=l.useMemo(function(){return Array(C).fill(0).map(function(e,t){var n=[d[t].pageHeight,d[t].pageWidth],r=Math.abs(q)%180==0?{height:n[0],width:n[1]}:{height:n[1],width:n[0]},o={height:r.height*eg,width:r.width*eg};return eF.transformSize({numPages:C,pageIndex:t,size:o})})},[q,eg]),eT=tr({enableSmoothScroll:a,isRtl:L,numberOfItems:C,parentRef:H,scrollMode:ei,setRenderRange:y,sizes:eL,viewMode:es});e4=(e9={targetRef:H,onResize:T(function(){!ey.current||ew.current.fullScreenMode!==t.Fi.Normal||i>0&&eP.current===i||eY(ey.current)},200)}).targetRef,e3=e9.onResize,m(function(){var e=new ResizeObserver(function(e){e.forEach(function(e){e3(e.target)})}),t=e4.current;if(t)return e.observe(t),function(){e.unobserve(t)}},[]);var eI=function(e){var t=e;p.forEach(function(e){e.onViewerStateChange&&(t=e.onViewerStateChange(t))}),ew.current=t},eD=function(){return H.current},eA=function(){return ew.current},eH=l.useCallback(function(e){J.markVisitedDestination(e)},[]),eN=l.useCallback(function(e){var n=e.pageIndex,r=e.bottomOffset,a=e.leftOffset,i=e.scaleTo,c=H.current,l=ew.current;return c&&l?new Promise(function(e,u){eo(o,n).then(function(o){var u=o.getViewport({scale:1}),s=0,p=("function"==typeof r?r(u.width,u.height):r)||0,f=("function"==typeof a?a(u.width,u.height):a)||0,h=l.scale;switch(i){case t.Tq.PageFit:s=0,f=0,eY(t.Tq.PageFit);break;case t.Tq.PageWidth:h=to(c,d[n].pageHeight,d[n].pageWidth,t.Tq.PageWidth,b,C),s=(u.height-p)*h,f*=h,eY(h);break;default:s=(u.height-p)*h,f*=h}switch(l.scrollMode){case t.Gd.Horizontal:eT.scrollToItem(n,{left:f,top:0}).then(function(){e()});break;case t.Gd.Vertical:default:eT.scrollToItem(n,{left:0,top:s}).then(function(){e()})}})}):Promise.resolve()},[]),ez=l.useCallback(function(e){return J.markVisitedDestination(e),eN(e)},[]),ej=l.useCallback(function(){var e=J.getNextDestination();return e?eN(e):Promise.resolve()},[]),eB=l.useCallback(function(){var e=J.getPreviousDestination();return e?eN(e):Promise.resolve()},[]),eV=l.useCallback(function(){return eT.scrollToNextItem(ew.current.pageIndex,tp)},[]),eW=l.useCallback(function(e){return 0<=e&&e<C?eT.scrollToItem(e,tp):Promise.resolve()},[]),eJ=l.useCallback(function(){return eT.scrollToPreviousItem(ew.current.pageIndex,tp)},[]),eG=l.useCallback(function(e){var t;"pdf"===((t=e.name.split(/\./).pop())?t.toLowerCase():"").toLowerCase()&&new Promise(function(t){var n=new FileReader;n.readAsArrayBuffer(e),n.onload=function(){t(new Uint8Array(n.result))}}).then(function(t){x(e.name,t)})},[x]),eq=l.useCallback(function(e){var n=e===t.Rn.Backward?-90:90,r=ew.current.rotation,a=360===r||-360===r?n:r+n;eM.markNotRendered(),U(a),eI(f(f({},ew.current),{rotation:a})),k({direction:e,doc:o,rotation:a})},[]),eU=l.useCallback(function(e,n){var r=n===t.Rn.Backward?-90:90,a=ew.current.pagesRotation,i=(a.has(e)?a.get(e):c)+r,l=a.set(e,i);er(l),K(function(e){return!e}),eI(f(f({},ew.current),{pagesRotation:l,rotatedPage:e})),S({direction:n,doc:o,pageIndex:e,rotation:i}),eM.markRendering(e),eS(e)},[]),eZ=l.useCallback(function(e){eI(f(f({},ew.current),{scrollMode:e})),ec(e)},[]),e$=l.useCallback(function(e){eI(f(f({},ew.current),{viewMode:e})),ed(e)},[]),eY=l.useCallback(function(e){var t=H.current,n=ew.current.pageIndex;if(!(n<0||n>=C)){var r=d[n].pageHeight,a=d[n].pageWidth,i=t?"string"==typeof e?to(t,r,a,e,ew.current.viewMode,C):e:1;ey.current="string"==typeof e?e:null,i!==ew.current.scale&&(eO(function(e){return e+1}),eM.markNotRendered(),ev(i),_({doc:o,scale:i}),eI(f(f({},ew.current),{scale:i})))}},[]),eQ=l.useCallback(function(e){ex.enterFullScreenMode(e)},[]),eX=l.useCallback(function(){ex.exitFullScreenMode()},[]);l.useEffect(function(){eI(f(f({},ew.current),{fullScreenMode:ex.fullScreenMode}))},[ex.fullScreenMode]),l.useEffect(function(){var e={enterFullScreenMode:eQ,exitFullScreenMode:eX,getPagesContainer:eD,getViewerState:eA,jumpToDestination:ez,jumpToNextDestination:ej,jumpToPreviousDestination:eB,jumpToNextPage:eV,jumpToPreviousPage:eJ,jumpToPage:eW,openFile:eG,rotate:eq,rotatePage:eU,setVie
1werState:eI,switchScrollMode:eZ,switchViewMode:e$,zoom:eY};return p.forEach(function(t){t.install&&t.install(e)}),function(){p.forEach(function(t){t.uninstall&&t.uninstall(e)})}},[O]),l.useEffect(function(){P({doc:o,file:n}),p.forEach(function(e){e.onDocumentLoad&&e.onDocumentLoad({doc:o,file:n})})},[O]);var e0,e1,e2,e5,e9,e4,e3,e6,e7,e8,te=eT.boundingClientRect;e6=function(){i&&eW(i)},e7=te.height>0&&te.width>0,e8=l.useRef(!1),m(function(){e7&&!e8.current&&(e8.current=!0,e6())},[e6,e7]),m(function(){var e=ew.current.pageIndex;e>-1&&el!==ei&&eT.scrollToItem(e,tp).then(function(){ex.fullScreenMode===t.Fi.EnteredCompletely&&(a||eM.markNotRendered(),eb.current=-1)})},[ei]),m(function(){var e=ew.current.pageIndex;e>-1&&Z!==q&&eT.scrollToItem(e,tp)},[q]),m(function(){0!=em&&em!=ew.current.scale&&eT.zoom(ew.current.scale/em,ew.current.pageIndex).then(function(){ex.fullScreenMode===t.Fi.EnteredCompletely&&(eE.current=-1)})},[eg]),m(function(){if(ep!==ew.current.viewMode){var e=eT.startPage,t=eT.endPage,n=eT.virtualItems;eM.markNotRendered(),eM.setRange(e,t);for(var r=function(e){var t=n.find(function(t){return t.index===e});t&&eM.setVisibility(e,t.visibility)},o=e;o<=t;o++)r(o);tn()}},[es]),m(function(){var e=ew.current.pageIndex;e>-1&&ep!==es&&eT.scrollToItem(e,tp)},[es]),m(function(){var e=ew.current.pageIndex;e>0&&e===i&&eP.current===i&&ey.current&&(eP.current=-1,eY(ey.current))},[B]),l.useEffect(function(){eT.isSmoothScrolling||null!==W.current&&W.current===B||(W.current=B,R({currentPage:B,doc:o}))},[B,eT.isSmoothScrolling]),l.useEffect(function(){ex.fullScreenMode===t.Fi.Entering&&ew.current.scrollMode===t.Gd.Page&&(eb.current=ew.current.pageIndex),ex.fullScreenMode===t.Fi.EnteredCompletely&&ew.current.scrollMode===t.Gd.Page&&a&&(eb.current=-1),ex.fullScreenMode===t.Fi.EnteredCompletely&&ey.current&&(eE.current=ew.current.pageIndex,eY(ey.current))},[ex.fullScreenMode]),l.useEffect(function(){if(ex.fullScreenMode!==t.Fi.Entering&&ex.fullScreenMode!==t.Fi.Exitting&&!eT.isSmoothScrolling){var e=eT.startPage,n=eT.endPage,r=eT.maxVisbilityIndex,o=eT.virtualItems,a=ex.fullScreenMode===t.Fi.Entered||ex.fullScreenMode===t.Fi.EnteredCompletely;if(!(a&&r!==eb.current&&eb.current>-1||a&&r!==eE.current&&eE.current>-1)){V(r),eI(f(f({},ew.current),{pageIndex:r})),eM.setRange(e,n);for(var i=function(e){var t=o.find(function(t){return t.index===e});t&&eM.setVisibility(e,t.visibility)},c=e;c<=n;c++)i(c);tn()}}},[eT.startPage,eT.endPage,eT.isSmoothScrolling,eT.maxVisbilityIndex,ex.fullScreenMode,Y,q,eg]);var tt=l.useCallback(function(e){eM.markRendered(e),tn()},[eC]),tn=function(){var e=eM.getHighestPriorityPage();e>-1&&eM.isInRange(e)&&(eM.markRendering(e),eS(e))},tc=function(e){var t=B-1,n=B+1;switch(e){case"FirstPage":eW(0);break;case"LastPage":eW(C-1);break;case"NextPage":n<C&&eW(n);break;case"PrevPage":t>=0&&eW(t)}},tl=l.useCallback(function(){var e=eT.virtualItems,n=[];switch(es){case t.wO.DualPage:n=Q(e,2);break;case t.wO.DualPageWithCover:e.length&&(n=0===e[0].index?[[e[0]]].concat(Q(e.slice(1),2)):Q(e,2));break;case t.wO.SinglePage:default:n=Q(e,1)}var r=M&&M.core?M.core.pageLabel:"Page {{pageIndex}}",a={attrs:{className:"rpv-core__inner-container","data-testid":"core__inner-container",ref:A,style:{height:"100%"}},children:l.createElement(l.Fragment,null),subSlot:{attrs:{"data-testid":"core__inner-pages",className:v({"rpv-core__inner-pages":!0,"rpv-core__inner-pages--horizontal":ei===t.Gd.Horizontal,"rpv-core__inner-pages--rtl":L,"rpv-core__inner-pages--single":ei===t.Gd.Page,"rpv-core__inner-pages--vertical":ei===t.Gd.Vertical,"rpv-core__inner-pages--wrapped":ei===t.Gd.Wrapped}),ref:H,style:{height:"100%",position:"relative"}},children:l.createElement("div",{"data-testid":"core__inner-current-page-".concat(B),style:Object.assign({"--scale-factor":eg},eT.getContainerStyles())},n.map(function(e){return l.createElement("div",{className:v({"rpv-core__inner-page-container":!0,"rpv-core__inner-page-container--single":ei===t.Gd.Page}),style:eT.getItemContainerStyles(e[0]),key:"".concat(e[0].index,"-").concat(es)},e.map(function(e){var n=es===t.wO.DualPageWithCover&&(0===e.index||C%2==0&&e.index===C-1);return l.createElement("div",{"aria-label":r.replace("{{pageIndex}}","".concat(e.index+1)),className:v({"rpv-core__inner-page":!0,"rpv-core__inner-page--dual-even":es===t.wO.DualPage&&e.index%2==0,"rpv-core__inner-page--dual-odd":es===t.wO.DualPage&&e.index%2==1,"rpv-core__inner-page--dual-cover":n,"rpv-core__inner-page--dual-cover-even":es===t.wO.DualPageWithCover&&!n&&e.index%2==0,"rpv-core__inner-page--dual-cover-odd":es===t.wO.DualPageWithCover&&!n&&e.index%2==1,"rpv-core__inner-page--single":es===t.wO.SinglePage&&ei===t.Gd.Page}),role:"region",key:"".concat(e.index,"-").concat(es),style:Object.assign({},eT.getItemStyles(e),eF.buildPageStyles({numPages:C,pageIndex:e.index,scrollMode:ei,viewMode:es}))},l.createElement(eK,{doc:o,measureRef:e.measureRef,outlines:ef,pageIndex:e.index,pageRotation:en.has(e.index)?en.get(e.index):0,pageSize:d[e.index],plugins:p,renderPage:h,renderQueueKey:eC,rotation:q,scale:eg,shouldRender:ek===e.index,viewMode:es,onExecuteNamedAction:tc,onJumpFromLinkAnnotation:eH,onJumpToDest:ez,onRenderCompleted:tt,onRotatePage:eU}))}))}))}};return p.forEach(function(e){e.renderViewer&&(a=e.renderViewer({containerRef:A,doc:o,pagesContainerRef:H,pagesRotation:en,pageSizes:d,rotation:q,slot:a,themeContext:F,jumpToPage:eW,openFile:eG,rotate:eq,rotatePage:eU,switchScrollMode:eZ,switchViewMode:e$,zoom:eY}))}),a},[p,eT]),tu=l.useCallback(function(e){return l.createElement("div",f({},e.attrs,{style:e.attrs&&e.attrs.style?e.attrs.style:{}}),e.children,e.subSlot&&tu(e.subSlot))},[]);return tu(tl())},th=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.3,1.5,1.7,1.9,2.1,2.4,2.7,3,3.3,3.7,4.1,4.6,5.1,5.7,6.3,7,7.7,8.5,9.4,10],tg=function(e){var n=e.defaultScale,r=e.doc,o=e.render,a=e.scrollMode,i=e.viewM
1ode,c=l.useRef(),u=l.useState({pageSizes:[],scale:0}),s=u[0],d=u[1];return l.useLayoutEffect(function(){Promise.all(Array(r.numPages).fill(0).map(function(e,t){return new Promise(function(e,n){eo(r,t).then(function(t){var n=t.getViewport({scale:1});e({pageHeight:n.height,pageWidth:n.width,rotation:n.rotation})})})})).then(function(e){var o=c.current;if(o&&0!==e.length){var l,u,s=e[0].pageWidth,p=e[0].pageHeight,f=o.parentElement,h=(f.clientWidth-45)/s,g=(f.clientHeight-45)/p,v=h;switch(a){case t.Gd.Horizontal:v=Math.min(h,g);break;case t.Gd.Vertical:default:v=h}d({pageSizes:e,scale:n?"string"==typeof n?to(f,p,s,n,i,r.numPages):n:(l=v,-1===(u=th.findIndex(function(e){return e>=l}))||0===u?l:th[u-1])})}})},[r.loadingTask.docId]),0===s.pageSizes.length||0===s.scale?l.createElement("div",{className:"rpv-core__page-size-calculator","data-testid":"core__page-size-calculating",ref:c},l.createElement(P,null)):o(s.pageSizes,s.scale)},tv=function(){},tm=function(e){function t(t,n){var r=e.call(this)||this;return r.verifyPassword=t,r.passwordStatus=n,r}return d(t,e),t}(tv),tw=function(e){var n=e.passwordStatus,r=e.renderProtectedView,o=e.verifyPassword,a=e.onDocumentAskPassword,i=l.useContext(j).l10n,c=l.useState(""),u=c[0],s=c[1],d=l.useContext(g).direction===t.m5.RightToLeft,p=function(){return o(u)};return l.useEffect(function(){a&&a({verifyPassword:o})},[]),r?r({passwordStatus:n,verifyPassword:o}):l.createElement("div",{className:"rpv-core__asking-password-wrapper"},l.createElement("div",{className:v({"rpv-core__asking-password":!0,"rpv-core__asking-password--rtl":d})},l.createElement("div",{className:"rpv-core__asking-password-message"},n===t.Fn.RequiredPassword&&i.core.askingPassword.requirePasswordToOpen,n===t.Fn.WrongPassword&&i.core.wrongPassword.tryAgain),l.createElement("div",{className:"rpv-core__asking-password-body"},l.createElement("div",{className:v({"rpv-core__asking-password-input":!0,"rpv-core__asking-password-input--ltr":!d,"rpv-core__asking-password-input--rtl":d})},l.createElement(x,{testId:"core__asking-password-input",type:"password",value:u,onChange:s,onKeyDown:function(e){"Enter"===e.key&&p()}})),l.createElement(E,{onClick:p},i.core.askingPassword.submit))))},ty=function(e){function t(t){var n=e.call(this)||this;return n.doc=t,n}return d(t,e),t}(tv),tb=function(e){function t(t){var n=e.call(this)||this;return n.error=t,n}return d(t,e),t}(tv),tE=function(e){function t(t){var n=e.call(this)||this;return n.percentages=t,n}return d(t,e),t}(tv),tP=function(e){var n=e.characterMap,r=e.file,o=e.httpHeaders,a=e.render,i=e.renderError,c=e.renderLoader,s=e.renderProtectedView,d=e.transformGetDocumentParams,p=e.withCredentials,f=e.onDocumentAskPassword,h=l.useContext(g).direction===t.m5.RightToLeft,m=l.useState(new tE(0)),w=m[0],y=m[1],b=l.useRef(""),E=I();return l.useEffect(function(){b.current="",y(new tE(0));var e=new u.PDFWorker({name:"PDFWorker_".concat(Date.now())}),a=Object.assign({httpHeaders:o,withCredentials:p,worker:e},"string"==typeof r?{url:r}:{data:r},n?{cMapUrl:n.url,cMapPacked:n.isCompressed}:{}),i=d?d(a):a,c=u.getDocument(i);return c.onPassword=function(e,n){switch(n){case u.PasswordResponses.NEED_PASSWORD:E.current&&y(new tm(e,t.Fn.RequiredPassword));break;case u.PasswordResponses.INCORRECT_PASSWORD:E.current&&y(new tm(e,t.Fn.WrongPassword))}},c.onProgress=function(e){var t=e.total>0?Math.min(100,100*e.loaded/e.total):100;E.current&&""===b.current&&y(new tE(t))},c.promise.then(function(e){b.current=e.loadingTask.docId,E.current&&y(new ty(e))},function(t){return E.current&&!e.destroyed&&y(new tb({message:t.message||"Cannot load document",name:t.name}))}),function(){c.destroy(),e.destroy()}},[r]),w instanceof tm?l.createElement(tw,{passwordStatus:w.passwordStatus,renderProtectedView:s,verifyPassword:w.verifyPassword,onDocumentAskPassword:f}):w instanceof ty?a(w.doc):w instanceof tb?i?i(w.error):l.createElement("div",{className:v({"rpv-core__doc-error":!0,"rpv-core__doc-error--rtl":h})},l.createElement("div",{className:"rpv-core__doc-error-text"},w.error.message)):l.createElement("div",{"data-testid":"core__doc-loading",className:v({"rpv-core__doc-loading":!0,"rpv-core__doc-loading--rtl":h})},c?c(w.percentages):l.createElement(P,null))},tx=function(e,t){var n=l.useMemo(function(){return"auto"===e?"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
1k":"light":e},[]),r=l.useState(n),o=r[0],a=r[1],i=D(o);return l.useEffect(function(){if("auto"===e){var t=window.matchMedia("(prefers-color-scheme: dark)"),n=function(e){a(e.matches?"dark":"light")};return t.addEventListener("change",n),function(){return t.removeEventListener("change",n)}}},[]),l.useEffect(function(){o!==i&&t&&t(o)},[o]),l.useEffect(function(){e!==o&&a(e)},[e]),{currentTheme:o,setCurrentTheme:a}},tR=function(e){return{startPage:e.startPage-3,endPage:e.endPage+3}};t.Viewer=function(e){var n=e.characterMap,r=e.defaultScale,o=e.enableSmoothScroll,a=void 0===o||o,i=e.fileUrl,c=e.httpHeaders,u=e.initialPage,s=void 0===u?0:u,d=e.pageLayout,p=e.initialRotation,f=void 0===p?0:p,h=e.localization,v=e.plugins,m=void 0===v?[]:v,y=e.renderError,b=e.renderLoader,E=e.renderPage,P=e.renderProtectedView,x=e.scrollMode,R=void 0===x?t.Gd.Vertical:x,k=e.setRenderRange,S=void 0===k?tR:k,_=e.transformGetDocumentParams,C=e.theme,O=void 0===C?{direction:t.m5.LeftToRight,theme:"light"}:C,M=e.viewMode,F=void 0===M?t.wO.SinglePage:M,L=e.withCredentials,T=e.onDocumentAskPassword,I=e.onDocumentLoad,A=void 0===I?function(){}:I,H=e.onPageChange,N=void 0===H?function(){}:H,B=e.onRotate,V=void 0===B?function(){}:B,W=e.onRotatePage,J=void 0===W?function(){}:W,G=e.onSwitchTheme,q=e.onZoom,U=void 0===q?function(){}:q,Z=l.useState({data:i,name:"string"==typeof i?i:"",shouldLoad:!1}),$=Z[0],Y=Z[1],K=function(e,t){Y({data:t,name:e,shouldLoad:!0})},Q=l.useState(!1),X=Q[0],ee=Q[1],et=D($);l.useEffect(function(){var e,t,n;e=et.data,n=typeof i,"string"==(t=typeof e)&&"string"===n&&e===i||"object"===t&&"object"===n&&e.length===i.length&&e.every(function(e,t){return e===i[t]})||Y({data:i,name:"string"==typeof i?i:"",shouldLoad:X})},[i,X]);var en=w({onVisibilityChanged:function(e){ee(e.isVisible),e.isVisible&&Y(function(e){return Object.assign({},e,{shouldLoad:!0})})}}),er="string"==typeof O?{direction:t.m5.LeftToRight,theme:O}:O,eo=l.useState(h||z),ea=eo[0],ei=eo[1],ec=Object.assign({},{direction:er.direction},tx(er.theme||"light",void 0===G?function(){}:G));return l.useEffect(function(){h&&ei(h)},[h]),l.createElement(j.Provider,{value:{l10n:ea,setL10n:ei}},l.createElement(g.Provider,{value:ec},l.createElement("div",{ref:en,className:"rpv-core__viewer rpv-core__viewer--".concat(ec.currentTheme),"data-testid":"core__viewer",style:{height:"100%",width:"100%"}},$.shouldLoad&&l.createElement(tP,{characterMap:n,file:$.data,httpHeaders:void 0===c?{}:c,render:function(e){return l.createElement(tg,{defaultScale:r,doc:e,render:function(n,o){return l.createElement(tf,{currentFile:{data:$.data,name:$.name},defaultScale:r,doc:e,enableSmoothScroll:a,initialPage:s,initialRotation:f,initialScale:o,pageLayout:d,pageSizes:n,plugins:m,renderPage:E,scrollMode:R,setRenderRange:S,viewMode:F,viewerState:{file:$,fullScreenMode:t.Fi.Normal,pageIndex:-1,pageHeight:n[0].pageHeight,pageWidth:n[0].pageWidth,pagesRotation:new Map,rotation:f,scale:o,scrollMode:R,viewMode:F},onDocumentLoad:A,onOpenFile:K,onPageChange:N,onRotate:V,onRotatePage:J,onZoom:U})},scrollMode:R,viewMode:F})},renderError:y,renderLoader:b,renderProtectedView:P,transformGetDocumentParams:_,withCredentials:void 0!==L&&L,onDocumentAskPassword:T}))))},t.Worker=function(e){var t=e.children,n=e.workerUrl;return u.GlobalWorkerOptions.workerSrc=n,l.createElement(l.Fragment,null,t)}},54141:function(e,t,n){"use strict";e.exports=n(89469)},10680:function(){},11987:function(e,t,n){!function(){var t={452:function(e){"use strict";e.exports=n(97334)}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={exports:{}},i=!0;try{t[e](a,a.exports,o),i=!1}finally{i&&delete r[e]}return a.exports}o.ab="//";var a={};(function(){var e,t=(e=o(452))&&"object"==typeof e&&"default"in e?e.default:e,n=/https?|ftp|gopher|file/;function r(e){"string"==typeof e&&(e=m(e));var r,o,a,i,c,l,u,s,d,p=(o=(r=e).auth,a=r.hostname,i=r.protocol||"",c=r.pathname||"",l=r.hash||"",u=r.query||"",s=!1,o=o?encodeURIComponent(o).replace(/%3A/i,":")+"@":"",r.host?s=o+r.host:a&&(s=o+(~a.indexOf(":")?"["+a+"]":a),r.port&&(s+=":"+r.port)),u&&"object"==typeof u&&(u=t.encode(u)),d=r.search||u&&"?"+u||"",i&&":"!==i.substr(-1)&&(i+=":"),r.slashes||(!i||n.test(i))&&!1!==s?(s="//"+(s||""),c&&"/"!==c[0]&&(c="/"+c)):s||(s=""),l&&"#"!==l[0]&&(l="#"+l),d&&"?"!==d[0]&&(d="?"+d),{protocol:i,host:s,pathname:c=c.replace(/[?#]/g,encodeURIComponent),search:d=d.replace("#","%23"),hash:l});return""+p.protocol+p.host+p.pathname+p.search+p.hash}var i="http://",c=i+"w.w",l=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,u=/https?|ftp|gopher|file/;function s(e,t){var n="string"==typeof e?m(e):e;e="object"==typeof e?r(e):e;var o=m(t),a="";n.protocol&&!n.slashes&&(a=n.protocol,e=e.replace(n.protocol,""),a+="/"===t[0]||"/"===e[0]?"/":""),a&&o.protocol&&(a="",o.slashes||(a=o.protocol,t=t.replace(o.protocol,"")));var s=e.match(l);s&&!o.protocol&&(e=e.substr((a=s[1]+(s[2]||"")).length),/^\/\/[^/]/.test(t)&&(a=a.slice(0,-1)));var d=new URL(e,c+"/"),p=new URL(t,d).toString().replace(c,""),f=o.protocol||n.protocol;return f+=n.slashes||o.slashes?"//":"",!a&&f?p=p.replace(i,f):a&&(p=p.replace(i,"")),u.test(p)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==p.slice(-1)||(p=p.slice(0,-1)),a&&(p=a+("/"===p[0]?p.substr(1):p)),p}function d(){}d.prototype.parse=m,d.prototype.format=r,d.prototype.resolve=s,d.prototype.resolveObject=s;var p=/^https?|ftp|gopher|file/,f=/^(.*?)([#?].*)/,h=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,g=/^([a-z0-9.+-]*:)?\/\/\/*/i,v=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function m(e,n,o){if(void 0===n&&(n=!1),void 0===o&&(o=!1),e&&"object"==typeof e&&e instanceof d)return e;var a=(e=e.trim()).match(f);e=a?a[1].replace(/\\/g,"/")+a[2]:e.replace(/\\/g,"/"),v.test(e)&&"/"!==e.slice(-1)&&(e+="/");var i=!/(^javascript)/.test(e)&&e.match(h),l=g.test(e),u="";i&&(p.test(i[1])||(u=i[1].toLowerCase(),e=""+i[2]+i[3]),i[2]||(l=!1,p.test(i[1])?(u=i[1],e=""+i[3]):e="//"+i[3]),3!==i[2].length&&1!==i[2].length||(u=i[1],e="/"+i[3]));var s,m=(a?a[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),w=m&&m[1],y=new d,b="",E="";try{s=new URL(e)}catch(t){b=t,u||o||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(E="/",e=e.substr(1));try{s=new URL(e,c)}catch(e){return y.protocol=u,y.href=u,y}}y.slashes=l&&!E,y.host="w.w"===s.host?"":s.host,y.hostname="w.w"===s.hostname?"":s.hostname.replace(/(\[|\])/g,""),y.protocol=b?u||null:s.protocol,y.search=s.search.replace(/\\/g,"%5C"),y.hash=s.hash.replace(/\\/g,"%5C");var P=e.split("#");!y.search&&~P[0].indexOf("?")&&(y.search="?"),y.hash||""!==P[1]||(y.hash="#"),y.query=n?t.decode(s.search.substr(1)):y.search.substr(1),y.pathname=E+(i?s.pathname.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}}):s.pathname),"about:"===y.protocol&&"blank"===y.pathname&&(y.protocol="",y.pathname=""),b&&"/"!==e[0]&&(y.pathname=y.pathname.substr(1)),u&&!p.test(u)&&"/"!==e.slice(-1)&&"/"===y.pathname&&(y.pathname=""),y.path=y.pathname+y.search,y.auth=[s.username,s.password].map(decodeURIComponent).filter(
1Boolean).join(":"),y.port=s.port,w&&!y.host.endsWith(w)&&(y.host+=w,y.port=w.slice(1)),y.href=E?""+y.pathname+y.search+y.hash:r(y);var x=/^(file)/.test(y.href)?["host","hostname"]:[];return Object.keys(y).forEach(function(e){~x.indexOf(e)||(y[e]=y[e]||null)}),y}a.parse=m,a.format=r,a.resolve=s,a.resolveObject=function(e,t){return m(s(e,t))},a.Url=d})(),e.exports=a}()},97334:function(e){!function(){"use strict";var t={815:function(e){e.exports=function(e,n,r,o){n=n||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var i=/\+/g;e=e.split(n);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var u=0;u<l;++u){var s,d,p,f,h=e[u].replace(i,"%20"),g=h.indexOf(r);(g>=0?(s=h.substr(0,g),d=h.substr(g+1)):(s=h,d=""),p=decodeURIComponent(s),f=decodeURIComponent(d),Object.prototype.hasOwnProperty.call(a,p))?t(a[p])?a[p].push(f):a[p]=[a[p],f]:a[p]=f}return a};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,a,i,c){return(a=a||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e)?r(o(e),function(o){var c=encodeURIComponent(t(o))+i;return n(e[o])?r(e[o],function(e){return c+encodeURIComponent(t(e))}).join(a):c+encodeURIComponent(t(e[o]))}).join(a):c?encodeURIComponent(t(c))+i+encodeURIComponent(t(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}},i=!0;try{t[e](a,a.exports,r),i=!1}finally{i&&delete n[e]}return a.exports}r.ab="//";var o={};o.decode=o.parse=r(815),o.encode=o.stringify=r(577),e.exports=o}()},76770:function(e){(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{default:()=>o});var r=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t)}return e=[{key:"changeHeightWidth",value:function(e,t,n,r,o,a){return n>r&&(e=Math.round(e*r/n),n=r),e>t&&(n=Math.round(n*t/e),e=t),o&&n<o&&(e=Math.round(e*o/n),n=o),a&&e<a&&(n=Math.round(n*a/e),e=a),{height:e,width:n}}},{key:"resizeAndRotateImage",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"jpeg",i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:100,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=document.createElement("canvas"),u=e.width,s=e.height,d=this.changeHeightWidth(s,n,u,t,r,o);c&&(90===c||270===c)?(l.width=d.height,l.height=d.width):(l.width=d.width,l.height=d.height),u=d.width,s=d.height;var p=l.getContext("2d");return p.fillStyle="rgba(0, 0, 0, 0)",p.fillRect(0,0,u,s),p.imageSmoothingEnabled&&p.imageSmoothingQuality&&(p.imageSmoothingQuality="high"),c&&(p.rotate(c*Math.PI/180),90===c?p.translate(0,-l.width):180===c?p.translate(-l.width,-l.height):270===c?p.translate(-l.height,0):0!==c&&360!==c||p.translate(0,0)),p.drawImage(e,0,0,u,s),l.toDataURL("image/".concat(a),i/100)}},{key:"b64toByteArrays",value:function(e,t){t=t||"image/jpeg";for(var n=atob(e.toString().replace(/^data:image\/(png|jpeg|jpg|webp);base64,/,"")),r=[],o=0;o<n.length;o+=512){for(var a=n.slice(o,o+512),i=Array(a.length),c=0;c<a.length;c++)i[c]=a.charCodeAt(c);var l=new Uint8Array(i);r.push(l)}return r}},{key:"b64toBlob",value:function(e,t){return new Blob(this.b64toByteArrays(e,t),{type:t,lastModified:new Date})}},{key:"b64toFile",value:function(e,t,n){return new File(this.b64toByteArrays(e,n),t,{type:n,lastModified:new Date})}},{key:"createResizedImage",value:function(e,n,r,o,a,i,c){var l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"base64",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,d=new FileReader;if(!e)throw Error("File Not Found!");if(e.type&&!e.type.includes("image"))throw Error("File Is NOT Image!");d.readAsDataURL(e),d.onload=function(){var p=new Image;p.src=d.result,p.onload=function(){var d=t.resizeAndRotateImage(p,n,r,u,s,o,a,i),f="image/".concat(o);switch(l){case"blob":c(t.b64toBlob(d,f));break;case"base64":default:c(d);break;case"file":var h=e.name.toString().replace(/(png|jpeg|jpg|webp)$/i,"").concat(o.toString());c(t.b64toFile(d,h,f))}}},d.onerror=function(e){throw Error(e)}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t,e),t}();let o={imageFileResizer:function(e,t,n,o,a,i,c,l,u,s){return r.createResizedImage(e,t,n,o,a,i,c,l,u,s)}};e.exports=n})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.