UNPKG

@syncfusion/ej2-pdfviewer

Version:
10 lines 8.16 MB
/*! * filename: ej2-pdfviewer.min.js * version : 32.2.7 * 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,o,n,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=n},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=o}},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:()=>Od,ActiveElements:()=>ue,AjaxHandler:()=>nB,AjaxRequestSettings:()=>bB,AllowedInteraction:()=>Ye,AnnotBounds:()=>$w,AnnotBoundsBase:()=>gA,AnnotBoundsRect:()=>sA,AnnotColor:()=>eC,AnnotFontBase:()=>hA,AnnotPoint:()=>qw,AnnotRectBase:()=>lA,Annotation:()=>aA,AnnotationBaseSettings:()=>rA,AnnotationDataFormat:()=>xe,AnnotationDrawingOptions:()=>LB,AnnotationRenderer:()=>Hw,AnnotationResizerLocation:()=>Me,AnnotationSelectorSettings:()=>gd,AnnotationSettings:()=>dd,AnnotationToolbar:()=>CB,AnnotationToolbarSettings:()=>GB,Annotations:()=>Tw,AnnotationsBase:()=>cA,AnnotationsInternal:()=>dA,AreaSettings:()=>Ad,ArrowSettings:()=>OB,BlazorUiAdaptor:()=>Xh,BookmarkBase:()=>nC,BookmarkDestination:()=>aC,BookmarkStyles:()=>rC,BookmarkView:()=>Ud,CalculateLeaderPoints:()=>de,CheckBoxFieldSettings:()=>md,CircleSettings:()=>ZB,CommandManager:()=>kd,CommentStatus:()=>Ie,ConnectTool:()=>oe,ContextMenu:()=>oB,ContextMenuItem:()=>De,ContextMenuSettings:()=>Ed,CursorType:()=>be,CustomStamp:()=>kB,CustomStampSettings:()=>$B,CustomToolbarItem:()=>SB,DisplayMode:()=>Se,DistanceSettings:()=>ed,DocumentTextCollectionSettings:()=>cd,Drawing:()=>z,DropdownFieldSettings:()=>yd,DynamicStampItem:()=>ke,ExtractTextOption:()=>Fe,FontBase:()=>tC,FontStyle:()=>me,FormDesigner:()=>Ld,FormDesignerToolbar:()=>BB,FormDesignerToolbarSettings:()=>vB,FormField:()=>ud,FormFieldDataFormat:()=>Ue,FormFields:()=>Jd,FormFieldsBase:()=>EB,FreeTextAnnotation:()=>tA,FreeTextAnnotationBase:()=>Nw,FreeTextSettings:()=>sd,HandWrittenSignatureSettings:()=>Bd,HighlightSettings:()=>KB,IBounds:()=>BA,ImageStructureBase:()=>sC,InitialFieldSettings:()=>UB,InkAnnotation:()=>MA,InkAnnotationSettings:()=>nd,InkDrawingTool:()=>ie,InkSignatureAnnotation:()=>Kw,InputElement:()=>AA,Item:()=>Fd,KeyGesture:()=>Sd,KeyboardCommand:()=>bd,LineSettings:()=>JB,LineTool:()=>se,LinkAnnotation:()=>CA,ListBoxFieldSettings:()=>Md,Magnification:()=>sB,MeasureAnnotation:()=>fA,MeasureShapeAnnotationBase:()=>Ow,MeasurementScaleRatio:()=>EA,MeasurementSettings:()=>rd,ModifierKeys:()=>Ve,MoveTool:()=>te,Navigation:()=>gB,NavigationPane:()=>zl,NodeDrawingTool:()=>ae,OrganizeDetails:()=>dE,PageInfo:()=>hd,PageOrganizer:()=>hE,PageOrganizerSettings:()=>Gd,PageRenderer:()=>Xd,PageRotation:()=>BE,PasswordFieldSettings:()=>Id,Path:()=>AC,PdfAnnotationBase:()=>r,PdfAnnotationSettings:()=>_B,PdfBounds:()=>n,PdfFont:()=>a,PdfFormFieldBase:()=>s,PdfKeys:()=>Re,PdfLayer:()=>zw,PdfPageRotateAngle:()=>lE,PdfRenderedFields:()=>fB,PdfRenderer:()=>xw,PdfViewer:()=>Yd,PdfViewerBase:()=>AB,PdfiumRunner:()=>_d,PerimeterSettings:()=>td,PointBase:()=>Pw,PolygonDrawingTool:()=>re,PolygonSettings:()=>zB,PopupAnnotationBase:()=>Zw,Print:()=>Nd,RadioButtonFieldSettings:()=>Dd,RadiusSettings:()=>id,RectBounds:()=>jd,RectangleBase:()=>iC,RectangleBounds:()=>wd,RectangleSettings:()=>jB,RedactionAnnotationBase:()=>Lw,RedactionSettings:()=>XB,RedactionToolbarSettings:()=>YB,ResizeTool:()=>ne,RotateTool:()=>ge,ScrollSettings:()=>Qd,SearchResult:()=>vd,SelectTool:()=>ee,Selector:()=>B,ServerActionSettings:()=>TB,ShapeAnnotation:()=>IA,ShapeAnnotationBase:()=>Jw,ShapeLabelSettings:()=>WB,SignStampItem:()=>Ge,Signature:()=>rB,SignatureAnnotationBase:()=>jw,SignatureBase:()=>oC,SignatureDialogSettings:()=>RB,SignatureFieldSettings:()=>xB,SignatureIndicatorSettings:()=>VB,SignatureType:()=>ye,SizeBase:()=>Rw,Spinner:()=>Sh,SquigglySettings:()=>PB,StampAnnotation:()=>mA,StampAnnotationBase:()=>Zd,StampSettings:()=>qB,StampTool:()=>Ae,StandardBusinessStampItem:()=>ve,StickyNotesAnnotation:()=>yA,StickyNotesSettings:()=>ad,StrikethroughSettings:()=>HB,TextDataSettings:()=>pd,TextFieldSettings:()=>fd,TextLayer:()=>iB,TextMarkupAnnotation:()=>QA,TextMarkupAnnotationBase:()=>Ww,TextSearch:()=>Hd,TextSearchColorSettings:()=>ld,TextSelection:()=>Vd,ThumbnailView:()=>lB,TileRenderingSettings:()=>Cd,ToolBase:()=>$,Toolbar:()=>wB,ToolbarSettings:()=>FB,UnderlineSettings:()=>NB,VolumeSettings:()=>od,ZOrderPageTable:()=>g,clipDecorator:()=>Y,clipDecorators:()=>v,cloneArray:()=>m,cloneObject:()=>I,createSpinner:()=>bh,createSvg:()=>fe,findActiveElement:()=>le,findActivePage:()=>Qe,findElementUnderMouse:()=>ce,findNearestPoint:()=>j,findObjectUnderMouse:()=>Be,findObjects:()=>Ce,findObjectsUnderMouse:()=>he,findPerimeterLength:()=>u,findPointsLength:()=>Q,findTargetShapeElement:()=>we,getArialFontData:()=>QB,getBaseShapeAttributes:()=>E,getConnectorPoints:()=>M,getDecoratorElement:()=>G,getDecoratorShape:()=>_,getFunction:()=>f,getInternalProperties:()=>D,getPolygonPath:()=>N,getSegmentElement:()=>b,getSegmentPath:()=>F,hideSpinner:()=>Lh,initDistanceLabel:()=>x,initLeader:()=>L,initLeaders:()=>J,initPerimeterLabel:()=>R,insertObject:()=>pe,isLeader:()=>y,isLineShapes:()=>d,isPointOverConnector:()=>O,removePerimeterLabel:()=>H,renderAdornerLayer:()=>Ee,setElementStype:()=>c,setSpinner:()=>Oh,showSpinner:()=>Kh,textElement:()=>K,updateCalibrateLabel:()=>P,updateColorWithOpacity:()=>p,updateDecoratorElement:()=>k,updateDistanceLabel:()=>U,updatePerimeterLabel:()=>T,updateRadiusLabel:()=>V,updateSegmentElement:()=>S});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)}),o=function(e,t,A,i){var o,n=arguments.length,a=n<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--)(o=e[r])&&(a=(n<3?o(a):n>3?o(t,A,a):o(t,A))||a);return n>3&&a&&Object.defineProperty(t,A,a),a},n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),o([(0,t.Property)(0)],n.prototype,"x",void 0),o([(0,t.Property)(0)],n.prototype,"y",void 0),o([(0,t.Property)(0)],n.prototype,"width",void 0),o([(0,t.Property)(0)],n.prototype,"height",void 0),o([(0,t.Property)(0)],n.prototype,"left",void 0),o([(0,t.Property)(0)],n.prototype,"top",void 0),o([(0,t.Property)(0)],n.prototype,"right",void 0),o([(0,t.Property)(0)],n.prototype,"bottom",void 0),o([(0,t.Complex)({x:0,y:0},A.Point)],n.prototype,"location",void 0),o([(0,t.Complex)(new A.Size(0,0),A.Size)],n.prototype,"size",void 0),n}(t.ChildProperty),a=function(e){function A(){return null!==e&&e.apply(this,arguments)||this}return i(A,e),o([(0,t.Property)(!1)],A.prototype,"isBold",void 0),o([(0,t.Property)(!1)],A.prototype,"isItalic",void 0),o([(0,t.Property)(!1)],A.prototype,"isUnderline",void 0),o([(0,t.Property)(!1)],A.prototype,"isStrikeout",void 0),A}(t.ChildProperty),r=function(e){function A(t,A,i,o){return e.call(this,t,A,i,o)||this}return i(A,e),o([(0,t.Property)("")],A.prototype,"id",void 0),o([(0,t.Property)("Rectangle")],A.prototype,"shapeAnnotationType",void 0),o([(0,t.Property)(null)],A.prototype,"formFieldAnnotationType",void 0),o([(0,t.Property)("")],A.prototype,"measureType",void 0),o([(0,t.Property)("")],A.prototype,"author",void 0),o([(0,t.Property)("")],A.prototype,"overlayText",void 0),o([(0,t.Property)("")],A.prototype,"modifiedDate",void 0),o([(0,t.Property)("")],A.prototype,"subject",void 0),o([(0,t.Property)("")],A.prototype,"notes",void 0),o([(0,t.Property)(!1)],A.prototype,"isCommentLock",void 0),o([(0,t.Property)("black")],A.prototype,"strokeColor",void 0),o([(0,t.Property)("#ffffff00")],A.prototype,"fillColor",void 0),o([(0,t.Property)(!1)],A.prototype,"isRepeat",void 0),o([(0,t.Property)(!1)],A.prototype,"useOverlayText",void 0),o([(0,t.Property)(1)],A.prototype,"markerOpacity",void 0),o([(0,t.Property)("rgba(255, 0, 0, 1)")],A.prototype,"markerBorderColor",void 0),o([(0,t.Property)("rgba(0, 0, 0, 1)")],A.prototype,"originalFillColor",void 0),o([(0,t.Property)("rgba(255, 255, 255, 1)")],A.prototype,"markerFillColor",void 0),o([(0,t.Property)("#ffffff00")],A.prototype,"stampFillColor",void 0),o([(0,t.Property)("black")],A.prototype,"stampStrokeColor",void 0),o([(0,t.Property)("")],A.prototype,"data",void 0),o([(0,t.Property)(1)],A.prototype,"opacity",void 0),o([(0,t.Property)(1)],A.prototype,"thickness",void 0),o([(0,t.Property)("")],A.prototype,"borderStyle",void 0),o([(0,t.Property)("")],A.prototype,"borderDashArray",void 0),o([(0,t.Property)(0)],A.prototype,"rotateAngle",void 0),o([(0,t.Property)(!1)],A.prototype,"isCloudShape",void 0),o([(0,t.Property)(0)],A.prototype,"cloudIntensity",void 0),o([(0,t.Property)(40)],A.prototype,"leaderHeight",void 0),o([(0,t.Property)(null)],A.prototype,"lineHeadStart",void 0),o([(0,t.Property)(null)],A.prototype,"lineHeadEnd",void 0),o([(0,t.Property)([])],A.prototype,"vertexPoints",void 0),o([(0,t.Property)(null)],A.prototype,"sourcePoint",void 0),o([(0,t.Property)("None")],A.prototype,"sourceDecoraterShapes",void 0),o([(0,t.Property)("None")],A.prototype,"taregetDecoraterShapes",void 0),o([(0,t.Property)(null)],A.prototype,"targetPoint",void 0),o([(0,t.Property)([])],A.prototype,"segments",void 0),o([(0,t.Complex)({x:0,y:0},n)],A.prototype,"bounds",void 0),o([(0,t.Property)(0)],A.prototype,"pageIndex",void 0),o([(0,t.Property)(-1)],A.prototype,"zIndex",void 0),o([(0,t.Property)(null)],A.prototype,"wrapper",void 0),o([(0,t.Property)(!1)],A.prototype,"isDynamicStamp",void 0),o([(0,t.Property)("")],A.prototype,"dynamicText",void 0),o([(0,t.Property)("")],A.prototype,"annotName",void 0),o([(0,t.Property)({})],A.prototype,"review",void 0),o([(0,t.Property)([])],A.prototype,"comments",void 0),o([(0,t.Property)("#000")],A.prototype,"fontColor",void 0),o([(0,t.Property)(16)],A.prototype,"fontSize",void 0),o([(0,t.Property)("Helvetica")],A.prototype,"fontFamily",void 0),o([(0,t.Property)("None")],A.prototype,"fontStyle",void 0),o([(0,t.Property)(!1)],A.prototype,"enableShapeLabel",void 0),o([(0,t.Property)("label")],A.prototype,"labelContent",void 0),o([(0,t.Property)("#ffffff00")],A.prototype,"labelFillColor",void 0),o([(0,t.Property)(15)],A.prototype,"labelMaxLength",void 0),o([(0,t.Property)("")],A.prototype,"template",void 0),o([(0,t.Property)("")],A.prototype,"templateSize",void 0),o([(0,t.Property)(1)],A.prototype,"labelOpacity",void 0),o([(0,t.Property)("")],A.prototype,"annotationSelectorSettings",void 0),o([(0,t.Property)("#ffffff00")],A.prototype,"labelBorderColor",void 0),o([(0,t.Property)("left")],A.prototype,"textAlign",void 0),o([(0,t.Property)("")],A.prototype,"signatureName",void 0),o([(0,t.Property)(0)],A.prototype,"minHeight",void 0),o([(0,t.Property)(0)],A.prototype,"minWidth",void 0),o([(0,t.Property)(0)],A.prototype,"maxHeight",void 0),o([(0,t.Property)(0)],A.prototype,"maxWidth",void 0),o([(0,t.Property)(!1)],A.prototype,"isLock",void 0),o([(0,t.Property)("UI Drawn Annotation")],A.prototype,"annotationAddMode",void 0),o([(0,t.Property)("")],A.prototype,"annotationSettings",void 0),o([(0,t.Property)(16)],A.prototype,"previousFontSize",void 0),o([(0,t.Complex)({isBold:!1,isItalic:!1,isStrikeout:!1,isUnderline:!1},a)],A.prototype,"font",void 0),o([(0,t.Complex)({x:0,y:0},n)],A.prototype,"labelBounds",void 0),o([(0,t.Property)(null)],A.prototype,"customData",void 0),o([(0,t.Property)(["None"])],A.prototype,"allowedInteractions",void 0),o([(0,t.Property)(!0)],A.prototype,"isPrint",void 0),o([(0,t.Property)(!1)],A.prototype,"isReadonly",void 0),o([(0,t.Property)(0)],A.prototype,"pageRotation",void 0),o([(0,t.Property)("")],A.prototype,"icon",void 0),o([(0,t.Property)(!1)],A.prototype,"isAddAnnotationProgrammatically",void 0),o([(0,t.Property)(!1)],A.prototype,"isSignatureText",void 0),o([(0,t.Property)(!1)],A.prototype,"isTransparentSet",void 0),A}(t.ChildProperty),s=function(e){function A(t,A,i,o){return e.call(this,t,A,i,o)||this}return i(A,e),o([(0,t.Property)("")],A.prototype,"id",void 0),o([(0,t.Property)("")],A.prototype,"signatureType",void 0),o([(0,t.Property)("")],A.prototype,"name",void 0),o([(0,t.Property)("")],A.prototype,"value",void 0),o([(0,t.Property)(null)],A.prototype,"formFieldAnnotationType",void 0),o([(0,t.Property)("#daeaf7ff")],A.prototype,"backgroundColor",void 0),o([(0,t.Property)("black")],A.prototype,"color",void 0),o([(0,t.Property)("#303030")],A.prototype,"borderColor",void 0),o([(0,t.Property)("")],A.prototype,"tooltip",void 0),o([(0,t.Property)(1)],A.prototype,"opacity",void 0),o([(0,t.Property)(1)],A.prototype,"thickness",void 0),o([(0,t.Property)(0)],A.prototype,"rotateAngle",void 0),o([(0,t.Complex)({x:0,y:0},n)],A.prototype,"bounds",void 0),o([(0,t.Property)(0)],A.prototype,"pageIndex",void 0),o([(0,t.Property)(1)],A.prototype,"pageNumber",void 0),o([(0,t.Property)(-1)],A.prototype,"zIndex",void 0),o([(0,t.Property)(null)],A.prototype,"wrapper",void 0),o([(0,t.Property)(16)],A.prototype,"fontSize",void 0),o([(0,t.Property)("Helvetica")],A.prototype,"fontFamily",void 0),o([(0,t.Property)("None")],A.prototype,"fontStyle",void 0),o([(0,t.Property)("left")],A.prototype,"alignment",void 0),o([(0,t.Property)(0)],A.prototype,"minHeight",void 0),o([(0,t.Property)(0)],A.prototype,"minWidth",void 0),o([(0,t.Property)(0)],A.prototype,"maxHeight",void 0),o([(0,t.Property)(0)],A.prototype,"maxWidth",void 0),o([(0,t.Property)(0)],A.prototype,"maxLength",void 0),o([(0,t.Property)("visible")],A.prototype,"visibility",void 0),o([(0,t.Property)(!0)],A.prototype,"isPrint",void 0),o([(0,t.Property)(!1)],A.prototype,"isReadonly",void 0),o([(0,t.Property)(!1)],A.prototype,"isChecked",void 0),o([(0,t.Property)(!1)],A.prototype,"isSelected",void 0),o([(0,t.Property)(!1)],A.prototype,"isRequired",void 0),o([(0,t.Property)(!1)],A.prototype,"isMultiline",void 0),o([(0,t.Property)(!1)],A.prototype,"isTransparent",void 0),o([(0,t.Property)(!1)],A.prototype,"insertSpaces",void 0),o([(0,t.Property)("")],A.prototype,"options",void 0),o([(0,t.Property)()],A.prototype,"signatureIndicatorSettings",void 0),o([(0,t.Complex)({isBold:!1,isItalic:!1,isStrikeout:!1,isUnderline:!1},a)],A.prototype,"font",void 0),o([(0,t.Property)()],A.prototype,"selectedIndex",void 0),o([(0,t.Property)(null)],A.prototype,"customData",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 o,n=arguments.length,a=n<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--)(o=e[r])&&(a=(n<3?o(a):n>3?o(t,A,a):o(t,A))||a);return n>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 o=0;o<this.formFields.length;o++){var n=e.pdfViewer.nameTable[this.formFields[parseInt(o.toString(),10)].id].wrapper;i.children.push(n)}else if(this.annotations)for(o=0;o<this.annotations.length;o++)if(!(0,t.isNullOrUndefined)(this.annotations[parseInt(o.toString(),10)])){n=e.pdfViewer.nameTable[this.annotations[parseInt(o.toString(),10)].id].wrapper;i.children.push(n)}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;t.style.fill=A||"white","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,o){return"rgba("+A+","+i+","+o+","+t+")"})}function Q(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 u(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 o=e.properties||e,n=[],a=[];if((n=n.concat(Object.keys(o))).push("version"),A){var r=f(t);a=r?r(A):[],n=n.concat(a)}for(var s=D(A),g=0,l=n=n.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 o=0;o<e.length;o++)e[parseInt(o.toString(),10)]instanceof Array?i.push(e[parseInt(o.toString(),10)]):e[parseInt(o.toString(),10)]instanceof Object?i.push(I(e[parseInt(o.toString(),10)],t,A)):i.push(e[parseInt(o.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 o=0,n=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===o?(n={x:e.sourcePoint.x,y:e.sourcePoint.y-e.leaderHeight},s=e.sourcePoint):(n={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:n.x,y:n.y}),t==="Leader"+o)return{leader:"leader"+o,point:i};o++}}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 F(e,t){for(var A,i="",o=[],n=0;n<t.length;)o.push({x:t[parseInt(n.toString(),10)].x,y:t[parseInt(n.toString(),10)].y}),n++;o=v(e,o);for(var a=0;a<o.length;a++)A=o[parseInt(a.toString(),10)],0===a&&(i="M"+A.x+" "+A.y),a>0&&(i+=" L"+A.x+" "+A.y);return i}function S(e,t,i){var o=new A.Rect,n=F(e,t);if(o=A.Rect.toBounds(t),i.width=o.width,i.height=o.height,i.offsetX=o.x+i.width/2,i.offsetY=o.y+i.height/2,i.data=n,e.wrapper){e.wrapper.offsetX=i.offsetX,e.wrapper.offsetY=i.offsetY;var a=o.width;a=o.width<o.height?o.height:o.width,e.wrapper.width=e.enableShapeLabel?a/2:a,e.wrapper.height=o.height}return i}function b(e,t){var A;return A=M(e),t.staticSize=!0,c(e,t=S(e,A,t)),t}function k(e,t,i,o,n){t.offsetX=i.x,t.offsetY=i.y;var a,r=A.Point.findAngle(i,o),s=_(n?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,o){var n=new A.PathElement;return k(e,n,t,i,o),n}function v(e,t){return t[0]=Y(e,t,!0),t[t.length-1]=Y(e,t,!1),t}function Y(e,t,i){var o,n,a={x:0,y:0},r=t.length;if(o=i?t[0]:t[r-1],n=i?t[1]:t[r-2],"Butt"===(i?e.sourceDecoraterShapes:e.taregetDecoraterShapes))return o;var s=A.Point.distancePoints(o,n);s=0===s?1:s;var g=e.thickness;a.x=Math.round(o.x+g*(n.x-o.x)/s),a.y=Math.round(o.y+g*(n.y-o.y)/s);return a=A.Point.adjustPoint(a,n,!0,.5)}function x(e,t,i,o){var n=[],a=A.Point.findAngle(t[0],t[1]),r=K(e,a);return!o.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?r.content=e.notes:r.content=i.setConversion(Q([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),n.push(r),n}function U(e,A,i){for(var o,n=0;n<e.wrapper.children.length;n++){var a=e.wrapper.children[parseInt(n.toString(),10)];a&&!(0,t.isNullOrUndefined)(a.content)&&(o=i.setConversion(Q([A[0],A[1]])*i.pixelToPointFactor,e),a.content=o,a.childNodes[0].text=a.content,a.refreshTextElement())}return o}function V(e,A){for(var i,o=0;o<e.wrapper.children.length;o++){var n=e.wrapper.children[parseInt(o.toString(),10)];n&&!(0,t.isNullOrUndefined)(n.content)&&(i=A.setConversion(e.bounds.width/2*A.pixelToPointFactor,e),n.content=i,2===n.childNodes.length?(n.childNodes[0].text=i,n.childNodes.splice(n.childNodes.length-1,1)):n.childNodes[0].text=i,n.refreshTextElement())}return i}function R(e,t,i,o){var n=[],a=A.Point.findAngle(t[0],t[1]),r=K(e,a);return!o.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},n.push(r),n}function T(e,A,i){for(var o,n=0;n<e.wrapper.children.length;n++){var a=e.wrapper.children[parseInt(n.toString(),10)];a&&!(0,t.isNullOrUndefined)(a.content)&&(o=i.calculatePerimeter(e),a.content=o,a.childNodes[0].text=a.content,a.refreshTextElement())}return o}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,o){var n=new A.PathElement;n.offsetX=t.x,n.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,n.offsetX,n.offsetY),g=(0,A.transformPointByMatrix)(s,l);var h={x:t.x,y:t.y};n.offsetX=h.x,n.offsetY=h.y,n.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 n.pivot.x=.5,o?(n.id="leader2_"+(0,A.randomId)(),n.pivot.y=0):(n.id="leader1_"+(0,A.randomId)(),n.pivot.y=1),c(e,n),n.rotateAngle=a,n.data=B,n.canMeasurePath=!0,n.width=d.width,n.height=d.height,n}function O(e,i){var o=e.vertexPoints;if(!(0,t.isNullOrUndefined)(o))for(var n=0;n<o.length-1;n++){var a=o[parseInt(n.toString(),10)],r=o[n+1],s=A.Rect.toBounds([a,r]);if(s.Inflate(10),s.containsPoint(i)){var g=j(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 j(e,t,i){var o;o=A.Point.findLength(t,e)>A.Point.findLength(i,e)?i:t;var n=A.Point.findAngle(t,i),a=A.Point.findAngle(o,e),r=A.Point.findLength(o,e),s=a+2*(n-a);return{x:o.x+r*Math.cos(s*Math.PI/180),y:o.y+r*Math.sin(s*Math.PI/180)}}function _(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 o=0;o<A.objects.length;o++)if(t.id===A.objects[parseInt(o.toString(),10)].id){A.objects.splice(parseInt(o.toString(),10),1),A.objects.splice(parseInt(o.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 n=A.objects.length;t.zIndex=n++,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,e},e.prototype.initNode=function(e){if(!(0,t.isNullOrUndefined)(this.pdfViewer.annotationModule)&&this.pdfViewer.annotationModule.isUndoRedoAction&&"Stamp"===e.shapeAnnotationType){var i=e.id,o=this.pdfViewer.nameTable[""+i].wrapper.children;this.stampPreviousSize=JSON.parse(JSON.stringify(o)),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 n,a=this.initContainer(e);a.children||(a.children=[]),n||(n=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)),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 o=this.pdfViewer.annotationModule?this.pdfViewer.annotationModule.findAnnotationSettings(e):{},n=0,a=0,r=0,s=0;(o.minWidth||o.maxWidth||o.minHeight||o.maxHeight)&&(n=o.maxHeight?o.maxHeight:2e3,a=o.maxWidth?o.maxWidth:2e3,r=o.minHeight?o.minHeight:0,s=o.minWidth?o.minWidth:0);var g=!1;return(r||s||n||a)&&(g=!0),(i=e.formFieldAnnotationType?this.initFormFields(e,i,t):this.initAnnotationObject(e,void 0,i,t,!1,void 0,g,n,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>n)&&(i.height<r&&(i.height=r),i.height>n&&(i.height=n))),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,o,n,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",o=i,n.children.push(o),e.enableShapeLabel)(v=this.textElement(e)).content=e.labelContent,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,n.children.push(v);break;case"Path":(i=new A.PathElement).data=e.data,o=i,n.children.push(o);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,o=i,n.children.push(o);break;case"Polygon":(i=new A.PathElement).data=N(e.vertexPoints),o=i,n.children.push(o);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&&e.annotationAddMode&&"diagram_helper"===e.id&&"Accepted"!==e.icon&&"Rejected"!==e.icon&&(e.bounds.width=e.bounds.width-20,e.bounds.height=e.bounds.height-20),e.isDynamicStamp){if(n.horizontalAlignment="Left",(o=r=new A.DrawingElement).cornerRadius=10,o.style.fill=e.stampFillColor,o.style.strokeColor=e.stampStrokeColor,n.children.push(o),(Y=new A.TextElement).style.fontFamily="Helvetica",Y.style.fontSize=14,Y.style.italic=!0,Y.style.bold=!0,Y.style.color=e.fillColor,Y.rotateValue=void 0,Y.content=e.dynamicText,Y.style.textAlign="Left",Y.relativeMode="Point",Y.margin.left=5,Y.margin.bottom=3,Y.setOffsetWithRespectToBounds(0,.75,null),"Existing Annotation"===e.annotationAddMode||"Imported Annotation"===e.annotationAddMode){var w=e.bounds.width+20,C=e.bounds.height+20,u=.02*w,E=Math.max(0,w-2*u);Y.style.fontSize=this.fontSizeCalculation(e,Y,E,Y.content);var f=(.25*C-(F=this.measureTextMetrics(e,Y.content,Y.style.fontSize,Y.style.fontFamily)).height)/8;Y.margin.bottom=Math.max(0,f),Y.margin.bottom<1&&(Y.margin.bottom=5),Y.margin.left=(w-F.width)/2}if(this.isPasted&&(Y.style.fontSize=d.wrapper.children[1].style.fontSize,Y.margin.left=d.wrapper.children[1].margin.left),!(0,t.isNullOrUndefined)(this.pdfViewer.annotationModule)&&this.pdfViewer.annotationModule.isUndoRedoAction&&(Y.style.fontSize=this.stampPreviousSize[1].style.fontSize),"diagram_helper"!==e.id&&n.children.push(Y),s&&e.bounds.width>l&&(e.bounds.width=l),s&&e.bounds.height>g&&(e.bounds.height=g/2),(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),"Existing Annotation"===e.annotationAddMode||"Imported Annotation"===e.annotationAddMode){w=e.bounds.width+20,C=e.bounds.height+20;var I=w;"REVISED"===M.content||"REVIEWED"===M.content||"RECEIVED"===M.content||"APPROVED"===M.content?I/=2:"CONFIDENTIAL"!==M.content&&"NOT APPROVED"!==M.content||(I*=3/4);u=.02*I,E=Math.max(0,I-2*u);M.style.fontSize=this.fontSizeCalculation(e,M,E,M.content);var m=(.75*C-(F=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=(w-F.width*(4/3))/2:M.margin.left=(w-2*F.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-.5*d.wrapper.children[2].margin.top,o.width=this.stampOriginalWidth,o.height=this.stampOriginalHeight):!(0,t.isNullOrUndefined)(this.pdfViewer.annotationModule)&&this.pdfViewer.annotationModule.isUndoRedoAction?(M.style.fontSize=this.stampPreviousSize[2].style.fontSize,o.width=this.stampPreviousWidth,o.height=this.stampPerviousHeight):(o.width=e.bounds.width+20,o.height=e.bounds.height+20),o.style.opacity=e.opacity,M.id=(0,A.randomId)()+"_stamp","diagram_helper"!==e.id&&n.children.push(M)}else if(n.horizontalAlignment="Left",(o=r=new A.DrawingElement).cornerRadius=10,o.style.fill=e.stampFillColor,o.style.strokeColor=e.stampStrokeColor,n.children.push(o),"Accepted"===e.icon||"Rejected"===e.icon){o.style.fill="transparent",o.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,o.width=e.bounds.width,o.height=e.bounds.height,o.style.opacity=e.opacity,n.children.push(y)}else{var M;s&&e.bounds.width>l&&(e.bounds.width=l),s&&e.bounds.height>g&&(e.bounds.height=g/2),(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);var F=this.measureTextMetrics(e,M.content,M.style.fontSize,M.style.fontFamily);if(M.margin.top=5,M.margin.left=(e.bounds.width+20-F.width)/2,"Existing Annotation"===e.annotationAddMode||"Imported Annotation"===e.annotationAddMode){w=e.bounds.width+20,C=e.bounds.height+20;var S=.05*w,b=Math.max(0,w-2*S);M.style.fontSize=this.fontSizeCalculation(e,M,b,M.content);var k=(w-this.measureTextMetrics(e,M.content,M.style.fontSize,M.style.fontFamily).width)/2;M.margin.left=Math.max(0,k)}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-.5*d.wrapper.children[1].margin.top,o.width=this.stampOriginalWidth,o.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,o.width=this.stampPreviousWidth,o.height=this.stampPerviousHeight):(o.width=e.bounds.width+20,o.height=e.bounds.height+20),o.style.opacity=e.opacity,M.id=(0,A.randomId)()+"_stamp","diagram_helper"!==e.id&&n.children.push(M)}break;case"Image":case"SignatureImage":var G=new A.ImageElement;G.source=e.data,(o=G).style.strokeWidth=0,n.children.push(o);break;case"Rectangle":case"Redaction":var v;if(o=r=new A.DrawingElement,n.children.push(o),e.enableShapeLabel)(v=this.textElement(e)).content=e.labelContent,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,n.children.push(v);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",o=i,c(e,i),n.children.push(o),(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),n.children.push(r);var Y=this.textElement(e);(Y=new A.TextElement).content=Y.content=Q([{x:e.bounds.x,y:e.bounds.y},{x:e.bounds.x+e.bounds.width,y:e.bounds.y+e.bounds.height}]).toString(),Y.rotateValue={y:-10,angle:e.rotateAngle},n.children.push(Y);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",o=i,c(e,i),n.children.push(o),(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),n.children.push(r);var x=this.textElement(e);e.enableShapeLabel&&(x.style.color=e.fontColor,x.style.strokeColor=e.labelBorderColor,x.style.fill=e.labelFillColor,x.style.fontSize=e.fontSize,x.style.fontFamily=e.fontFamily,x.style.opacity=e.labelOpacity);Q([{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?x.content=e.notes:x.content=this.pdfViewer.annotation.measureAnnotationModule.setConversion(e.bounds.width/2*this.pdfViewer.annotation.measureAnnotationModule.pixelToPointFactor,e),x.rotateValue={y:-10,x:e.bounds.width/4,angle:e.rotateAngle},n.children.push(x);break;case"StickyNotes":var U=new A.ImageElement;U.source=e.data,U.width=e.bounds.width,U.height=e.bounds.height,U.style.strokeColor=e.strokeColor,U.style.strokeWidth=0,o=U,n.children.push(o);break;case"SignatureText":var V=new A.DrawingElement;V.style.strokeWidth=0,(o=V).style.strokeWidth=0,n.style.strokeWidth=0,n.children.push(o);var R=this.textElement(e);R.style.fontFamily=e.fontFamily,R.style.fontSize=e.fontSize,R.style.textAlign="Left",R.rotateValue=void 0,R.content=e.data,R.style.strokeWidth=0,n.children.push(R);break;case"FreeText":o=new A.DrawingElement,n.children.push(o);var T=this.textElement(e);(T=new A.TextElement).style.fontFamily=e.fontFamily,T.style.fontSize=e.fontSize,T.style.textAlign="Left","center"===e.textAlign.toLowerCase()?T.style.textAlign="Center":"right"===e.textAlign.toLowerCase()?T.style.textAlign="Right":"justify"===e.textAlign.toLowerCase()&&(T.style.textAlign="Justify"),T.style.color=e.fontColor,T.style.bold=e.font.isBold,T.style.italic=e.font.isItalic,void 0!==e.font.isUnderline&&(!0===e.font.isUnderline?e.font.isStrikeout?T.style.textDecoration="Underline LineThrough":T.style.textDecoration="Underline":e.font.isStrikeout&&("Underline LineThrough"===T.style.textDecoration?T.style.textDecoration="LineThrough":T.style.textDecoration="None")),void 0!==e.font.isStrikeout&&(!0===e.font.isStrikeout?e.font.isUnderline?T.style.textDecoration="Underline LineThrough":T.style.textDecoration="LineThrough":e.font.isUnderline||("Underline LineThrough"===T.style.textDecoration?T.style.textDecoration="Underline":T.style.textDecoration="None")),T.rotateValue=void 0,T.content=e.dynamicText,T.style.opacity=e.opacity,T.style.strokeWidth=e.thickness,e.isSignatureText?(T.margin.left=4,T.margin.right=5,T.margin.top=e.fontSize/16*5):(T.margin.left=0,T.margin.right=0,T.margin.top=0),this.isPasted=!1,this.pdfViewer.freeTextSettings.enableAutoFit?T.style.textWrapping="Wrap":T.style.textWrapping="WrapWithOverflow",T.relativeMode="Point",T.setOffsetWithRespectToBounds(0,0,null),T.relativeMode="Point",n.children.push(T)}return o.id=e.id+"_content",o.relativeMode="Object",a||(void 0!==e.bounds.width&&(o.width=e.bounds.width,s&&(o.width<h||o.width>l)&&(o.width<h&&(o.width=h),o.width>l&&(o.width=l))),o.horizontalAlignment="Stretch",void 0!==e.bounds.height&&(o.height=e.bounds.height,s&&(o.height<B||o.width>g)&&(o.height<B&&(o.height=B),o.height>g&&(o.height=g))),c(e,o)),o.isRectElement=!0,o.verticalAlignment="Stretch",o},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},o={x:t.bounds.x+t.bounds.width/2,y:t.bounds.y+t.bounds.height/2},n=(0,A.identityMatrix)();(0,A.rotateMatrix)(n,t.rotateAngle,o.x,o.y);var a=(0,A.transformPointByMatrix)(n,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 o=new A.PathElement,n=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=x(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.strokeColor=e.labelBorderColor,h.style.fill=e.labelFillColor,h.style.fontSize=e.fontSize,h.style.color=e.fontColor,h.style.fontFamily=e.fontFamily,h.style.opacity=e.labelOpacity,h.rotateValue={y:-10,angle:l},g.push(h)}r=v(e,r);var B=A.Rect.toBounds(r);t.width=B.width,t.height=B.height,t.offsetX=B.x+t.pivot.x*B.width,t.offsetY=B.y+t.pivot.y*B.height;var d=e.vertexPoints;if("Line"!==e.shapeAnnotationType&&"LineWidthArrowHead"!==e.shapeAnnotationType&&"Distance"!==e.shapeAnnotationType||(o=G(e,r[0],d[1],!0),n=G(e,r[r.length-1],d[d.length-2],!1)),o.id=e.id+"_srcDec",n.id=e.id+"_tarDec",i.style.fill="transparent",t.style.strokeColor="transparent",t.style.fill="transparent",t.style.strokeWidth=0,t.children=[],c(e,i),t.children.push(i),s.length>0)for(a=0;a<s.length;a++)t.children.push(s[parseInt(a.toString(),10)]);if(g.length>0)for(a=0;a<g.length;a++)t.children.push(g[parseInt(a.toString(),10)]);if(t.children.pus