UNPKG

@syncfusion/ej2-pdfviewer

Version:
10 lines 8.27 MB
/*! * filename: ej2-pdfviewer.min.js * version : 33.1.49 * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionDrawings"),require("SyncfusionInputs"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons"),require("SyncfusionInplaceEditor"),require("SyncfusionNavigations"),require("SyncfusionNotifications"),require("SyncfusionCompression"),require("SyncfusionFileUtils"),require("SyncfusionButtons"),require("SyncfusionDropdowns"),require("SyncfusionData"),require("SyncfusionLists")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionDrawings","SyncfusionInputs","SyncfusionPopups","SyncfusionSplitbuttons","SyncfusionInplaceEditor","SyncfusionNavigations","SyncfusionNotifications","SyncfusionCompression","SyncfusionFileUtils","SyncfusionButtons","SyncfusionDropdowns","SyncfusionData","SyncfusionLists"],t):"object"==typeof exports?exports.SyncfusionPdfviewer=t(require("SyncfusionBase"),require("SyncfusionDrawings"),require("SyncfusionInputs"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons"),require("SyncfusionInplaceEditor"),require("SyncfusionNavigations"),require("SyncfusionNotifications"),require("SyncfusionCompression"),require("SyncfusionFileUtils"),require("SyncfusionButtons"),require("SyncfusionDropdowns"),require("SyncfusionData"),require("SyncfusionLists")):e.SyncfusionPdfviewer=t(e.SyncfusionBase,e.SyncfusionDrawings,e.SyncfusionInputs,e.SyncfusionPopups,e.SyncfusionSplitbuttons,e.SyncfusionInplaceEditor,e.SyncfusionNavigations,e.SyncfusionNotifications,e.SyncfusionCompression,e.SyncfusionFileUtils,e.SyncfusionButtons,e.SyncfusionDropdowns,e.SyncfusionData,e.SyncfusionLists)}(self,(e,t,A,i,n,o,a,r,s,g,l,h,B,d)=>(()=>{"use strict";var c={766:t=>{t.exports=e},741:e=>{e.exports=l},50:e=>{e.exports=s},74:e=>{e.exports=B},984:e=>{e.exports=t},778:e=>{e.exports=h},115:e=>{e.exports=g},914:e=>{e.exports=o},323:e=>{e.exports=A},90:e=>{e.exports=d},215:e=>{e.exports=a},344:e=>{e.exports=r},197:e=>{e.exports=i},295:e=>{e.exports=n}},p={};function w(e){var t=p[e];if(void 0!==t)return t.exports;var A=p[e]={exports:{}};return c[e](A,A.exports,w),A.exports}w.d=(e,t)=>{for(var A in t)w.o(t,A)&&!w.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var C={};return(()=>{w.r(C),w.d(C,{AccessibilityTags:()=>tc,ActiveElements:()=>Qe,AjaxHandler:()=>pB,AjaxRequestSettings:()=>HB,AllowedInteraction:()=>xe,AnnotBounds:()=>hC,AnnotBoundsBase:()=>gA,AnnotBoundsRect:()=>sA,AnnotColor:()=>BC,AnnotFontBase:()=>hA,AnnotPoint:()=>lC,AnnotRectBase:()=>lA,Annotation:()=>aA,AnnotationBaseSettings:()=>rA,AnnotationDataFormat:()=>Ye,AnnotationDrawingOptions:()=>ed,AnnotationRenderer:()=>zw,AnnotationResizerLocation:()=>Me,AnnotationSelectorSettings:()=>Qd,AnnotationSettings:()=>md,AnnotationToolbar:()=>SB,AnnotationToolbarSettings:()=>NB,Annotations:()=>Ww,AnnotationsBase:()=>cA,AnnotationsInternal:()=>dA,AreaSettings:()=>Bd,ArrowSettings:()=>td,BlazorUiAdaptor:()=>nB,BookmarkBase:()=>CC,BookmarkDestination:()=>uC,BookmarkStyles:()=>QC,BookmarkView:()=>Od,CalculateLeaderPoints:()=>de,CheckBoxFieldSettings:()=>xd,CircleSettings:()=>od,CommandManager:()=>Pd,CommentStatus:()=>Ie,ConnectTool:()=>ne,ContextMenu:()=>cB,ContextMenuItem:()=>De,ContextMenuSettings:()=>kd,CursorType:()=>be,CustomStamp:()=>PB,CustomStampSettings:()=>gd,CustomToolbarItem:()=>TB,DisplayMode:()=>Fe,DistanceSettings:()=>ld,DocumentTextCollectionSettings:()=>Dd,Drawing:()=>z,DropdownFieldSettings:()=>Ud,DynamicStampItem:()=>ke,ExtractTextOption:()=>Se,FontBase:()=>dC,FontStyle:()=>me,FormDesigner:()=>ec,FormDesignerToolbar:()=>IB,FormDesignerToolbarSettings:()=>KB,FormField:()=>bd,FormFieldDataFormat:()=>Ue,FormFields:()=>$d,FormFieldsBase:()=>kB,FreeTextAnnotation:()=>tA,FreeTextAnnotationBase:()=>$w,FreeTextSettings:()=>ud,HandWrittenSignatureSettings:()=>Id,HighlightSettings:()=>qB,IBounds:()=>BA,ImageStructureBase:()=>EC,InitialFieldSettings:()=>OB,InkAnnotation:()=>MA,InkAnnotationSettings:()=>pd,InkDrawingTool:()=>ie,InkSignatureAnnotation:()=>eC,InputElement:()=>AA,Item:()=>Rd,KeyGesture:()=>Td,KeyboardCommand:()=>Hd,LineSettings:()=>$B,LineTool:()=>se,LinkAnnotation:()=>CA,ListBoxFieldSettings:()=>Vd,Magnification:()=>uB,MeasureAnnotation:()=>fA,MeasureShapeAnnotationBase:()=>iC,MeasurementScaleRatio:()=>EA,MeasurementSettings:()=>Cd,ModifierKeys:()=>Ve,MoveTool:()=>te,Navigation:()=>QB,NavigationPane:()=>rh,NodeDrawingTool:()=>ae,OrganizeDetails:()=>yE,PageInfo:()=>fd,PageOrganizer:()=>mE,PageOrganizerSettings:()=>Nd,PageRenderer:()=>nc,PageRotation:()=>DE,PasswordFieldSettings:()=>vd,Path:()=>cC,PdfAnnotationBase:()=>r,PdfAnnotationSettings:()=>id,PdfBounds:()=>o,PdfFont:()=>a,PdfFormFieldBase:()=>s,PdfKeys:()=>Re,PdfLayer:()=>gC,PdfPageRotateAngle:()=>IE,PdfRenderedFields:()=>GB,PdfRenderer:()=>_w,PdfViewer:()=>Jd,PdfViewerBase:()=>BB,PdfiumRunner:()=>ic,PerimeterSettings:()=>hd,PointBase:()=>qw,PolygonDrawingTool:()=>re,PolygonSettings:()=>rd,PopupAnnotationBase:()=>rC,Print:()=>zd,RadioButtonFieldSettings:()=>Yd,RadiusSettings:()=>dd,RectBounds:()=>Ac,RectangleBase:()=>pC,RectangleBounds:()=>Md,RectangleSettings:()=>Ad,RedactionAnnotationBase:()=>AC,RedactionSettings:()=>nd,RedactionToolbarSettings:()=>JB,ResizeTool:()=>oe,RotateTool:()=>ge,ScrollSettings:()=>Fd,SearchResult:()=>Kd,SelectTool:()=>ee,Selector:()=>B,ServerActionSettings:()=>XB,ShapeAnnotation:()=>IA,ShapeAnnotationBase:()=>tC,ShapeLabelSettings:()=>ad,SignStampItem:()=>Ge,Signature:()=>CB,SignatureAnnotationBase:()=>nC,SignatureBase:()=>wC,SignatureDialogSettings:()=>jB,SignatureFieldSettings:()=>LB,SignatureIndicatorSettings:()=>_B,SignatureType:()=>ye,SizeBase:()=>Zw,Spinner:()=>Th,SquigglySettings:()=>WB,StampAnnotation:()=>mA,StampAnnotationBase:()=>oc,StampSettings:()=>sd,StampTool:()=>Ae,StandardBusinessStampItem:()=>ve,StickyNotesAnnotation:()=>yA,StickyNotesSettings:()=>wd,StrikethroughSettings:()=>ZB,TextDataSettings:()=>yd,TextFieldSettings:()=>Gd,TextLayer:()=>dB,TextMarkupAnnotation:()=>uA,TextMarkupAnnotationBase:()=>sC,TextSearch:()=>Zd,TextSearchColorSettings:()=>Ed,TextSelection:()=>_d,ThumbnailView:()=>EB,TileRenderingSettings:()=>Sd,ToolBase:()=>$,Toolbar:()=>MB,ToolbarSettings:()=>RB,UnderlineSettings:()=>zB,VolumeSettings:()=>cd,ZOrderPageTable:()=>g,clipDecorator:()=>x,clipDecorators:()=>v,cloneArray:()=>m,cloneObject:()=>I,createSpinner:()=>Hh,createSvg:()=>fe,findActiveElement:()=>le,findActivePage:()=>ue,findElementUnderMouse:()=>ce,findNearestPoint:()=>_,findObjectUnderMouse:()=>Be,findObjects:()=>Ce,findObjectsUnderMouse:()=>he,findPerimeterLength:()=>Q,findPointsLength:()=>u,findTargetShapeElement:()=>we,getArialFontData:()=>FB,getBaseShapeAttributes:()=>E,getConnectorPoints:()=>M,getDecoratorElement:()=>G,getDecoratorShape:()=>j,getFunction:()=>f,getInternalProperties:()=>D,getPolygonPath:()=>N,getSegmentElement:()=>b,getSegmentPath:()=>S,hideSpinner:()=>eB,initDistanceLabel:()=>Y,initLeader:()=>L,initLeaders:()=>J,initPerimeterLabel:()=>R,insertObject:()=>pe,isLeader:()=>y,isLineShapes:()=>d,isPointOverConnector:()=>O,removePerimeterLabel:()=>H,renderAdornerLayer:()=>Ee,setElementStype:()=>c,setSpinner:()=>tB,showSpinner:()=>qh,textElement:()=>K,updateCalibrateLabel:()=>P,updateColorWithOpacity:()=>p,updateDecoratorElement:()=>k,updateDistanceLabel:()=>U,updatePerimeterLabel:()=>T,updateRadiusLabel:()=>V,updateSegmentElement:()=>F});var e,t=w(766),A=w(984),i=(e=function(t,A){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var A in t)t.hasOwnProperty(A)&&(e[A]=t[A])},e(t,A)},function(t,A){function i(){this.constructor=t}e(t,A),t.prototype=null===A?Object.create(A):(i.prototype=A.prototype,new i)}),n=function(e,t,A,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,A):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,A,i);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(a=(o<3?n(a):o>3?n(t,A,a):n(t,A))||a);return o>3&&a&&Object.defineProperty(t,A,a),a},o=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return i(o,e),n([(0,t.Property)(0)],o.prototype,"x",void 0),n([(0,t.Property)(0)],o.prototype,"y",void 0),n([(0,t.Property)(0)],o.prototype,"width",void 0),n([(0,t.Property)(0)],o.prototype,"height",void 0),n([(0,t.Property)(0)],o.prototype,"left",void 0),n([(0,t.Property)(0)],o.prototype,"top",void 0),n([(0,t.Property)(0)],o.prototype,"right",void 0),n([(0,t.Property)(0)],o.prototype,"bottom",void 0),n([(0,t.Complex)({x:0,y:0},A.Point)],o.prototype,"location",void 0),n([(0,t.Complex)(new A.Size(0,0),A.Size)],o.prototype,"size",void 0),o}(t.ChildProperty),a=function(e){function A(){return null!==e&&e.apply(this,arguments)||this}return i(A,e),n([(0,t.Property)(!1)],A.prototype,"isBold",void 0),n([(0,t.Property)(!1)],A.prototype,"isItalic",void 0),n([(0,t.Property)(!1)],A.prototype,"isUnderline",void 0),n([(0,t.Property)(!1)],A.prototype,"isStrikeout",void 0),A}(t.ChildProperty),r=function(e){function A(t,A,i,n){return e.call(this,t,A,i,n)||this}return i(A,e),n([(0,t.Property)("")],A.prototype,"id",void 0),n([(0,t.Property)("Rectangle")],A.prototype,"shapeAnnotationType",void 0),n([(0,t.Property)(null)],A.prototype,"formFieldAnnotationType",void 0),n([(0,t.Property)("")],A.prototype,"measureType",void 0),n([(0,t.Property)("")],A.prototype,"author",void 0),n([(0,t.Property)("")],A.prototype,"overlayText",void 0),n([(0,t.Property)("")],A.prototype,"modifiedDate",void 0),n([(0,t.Property)("")],A.prototype,"subject",void 0),n([(0,t.Property)("")],A.prototype,"notes",void 0),n([(0,t.Property)(!1)],A.prototype,"isCommentLock",void 0),n([(0,t.Property)("black")],A.prototype,"strokeColor",void 0),n([(0,t.Property)("#ffffff00")],A.prototype,"fillColor",void 0),n([(0,t.Property)(!1)],A.prototype,"isRepeat",void 0),n([(0,t.Property)(!1)],A.prototype,"useOverlayText",void 0),n([(0,t.Property)(1)],A.prototype,"markerOpacity",void 0),n([(0,t.Property)("rgba(255, 0, 0, 1)")],A.prototype,"markerBorderColor",void 0),n([(0,t.Property)("rgba(0, 0, 0, 1)")],A.prototype,"originalFillColor",void 0),n([(0,t.Property)("rgba(255, 255, 255, 1)")],A.prototype,"markerFillColor",void 0),n([(0,t.Property)("#ffffff00")],A.prototype,"stampFillColor",void 0),n([(0,t.Property)("black")],A.prototype,"stampStrokeColor",void 0),n([(0,t.Property)("")],A.prototype,"data",void 0),n([(0,t.Property)(1)],A.prototype,"opacity",void 0),n([(0,t.Property)(1)],A.prototype,"thickness",void 0),n([(0,t.Property)("")],A.prototype,"borderStyle",void 0),n([(0,t.Property)("")],A.prototype,"borderDashArray",void 0),n([(0,t.Property)(0)],A.prototype,"rotateAngle",void 0),n([(0,t.Property)(!1)],A.prototype,"isCloudShape",void 0),n([(0,t.Property)(0)],A.prototype,"cloudIntensity",void 0),n([(0,t.Property)(40)],A.prototype,"leaderHeight",void 0),n([(0,t.Property)(null)],A.prototype,"lineHeadStart",void 0),n([(0,t.Property)(null)],A.prototype,"lineHeadEnd",void 0),n([(0,t.Property)([])],A.prototype,"vertexPoints",void 0),n([(0,t.Property)(null)],A.prototype,"sourcePoint",void 0),n([(0,t.Property)("None")],A.prototype,"sourceDecoraterShapes",void 0),n([(0,t.Property)("None")],A.prototype,"taregetDecoraterShapes",void 0),n([(0,t.Property)(null)],A.prototype,"targetPoint",void 0),n([(0,t.Property)([])],A.prototype,"segments",void 0),n([(0,t.Complex)({x:0,y:0},o)],A.prototype,"bounds",void 0),n([(0,t.Property)(0)],A.prototype,"pageIndex",void 0),n([(0,t.Property)(-1)],A.prototype,"zIndex",void 0),n([(0,t.Property)(null)],A.prototype,"wrapper",void 0),n([(0,t.Property)(!1)],A.prototype,"isDynamicStamp",void 0),n([(0,t.Property)("")],A.prototype,"dynamicText",void 0),n([(0,t.Property)("")],A.prototype,"annotName",void 0),n([(0,t.Property)({})],A.prototype,"review",void 0),n([(0,t.Property)([])],A.prototype,"comments",void 0),n([(0,t.Property)("#000")],A.prototype,"fontColor",void 0),n([(0,t.Property)(16)],A.prototype,"fontSize",void 0),n([(0,t.Property)("Helvetica")],A.prototype,"fontFamily",void 0),n([(0,t.Property)("None")],A.prototype,"fontStyle",void 0),n([(0,t.Property)(!1)],A.prototype,"enableShapeLabel",void 0),n([(0,t.Property)("label")],A.prototype,"labelContent",void 0),n([(0,t.Property)("#ffffff00")],A.prototype,"labelFillColor",void 0),n([(0,t.Property)(15)],A.prototype,"labelMaxLength",void 0),n([(0,t.Property)("")],A.prototype,"template",void 0),n([(0,t.Property)("")],A.prototype,"templateSize",void 0),n([(0,t.Property)(1)],A.prototype,"labelOpacity",void 0),n([(0,t.Property)("")],A.prototype,"annotationSelectorSettings",void 0),n([(0,t.Property)("#ffffff00")],A.prototype,"labelBorderColor",void 0),n([(0,t.Property)("left")],A.prototype,"textAlign",void 0),n([(0,t.Property)("")],A.prototype,"signatureName",void 0),n([(0,t.Property)(0)],A.prototype,"minHeight",void 0),n([(0,t.Property)(0)],A.prototype,"minWidth",void 0),n([(0,t.Property)(0)],A.prototype,"maxHeight",void 0),n([(0,t.Property)(0)],A.prototype,"maxWidth",void 0),n([(0,t.Property)(!1)],A.prototype,"isLock",void 0),n([(0,t.Property)("UI Drawn Annotation")],A.prototype,"annotationAddMode",void 0),n([(0,t.Property)("")],A.prototype,"annotationSettings",void 0),n([(0,t.Property)(16)],A.prototype,"previousFontSize",void 0),n([(0,t.Complex)({isBold:!1,isItalic:!1,isStrikeout:!1,isUnderline:!1},a)],A.prototype,"font",void 0),n([(0,t.Complex)({x:0,y:0},o)],A.prototype,"labelBounds",void 0),n([(0,t.Property)(null)],A.prototype,"customData",void 0),n([(0,t.Property)(["None"])],A.prototype,"allowedInteractions",void 0),n([(0,t.Property)(!0)],A.prototype,"isPrint",void 0),n([(0,t.Property)(!1)],A.prototype,"isReadonly",void 0),n([(0,t.Property)(0)],A.prototype,"pageRotation",void 0),n([(0,t.Property)("")],A.prototype,"icon",void 0),n([(0,t.Property)(!1)],A.prototype,"isAddAnnotationProgrammatically",void 0),n([(0,t.Property)(!1)],A.prototype,"isSignatureText",void 0),n([(0,t.Property)(!1)],A.prototype,"isTransparentSet",void 0),A}(t.ChildProperty),s=function(e){function A(t,A,i,n){return e.call(this,t,A,i,n)||this}return i(A,e),n([(0,t.Property)("")],A.prototype,"id",void 0),n([(0,t.Property)("")],A.prototype,"signatureType",void 0),n([(0,t.Property)("")],A.prototype,"name",void 0),n([(0,t.Property)("")],A.prototype,"value",void 0),n([(0,t.Property)(null)],A.prototype,"formFieldAnnotationType",void 0),n([(0,t.Property)("#daeaf7ff")],A.prototype,"backgroundColor",void 0),n([(0,t.Property)("black")],A.prototype,"color",void 0),n([(0,t.Property)("#303030")],A.prototype,"borderColor",void 0),n([(0,t.Property)("")],A.prototype,"tooltip",void 0),n([(0,t.Property)(1)],A.prototype,"opacity",void 0),n([(0,t.Property)(1)],A.prototype,"thickness",void 0),n([(0,t.Property)(0)],A.prototype,"rotateAngle",void 0),n([(0,t.Complex)({x:0,y:0},o)],A.prototype,"bounds",void 0),n([(0,t.Property)(0)],A.prototype,"pageIndex",void 0),n([(0,t.Property)(1)],A.prototype,"pageNumber",void 0),n([(0,t.Property)(-1)],A.prototype,"zIndex",void 0),n([(0,t.Property)(null)],A.prototype,"wrapper",void 0),n([(0,t.Property)(16)],A.prototype,"fontSize",void 0),n([(0,t.Property)("Helvetica")],A.prototype,"fontFamily",void 0),n([(0,t.Property)("None")],A.prototype,"fontStyle",void 0),n([(0,t.Property)("left")],A.prototype,"alignment",void 0),n([(0,t.Property)(0)],A.prototype,"minHeight",void 0),n([(0,t.Property)(0)],A.prototype,"minWidth",void 0),n([(0,t.Property)(0)],A.prototype,"maxHeight",void 0),n([(0,t.Property)(0)],A.prototype,"maxWidth",void 0),n([(0,t.Property)(0)],A.prototype,"maxLength",void 0),n([(0,t.Property)("visible")],A.prototype,"visibility",void 0),n([(0,t.Property)(!0)],A.prototype,"isPrint",void 0),n([(0,t.Property)(!1)],A.prototype,"isReadonly",void 0),n([(0,t.Property)(!1)],A.prototype,"isChecked",void 0),n([(0,t.Property)(!1)],A.prototype,"isSelected",void 0),n([(0,t.Property)(!1)],A.prototype,"isRequired",void 0),n([(0,t.Property)(!1)],A.prototype,"isMultiline",void 0),n([(0,t.Property)(!1)],A.prototype,"isTransparent",void 0),n([(0,t.Property)(!1)],A.prototype,"insertSpaces",void 0),n([(0,t.Property)("")],A.prototype,"options",void 0),n([(0,t.Property)()],A.prototype,"signatureIndicatorSettings",void 0),n([(0,t.Complex)({isBold:!1,isItalic:!1,isStrikeout:!1,isUnderline:!1},a)],A.prototype,"font",void 0),n([(0,t.Property)()],A.prototype,"selectedIndex",void 0),n([(0,t.Property)(null)],A.prototype,"customData",void 0),n([(0,t.Property)(!1)],A.prototype,"isUnisonSelected",void 0),A}(t.ChildProperty),g=function(){function e(){this.pageIdTemp=0,this.zIndexTemp=-1,this.childNodesTemp=[],this.objects=[],this.zIndexTemp=-1,this.pageIdTemp=0}return Object.defineProperty(e.prototype,"pageId",{get:function(){return this.pageIdTemp},set:function(e){this.pageIdTemp=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this.zIndexTemp},set:function(e){this.zIndexTemp=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"objects",{get:function(){return this.childNodesTemp},set:function(e){this.childNodesTemp=e},enumerable:!0,configurable:!0}),e}(),l=function(){var e=function(t,A){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var A in t)t.hasOwnProperty(A)&&(e[A]=t[A])},e(t,A)};return function(t,A){function i(){this.constructor=t}e(t,A),t.prototype=null===A?Object.create(A):(i.prototype=A.prototype,new i)}}(),h=function(e,t,A,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,A):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,A,i);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(a=(o<3?n(a):o>3?n(t,A,a):n(t,A))||a);return o>3&&a&&Object.defineProperty(t,A,a),a},B=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return l(i,e),i.prototype.init=function(e){var i=new A.Container;if(i.measureChildren=!1,i.children=[],this.formFields&&this.formFields.length>0)for(var n=0;n<this.formFields.length;n++){var o=e.pdfViewer.nameTable[this.formFields[parseInt(n.toString(),10)].id].wrapper;i.children.push(o)}else if(this.annotations)for(n=0;n<this.annotations.length;n++)if(!(0,t.isNullOrUndefined)(this.annotations[parseInt(n.toString(),10)])){o=e.pdfViewer.nameTable[this.annotations[parseInt(n.toString(),10)].id].wrapper;i.children.push(o)}return this.wrapper=i,i},h([(0,t.Property)(null)],i.prototype,"wrapper",void 0),h([(0,t.Collection)([],r)],i.prototype,"annotations",void 0),h([(0,t.Collection)([],s)],i.prototype,"formFields",void 0),h([(0,t.Property)()],i.prototype,"width",void 0),h([(0,t.Property)()],i.prototype,"height",void 0),h([(0,t.Property)(0)],i.prototype,"rotateAngle",void 0),h([(0,t.Property)(0)],i.prototype,"offsetX",void 0),h([(0,t.Property)(0)],i.prototype,"offsetY",void 0),h([(0,t.Complex)({x:.5,y:.5},A.Point)],i.prototype,"pivot",void 0),i}(t.ChildProperty);function d(e){return"Line"===e.shapeAnnotationType||"LineWidthArrowHead"===e.shapeAnnotationType||"Distance"===e.shapeAnnotationType||"Polygon"===e.shapeAnnotationType}function c(e,t){if(e&&t)if(e.formFieldAnnotationType)-1!==e.id.indexOf("diagram_helper")?(t.style.fill="transparent",t.style.strokeWidth=1,t.style.strokeDashArray=e.borderDashArray):(t.style.fill="transparent",t.style.strokeWidth=0);else{var A="#ffffff00"===e.fillColor?"transparent":e.fillColor,i="Perimeter"!==e.measureType||!(!t.id||!t.id.toLowerCase().includes("srcdec")&&!t.id.toLowerCase().includes("tardec"));t.style.fill=A&&i?A:"transparent","Redaction"===e.shapeAnnotationType&&(A=p(e.markerFillColor,e.markerOpacity),t.style.fill=A),t.style.strokeColor=e.strokeColor?e.strokeColor:e.borderColor,t.style.color=e.strokeColor?e.strokeColor:e.borderColor,t.style.strokeWidth=e.thickness,"Image"!==e.shapeAnnotationType&&"SignatureText"!==e.shapeAnnotationType&&"SignatureImage"!==e.shapeAnnotationType||(t.style.strokeWidth=0),t.style.strokeDashArray=e.borderDashArray,t.style.opacity=e.opacity}}function p(e,t){return e.replace(/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*[\d.]+\s*\)/,function(e,A,i,n){return"rgba("+A+","+i+","+n+","+t+")"})}function u(e){for(var t=0,i=0;i<e.length-1;i++)t+=A.Point.findLength(e[parseInt(i.toString(),10)],e[i+1]);return t}function Q(e){return A.Point.getLengthFromListOfPoints(e)}function E(e,t){var A={width:e.actualSize.width,height:e.actualSize.height,x:e.offsetX-e.actualSize.width*e.pivot.x+.5,y:e.offsetY-e.actualSize.height*e.pivot.y+.5,angle:e.rotateAngle+e.parentTransform,fill:e.style.fill,stroke:e.style.strokeColor,pivotX:e.pivot.x,pivotY:e.pivot.y,strokeWidth:1,opacity:e.style.opacity,dashArray:e.style.strokeDashArray||"",visible:e.visible,id:e.id};return t&&(A.x+=t.tx,A.y+=t.ty),A}function f(e){return void 0!==e&&"string"==typeof e&&(e=(0,t.getValue)(e,window)),e}function I(e,t,A){var i={};if(e){A=e.propName;var n=e.properties||e,o=[],a=[];if((o=o.concat(Object.keys(n))).push("version"),A){var r=f(t);a=r?r(A):[],o=o.concat(a)}for(var s=D(A),g=0,l=o=o.concat(s);g<l.length;g++){var h=l[g];if("historyManager"!==h)if("wrapper"!==h)!(!e[""+h]||!Object.prototype.hasOwnProperty.call(e,"observers"))||(e[""+h]instanceof Array?i[""+h]=m(-1===s.indexOf(h)&&e[""+A]?e[""+A][""+h]:e[""+h],t,h):e[""+h]instanceof Array==!1&&e[""+h]instanceof HTMLElement?i[""+h]=e[""+h].cloneNode(!0).innerHtml:e[""+h]instanceof Array==!1&&e[""+h]instanceof Object&&"template"!==h?i[""+h]=I(-1===s.indexOf(h)&&e[""+A]?e[""+A][""+h]:e[""+h]):i[""+h]=e[""+h]);else e[""+h]&&(i[""+h]={actualSize:{width:e[""+h].actualSize.width,height:e[""+h].actualSize.height},offsetX:e[""+h].offsetX,offsetY:e[""+h].offsetY})}}return i}function m(e,t,A){var i;if(e){i=[];for(var n=0;n<e.length;n++)e[parseInt(n.toString(),10)]instanceof Array?i.push(e[parseInt(n.toString(),10)]):e[parseInt(n.toString(),10)]instanceof Object?i.push(I(e[parseInt(n.toString(),10)],t,A)):i.push(e[parseInt(n.toString(),10)])}return i}function D(e){switch(e){case"nodes":case"children":return["inEdges","outEdges","parentId","processId","nodeId","umlIndex","isPhase","isLane"];case"connectors":return["parentId"];case"annotation":case"annotations":return["nodeId"];case"shape":return["hasHeader"]}return[]}function y(e,t){var i;if("Distance"===e.shapeAnnotationType)for(var n=0,o=void 0,a=0;a<e.wrapper.children.length;a++){var r=A.Point.findAngle(e.sourcePoint,e.targetPoint);if(e.wrapper.children[parseInt(a.toString(),10)].id.indexOf("leader")>-1){var s=e.wrapper.children[0].bounds.center;0===n?(o={x:e.sourcePoint.x,y:e.sourcePoint.y-e.leaderHeight},s=e.sourcePoint):(o={x:e.targetPoint.x,y:e.targetPoint.y-e.leaderHeight},s=e.targetPoint);var g=(0,A.identityMatrix)();if((0,A.rotateMatrix)(g,r,s.x,s.y),i=(0,A.transformPointByMatrix)(g,{x:o.x,y:o.y}),t==="Leader"+n)return{leader:"leader"+n,point:i};n++}}return{leader:"",point:i}}function M(e,t){var A=e.vertexPoints.slice(0);return A&&A.length>0&&(e.sourcePoint=A[0],e.targetPoint=A[A.length-1]),A}function S(e,t){for(var A,i="",n=[],o=0;o<t.length;)n.push({x:t[parseInt(o.toString(),10)].x,y:t[parseInt(o.toString(),10)].y}),o++;n=v(e,n);for(var a=0;a<n.length;a++)A=n[parseInt(a.toString(),10)],0===a&&(i="M"+A.x+" "+A.y),a>0&&(i+=" L"+A.x+" "+A.y);return i}function F(e,t,i){var n=new A.Rect,o=S(e,t);if(n=A.Rect.toBounds(t),i.width=n.width,i.height=n.height,i.offsetX=n.x+i.width/2,i.offsetY=n.y+i.height/2,i.data=o,e.wrapper){e.wrapper.offsetX=i.offsetX,e.wrapper.offsetY=i.offsetY;var a=n.width;a=n.width<n.height?n.height:n.width,e.wrapper.width=e.enableShapeLabel?a/2:a,e.wrapper.height=n.height}return i}function b(e,t){var A;return A=M(e),t.staticSize=!0,c(e,t=F(e,A,t)),t}function k(e,t,i,n,o){t.offsetX=i.x,t.offsetY=i.y;var a,r=A.Point.findAngle(i,n),s=j(o?e.sourceDecoraterShapes:e.taregetDecoraterShapes),g=0;"LineWidthArrowHead"===e.shapeAnnotationType||"Line"===e.shapeAnnotationType?(g=e.thickness,a=new A.Size(12*g,12*g)):(g=e.thickness<=5?5:e.thickness,a=new A.Size(2*g,2*g)),t.transform=A.RotateTransform.Self,c(e,t),t.style.fill="tranparent"!==e.fillColor?e.fillColor:"white",t.rotateAngle=r,t.data=s,t.canMeasurePath=!0,t.width=a.width,t.height=a.height,"Butt"!==e.sourceDecoraterShapes&&"Butt"!==e.taregetDecoraterShapes||(t.width=a.width-10,t.height=a.height+10)}function G(e,t,i,n){var o=new A.PathElement;return k(e,o,t,i,n),o}function v(e,t){return t[0]=x(e,t,!0),t[t.length-1]=x(e,t,!1),t}function x(e,t,i){var n,o,a={x:0,y:0},r=t.length;if(n=i?t[0]:t[r-1],o=i?t[1]:t[r-2],"Butt"===(i?e.sourceDecoraterShapes:e.taregetDecoraterShapes))return n;var s=A.Point.distancePoints(n,o);s=0===s?1:s;var g=e.thickness;a.x=Math.round(n.x+g*(o.x-n.x)/s),a.y=Math.round(n.y+g*(o.y-n.y)/s);return a=A.Point.adjustPoint(a,o,!0,.5)}function Y(e,t,i,n){var o=[],a=A.Point.findAngle(t[0],t[1]),r=K(e,a);return!n.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?r.content=e.notes:r.content=i.setConversion(u([t[0],t[1]])*i.pixelToPointFactor,e),r.rotateValue={y:-10,angle:a},!0===e.enableShapeLabel&&(r.style.strokeColor=e.labelBorderColor,r.style.fill=e.labelFillColor,r.style.fontSize=e.fontSize,r.style.color=e.fontColor,r.style.fontFamily=e.fontFamily),o.push(r),o}function U(e,A,i){for(var n,o=0;o<e.wrapper.children.length;o++){var a=e.wrapper.children[parseInt(o.toString(),10)];a&&!(0,t.isNullOrUndefined)(a.content)&&(n=i.setConversion(u([A[0],A[1]])*i.pixelToPointFactor,e),a.content=n,a.childNodes[0].text=a.content,a.refreshTextElement())}return n}function V(e,A){for(var i,n=0;n<e.wrapper.children.length;n++){var o=e.wrapper.children[parseInt(n.toString(),10)];o&&!(0,t.isNullOrUndefined)(o.content)&&(i=A.setConversion(e.bounds.width/2*A.pixelToPointFactor,e),o.content=i,2===o.childNodes.length?(o.childNodes[0].text=i,o.childNodes.splice(o.childNodes.length-1,1)):o.childNodes[0].text=i,o.refreshTextElement())}return i}function R(e,t,i,n){var o=[],a=A.Point.findAngle(t[0],t[1]),r=K(e,a);return!n.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?r.content=e.notes:r.content=i.calculatePerimeter(e),!0===e.enableShapeLabel&&(r.style.strokeColor=e.labelBorderColor,r.style.fill=e.labelFillColor,r.style.fontSize=e.fontSize,r.style.color=e.fontColor,r.style.fontFamily=e.fontFamily),r.rotateValue={y:-10,angle:a},o.push(r),o}function T(e,A,i){for(var n,o=0;o<e.wrapper.children.length;o++){var a=e.wrapper.children[parseInt(o.toString(),10)];a&&!(0,t.isNullOrUndefined)(a.content)&&(n=i.calculatePerimeter(e),a.content=n,a.childNodes[0].text=a.content,a.refreshTextElement())}return n}function H(e){for(var A=0;A<e.wrapper.children.length;A++){var i=e.wrapper.children[parseInt(A.toString(),10)];i&&!(0,t.isNullOrUndefined)(i.content)&&e.wrapper.children.splice(A,1)}}function P(e){if(e.wrapper&&e.wrapper.children)for(var A=0;A<e.wrapper.children.length;A++){var i=e.wrapper.children[parseInt(A.toString(),10)];i&&!(0,t.isNullOrUndefined)(i.content)&&(i.content=e.notes,i.childNodes[0].text=i.content,i.refreshTextElement())}}function N(e){var t,A,i="";for(i="M"+e[0].x+" "+e[0].y,A=1;A<e.length;A++)i+="L"+(t=e[parseInt(A.toString(),10)]).x+" "+t.y;return i+="Z"}function K(e,t){var i=new A.TextElement;return c(e,i),i.style.fill="transparent",i.id=(0,A.randomId)(),i.horizontalAlignment="Center",i.rotateValue={y:10,angle:t},i.verticalAlignment="Top",i.relativeMode="Object",i.setOffsetWithRespectToBounds(.5,.5,"Absolute"),i.offsetX,i.style.textWrapping="NoWrap",i}function J(e,t){var A=[],i=L(e,t[0],t[1]);return A.push(i),i=L(e,t[1],t[0],!0),A.push(i),A}function L(e,t,i,n){var o=new A.PathElement;o.offsetX=t.x,o.offsetY=t.y;var a=A.Point.findAngle(t,i),r={x:(t.x+i.x)/2,y:(t.y+i.y)/2},s=(0,A.identityMatrix)();(0,A.rotateMatrix)(s,0-a,r.x,r.y);var g=(0,A.transformPointByMatrix)(s,t),l={x:g.x,y:g.y-e.leaderHeight};s=(0,A.identityMatrix)(),(0,A.rotateMatrix)(s,a,o.offsetX,o.offsetY),g=(0,A.transformPointByMatrix)(s,l);var h={x:t.x,y:t.y};o.offsetX=h.x,o.offsetY=h.y,o.transform=A.RotateTransform.Self;var B="M"+t.x+","+t.y+",L"+g.x+","+g.y+"Z",d=new A.Size(0,e.leaderHeight);return o.pivot.x=.5,n?(o.id="leader2_"+(0,A.randomId)(),o.pivot.y=0):(o.id="leader1_"+(0,A.randomId)(),o.pivot.y=1),c(e,o),o.rotateAngle=a,o.data=B,o.canMeasurePath=!0,o.width=d.width,o.height=d.height,o}function O(e,i){var n=e.vertexPoints;if(!(0,t.isNullOrUndefined)(n))for(var o=0;o<n.length-1;o++){var a=n[parseInt(o.toString(),10)],r=n[o+1],s=A.Rect.toBounds([a,r]);if(s.Inflate(10),s.containsPoint(i)){var g=_(i,a,r),l={x1:a.x,x2:r.x,y1:a.y,y2:r.y},h={x1:i.x,x2:g.x,y1:i.y,y2:g.y},B=(0,A.intersect3)(l,h);if(B.enabled){var d=A.Point.findLength(i,B.intersectPt);if(Math.abs(d)<10)return!0}else{var c=A.Rect.toBounds([i,i]);if(c.Inflate(3),c.containsPoint(a)||c.containsPoint(r))return!0}if(A.Point.equals(i,g))return!0}}return!1}function _(e,t,i){var n;n=A.Point.findLength(t,e)>A.Point.findLength(i,e)?i:t;var o=A.Point.findAngle(t,i),a=A.Point.findAngle(n,e),r=A.Point.findLength(n,e),s=a+2*(o-a);return{x:n.x+r*Math.cos(s*Math.PI/180),y:n.y+r*Math.sin(s*Math.PI/180)}}function j(e){return X[""+e]}var X={OpenArrow:"M15.9,23 L5,16 L15.9,9 L17,10.7 L8.7,16 L17,21.3Z",Square:"M0,0 L10,0 L10,10 L0,10 z",Fletch:"M14.8,10c0,0-3.5,6,0.2,12c0,0-2.5-6-10.9-6C4.1,16,11.3,16,14.8,10z",OpenFetch:"M6,17c-0.6,0-1-0.4-1-1s0.4-1,1-1c10.9,0,11-5,11-5c0-0.6,0.4-1,1-1s1,0.4,1,1C19,10.3,18.9,17,6,17C6,17,6,17,6,17z M18,23c-0.5,0-1-0.4-1-1c0-0.2-0.3-5-11-5c-0.6,0-1-0.5-1-1s0.4-1,1-1c0,0,0,0,0,0c12.9,0,13,6.7,13,7 C19,22.6,18.6,23,18,23z",IndentedArrow:"M17,10c0,0-4.5,5.5,0,12L5,16L17,10z",OutdentedArrow:"M14.6,10c0,0,5.4,6,0,12L5,16L14.6,10z",DoubleArrow:"M19,10 L19,22 L13,16Z M12,10 L12,22 L6,16Z",Arrow:"M15,10 L15,22 L5,16Z",Diamond:"M12,23l-7-7l7-7l6.9,7L12,23z",Circle:"M0,50 A50,50,0 1 1 100,50 A50,50,0 1 1 0,50 Z",Butt:"M0,0 L0,90"},Z=function(){var e=function(t,A){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var A in t)t.hasOwnProperty(A)&&(e[A]=t[A])},e(t,A)};return function(t,A){function i(){this.constructor=t}e(t,A),t.prototype=null===A?Object.create(A):(i.prototype=A.prototype,new i)}}(),W=function(e){function A(t){var A=e.call(this)||this;return A.templateFn=A.templateCompiler(t),A}return Z(A,e),A.prototype.templateCompiler=function(e){if(e)try{return"function"!=typeof e&&document.querySelectorAll(e).length?(0,t.compile)(document.querySelector(e).innerHTML.trim()):(0,t.compile)(e)}catch(A){return(0,t.compile)(e)}},A.prototype.getNodeTemplate=function(){return this.templateFn},A}(A.DrawingElement),z=function(){function e(e){this.isDynamicStamps=!1,this.isDragAnnotation=!1,this.copiedElementID="",this.isPasted=!1,this.isLineInHorizontalBounds=!0,this.isLineInVerticalBounds=!0,this.pdfViewer=e,this.renderer=new A.DrawingRenderer("this.pdfViewer.element.id",!1),this.svgRenderer=new A.SvgRenderer}return e.prototype.renderLabels=function(e){var t=e.annotations;if(t)for(var A=0;A<t.length;A++){var i=t[parseInt(A.toString(),10)];this.initObject(i)}},e.prototype.createNewZindexTable=function(e){var t=new g;return this.pdfViewer.zIndex++,t.pageId=this.pdfViewer.zIndex,this.pdfViewer.zIndexTable.push(t),t},e.prototype.getPageTable=function(e){var t;if(void 0!==this.pdfViewer.zIndexTable.length){for(var A=!0,i=0;i<this.pdfViewer.zIndexTable.length;i++)if(this.pdfViewer.zIndexTable[parseInt(i.toString(),10)].pageId===e){A=!1,t=this.pdfViewer.zIndexTable[parseInt(i.toString(),10)];break}A&&((t=this.createNewZindexTable(e)).pageId=e)}else t=this.createNewZindexTable(e);return t},e.prototype.setZIndex=function(e,t){if(void 0!==t.pageIndex){var A=this.getPageTable(t.pageIndex),i=!1;if("Polygon"!==t.shapeAnnotationType)for(var n=0;n<A.objects.length;n++)if(t.id===A.objects[parseInt(n.toString(),10)].id){A.objects.splice(parseInt(n.toString(),10),1),A.objects.splice(parseInt(n.toString(),10),0,t),i=!0;break}if(!i)if(-1===t.zIndex)A.zIndex++,t.zIndex=A.zIndex,A.objects.push(t);else{var o=A.objects.length;t.zIndex=o++,A.objects.push(t)}}},e.prototype.initObject=function(e){return this.setZIndex(this.pdfViewer.zIndex,e),(0,A.createMeasureElements)(),d(e)?(this.initLine(e),e.wrapper.children[1]instanceof A.TextElement&&(e.wrapper.children[1].isEJ2=!0,"FreeText"===e.shapeAnnotationType&&(e.wrapper.children[1].isFreeText=!0)),e.wrapper.measure(new A.Size(void 0,void 0)),e.wrapper.arrange(e.wrapper.desiredSize)):this.initNode(e),e.wrapper,this.pdfViewer.nameTable[e.id]=e,"Stamp"!==e.shapeAnnotationType||"Existing Annotation"!==e.annotationAddMode&&"Imported Annotation"!==e.annotationAddMode||"diagram_helper"===e.id||this.isPasted||(0,t.isNullOrUndefined)(this.pdfViewer.annotationModule)||this.pdfViewer.annotationModule.isUndoRedoAction||this.nodePropertyChange(e,{bounds:{width:e.bounds.width,height:e.bounds.height}}),e},e.prototype.initNode=function(e){if(!(0,t.isNullOrUndefined)(this.pdfViewer.annotationModule)&&this.pdfViewer.annotationModule.isUndoRedoAction&&"Stamp"===e.shapeAnnotationType){var i=e.id,n=this.pdfViewer.nameTable[""+i].wrapper.children;this.stampPreviousSize=JSON.parse(JSON.stringify(n)),this.stampPreviousWidth=(0,t.isNullOrUndefined)(e.wrapper.actualSize)||(0,t.isNullOrUndefined)(e.wrapper.actualSize.width)?null:e.wrapper.actualSize.width,this.stampPerviousHeight=(0,t.isNullOrUndefined)(e.wrapper.actualSize)||(0,t.isNullOrUndefined)(e.wrapper.actualSize.height)?null:e.wrapper.actualSize.height}this.isPasted&&"Stamp"===e.shapeAnnotationType&&(this.stampOriginalWidth=(0,t.isNullOrUndefined)(e.wrapper.actualSize)||(0,t.isNullOrUndefined)(e.wrapper.actualSize.width)?null:e.wrapper.actualSize.width,this.stampOriginalHeight=(0,t.isNullOrUndefined)(e.wrapper.actualSize)||(0,t.isNullOrUndefined)(e.wrapper.actualSize.height)?null:e.wrapper.actualSize.height);var o,a=this.initContainer(e);a.children||(a.children=[]),o||(o=this.init(e,a)),a.rotateAngle=e.rotateAngle,e.wrapper.children[1]instanceof A.TextElement&&(e.wrapper.children[1].isEJ2=!0,"FreeText"===e.shapeAnnotationType&&(e.wrapper.children[1].isFreeText=!0)),!(0,t.isNullOrUndefined)(e)&&"Stamp"===e.shapeAnnotationType&&!(0,t.isNullOrUndefined)(e.wrapper.children[2])&&e.wrapper.children[2]&&e.wrapper.children[2]instanceof A.TextElement&&(e.wrapper.children[2].isEJ2=!0),a.measure(new A.Size(e.wrapper.width,e.wrapper.height)),a.arrange(a.desiredSize),this.isDynamicStamps&&(this.pdfViewer.annotation.stampAnnotationModule.updateSessionStorage(e,null,"dynamicStamp"),this.isDynamicStamps=!1),e.wrapper instanceof A.DrawingElement&&"Stamp"===e.shapeAnnotationType&&(e.bounds.width=e.wrapper.bounds.width,e.bounds.height=e.wrapper.bounds.height,e.bounds.x=e.wrapper.bounds.x,e.bounds.y=e.wrapper.bounds.y)},e.prototype.init=function(e,t){var i;i=new A.DrawingElement;var n=this.pdfViewer.annotationModule?this.pdfViewer.annotationModule.findAnnotationSettings(e):{},o=0,a=0,r=0,s=0;(n.minWidth||n.maxWidth||n.minHeight||n.maxHeight)&&(o=n.maxHeight?n.maxHeight:2e3,a=n.maxWidth?n.maxWidth:2e3,r=n.minHeight?n.minHeight:0,s=n.minWidth?n.minWidth:0);var g=!1;return(r||s||o||a)&&(g=!0),(i=e.formFieldAnnotationType?this.initFormFields(e,i,t):this.initAnnotationObject(e,void 0,i,t,!1,void 0,g,o,a,s,r)).id=e.id+"_content",i.relativeMode="Object","Stamp"!==e.shapeAnnotationType&&(void 0!==e.bounds.width&&(i.width=e.bounds.width,g&&(i.width<s||i.width>a)&&(i.width<s&&(i.width=s),i.width>a&&(i.width=a))),i.horizontalAlignment="Stretch",void 0!==e.bounds.height&&(i.height=e.bounds.height,g&&(i.height<r||i.width>o)&&(i.height<r&&(i.height=r),i.height>o&&(i.height=o))),c(e,i),this.pdfViewer.viewerBase.drawSignatureWithTool&&"SignatureText"===e.shapeAnnotationType&&(i.style.strokeWidth=0)),i.isRectElement=!0,i.verticalAlignment="Stretch",i},e.prototype.initFormFields=function(e,t,A){switch(e.formFieldAnnotationType){case"Textbox":case"PasswordField":case"Checkbox":case"RadioButton":case"DropdownList":case"ListBox":case"SignatureField":case"InitialField":(t=new W).id=e.id+"_content",A.children.push(t)}return t},e.prototype.initAnnotationObject=function(e,i,n,o,a,r,s,g,l,h,B){switch(e.shapeAnnotationType){case"Ellipse":if((i=new A.PathElement).data="M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",n=i,o.children.push(n),e.enableShapeLabel)(Y=this.textElement(e)).content=e.labelContent,Y.style.color=e.fontColor,Y.style.strokeColor=e.labelBorderColor,Y.style.fill=e.labelFillColor,Y.style.fontSize=e.fontSize,Y.style.fontFamily=e.fontFamily,Y.style.opacity=e.labelOpacity,o.children.push(Y);break;case"Path":(i=new A.PathElement).data=e.data,n=i,o.children.push(n);break;case"HandWrittenSignature":case"Ink":(i=new A.PathElement).data=e.data,i.style.strokeColor=e.strokeColor,i.style.strokeWidth=e.thickness,i.style.opacity=e.opacity,n=i,o.children.push(n);break;case"Polygon":(i=new A.PathElement).data=N(e.vertexPoints),n=i,o.children.push(n);break;case"Stamp":a=!0,this.isDynamicStamps=!0;var d=void 0;if(this.isPasted){var p=this.pdfViewer.clipboardData.clipObject[0].id;d=this.pdfViewer.nameTable[""+p]}if(e.isDynamicStamp){if(o.horizontalAlignment="Left",(n=r=new A.DrawingElement).cornerRadius=10,n.style.fill=e.stampFillColor,n.style.strokeColor=e.stampStrokeColor,o.children.push(n),(U=new A.TextElement).style.fontFamily="Helvetica",U.style.fontSize=14,U.style.italic=!0,U.style.bold=!0,U.style.color=e.fillColor,U.rotateValue=void 0,U.content=e.dynamicText,U.style.textAlign="Left",U.relativeMode="Point",U.margin.left=5,U.margin.bottom=3,U.setOffsetWithRespectToBounds(0,.75,null),s){var w=.02*(Q=e.bounds.width),C=Math.max(0,Q-2*w);U.style.fontSize=this.fontSizeCalculation(e,U,C,U.content)}if("Existing Annotation"===e.annotationAddMode||"Imported Annotation"===e.annotationAddMode){var Q=e.bounds.width,E=e.bounds.height;w=.02*Q,C=Math.max(0,Q-2*w);U.style.fontSize=this.fontSizeCalculation(e,U,C,U.content);var f=(.25*E-(b=this.measureTextMetrics(e,U.content,U.style.fontSize,U.style.fontFamily)).height)/8;U.margin.bottom=Math.max(0,f),U.margin.bottom<1&&(U.margin.bottom=5),U.margin.left=(Q-b.width)/2}if(this.isPasted&&(U.style.fontSize=d.wrapper.children[1].style.fontSize,U.margin.left=d.wrapper.children[1].margin.left),!(0,t.isNullOrUndefined)(this.pdfViewer.annotationModule)&&this.pdfViewer.annotationModule.isUndoRedoAction&&(U.style.fontSize=this.stampPreviousSize[1].style.fontSize),"diagram_helper"!==e.id&&o.children.push(U),(M=new A.TextElement).style.fontFamily="Helvetica",M.style.fontSize=e.fontSize,M.style.italic=!0,M.style.bold=!0,M.style.color=e.fillColor,M.rotateValue=void 0,M.content=e.icon.toUpperCase(),M.style.textAlign="Left",M.relativeMode="Point",M.margin.left=5,M.margin.top=4,M.setOffsetWithRespectToBounds(0,.1,null),s){var I=Q=e.bounds.width;"REVISED"===M.content||"REVIEWED"===M.content||"RECEIVED"===M.content||"APPROVED"===M.content?I/=2:"CONFIDENTIAL"!==M.content&&"NOT APPROVED"!==M.content||(I*=3/4);w=.02*I,C=Math.max(0,I-2*w);M.style.fontSize=this.fontSizeCalculation(e,M,C,M.content)}if("Existing Annotation"===e.annotationAddMode||"Imported Annotation"===e.annotationAddMode){Q=e.bounds.width,E=e.bounds.height,I=Q;"REVISED"===M.content||"REVIEWED"===M.content||"RECEIVED"===M.content||"APPROVED"===M.content?I/=2:"CONFIDENTIAL"!==M.content&&"NOT APPROVED"!==M.content||(I*=3/4);w=.02*I,C=Math.max(0,I-2*w);M.style.fontSize=this.fontSizeCalculation(e,M,C,M.content);var m=(.75*E-(b=this.measureTextMetrics(e,M.content,M.style.fontSize,M.style.fontFamily)).height)/10;M.margin.top=Math.max(0,m),"CONFIDENTIAL"===M.content||"NOT APPROVED"===M.content?M.margin.left=(Q-b.width*(4/3))/2:M.margin.left=(Q-2*b.width)/2}this.isPasted?(M.style.fontSize=d.wrapper.children[2].style.fontSize,M.margin.left=d.wrapper.children[2].margin.left,M.margin.top=d.wrapper.children[2].margin.top,n.width=this.stampOriginalWidth,n.height=this.stampOriginalHeight):!(0,t.isNullOrUndefined)(this.pdfViewer.annotationModule)&&this.pdfViewer.annotationModule.isUndoRedoAction?(M.style.fontSize=this.stampPreviousSize[2].style.fontSize,n.width=this.stampPreviousWidth,n.height=this.stampPerviousHeight):(n.width=e.bounds.width,n.height=e.bounds.height),n.style.opacity=e.opacity,M.id=(0,A.randomId)()+"_stamp","diagram_helper"!==e.id&&o.children.push(M)}else if(o.horizontalAlignment="Left",(n=r=new A.DrawingElement).cornerRadius=10,n.style.fill=e.stampFillColor,n.style.strokeColor=e.stampStrokeColor,o.children.push(n),"Accepted"===e.icon||"Rejected"===e.icon){n.style.fill="transparent",n.style.strokeColor="transparent";var D=new A.PathElement;D.id=(0,A.randomId)()+"_stamp",D.data=e.data,D.width=e.bounds.width,s&&e.bounds.width>l&&(D.width=l,e.bounds.width=l),D.height=e.bounds.height,s&&e.bounds.height>g&&(D.height=g,e.bounds.height=g);var y=D;D.style.fill=e.fillColor,D.style.strokeColor=e.strokeColor,D.style.opacity=e.opacity,n.width=e.bounds.width,n.height=e.bounds.height,n.style.opacity=e.opacity,o.children.push(y)}else{var M;if((M=new A.TextElement).style.fontFamily="Helvetica",M.style.fontSize=e.fontSize,M.style.italic=!0,M.style.bold=!0,M.style.color=e.fillColor,M.rotateValue=void 0,M.style.textAlign="Left",M.content=e.icon.toUpperCase(),M.relativeMode="Point",M.setOffsetWithRespectToBounds(0,.1,null),s){var S=.05*(Q=e.bounds.width),F=Math.max(0,Q-2*S);M.style.fontSize=this.fontSizeCalculation(e,M,F,M.content)}var b=this.measureTextMetrics(e,M.content,M.style.fontSize,M.style.fontFamily);if(M.margin.top=5,M.margin.left=(e.bounds.width-b.width)/2,"Existing Annotation"===e.annotationAddMode||"Imported Annotation"===e.annotationAddMode){Q=e.bounds.width,E=e.bounds.height,S=.05*Q;var k=Math.max(0,Q-2*S);M.style.fontSize=this.fontSizeCalculation(e,M,k,M.content);var G=this.measureTextMetrics(e,M.content,M.style.fontSize,M.style.fontFamily),v=(Q-G.width)/2;M.margin.left=Math.max(0,v),M.margin.top=(E-G.height)/2}this.isPasted?(M.style.fontSize=d.wrapper.children[1].style.fontSize,M.margin.left=d.wrapper.children[1].margin.left,M.margin.top=d.wrapper.children[1].margin.top,M.margin.bottom=d.wrapper.children[1].margin.bottom,n.width=this.stampOriginalWidth,n.height=this.stampOriginalHeight):!(0,t.isNullOrUndefined)(this.pdfViewer.annotationModule)&&this.pdfViewer.annotationModule.isUndoRedoAction?(M.style.fontSize=this.stampPreviousSize[1].style.fontSize,M.margin.top=this.stampPreviousSize[1].margin.top-.5*this.stampPreviousSize[1].margin.top,M.margin.left=this.stampPreviousSize[1].margin.left,n.width=this.stampPreviousWidth,n.height=this.stampPerviousHeight):(n.width=e.bounds.width,n.height=e.bounds.height),n.style.opacity=e.opacity,M.id=(0,A.randomId)()+"_stamp","diagram_helper"!==e.id&&o.children.push(M)}break;case"Image":case"SignatureImage":var x=new A.ImageElement;x.source=e.data,(n=x).style.strokeWidth=0,o.children.push(n);break;case"Rectangle":case"Redaction":var Y;if(n=r=new A.DrawingElement,o.children.push(n),e.enableShapeLabel)(Y=this.textElement(e)).content=e.labelContent,Y.style.color=e.fontColor,Y.style.strokeColor=e.labelBorderColor,Y.style.fill=e.labelFillColor,Y.style.fontSize=e.fontSize,Y.style.fontFamily=e.fontFamily,Y.style.opacity=e.labelOpacity,o.children.push(Y);break;case"Perimeter":(i=new A.PathElement).data="M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",n=i,c(e,i),o.children.push(n),(r=new A.DrawingElement).id="perimeter_"+(0,A.randomId)(),r.height=.2,r.width=.2,r.transform=A.RotateTransform.Self,r.horizontalAlignment="Stretch",this.setNodePosition(r,e),r.rotateAngle=e.rotateAngle,c(e,r),o.children.push(r);var U=this.textElement(e);(U=new A.TextElement).content=U.content=u([{x:e.bounds.x,y:e.bounds.y},{x:e.bounds.x+e.bounds.width,y:e.bounds.y+e.bounds.height}]).toString(),U.rotateValue={y:-10,angle:e.rotateAngle},o.children.push(U);break;case"Radius":(i=new A.PathElement).data="M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",n=i,c(e,i),o.children.push(n),(r=new A.DrawingElement).id="radius_"+(0,A.randomId)(),r.height=.2,r.width=e.bounds.width/2,r.transform=A.RotateTransform.Self,this.setNodePosition(r,e),r.rotateAngle=e.rotateAngle,c(e,r),o.children.push(r);var V=this.textElement(e);e.enableShapeLabel&&(V.style.color=e.fontColor,V.style.strokeColor=e.labelBorderColor,V.style.fill=e.labelFillColor,V.style.fontSize=e.fontSize,V.style.fontFamily=e.fontFamily,V.style.opacity=e.labelOpacity);u([{x:e.bounds.x,y:e.bounds.y},{x:e.bounds.x+e.bounds.width,y:e.bounds.y+e.bounds.height}]);!this.pdfViewer.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?V.content=e.notes:V.content=this.pdfViewer.annotation.measureAnnotationModule.setConversion(e.bounds.width/2*this.pdfViewer.annotation.measureAnnotationModule.pixelToPointFactor,e),V.rotateValue={y:-10,x:e.bounds.width/4,angle:e.rotateAngle},o.children.push(V);break;case"StickyNotes":var R=new A.ImageElement;R.source=e.data,R.width=e.bounds.width,R.height=e.bounds.height,R.style.strokeColor=e.strokeColor,R.style.strokeWidth=0,n=R,o.children.push(n);break;case"SignatureText":var T=new A.DrawingElement;T.style.strokeWidth=0,(n=T).style.strokeWidth=0,o.style.strokeWidth=0,o.children.push(n);var H=this.textElement(e);H.style.fontFamily=e.fontFamily,H.style.fontSize=e.fontSize,H.style.textAlign="Left",H.rotateValue=void 0,H.content=e.data,H.style.strokeWidth=0,o.children.push(H);break;case"FreeText":n=new A.DrawingElement,o.children.push(n);var P=this.textElement(e);(P=new A.TextElement).style.fontFamily=e.fontFamily,P.style.fontSize=e.fontSize,P.style.textAlign="Left","center"===e.textAlign.toLowerCase()?P.style.textAlign="Center":"right"===e.textAlign.toLowerCase()?P.style.textAlign="Right":"justify"===e.textAlign.toLowerCase()&&(P.style.textAlign="Justify"),P.style.color=e.fontColor,P.style.bold=e.font.isBold,P.style.italic=e.font.isItalic,void 0!==e.font.isUnderline&&(!0===e.font.isUnderline?e.font.isStrikeout?P.style.textDecoration="Underline LineThrough":P.style.textDecoration="Underline":e.font.isStrikeout&&("Underline LineThrough"===P.style.textDecoration?P.style.textDecoration="LineThrough":P.style.textDecoration="None")),void 0!==e.font.isStrikeout&&(!0===e.font.isStrikeout?e.font.isUnderline?P.style.textDecoration="Underline LineThrough":P.style.textDecoration="LineThrough":e.font.isUnderline||("Underline LineThrough"===P.style.textDecoration?P.style.textDecoration="Underline":P.style.textDecoration="None")),P.rotateValue=void 0,P.content=e.dynamicText,P.style.opacity=e.opacity,P.style.strokeWidth=e.thickness,e.isSignatureText?(P.margin.left=4,P.margin.right=5,P.margin.top=e.fontSize/16*5):(P.margin.left=0,P.margin.right=0,P.margin.top=0),this.isPasted=!1,this.pdfViewer.freeTextSettings.enableAutoFit?P.style.textWrapping="Wrap":P.style.textWrapping="WrapWithOverflow",P.relativeMode="Point",P.setOffsetWithRespectToBounds(0,0,null),P.relativeMode="Point",o.children.push(P)}return n.id=e.id+"_content",n.relativeMode="Object",a||(void 0!==e.bounds.width&&(n.width=e.bounds.width,s&&(n.width<h||n.width>l)&&(n.width<h&&(n.width=h),n.width>l&&(n.width=l))),n.horizontalAlignment="Stretch",void 0!==e.bounds.height&&(n.height=e.bounds.height,s&&(n.height<B||n.width>g)&&(n.height<B&&(n.height=B),n.height>g&&(n.height=g))),c(e,n)),n.isRectElement=!0,n.verticalAlignment="Stretch",n},e.prototype.textElement=function(e){var t=new A.TextElement;return c(e,t),t.horizontalAlignment="Center",t.verticalAlignment="SignatureText"===e.shapeAnnotationType?"Center":"Top",t.relativeMode="Object",t.setOffsetWithRespectToBounds(.5,.5,"Absolute"),t},e.prototype.setNodePosition=function(e,t){if("Perimeter"===t.shapeAnnotationType)e.offsetX=t.bounds.x+t.bounds.width/2,e.offsetY=t.bounds.y+t.bounds.height/2;else if("Radius"===t.shapeAnnotationType){var i={x:t.bounds.x+t.bounds.width/2+t.bounds.width/4,y:t.bounds.y+t.bounds.height/2},n={x:t.bounds.x+t.bounds.width/2,y:t.bounds.y+t.bounds.height/2},o=(0,A.identityMatrix)();(0,A.rotateMatrix)(o,t.rotateAngle,n.x,n.y);var a=(0,A.transformPointByMatrix)(o,i),r={x:a.x,y:a.y};e.offsetX=r.x,e.offsetY=r.y,e.width=t.bounds.width/2}},e.prototype.initContainer=function(e){e.id||(e.id=(0,A.randomId)());var t=new A.Canvas;return t.id=e.id,t.offsetX=e.bounds.x+.5*e.bounds.width,t.offsetY=e.bounds.y+.5*e.bounds.height,t.style.fill="transparent",t.style.strokeColor="transparent",t.rotateAngle=e.rotateAngle,e.wrapper=t,t},e.prototype.initLine=function(e){e.id||(e.id=(0,A.randomId)());var t=new A.Canvas,i=new A.PathElement;i.id=e.id+"_path";var n=new A.PathElement,o=new A.PathElement;if(e.vertexPoints.length){e.sourcePoint=e.vertexPoints[0],e.targetPoint=e.vertexPoints[e.vertexPoints.length-1];for(var a=0;a<e.vertexPoints.length;a++)0!==a&&a!==e.vertexPoints.length-1&&e.segments.push(e.vertexPoints[parseInt(a.toString(),10)])}i=b(e,i);var r=[];r=M(e);var s=[],g=[];if("Distance"===e.shapeAnnotationType&&(s=J(e,r),g=Y(e,r,this.pdfViewer.annotation.measureAnnotationModule,this.pdfViewer)),"Line"!==e.shapeAnnotationType&&"LineWidthArrowHead"!==e.shapeAnnotationType||"Perimeter"!==e.measureType||(g=R(e,r,this.pdfViewer.annotation.measureAnnotationModule,this.pdfViewer)),!0===e.enableShapeLabel&&"Distance"!==e.shapeAnnotationType&&"Perimeter"!==e.measureType){var l=A.Point.findAngle(r[0],r[1]),h=this.textElement(e);h.id=(0,A.randomId)(),!this.pdfViewer.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?h.content=e.notes:h.content=e.labelContent,h.style.strok