UNPKG

@syncfusion/ej2-pdfviewer

Version:
1 lines 8.09 MB
!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:()=>Ac,ActiveElements:()=>ue,AjaxHandler:()=>CB,AjaxRequestSettings:()=>PB,AllowedInteraction:()=>Ye,AnnotBounds:()=>vw,AnnotBoundsBase:()=>gA,AnnotBoundsRect:()=>sA,AnnotColor:()=>Yw,AnnotFontBase:()=>hA,AnnotPoint:()=>Gw,AnnotRectBase:()=>lA,Annotation:()=>aA,AnnotationBaseSettings:()=>rA,AnnotationDataFormat:()=>xe,AnnotationDrawingOptions:()=>td,AnnotationRenderer:()=>Qw,AnnotationResizerLocation:()=>Me,AnnotationSelectorSettings:()=>Ed,AnnotationSettings:()=>Dd,AnnotationToolbar:()=>bB,AnnotationToolbarSettings:()=>KB,Annotations:()=>Cw,AnnotationsBase:()=>cA,AnnotationsInternal:()=>dA,AreaSettings:()=>dd,ArrowSettings:()=>Ad,BlazorUiAdaptor:()=>aB,BookmarkBase:()=>Tw,BookmarkDestination:()=>Hw,BookmarkStyles:()=>Pw,BookmarkView:()=>jd,CalculateLeaderPoints:()=>de,CheckBoxFieldSettings:()=>xd,CircleSettings:()=>ad,CommandManager:()=>Nd,CommentStatus:()=>Ie,ConnectTool:()=>oe,ContextMenu:()=>wB,ContextMenuItem:()=>De,ContextMenuSettings:()=>Gd,CursorType:()=>be,CustomStamp:()=>NB,CustomStampSettings:()=>ld,CustomToolbarItem:()=>HB,DisplayMode:()=>Se,DistanceSettings:()=>hd,DocumentTextCollectionSettings:()=>yd,Drawing:()=>z,DropdownFieldSettings:()=>Vd,DynamicStampItem:()=>ke,ExtractTextOption:()=>Fe,FontBase:()=>xw,FontStyle:()=>me,FormDesigner:()=>tc,FormDesignerToolbar:()=>DB,FormDesignerToolbarSettings:()=>JB,FormField:()=>kd,FormFieldDataFormat:()=>Ue,FormFields:()=>ec,FormFieldsBase:()=>vB,FreeTextAnnotation:()=>tA,FreeTextAnnotationBase:()=>Ew,FreeTextSettings:()=>ud,HandWrittenSignatureSettings:()=>md,HighlightSettings:()=>$B,IBounds:()=>BA,ImageStructureBase:()=>Nw,InitialFieldSettings:()=>jB,InkAnnotation:()=>MA,InkAnnotationSettings:()=>wd,InkDrawingTool:()=>ie,InkSignatureAnnotation:()=>fw,InputElement:()=>AA,Item:()=>Td,KeyGesture:()=>Hd,KeyboardCommand:()=>Pd,LineSettings:()=>ed,LineTool:()=>se,LinkAnnotation:()=>CA,ListBoxFieldSettings:()=>Rd,Magnification:()=>EB,MeasureAnnotation:()=>fA,MeasureShapeAnnotationBase:()=>Dw,MeasurementScaleRatio:()=>EA,MeasurementSettings:()=>Qd,ModifierKeys:()=>Ve,MoveTool:()=>te,Navigation:()=>fB,NavigationPane:()=>gh,NodeDrawingTool:()=>ae,OrganizeDetails:()=>Ou,PageInfo:()=>Id,PageOrganizer:()=>Ju,PageOrganizerSettings:()=>Kd,PageRenderer:()=>nc,PageRotation:()=>Lu,PasswordFieldSettings:()=>Yd,Path:()=>Uw,PdfAnnotationBase:()=>r,PdfAnnotationSettings:()=>od,PdfBounds:()=>n,PdfFont:()=>a,PdfFormFieldBase:()=>s,PdfKeys:()=>Re,PdfLayer:()=>kw,PdfPageRotateAngle:()=>Ku,PdfRenderedFields:()=>YB,PdfRenderer:()=>dw,PdfViewer:()=>Ld,PdfViewerBase:()=>cB,PdfiumRunner:()=>oc,PerimeterSettings:()=>Bd,PointBase:()=>uw,PolygonDrawingTool:()=>re,PolygonSettings:()=>sd,PopupAnnotationBase:()=>Sw,Print:()=>qd,RadioButtonFieldSettings:()=>Ud,RadiusSettings:()=>cd,RectBounds:()=>ic,RectangleBase:()=>Vw,RectangleBounds:()=>Fd,RectangleSettings:()=>id,RedactionAnnotationBase:()=>mw,RedactionSettings:()=>nd,RedactionToolbarSettings:()=>LB,ResizeTool:()=>ne,RotateTool:()=>ge,ScrollSettings:()=>bd,SearchResult:()=>Jd,SelectTool:()=>ee,Selector:()=>B,ServerActionSettings:()=>ZB,ShapeAnnotation:()=>IA,ShapeAnnotationBase:()=>Iw,ShapeLabelSettings:()=>rd,SignStampItem:()=>Ge,Signature:()=>uB,SignatureAnnotationBase:()=>yw,SignatureBase:()=>Rw,SignatureDialogSettings:()=>_B,SignatureFieldSettings:()=>OB,SignatureIndicatorSettings:()=>XB,SignatureType:()=>ye,SizeBase:()=>ww,Spinner:()=>Ph,SquigglySettings:()=>zB,StampAnnotation:()=>mA,StampAnnotationBase:()=>ac,StampSettings:()=>gd,StampTool:()=>Ae,StandardBusinessStampItem:()=>ve,StickyNotesAnnotation:()=>yA,StickyNotesSettings:()=>Cd,StrikethroughSettings:()=>WB,TextDataSettings:()=>Md,TextFieldSettings:()=>vd,TextLayer:()=>pB,TextMarkupAnnotation:()=>QA,TextMarkupAnnotationBase:()=>bw,TextSearch:()=>Wd,TextSearchColorSettings:()=>fd,TextSelection:()=>Xd,ThumbnailView:()=>IB,TileRenderingSettings:()=>Sd,ToolBase:()=>$,Toolbar:()=>SB,ToolbarSettings:()=>TB,UnderlineSettings:()=>qB,VolumeSettings:()=>pd,ZOrderPageTable:()=>g,clipDecorator:()=>Y,clipDecorators:()=>v,cloneArray:()=>m,cloneObject:()=>I,createSpinner:()=>Nh,createSvg:()=>fe,findActiveElement:()=>le,findActivePage:()=>Qe,findElementUnderMouse:()=>ce,findNearestPoint:()=>j,findObjectUnderMouse:()=>Be,findObjects:()=>Ce,findObjectsUnderMouse:()=>he,findPerimeterLength:()=>u,findPointsLength:()=>Q,findTargetShapeElement:()=>we,getArialFontData:()=>kB,getBaseShapeAttributes:()=>E,getConnectorPoints:()=>M,getDecoratorElement:()=>G,getDecoratorShape:()=>X,getFunction:()=>f,getInternalProperties:()=>D,getPolygonPath:()=>N,getSegmentElement:()=>b,getSegmentPath:()=>F,hideSpinner:()=>AB,initDistanceLabel:()=>x,initLeader:()=>L,initLeaders:()=>J,initPerimeterLabel:()=>R,insertObject:()=>pe,isLeader:()=>y,isLineShapes:()=>d,isPointOverConnector:()=>O,removePerimeterLabel:()=>H,renderAdornerLayer:()=>Ee,setElementStype:()=>c,setSpinner:()=>iB,showSpinner:()=>eB,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,"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=X(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&&(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;o=i?t[0]:t[r-1],n=i?t[1]:t[r-2];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 X(e){return _[""+e]}var _={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.copiedElementID="",this.isPasted=!1,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.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){var t,i=this.initContainer(e);i.children||(i.children=[]),t||(t=this.init(e,i)),i.rotateAngle=e.rotateAngle,i.measure(new A.Size(e.wrapper.width,e.wrapper.height)),i.arrange(i.desiredSize),this.isDynamicStamps&&(this.pdfViewer.annotation.stampAnnotationModule.updateSessionStorage(e,null,"dynamicStamp"),this.isDynamicStamps=!1)},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,undefined,i,t,!1,undefined,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,t,i,o,n,a,r,s,g,l,h){switch(e.shapeAnnotationType){case"Ellipse":if((t=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",i=t,o.children.push(i),e.enableShapeLabel)(C=this.textElement(e)).content=e.labelContent,C.style.color=e.fontColor,C.style.strokeColor=e.labelBorderColor,C.style.fill=e.labelFillColor,C.style.fontSize=e.fontSize,C.style.fontFamily=e.fontFamily,C.style.opacity=e.labelOpacity,o.children.push(C);break;case"Path":(t=new A.PathElement).data=e.data,i=t,o.children.push(i);break;case"HandWrittenSignature":case"Ink":(t=new A.PathElement).data=e.data,t.style.strokeColor=e.strokeColor,t.style.strokeWidth=e.thickness,t.style.opacity=e.opacity,i=t,o.children.push(i);break;case"Polygon":(t=new A.PathElement).data=N(e.vertexPoints),i=t,o.children.push(i);break;case"Stamp":if(n=!0,this.isDynamicStamps=!0,e&&e.annotationAddMode&&("Existing Annotation"===e.annotationAddMode||"Imported Annotation"===e.annotationAddMode)&&(e.bounds.width=e.bounds.width-20,e.bounds.height=e.bounds.height-20),e.isDynamicStamp){o.horizontalAlignment="Left",(i=a=new A.DrawingElement).cornerRadius=10,i.style.fill=e.stampFillColor,i.style.strokeColor=e.stampStrokeColor,o.children.push(i);var B=this.textElement(e);(B=new A.TextElement).style.fontFamily="Helvetica",B.style.fontSize=14,B.style.italic=!0,B.style.bold=!0,B.style.color=e.fillColor,B.rotateValue=void 0,B.content=e.dynamicText,B.relativeMode="Point",B.margin.left=10,B.margin.bottom=-7,B.setOffsetWithRespectToBounds(0,.57,null),B.relativeMode="Point","Existing Annotation"!==e.annotationAddMode&&"Imported Annotation"!==e.annotationAddMode||(B.style.fontSize=this.fontSizeCalculation(e,B,e.bounds.width-10)),o.children.push(B),(p=new A.PathElement).id=(0,A.randomId)()+"_stamp",p.data=e.data,p.width=e.bounds.width,r&&e.bounds.width>g&&(p.width=g,e.bounds.width=g),p.height=e.bounds.height/2,r&&e.bounds.height>s&&(p.height=s/2,e.bounds.height=s/2),p.rotateValue=void 0,p.margin.left=10,p.margin.bottom=-5,p.relativeMode="Point",p.setOffsetWithRespectToBounds(0,.1,null);var d=p;p.style.fill=e.fillColor,p.style.strokeColor=e.strokeColor,p.style.opacity=e.opacity,i.width=e.bounds.width+20,i.height=e.bounds.height+20,i.style.opacity=e.opacity,o.children.push(d)}else{var p;o.horizontalAlignment="Left",(i=a=new A.DrawingElement).cornerRadius=10,i.style.fill=e.stampFillColor,i.style.strokeColor=e.stampStrokeColor,o.children.push(i),(p=new A.PathElement).id=(0,A.randomId)()+"_stamp",p.data=e.data,p.width=e.bounds.width,r&&e.bounds.width>g&&(p.width=g,e.bounds.width=g),p.height=e.bounds.height,r&&e.bounds.height>s&&(p.height=s,e.bounds.height=s),p.minWidth=p.width/2,p.minHeight=p.height/2;d=p;p.style.fill=e.fillColor,p.style.strokeColor=e.strokeColor,p.style.opacity=e.opacity,i.width=e.bounds.width+20,i.height=e.bounds.height+20,i.minWidth=p.width/2,i.minHeight=p.height/2,i.style.opacity=e.opacity,o.children.push(d),o.minHeight=i.minHeight+20,o.minWidth=i.minWidth+20}break;case"Image":case"SignatureImage":var w=new A.ImageElement;w.source=e.data,(i=w).style.strokeWidth=0,o.children.push(i);break;case"Rectangle":case"Redaction":var C;if(i=a=new A.DrawingElement,o.children.push(i),e.enableShapeLabel)(C=this.textElement(e)).content=e.labelContent,C.style.color=e.fontColor,C.style.strokeColor=e.labelBorderColor,C.style.fill=e.labelFillColor,C.style.fontSize=e.fontSize,C.style.fontFamily=e.fontFamily,C.style.opacity=e.labelOpacity,o.children.push(C);break;case"Perimeter":(t=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",i=t,c(e,t),o.children.push(i),(a=new A.DrawingElement).id="perimeter_"+(0,A.randomId)(),a.height=.2,a.width=.2,a.transform=A.RotateTransform.Self,a.horizontalAlignment="Stretch",this.setNodePosition(a,e),a.rotateAngle=e.rotateAngle,c(e,a),o.children.push(a);B=this.textElement(e);(B=new A.TextElement).content=B.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(),B.rotateValue={y:-10,angle:e.rotateAngle},o.children.push(B);break;case"Radius":(t=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",i=t,c(e,t),o.children.push(i),(a=new A.DrawingElement).id="radius_"+(0,A.randomId)(),a.height=.2,a.width=e.bounds.width/2,a.transform=A.RotateTransform.Self,this.setNodePosition(a,e),a.rotateAngle=e.rotateAngle,c(e,a),o.children.push(a);var u=this.textElement(e);e.enableShapeLabel&&(u.style.color=e.fontColor,u.style.strokeColor=e.labelBorderColor,u.style.fill=e.labelFillColor,u.style.fontSize=e.fontSize,u.style.fontFamily=e.fontFamily,u.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?u.content=e.notes:u.content=this.pdfViewer.annotation.measureAnnotationModule.setConversion(e.bounds.width/2*this.pdfViewer.annotation.measureAnnotationModule.pixelToPointFactor,e),u.rotateValue={y:-10,x:e.bounds.width/4,angle:e.rotateAngle},o.children.push(u);break;case"StickyNotes":var E=new A.ImageElement;E.source=e.data,E.width=e.bounds.width,E.height=e.bounds.height,E.style.strokeColor=e.strokeColor,E.style.strokeWidth=0,i=E,o.children.push(i);break;case"SignatureText":var f=new A.DrawingElement;f.style.strokeWidth=0,(i=f).style.strokeWidth=0,o.style.strokeWidth=0,o.children.push(i);var I=this.textElement(e);I.style.fontFamily=e.fontFamily,I.style.fontSize=e.fontSize,I.style.textAlign="Left",I.rotateValue=void 0,I.content=e.data,I.style.strokeWidth=0,o.children.push(I);break;case"FreeText":i=new A.DrawingElement,o.children.push(i);var m=this.textElement(e);(m=new A.TextElement).style.fontFamily=e.fontFamily,m.style.fontSize=e.fontSize,m.style.textAlign="Left","center"===e.textAlign.toLowerCase()?m.style.textAlign="Center":"right"===e.textAlign.toLowerCase()?m.style.textAlign="Right":"justify"===e.textAlign.toLowerCase()&&(m.style.textAlign="Justify"),m.style.color=e.fontColor,m.style.bold=e.font.isBold,m.style.italic=e.font.isItalic,!0===e.font.isUnderline?m.style.textDecoration="Underline":!0===e.font.isStrikeout&&(m.style.textDecoration="LineThrough"),m.rotateValue=void 0,m.content=e.dynamicText,m.style.opacity=e.opacity,m.style.strokeWidth=e.thickness,m.margin.left=4,m.margin.right=5,m.margin.top=e.fontSize/16*5,this.pdfViewer.freeTextSettings.enableAutoFit?m.style.textWrapping="Wrap":m.style.textWrapping="WrapWithOverflow",m.relativeMode="Point",m.setOffsetWithRespectToBounds(0,0,null),m.relativeMode="Point",o.children.push(m)}return i.id=e.id+"_content",i.relativeMode="Object",n||(void 0!==e.bounds.width&&(i.width=e.bounds.width,r&&(i.width<l||i.width>g)&&(i.width<l&&(i.width=l),i.width>g&&(i.width=g))),i.horizontalAlignment="Stretch",void 0!==e.bounds.height&&(i.height=e.bounds.height,r&&(i.height<h||i.width>s)&&(i.height<h&&(i.height=h),i.height>s&&(i.height=s))),c(e,i)),i.isRectElement=!0,i.verticalAlignment="Stretch",i},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.push(o),t.children.push(n),"LineWidthArrowHead"===e.shapeAnnotationType)for(a=0;a<t.children.length;a++){var p=t.children[parseInt(a.toString(),10)];(p.id.includes("srcDec")||p.id.includes("tarDec"))&&(p.width=12*e.thickness,p.height=12*e.thickness)}return t.id=e.id,t.offsetX=i.offsetX,t.offsetY=i.offsetY,t.width=i.width,t.height=i.height,r=M(e),e.wrapper=t,t},e.prototype.add=function(e){var t=this.pdfViewer.allowServerDataBinding;return this.pdfViewer.enableServerDataBinding(!1),e.formFieldAnnotationType&&this.pdfViewer.formDesignerModule?(e=new s(this.pdfViewer,"formFields",e,!0),e=this.initObject(e),this.pdfViewer.formFields.push(e)):(e=new r(this.pdfViewer,"annotations",e,!0),e=this.initObject(e),this.pdfViewer.annotations.push(e)),this.pdfViewer.enableServerDataBinding(t,!0),e},e.prototype.remove=function(e){var A=this.pdfViewer.allowServerDataBinding;this.pdfViewer.enableServerDataBinding(!1);for(var i=e.pageIndex,o=0;o<this.pdfViewer.annotations.length;o++){var n=this.pdfViewer.annotations[parseInt(o.toString(),10)];if(n.id&&(n.id===e.id||n.id.split("_")[0]===e.id)||n.wrapper&&n.wrapper.id===e.id){this.pdfViewer.annotations.splice(o,1);for(var a=this.getPageObjects(e.pageIndex),r=0;r<a.length;r++)a[parseInt(r.toString(),10)].id===e.id&&(a.splice(r,1),"Path"===e.shapeAnnotationType||"SignatureImage"===e.shapeAnnotationType||"SignatureText"===e.shapeAnnotationType?this.refreshCanvasDiagramLayer(void 0,i,e.id):this.pdfViewer.renderDrawing(void 0,i))}}for(o=0;o<this.pdfViewer.formFields.length;o++){if((g=this.pdfViewer.formFields[parseInt(o.toString(),10)]).id===e.id||g.wrapper.id===e.id){this.pdfViewer.formFields.splice(o,1),this.pdfViewer.formDesignerModule&&e.formFieldAnnotationType&&this.pdfViewer.formFieldCollection.splice(o,1);for(a=this.getPageObjects(e.pageIndex),r=0;r<a.length;r++){if(a[parseInt(r.toString(),10)].id===e.id){a.splice(r,1);break}a[parseInt(r.toString(),10)]&&a[parseInt(r.toString(),10)].id&&-1!==a[parseInt(r.toString(),10)].id.indexOf(e.id)&&a.splice(r,1)}}}if("Textbox"===e.formFieldAnnotationType||"Checkbox"===e.formFieldAnnotationType||"RadioButton"===e.formFieldAnnotationType||"PasswordField"===e.formFieldAnnotationType||"DropdownList"===e.formFieldAnnotationType||"ListBox"===e.formFieldAnnotationType||"SignatureField"===e.formFieldAnnotationType||"InitialField"===e.formFieldAnnotationType){var s=document.getElementById("form_field_"+e.id+"_content_html_element");s&&(s.remove(),this.pdfViewer.renderDrawing(void 0,i));for(o=0;o<this.pdfViewer.formFieldCollections.length;o++){var g;(g=this.pdfViewer.formFieldCollections[parseInt(o.toString(),10)]).id===e.id&&this.pdfViewer.formFieldCollections.splice(o,1)}for(o=0;o<this.pdfViewer.viewerBase.formFieldCollection.length;o++)e.id==this.pdfViewer.viewerBase.formFieldCollection[parseInt(o.toString(),10)]&&this.pdfViewer.viewerBase.formFieldCollection.splice(o,1);var l={name:e.name,id:e.id,value:e.value,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,color:e.color,backgroundColor:e.backgroundColor,alignment:e.alignment,isReadonly:e.isReadonly,visibility:e.visibility,maxLength:e.maxLength,isRequired:e.isRequired,isPrint:e.isPrint,rotation:e.rotateAngle,tooltip:e.tooltip,options:e.options,isChecked:e.isChecked,isSelected:e.isSelected,customData:e.customData,lineBound:e.bounds,pageNumber:e.pageIndex,insertSpaces:e.insertSpaces,formFieldAnnotationType:e.formFieldAnnotationType,borderColor:e.borderColor,thickness:e.thickness,isTransparent:e.isTransparent};(0,t.isNullOrUndefined)(l)||"diagram_helper"===l.id||(this.pdfViewer.fireFormFieldRemoveEvent("formFieldRemove",l,e.pageIndex),this.pdfViewer.formDesignerModule.removeFieldsFromAnnotationCollections(e.id,l.name))}this.pdfViewer.enableServerDataBinding(A,!0)},e.prototype.getPageObjects=function(e){return this.getPageTable(e).objects},e.prototype.refreshCanvasDiagramLayer=function(e,i,o){var n=this;if(e||(e=this.pdfViewer.viewerBase.getAnnotationCanvas("_annotationCanvas_",i)),e){var a=void 0;a=e.id===this.pdfViewer.element.id+"_print_annotation_layer_"+i?1:this.pdfViewer.viewerBase.getZoomFactor();var r=e.width/a,s=e.height/a,g=e.getContext("2d");g.lineCap="round",g.lineJoin="round",a<1&&(g.lineWidth=g.lineWidth/a);var l=a*this.pdfViewer.viewerBase.getWindowDevicePixelRatio();!t.Browser.isDevice||t.Browser.isDevice&&a<=.7?g.setTransform(l,0,0,l,0,0):g.setTransform(a,0,0,a,0,0),g.clearRect(0,0,r,s);for(var h=this.getPageObjects(i).filter(function(e,A,i){return"free"===e.id.split("_")[0]||((0,t.isNullOrUndefined)(n.pdfViewer.formDesignerModule)?A===i.findIndex(function(t){return t.id===e.id}):A===i.findIndex(function(t){return t.id.split("_")[0]===e.id.split("_")[0]}))}),B=0;B<h.length;B++){var d=void 0;if(e.id===this.pdfViewer.element.id+"_print_annotation_layer_"+i)h[parseInt(B.toString(),10)].isPrint&&(d=this.pdfViewer.nameTable[h[parseInt(B.toString(),10)].id].wrapper,(0,t.isNullOrUndefined)(d)||(0,A.refreshDiagramElements)(e,[d],this.renderer));else{d=this.pdfViewer.nameTable[h[parseInt(B.toString(),10)].id].wrapper;var c=h[parseInt(B.toString(),10)].id,p=this.pdfViewer.nameTable[""+c];if(d&&this.shouldRefreshElement(p)||(0,t.isNullOrUndefined)(this.pdfViewer.formDesignerModule)){if(!(0,t.isNullOrUndefined)(p.properties.data)&&p.properties.data.includes("base64"))(w=new Image).src=p.properties.data,null==window.customStampCollection&&void 0===window.customStampCollection&&(window.customStampCollection=new Map),window.customStampCollection&&!window.customStampCollection.get(d.id)&&window.customStampCollection.set(d.id,w);else if(!(0,t.isNullOrUndefined)(p.properties.value)&&p.properties.value.includes("base64")){var w;(w=new Image).src=p.properties.value,null==window.signatureCollection&&void 0===window.signatureCollection&&(window.signatureCollection=new Map),window.signatureCollection&&!window.signatureCollection.get(d.id)&&window.signatureCollection.set(d.id,w)}(0,A.refreshDiagramElements)(e,[d],this.renderer)}}}}},e.prototype.shouldRefreshElement=function(e){var A=this.pdfViewer.name