@pdftron/webviewer 11.8.0-20250821 → 11.8.0-20250822
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/core/19.chunk.js +4 -4
- package/public/core/22.chunk.js +7 -7
- package/public/core/AndroidContentPartRetriever.chunk.js +2 -2
- package/public/core/AzurePartRetriever.chunk.js +1 -1
- package/public/core/ExternalAnnotationMerger.chunk.js +14 -14
- package/public/core/ExternalPdfPartRetriever.chunk.js +5 -5
- package/public/core/HttpPartRetriever.chunk.js +12 -12
- package/public/core/IOSPartRetriever.chunk.js +2 -2
- package/public/core/LocalPartRetriever.chunk.js +4 -4
- package/public/core/LocalPdfPartRetriever.chunk.js +3 -3
- package/public/core/PDFInfoVersion1.chunk.js +11 -11
- package/public/core/SelectionInfoOld.chunk.js +14 -14
- package/public/core/StreamingPartRetriever.chunk.js +9 -9
- package/public/core/WebDBPartRetriever.chunk.js +1 -1
- package/public/core/WebViewerServerPartRetriever.chunk.js +43 -43
- package/public/core/WinRTPartRetriever.chunk.js +2 -2
- package/public/core/pikaday.chunk.js +22 -22
- package/public/core/vendors.ascii85.chunk.js +6 -6
- package/public/core/vendors.pako.chunk.js +78 -78
- package/public/core/webviewer-core.min.js +4134 -4131
- package/public/ui/chunks/chunk.15.js +1 -1
- package/public/ui/chunks/chunk.15.js.map +1 -1
- package/public/ui/chunks/chunk.38.js +1 -1
- package/public/ui/chunks/chunk.38.js.map +1 -1
- package/public/ui/chunks/chunk.40.js +1 -1
- package/public/ui/chunks/chunk.40.js.map +1 -1
- package/public/ui/chunks/chunk.43.js +1 -1
- package/public/ui/chunks/chunk.43.js.map +1 -1
- package/public/ui/chunks/chunk.50.js +1 -1
- package/public/ui/chunks/chunk.50.js.map +1 -1
- package/public/ui/chunks/chunk.54.js +1 -1
- package/public/ui/chunks/chunk.54.js.map +1 -1
- package/public/ui/chunks/chunk.66.js +1 -1
- package/public/ui/chunks/chunk.66.js.map +1 -1
- package/public/ui/chunks/chunk.72.js +1 -1
- package/public/ui/chunks/chunk.72.js.map +1 -1
- package/public/ui/chunks/chunk.73.js +1 -1
- package/public/ui/chunks/chunk.73.js.map +1 -1
- package/public/ui/chunks/chunk.74.js +1 -1
- package/public/ui/chunks/chunk.74.js.map +1 -1
- package/public/ui/chunks/chunk.76.js +1 -1
- package/public/ui/chunks/chunk.76.js.map +1 -1
- package/public/ui/chunks/chunk.77.js +1 -1
- package/public/ui/chunks/chunk.77.js.map +1 -1
- package/public/ui/webviewer-ui.min.js +2 -2
- package/public/ui/webviewer-ui.min.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/ui/src/helpers/isAnnotationRenderedInDisplayMode.js","webpack:///./src/ui/src/helpers/applyRedactions.js","webpack:///./src/ui/src/components/AnnotationStylePopup/AnnotationStylePopup.scss?91c4","webpack:///./src/ui/src/components/AnnotationStylePopup/AnnotationStylePopup.scss","webpack:///./src/ui/src/components/AnnotationStylePopup/AnnotationStylePopup.js","webpack:///./src/ui/src/components/AnnotationStylePopup/index.js","webpack:///./src/ui/src/components/AnnotationPopup/AnnotationPopup.scss?196b","webpack:///./src/ui/src/components/CalibrationPopup/CalibrationPopup.scss?180a","webpack:///./src/ui/src/components/CalibrationPopup/CalibrationPopup.scss","webpack:///./src/ui/src/components/AnnotationPopup/AnnotationPopup.scss","webpack:///./src/ui/src/components/DatePicker/DatePicker.js","webpack:///./src/ui/src/components/DatePicker/index.js","webpack:///./src/ui/src/components/CalibrationPopup/CalibrationPopup.js","webpack:///./src/ui/src/components/CalibrationPopup/index.js","webpack:///./src/ui/src/components/AnnotationPopup/AnnotationPopup.js","webpack:///./src/ui/src/components/AnnotationPopup/AnnotationPopupContainer.js","webpack:///./src/ui/src/components/AnnotationPopup/index.js"],"names":["isAnnotationRenderedInDisplayMode","core","annotation","isAnnotationInVisiblePages","getDisplayModeObject","getVisiblePages","includes","PageNumber","isContinuousDisplayMode","noop","annotations","onRedactionCompleted","arguments","length","undefined","activeDocumentViewerKey","dispatch","isWebViewerServerDocument","webViewerServerApply","webViewerApply","applyRedactions","then","results","url","downloadPdf","filename","includeAnnotations","externalURL","console","warn","warning","message","i18next","t","title","confirmBtnText","onConfirm","err","fireError","Promise","resolve","actions","showWarningMessage","api","content","__esModule","default","module","i","options","styleTag","window","isApryseWebViewerWebComponent","document","head","appendChild","webComponents","getElementsByTagName","findNestedWebComponents","tagName","root","elements","querySelectorAll","forEach","el","push","shadowRoot","clonedStyleTags","webComponent","onload","styleNode","innerHTML","cloneNode","exports","locals","propTypes","PropTypes","array","isRequired","style","object","properties","isRedaction","bool","isFreeText","isEllipse","hasBackToMenu","onBackToMenu","func","AnnotationStylePopup","props","isMeasure","colorMapKey","showLineStyleOptions","hideSnapModeCheckbox","onResize","_useSelector2","_slicedToArray","useSelector","state","selectors","isElementDisabled","DataElements","ANNOTATION_STYLE_POPUP","isToolDefaultStyleUpdateFromAnnotationPopupEnabled","getActiveDocumentViewerKey","isDisabled","useDispatch","useTranslation","_useState2","useState","isAutoSizeFont","setAutoSizeFont","handleSliderChange","property","value","annotationManager","getAnnotationManager","adjustFreeTextBoundingBox","redrawAnnotation","Core","Annotations","WidgetAnnotation","refresh","handlePropertyChange","setAnnotationStyles","_defineProperty","setToolStyles","ToolName","handleStyleChange","handleRichTextStyleChange","updateAnnotationRichTextStyle","handleLineStyleChange","section","lineStyle","setStartStyle","setEndStyle","dashes","split","shift","trigger","handleClick","e","isMobile","target","currentTarget","closeElement","ANNOTATION_POPUP","className","getClassName","React","createElement","Measure","_ref","measureRef","data-element","onClick","ref","ANNOTATION_STYLE_POPUP_BACK_BUTTON_CONTAINER","ActionButton","dataElement","ANNOTATION_STYLE_POPUP_BACK_BUTTON","label","img","StylePopup","isFreeTextAutoSize","onFreeTextSizeToggle","handleFreeTextAutoSizeToggle","onStyleChange","onSliderChange","onPropertyChange","disableSeparator","onRichTextStyleChange","onLineStyleChange","r","Symbol","n","iterator","o","toStringTag","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","l","TypeError","call","done","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","_regenerator","w","m","defineProperty","enumerable","configurable","writable","_invoke","asyncGeneratorStep","DatePicker","onDatePickerShow","dateRef","useRef","dateContainerRef","useEffect","datePicker","_ref2","_callee","_context","createDatePicker","field","current","container","format","getDateFormat","apply","_next","_throw","getDatePicker","destroy","Scale","parseMeasurementContentsByAnnotation","factor","axis","getLineLength","CalibrationPropType","shape","arrayOf","CalibrationPopup","_Scale$worldScale","_Scale$worldScale2","getMeasurementUnits","getCalibrationInfo","shallowEqual","measurementUnits","_useSelector2$","tempScale","isFractionalUnit","defaultUnit","valueDisplay","setValueDisplay","inputRef","unitTo","worldScale","unit","unitToOptions","to","filter","fractionalUnits","isFractionalUnitsToggleDisabled","valueInputType","inputValueClass","classNames","updateTempScale","scaleValue","scaleUnit","pageUnit","currentDistance","currentScale","newRatio","pageScale","defaultPageUnit","metricUnits","defaultPageValue","convertUnit","updateCalibrationInfo","concat","setValue","_Scale$worldScale3","updateValueDisplay","_Scale$worldScale5","newValueDisplay","getFormattedValue","tempScaleRef","onAnnotationChanged","action","_Scale$worldScale6","currentUnit","addEventListener","removeEventListener","deleteAnnotations","activeElement","id","htmlFor","type","min","onChange","inputValue","trim","inFractionalRegex","test","result","parseInFractional","ftInFractionalRegex","parseFtInFractional","ftInDecimalRegex","parseFtInDecimal","floatRegex","parseFloat","onBlur","placeholder","hintValues","Tooltip","Dropdown","items","currentSelectionKey","onClickItem","_Scale$worldScale4","labelledById","Choice","isSwitch","leftLabel","disabled","checked","isIE","isOpen","isRightClickMenu","isNotesPanelOpenOrActive","isRichTextPopupOpen","isLinkModalOpen","isWarningModalOpen","isContextMenuPopupOpen","isVisible","focusedAnnotation","multipleAnnotationsSelected","popupRef","any","position","showViewFileButton","onViewFile","showCommentButton","onCommentAnnotation","isDateFreeTextCanEdit","isDatePickerOpen","handleDateChange","isCalibrationPopupOpen","showEditStyleButton","isStylePopupOpen","openEditStylePopup","closeEditStylePopup","annotationStyle","showContentEditButton","onEditContent","openContentEditDeleteWarningModal","isAppearanceSignature","onClearAppearanceSignature","showRedactionButton","onApplyRedaction","showGroupButton","onGroupAnnotations","showUngroupButton","onUngroupAnnotations","showFormFieldButton","onOpenFormField","showDeleteButton","onDeleteAnnotation","showLinkButton","hasAssociatedLink","linkAnnotationToURL","showFileDownloadButton","downloadFileAttachment","showAudioPlayButton","handlePlaySound","showCalibrateButton","onOpenCalibration","customizableUI","toggleStylePanel","isInReadOnlyMode","onOpenAlignmentModal","AnnotationPopup","_document$activeEleme","_focusedAnnotation$is","shortCutKeysFor3DVisible","setShortCutKeysFor3DVisible","commentButtonLabel","commentButtonImg","show3DShortCutButton","Model3DAnnotation","isRectangle","RectangleAnnotation","EllipseAnnotation","isPolygon","PolygonAnnotation","FreeTextAnnotation","getIntent","Intent","FreeText","FreeTextCallout","RedactionAnnotation","mapAnnotationToKey","getDataWithKey","mapToolNameToKey","hasLineEndings","isInstanceActive","getRootNode","StrokeStyle","isContentEdit","isContentEditPlaceholder","isReadOnlySignature","SignatureWidgetAnnotation","fieldFlags","get","WidgetFlags","READ_ONLY","showClearSignatureButton","error","StartLineStyle","getStartStyle","EndLineStyle","getEndStyle","_richTextStyles$","_ref3","_richTextStyles$2","_richTextStyles$3","_richTextStyles$3$tex","_richTextStyles$4","_richTextStyles$4$tex","_richTextStyles$0$tex","_richTextStyles$5","_richTextStyles$5$tex","richTextStyles","getRichTextStyle","calculatedFontSize","getCalculatedFontSize","Font","FontSize","TextAlign","TextVerticalAlign","bold","italic","underline","strikeout","OverlayText","annotationPopup","Popup","open","closed","stylePopupOpen","_objectSpread","visibility","FocusTrap","locked","CustomizablePopup","childrenClassName","isNotClickableSelector","CALIBRATION_POPUP_BUTTON","renderPopup","Draggable","cancel","_asyncToGenerator","Array","isArray","_arrayWithHoles","next","_iterableToArrayLimit","_arrayLikeToArray","toString","slice","constructor","name","from","_unsupportedIterableToArray","_nonIterableRest","ToolNames","Tools","selectedMultipleAnnotations","canModify","focusedAnnotationStyle","setIsStylePopupOpen","setDatePickerOpen","isDatePickerMount","setDatePickerMount","includesFormFieldAnnotation","stylePopupRepositionFlag","setStylePopupRepositionFlag","closePopup","AnnotationPopupContainer","isElementOpen","CONTEXT_MENU_POPUP","isRightClickAnnotationPopupEnabled","isNotesPanelDisabled","NOTES_PANEL","isAnnotationStylePopupDisabled","isInlineCommentingDisabled","INLINE_COMMENT_POPUP","isNotesPanelOpen","LINK_MODAL","WARNING_MODAL","isMultiTab","getIsMultiTab","tabManager","getTabManager","tabs","getTabs","notesInLeftPanel","getNotesInLeftPanel","leftPanelOpen","LEFT_PANEL","activeLeftPanel","getActiveLeftPanel","isAnyCustomPanelOpen","featureFlags","getFeatureFlags","isStylePanelOpen","STYLE_PANEL","isStylePanelDisabled","stylePanelInFlyout","getIsPanelInFlyout","ITEM_RENDER_PREFIXES","MULTI_SELECT_STYLE_PANEL_FLYOUT","isStylePanelFlyoutOpen","left","top","setPosition","_useState4","setIsVisible","_useState6","setCalibrationPopupOpen","isFocusedAnnotationSelected","isAnnotationSelected","annotManager","useOnClickOutside","useCallback","_getRootNode$querySel","notesPanel","querySelector","clickedInNotesPanel","contains","clickedInLinkModal","stylePanelFlyout","clickedInStylePanelFlyout","warningModal","getOpenedWarningModal","colorPicker","getOpenedColorPicker","handleResize","debounce","visiblePages","isFocusableInCurrentDisplayMode","getAnnotationPopupPositionBasedOn","annotationInPage","getSelectedAnnotations","find","setPopupPosition","handleVisibility","sixtyFramesPerSecondIncrement","useLayoutEffect","CALIBRATION_MEASUREMENT","acceptFormats","getHashParameters","SupportedFileFormats","SERVER","CLIENT","FileAttachmentAnnotation","mimeTypeToExtension","getFileMetadata","mimeType","metaData","fileAttachmentTab","_t","_t2","_t3","tab","setActiveTab","getFileData","extension","saveCurrentActiveTabState","setActive","addTab","selectedAnnotations","numberOfSelectedAnnotations","canModifyContents","numberOfGroups","getNumberOfGroups","canGroup","canUngroup","isSignedByAppearance","getIsReadOnly","CROP","hasStyle","keys","toolsWithNoStyling","VIDEO_REDACTION","VIDEO_AND_AUDIO_REDACTION","AUDIO_REDACTION","PushButtonWidgetAnnotation","isFullPDFEnabled","getContentEditType","ContentEdit","Types","TEXT","_callee2","_context2","isAnnotationRedactable","primaryAnnotation","selectedAnnotation","InReplyTo","isInFormFieldCreationMode","getFormFieldCreationManager","SIGNATURE","REDACTION","REDACTION2","REDACTION3","REDACTION4","STICKY","STICKY2","STICKY3","STICKY4","SoundAnnotation","LineAnnotation","_ref4","_callee3","annot","_yield$annot$getFullF","fileData","fileName","_context3","getFullFileMetadata","saveAs","_x","hasAudioData","contentEditManager","getContentEditManager","isInContentEditMode","endContentEditMode","triggerNoteEditing","openElement","text","setNoteContents","updateAnnotation","isDatePickerShowed","clearSignature","groupAnnotations","ungroupAnnotations","disableElement","PRIORITY_THREE","FORM_FIELD_EDIT_POPUP","FORM_FIELD_PANEL","getGroupedLinkAnnotations","linkAnnot","index","TextHighlightAnnotation","Opacity","deleteAnnotation","setActiveSoundAnnotation","triggerResetAudioPlaybackPosition","CALIBRATION_MODAL","openFlyout","ANNOTATION_ALIGNMENT_POPUP"],"mappings":"8IAAaA,EAAoC,SAACC,EAAMC,GACtD,IACMC,EADeF,EAAKG,uBAAuBC,kBACDC,SAASJ,EAAWK,YAEpE,OADwCN,EAAKO,4BAA+BP,EAAKO,2BAA6BL,I,wFCIhH,SAASM,KAEM,aAACC,GAAW,IAAEC,EAAoBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGH,EAAMM,EAAuBH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,EAAC,OAAK,SAACI,GACzF,OAAIf,IAAKgB,4BAEAC,EAAqBR,EAAaM,EAAUD,GAE9CI,EAAeT,EAAaC,EAAsBK,EAAUD,KAGrE,IAAMG,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C,kBAAmBA,EACnBC,oBA5GwB,WACtBD,IAC0BiK,GAA8BmD,GAAsB,CAACtP,IAC7DnR,SAAQ,SAACojB,GACH0B,YAA0B1B,GAClCpjB,SAAQ,SAAC+kB,EAAWC,GAClCxH,GAAaiH,mBAAmB,CAACM,IAC7B3B,aAAiB1f,GAAYuhB,yBAA6C,IAAlB7B,EAAM8B,SAA2B,IAAVF,EACjFxH,GAAahP,kBAAkB,CAAC4U,EAAO2B,GAAY,MAAM,GAEzDvH,GAAa2H,iBAAiBJ,EAAW,MAAM,SAIrDpK,KAEA1d,GAASyB,IAAQwlB,YAAY3hB,IAAa+Y,cA8F1C/H,uBAAwBA,GACxBC,uBAAwBA,GAExBC,oBAAqBA,GACrBC,gBAxEoB,SAACvX,GACvBc,GAASyB,IAAQ0mB,yBAAyBjpB,IAC1Cc,GAASyB,IAAQ2mB,mCAAkC,IACnDpoB,GAASyB,IAAQwlB,YAAY,wBAuE3BvQ,oBAAqBA,GACrBC,kBA1HsB,WACxB3W,GAASyB,IAAQyG,aAAa5C,IAAa6C,mBAC3CnI,GAASyB,IAAQwlB,YAAY3hB,IAAa+iB,qBA0HxCzR,eAAgBA,GAChBC,iBAhdqB,WAClByI,IAAqBE,IAAyBC,IACjDzf,GAASyB,IAAQwlB,YAAY3hB,IAAaia,cAExCE,IAEAzf,GADE6f,GACOpe,IAAQyG,aAAauX,GAAmBzW,aAExCvH,IAAQ6mB,WAAW7I,GAAmBzW,YAAa,8BAG3DyW,IACH/B,KAqcA4B,iBAAkBA,GAClBxI,iBAAkBA,GAElBC,qBAnSyB,WAC3B/W,GAASyB,IAAQwlB,YAAY3hB,IAAaijB,6BAC1C7K,QAsSJC,GAAyBha,UAAYA,GAEtBga,UC/jBAA","file":"chunks/chunk.40.js","sourcesContent":["export const isAnnotationRenderedInDisplayMode = (core, annotation) => {\n const visiblePages = core.getDisplayModeObject().getVisiblePages();\n const isAnnotationInVisiblePages = visiblePages.includes(annotation.PageNumber);\n const isFocusableInCurrentDisplayMode = core.isContinuousDisplayMode() || (!core.isContinuousDisplayMode() && isAnnotationInVisiblePages);\n return isFocusableInCurrentDisplayMode;\n};","import core from 'core';\nimport i18next from 'i18next';\n\nimport actions from 'actions';\nimport { fireError } from 'helpers/fireEvent';\nimport downloadPdf from 'helpers/downloadPdf';\n\nfunction noop() { }\n\nexport default (annotations, onRedactionCompleted = noop, activeDocumentViewerKey = 1) => (dispatch) => {\n if (core.isWebViewerServerDocument()) {\n // when are using Webviewer Server, it'll download the redacted document\n return webViewerServerApply(annotations, dispatch, activeDocumentViewerKey);\n }\n return webViewerApply(annotations, onRedactionCompleted, dispatch, activeDocumentViewerKey);\n};\n\nconst webViewerServerApply = (annotations, dispatch, activeDocumentViewerKey) => core.applyRedactions(annotations, activeDocumentViewerKey).then((results) => {\n if (results && results.url) {\n return downloadPdf(dispatch, {\n filename: 'redacted.pdf',\n includeAnnotations: true,\n externalURL: results.url,\n });\n }\n console.warn('WebViewer Server did not return a valid result');\n});\n\nconst webViewerApply = (annotations, onRedactionCompleted, dispatch, activeDocumentViewerKey) => {\n const message = i18next.t('warning.redaction.applyMessage');\n const title = i18next.t('warning.redaction.applyTile');\n const confirmBtnText = i18next.t('action.apply');\n\n const warning = {\n message,\n title,\n confirmBtnText,\n onConfirm: () => {\n core.applyRedactions(annotations, activeDocumentViewerKey)\n .then(() => {\n onRedactionCompleted();\n })\n .catch((err) => fireError(err));\n return Promise.resolve();\n },\n };\n\n return dispatch(actions.showWarningMessage(warning));\n};\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/postcss-loader/src/index.js??postcss!../../../../../node_modules/sass-loader/dist/cjs.js!./AnnotationStylePopup.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = function(styleTag) {\n function findNestedWebComponents(tagName, root = document) {\n const elements = [];\n\n // Check direct children\n root.querySelectorAll(tagName).forEach((el) => elements.push(el));\n\n // Check shadow DOMs\n root.querySelectorAll('*').forEach((el) => {\n if (el.shadowRoot) {\n elements.push(...findNestedWebComponents(tagName, el.shadowRoot));\n }\n });\n\n return elements;\n }\n if (!window.isApryseWebViewerWebComponent) {\n document.head.appendChild(styleTag);\n return;\n }\n\n let webComponents;\n // First we see if the webcomponent is at the document level\n webComponents = document.getElementsByTagName('apryse-webviewer');\n // If not, we check have to check if it is nested in another webcomponent\n if (!webComponents.length) {\n webComponents = findNestedWebComponents('apryse-webviewer');\n }\n // Now we append the style tag to each webcomponent\n const clonedStyleTags = [];\n for (let i = 0; i < webComponents.length; i++) {\n const webComponent = webComponents[i];\n if (i === 0) {\n webComponent.shadowRoot.appendChild(styleTag);\n styleTag.onload = function() {\n if (clonedStyleTags.length > 0) {\n clonedStyleTags.forEach((styleNode) => {\n // eslint-disable-next-line no-unsanitized/property\n styleNode.innerHTML = styleTag.innerHTML;\n });\n }\n };\n } else {\n const styleNode = styleTag.cloneNode(true);\n webComponent.shadowRoot.appendChild(styleNode);\n clonedStyleTags.push(styleNode);\n }\n }\n };\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","exports = module.exports = require(\"../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}@keyframes bottom-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes up-bottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .AnnotationStylePopup{width:100%;margin:0;position:relative;max-width:none;border-radius:4px 4px 0 0;border:0;padding-bottom:24px;box-shadow:none}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .AnnotationStylePopup{width:100%;margin:0;position:relative;max-width:none;border-radius:4px 4px 0 0;border:0;padding-bottom:24px;box-shadow:none}}.AnnotationStylePopup .back-to-menu-container{margin-top:var(--padding-medium);margin-inline-end:var(--padding-medium);margin-inline-start:var(--padding-medium);padding-bottom:var(--padding-small);border-bottom:1px solid var(--border)}.AnnotationStylePopup .Button.back-to-menu-button{margin:0;width:100%;height:32px;border-radius:0;justify-content:flex-start}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .AnnotationStylePopup .Button.back-to-menu-button{width:100%;height:32px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .AnnotationStylePopup .Button.back-to-menu-button{width:100%;height:32px}}\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"LEFT_HEADER_WIDTH\": \"41px\",\n\t\"RIGHT_HEADER_WIDTH\": \"41px\"\n};","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Measure from 'react-measure';\nimport { useTranslation } from 'react-i18next';\nimport StylePopup from 'components/StylePopup';\nimport ActionButton from 'components/ActionButton';\nimport core from 'core';\nimport getClassName from 'helpers/getClassName';\nimport setToolStyles from 'helpers/setToolStyles';\nimport { isMobile } from 'helpers/device';\nimport adjustFreeTextBoundingBox from 'helpers/adjustFreeTextBoundingBox';\nimport actions from 'actions';\nimport selectors from 'selectors';\nimport DataElements from 'constants/dataElement';\nimport handleFreeTextAutoSizeToggle from 'src/helpers/handleFreeTextAutoSizeToggle';\n\nimport './AnnotationStylePopup.scss';\n\nconst propTypes = {\n annotations: PropTypes.array.isRequired,\n style: PropTypes.object.isRequired,\n properties: PropTypes.object.isRequired,\n isRedaction: PropTypes.bool,\n isFreeText: PropTypes.bool,\n isEllipse: PropTypes.bool,\n hasBackToMenu: PropTypes.bool,\n onBackToMenu: PropTypes.func,\n};\n\nconst AnnotationStylePopup = (props) => {\n const {\n annotations,\n style,\n isRedaction,\n isFreeText,\n isEllipse,\n isMeasure,\n colorMapKey,\n showLineStyleOptions,\n properties,\n hideSnapModeCheckbox,\n onResize,\n hasBackToMenu,\n onBackToMenu\n } = props;\n\n const [\n isDisabled,\n isToolDefaultStyleUpdateFromAnnotationPopupEnabled,\n activeDocumentViewerKey,\n ] = useSelector((state) => [\n selectors.isElementDisabled(state, DataElements.ANNOTATION_STYLE_POPUP),\n selectors.isToolDefaultStyleUpdateFromAnnotationPopupEnabled(state),\n selectors.getActiveDocumentViewerKey(state),\n ]);\n\n const dispatch = useDispatch();\n const [t] = useTranslation();\n const [isAutoSizeFont, setAutoSizeFont] = useState(properties.isAutoSizeFont);\n\n const handleSliderChange = (property, value) => {\n const annotationManager = core.getAnnotationManager(activeDocumentViewerKey);\n annotations.forEach((annotation) => {\n annotation[property] = value;\n if (property === 'StrokeThickness') {\n adjustFreeTextBoundingBox(annotation);\n }\n annotationManager.redrawAnnotation(annotation);\n\n if (annotation instanceof window.Core.Annotations.WidgetAnnotation) {\n annotation.refresh();\n }\n });\n };\n\n const handlePropertyChange = (property, value) => {\n annotations.forEach((annotation) => {\n core.setAnnotationStyles(annotation, {\n [property]: value,\n }, activeDocumentViewerKey);\n if (isToolDefaultStyleUpdateFromAnnotationPopupEnabled) {\n setToolStyles(annotation.ToolName, property, value);\n }\n if (property === 'FontSize' || property === 'Font') {\n adjustFreeTextBoundingBox(annotation);\n }\n });\n };\n\n const handleStyleChange = (property, value) => {\n annotations.forEach((annotation) => {\n core.setAnnotationStyles(annotation, {\n [property]: value,\n }, activeDocumentViewerKey);\n\n if (isToolDefaultStyleUpdateFromAnnotationPopupEnabled) {\n setToolStyles(annotation.ToolName, property, value);\n }\n });\n };\n\n const handleRichTextStyleChange = (property, value) => {\n annotations.forEach((annotation) => {\n core.updateAnnotationRichTextStyle(annotation, { [property]: value }, activeDocumentViewerKey);\n });\n };\n\n const handleLineStyleChange = (section, value) => {\n annotations.forEach((annotation) => {\n let lineStyle = '';\n if (section === 'start') {\n annotation.setStartStyle(value);\n lineStyle = 'StartLineStyle';\n } else if (section === 'end') {\n annotation.setEndStyle(value);\n lineStyle = 'EndLineStyle';\n } else if (section === 'middle') {\n const dashes = value.split(',');\n const style = dashes.shift();\n annotation['Style'] = style;\n annotation['Dashes'] = dashes;\n lineStyle = 'StrokeStyle';\n }\n\n if (isToolDefaultStyleUpdateFromAnnotationPopupEnabled) {\n setToolStyles(annotation.ToolName, lineStyle, value);\n }\n\n core.getAnnotationManager(activeDocumentViewerKey).redrawAnnotation(annotation);\n });\n\n core.getAnnotationManager(activeDocumentViewerKey).trigger('annotationChanged', [annotations, 'modify', {}]);\n };\n\n const handleClick = (e) => {\n if (isMobile() && e.target === e.currentTarget) {\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n }\n };\n\n const handleResize = () => {\n onResize && onResize();\n };\n\n const className = getClassName('Popup AnnotationStylePopup', props);\n\n return isDisabled ? null : (\n <Measure\n onResize={handleResize}\n >\n {({ measureRef }) => (\n <div\n className={className}\n data-element={DataElements.ANNOTATION_STYLE_POPUP}\n onClick={handleClick}\n ref={measureRef}\n >\n {hasBackToMenu &&\n <div\n className=\"back-to-menu-container\"\n data-element={DataElements.ANNOTATION_STYLE_POPUP_BACK_BUTTON_CONTAINER}\n >\n <ActionButton\n className=\"back-to-menu-button\"\n dataElement={DataElements.ANNOTATION_STYLE_POPUP_BACK_BUTTON}\n label={t('action.backToMenu')}\n img=\"icon-chevron-left\"\n onClick={onBackToMenu}\n />\n </div>\n }\n {/* Do not show checkbox for ellipse as snap mode does not exist for it */}\n <StylePopup\n hideSnapModeCheckbox={hideSnapModeCheckbox}\n colorMapKey={colorMapKey}\n style={style}\n isFreeText={isFreeText}\n isFreeTextAutoSize={isAutoSizeFont}\n onFreeTextSizeToggle={() => handleFreeTextAutoSizeToggle(annotations[0], setAutoSizeFont, isAutoSizeFont)}\n isEllipse={isEllipse}\n isMeasure={isMeasure}\n onStyleChange={handleStyleChange}\n onSliderChange={handleSliderChange}\n onPropertyChange={handlePropertyChange}\n disableSeparator\n properties={properties}\n onRichTextStyleChange={handleRichTextStyleChange}\n isRedaction={isRedaction}\n showLineStyleOptions={showLineStyleOptions}\n onLineStyleChange={handleLineStyleChange}\n />\n </div>\n )}\n </Measure>\n );\n};\n\nAnnotationStylePopup.propTypes = propTypes;\n\nexport default AnnotationStylePopup;\n","import AnnotationStylePopup from './AnnotationStylePopup';\n\nexport default AnnotationStylePopup;","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/postcss-loader/src/index.js??postcss!../../../../../node_modules/sass-loader/dist/cjs.js!./AnnotationPopup.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = function(styleTag) {\n function findNestedWebComponents(tagName, root = document) {\n const elements = [];\n\n // Check direct children\n root.querySelectorAll(tagName).forEach((el) => elements.push(el));\n\n // Check shadow DOMs\n root.querySelectorAll('*').forEach((el) => {\n if (el.shadowRoot) {\n elements.push(...findNestedWebComponents(tagName, el.shadowRoot));\n }\n });\n\n return elements;\n }\n if (!window.isApryseWebViewerWebComponent) {\n document.head.appendChild(styleTag);\n return;\n }\n\n let webComponents;\n // First we see if the webcomponent is at the document level\n webComponents = document.getElementsByTagName('apryse-webviewer');\n // If not, we check have to check if it is nested in another webcomponent\n if (!webComponents.length) {\n webComponents = findNestedWebComponents('apryse-webviewer');\n }\n // Now we append the style tag to each webcomponent\n const clonedStyleTags = [];\n for (let i = 0; i < webComponents.length; i++) {\n const webComponent = webComponents[i];\n if (i === 0) {\n webComponent.shadowRoot.appendChild(styleTag);\n styleTag.onload = function() {\n if (clonedStyleTags.length > 0) {\n clonedStyleTags.forEach((styleNode) => {\n // eslint-disable-next-line no-unsanitized/property\n styleNode.innerHTML = styleTag.innerHTML;\n });\n }\n };\n } else {\n const styleNode = styleTag.cloneNode(true);\n webComponent.shadowRoot.appendChild(styleNode);\n clonedStyleTags.push(styleNode);\n }\n }\n };\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/postcss-loader/src/index.js??postcss!../../../../../node_modules/sass-loader/dist/cjs.js!./CalibrationPopup.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = function(styleTag) {\n function findNestedWebComponents(tagName, root = document) {\n const elements = [];\n\n // Check direct children\n root.querySelectorAll(tagName).forEach((el) => elements.push(el));\n\n // Check shadow DOMs\n root.querySelectorAll('*').forEach((el) => {\n if (el.shadowRoot) {\n elements.push(...findNestedWebComponents(tagName, el.shadowRoot));\n }\n });\n\n return elements;\n }\n if (!window.isApryseWebViewerWebComponent) {\n document.head.appendChild(styleTag);\n return;\n }\n\n let webComponents;\n // First we see if the webcomponent is at the document level\n webComponents = document.getElementsByTagName('apryse-webviewer');\n // If not, we check have to check if it is nested in another webcomponent\n if (!webComponents.length) {\n webComponents = findNestedWebComponents('apryse-webviewer');\n }\n // Now we append the style tag to each webcomponent\n const clonedStyleTags = [];\n for (let i = 0; i < webComponents.length; i++) {\n const webComponent = webComponents[i];\n if (i === 0) {\n webComponent.shadowRoot.appendChild(styleTag);\n styleTag.onload = function() {\n if (clonedStyleTags.length > 0) {\n clonedStyleTags.forEach((styleNode) => {\n // eslint-disable-next-line no-unsanitized/property\n styleNode.innerHTML = styleTag.innerHTML;\n });\n }\n };\n } else {\n const styleNode = styleTag.cloneNode(true);\n webComponent.shadowRoot.appendChild(styleNode);\n clonedStyleTags.push(styleNode);\n }\n }\n };\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","exports = module.exports = require(\"../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}@keyframes bottom-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes up-bottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}.CalibrationPopup{display:flex;flex-direction:column;align-items:flex-start;padding:var(--padding-medium);width:220px;background:var(--gray-0);box-shadow:0 0 3px var(--gray-7);border-radius:4px}.CalibrationPopup .calibration-popup-label{font-weight:700;margin-bottom:var(--padding-medium)}.CalibrationPopup .pop-switch{margin-top:var(--padding-medium)}.CalibrationPopup .pop-switch.ui__choice--disabled .ui__choice__label{color:var(--gray-5)}.CalibrationPopup .input-container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;grid-gap:var(--padding-small);gap:var(--padding-small);height:32px}.CalibrationPopup .input-container .input-field{width:94px;height:32px}.CalibrationPopup .input-container .input-field.invalid-value{border-color:red}.CalibrationPopup .input-container .input-field:focus{border:1px solid var(--blue-5)}.CalibrationPopup .input-container .input-field .Dropdown__wrapper{width:100%;height:100%}.CalibrationPopup .input-container .input-field .Dropdown__wrapper .Dropdown{height:100%;width:100%!important;text-align:start}.CalibrationPopup .input-container .input-field .Dropdown__wrapper .Dropdown__items{width:100%}\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"LEFT_HEADER_WIDTH\": \"41px\",\n\t\"RIGHT_HEADER_WIDTH\": \"41px\"\n};","exports = module.exports = require(\"../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".open.AnnotationPopup{visibility:visible}.closed.AnnotationPopup{visibility:hidden}:host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}.AnnotationPopup{position:absolute;z-index:70;display:flex;justify-content:center;align-items:center}.AnnotationPopup:empty{padding:0}.AnnotationPopup .buttons{display:flex}.AnnotationPopup .Button{margin:4px;width:32px;height:32px}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .AnnotationPopup .Button{width:42px;height:42px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .AnnotationPopup .Button{width:42px;height:42px}}.AnnotationPopup .Button:hover{background:var(--popup-button-hover)}.AnnotationPopup .Button:hover:disabled{background:none}.AnnotationPopup .Button .Icon{width:18px;height:18px}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .AnnotationPopup .Button .Icon{width:24px;height:24px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .AnnotationPopup .Button .Icon{width:24px;height:24px}}.is-vertical.AnnotationPopup .Button.main-menu-button{width:100%;border-radius:0;justify-content:flex-start;padding-inline-start:var(--padding-small);padding-inline-end:var(--padding-small);margin:0 0 var(--padding-tiny) 0}.is-vertical.AnnotationPopup .Button.main-menu-button:first-child{margin-top:var(--padding-tiny)}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .is-vertical.AnnotationPopup .Button.main-menu-button{width:100%;height:32px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .is-vertical.AnnotationPopup .Button.main-menu-button{width:100%;height:32px}}.is-vertical.AnnotationPopup .Button.main-menu-button .Icon{margin-inline-end:10px}.is-vertical.AnnotationPopup .Button.main-menu-button span{white-space:nowrap}@keyframes bottom-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes up-bottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}.AnnotationPopup{position:fixed;border-radius:4px;box-shadow:0 0 3px 0 var(--document-box-shadow);background:var(--component-background)}.AnnotationPopup.is-horizontal .container{display:inherit}.AnnotationPopup.is-vertical{flex-direction:column;align-items:flex-start}.shortCuts3D{position:relative}.shortCuts3D .closeButton{position:absolute;inset-inline-end:4px;padding:2px;cursor:pointer;width:20px;text-align:center}.shortCuts3D .row{padding:4px 0;margin:8px 26px 8px 16px}.shortCuts3D .row span{background:#e7ebee;padding:4px 8px;border-radius:4px}\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"LEFT_HEADER_WIDTH\": \"41px\",\n\t\"RIGHT_HEADER_WIDTH\": \"41px\"\n};","import React, { useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst DatePicker = ({ onClick, annotation, onDatePickerShow }) => {\n const dateRef = useRef(null);\n const dateContainerRef = useRef(null);\n useEffect(() => {\n let datePicker;\n const getDatePicker = async () => {\n datePicker = await window.Core.createDatePicker({\n field: dateRef.current,\n onClick,\n container: dateContainerRef.current,\n format: annotation.getDateFormat(),\n });\n onDatePickerShow(true);\n };\n getDatePicker();\n\n return () => {\n datePicker.destroy();\n datePicker = null;\n onDatePickerShow(false);\n };\n }, []);\n return (\n <div data-element=\"datePickerContainer\">\n <div ref={dateRef} />\n <div ref={dateContainerRef}/>\n </div>\n );\n};\n\nDatePicker.propTypes = {\n onClick: PropTypes.func.isRequired,\n annotation: PropTypes.object.isRequired,\n onDatePickerShow: PropTypes.func.isRequired\n};\n\nexport default DatePicker;\n","import DatePicker from './DatePicker';\n\nexport default DatePicker;","import React, { useState, useEffect, useRef } from 'react';\nimport selectors from 'selectors';\nimport { useSelector, useDispatch, shallowEqual } from 'react-redux';\nimport core from 'core';\nimport actions from 'actions';\nimport Choice from 'components/Choice';\nimport Dropdown from '../Dropdown';\nimport Tooltip from '../Tooltip';\nimport PropTypes from 'prop-types';\nimport { useTranslation } from 'react-i18next';\nimport {\n metricUnits,\n convertUnit,\n fractionalUnits,\n floatRegex,\n inFractionalRegex,\n ftInFractionalRegex,\n ftInDecimalRegex,\n parseFtInDecimal,\n parseInFractional,\n parseFtInFractional,\n hintValues\n} from 'constants/measurementScale';\nimport classNames from 'classnames';\n\nimport './CalibrationPopup.scss';\n\nconst Scale = window.Core.Scale;\n\nconst parseMeasurementContentsByAnnotation = (annotation) => {\n const factor = annotation.Measure.axis[0].factor;\n const unit = annotation.Scale[1][1];\n\n switch (unit) {\n case 'ft-in':\n return (annotation.getLineLength() * factor) / 12;\n case 'in':\n default:\n return annotation.getLineLength() * factor;\n }\n};\n\nconst getDefaultPageUnit = (pageUnit) => {\n if (pageUnit === 'pt') {\n return 'pt';\n }\n if (metricUnits.includes(pageUnit)) {\n return 'mm';\n }\n return 'in';\n};\n\nconst CalibrationPropType = {\n annotation: PropTypes.shape({\n Scale: PropTypes.arrayOf(PropTypes.array),\n }),\n};\n\nconst CalibrationPopup = ({ annotation }) => {\n const [t] = useTranslation();\n const dispatch = useDispatch();\n\n const [\n measurementUnits,\n { tempScale, isFractionalUnit, defaultUnit }\n ] = useSelector((state) => [\n selectors.getMeasurementUnits(state),\n selectors.getCalibrationInfo(state)\n ], shallowEqual);\n const [valueDisplay, setValueDisplay] = useState('');\n const inputRef = useRef(null);\n\n const unitTo = new Scale(tempScale).worldScale?.unit || 'mm';\n const unitToOptions = isFractionalUnit ? measurementUnits.to.filter((unit) => fractionalUnits.includes(unit)) : measurementUnits.to;\n const isFractionalUnitsToggleDisabled = !fractionalUnits.includes(unitTo);\n const valueInputType = (isFractionalUnit || unitTo === 'ft-in') ? 'text' : 'number';\n const inputValueClass = classNames('input-field', {\n 'invalid-value': !(tempScale && new Scale(tempScale).worldScale?.value > 0)\n });\n\n const updateTempScale = (scaleValue, scaleUnit) => {\n const currentDistance = parseMeasurementContentsByAnnotation(annotation);\n const currentScale = annotation.Scale;\n const newRatio = currentDistance / currentScale[1][0];\n const pageScale = [currentScale[0][0] * newRatio, currentScale[0][1]];\n const defaultPageUnit = getDefaultPageUnit(scaleUnit);\n const defaultPageValue = convertUnit(pageScale[0], pageScale[1], defaultPageUnit);\n dispatch(actions.updateCalibrationInfo({ tempScale: `${defaultPageValue} ${defaultPageUnit} = ${scaleValue} ${scaleUnit}`, isFractionalUnit }));\n };\n\n const setValue = (scaleValue) => {\n updateTempScale(scaleValue, new Scale(tempScale).worldScale?.unit);\n };\n\n const setUnitTo = (scaleUnit) => {\n updateTempScale(new Scale(tempScale).worldScale?.value, scaleUnit);\n };\n\n const toggleFractionalUnits = () => {\n dispatch(actions.updateCalibrationInfo({ tempScale, isFractionalUnit: !isFractionalUnit }));\n };\n\n const onValueInputChange = (e) => {\n setValueDisplay(e.target.value);\n const inputValue = e.target.value.trim();\n if (!isFractionalUnit) {\n if (unitTo === 'ft-in' && ftInDecimalRegex.test(inputValue)) {\n const result = parseFtInDecimal(inputValue);\n if (result > 0) {\n setValue(result);\n return;\n }\n } else if (floatRegex.test(inputValue)) {\n const result = parseFloat(inputValue) || 0;\n setValue(result);\n return;\n }\n } else {\n if (unitTo === 'in') {\n if (inFractionalRegex.test(inputValue)) {\n const result = parseInFractional(inputValue);\n if (result > 0) {\n setValue(result);\n return;\n }\n }\n } else if (unitTo === 'ft-in') {\n if (ftInFractionalRegex.test(inputValue)) {\n const result = parseFtInFractional(inputValue);\n if (result > 0) {\n setValue(result);\n return;\n }\n }\n }\n }\n setValue(0);\n };\n\n const onValueInputBlur = () => {\n updateValueDisplay();\n };\n\n const updateValueDisplay = () => {\n const scaleValue = new Scale(tempScale).worldScale?.value;\n let newValueDisplay;\n if (!isFractionalUnit && unitTo !== 'ft-in') {\n newValueDisplay = `${scaleValue}`;\n } else {\n newValueDisplay = Scale.getFormattedValue(scaleValue, unitTo, isFractionalUnit ? 1 / 64 : 0.0001, false, true);\n }\n setValueDisplay(newValueDisplay || '');\n };\n\n const tempScaleRef = useRef(tempScale);\n useEffect(() => {\n tempScaleRef.current = tempScale;\n }, [tempScale]);\n useEffect(() => {\n if (annotation) {\n const value = parseMeasurementContentsByAnnotation(annotation);\n const unit = annotation.Scale[1][1];\n if (defaultUnit) {\n updateTempScale(convertUnit(value, unit, defaultUnit), defaultUnit);\n } else {\n updateTempScale(value, unit);\n }\n }\n\n const onAnnotationChanged = (annotations, action) => {\n if (action === 'modify' && annotations.length === 1 && annotations[0] === annotation) {\n const value = parseMeasurementContentsByAnnotation(annotation);\n const unit = annotation.Scale[1][1];\n const currentUnit = new Scale(tempScaleRef.current).worldScale?.unit;\n if (currentUnit) {\n updateTempScale(convertUnit(value, unit, currentUnit), currentUnit);\n } else {\n updateTempScale(value, unit);\n }\n }\n };\n core.addEventListener('annotationChanged', onAnnotationChanged);\n\n return () => {\n core.removeEventListener('annotationChanged', onAnnotationChanged);\n core.deleteAnnotations([annotation]);\n };\n }, [annotation]);\n\n useEffect(() => {\n if (inputRef?.current !== document.activeElement) {\n updateValueDisplay();\n }\n }, [tempScale, isFractionalUnit]);\n\n return (\n <div className=\"CalibrationPopup\" data-element=\"calibrationPopup\">\n <label className=\"calibration-popup-label\" id='calibration-popup-label' htmlFor='calibration-popup-value'>{t('option.measurement.scaleModal.units')}</label>\n <div className=\"input-container\">\n <input\n id='calibration-popup-value'\n className={inputValueClass}\n ref={inputRef}\n type={valueInputType}\n value={valueDisplay}\n min='0'\n onChange={onValueInputChange}\n onBlur={onValueInputBlur}\n placeholder={isFractionalUnit ? hintValues[unitTo] : (unitTo === 'ft-in' ? hintValues['ft-in decimal'] : '')}\n />\n <Tooltip content={'option.measurement.scaleModal.displayUnits'}>\n <div className=\"input-field\">\n <Dropdown\n id=\"calibration-popup-units\"\n dataElement=\"calibrationUnits\"\n items={unitToOptions}\n currentSelectionKey={unitTo}\n onClickItem={setUnitTo}\n labelledById='calibration-popup-label'\n />\n </div>\n </Tooltip>\n </div>\n <Tooltip content={t('option.measurement.scaleModal.fractionUnitsTooltip')}>\n <div>\n <Choice\n isSwitch\n leftLabel\n label={t('option.measurement.scaleModal.fractionalUnits')}\n disabled={isFractionalUnitsToggleDisabled}\n checked={isFractionalUnit}\n id=\"calibration-popup-fractional-units\"\n className=\"pop-switch\"\n onChange={toggleFractionalUnits}\n />\n </div>\n </Tooltip>\n </div>\n );\n};\n\nCalibrationPopup.propTypes = CalibrationPropType;\n\nexport default CalibrationPopup;\n","import CalibrationPopup from './CalibrationPopup';\n\nexport default CalibrationPopup;","import React, { useState } from 'react';\nimport Draggable from 'react-draggable';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { useTranslation } from 'react-i18next';\nimport FocusTrap from 'components/FocusTrap';\n\nimport ActionButton from 'components/ActionButton';\nimport AnnotationStylePopup from 'components/AnnotationStylePopup';\nimport DatePicker from 'components/DatePicker';\nimport CustomizablePopup from 'components/CustomizablePopup';\nimport CalibrationPopup from 'components/CalibrationPopup';\n\nimport { getDataWithKey, mapToolNameToKey, mapAnnotationToKey } from 'constants/map';\n\nimport DataElements from 'constants/dataElement';\n\nimport './AnnotationPopup.scss';\nimport getRootNode from 'helpers/getRootNode';\n\nconst propTypes = {\n isMobile: PropTypes.bool,\n isIE: PropTypes.bool,\n isOpen: PropTypes.bool,\n isRightClickMenu: PropTypes.bool,\n isNotesPanelOpenOrActive: PropTypes.bool,\n isRichTextPopupOpen: PropTypes.bool,\n isLinkModalOpen: PropTypes.bool,\n isWarningModalOpen: PropTypes.bool,\n isContextMenuPopupOpen: PropTypes.bool,\n isVisible: PropTypes.bool,\n\n focusedAnnotation: PropTypes.object,\n multipleAnnotationsSelected: PropTypes.bool,\n popupRef: PropTypes.any,\n position: PropTypes.object,\n\n showViewFileButton: PropTypes.bool,\n onViewFile: PropTypes.func,\n\n showCommentButton: PropTypes.bool,\n onCommentAnnotation: PropTypes.func,\n isDateFreeTextCanEdit: PropTypes.bool,\n isDatePickerOpen: PropTypes.bool,\n handleDateChange: PropTypes.func,\n onDatePickerShow: PropTypes.func,\n isCalibrationPopupOpen: PropTypes.bool,\n\n showEditStyleButton: PropTypes.bool,\n isStylePopupOpen: PropTypes.bool,\n hideSnapModeCheckbox: PropTypes.bool,\n openEditStylePopup: PropTypes.func,\n closeEditStylePopup: PropTypes.func,\n annotationStyle: PropTypes.object,\n onResize: PropTypes.func,\n\n showContentEditButton: PropTypes.bool,\n onEditContent: PropTypes.func,\n openContentEditDeleteWarningModal: PropTypes.func,\n\n isAppearanceSignature: PropTypes.bool,\n onClearAppearanceSignature: PropTypes.func,\n\n showRedactionButton: PropTypes.bool,\n onApplyRedaction: PropTypes.func,\n\n showGroupButton: PropTypes.bool,\n onGroupAnnotations: PropTypes.func,\n showUngroupButton: PropTypes.bool,\n onUngroupAnnotations: PropTypes.func,\n\n showFormFieldButton: PropTypes.bool,\n onOpenFormField: PropTypes.func,\n\n showDeleteButton: PropTypes.bool,\n onDeleteAnnotation: PropTypes.func,\n\n showLinkButton: PropTypes.bool,\n hasAssociatedLink: PropTypes.bool,\n linkAnnotationToURL: PropTypes.func,\n\n showFileDownloadButton: PropTypes.bool,\n downloadFileAttachment: PropTypes.func,\n\n showAudioPlayButton: PropTypes.bool,\n handlePlaySound: PropTypes.func,\n\n showCalibrateButton: PropTypes.bool,\n onOpenCalibration: PropTypes.func,\n\n customizableUI: PropTypes.bool,\n toggleStylePanel: PropTypes.func,\n isInReadOnlyMode: PropTypes.bool,\n onOpenAlignmentModal: PropTypes.func,\n};\n\nconst AnnotationPopup = ({\n isMobile,\n isIE,\n isOpen,\n isRightClickMenu,\n isNotesPanelOpenOrActive,\n isRichTextPopupOpen,\n isLinkModalOpen,\n isWarningModalOpen,\n isContextMenuPopupOpen,\n isVisible,\n\n focusedAnnotation,\n popupRef,\n position,\n multipleAnnotationsSelected,\n\n showViewFileButton,\n onViewFile,\n\n showCommentButton,\n onCommentAnnotation,\n isDateFreeTextCanEdit,\n isDatePickerOpen,\n handleDateChange,\n onDatePickerShow,\n isCalibrationPopupOpen,\n\n showEditStyleButton,\n isStylePopupOpen,\n hideSnapModeCheckbox,\n openEditStylePopup,\n closeEditStylePopup,\n annotationStyle,\n onResize,\n\n showContentEditButton,\n onEditContent,\n openContentEditDeleteWarningModal,\n\n isAppearanceSignature,\n onClearAppearanceSignature,\n\n showRedactionButton,\n onApplyRedaction,\n\n showGroupButton,\n onGroupAnnotations,\n showUngroupButton,\n onUngroupAnnotations,\n\n showFormFieldButton,\n onOpenFormField,\n\n showDeleteButton,\n onDeleteAnnotation,\n\n showLinkButton,\n hasAssociatedLink,\n linkAnnotationToURL,\n\n showFileDownloadButton,\n downloadFileAttachment,\n\n showAudioPlayButton,\n handlePlaySound,\n\n showCalibrateButton,\n onOpenCalibration,\n\n customizableUI,\n toggleStylePanel,\n isInReadOnlyMode,\n onOpenAlignmentModal,\n}) => {\n const [t] = useTranslation();\n const [shortCutKeysFor3DVisible, setShortCutKeysFor3DVisible] = useState(false);\n\n const commentButtonLabel = isDateFreeTextCanEdit ? 'action.changeDate' : 'action.comment';\n const commentButtonImg = isDateFreeTextCanEdit ? 'icon-tool-fill-and-sign-calendar' : 'icon-header-chat-line';\n const show3DShortCutButton = !isInReadOnlyMode && focusedAnnotation instanceof window.Core.Annotations.Model3DAnnotation && !isMobile;\n const isRectangle = focusedAnnotation instanceof window.Core.Annotations.RectangleAnnotation;\n const isEllipse = focusedAnnotation instanceof window.Core.Annotations.EllipseAnnotation;\n const isPolygon = focusedAnnotation instanceof window.Core.Annotations.PolygonAnnotation;\n const isFreeText =\n focusedAnnotation instanceof window.Core.Annotations.FreeTextAnnotation &&\n (focusedAnnotation.getIntent() === window.Core.Annotations.FreeTextAnnotation.Intent.FreeText ||\n focusedAnnotation.getIntent() === window.Core.Annotations.FreeTextAnnotation.Intent.FreeTextCallout);\n const isRedaction = focusedAnnotation instanceof window.Core.Annotations.RedactionAnnotation;\n const colorMapKey = mapAnnotationToKey(focusedAnnotation);\n const isMeasure = !!focusedAnnotation.Measure;\n const showLineStyleOptions = getDataWithKey(mapToolNameToKey(focusedAnnotation.ToolName)).hasLineEndings;\n const isInstanceActive = !window.isApryseWebViewerWebComponent || document.activeElement?.shadowRoot === getRootNode();\n let StrokeStyle = 'solid';\n const isContentEdit = focusedAnnotation.isContentEditPlaceholder?.();\n const isReadOnlySignature = focusedAnnotation instanceof window.Core.Annotations.SignatureWidgetAnnotation && focusedAnnotation.fieldFlags.get(window.Core.Annotations.WidgetFlags.READ_ONLY);\n const showClearSignatureButton = isAppearanceSignature && !showFormFieldButton;\n try {\n StrokeStyle = (focusedAnnotation['Style'] === 'dash')\n ? `${focusedAnnotation['Style']},${focusedAnnotation['Dashes']}`\n : focusedAnnotation['Style'];\n } catch (err) {\n console.error(err);\n }\n let properties = {};\n if (showLineStyleOptions) {\n properties = {\n StartLineStyle: focusedAnnotation.getStartStyle(),\n EndLineStyle: focusedAnnotation.getEndStyle(),\n StrokeStyle,\n };\n }\n\n if (isRectangle || isEllipse || isPolygon) {\n properties = {\n StrokeStyle,\n };\n }\n\n if (isFreeText) {\n const richTextStyles = focusedAnnotation.getRichTextStyle();\n const isAutoSizeFont = focusedAnnotation.isAutoSizeFont();\n const calculatedFontSize = focusedAnnotation.getCalculatedFontSize();\n\n properties = {\n Font: focusedAnnotation.Font,\n FontSize: focusedAnnotation.FontSize,\n TextAlign: focusedAnnotation.TextAlign,\n TextVerticalAlign: focusedAnnotation.TextVerticalAlign,\n bold: richTextStyles?.[0]?.['font-weight'] === 'bold' ?? false,\n italic: richTextStyles?.[0]?.['font-style'] === 'italic' ?? false,\n underline: richTextStyles?.[0]?.['text-decoration']?.includes('underline') || richTextStyles?.[0]?.['text-decoration']?.includes('word'),\n strikeout: richTextStyles?.[0]?.['text-decoration']?.includes('line-through') ?? false,\n StrokeStyle,\n isAutoSizeFont,\n calculatedFontSize,\n };\n }\n\n if (isRedaction) {\n properties = {\n OverlayText: focusedAnnotation['OverlayText'],\n Font: focusedAnnotation['Font'],\n FontSize: focusedAnnotation['FontSize'],\n TextAlign: focusedAnnotation['TextAlign']\n };\n }\n\n const renderPopup = () => {\n switch (true) {\n case isStylePopupOpen:\n return (\n <AnnotationStylePopup\n annotations={[focusedAnnotation]}\n style={annotationStyle}\n isOpen={isOpen}\n onResize={onResize}\n isFreeText={isFreeText}\n isEllipse={isEllipse}\n isRedaction={isRedaction}\n isMeasure={isMeasure}\n colorMapKey={colorMapKey}\n showLineStyleOptions={showLineStyleOptions}\n properties={properties}\n hideSnapModeCheckbox={hideSnapModeCheckbox}\n hasBackToMenu={isRightClickMenu}\n onBackToMenu={closeEditStylePopup}\n />\n );\n case isDatePickerOpen:\n return (\n <DatePicker onClick={handleDateChange} annotation={focusedAnnotation} onDatePickerShow={onDatePickerShow} />\n );\n case isCalibrationPopupOpen:\n return <CalibrationPopup annotation={focusedAnnotation} />;\n case shortCutKeysFor3DVisible && focusedAnnotation instanceof window.Core.Annotations.Model3DAnnotation:\n return (\n <div className=\"shortCuts3D\">\n <div className=\"closeButton\" onClick={() => setShortCutKeysFor3DVisible(false)}>x</div>\n <div className=\"row\">{t('action.rotate3D')} <span>{t('shortcut.rotate3D')}</span></div>\n <div className=\"row\">{t('action.zoom')} <span>{t('shortcut.zoom3D')}</span></div>\n </div>\n );\n default:\n return (\n <FocusTrap\n locked={isOpen && isInstanceActive && !isRichTextPopupOpen && !isNotesPanelOpenOrActive && !isLinkModalOpen && !isWarningModalOpen && !isFreeText && !isContextMenuPopupOpen}\n >\n <div className=\"container\">\n <CustomizablePopup\n dataElement={DataElements.ANNOTATION_POPUP}\n childrenClassName='main-menu-button'\n >\n {showViewFileButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"viewFileButton\"\n label={isRightClickMenu ? 'action.viewFile' : ''}\n title={!isRightClickMenu ? 'action.viewFile' : ''}\n img=\"icon-view\"\n onClick={onViewFile}\n />\n )}\n {showCommentButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationCommentButton\"\n label={isRightClickMenu ? commentButtonLabel : ''}\n title={!isRightClickMenu ? commentButtonLabel : ''}\n img={commentButtonImg}\n onClick={onCommentAnnotation}\n />\n )}\n {showEditStyleButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationStyleEditButton\"\n label={isRightClickMenu ? 'action.style' : ''}\n title={!isRightClickMenu ? 'action.style' : ''}\n img=\"icon-menu-style-line\"\n onClick={customizableUI ? toggleStylePanel : openEditStylePopup}\n />\n )}\n {showContentEditButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationContentEditButton\"\n label={isRightClickMenu ? 'action.edit' : ''}\n title={!isRightClickMenu ? 'action.edit' : ''}\n img=\"ic_edit_page_24px\"\n onClick={onEditContent}\n />\n )}\n {showClearSignatureButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationClearSignatureButton\"\n label={!isReadOnlySignature && isRightClickMenu ? 'action.clearSignature' : ''}\n title={isReadOnlySignature ? 'action.readOnlySignature' : (!isRightClickMenu ? 'action.clearSignature' : '')}\n img={'icon-delete-line'}\n onClick={onClearAppearanceSignature}\n isNotClickableSelector={() => isReadOnlySignature}\n />\n )}\n {showRedactionButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationRedactButton\"\n label={isRightClickMenu ? 'action.apply' : ''}\n title={!isRightClickMenu ? 'action.apply' : ''}\n img=\"ic_check_black_24px\"\n onClick={onApplyRedaction}\n />\n )}\n {showGroupButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationGroupButton\"\n label={isRightClickMenu ? 'action.group' : ''}\n title={!isRightClickMenu ? 'action.group' : ''}\n img=\"group-annotations-icon\"\n onClick={onGroupAnnotations}\n />\n )}\n {showUngroupButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationUngroupButton\"\n label={isRightClickMenu ? 'action.ungroup' : ''}\n title={!isRightClickMenu ? 'action.ungroup' : ''}\n img=\"ungroup-annotations-icon\"\n onClick={onUngroupAnnotations}\n />\n )}\n {multipleAnnotationsSelected && !isMobile && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement='openAlignmentButton'\n label={isRightClickMenu ? 'alignmentPopup.alignment' : ''}\n title={!isRightClickMenu ? 'alignmentPopup.alignment' : ''}\n img=\"ic-alignment-main\"\n onClick={onOpenAlignmentModal}\n />\n )}\n {showFormFieldButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"formFieldEditButton\"\n label={isRightClickMenu ? 'action.formFieldEdit' : ''}\n title={!isRightClickMenu ? 'action.formFieldEdit' : ''}\n img=\"icon-edit-form-field\"\n onClick={onOpenFormField}\n />\n )}\n {showDeleteButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationDeleteButton\"\n label={isRightClickMenu ? 'action.delete' : ''}\n title={!isRightClickMenu ? 'action.delete' : ''}\n img=\"icon-delete-line\"\n onClick={isContentEdit ? openContentEditDeleteWarningModal : onDeleteAnnotation}\n />\n )}\n {showCalibrateButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement={DataElements.CALIBRATION_POPUP_BUTTON}\n label={isRightClickMenu ? 'action.calibrate' : ''}\n title={!isRightClickMenu ? 'action.calibrate' : ''}\n img=\"calibrate\"\n onClick={onOpenCalibration}\n />\n )}\n {showLinkButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"linkButton\"\n label={isRightClickMenu ? 'tool.Link' : ''}\n title={!isRightClickMenu ? 'tool.Link' : ''}\n img={hasAssociatedLink ? 'icon-tool-unlink' : 'icon-tool-link'}\n onClick={linkAnnotationToURL}\n />\n )}\n {showFileDownloadButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"fileAttachmentDownload\"\n label={isRightClickMenu ? 'action.fileAttachmentDownload' : ''}\n title={!isRightClickMenu ? 'action.fileAttachmentDownload' : ''}\n img=\"icon-download\"\n onClick={() => downloadFileAttachment(focusedAnnotation)}\n />\n )}\n {show3DShortCutButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"shortCutKeysFor3D\"\n label={isRightClickMenu ? 'action.viewShortCutKeysFor3D' : ''}\n title={!isRightClickMenu ? 'action.viewShortCutKeysFor3D' : ''}\n img=\"icon-keyboard\"\n onClick={() => setShortCutKeysFor3DVisible(true)}\n />\n )}\n {showAudioPlayButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"playSoundButton\"\n label={isRightClickMenu ? 'action.playAudio' : ''}\n title={!isRightClickMenu ? 'action.playAudio' : ''}\n img=\"ic_play_24px\"\n onClick={() => handlePlaySound(focusedAnnotation)}\n />\n )}\n </CustomizablePopup>\n </div>\n </FocusTrap>\n );\n }\n };\n\n const annotationPopup = (\n <div\n className={classNames({\n Popup: true,\n AnnotationPopup: true,\n open: isOpen,\n closed: !isOpen,\n stylePopupOpen: isStylePopupOpen,\n 'is-vertical': isRightClickMenu,\n 'is-horizontal': !isRightClickMenu,\n })}\n ref={popupRef}\n data-element={DataElements.ANNOTATION_POPUP}\n style={{ ...position, visibility: isVisible || isVisible === undefined ? 'visible' : 'hidden' }}\n >\n {renderPopup()}\n </div>\n );\n\n return isIE || isMobile ? (\n annotationPopup\n ) : (\n <Draggable cancel=\".Button, .cell, .sliders-container svg, select, button, input\">{annotationPopup}</Draggable>\n );\n};\n\nAnnotationPopup.propTypes = propTypes;\n\nexport default AnnotationPopup;","import React, { useState, useEffect, useRef, useCallback, useLayoutEffect } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport debounce from 'lodash/debounce';\nimport { saveAs } from 'file-saver';\n\nimport core from 'core';\nimport { getAnnotationPopupPositionBasedOn } from 'helpers/getPopupPosition';\nimport applyRedactions from 'helpers/applyRedactions';\nimport { isMobile, isIE } from 'helpers/device';\nimport { useTranslation } from 'react-i18next';\nimport { getOpenedWarningModal, getOpenedColorPicker, getDatePicker } from 'helpers/getElements';\nimport getGroupedLinkAnnotations from 'helpers/getGroupedLinkAnnotations';\nimport getHashParameters from 'helpers/getHashParameters';\nimport useOnClickOutside from 'hooks/useOnClickOutside';\nimport actions from 'actions';\nimport selectors from 'selectors';\nimport DataElements from 'constants/dataElement';\nimport { PRIORITY_THREE } from 'constants/actionPriority';\nimport getRootNode from 'helpers/getRootNode';\nimport { ITEM_RENDER_PREFIXES } from 'constants/customizationVariables';\nimport AnnotationPopup from './AnnotationPopup';\n\nimport './AnnotationPopup.scss';\nimport { isAnnotationRenderedInDisplayMode } from 'src/helpers/isAnnotationRenderedInDisplayMode';\n\nconst { ToolNames } = window.Core.Tools;\nconst { Annotations } = window.Core;\n\nconst propTypes = {\n focusedAnnotation: PropTypes.object,\n selectedMultipleAnnotations: PropTypes.bool,\n canModify: PropTypes.bool,\n focusedAnnotationStyle: PropTypes.object,\n isStylePopupOpen: PropTypes.bool,\n setIsStylePopupOpen: PropTypes.func,\n isDatePickerOpen: PropTypes.bool,\n setDatePickerOpen: PropTypes.func,\n isDatePickerMount: PropTypes.bool,\n setDatePickerMount: PropTypes.func,\n hasAssociatedLink: PropTypes.bool,\n includesFormFieldAnnotation: PropTypes.bool,\n stylePopupRepositionFlag: PropTypes.bool,\n setStylePopupRepositionFlag: PropTypes.func,\n closePopup: PropTypes.func,\n};\n\nconst AnnotationPopupContainer = ({\n focusedAnnotation,\n selectedMultipleAnnotations,\n canModify,\n focusedAnnotationStyle,\n isStylePopupOpen,\n setIsStylePopupOpen,\n isDatePickerOpen,\n setDatePickerOpen,\n isDatePickerMount,\n setDatePickerMount,\n hasAssociatedLink,\n includesFormFieldAnnotation,\n stylePopupRepositionFlag,\n setStylePopupRepositionFlag,\n closePopup,\n}) => {\n const isDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.ANNOTATION_POPUP));\n const isOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.ANNOTATION_POPUP));\n const isContextMenuPopupOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.CONTEXT_MENU_POPUP));\n const isRightClickAnnotationPopupEnabled = useSelector(selectors.isRightClickAnnotationPopupEnabled);\n const isNotesPanelDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.NOTES_PANEL));\n const isAnnotationStylePopupDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.ANNOTATION_STYLE_POPUP));\n const isInlineCommentingDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.INLINE_COMMENT_POPUP));\n const isNotesPanelOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.NOTES_PANEL));\n const isLinkModalOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.LINK_MODAL));\n const isWarningModalOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.WARNING_MODAL));\n const isRichTextPopupOpen = useSelector((state) => selectors.isElementOpen(state, 'richTextPopup'));\n const isMultiTab = useSelector(selectors.getIsMultiTab);\n const tabManager = useSelector(selectors.getTabManager);\n const tabs = useSelector(selectors.getTabs);\n const notesInLeftPanel = useSelector(selectors.getNotesInLeftPanel);\n const leftPanelOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.LEFT_PANEL));\n const activeLeftPanel = useSelector(selectors.getActiveLeftPanel);\n const activeDocumentViewerKey = useSelector(selectors.getActiveDocumentViewerKey);\n const isAnyCustomPanelOpen = useSelector(selectors.isAnyCustomPanelOpen);\n const featureFlags = useSelector(selectors.getFeatureFlags);\n const isStylePanelOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.STYLE_PANEL));\n const isStylePanelDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.STYLE_PANEL));\n const stylePanelInFlyout = useSelector((state) => selectors.getIsPanelInFlyout(state, ITEM_RENDER_PREFIXES.STYLE_PANEL, [DataElements.MULTI_SELECT_STYLE_PANEL_FLYOUT]));\n const isStylePanelFlyoutOpen = useSelector((state) => selectors.isElementOpen(state, stylePanelInFlyout?.dataElement));\n const [t] = useTranslation();\n const dispatch = useDispatch();\n const [position, setPosition] = useState({ left: 0, top: 0 });\n const [isVisible, setIsVisible] = useState(false);\n const [isCalibrationPopupOpen, setCalibrationPopupOpen] = useState(false);\n const popupRef = useRef();\n\n const isFocusedAnnotationSelected = isRightClickAnnotationPopupEnabled ? core.isAnnotationSelected(focusedAnnotation, activeDocumentViewerKey) : true;\n const annotManager = core.getAnnotationManager(activeDocumentViewerKey);\n const sixtyFramesPerSecondIncrement = 16;\n // on tablet, the behaviour will be like on desktop, including being draggable\n\n const { customizableUI } = featureFlags;\n\n const toggleStylePanel = () => {\n if (!isStylePanelOpen && !isStylePanelDisabled && !stylePanelInFlyout) {\n dispatch(actions.openElement(DataElements.STYLE_PANEL));\n }\n if (stylePanelInFlyout) {\n if (isStylePanelFlyoutOpen) {\n dispatch(actions.closeElement(stylePanelInFlyout.dataElement));\n } else {\n dispatch(actions.openFlyout(stylePanelInFlyout.dataElement, 'annotationStyleEditButton'));\n }\n }\n if (!stylePanelInFlyout) {\n closePopup();\n }\n };\n\n useOnClickOutside(\n popupRef,\n useCallback((e) => {\n const notesPanel = getRootNode().querySelector(`[data-element=\"${DataElements.NOTES_PANEL}\"]`);\n const clickedInNotesPanel = notesPanel?.contains(e.target);\n const clickedInLinkModal = getRootNode().querySelector('.LinkModal.open')?.contains(e.target);\n const stylePanelFlyout = getRootNode().querySelector(`[data-element=${stylePanelInFlyout?.dataElement}]`);\n const clickedInStylePanelFlyout = stylePanelFlyout?.contains(e.target);\n const datePicker = getDatePicker();\n const warningModal = getOpenedWarningModal();\n const colorPicker = getOpenedColorPicker();\n\n // the notes panel has mousedown handlers to handle the opening/closing states of this component\n // we don't want this handler to run when clicked in the notes panel otherwise the opening/closing states may mess up\n // for example: click on a note will call core.selectAnnotation which triggers the annotationSelected event\n // and opens this component. If we don't exclude the notes panel this handler will run and close it after\n // Similarly, we don't want the popup to close when clicking on the style panel flyout or the flyout loses its anchor.\n if (!clickedInNotesPanel && !clickedInLinkModal && !clickedInStylePanelFlyout && !warningModal && !colorPicker && !datePicker) {\n if (isRightClickAnnotationPopupEnabled) {\n closePopup();\n } else {\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n }\n }\n }, [isRightClickAnnotationPopupEnabled])\n );\n\n const setPopupPosition = () => {\n const visiblePages = core.getDisplayModeObject().getVisiblePages();\n const isFocusableInCurrentDisplayMode = isAnnotationRenderedInDisplayMode(core, focusedAnnotation);\n if (popupRef.current && isFocusableInCurrentDisplayMode && focusedAnnotation) {\n setPosition(getAnnotationPopupPositionBasedOn(focusedAnnotation, popupRef, activeDocumentViewerKey));\n } else if (!isNotesPanelDisabled && !isFocusableInCurrentDisplayMode) {\n const annotations = core.getSelectedAnnotations();\n const annotationInPage = annotations.find(\n (annotation) => visiblePages.includes(annotation.PageNumber)\n );\n setPosition(getAnnotationPopupPositionBasedOn(annotationInPage, popupRef, activeDocumentViewerKey));\n }\n };\n\n const handleResize = debounce(() => {\n if (AnnotationPopupContainer) {\n setPopupPosition();\n }\n }, sixtyFramesPerSecondIncrement, { 'trailing': true, 'leading': false });\n\n const handleVisibility = debounce(() => {\n if (AnnotationPopupContainer) {\n setIsVisible(isFocusedAnnotationSelected);\n }\n }, sixtyFramesPerSecondIncrement * 2, { 'trailing': true, 'leading': false });\n\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, []);\n\n // useLayoutEffect here to avoid flashing issue when popup is close and open on scroll\n useLayoutEffect(() => {\n if (focusedAnnotation || isStylePopupOpen || isDatePickerMount) {\n handleResize();\n setIsVisible(false);\n handleVisibility();\n }\n // canModify is needed here because the effect from useOnAnnotationPopupOpen hook will run again and determine which button to show, which in turn change the popup size and will need to recalculate position\n }, [focusedAnnotation, isStylePopupOpen, isDatePickerMount, canModify, activeDocumentViewerKey]);\n\n useEffect(() => {\n if (focusedAnnotation && focusedAnnotation.ToolName === ToolNames.CALIBRATION_MEASUREMENT) {\n setCalibrationPopupOpen(true);\n }\n }, [focusedAnnotation]);\n\n useEffect(() => {\n if (isOpen || isRichTextPopupOpen) {\n dispatch(actions.closeElement(DataElements.INLINE_COMMENT_POPUP));\n }\n }, [isOpen, isRichTextPopupOpen]);\n\n /* VIEW FILE */\n const wvServer = !!getHashParameters('webviewerServerURL', null);\n const acceptFormats = wvServer ? window.Core.SupportedFileFormats.SERVER : window.Core.SupportedFileFormats.CLIENT;\n const showViewFileButton = focusedAnnotation instanceof Annotations.FileAttachmentAnnotation && isMultiTab\n && acceptFormats.includes(window.Core.mimeTypeToExtension[focusedAnnotation.getFileMetadata().mimeType]);\n\n const onViewFile = useCallback(async () => {\n if (!tabManager || !isMultiTab) {\n return console.warn('Can\\'t open file in non-multi-tab mode');\n }\n const metaData = focusedAnnotation.getFileMetadata();\n const fileAttachmentTab = tabs.find((tab) => tab.options.filename === metaData.filename);\n if (fileAttachmentTab) { // If already opened once\n await tabManager.setActiveTab(fileAttachmentTab.id, true);\n return;\n }\n await tabManager.addTab(await focusedAnnotation.getFileData(), {\n extension: window.Core.mimeTypeToExtension[metaData.mimeType],\n filename: metaData.filename,\n saveCurrentActiveTabState: true,\n setActive: true,\n });\n }, [tabManager, focusedAnnotation, tabs, isMultiTab]);\n\n /* ALL REACT HOOKS NEED TO BE BEFORE RENDERING */\n if (isDisabled || !focusedAnnotation) {\n return null;\n }\n\n /* COMMENT / DATE */\n const selectedAnnotations = core.getSelectedAnnotations(activeDocumentViewerKey);\n const numberOfSelectedAnnotations = selectedAnnotations.length;\n const multipleAnnotationsSelected = numberOfSelectedAnnotations > 1;\n const isFreeTextAnnot = focusedAnnotation instanceof Annotations.FreeTextAnnotation;\n const isDateFreeTextCanEdit = isFreeTextAnnot && !!focusedAnnotation.getDateFormat() && core.canModifyContents(focusedAnnotation, activeDocumentViewerKey);\n const numberOfGroups = core.getNumberOfGroups(selectedAnnotations, activeDocumentViewerKey);\n const canGroup = numberOfGroups > 1;\n const canUngroup = numberOfGroups === 1 && numberOfSelectedAnnotations > 1 && isFocusedAnnotationSelected;\n const isAppearanceSignature =\n focusedAnnotation instanceof Annotations.SignatureWidgetAnnotation\n && focusedAnnotation.isSignedByAppearance();\n const isInReadOnlyMode = core.getIsReadOnly();\n\n const showCommentButton = (\n (!isNotesPanelDisabled || !isInlineCommentingDisabled)\n && (!multipleAnnotationsSelected || (multipleAnnotationsSelected && !isFocusedAnnotationSelected))\n && focusedAnnotation.ToolName !== ToolNames.CROP\n && !includesFormFieldAnnotation\n && !focusedAnnotation.isContentEditPlaceholder()\n && !isAppearanceSignature\n );\n\n const onCommentAnnotation = () => {\n if (isDateFreeTextCanEdit) {\n setDatePickerOpen(true);\n return;\n }\n\n dispatch(actions.closeElement('searchPanel'));\n dispatch(actions.closeElement('redactionPanel'));\n const contentEditManager = core.getContentEditManager(activeDocumentViewerKey);\n if (contentEditManager.isInContentEditMode()) {\n dispatch(actions.closeElement('textEditingPanel'));\n contentEditManager.endContentEditMode();\n }\n\n dispatch(actions.triggerNoteEditing());\n if (isInlineCommentingDisabled) {\n dispatch(actions.openElement(DataElements.NOTES_PANEL));\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n } else {\n if (!isNotesPanelOpen) {\n dispatch(actions.openElement(DataElements.INLINE_COMMENT_POPUP));\n }\n closePopup();\n }\n };\n\n const onOpenAlignmentModal = () => {\n dispatch(actions.openElement(DataElements.ANNOTATION_ALIGNMENT_POPUP));\n closePopup();\n };\n\n const handleDateChange = (text) => {\n annotManager.setNoteContents(focusedAnnotation, text);\n annotManager.updateAnnotation(focusedAnnotation);\n };\n\n const onDatePickerShow = (isDatePickerShowed) => {\n setDatePickerMount(isDatePickerShowed);\n };\n\n /* EDIT STYLE */\n const hasStyle = Object.keys(focusedAnnotationStyle).length > 0;\n\n const toolsWithNoStyling = [\n ToolNames.CROP,\n ToolNames.VIDEO_REDACTION,\n ToolNames.VIDEO_AND_AUDIO_REDACTION,\n ToolNames.AUDIO_REDACTION,\n ];\n\n const showEditStyleButton = (\n canModify\n && hasStyle\n && (!isAnnotationStylePopupDisabled || customizableUI)\n && (!multipleAnnotationsSelected || canUngroup || (multipleAnnotationsSelected && !isFocusedAnnotationSelected))\n && !toolsWithNoStyling.includes(focusedAnnotation.ToolName)\n && !(focusedAnnotation instanceof Annotations.Model3DAnnotation)\n && !focusedAnnotation.isContentEditPlaceholder()\n && !isAppearanceSignature\n && !(focusedAnnotation instanceof Annotations.PushButtonWidgetAnnotation)\n );\n\n const hideSnapModeCheckbox = focusedAnnotation instanceof Annotations.EllipseAnnotation || !core.isFullPDFEnabled();\n\n const onResize = () => {\n setStylePopupRepositionFlag(!stylePopupRepositionFlag);\n };\n\n /* EDIT CONTENT */\n const showContentEditButton =\n focusedAnnotation.isContentEditPlaceholder()\n && focusedAnnotation.getContentEditType() === window.Core.ContentEdit.Types.TEXT;\n\n const onEditContent = async () => {\n annotManager.trigger('annotationDoubleClicked', focusedAnnotation);\n\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n };\n\n /* CLEAR APPEARANCE SIGNATURE */\n const onClearAppearanceSignature = () => {\n focusedAnnotation.clearSignature(annotManager);\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n };\n\n /* REDACTION */\n const redactionEnabled = core.isAnnotationRedactable(focusedAnnotation, activeDocumentViewerKey);\n const showRedactionButton = redactionEnabled && !multipleAnnotationsSelected && !includesFormFieldAnnotation;\n\n const onApplyRedaction = () => {\n dispatch(applyRedactions(focusedAnnotation, undefined, activeDocumentViewerKey));\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n };\n\n /* GROUP / UNGROUP */\n const primaryAnnotation = selectedAnnotations.find((selectedAnnotation) => !selectedAnnotation.InReplyTo);\n\n const showGroupButton =\n canModify\n && isFocusedAnnotationSelected\n && canGroup\n && !includesFormFieldAnnotation;\n\n const onGroupAnnotations = () => {\n core.groupAnnotations(primaryAnnotation, selectedAnnotations, activeDocumentViewerKey);\n };\n\n const showUngroupButton = canUngroup;\n\n const onUngroupAnnotations = () => {\n core.ungroupAnnotations(selectedAnnotations, activeDocumentViewerKey);\n };\n\n /* FORM FIELD */\n const formFieldCreationManager = core.getFormFieldCreationManager(activeDocumentViewerKey);\n const isInFormFieldCreationMode = formFieldCreationManager.isInFormFieldCreationMode();\n const showFormFieldButton = includesFormFieldAnnotation\n && isInFormFieldCreationMode\n && !(focusedAnnotation instanceof Annotations.PushButtonWidgetAnnotation);\n\n const onOpenFormField = () => {\n closePopup();\n // We disable it while the form field popup is open to prevent having both open\n // at the same time. We re-enable it when the form field popup is closed.\n if (customizableUI) {\n dispatch(actions.disableElement(PRIORITY_THREE));\n dispatch(actions.closeElement(DataElements.FORM_FIELD_EDIT_POPUP));\n } else {\n dispatch(actions.disableElement(DataElements.ANNOTATION_POPUP, PRIORITY_THREE));\n }\n dispatch(actions.openElement(DataElements.FORM_FIELD_EDIT_POPUP));\n dispatch(actions.openElement(DataElements.FORM_FIELD_PANEL));\n };\n\n /* DELETE ANNOTATION */\n const showDeleteButton = canModify;\n\n const openContentEditDeleteWarningModal = () => {\n const message = t('option.contentEdit.deletionModal.message');\n const title = t('option.contentEdit.deletionModal.title');\n const confirmBtnText = t('action.ok');\n\n const warning = {\n message,\n title,\n confirmBtnText,\n onConfirm: () => onDeleteAnnotation(),\n };\n dispatch(actions.showWarningMessage(warning));\n };\n\n const onDeleteAnnotation = () => {\n if (isFocusedAnnotationSelected) {\n core.deleteAnnotations(core.getSelectedAnnotations(activeDocumentViewerKey), undefined, activeDocumentViewerKey);\n } else {\n core.deleteAnnotations([focusedAnnotation], undefined, activeDocumentViewerKey);\n }\n closePopup();\n };\n\n /* LINK ANNOTATION */\n const toolsThatCantHaveLinks = [\n ToolNames.CROP,\n ToolNames.SIGNATURE,\n ToolNames.REDACTION,\n ToolNames.REDACTION2,\n ToolNames.REDACTION3,\n ToolNames.REDACTION4,\n ToolNames.STICKY,\n ToolNames.STICKY2,\n ToolNames.STICKY3,\n ToolNames.STICKY4,\n ];\n\n const showLinkButton = (\n !toolsThatCantHaveLinks.includes(focusedAnnotation.ToolName)\n && !includesFormFieldAnnotation\n && !focusedAnnotation.isContentEditPlaceholder()\n // TODO(Adam): Update this once SoundAnnotation tool is created.\n && !(focusedAnnotation instanceof Annotations.SoundAnnotation)\n && !isAppearanceSignature\n );\n\n const showCalibrateButton =\n canModify\n && focusedAnnotation.Measure\n && focusedAnnotation instanceof Annotations.LineAnnotation;\n\n const onOpenCalibration = () => {\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n dispatch(actions.openElement(DataElements.CALIBRATION_MODAL));\n };\n\n const linkAnnotationToURL = () => {\n if (hasAssociatedLink) {\n const annotationsToUnlink = isFocusedAnnotationSelected ? selectedAnnotations : [focusedAnnotation];\n annotationsToUnlink.forEach((annot) => {\n const linkAnnotations = getGroupedLinkAnnotations(annot);\n linkAnnotations.forEach((linkAnnot, index) => {\n annotManager.ungroupAnnotations([linkAnnot]);\n if (annot instanceof Annotations.TextHighlightAnnotation && annot.Opacity === 0 && index === 0) {\n annotManager.deleteAnnotations([annot, linkAnnot], null, true);\n } else {\n annotManager.deleteAnnotation(linkAnnot, null, true);\n }\n });\n });\n closePopup();\n } else {\n dispatch(actions.openElement(DataElements.LINK_MODAL));\n }\n };\n\n /* DOWNLOAD FILE ATTACHMENT */\n const showFileDownloadButton = focusedAnnotation instanceof Annotations.FileAttachmentAnnotation;\n\n const downloadFileAttachment = async (annot) => {\n // no need to check that annot is of type file annot as the check is done in the JSX\n const { fileData, fileName } = await annot.getFullFileMetadata();\n saveAs(fileData, fileName);\n };\n\n /* AUDIO ANNOTATION */\n const showAudioPlayButton = (\n !isIE &&\n !selectedMultipleAnnotations &&\n focusedAnnotation instanceof Annotations.SoundAnnotation &&\n focusedAnnotation.hasAudioData()\n );\n\n const isNotesPanelOpenOrActive = isNotesPanelOpen\n || (notesInLeftPanel && leftPanelOpen && activeLeftPanel === 'notesPanel')\n || isAnyCustomPanelOpen\n || isInFormFieldCreationMode;\n\n const handlePlaySound = (annotation) => {\n dispatch(actions.setActiveSoundAnnotation(annotation));\n dispatch(actions.triggerResetAudioPlaybackPosition(true));\n dispatch(actions.openElement('audioPlaybackPopup'));\n };\n\n return (\n <AnnotationPopup\n isMobile={isMobile()}\n isIE={isIE}\n isOpen={isOpen}\n isRightClickMenu={isRightClickAnnotationPopupEnabled}\n isNotesPanelOpenOrActive={isNotesPanelOpenOrActive}\n isRichTextPopupOpen={isRichTextPopupOpen}\n isLinkModalOpen={isLinkModalOpen}\n isWarningModalOpen={isWarningModalOpen}\n isContextMenuPopupOpen={isContextMenuPopupOpen}\n isVisible={isVisible}\n\n popupRef={popupRef}\n position={position}\n focusedAnnotation={focusedAnnotation}\n multipleAnnotationsSelected={multipleAnnotationsSelected}\n\n showViewFileButton={showViewFileButton}\n onViewFile={onViewFile}\n\n showCommentButton={showCommentButton}\n onCommentAnnotation={onCommentAnnotation}\n isDateFreeTextCanEdit={isDateFreeTextCanEdit}\n isDatePickerOpen={isDatePickerOpen}\n handleDateChange={handleDateChange}\n onDatePickerShow={onDatePickerShow}\n isCalibrationPopupOpen={isCalibrationPopupOpen}\n\n showEditStyleButton={showEditStyleButton}\n isStylePopupOpen={isStylePopupOpen}\n hideSnapModeCheckbox={hideSnapModeCheckbox}\n openEditStylePopup={() => setIsStylePopupOpen(true)}\n closeEditStylePopup={() => setIsStylePopupOpen(false)}\n annotationStyle={focusedAnnotationStyle}\n onResize={onResize}\n\n showContentEditButton={showContentEditButton}\n onEditContent={onEditContent}\n openContentEditDeleteWarningModal={openContentEditDeleteWarningModal}\n\n isAppearanceSignature={isAppearanceSignature}\n onClearAppearanceSignature={onClearAppearanceSignature}\n\n showRedactionButton={showRedactionButton}\n onApplyRedaction={onApplyRedaction}\n\n showGroupButton={showGroupButton}\n onGroupAnnotations={onGroupAnnotations}\n showUngroupButton={showUngroupButton}\n onUngroupAnnotations={onUngroupAnnotations}\n\n showFormFieldButton={showFormFieldButton}\n onOpenFormField={onOpenFormField}\n\n showDeleteButton={showDeleteButton}\n onDeleteAnnotation={onDeleteAnnotation}\n\n showLinkButton={showLinkButton}\n hasAssociatedLink={hasAssociatedLink}\n linkAnnotationToURL={linkAnnotationToURL}\n\n showFileDownloadButton={showFileDownloadButton}\n downloadFileAttachment={downloadFileAttachment}\n\n showAudioPlayButton={showAudioPlayButton}\n handlePlaySound={handlePlaySound}\n\n showCalibrateButton={showCalibrateButton}\n onOpenCalibration={onOpenCalibration}\n\n customizableUI={customizableUI}\n toggleStylePanel={toggleStylePanel}\n isStylePanelOpen={isStylePanelOpen}\n isInReadOnlyMode={isInReadOnlyMode}\n\n onOpenAlignmentModal={onOpenAlignmentModal}\n />\n );\n};\n\nAnnotationPopupContainer.propTypes = propTypes;\n\nexport default AnnotationPopupContainer;\n","import AnnotationPopupContainer from './AnnotationPopupContainer';\n\nexport default AnnotationPopupContainer;"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/ui/src/helpers/isAnnotationRenderedInDisplayMode.js","webpack:///./src/ui/src/helpers/applyRedactions.js","webpack:///./src/ui/src/components/AnnotationStylePopup/AnnotationStylePopup.scss?91c4","webpack:///./src/ui/src/components/AnnotationStylePopup/AnnotationStylePopup.scss","webpack:///./src/ui/src/components/AnnotationStylePopup/AnnotationStylePopup.js","webpack:///./src/ui/src/components/AnnotationStylePopup/index.js","webpack:///./src/ui/src/components/AnnotationPopup/AnnotationPopup.scss?196b","webpack:///./src/ui/src/components/CalibrationPopup/CalibrationPopup.scss?180a","webpack:///./src/ui/src/components/CalibrationPopup/CalibrationPopup.scss","webpack:///./src/ui/src/components/AnnotationPopup/AnnotationPopup.scss","webpack:///./src/ui/src/components/DatePicker/DatePicker.js","webpack:///./src/ui/src/components/DatePicker/index.js","webpack:///./src/ui/src/components/CalibrationPopup/CalibrationPopup.js","webpack:///./src/ui/src/components/CalibrationPopup/index.js","webpack:///./src/ui/src/components/AnnotationPopup/AnnotationPopup.js","webpack:///./src/ui/src/components/AnnotationPopup/AnnotationPopupContainer.js","webpack:///./src/ui/src/components/AnnotationPopup/index.js"],"names":["isAnnotationRenderedInDisplayMode","core","annotation","isAnnotationInVisiblePages","getDisplayModeObject","getVisiblePages","includes","PageNumber","isContinuousDisplayMode","noop","annotations","onRedactionCompleted","arguments","length","undefined","activeDocumentViewerKey","dispatch","isWebViewerServerDocument","webViewerServerApply","webViewerApply","applyRedactions","then","results","url","downloadPdf","filename","includeAnnotations","externalURL","console","warn","warning","message","i18next","t","title","confirmBtnText","onConfirm","err","fireError","Promise","resolve","actions","showWarningMessage","api","content","__esModule","default","module","i","options","styleTag","window","isApryseWebViewerWebComponent","document","head","appendChild","webComponents","getElementsByTagName","findNestedWebComponents","tagName","root","elements","querySelectorAll","forEach","el","push","shadowRoot","clonedStyleTags","webComponent","onload","styleNode","innerHTML","cloneNode","exports","locals","propTypes","PropTypes","array","isRequired","style","object","properties","isRedaction","bool","isFreeText","isEllipse","hasBackToMenu","onBackToMenu","func","AnnotationStylePopup","props","isMeasure","colorMapKey","showLineStyleOptions","hideSnapModeCheckbox","onResize","_useSelector2","_slicedToArray","useSelector","state","selectors","isElementDisabled","DataElements","ANNOTATION_STYLE_POPUP","isToolDefaultStyleUpdateFromAnnotationPopupEnabled","getActiveDocumentViewerKey","isDisabled","useDispatch","useTranslation","_useState2","useState","isAutoSizeFont","setAutoSizeFont","handleSliderChange","property","value","annotationManager","getAnnotationManager","adjustFreeTextBoundingBox","redrawAnnotation","Core","Annotations","WidgetAnnotation","refresh","handlePropertyChange","setAnnotationStyles","_defineProperty","setToolStyles","ToolName","handleStyleChange","handleRichTextStyleChange","updateAnnotationRichTextStyle","handleLineStyleChange","section","lineStyle","setStartStyle","setEndStyle","dashes","split","shift","trigger","handleClick","e","isMobile","target","currentTarget","closeElement","ANNOTATION_POPUP","className","getClassName","React","createElement","Measure","_ref","measureRef","data-element","onClick","ref","ANNOTATION_STYLE_POPUP_BACK_BUTTON_CONTAINER","ActionButton","dataElement","ANNOTATION_STYLE_POPUP_BACK_BUTTON","label","img","StylePopup","isFreeTextAutoSize","onFreeTextSizeToggle","handleFreeTextAutoSizeToggle","onStyleChange","onSliderChange","onPropertyChange","disableSeparator","onRichTextStyleChange","onLineStyleChange","r","Symbol","n","iterator","o","toStringTag","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","l","TypeError","call","done","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","_regenerator","w","m","defineProperty","enumerable","configurable","writable","_invoke","asyncGeneratorStep","DatePicker","onDatePickerShow","dateRef","useRef","dateContainerRef","useEffect","datePicker","_ref2","_callee","_context","createDatePicker","field","current","container","format","getDateFormat","apply","_next","_throw","getDatePicker","destroy","Scale","parseMeasurementContentsByAnnotation","factor","axis","getLineLength","CalibrationPropType","shape","arrayOf","CalibrationPopup","_Scale$worldScale","_Scale$worldScale2","getMeasurementUnits","getCalibrationInfo","shallowEqual","measurementUnits","_useSelector2$","tempScale","isFractionalUnit","defaultUnit","valueDisplay","setValueDisplay","inputRef","unitTo","worldScale","unit","unitToOptions","to","filter","fractionalUnits","isFractionalUnitsToggleDisabled","valueInputType","inputValueClass","classNames","updateTempScale","scaleValue","scaleUnit","pageUnit","currentDistance","currentScale","newRatio","pageScale","defaultPageUnit","metricUnits","defaultPageValue","convertUnit","updateCalibrationInfo","concat","setValue","_Scale$worldScale3","updateValueDisplay","_Scale$worldScale5","newValueDisplay","getFormattedValue","tempScaleRef","onAnnotationChanged","action","_Scale$worldScale6","currentUnit","addEventListener","removeEventListener","deleteAnnotations","activeElement","id","htmlFor","type","min","onChange","inputValue","trim","inFractionalRegex","test","result","parseInFractional","ftInFractionalRegex","parseFtInFractional","ftInDecimalRegex","parseFtInDecimal","floatRegex","parseFloat","onBlur","placeholder","hintValues","Tooltip","Dropdown","items","currentSelectionKey","onClickItem","_Scale$worldScale4","labelledById","Choice","isSwitch","leftLabel","disabled","checked","isIE","isOpen","isRightClickMenu","isNotesPanelOpenOrActive","isRichTextPopupOpen","isLinkModalOpen","isWarningModalOpen","isContextMenuPopupOpen","isVisible","focusedAnnotation","multipleAnnotationsSelected","popupRef","any","position","showViewFileButton","onViewFile","showCommentButton","onCommentAnnotation","isDateFreeTextCanEdit","isDatePickerOpen","handleDateChange","isCalibrationPopupOpen","showEditStyleButton","isStylePopupOpen","openEditStylePopup","closeEditStylePopup","annotationStyle","showContentEditButton","onEditContent","openContentEditDeleteWarningModal","isAppearanceSignature","onClearAppearanceSignature","showRedactionButton","onApplyRedaction","showGroupButton","onGroupAnnotations","showUngroupButton","onUngroupAnnotations","showFormFieldButton","onOpenFormField","showDeleteButton","onDeleteAnnotation","showLinkButton","hasAssociatedLink","linkAnnotationToURL","showFileDownloadButton","downloadFileAttachment","showAudioPlayButton","handlePlaySound","showCalibrateButton","onOpenCalibration","customizableUI","toggleStylePanel","isInReadOnlyMode","onOpenAlignmentModal","AnnotationPopup","_document$activeEleme","_focusedAnnotation$is","shortCutKeysFor3DVisible","setShortCutKeysFor3DVisible","commentButtonLabel","commentButtonImg","show3DShortCutButton","Model3DAnnotation","isRectangle","RectangleAnnotation","EllipseAnnotation","isPolygon","PolygonAnnotation","FreeTextAnnotation","getIntent","Intent","FreeText","FreeTextCallout","RedactionAnnotation","mapAnnotationToKey","getDataWithKey","mapToolNameToKey","hasLineEndings","isInstanceActive","getRootNode","StrokeStyle","isContentEdit","isContentEditPlaceholder","isReadOnlySignature","SignatureWidgetAnnotation","fieldFlags","get","WidgetFlags","READ_ONLY","showClearSignatureButton","error","StartLineStyle","getStartStyle","EndLineStyle","getEndStyle","_richTextStyles$","_ref3","_richTextStyles$2","_richTextStyles$3","_richTextStyles$3$tex","_richTextStyles$4","_richTextStyles$4$tex","_richTextStyles$0$tex","_richTextStyles$5","_richTextStyles$5$tex","richTextStyles","getRichTextStyle","calculatedFontSize","getCalculatedFontSize","Font","FontSize","TextAlign","TextVerticalAlign","bold","italic","underline","strikeout","OverlayText","annotationPopup","Popup","open","closed","stylePopupOpen","_objectSpread","visibility","FocusTrap","locked","CustomizablePopup","childrenClassName","isNotClickableSelector","CALIBRATION_POPUP_BUTTON","renderPopup","Draggable","cancel","_asyncToGenerator","Array","isArray","_arrayWithHoles","next","_iterableToArrayLimit","_arrayLikeToArray","toString","slice","constructor","name","from","_unsupportedIterableToArray","_nonIterableRest","ToolNames","Tools","selectedMultipleAnnotations","canModify","focusedAnnotationStyle","setIsStylePopupOpen","setDatePickerOpen","isDatePickerMount","setDatePickerMount","includesFormFieldAnnotation","stylePopupRepositionFlag","setStylePopupRepositionFlag","closePopup","AnnotationPopupContainer","isElementOpen","CONTEXT_MENU_POPUP","isRightClickAnnotationPopupEnabled","isNotesPanelDisabled","NOTES_PANEL","isAnnotationStylePopupDisabled","isInlineCommentingDisabled","INLINE_COMMENT_POPUP","isNotesPanelOpen","LINK_MODAL","WARNING_MODAL","isMultiTab","getIsMultiTab","tabManager","getTabManager","tabs","getTabs","notesInLeftPanel","getNotesInLeftPanel","leftPanelOpen","LEFT_PANEL","activeLeftPanel","getActiveLeftPanel","isAnyCustomPanelOpen","featureFlags","getFeatureFlags","isStylePanelOpen","STYLE_PANEL","isStylePanelDisabled","stylePanelInFlyout","getIsPanelInFlyout","ITEM_RENDER_PREFIXES","MULTI_SELECT_STYLE_PANEL_FLYOUT","isStylePanelFlyoutOpen","left","top","setPosition","_useState4","setIsVisible","_useState6","setCalibrationPopupOpen","isFocusedAnnotationSelected","isAnnotationSelected","annotManager","useOnClickOutside","useCallback","_getRootNode$querySel","notesPanel","querySelector","clickedInNotesPanel","contains","clickedInLinkModal","stylePanelFlyout","clickedInStylePanelFlyout","warningModal","getOpenedWarningModal","colorPicker","getOpenedColorPicker","handleResize","debounce","visiblePages","isFocusableInCurrentDisplayMode","getAnnotationPopupPositionBasedOn","annotationInPage","getSelectedAnnotations","find","setPopupPosition","handleVisibility","sixtyFramesPerSecondIncrement","useLayoutEffect","CALIBRATION_MEASUREMENT","acceptFormats","getHashParameters","SupportedFileFormats","SERVER","CLIENT","FileAttachmentAnnotation","mimeTypeToExtension","getFileMetadata","mimeType","metaData","fileAttachmentTab","_t","_t2","_t3","tab","setActiveTab","getFileData","extension","saveCurrentActiveTabState","setActive","addTab","selectedAnnotations","numberOfSelectedAnnotations","canModifyContents","numberOfGroups","getNumberOfGroups","canGroup","canUngroup","isSignedByAppearance","getIsReadOnly","CROP","hasStyle","keys","toolsWithNoStyling","VIDEO_REDACTION","VIDEO_AND_AUDIO_REDACTION","AUDIO_REDACTION","PushButtonWidgetAnnotation","isFullPDFEnabled","getContentEditType","ContentEdit","Types","TEXT","_callee2","_context2","isAnnotationRedactable","primaryAnnotation","selectedAnnotation","InReplyTo","isInFormFieldCreationMode","getFormFieldCreationManager","SIGNATURE","REDACTION","REDACTION2","REDACTION3","REDACTION4","STICKY","STICKY2","STICKY3","STICKY4","SoundAnnotation","LineAnnotation","_ref4","_callee3","annot","_yield$annot$getFullF","fileData","fileName","_context3","getFullFileMetadata","saveAs","_x","hasAudioData","contentEditManager","getContentEditManager","isInContentEditMode","endContentEditMode","triggerNoteEditing","openElement","text","setNoteContents","updateAnnotation","isDatePickerShowed","clearSignature","groupAnnotations","ungroupAnnotations","disableElement","PRIORITY_THREE","FORM_FIELD_EDIT_POPUP","FORM_FIELD_PANEL","getGroupedLinkAnnotations","linkAnnot","index","TextHighlightAnnotation","Opacity","deleteAnnotation","setActiveSoundAnnotation","triggerResetAudioPlaybackPosition","CALIBRATION_MODAL","openFlyout","ANNOTATION_ALIGNMENT_POPUP"],"mappings":"8IAAaA,EAAoC,SAACC,EAAMC,GACtD,IACMC,EADeF,EAAKG,uBAAuBC,kBACDC,SAASJ,EAAWK,YAEpE,OADwCN,EAAKO,4BAA+BP,EAAKO,2BAA6BL,I,wFCIhH,SAASM,KAEM,aAACC,GAAW,IAAEC,EAAoBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGH,EAAMM,EAAuBH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,EAAC,OAAK,SAACI,GACzF,OAAIf,IAAKgB,4BAEAC,EAAqBR,EAAaM,EAAUD,GAE9CI,EAAeT,EAAaC,EAAsBK,EAAUD,KAGrE,IAAMG,EAAuB,SAACR,EAAaM,EAAUD,GAAuB,OAAKd,IAAKmB,gBAAgBV,EAAaK,GAAyBM,MAAK,SAACC,GAChJ,GAAIA,GAAWA,EAAQC,IACrB,OAAOC,YAAYR,EAAU,CAC3BS,SAAU,eACVC,oBAAoB,EACpBC,YAAaL,EAAQC,MAGzBK,QAAQC,KAAK,sDAGTV,EAAiB,SAACT,EAAaC,EAAsBK,EAAUD,GACnE,IAIMe,EAAU,CACdC,QALcC,IAAQC,EAAE,kCAMxBC,MALYF,IAAQC,EAAE,+BAMtBE,eALqBH,IAAQC,EAAE,gBAM/BG,UAAW,WAMT,OALAnC,IAAKmB,gBAAgBV,EAAaK,GAC/BM,MAA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,GAExBC,oBAAqBA,GACrBC,gBAxEoB,SAACvX,GACvBc,GAASyB,IAAQ0mB,yBAAyBjpB,IAC1Cc,GAASyB,IAAQ2mB,mCAAkC,IACnDpoB,GAASyB,IAAQwlB,YAAY,wBAuE3BvQ,oBAAqBA,GACrBC,kBA1HsB,WACxB3W,GAASyB,IAAQyG,aAAa5C,IAAa6C,mBAC3CnI,GAASyB,IAAQwlB,YAAY3hB,IAAa+iB,qBA0HxCzR,eAAgBA,GAChBC,iBAhdqB,WAClByI,IAAqBE,IAAyBC,IACjDzf,GAASyB,IAAQwlB,YAAY3hB,IAAaia,cAExCE,IAEAzf,GADE6f,GACOpe,IAAQyG,aAAauX,GAAmBzW,aAExCvH,IAAQ6mB,WAAW7I,GAAmBzW,YAAa,8BAG3DyW,IACH/B,KAqcA4B,iBAAkBA,GAClBxI,iBAAkBA,GAElBC,qBAnSyB,WAC3B/W,GAASyB,IAAQwlB,YAAY3hB,IAAaijB,6BAC1C7K,QAsSJC,GAAyBha,UAAYA,GAEtBga,UC/jBAA","file":"chunks/chunk.40.js","sourcesContent":["export const isAnnotationRenderedInDisplayMode = (core, annotation) => {\n const visiblePages = core.getDisplayModeObject().getVisiblePages();\n const isAnnotationInVisiblePages = visiblePages.includes(annotation.PageNumber);\n const isFocusableInCurrentDisplayMode = core.isContinuousDisplayMode() || (!core.isContinuousDisplayMode() && isAnnotationInVisiblePages);\n return isFocusableInCurrentDisplayMode;\n};","import core from 'core';\nimport i18next from 'i18next';\n\nimport actions from 'actions';\nimport { fireError } from 'helpers/fireEvent';\nimport downloadPdf from 'helpers/downloadPdf';\n\nfunction noop() { }\n\nexport default (annotations, onRedactionCompleted = noop, activeDocumentViewerKey = 1) => (dispatch) => {\n if (core.isWebViewerServerDocument()) {\n // when are using Webviewer Server, it'll download the redacted document\n return webViewerServerApply(annotations, dispatch, activeDocumentViewerKey);\n }\n return webViewerApply(annotations, onRedactionCompleted, dispatch, activeDocumentViewerKey);\n};\n\nconst webViewerServerApply = (annotations, dispatch, activeDocumentViewerKey) => core.applyRedactions(annotations, activeDocumentViewerKey).then((results) => {\n if (results && results.url) {\n return downloadPdf(dispatch, {\n filename: 'redacted.pdf',\n includeAnnotations: true,\n externalURL: results.url,\n });\n }\n console.warn('WebViewer Server did not return a valid result');\n});\n\nconst webViewerApply = (annotations, onRedactionCompleted, dispatch, activeDocumentViewerKey) => {\n const message = i18next.t('warning.redaction.applyMessage');\n const title = i18next.t('warning.redaction.applyTile');\n const confirmBtnText = i18next.t('action.apply');\n\n const warning = {\n message,\n title,\n confirmBtnText,\n onConfirm: () => {\n core.applyRedactions(annotations, activeDocumentViewerKey)\n .then(() => {\n onRedactionCompleted();\n })\n .catch((err) => fireError(err));\n return Promise.resolve();\n },\n };\n\n return dispatch(actions.showWarningMessage(warning));\n};\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/postcss-loader/src/index.js??postcss!../../../../../node_modules/sass-loader/dist/cjs.js!./AnnotationStylePopup.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = function(styleTag) {\n function findNestedWebComponents(tagName, root = document) {\n const elements = [];\n\n // Check direct children\n root.querySelectorAll(tagName).forEach((el) => elements.push(el));\n\n // Check shadow DOMs\n root.querySelectorAll('*').forEach((el) => {\n if (el.shadowRoot) {\n elements.push(...findNestedWebComponents(tagName, el.shadowRoot));\n }\n });\n\n return elements;\n }\n if (!window.isApryseWebViewerWebComponent) {\n document.head.appendChild(styleTag);\n return;\n }\n\n let webComponents;\n // First we see if the webcomponent is at the document level\n webComponents = document.getElementsByTagName('apryse-webviewer');\n // If not, we check have to check if it is nested in another webcomponent\n if (!webComponents.length) {\n webComponents = findNestedWebComponents('apryse-webviewer');\n }\n // Now we append the style tag to each webcomponent\n const clonedStyleTags = [];\n for (let i = 0; i < webComponents.length; i++) {\n const webComponent = webComponents[i];\n if (i === 0) {\n webComponent.shadowRoot.appendChild(styleTag);\n styleTag.onload = function() {\n if (clonedStyleTags.length > 0) {\n clonedStyleTags.forEach((styleNode) => {\n // eslint-disable-next-line no-unsanitized/property\n styleNode.innerHTML = styleTag.innerHTML;\n });\n }\n };\n } else {\n const styleNode = styleTag.cloneNode(true);\n webComponent.shadowRoot.appendChild(styleNode);\n clonedStyleTags.push(styleNode);\n }\n }\n };\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","exports = module.exports = require(\"../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}@keyframes bottom-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes up-bottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .AnnotationStylePopup{width:100%;margin:0;position:relative;max-width:none;border-radius:4px 4px 0 0;border:0;padding-bottom:24px;box-shadow:none}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .AnnotationStylePopup{width:100%;margin:0;position:relative;max-width:none;border-radius:4px 4px 0 0;border:0;padding-bottom:24px;box-shadow:none}}.AnnotationStylePopup .back-to-menu-container{margin-top:var(--padding-medium);margin-inline-end:var(--padding-medium);margin-inline-start:var(--padding-medium);padding-bottom:var(--padding-small);border-bottom:1px solid var(--border)}.AnnotationStylePopup .Button.back-to-menu-button{margin:0;width:100%;height:32px;border-radius:0;justify-content:flex-start}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .AnnotationStylePopup .Button.back-to-menu-button{width:100%;height:32px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .AnnotationStylePopup .Button.back-to-menu-button{width:100%;height:32px}}\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"LEFT_HEADER_WIDTH\": \"41px\",\n\t\"RIGHT_HEADER_WIDTH\": \"41px\"\n};","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Measure from 'react-measure';\nimport { useTranslation } from 'react-i18next';\nimport StylePopup from 'components/StylePopup';\nimport ActionButton from 'components/ActionButton';\nimport core from 'core';\nimport getClassName from 'helpers/getClassName';\nimport setToolStyles from 'helpers/setToolStyles';\nimport { isMobile } from 'helpers/device';\nimport adjustFreeTextBoundingBox from 'helpers/adjustFreeTextBoundingBox';\nimport actions from 'actions';\nimport selectors from 'selectors';\nimport DataElements from 'constants/dataElement';\nimport handleFreeTextAutoSizeToggle from 'src/helpers/handleFreeTextAutoSizeToggle';\n\nimport './AnnotationStylePopup.scss';\n\nconst propTypes = {\n annotations: PropTypes.array.isRequired,\n style: PropTypes.object.isRequired,\n properties: PropTypes.object.isRequired,\n isRedaction: PropTypes.bool,\n isFreeText: PropTypes.bool,\n isEllipse: PropTypes.bool,\n hasBackToMenu: PropTypes.bool,\n onBackToMenu: PropTypes.func,\n};\n\nconst AnnotationStylePopup = (props) => {\n const {\n annotations,\n style,\n isRedaction,\n isFreeText,\n isEllipse,\n isMeasure,\n colorMapKey,\n showLineStyleOptions,\n properties,\n hideSnapModeCheckbox,\n onResize,\n hasBackToMenu,\n onBackToMenu\n } = props;\n\n const [\n isDisabled,\n isToolDefaultStyleUpdateFromAnnotationPopupEnabled,\n activeDocumentViewerKey,\n ] = useSelector((state) => [\n selectors.isElementDisabled(state, DataElements.ANNOTATION_STYLE_POPUP),\n selectors.isToolDefaultStyleUpdateFromAnnotationPopupEnabled(state),\n selectors.getActiveDocumentViewerKey(state),\n ]);\n\n const dispatch = useDispatch();\n const [t] = useTranslation();\n const [isAutoSizeFont, setAutoSizeFont] = useState(properties.isAutoSizeFont);\n\n const handleSliderChange = (property, value) => {\n const annotationManager = core.getAnnotationManager(activeDocumentViewerKey);\n annotations.forEach((annotation) => {\n annotation[property] = value;\n if (property === 'StrokeThickness') {\n adjustFreeTextBoundingBox(annotation);\n }\n annotationManager.redrawAnnotation(annotation);\n\n if (annotation instanceof window.Core.Annotations.WidgetAnnotation) {\n annotation.refresh();\n }\n });\n };\n\n const handlePropertyChange = (property, value) => {\n annotations.forEach((annotation) => {\n core.setAnnotationStyles(annotation, {\n [property]: value,\n }, activeDocumentViewerKey);\n if (isToolDefaultStyleUpdateFromAnnotationPopupEnabled) {\n setToolStyles(annotation.ToolName, property, value);\n }\n if (property === 'FontSize' || property === 'Font') {\n adjustFreeTextBoundingBox(annotation);\n }\n });\n };\n\n const handleStyleChange = (property, value) => {\n annotations.forEach((annotation) => {\n core.setAnnotationStyles(annotation, {\n [property]: value,\n }, activeDocumentViewerKey);\n\n if (isToolDefaultStyleUpdateFromAnnotationPopupEnabled) {\n setToolStyles(annotation.ToolName, property, value);\n }\n });\n };\n\n const handleRichTextStyleChange = (property, value) => {\n annotations.forEach((annotation) => {\n core.updateAnnotationRichTextStyle(annotation, { [property]: value }, activeDocumentViewerKey);\n });\n };\n\n const handleLineStyleChange = (section, value) => {\n annotations.forEach((annotation) => {\n let lineStyle = '';\n if (section === 'start') {\n annotation.setStartStyle(value);\n lineStyle = 'StartLineStyle';\n } else if (section === 'end') {\n annotation.setEndStyle(value);\n lineStyle = 'EndLineStyle';\n } else if (section === 'middle') {\n const dashes = value.split(',');\n const style = dashes.shift();\n annotation['Style'] = style;\n annotation['Dashes'] = dashes;\n lineStyle = 'StrokeStyle';\n }\n\n if (isToolDefaultStyleUpdateFromAnnotationPopupEnabled) {\n setToolStyles(annotation.ToolName, lineStyle, value);\n }\n\n core.getAnnotationManager(activeDocumentViewerKey).redrawAnnotation(annotation);\n });\n\n core.getAnnotationManager(activeDocumentViewerKey).trigger('annotationChanged', [annotations, 'modify', {}]);\n };\n\n const handleClick = (e) => {\n if (isMobile() && e.target === e.currentTarget) {\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n }\n };\n\n const handleResize = () => {\n onResize && onResize();\n };\n\n const className = getClassName('Popup AnnotationStylePopup', props);\n\n return isDisabled ? null : (\n <Measure\n onResize={handleResize}\n >\n {({ measureRef }) => (\n <div\n className={className}\n data-element={DataElements.ANNOTATION_STYLE_POPUP}\n onClick={handleClick}\n ref={measureRef}\n >\n {hasBackToMenu &&\n <div\n className=\"back-to-menu-container\"\n data-element={DataElements.ANNOTATION_STYLE_POPUP_BACK_BUTTON_CONTAINER}\n >\n <ActionButton\n className=\"back-to-menu-button\"\n dataElement={DataElements.ANNOTATION_STYLE_POPUP_BACK_BUTTON}\n label={t('action.backToMenu')}\n img=\"icon-chevron-left\"\n onClick={onBackToMenu}\n />\n </div>\n }\n {/* Do not show checkbox for ellipse as snap mode does not exist for it */}\n <StylePopup\n hideSnapModeCheckbox={hideSnapModeCheckbox}\n colorMapKey={colorMapKey}\n style={style}\n isFreeText={isFreeText}\n isFreeTextAutoSize={isAutoSizeFont}\n onFreeTextSizeToggle={() => handleFreeTextAutoSizeToggle(annotations[0], setAutoSizeFont, isAutoSizeFont)}\n isEllipse={isEllipse}\n isMeasure={isMeasure}\n onStyleChange={handleStyleChange}\n onSliderChange={handleSliderChange}\n onPropertyChange={handlePropertyChange}\n disableSeparator\n properties={properties}\n onRichTextStyleChange={handleRichTextStyleChange}\n isRedaction={isRedaction}\n showLineStyleOptions={showLineStyleOptions}\n onLineStyleChange={handleLineStyleChange}\n />\n </div>\n )}\n </Measure>\n );\n};\n\nAnnotationStylePopup.propTypes = propTypes;\n\nexport default AnnotationStylePopup;\n","import AnnotationStylePopup from './AnnotationStylePopup';\n\nexport default AnnotationStylePopup;","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/postcss-loader/src/index.js??postcss!../../../../../node_modules/sass-loader/dist/cjs.js!./AnnotationPopup.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = function(styleTag) {\n function findNestedWebComponents(tagName, root = document) {\n const elements = [];\n\n // Check direct children\n root.querySelectorAll(tagName).forEach((el) => elements.push(el));\n\n // Check shadow DOMs\n root.querySelectorAll('*').forEach((el) => {\n if (el.shadowRoot) {\n elements.push(...findNestedWebComponents(tagName, el.shadowRoot));\n }\n });\n\n return elements;\n }\n if (!window.isApryseWebViewerWebComponent) {\n document.head.appendChild(styleTag);\n return;\n }\n\n let webComponents;\n // First we see if the webcomponent is at the document level\n webComponents = document.getElementsByTagName('apryse-webviewer');\n // If not, we check have to check if it is nested in another webcomponent\n if (!webComponents.length) {\n webComponents = findNestedWebComponents('apryse-webviewer');\n }\n // Now we append the style tag to each webcomponent\n const clonedStyleTags = [];\n for (let i = 0; i < webComponents.length; i++) {\n const webComponent = webComponents[i];\n if (i === 0) {\n webComponent.shadowRoot.appendChild(styleTag);\n styleTag.onload = function() {\n if (clonedStyleTags.length > 0) {\n clonedStyleTags.forEach((styleNode) => {\n // eslint-disable-next-line no-unsanitized/property\n styleNode.innerHTML = styleTag.innerHTML;\n });\n }\n };\n } else {\n const styleNode = styleTag.cloneNode(true);\n webComponent.shadowRoot.appendChild(styleNode);\n clonedStyleTags.push(styleNode);\n }\n }\n };\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/postcss-loader/src/index.js??postcss!../../../../../node_modules/sass-loader/dist/cjs.js!./CalibrationPopup.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = function(styleTag) {\n function findNestedWebComponents(tagName, root = document) {\n const elements = [];\n\n // Check direct children\n root.querySelectorAll(tagName).forEach((el) => elements.push(el));\n\n // Check shadow DOMs\n root.querySelectorAll('*').forEach((el) => {\n if (el.shadowRoot) {\n elements.push(...findNestedWebComponents(tagName, el.shadowRoot));\n }\n });\n\n return elements;\n }\n if (!window.isApryseWebViewerWebComponent) {\n document.head.appendChild(styleTag);\n return;\n }\n\n let webComponents;\n // First we see if the webcomponent is at the document level\n webComponents = document.getElementsByTagName('apryse-webviewer');\n // If not, we check have to check if it is nested in another webcomponent\n if (!webComponents.length) {\n webComponents = findNestedWebComponents('apryse-webviewer');\n }\n // Now we append the style tag to each webcomponent\n const clonedStyleTags = [];\n for (let i = 0; i < webComponents.length; i++) {\n const webComponent = webComponents[i];\n if (i === 0) {\n webComponent.shadowRoot.appendChild(styleTag);\n styleTag.onload = function() {\n if (clonedStyleTags.length > 0) {\n clonedStyleTags.forEach((styleNode) => {\n // eslint-disable-next-line no-unsanitized/property\n styleNode.innerHTML = styleTag.innerHTML;\n });\n }\n };\n } else {\n const styleNode = styleTag.cloneNode(true);\n webComponent.shadowRoot.appendChild(styleNode);\n clonedStyleTags.push(styleNode);\n }\n }\n };\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","exports = module.exports = require(\"../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}@keyframes bottom-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes up-bottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}.CalibrationPopup{display:flex;flex-direction:column;align-items:flex-start;padding:var(--padding-medium);width:220px;background:var(--gray-0);box-shadow:0 0 3px var(--gray-7);border-radius:4px}.CalibrationPopup .calibration-popup-label{font-weight:700;margin-bottom:var(--padding-medium)}.CalibrationPopup .pop-switch{margin-top:var(--padding-medium)}.CalibrationPopup .pop-switch.ui__choice--disabled .ui__choice__label{color:var(--gray-5)}.CalibrationPopup .input-container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;grid-gap:var(--padding-small);gap:var(--padding-small);height:32px}.CalibrationPopup .input-container .input-field{width:94px;height:32px}.CalibrationPopup .input-container .input-field.invalid-value{border-color:red}.CalibrationPopup .input-container .input-field:focus{border:1px solid var(--blue-5)}.CalibrationPopup .input-container .input-field .Dropdown__wrapper{width:100%;height:100%}.CalibrationPopup .input-container .input-field .Dropdown__wrapper .Dropdown{height:100%;width:100%!important;text-align:start}\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"LEFT_HEADER_WIDTH\": \"41px\",\n\t\"RIGHT_HEADER_WIDTH\": \"41px\"\n};","exports = module.exports = require(\"../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".open.AnnotationPopup{visibility:visible}.closed.AnnotationPopup{visibility:hidden}:host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}.AnnotationPopup{position:absolute;z-index:70;display:flex;justify-content:center;align-items:center}.AnnotationPopup:empty{padding:0}.AnnotationPopup .buttons{display:flex}.AnnotationPopup .Button{margin:4px;width:32px;height:32px}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .AnnotationPopup .Button{width:42px;height:42px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .AnnotationPopup .Button{width:42px;height:42px}}.AnnotationPopup .Button:hover{background:var(--popup-button-hover)}.AnnotationPopup .Button:hover:disabled{background:none}.AnnotationPopup .Button .Icon{width:18px;height:18px}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .AnnotationPopup .Button .Icon{width:24px;height:24px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .AnnotationPopup .Button .Icon{width:24px;height:24px}}.is-vertical.AnnotationPopup .Button.main-menu-button{width:100%;border-radius:0;justify-content:flex-start;padding-inline-start:var(--padding-small);padding-inline-end:var(--padding-small);margin:0 0 var(--padding-tiny) 0}.is-vertical.AnnotationPopup .Button.main-menu-button:first-child{margin-top:var(--padding-tiny)}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .is-vertical.AnnotationPopup .Button.main-menu-button{width:100%;height:32px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .is-vertical.AnnotationPopup .Button.main-menu-button{width:100%;height:32px}}.is-vertical.AnnotationPopup .Button.main-menu-button .Icon{margin-inline-end:10px}.is-vertical.AnnotationPopup .Button.main-menu-button span{white-space:nowrap}@keyframes bottom-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes up-bottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}.AnnotationPopup{position:fixed;border-radius:4px;box-shadow:0 0 3px 0 var(--document-box-shadow);background:var(--component-background)}.AnnotationPopup.is-horizontal .container{display:inherit}.AnnotationPopup.is-vertical{flex-direction:column;align-items:flex-start}.shortCuts3D{position:relative}.shortCuts3D .closeButton{position:absolute;inset-inline-end:4px;padding:2px;cursor:pointer;width:20px;text-align:center}.shortCuts3D .row{padding:4px 0;margin:8px 26px 8px 16px}.shortCuts3D .row span{background:#e7ebee;padding:4px 8px;border-radius:4px}\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"LEFT_HEADER_WIDTH\": \"41px\",\n\t\"RIGHT_HEADER_WIDTH\": \"41px\"\n};","import React, { useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst DatePicker = ({ onClick, annotation, onDatePickerShow }) => {\n const dateRef = useRef(null);\n const dateContainerRef = useRef(null);\n useEffect(() => {\n let datePicker;\n const getDatePicker = async () => {\n datePicker = await window.Core.createDatePicker({\n field: dateRef.current,\n onClick,\n container: dateContainerRef.current,\n format: annotation.getDateFormat(),\n });\n onDatePickerShow(true);\n };\n getDatePicker();\n\n return () => {\n datePicker.destroy();\n datePicker = null;\n onDatePickerShow(false);\n };\n }, []);\n return (\n <div data-element=\"datePickerContainer\">\n <div ref={dateRef} />\n <div ref={dateContainerRef}/>\n </div>\n );\n};\n\nDatePicker.propTypes = {\n onClick: PropTypes.func.isRequired,\n annotation: PropTypes.object.isRequired,\n onDatePickerShow: PropTypes.func.isRequired\n};\n\nexport default DatePicker;\n","import DatePicker from './DatePicker';\n\nexport default DatePicker;","import React, { useState, useEffect, useRef } from 'react';\nimport selectors from 'selectors';\nimport { useSelector, useDispatch, shallowEqual } from 'react-redux';\nimport core from 'core';\nimport actions from 'actions';\nimport Choice from 'components/Choice';\nimport Dropdown from '../Dropdown';\nimport Tooltip from '../Tooltip';\nimport PropTypes from 'prop-types';\nimport { useTranslation } from 'react-i18next';\nimport {\n metricUnits,\n convertUnit,\n fractionalUnits,\n floatRegex,\n inFractionalRegex,\n ftInFractionalRegex,\n ftInDecimalRegex,\n parseFtInDecimal,\n parseInFractional,\n parseFtInFractional,\n hintValues\n} from 'constants/measurementScale';\nimport classNames from 'classnames';\n\nimport './CalibrationPopup.scss';\n\nconst Scale = window.Core.Scale;\n\nconst parseMeasurementContentsByAnnotation = (annotation) => {\n const factor = annotation.Measure.axis[0].factor;\n const unit = annotation.Scale[1][1];\n\n switch (unit) {\n case 'ft-in':\n return (annotation.getLineLength() * factor) / 12;\n case 'in':\n default:\n return annotation.getLineLength() * factor;\n }\n};\n\nconst getDefaultPageUnit = (pageUnit) => {\n if (pageUnit === 'pt') {\n return 'pt';\n }\n if (metricUnits.includes(pageUnit)) {\n return 'mm';\n }\n return 'in';\n};\n\nconst CalibrationPropType = {\n annotation: PropTypes.shape({\n Scale: PropTypes.arrayOf(PropTypes.array),\n }),\n};\n\nconst CalibrationPopup = ({ annotation }) => {\n const [t] = useTranslation();\n const dispatch = useDispatch();\n\n const [\n measurementUnits,\n { tempScale, isFractionalUnit, defaultUnit }\n ] = useSelector((state) => [\n selectors.getMeasurementUnits(state),\n selectors.getCalibrationInfo(state)\n ], shallowEqual);\n const [valueDisplay, setValueDisplay] = useState('');\n const inputRef = useRef(null);\n\n const unitTo = new Scale(tempScale).worldScale?.unit || 'mm';\n const unitToOptions = isFractionalUnit ? measurementUnits.to.filter((unit) => fractionalUnits.includes(unit)) : measurementUnits.to;\n const isFractionalUnitsToggleDisabled = !fractionalUnits.includes(unitTo);\n const valueInputType = (isFractionalUnit || unitTo === 'ft-in') ? 'text' : 'number';\n const inputValueClass = classNames('input-field', {\n 'invalid-value': !(tempScale && new Scale(tempScale).worldScale?.value > 0)\n });\n\n const updateTempScale = (scaleValue, scaleUnit) => {\n const currentDistance = parseMeasurementContentsByAnnotation(annotation);\n const currentScale = annotation.Scale;\n const newRatio = currentDistance / currentScale[1][0];\n const pageScale = [currentScale[0][0] * newRatio, currentScale[0][1]];\n const defaultPageUnit = getDefaultPageUnit(scaleUnit);\n const defaultPageValue = convertUnit(pageScale[0], pageScale[1], defaultPageUnit);\n dispatch(actions.updateCalibrationInfo({ tempScale: `${defaultPageValue} ${defaultPageUnit} = ${scaleValue} ${scaleUnit}`, isFractionalUnit }));\n };\n\n const setValue = (scaleValue) => {\n updateTempScale(scaleValue, new Scale(tempScale).worldScale?.unit);\n };\n\n const setUnitTo = (scaleUnit) => {\n updateTempScale(new Scale(tempScale).worldScale?.value, scaleUnit);\n };\n\n const toggleFractionalUnits = () => {\n dispatch(actions.updateCalibrationInfo({ tempScale, isFractionalUnit: !isFractionalUnit }));\n };\n\n const onValueInputChange = (e) => {\n setValueDisplay(e.target.value);\n const inputValue = e.target.value.trim();\n if (!isFractionalUnit) {\n if (unitTo === 'ft-in' && ftInDecimalRegex.test(inputValue)) {\n const result = parseFtInDecimal(inputValue);\n if (result > 0) {\n setValue(result);\n return;\n }\n } else if (floatRegex.test(inputValue)) {\n const result = parseFloat(inputValue) || 0;\n setValue(result);\n return;\n }\n } else {\n if (unitTo === 'in') {\n if (inFractionalRegex.test(inputValue)) {\n const result = parseInFractional(inputValue);\n if (result > 0) {\n setValue(result);\n return;\n }\n }\n } else if (unitTo === 'ft-in') {\n if (ftInFractionalRegex.test(inputValue)) {\n const result = parseFtInFractional(inputValue);\n if (result > 0) {\n setValue(result);\n return;\n }\n }\n }\n }\n setValue(0);\n };\n\n const onValueInputBlur = () => {\n updateValueDisplay();\n };\n\n const updateValueDisplay = () => {\n const scaleValue = new Scale(tempScale).worldScale?.value;\n let newValueDisplay;\n if (!isFractionalUnit && unitTo !== 'ft-in') {\n newValueDisplay = `${scaleValue}`;\n } else {\n newValueDisplay = Scale.getFormattedValue(scaleValue, unitTo, isFractionalUnit ? 1 / 64 : 0.0001, false, true);\n }\n setValueDisplay(newValueDisplay || '');\n };\n\n const tempScaleRef = useRef(tempScale);\n useEffect(() => {\n tempScaleRef.current = tempScale;\n }, [tempScale]);\n useEffect(() => {\n if (annotation) {\n const value = parseMeasurementContentsByAnnotation(annotation);\n const unit = annotation.Scale[1][1];\n if (defaultUnit) {\n updateTempScale(convertUnit(value, unit, defaultUnit), defaultUnit);\n } else {\n updateTempScale(value, unit);\n }\n }\n\n const onAnnotationChanged = (annotations, action) => {\n if (action === 'modify' && annotations.length === 1 && annotations[0] === annotation) {\n const value = parseMeasurementContentsByAnnotation(annotation);\n const unit = annotation.Scale[1][1];\n const currentUnit = new Scale(tempScaleRef.current).worldScale?.unit;\n if (currentUnit) {\n updateTempScale(convertUnit(value, unit, currentUnit), currentUnit);\n } else {\n updateTempScale(value, unit);\n }\n }\n };\n core.addEventListener('annotationChanged', onAnnotationChanged);\n\n return () => {\n core.removeEventListener('annotationChanged', onAnnotationChanged);\n core.deleteAnnotations([annotation]);\n };\n }, [annotation]);\n\n useEffect(() => {\n if (inputRef?.current !== document.activeElement) {\n updateValueDisplay();\n }\n }, [tempScale, isFractionalUnit]);\n\n return (\n <div className=\"CalibrationPopup\" data-element=\"calibrationPopup\">\n <label className=\"calibration-popup-label\" id='calibration-popup-label' htmlFor='calibration-popup-value'>{t('option.measurement.scaleModal.units')}</label>\n <div className=\"input-container\">\n <input\n id='calibration-popup-value'\n className={inputValueClass}\n ref={inputRef}\n type={valueInputType}\n value={valueDisplay}\n min='0'\n onChange={onValueInputChange}\n onBlur={onValueInputBlur}\n placeholder={isFractionalUnit ? hintValues[unitTo] : (unitTo === 'ft-in' ? hintValues['ft-in decimal'] : '')}\n />\n <Tooltip content={'option.measurement.scaleModal.displayUnits'}>\n <div className=\"input-field\">\n <Dropdown\n id=\"calibration-popup-units\"\n dataElement=\"calibrationUnits\"\n items={unitToOptions}\n currentSelectionKey={unitTo}\n onClickItem={setUnitTo}\n labelledById='calibration-popup-label'\n />\n </div>\n </Tooltip>\n </div>\n <Tooltip content={t('option.measurement.scaleModal.fractionUnitsTooltip')}>\n <div>\n <Choice\n isSwitch\n leftLabel\n label={t('option.measurement.scaleModal.fractionalUnits')}\n disabled={isFractionalUnitsToggleDisabled}\n checked={isFractionalUnit}\n id=\"calibration-popup-fractional-units\"\n className=\"pop-switch\"\n onChange={toggleFractionalUnits}\n />\n </div>\n </Tooltip>\n </div>\n );\n};\n\nCalibrationPopup.propTypes = CalibrationPropType;\n\nexport default CalibrationPopup;\n","import CalibrationPopup from './CalibrationPopup';\n\nexport default CalibrationPopup;","import React, { useState } from 'react';\nimport Draggable from 'react-draggable';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { useTranslation } from 'react-i18next';\nimport FocusTrap from 'components/FocusTrap';\n\nimport ActionButton from 'components/ActionButton';\nimport AnnotationStylePopup from 'components/AnnotationStylePopup';\nimport DatePicker from 'components/DatePicker';\nimport CustomizablePopup from 'components/CustomizablePopup';\nimport CalibrationPopup from 'components/CalibrationPopup';\n\nimport { getDataWithKey, mapToolNameToKey, mapAnnotationToKey } from 'constants/map';\n\nimport DataElements from 'constants/dataElement';\n\nimport './AnnotationPopup.scss';\nimport getRootNode from 'helpers/getRootNode';\n\nconst propTypes = {\n isMobile: PropTypes.bool,\n isIE: PropTypes.bool,\n isOpen: PropTypes.bool,\n isRightClickMenu: PropTypes.bool,\n isNotesPanelOpenOrActive: PropTypes.bool,\n isRichTextPopupOpen: PropTypes.bool,\n isLinkModalOpen: PropTypes.bool,\n isWarningModalOpen: PropTypes.bool,\n isContextMenuPopupOpen: PropTypes.bool,\n isVisible: PropTypes.bool,\n\n focusedAnnotation: PropTypes.object,\n multipleAnnotationsSelected: PropTypes.bool,\n popupRef: PropTypes.any,\n position: PropTypes.object,\n\n showViewFileButton: PropTypes.bool,\n onViewFile: PropTypes.func,\n\n showCommentButton: PropTypes.bool,\n onCommentAnnotation: PropTypes.func,\n isDateFreeTextCanEdit: PropTypes.bool,\n isDatePickerOpen: PropTypes.bool,\n handleDateChange: PropTypes.func,\n onDatePickerShow: PropTypes.func,\n isCalibrationPopupOpen: PropTypes.bool,\n\n showEditStyleButton: PropTypes.bool,\n isStylePopupOpen: PropTypes.bool,\n hideSnapModeCheckbox: PropTypes.bool,\n openEditStylePopup: PropTypes.func,\n closeEditStylePopup: PropTypes.func,\n annotationStyle: PropTypes.object,\n onResize: PropTypes.func,\n\n showContentEditButton: PropTypes.bool,\n onEditContent: PropTypes.func,\n openContentEditDeleteWarningModal: PropTypes.func,\n\n isAppearanceSignature: PropTypes.bool,\n onClearAppearanceSignature: PropTypes.func,\n\n showRedactionButton: PropTypes.bool,\n onApplyRedaction: PropTypes.func,\n\n showGroupButton: PropTypes.bool,\n onGroupAnnotations: PropTypes.func,\n showUngroupButton: PropTypes.bool,\n onUngroupAnnotations: PropTypes.func,\n\n showFormFieldButton: PropTypes.bool,\n onOpenFormField: PropTypes.func,\n\n showDeleteButton: PropTypes.bool,\n onDeleteAnnotation: PropTypes.func,\n\n showLinkButton: PropTypes.bool,\n hasAssociatedLink: PropTypes.bool,\n linkAnnotationToURL: PropTypes.func,\n\n showFileDownloadButton: PropTypes.bool,\n downloadFileAttachment: PropTypes.func,\n\n showAudioPlayButton: PropTypes.bool,\n handlePlaySound: PropTypes.func,\n\n showCalibrateButton: PropTypes.bool,\n onOpenCalibration: PropTypes.func,\n\n customizableUI: PropTypes.bool,\n toggleStylePanel: PropTypes.func,\n isInReadOnlyMode: PropTypes.bool,\n onOpenAlignmentModal: PropTypes.func,\n};\n\nconst AnnotationPopup = ({\n isMobile,\n isIE,\n isOpen,\n isRightClickMenu,\n isNotesPanelOpenOrActive,\n isRichTextPopupOpen,\n isLinkModalOpen,\n isWarningModalOpen,\n isContextMenuPopupOpen,\n isVisible,\n\n focusedAnnotation,\n popupRef,\n position,\n multipleAnnotationsSelected,\n\n showViewFileButton,\n onViewFile,\n\n showCommentButton,\n onCommentAnnotation,\n isDateFreeTextCanEdit,\n isDatePickerOpen,\n handleDateChange,\n onDatePickerShow,\n isCalibrationPopupOpen,\n\n showEditStyleButton,\n isStylePopupOpen,\n hideSnapModeCheckbox,\n openEditStylePopup,\n closeEditStylePopup,\n annotationStyle,\n onResize,\n\n showContentEditButton,\n onEditContent,\n openContentEditDeleteWarningModal,\n\n isAppearanceSignature,\n onClearAppearanceSignature,\n\n showRedactionButton,\n onApplyRedaction,\n\n showGroupButton,\n onGroupAnnotations,\n showUngroupButton,\n onUngroupAnnotations,\n\n showFormFieldButton,\n onOpenFormField,\n\n showDeleteButton,\n onDeleteAnnotation,\n\n showLinkButton,\n hasAssociatedLink,\n linkAnnotationToURL,\n\n showFileDownloadButton,\n downloadFileAttachment,\n\n showAudioPlayButton,\n handlePlaySound,\n\n showCalibrateButton,\n onOpenCalibration,\n\n customizableUI,\n toggleStylePanel,\n isInReadOnlyMode,\n onOpenAlignmentModal,\n}) => {\n const [t] = useTranslation();\n const [shortCutKeysFor3DVisible, setShortCutKeysFor3DVisible] = useState(false);\n\n const commentButtonLabel = isDateFreeTextCanEdit ? 'action.changeDate' : 'action.comment';\n const commentButtonImg = isDateFreeTextCanEdit ? 'icon-tool-fill-and-sign-calendar' : 'icon-header-chat-line';\n const show3DShortCutButton = !isInReadOnlyMode && focusedAnnotation instanceof window.Core.Annotations.Model3DAnnotation && !isMobile;\n const isRectangle = focusedAnnotation instanceof window.Core.Annotations.RectangleAnnotation;\n const isEllipse = focusedAnnotation instanceof window.Core.Annotations.EllipseAnnotation;\n const isPolygon = focusedAnnotation instanceof window.Core.Annotations.PolygonAnnotation;\n const isFreeText =\n focusedAnnotation instanceof window.Core.Annotations.FreeTextAnnotation &&\n (focusedAnnotation.getIntent() === window.Core.Annotations.FreeTextAnnotation.Intent.FreeText ||\n focusedAnnotation.getIntent() === window.Core.Annotations.FreeTextAnnotation.Intent.FreeTextCallout);\n const isRedaction = focusedAnnotation instanceof window.Core.Annotations.RedactionAnnotation;\n const colorMapKey = mapAnnotationToKey(focusedAnnotation);\n const isMeasure = !!focusedAnnotation.Measure;\n const showLineStyleOptions = getDataWithKey(mapToolNameToKey(focusedAnnotation.ToolName)).hasLineEndings;\n const isInstanceActive = !window.isApryseWebViewerWebComponent || document.activeElement?.shadowRoot === getRootNode();\n let StrokeStyle = 'solid';\n const isContentEdit = focusedAnnotation.isContentEditPlaceholder?.();\n const isReadOnlySignature = focusedAnnotation instanceof window.Core.Annotations.SignatureWidgetAnnotation && focusedAnnotation.fieldFlags.get(window.Core.Annotations.WidgetFlags.READ_ONLY);\n const showClearSignatureButton = isAppearanceSignature && !showFormFieldButton;\n try {\n StrokeStyle = (focusedAnnotation['Style'] === 'dash')\n ? `${focusedAnnotation['Style']},${focusedAnnotation['Dashes']}`\n : focusedAnnotation['Style'];\n } catch (err) {\n console.error(err);\n }\n let properties = {};\n if (showLineStyleOptions) {\n properties = {\n StartLineStyle: focusedAnnotation.getStartStyle(),\n EndLineStyle: focusedAnnotation.getEndStyle(),\n StrokeStyle,\n };\n }\n\n if (isRectangle || isEllipse || isPolygon) {\n properties = {\n StrokeStyle,\n };\n }\n\n if (isFreeText) {\n const richTextStyles = focusedAnnotation.getRichTextStyle();\n const isAutoSizeFont = focusedAnnotation.isAutoSizeFont();\n const calculatedFontSize = focusedAnnotation.getCalculatedFontSize();\n\n properties = {\n Font: focusedAnnotation.Font,\n FontSize: focusedAnnotation.FontSize,\n TextAlign: focusedAnnotation.TextAlign,\n TextVerticalAlign: focusedAnnotation.TextVerticalAlign,\n bold: richTextStyles?.[0]?.['font-weight'] === 'bold' ?? false,\n italic: richTextStyles?.[0]?.['font-style'] === 'italic' ?? false,\n underline: richTextStyles?.[0]?.['text-decoration']?.includes('underline') || richTextStyles?.[0]?.['text-decoration']?.includes('word'),\n strikeout: richTextStyles?.[0]?.['text-decoration']?.includes('line-through') ?? false,\n StrokeStyle,\n isAutoSizeFont,\n calculatedFontSize,\n };\n }\n\n if (isRedaction) {\n properties = {\n OverlayText: focusedAnnotation['OverlayText'],\n Font: focusedAnnotation['Font'],\n FontSize: focusedAnnotation['FontSize'],\n TextAlign: focusedAnnotation['TextAlign']\n };\n }\n\n const renderPopup = () => {\n switch (true) {\n case isStylePopupOpen:\n return (\n <AnnotationStylePopup\n annotations={[focusedAnnotation]}\n style={annotationStyle}\n isOpen={isOpen}\n onResize={onResize}\n isFreeText={isFreeText}\n isEllipse={isEllipse}\n isRedaction={isRedaction}\n isMeasure={isMeasure}\n colorMapKey={colorMapKey}\n showLineStyleOptions={showLineStyleOptions}\n properties={properties}\n hideSnapModeCheckbox={hideSnapModeCheckbox}\n hasBackToMenu={isRightClickMenu}\n onBackToMenu={closeEditStylePopup}\n />\n );\n case isDatePickerOpen:\n return (\n <DatePicker onClick={handleDateChange} annotation={focusedAnnotation} onDatePickerShow={onDatePickerShow} />\n );\n case isCalibrationPopupOpen:\n return <CalibrationPopup annotation={focusedAnnotation} />;\n case shortCutKeysFor3DVisible && focusedAnnotation instanceof window.Core.Annotations.Model3DAnnotation:\n return (\n <div className=\"shortCuts3D\">\n <div className=\"closeButton\" onClick={() => setShortCutKeysFor3DVisible(false)}>x</div>\n <div className=\"row\">{t('action.rotate3D')} <span>{t('shortcut.rotate3D')}</span></div>\n <div className=\"row\">{t('action.zoom')} <span>{t('shortcut.zoom3D')}</span></div>\n </div>\n );\n default:\n return (\n <FocusTrap\n locked={isOpen && isInstanceActive && !isRichTextPopupOpen && !isNotesPanelOpenOrActive && !isLinkModalOpen && !isWarningModalOpen && !isFreeText && !isContextMenuPopupOpen}\n >\n <div className=\"container\">\n <CustomizablePopup\n dataElement={DataElements.ANNOTATION_POPUP}\n childrenClassName='main-menu-button'\n >\n {showViewFileButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"viewFileButton\"\n label={isRightClickMenu ? 'action.viewFile' : ''}\n title={!isRightClickMenu ? 'action.viewFile' : ''}\n img=\"icon-view\"\n onClick={onViewFile}\n />\n )}\n {showCommentButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationCommentButton\"\n label={isRightClickMenu ? commentButtonLabel : ''}\n title={!isRightClickMenu ? commentButtonLabel : ''}\n img={commentButtonImg}\n onClick={onCommentAnnotation}\n />\n )}\n {showEditStyleButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationStyleEditButton\"\n label={isRightClickMenu ? 'action.style' : ''}\n title={!isRightClickMenu ? 'action.style' : ''}\n img=\"icon-menu-style-line\"\n onClick={customizableUI ? toggleStylePanel : openEditStylePopup}\n />\n )}\n {showContentEditButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationContentEditButton\"\n label={isRightClickMenu ? 'action.edit' : ''}\n title={!isRightClickMenu ? 'action.edit' : ''}\n img=\"ic_edit_page_24px\"\n onClick={onEditContent}\n />\n )}\n {showClearSignatureButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationClearSignatureButton\"\n label={!isReadOnlySignature && isRightClickMenu ? 'action.clearSignature' : ''}\n title={isReadOnlySignature ? 'action.readOnlySignature' : (!isRightClickMenu ? 'action.clearSignature' : '')}\n img={'icon-delete-line'}\n onClick={onClearAppearanceSignature}\n isNotClickableSelector={() => isReadOnlySignature}\n />\n )}\n {showRedactionButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationRedactButton\"\n label={isRightClickMenu ? 'action.apply' : ''}\n title={!isRightClickMenu ? 'action.apply' : ''}\n img=\"ic_check_black_24px\"\n onClick={onApplyRedaction}\n />\n )}\n {showGroupButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationGroupButton\"\n label={isRightClickMenu ? 'action.group' : ''}\n title={!isRightClickMenu ? 'action.group' : ''}\n img=\"group-annotations-icon\"\n onClick={onGroupAnnotations}\n />\n )}\n {showUngroupButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationUngroupButton\"\n label={isRightClickMenu ? 'action.ungroup' : ''}\n title={!isRightClickMenu ? 'action.ungroup' : ''}\n img=\"ungroup-annotations-icon\"\n onClick={onUngroupAnnotations}\n />\n )}\n {multipleAnnotationsSelected && !isMobile && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement='openAlignmentButton'\n label={isRightClickMenu ? 'alignmentPopup.alignment' : ''}\n title={!isRightClickMenu ? 'alignmentPopup.alignment' : ''}\n img=\"ic-alignment-main\"\n onClick={onOpenAlignmentModal}\n />\n )}\n {showFormFieldButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"formFieldEditButton\"\n label={isRightClickMenu ? 'action.formFieldEdit' : ''}\n title={!isRightClickMenu ? 'action.formFieldEdit' : ''}\n img=\"icon-edit-form-field\"\n onClick={onOpenFormField}\n />\n )}\n {showDeleteButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"annotationDeleteButton\"\n label={isRightClickMenu ? 'action.delete' : ''}\n title={!isRightClickMenu ? 'action.delete' : ''}\n img=\"icon-delete-line\"\n onClick={isContentEdit ? openContentEditDeleteWarningModal : onDeleteAnnotation}\n />\n )}\n {showCalibrateButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement={DataElements.CALIBRATION_POPUP_BUTTON}\n label={isRightClickMenu ? 'action.calibrate' : ''}\n title={!isRightClickMenu ? 'action.calibrate' : ''}\n img=\"calibrate\"\n onClick={onOpenCalibration}\n />\n )}\n {showLinkButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"linkButton\"\n label={isRightClickMenu ? 'tool.Link' : ''}\n title={!isRightClickMenu ? 'tool.Link' : ''}\n img={hasAssociatedLink ? 'icon-tool-unlink' : 'icon-tool-link'}\n onClick={linkAnnotationToURL}\n />\n )}\n {showFileDownloadButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"fileAttachmentDownload\"\n label={isRightClickMenu ? 'action.fileAttachmentDownload' : ''}\n title={!isRightClickMenu ? 'action.fileAttachmentDownload' : ''}\n img=\"icon-download\"\n onClick={() => downloadFileAttachment(focusedAnnotation)}\n />\n )}\n {show3DShortCutButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"shortCutKeysFor3D\"\n label={isRightClickMenu ? 'action.viewShortCutKeysFor3D' : ''}\n title={!isRightClickMenu ? 'action.viewShortCutKeysFor3D' : ''}\n img=\"icon-keyboard\"\n onClick={() => setShortCutKeysFor3DVisible(true)}\n />\n )}\n {showAudioPlayButton && (\n <ActionButton\n className=\"main-menu-button\"\n dataElement=\"playSoundButton\"\n label={isRightClickMenu ? 'action.playAudio' : ''}\n title={!isRightClickMenu ? 'action.playAudio' : ''}\n img=\"ic_play_24px\"\n onClick={() => handlePlaySound(focusedAnnotation)}\n />\n )}\n </CustomizablePopup>\n </div>\n </FocusTrap>\n );\n }\n };\n\n const annotationPopup = (\n <div\n className={classNames({\n Popup: true,\n AnnotationPopup: true,\n open: isOpen,\n closed: !isOpen,\n stylePopupOpen: isStylePopupOpen,\n 'is-vertical': isRightClickMenu,\n 'is-horizontal': !isRightClickMenu,\n })}\n ref={popupRef}\n data-element={DataElements.ANNOTATION_POPUP}\n style={{ ...position, visibility: isVisible || isVisible === undefined ? 'visible' : 'hidden' }}\n >\n {renderPopup()}\n </div>\n );\n\n return isIE || isMobile ? (\n annotationPopup\n ) : (\n <Draggable cancel=\".Button, .cell, .sliders-container svg, select, button, input\">{annotationPopup}</Draggable>\n );\n};\n\nAnnotationPopup.propTypes = propTypes;\n\nexport default AnnotationPopup;","import React, { useState, useEffect, useRef, useCallback, useLayoutEffect } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport debounce from 'lodash/debounce';\nimport { saveAs } from 'file-saver';\n\nimport core from 'core';\nimport { getAnnotationPopupPositionBasedOn } from 'helpers/getPopupPosition';\nimport applyRedactions from 'helpers/applyRedactions';\nimport { isMobile, isIE } from 'helpers/device';\nimport { useTranslation } from 'react-i18next';\nimport { getOpenedWarningModal, getOpenedColorPicker, getDatePicker } from 'helpers/getElements';\nimport getGroupedLinkAnnotations from 'helpers/getGroupedLinkAnnotations';\nimport getHashParameters from 'helpers/getHashParameters';\nimport useOnClickOutside from 'hooks/useOnClickOutside';\nimport actions from 'actions';\nimport selectors from 'selectors';\nimport DataElements from 'constants/dataElement';\nimport { PRIORITY_THREE } from 'constants/actionPriority';\nimport getRootNode from 'helpers/getRootNode';\nimport { ITEM_RENDER_PREFIXES } from 'constants/customizationVariables';\nimport AnnotationPopup from './AnnotationPopup';\n\nimport './AnnotationPopup.scss';\nimport { isAnnotationRenderedInDisplayMode } from 'src/helpers/isAnnotationRenderedInDisplayMode';\n\nconst { ToolNames } = window.Core.Tools;\nconst { Annotations } = window.Core;\n\nconst propTypes = {\n focusedAnnotation: PropTypes.object,\n selectedMultipleAnnotations: PropTypes.bool,\n canModify: PropTypes.bool,\n focusedAnnotationStyle: PropTypes.object,\n isStylePopupOpen: PropTypes.bool,\n setIsStylePopupOpen: PropTypes.func,\n isDatePickerOpen: PropTypes.bool,\n setDatePickerOpen: PropTypes.func,\n isDatePickerMount: PropTypes.bool,\n setDatePickerMount: PropTypes.func,\n hasAssociatedLink: PropTypes.bool,\n includesFormFieldAnnotation: PropTypes.bool,\n stylePopupRepositionFlag: PropTypes.bool,\n setStylePopupRepositionFlag: PropTypes.func,\n closePopup: PropTypes.func,\n};\n\nconst AnnotationPopupContainer = ({\n focusedAnnotation,\n selectedMultipleAnnotations,\n canModify,\n focusedAnnotationStyle,\n isStylePopupOpen,\n setIsStylePopupOpen,\n isDatePickerOpen,\n setDatePickerOpen,\n isDatePickerMount,\n setDatePickerMount,\n hasAssociatedLink,\n includesFormFieldAnnotation,\n stylePopupRepositionFlag,\n setStylePopupRepositionFlag,\n closePopup,\n}) => {\n const isDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.ANNOTATION_POPUP));\n const isOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.ANNOTATION_POPUP));\n const isContextMenuPopupOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.CONTEXT_MENU_POPUP));\n const isRightClickAnnotationPopupEnabled = useSelector(selectors.isRightClickAnnotationPopupEnabled);\n const isNotesPanelDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.NOTES_PANEL));\n const isAnnotationStylePopupDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.ANNOTATION_STYLE_POPUP));\n const isInlineCommentingDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.INLINE_COMMENT_POPUP));\n const isNotesPanelOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.NOTES_PANEL));\n const isLinkModalOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.LINK_MODAL));\n const isWarningModalOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.WARNING_MODAL));\n const isRichTextPopupOpen = useSelector((state) => selectors.isElementOpen(state, 'richTextPopup'));\n const isMultiTab = useSelector(selectors.getIsMultiTab);\n const tabManager = useSelector(selectors.getTabManager);\n const tabs = useSelector(selectors.getTabs);\n const notesInLeftPanel = useSelector(selectors.getNotesInLeftPanel);\n const leftPanelOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.LEFT_PANEL));\n const activeLeftPanel = useSelector(selectors.getActiveLeftPanel);\n const activeDocumentViewerKey = useSelector(selectors.getActiveDocumentViewerKey);\n const isAnyCustomPanelOpen = useSelector(selectors.isAnyCustomPanelOpen);\n const featureFlags = useSelector(selectors.getFeatureFlags);\n const isStylePanelOpen = useSelector((state) => selectors.isElementOpen(state, DataElements.STYLE_PANEL));\n const isStylePanelDisabled = useSelector((state) => selectors.isElementDisabled(state, DataElements.STYLE_PANEL));\n const stylePanelInFlyout = useSelector((state) => selectors.getIsPanelInFlyout(state, ITEM_RENDER_PREFIXES.STYLE_PANEL, [DataElements.MULTI_SELECT_STYLE_PANEL_FLYOUT]));\n const isStylePanelFlyoutOpen = useSelector((state) => selectors.isElementOpen(state, stylePanelInFlyout?.dataElement));\n const [t] = useTranslation();\n const dispatch = useDispatch();\n const [position, setPosition] = useState({ left: 0, top: 0 });\n const [isVisible, setIsVisible] = useState(false);\n const [isCalibrationPopupOpen, setCalibrationPopupOpen] = useState(false);\n const popupRef = useRef();\n\n const isFocusedAnnotationSelected = isRightClickAnnotationPopupEnabled ? core.isAnnotationSelected(focusedAnnotation, activeDocumentViewerKey) : true;\n const annotManager = core.getAnnotationManager(activeDocumentViewerKey);\n const sixtyFramesPerSecondIncrement = 16;\n // on tablet, the behaviour will be like on desktop, including being draggable\n\n const { customizableUI } = featureFlags;\n\n const toggleStylePanel = () => {\n if (!isStylePanelOpen && !isStylePanelDisabled && !stylePanelInFlyout) {\n dispatch(actions.openElement(DataElements.STYLE_PANEL));\n }\n if (stylePanelInFlyout) {\n if (isStylePanelFlyoutOpen) {\n dispatch(actions.closeElement(stylePanelInFlyout.dataElement));\n } else {\n dispatch(actions.openFlyout(stylePanelInFlyout.dataElement, 'annotationStyleEditButton'));\n }\n }\n if (!stylePanelInFlyout) {\n closePopup();\n }\n };\n\n useOnClickOutside(\n popupRef,\n useCallback((e) => {\n const notesPanel = getRootNode().querySelector(`[data-element=\"${DataElements.NOTES_PANEL}\"]`);\n const clickedInNotesPanel = notesPanel?.contains(e.target);\n const clickedInLinkModal = getRootNode().querySelector('.LinkModal.open')?.contains(e.target);\n const stylePanelFlyout = getRootNode().querySelector(`[data-element=${stylePanelInFlyout?.dataElement}]`);\n const clickedInStylePanelFlyout = stylePanelFlyout?.contains(e.target);\n const datePicker = getDatePicker();\n const warningModal = getOpenedWarningModal();\n const colorPicker = getOpenedColorPicker();\n\n // the notes panel has mousedown handlers to handle the opening/closing states of this component\n // we don't want this handler to run when clicked in the notes panel otherwise the opening/closing states may mess up\n // for example: click on a note will call core.selectAnnotation which triggers the annotationSelected event\n // and opens this component. If we don't exclude the notes panel this handler will run and close it after\n // Similarly, we don't want the popup to close when clicking on the style panel flyout or the flyout loses its anchor.\n if (!clickedInNotesPanel && !clickedInLinkModal && !clickedInStylePanelFlyout && !warningModal && !colorPicker && !datePicker) {\n if (isRightClickAnnotationPopupEnabled) {\n closePopup();\n } else {\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n }\n }\n }, [isRightClickAnnotationPopupEnabled])\n );\n\n const setPopupPosition = () => {\n const visiblePages = core.getDisplayModeObject().getVisiblePages();\n const isFocusableInCurrentDisplayMode = isAnnotationRenderedInDisplayMode(core, focusedAnnotation);\n if (popupRef.current && isFocusableInCurrentDisplayMode && focusedAnnotation) {\n setPosition(getAnnotationPopupPositionBasedOn(focusedAnnotation, popupRef, activeDocumentViewerKey));\n } else if (!isNotesPanelDisabled && !isFocusableInCurrentDisplayMode) {\n const annotations = core.getSelectedAnnotations();\n const annotationInPage = annotations.find(\n (annotation) => visiblePages.includes(annotation.PageNumber)\n );\n setPosition(getAnnotationPopupPositionBasedOn(annotationInPage, popupRef, activeDocumentViewerKey));\n }\n };\n\n const handleResize = debounce(() => {\n if (AnnotationPopupContainer) {\n setPopupPosition();\n }\n }, sixtyFramesPerSecondIncrement, { 'trailing': true, 'leading': false });\n\n const handleVisibility = debounce(() => {\n if (AnnotationPopupContainer) {\n setIsVisible(isFocusedAnnotationSelected);\n }\n }, sixtyFramesPerSecondIncrement * 2, { 'trailing': true, 'leading': false });\n\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, []);\n\n // useLayoutEffect here to avoid flashing issue when popup is close and open on scroll\n useLayoutEffect(() => {\n if (focusedAnnotation || isStylePopupOpen || isDatePickerMount) {\n handleResize();\n setIsVisible(false);\n handleVisibility();\n }\n // canModify is needed here because the effect from useOnAnnotationPopupOpen hook will run again and determine which button to show, which in turn change the popup size and will need to recalculate position\n }, [focusedAnnotation, isStylePopupOpen, isDatePickerMount, canModify, activeDocumentViewerKey]);\n\n useEffect(() => {\n if (focusedAnnotation && focusedAnnotation.ToolName === ToolNames.CALIBRATION_MEASUREMENT) {\n setCalibrationPopupOpen(true);\n }\n }, [focusedAnnotation]);\n\n useEffect(() => {\n if (isOpen || isRichTextPopupOpen) {\n dispatch(actions.closeElement(DataElements.INLINE_COMMENT_POPUP));\n }\n }, [isOpen, isRichTextPopupOpen]);\n\n /* VIEW FILE */\n const wvServer = !!getHashParameters('webviewerServerURL', null);\n const acceptFormats = wvServer ? window.Core.SupportedFileFormats.SERVER : window.Core.SupportedFileFormats.CLIENT;\n const showViewFileButton = focusedAnnotation instanceof Annotations.FileAttachmentAnnotation && isMultiTab\n && acceptFormats.includes(window.Core.mimeTypeToExtension[focusedAnnotation.getFileMetadata().mimeType]);\n\n const onViewFile = useCallback(async () => {\n if (!tabManager || !isMultiTab) {\n return console.warn('Can\\'t open file in non-multi-tab mode');\n }\n const metaData = focusedAnnotation.getFileMetadata();\n const fileAttachmentTab = tabs.find((tab) => tab.options.filename === metaData.filename);\n if (fileAttachmentTab) { // If already opened once\n await tabManager.setActiveTab(fileAttachmentTab.id, true);\n return;\n }\n await tabManager.addTab(await focusedAnnotation.getFileData(), {\n extension: window.Core.mimeTypeToExtension[metaData.mimeType],\n filename: metaData.filename,\n saveCurrentActiveTabState: true,\n setActive: true,\n });\n }, [tabManager, focusedAnnotation, tabs, isMultiTab]);\n\n /* ALL REACT HOOKS NEED TO BE BEFORE RENDERING */\n if (isDisabled || !focusedAnnotation) {\n return null;\n }\n\n /* COMMENT / DATE */\n const selectedAnnotations = core.getSelectedAnnotations(activeDocumentViewerKey);\n const numberOfSelectedAnnotations = selectedAnnotations.length;\n const multipleAnnotationsSelected = numberOfSelectedAnnotations > 1;\n const isFreeTextAnnot = focusedAnnotation instanceof Annotations.FreeTextAnnotation;\n const isDateFreeTextCanEdit = isFreeTextAnnot && !!focusedAnnotation.getDateFormat() && core.canModifyContents(focusedAnnotation, activeDocumentViewerKey);\n const numberOfGroups = core.getNumberOfGroups(selectedAnnotations, activeDocumentViewerKey);\n const canGroup = numberOfGroups > 1;\n const canUngroup = numberOfGroups === 1 && numberOfSelectedAnnotations > 1 && isFocusedAnnotationSelected;\n const isAppearanceSignature =\n focusedAnnotation instanceof Annotations.SignatureWidgetAnnotation\n && focusedAnnotation.isSignedByAppearance();\n const isInReadOnlyMode = core.getIsReadOnly();\n\n const showCommentButton = (\n (!isNotesPanelDisabled || !isInlineCommentingDisabled)\n && (!multipleAnnotationsSelected || (multipleAnnotationsSelected && !isFocusedAnnotationSelected))\n && focusedAnnotation.ToolName !== ToolNames.CROP\n && !includesFormFieldAnnotation\n && !focusedAnnotation.isContentEditPlaceholder()\n && !isAppearanceSignature\n );\n\n const onCommentAnnotation = () => {\n if (isDateFreeTextCanEdit) {\n setDatePickerOpen(true);\n return;\n }\n\n dispatch(actions.closeElement('searchPanel'));\n dispatch(actions.closeElement('redactionPanel'));\n const contentEditManager = core.getContentEditManager(activeDocumentViewerKey);\n if (contentEditManager.isInContentEditMode()) {\n dispatch(actions.closeElement('textEditingPanel'));\n contentEditManager.endContentEditMode();\n }\n\n dispatch(actions.triggerNoteEditing());\n if (isInlineCommentingDisabled) {\n dispatch(actions.openElement(DataElements.NOTES_PANEL));\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n } else {\n if (!isNotesPanelOpen) {\n dispatch(actions.openElement(DataElements.INLINE_COMMENT_POPUP));\n }\n closePopup();\n }\n };\n\n const onOpenAlignmentModal = () => {\n dispatch(actions.openElement(DataElements.ANNOTATION_ALIGNMENT_POPUP));\n closePopup();\n };\n\n const handleDateChange = (text) => {\n annotManager.setNoteContents(focusedAnnotation, text);\n annotManager.updateAnnotation(focusedAnnotation);\n };\n\n const onDatePickerShow = (isDatePickerShowed) => {\n setDatePickerMount(isDatePickerShowed);\n };\n\n /* EDIT STYLE */\n const hasStyle = Object.keys(focusedAnnotationStyle).length > 0;\n\n const toolsWithNoStyling = [\n ToolNames.CROP,\n ToolNames.VIDEO_REDACTION,\n ToolNames.VIDEO_AND_AUDIO_REDACTION,\n ToolNames.AUDIO_REDACTION,\n ];\n\n const showEditStyleButton = (\n canModify\n && hasStyle\n && (!isAnnotationStylePopupDisabled || customizableUI)\n && (!multipleAnnotationsSelected || canUngroup || (multipleAnnotationsSelected && !isFocusedAnnotationSelected))\n && !toolsWithNoStyling.includes(focusedAnnotation.ToolName)\n && !(focusedAnnotation instanceof Annotations.Model3DAnnotation)\n && !focusedAnnotation.isContentEditPlaceholder()\n && !isAppearanceSignature\n && !(focusedAnnotation instanceof Annotations.PushButtonWidgetAnnotation)\n );\n\n const hideSnapModeCheckbox = focusedAnnotation instanceof Annotations.EllipseAnnotation || !core.isFullPDFEnabled();\n\n const onResize = () => {\n setStylePopupRepositionFlag(!stylePopupRepositionFlag);\n };\n\n /* EDIT CONTENT */\n const showContentEditButton =\n focusedAnnotation.isContentEditPlaceholder()\n && focusedAnnotation.getContentEditType() === window.Core.ContentEdit.Types.TEXT;\n\n const onEditContent = async () => {\n annotManager.trigger('annotationDoubleClicked', focusedAnnotation);\n\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n };\n\n /* CLEAR APPEARANCE SIGNATURE */\n const onClearAppearanceSignature = () => {\n focusedAnnotation.clearSignature(annotManager);\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n };\n\n /* REDACTION */\n const redactionEnabled = core.isAnnotationRedactable(focusedAnnotation, activeDocumentViewerKey);\n const showRedactionButton = redactionEnabled && !multipleAnnotationsSelected && !includesFormFieldAnnotation;\n\n const onApplyRedaction = () => {\n dispatch(applyRedactions(focusedAnnotation, undefined, activeDocumentViewerKey));\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n };\n\n /* GROUP / UNGROUP */\n const primaryAnnotation = selectedAnnotations.find((selectedAnnotation) => !selectedAnnotation.InReplyTo);\n\n const showGroupButton =\n canModify\n && isFocusedAnnotationSelected\n && canGroup\n && !includesFormFieldAnnotation;\n\n const onGroupAnnotations = () => {\n core.groupAnnotations(primaryAnnotation, selectedAnnotations, activeDocumentViewerKey);\n };\n\n const showUngroupButton = canUngroup;\n\n const onUngroupAnnotations = () => {\n core.ungroupAnnotations(selectedAnnotations, activeDocumentViewerKey);\n };\n\n /* FORM FIELD */\n const formFieldCreationManager = core.getFormFieldCreationManager(activeDocumentViewerKey);\n const isInFormFieldCreationMode = formFieldCreationManager.isInFormFieldCreationMode();\n const showFormFieldButton = includesFormFieldAnnotation\n && isInFormFieldCreationMode\n && !(focusedAnnotation instanceof Annotations.PushButtonWidgetAnnotation);\n\n const onOpenFormField = () => {\n closePopup();\n // We disable it while the form field popup is open to prevent having both open\n // at the same time. We re-enable it when the form field popup is closed.\n if (customizableUI) {\n dispatch(actions.disableElement(PRIORITY_THREE));\n dispatch(actions.closeElement(DataElements.FORM_FIELD_EDIT_POPUP));\n } else {\n dispatch(actions.disableElement(DataElements.ANNOTATION_POPUP, PRIORITY_THREE));\n }\n dispatch(actions.openElement(DataElements.FORM_FIELD_EDIT_POPUP));\n dispatch(actions.openElement(DataElements.FORM_FIELD_PANEL));\n };\n\n /* DELETE ANNOTATION */\n const showDeleteButton = canModify;\n\n const openContentEditDeleteWarningModal = () => {\n const message = t('option.contentEdit.deletionModal.message');\n const title = t('option.contentEdit.deletionModal.title');\n const confirmBtnText = t('action.ok');\n\n const warning = {\n message,\n title,\n confirmBtnText,\n onConfirm: () => onDeleteAnnotation(),\n };\n dispatch(actions.showWarningMessage(warning));\n };\n\n const onDeleteAnnotation = () => {\n if (isFocusedAnnotationSelected) {\n core.deleteAnnotations(core.getSelectedAnnotations(activeDocumentViewerKey), undefined, activeDocumentViewerKey);\n } else {\n core.deleteAnnotations([focusedAnnotation], undefined, activeDocumentViewerKey);\n }\n closePopup();\n };\n\n /* LINK ANNOTATION */\n const toolsThatCantHaveLinks = [\n ToolNames.CROP,\n ToolNames.SIGNATURE,\n ToolNames.REDACTION,\n ToolNames.REDACTION2,\n ToolNames.REDACTION3,\n ToolNames.REDACTION4,\n ToolNames.STICKY,\n ToolNames.STICKY2,\n ToolNames.STICKY3,\n ToolNames.STICKY4,\n ];\n\n const showLinkButton = (\n !toolsThatCantHaveLinks.includes(focusedAnnotation.ToolName)\n && !includesFormFieldAnnotation\n && !focusedAnnotation.isContentEditPlaceholder()\n // TODO(Adam): Update this once SoundAnnotation tool is created.\n && !(focusedAnnotation instanceof Annotations.SoundAnnotation)\n && !isAppearanceSignature\n );\n\n const showCalibrateButton =\n canModify\n && focusedAnnotation.Measure\n && focusedAnnotation instanceof Annotations.LineAnnotation;\n\n const onOpenCalibration = () => {\n dispatch(actions.closeElement(DataElements.ANNOTATION_POPUP));\n dispatch(actions.openElement(DataElements.CALIBRATION_MODAL));\n };\n\n const linkAnnotationToURL = () => {\n if (hasAssociatedLink) {\n const annotationsToUnlink = isFocusedAnnotationSelected ? selectedAnnotations : [focusedAnnotation];\n annotationsToUnlink.forEach((annot) => {\n const linkAnnotations = getGroupedLinkAnnotations(annot);\n linkAnnotations.forEach((linkAnnot, index) => {\n annotManager.ungroupAnnotations([linkAnnot]);\n if (annot instanceof Annotations.TextHighlightAnnotation && annot.Opacity === 0 && index === 0) {\n annotManager.deleteAnnotations([annot, linkAnnot], null, true);\n } else {\n annotManager.deleteAnnotation(linkAnnot, null, true);\n }\n });\n });\n closePopup();\n } else {\n dispatch(actions.openElement(DataElements.LINK_MODAL));\n }\n };\n\n /* DOWNLOAD FILE ATTACHMENT */\n const showFileDownloadButton = focusedAnnotation instanceof Annotations.FileAttachmentAnnotation;\n\n const downloadFileAttachment = async (annot) => {\n // no need to check that annot is of type file annot as the check is done in the JSX\n const { fileData, fileName } = await annot.getFullFileMetadata();\n saveAs(fileData, fileName);\n };\n\n /* AUDIO ANNOTATION */\n const showAudioPlayButton = (\n !isIE &&\n !selectedMultipleAnnotations &&\n focusedAnnotation instanceof Annotations.SoundAnnotation &&\n focusedAnnotation.hasAudioData()\n );\n\n const isNotesPanelOpenOrActive = isNotesPanelOpen\n || (notesInLeftPanel && leftPanelOpen && activeLeftPanel === 'notesPanel')\n || isAnyCustomPanelOpen\n || isInFormFieldCreationMode;\n\n const handlePlaySound = (annotation) => {\n dispatch(actions.setActiveSoundAnnotation(annotation));\n dispatch(actions.triggerResetAudioPlaybackPosition(true));\n dispatch(actions.openElement('audioPlaybackPopup'));\n };\n\n return (\n <AnnotationPopup\n isMobile={isMobile()}\n isIE={isIE}\n isOpen={isOpen}\n isRightClickMenu={isRightClickAnnotationPopupEnabled}\n isNotesPanelOpenOrActive={isNotesPanelOpenOrActive}\n isRichTextPopupOpen={isRichTextPopupOpen}\n isLinkModalOpen={isLinkModalOpen}\n isWarningModalOpen={isWarningModalOpen}\n isContextMenuPopupOpen={isContextMenuPopupOpen}\n isVisible={isVisible}\n\n popupRef={popupRef}\n position={position}\n focusedAnnotation={focusedAnnotation}\n multipleAnnotationsSelected={multipleAnnotationsSelected}\n\n showViewFileButton={showViewFileButton}\n onViewFile={onViewFile}\n\n showCommentButton={showCommentButton}\n onCommentAnnotation={onCommentAnnotation}\n isDateFreeTextCanEdit={isDateFreeTextCanEdit}\n isDatePickerOpen={isDatePickerOpen}\n handleDateChange={handleDateChange}\n onDatePickerShow={onDatePickerShow}\n isCalibrationPopupOpen={isCalibrationPopupOpen}\n\n showEditStyleButton={showEditStyleButton}\n isStylePopupOpen={isStylePopupOpen}\n hideSnapModeCheckbox={hideSnapModeCheckbox}\n openEditStylePopup={() => setIsStylePopupOpen(true)}\n closeEditStylePopup={() => setIsStylePopupOpen(false)}\n annotationStyle={focusedAnnotationStyle}\n onResize={onResize}\n\n showContentEditButton={showContentEditButton}\n onEditContent={onEditContent}\n openContentEditDeleteWarningModal={openContentEditDeleteWarningModal}\n\n isAppearanceSignature={isAppearanceSignature}\n onClearAppearanceSignature={onClearAppearanceSignature}\n\n showRedactionButton={showRedactionButton}\n onApplyRedaction={onApplyRedaction}\n\n showGroupButton={showGroupButton}\n onGroupAnnotations={onGroupAnnotations}\n showUngroupButton={showUngroupButton}\n onUngroupAnnotations={onUngroupAnnotations}\n\n showFormFieldButton={showFormFieldButton}\n onOpenFormField={onOpenFormField}\n\n showDeleteButton={showDeleteButton}\n onDeleteAnnotation={onDeleteAnnotation}\n\n showLinkButton={showLinkButton}\n hasAssociatedLink={hasAssociatedLink}\n linkAnnotationToURL={linkAnnotationToURL}\n\n showFileDownloadButton={showFileDownloadButton}\n downloadFileAttachment={downloadFileAttachment}\n\n showAudioPlayButton={showAudioPlayButton}\n handlePlaySound={handlePlaySound}\n\n showCalibrateButton={showCalibrateButton}\n onOpenCalibration={onOpenCalibration}\n\n customizableUI={customizableUI}\n toggleStylePanel={toggleStylePanel}\n isStylePanelOpen={isStylePanelOpen}\n isInReadOnlyMode={isInReadOnlyMode}\n\n onOpenAlignmentModal={onOpenAlignmentModal}\n />\n );\n};\n\nAnnotationPopupContainer.propTypes = propTypes;\n\nexport default AnnotationPopupContainer;\n","import AnnotationPopupContainer from './AnnotationPopupContainer';\n\nexport default AnnotationPopupContainer;"],"sourceRoot":""}
|