{"version":3,"sources":["webpack:///./src/components/EmailImagesSidebar.vue?9b8f","webpack:///./node_modules/mobile-drag-drop/index.min.js","webpack:///./src/components/view/ViewerImageCommentForm.vue?86e4","webpack:///./src/components/layout/MprViewerAnnotationDialog.vue?bec5","webpack:///./src/components/ImagePlaceholder.vue?5acf","webpack:///./src/components/hotkeys/HotkeyModal.vue?56c3","webpack:///./src/components/layout/ViewerLayoutSelector.vue?7d4a","webpack:///./src/router/layouts/Viewer.vue?f294","webpack:///./node_modules/lodash/_baseDifference.js","webpack:///./node_modules/cornerstone-math/dist/cornerstoneMath.js","webpack:///./src/components/layout/LayoutGridSelector.vue?97e1","webpack:///./src/components/layout/ViewerAnnotationDialog.vue?1a46","webpack:///./src/components/layout/ViewerNavigation.vue?a32d","webpack:///./node_modules/intro.js/intro.js","webpack:///./src/components/ImageViewer.vue?a578","webpack:///./src/dialogs/AboutOmni.vue?13a4","webpack:///./src/components/HelpMenu.vue?8cee","webpack:///./src/dialogs/AboutOmni.vue?9709","webpack:///src/dialogs/AboutOmni.vue","webpack:///./src/dialogs/AboutOmni.vue?2ea2","webpack:///./src/dialogs/AboutOmni.vue","webpack:///./src/dialogs/AboutCommunity.vue?8f13","webpack:///src/dialogs/AboutCommunity.vue","webpack:///./src/dialogs/AboutCommunity.vue?18b7","webpack:///./src/dialogs/AboutCommunity.vue","webpack:///src/components/HelpMenu.vue","webpack:///./src/components/HelpMenu.vue?c903","webpack:///./src/components/HelpMenu.vue","webpack:///./src/components/Banner.vue?febe","webpack:///src/components/Banner.vue","webpack:///./src/components/Banner.vue?d050","webpack:///./src/components/Banner.vue","webpack:///./src/components/layout/ViewerLayoutSelector.vue?9d43","webpack:///./src/router/layouts/ViewerTour.js","webpack:///./src/components/view/ViewerStudyDownloadModal.vue?c6d6","webpack:///./src/components/CommunityUpsellPromo.vue?11f8","webpack:///src/components/CommunityUpsellPromo.vue","webpack:///./src/components/CommunityUpsellPromo.vue?281b","webpack:///./src/components/CommunityUpsellPromo.vue","webpack:///./src/components/layout/ViewerAnnotationDialog/AstCalibration.vue?509d","webpack:///./node_modules/mobile-drag-drop/scroll-behaviour.js","webpack:///./src/components/view/ViewerReportList.vue?cdee","webpack:///./src/components/layout/ViewerTools.vue?58ac","webpack:///./node_modules/core-js/modules/es.number.max-safe-integer.js","webpack:///./src/components/layout/LayoutGridSelector.vue?810e","webpack:///src/components/layout/LayoutGridSelector.vue","webpack:///./src/components/layout/LayoutGridSelector.vue?76a3","webpack:///./src/components/layout/LayoutGridSelector.vue","webpack:///./src/router/layouts/MprViewerTour.js","webpack:///./src/router/layouts/Viewer.vue?00a2","webpack:///./src/cornerstone/_shared/events.js","webpack:///./src/cornerstone/tools/util/triggerDoneModifying.js","webpack:///./src/cornerstone/tools/_shared/toolSelectedCallback.js","webpack:///./src/cornerstone/tools/util/handles.js","webpack:///./src/cornerstone/manipulators/moveNewHandle.js","webpack:///./src/cornerstone/manipulators/moveHandle.js","webpack:///./src/cornerstone/tools/AstAngle.js","webpack:///./src/cornerstone/tools/astCalibration/calculateLength.js","webpack:///./src/cornerstone/tools/AstCalibration.js","webpack:///./src/cornerstone/tools/AstText.js","webpack:///./src/cornerstone/tools/AstArrowAnnotate.js","webpack:///./src/cornerstone/tools/util/getImagePixelSpacing.ts","webpack:///./src/cornerstone/tools/AstRectangleRoi.js","webpack:///./src/cornerstone/tools/util/getROITextBoxCoords.js","webpack:///./src/cornerstone/tools/AstCircleRoi.js","webpack:///./src/cornerstone/tools/AstEllipticalRoi.js","webpack:///./src/utils/convertToVector3.ts","webpack:///./src/cornerstone/tools/AstCrossPoint.js","webpack:///./src/cornerstone/tools/AstHipDysplasia.js","webpack:///./src/cornerstone/tools/AstLengthAngle.js","webpack:///./src/cornerstone/tools/AstOrientationMarkers.js","webpack:///./src/cornerstone/tools/AstPennHip.js","webpack:///./src/cornerstone/tools/AstProbe.js","webpack:///./src/cornerstone/tools/AstTplo.js","webpack:///./src/cornerstone/tools/AstTta.js","webpack:///./src/cornerstone/manipulators/moveAndRotateHandles.js","webpack:///./src/cornerstone/tools/AstVertebralHeart.js","webpack:///./src/cornerstone/tools/AstEraser.js","webpack:///./src/cornerstone/tools/AstReferenceLines.js","webpack:///./src/cornerstone/tools/AstRotateTool.js","webpack:///./src/cornerstone/tools/index.js","webpack:///./src/mixins/fullscreen.js","webpack:///./src/components/layout/ViewerAnnotationDialog.vue?8fe6","webpack:///./src/components/layout/ViewerAnnotationDialogCheckbox.vue?04be","webpack:///src/components/layout/ViewerAnnotationDialogCheckbox.vue","webpack:///./src/components/layout/ViewerAnnotationDialogCheckbox.vue?9f42","webpack:///./src/components/layout/ViewerAnnotationDialogCheckbox.vue","webpack:///./src/components/layout/ViewerAnnotationDialog/AstCircleRoi.vue?14d7","webpack:///src/components/layout/ViewerAnnotationDialog/AstCircleRoi.vue","webpack:///./src/components/layout/ViewerAnnotationDialog/AstCircleRoi.vue?0b8a","webpack:///./src/components/layout/ViewerAnnotationDialog/AstCircleRoi.vue","webpack:///./src/components/layout/ViewerAnnotationDialog/AstCalibration.vue?1dc9","webpack:///src/components/layout/ViewerAnnotationDialog/AstCalibration.vue","webpack:///./src/components/layout/ViewerAnnotationDialog/AstCalibration.vue?1040","webpack:///./src/components/layout/ViewerAnnotationDialog/AstCalibration.vue","webpack:///./src/components/layout/ViewerAnnotationDialog.vue","webpack:///./src/components/layout/ViewerAnnotationDialog.vue?a80e","webpack:///./src/components/layout/ViewerAnnotationDialog.vue?5b79","webpack:///./src/components/layout/MprViewerAnnotationDialog.vue?2d3f","webpack:///./src/components/layout/ViewerAnnotationDialog/CircleAnnotationDialog.vue?816d","webpack:///src/components/layout/ViewerAnnotationDialog/CircleAnnotationDialog.vue","webpack:///./src/components/layout/ViewerAnnotationDialog/CircleAnnotationDialog.vue?407f","webpack:///./src/components/layout/ViewerAnnotationDialog/CircleAnnotationDialog.vue","webpack:///./src/components/layout/MprViewerAnnotationDialog.vue","webpack:///./src/components/layout/MprViewerAnnotationDialog.vue?b7c4","webpack:///./src/components/layout/MprViewerAnnotationDialog.vue?8332","webpack:///./src/components/hotkeys/HotkeyModal.vue?fc05","webpack:///src/components/hotkeys/HotkeyModal.vue","webpack:///./src/components/hotkeys/HotkeyModal.vue?3d98","webpack:///./src/components/hotkeys/HotkeyModal.vue","webpack:///./src/components/ImagePlaceholder.vue?d950","webpack:///src/components/ImagePlaceholder.vue","webpack:///./src/components/ImagePlaceholder.vue?e57f","webpack:///./src/components/ImagePlaceholder.vue","webpack:///./src/components/ImageViewer.vue?ede9","webpack:///./src/utils/shouldRenderWebGL.js","webpack:///src/components/layout/MprViewerTools.vue","webpack:///src/components/ImageViewer.vue","webpack:///./src/components/ImageViewer.vue?c5aa","webpack:///./src/components/ImageViewer.vue","webpack:///./src/components/layout/MprViewerLayoutSelector.vue?8e7a","webpack:///src/components/layout/MprViewerLayoutSelector.vue","webpack:///./src/components/layout/MprViewerLayoutSelector.vue?82ab","webpack:///./src/components/layout/MprViewerLayoutSelector.vue","webpack:///./src/components/layout/MprViewerTools.vue?4b44","webpack:///./src/components/layout/ViewerToolsMixin.js","webpack:///./src/components/layout/MprViewerTools.vue?54f7","webpack:///./src/components/layout/MprViewerTools.vue","webpack:///./src/components/layout/ViewerLayoutSelector.vue?de73","webpack:///src/components/layout/ViewerLayoutSelector.vue","webpack:///./src/components/layout/ViewerLayoutSelector.vue?3fd6","webpack:///./src/components/layout/ViewerLayoutSelector.vue","webpack:///./src/components/layout/ViewerNavigation.vue?1c63","webpack:///src/components/layout/ViewerNavigation.vue","webpack:///./src/components/layout/ViewerNavigation.vue?858e","webpack:///./src/components/layout/ViewerNavigation.vue","webpack:///./src/components/layout/ViewerStudy.vue?6a05","webpack:///./src/components/view/ViewerThumbnailList.vue?5a52","webpack:///src/components/view/ViewerThumbnailList.vue","webpack:///src/components/layout/ViewerTools.vue","webpack:///./src/components/view/ViewerThumbnailList.vue?ba5d","webpack:///./src/components/view/ViewerThumbnailList.vue","webpack:///./src/components/view/ViewerReportList.vue?6ee4","webpack:///./src/components/view/ViewerReportList.vue","webpack:///./src/components/view/ViewerReportList.vue?1f5f","webpack:///./src/components/view/ViewerReportList.vue?5d6e","webpack:///./src/components/layout/ViewerStudy.vue","webpack:///./src/components/layout/ViewerStudy.vue?1bbb","webpack:///./src/components/layout/ViewerStudy.vue?4ab8","webpack:///./src/components/layout/ViewerTools.vue?2a3a","webpack:///./src/components/layout/ViewerTools.vue?acb0","webpack:///./src/components/layout/ViewerTools.vue","webpack:///./src/components/EmailImagesSidebar.vue?6457","webpack:///src/components/EmailImagesSidebar.vue","webpack:///./src/components/EmailImagesSidebar.vue?d6c9","webpack:///./src/components/EmailImagesSidebar.vue","webpack:///./src/dialogs/MprDisabledDlg.vue?6ab3","webpack:///src/dialogs/MprDisabledDlg.vue","webpack:///./src/dialogs/MprDisabledDlg.vue?50a0","webpack:///./src/dialogs/MprDisabledDlg.vue","webpack:///./src/router/layouts/ViewerCineDialog.js","webpack:///./src/router/layouts/ViewerDragAndDrop.js","webpack:///src/router/layouts/Viewer.vue","webpack:///./src/router/layouts/Viewer.vue?1be8","webpack:///./src/router/layouts/Viewer.vue","webpack:///./src/dialogs/AboutCommunity.vue?6c18","webpack:///./src/components/Banner.vue?5a84","webpack:///./node_modules/hammerjs/hammer.js","webpack:///./src/components/view/ViewerThumbnailList.vue?5455","webpack:///./node_modules/lodash/difference.js","webpack:///./src/router/views/StudyAndReportViewer.vue?a2a6","webpack:///./src/components/PersistentNavigationDrawer.vue?6b7b","webpack:///./src/router/layouts/Viewer.vue?22e9","webpack:///./src/utils/isObject.js","webpack:///./src/utils/debounce.js","webpack:///./src/utils/throttle.js","webpack:///./node_modules/lodash/isArrayLikeObject.js","webpack:///./src/components/PersistentNavigationDrawer.vue?8df1","webpack:///src/components/PersistentNavigationDrawer.vue","webpack:///./src/components/PersistentNavigationDrawer.vue?ec0b","webpack:///./src/components/PersistentNavigationDrawer.vue","webpack:///./src/components/layout/ViewerStudy.vue?c345","webpack:///./src/components/layout/MprViewerLayoutSelector.vue?d082","webpack:///./src/router/views/StudyAndReportViewer.vue?1b9c","webpack:///./src/router/views/StudyAndReportViewer.vue?e17a","webpack:///./src/components/view/ViewerImageCommentForm.vue?68d2","webpack:///src/components/view/ViewerImageCommentForm.vue","webpack:///./src/components/view/ViewerImageCommentForm.vue?303c","webpack:///./src/components/view/ViewerImageCommentForm.vue","webpack:///./src/utils/arrayToList.ts","webpack:///./src/components/view/ViewerStudyDownloadModal.vue?f271","webpack:///src/components/view/ViewerStudyDownloadModal.vue","webpack:///./src/components/view/ViewerStudyDownloadModal.vue?1646","webpack:///src/router/views/StudyAndReportViewer.vue","webpack:///./src/components/view/ViewerStudyDownloadModal.vue","webpack:///./src/router/views/StudyAndReportViewer.vue?1d27","webpack:///./src/router/views/StudyAndReportViewer.vue","webpack:///./src/dialogs/MprDisabledDlg.vue?802d"],"names":["a","b","exports","this","dragEvents","document","documentElement","draggable","touchEvents","userAgentSupportingNativeDnD","window","chrome","test","navigator","userAgent","A","Object","keys","forEach","c","defineProperty","get","addEventListener","d","B","forceApply","y","holdToDrag","h","w","e","z","f","J","g","target","getAttribute","parentNode","body","defaultActionOverride","defaultPrevented","passive","i","removeEventListener","j","length","reduce","k","tagName","l","changedTouches","identifier","m","Event","bubbles","cancelable","dataTransfer","relatedTarget","screenX","screenY","clientX","clientY","pageX","pageY","getBoundingClientRect","offsetX","left","offsetY","top","n","touches","push","x","o","nodeType","getComputedStyle","style","setProperty","getPropertyValue","getPropertyPriority","pointerEvents","removeAttribute","hasChildNodes","childNodes","p","cloneNode","position","zIndex","classList","add","G","I","q","E","map","replace","r","parseInt","offsetWidth","offsetHeight","s","visibility","display","H","parseFloat","transitionDuration","isNaN","scrollLeft","scrollTop","marginLeft","marginTop","transitionDelay","Math","round","setTimeout","t","C","D","indexOf","u","F","defaultView","dispatchEvent","remove","v","off","clearTimeout","bind","iterationInterval","prototype","K","dropEffect","L","M","N","dragImageOffset","dragImageCenterOnTouch","width","height","appendChild","O","setInterval","P","R","clearInterval","removeChild","dragStartConditionOverride","preventDefault","dragImageTranslateOverride","type","S","T","elementFromPoint","effectAllowed","contains","U","V","W","freeze","enumerable","configurable","setData","Error","getData","clearData","splice","setDragImage","set","polyfill","value","SetCache","arrayIncludes","arrayIncludesWith","arrayMap","baseUnary","cacheHas","LARGE_ARRAY_SIZE","baseDifference","array","values","iteratee","comparator","index","includes","isCommon","result","valuesLength","outer","computed","valuesIndex","module","root","factory","modules","installedModules","__webpack_require__","moduleId","call","name","getter","__esModule","object","property","hasOwnProperty","clamp","degToRad","degrees","degreeToRadiansFactor","PI","radToDeg","radians","radianToDegreesFactor","sign","NaN","_quaternion","_quaternion2","_interopRequireDefault","_math","obj","default","Vector3","constructor","setX","setY","setZ","setComponent","getComponent","copy","undefined","console","warn","addVectors","addScalar","sub","subVectors","multiply","multiplyVectors","multiplyScalar","scalar","applyAxisAngle","quaternion","axis","angle","applyQuaternion","setFromAxisAngle","applyMatrix3","elements","applyMatrix4","applyProjection","qx","qy","qz","qw","ix","iy","iz","iw","transformDirection","normalize","divide","divideScalar","invScalar","min","max","clampScalar","minVal","maxVal","floor","ceil","roundToZero","negate","dot","lengthSq","sqrt","lengthManhattan","abs","setLength","oldLength","lerp","alpha","cross","crossVectors","ax","ay","az","bx","by","bz","projectOnVector","v1","vector","projectOnPlane","planeNormal","reflect","normal","angleTo","theta","acos","distanceTo","distanceToSquared","dx","dy","dz","setFromMatrixPosition","setFromMatrixScale","sx","sy","sz","setFromMatrixColumn","matrix","offset","me","equals","fromArray","toArray","clone","sqr","dist2","distanceToPointSquared","lineSegment","point","l2","start","end","pt","distanceToPoint","intersectLine","lineSegment1","lineSegment2","intersectionPoint","x1","y1","x2","y2","x3","y3","x4","y4","a1","a2","b1","b2","c1","c2","r1","r2","r3","r4","denom","num","Quaternion","halfAngle","sin","cos","multiplyQuaternions","qax","qay","qaz","qaw","qbx","qby","qbz","qbw","setFromRotationMatrix","te","m11","m12","m13","m21","m22","m23","m31","m32","m33","trace","_createClass","defineProperties","props","descriptor","writable","key","Constructor","protoProps","staticProps","_vector","_vector2","_classCallCheck","instance","TypeError","Line3","line","optionalTarget","delta","startP","startEnd","clampToLine","startEnd2","startEnd_startP","closestPointToPointParameter","da","db","dc","daCrossDb","dcCrossDb","intersection","distanceTest","distanceSq","Matrix4","n11","n12","n13","n14","n21","n22","n23","n24","n31","n32","n33","n34","n41","n42","n43","n44","Float32Array","makeRotationFromQuaternion","z2","xx","xy","xz","yy","yz","zz","wx","wy","wz","multiplyMatrices","ae","be","a11","a12","a13","a14","a21","a22","a23","a24","a31","a32","a33","a34","a41","a42","a43","a44","b11","b12","b13","b14","b21","b22","b23","b24","b31","b32","b33","b34","b41","b42","b43","b44","getInverse","throwOnInvertible","det","msg","identity","applyToVector3Array","makeTranslation","makeScale","Plane","constant","setComponents","setFromNormalAndCoplanarPoint","setFromCoplanarPoints","v2","plane","inverseNormalLength","distanceToSphere","sphere","center","radius","projectPoint","orthoPoint","perpendicularMagnitude","isIntersectionLine","startSign","endSign","direction","denominator","intersectPlane","targetPlane","origin","intersectionData","h1","h2","n1dotn2","coplanarPoint","translate","pageToPoint","subtract","lhs","rhs","distance","from","to","distanceSquared","insideRect","rect","findClosestPoint","sources","distances","minDistance","source","_lineSegment","_lineSegment2","rectToLineSegments","right","bottom","lineSegments","segment","rectToPoints","rectPoints","topLeft","bottomRight","doesIntersect","rect1","rect2","intersectLeftRight","intersectTopBottom","rect1Points","rect2Points","getIntersectionRect","intersectRect","_Line","_matrix","_plane","_point","_rect","introJs","apply","arguments","VERSION","IntroJs","_targetElement","_introItems","_options","nextLabel","prevLabel","skipLabel","doneLabel","hidePrev","hideNext","tooltipPosition","tooltipClass","highlightClass","exitOnEsc","exitOnOverlayClick","showStepNumbers","keyboardNavigation","showButtons","showBullets","showProgress","scrollToElement","scrollTo","scrollPadding","overlayOpacity","positionPrecedence","disableInteraction","helperElementPadding","hintPosition","hintButtonLabel","hintAnimation","buttonClass","_introForElement","targetElm","group","allIntroSteps","querySelectorAll","introItems","steps","_forEach","step","currentItem","_cloneObject","element","querySelector","floatingElementQuery","createElement","className","elmsLength","currentElement","intro","nextStep","tempIntroItems","sort","_addOverlayLayer","_nextStep","DOMEvent","on","_onKeyDown","_onResize","refresh","code","which","charCode","keyCode","_previousStep","srcElement","match","_currentStep","_introCompleteCallback","_exitIntro","click","returnValue","temp","jQuery","_goToStep","_goToStepNumber","_currentStepNumber","_direction","item","continueStep","_introBeforeChangeCallback","_showElement","_refresh","_setHelperLayerPosition","oldHelperNumberLayer","oldArrowLayer","oldtooltipContainer","_placeTooltip","_reAlignHints","targetElement","force","continueExit","_introBeforeExitCallback","overlayLayers","overlayLayer","opacity","helperLayer","referenceLayer","disableInteractionLayer","floatingElement","_removeShowElement","fixParents","parent","_removeClass","_introExitCallback","tooltipLayer","arrowLayer","helperNumberLayer","hintMode","currentStepObj","tooltipOffset","targetOffset","windowSize","currentTooltipPosition","tooltipLayerStyleLeft","tooltipCssClass","setAttribute","_determineAutoPosition","_getOffset","_getWinSize","_addClass","tooltipLayerStyleRight","_checkLeft","tooltipLayerStyleLeftRight","_checkRight","desiredTooltipPosition","possiblePositions","slice","tooltipHeight","tooltipWidth","targetElementRect","calculatedPosition","_removeEntry","desiredAlignment","pos","hyphenIndex","substr","split","_determineAutoAlignment","offsetLeft","halfTooltipWidth","winWidth","screen","possibleAlignments","calculatedAlignment","stringArray","stringToRemove","elementPosition","widthHeightPadding","_isFixed","cssText","_disableInteraction","_setAnchorAsButton","anchor","tabIndex","_introChangeCallback","nextTooltipButton","prevTooltipButton","skipTooltipButton","scrollParent","self","oldHelperLayer","oldReferenceLayer","oldtooltipLayer","lastIntroItem","_getScrollParent","_scrollParentToElement","_lastShowElementTimer","innerHTML","_getProgress","focus","_scrollTo","tooltipTextLayer","bulletsLayer","progressLayer","buttonsLayer","ulContainer","anchorClick","goToStep","innerLi","anchorLink","onclick","progressBar","_introSkipCallback","_setShowElement","_introAfterChangeCallback","_elementInViewport","winHeight","clientHeight","scrollBy","elms","elm","parentElm","SVGElement","toLowerCase","currentElementPosition","_getPropValue","transform","arr","forEachFnc","completeFnc","len","_stamp","events_key","_id","listener","context","useCapture","id","handler","event","attachEvent","detachEvent","pre","classes","cls","classNameRegex","propName","propValue","currentStyle","nodeName","innerWidth","innerHeight","clientWidth","el","styleText","toString","_removeHintTooltip","tooltip","_populateHints","hints","hint","_addHints","_alignHintPosition","_hintQuerySelectorAll","selector","hintsWrapper","_hideHint","stepId","_hintCloseCallback","_hideHints","_showHints","_showHint","_removeHints","_removeHint","getHintClick","evt","stopPropagation","cancelBubble","_showHintDialog","hintDot","hintPulse","_hintsAddedCallback","iconWidth","iconHeight","hintElement","_hintClickCallback","removedStep","tooltipWrapper","closeButton","docEl","pageYOffset","pageXOffset","excludeStaticParent","overflowRegex","parentElement","overflow","overflowY","overflowX","offsetTop","currentStep","_mergeOptions","obj1","obj2","attrname","obj3","instances","version","fn","setOption","option","setOptions","options","addStep","addSteps","goToStepNumber","previousStep","exit","onbeforechange","providedCallback","onchange","onafterchange","oncomplete","onhintsadded","onhintclick","onhintclose","onexit","onskip","onbeforeexit","addHints","hideHint","hideHints","showHint","showHints","removeHints","removeHint","showHintDialog","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","completeList","staticRenderFns","$event","close","staticStyle","_v","_s","release","browser","os","AboutOmniDlg","components","DlgHeader","ModalWrapper","AstDataTable","data","config","created","detect","methods","dlg","openAboutOmniDlg","open","component","AboutCommunityDlg","CommunityUpsellPromo","openAboutCommunityDlg","AstToolbarDropdown","items","Array","clinicAPI","_objectSpread","mapState","claims","state","auth","_this","iconName","label","concat","importMachineName","canShow","activeClinicUrl","noAction","command","clinicCode","$store","getters","isAuthenticated","activeClinicCode","$route","query","openReportIssue","_toConsumableArray","isCommunityUser","openReleaseNotes","class","isRounded","_e","_t","learnMoreLink","learnMore","String","isClosable","Boolean","isVisible","bannerId","storage","getItem","$emit","setItem","flagKey","tryStartTour","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","shouldStartTour","wrap","_context","prev","next","t0","shouldOpenTour","sent","startTour","stop","omniDesktop","isConnected","store","windows","openStudiesInNewWindow","request","initialBodyStyle","getIcon","icon","topNavigation","bottomNavigation","navigationElement","_b","$attrs","Banner","global","isTopLevelEl","getElementViewportOffset","clientLeft","clientTop","bounds","getElementViewportSize","size","getSetElementScroll","scroll","prop","isTopLevel","isScrollable","cs","scrollHeight","scrollWidth","findScrollableParent","determineScrollIntention","currentCoordinate","threshold","determineDynamicVelocity","scrollIntention","isScrollEndReached","scrollBounds","currentScrollOffset","maxScrollOffset","_scrollAnimationFrameId","_currentCoordinates","_hoveredElement","_scrollableParent","_translateDragImageFn","velocityFn","velocity","multiplier","easeInCubic","_scrollIntentions","horizontal","vertical","_dynamicVelocity","handleDragImageTranslateOverride","currentCoordinates","hoveredElement","translateDragImageFn","performScrollAnimation","updateScrollIntentions","scheduleScrollAnimation","cancelAnimationFrame","requestAnimationFrame","scrollAnimation","scrollDiffX","scrollDiffY","scrollableParent","scrollIntentions","dynamicVelocity","scrollableParentBounds","scrollX","scrollY","currentCoordinatesOffset","scrollBehaviourDragImageTranslateOverride","$","stat","nonConfigurable","nonWritable","MAX_SAFE_INTEGER","onHover","_l","row","col","maxColumns","disabled","isCellDisabled","hovered","hover","selected","onSelect","disabledOptions","maxRows","toolbarLocation","toggleDrawer","activeSeries","activeImage","isRepository","resizeCanvases","mq","medium","isPersistentDrawerOpen","mprActive","navPanelDraggedOver","nativeOn","onNavDrawerDragOver","onNavDrawerDragLeave","onNavDrawerDrop","allowRelatedStudies","isViewerLoading","relatedStudies","study","studyId","studies","isMultiplePatients","ref","canvas","openRelatedMenu","onCanvasDragOver","onCanvasDragEnter","onCanvasDragExit","onCanvasDragLeave","onCanvasDrop","onImageViewerMouseDown","setActiveCanvas","canvasIndex","canvasIsVisible","directives","rawName","dispatch","expression","refInFor","isActiveViewer","activeCanvasIndex","getCanvasSeries","activeStudySeries","findIndex","seriesId","settings","overlayText","isUnmatchedImageView","hideLoadingText","imageView","loadingText","activeCanvas","mprInitialSlice","mprInitialVoi","showBottomNavigation","isCineDialogOpen","showEmailImages","setMprActive","isDesktop","getPrimaryToolbarGroup","btn","title","hasNotification","action","settingsConfig","handleLayoutSelected","scopedSlots","_u","mprLoadingReason","checkAndLoadMpr","hasActiveSeries","proxy","isFullScreen","toggleFullScreen","helpItems","isModalDrawerOpen","commit","openAttachment","isDrawerOpen","saveMprImageAsync","printMprImageAsync","copyMprImageAsync","clearMprActiveAnnotations","mprActions","saveCanvasAsync","printCanvasAsync","copyCanvasAsync","syncClearAnnotations","actions","previewImageUrl","activeDicomTags","dicom","contextMenu","$refs","layoutContainer","switchSeries","isOpen","playClip","pauseClip","onFrameRateChange","goToImage","cineNextSeries","cinePreviousSeries","cinePlayer","hotkeysVisible","toggleHotkeyModal","MEASUREMENT_DONE_MODIFYING","triggerEvent","csTools","triggerDoneModifying","toolName","image","toolType","moveAnnotation","toolSelectedCallback","annotation","interactionType","UP_EVENT","changedEvent","_event$detail","detail","buttons","postClickEvent","toolState","getToolState","eventBus","post","ANNOTATION_CLICK","tool","_radii","mouse","displayRadius","hitRadius","precision","touch","precisionTools","initHandle","handle","coords","hasBoundingBox","pointNearHandle","radii","precisionHandlesEnabled","precisionEnabled","drag","originX","originY","originDragX","originDragY","handleLengthsAreValid","handles","middle","isValid","handleLengthIsValid","handleLengthTolerance","handleCanvas","pixelToCanvas","radiusType","setPrecisionMode","disablePrecisionForInactiveHandles","iteratePrecisionHandles","active","cornerstoneTools","entries","_ref2","_slicedToArray","handleType","handleValue","_typeof","EVENTS","removeToolState","anyHandlesOutsideImage","clipToBox","_moveEvents","MOUSE_MOVE","MOUSE_DRAG","TOUCH_DRAG","_moveEndEvents","MOUSE_UP","MOUSE_CLICK","TOUCH_END","TOUCH_PINCH","TAP","evtDetail","doneMovingCallback","assign","deleteIfHandleOutsideImage","preventHandleOutsideImage","isToolLocked","currentPoints","moveHandler","_moveHandler","moveEndHandler","_moveEndHandler","eventType","TOUCH_START","_stopImmediatePropagation","_evt$detail","page","targetLocation","pageToPixel","invalidated","constrainSquare","distanceDragged","isDifferentDirection","updateImage","MEASUREMENT_MODIFIED","modifiedEventData","measurementData","_evt$detail2","success","stopImmediatePropagation","external","_dragEvents","_upOrEndEvents","TOUCH_DRAG_END","TOUCH_PRESS","dragHandler","_dragHandler","upOrEndHandler","_upOrEndHandler","cornerstone","hasMoved","oppositeHandle","distanceFromOppositeHandle","nearHandle","handlePressed","BaseAnnotationTool","draw","drawHandles","drawJoinedLines","drawLinkedTextBox","getNewContext","setShadow","textBoxWidth","lineSegDistance","_csTools","angleCursor","AstAngle","_BaseAnnotationTool","configuration","defaultConfig","supportedInteractionTypes","shadow","shadowColor","shadowOffsetX","shadowOffsetY","svgCursor","initialConfiguration","_callSuper","_defineProperty","mergeOptions","preventNewMeasurement","_inherits","eventData","visible","color","highlight","textBox","movesIndependently","drawnIndependently","allowedOutsideImage","isMouse","toolData","moveHandle","_this2","enabledElement","_this$configuration","handleRadius","drawHandlesOnHover","currentTarget","canvasContext","lineWidth","toolStyle","getToolWidth","_loop","toolColors","getColorIfActive","handleStartCanvas","handleMiddleCanvas","handleOptions","drawHandlesIfActive","columnPixelSpacing","rowPixelSpacing","sideA","sideB","sideC","sideALength","sideBLength","sideCLength","pow","rAngle","formatNumber","textCoords","text","textBoxText","padding","textWidth","internal","getTransform","invert","transformPoint","hidden","textBoxAnchorPoints","suffix","str","fromCharCode","_this3","createNewMeasurement","addToolState","doneMovingEndHandleCallback","doneMovingMiddleHandleCallback","doneEvt","_measurementData$hand","moveNewHandle","colPixelSpacing","drawLine","AstCalibration","_eventData$currentPoi","newLength","_event$detail2","imagePlane","metaData","imageId","oldPixelSpacing","calculateLength","asterisImageId","broadcast","VUEX_ACTION","payload","csStore","tools","updateCachedStats","getEnabledElementsByImageId","filter","_event$detail3","toFixed","lineDash","drawTextBox","pointInsideBoundingBox","AstText","getTextCallback","cb","openPromptDlg","prompt","requireInput","MEASUREMENT_COMPLETED","centering","boundingBox","cornerstoneMath","insideBoundingBox","drawArrow","AstArrowAnnotate","_ArrowAnnotateTool","changeTextCallback","renderDashed","getModule","handleEndCanvas","arrowFirst","textHeight","textStyle","getFontSize","midpoint","ArrowAnnotateTool","getPixelSpacing","isPixelSpacingDefined","rowImagePixelSpacing","colImagePixelSpacing","drawRect","getROITextBoxCoords","AstRectangleRoi","_RectangleRoiTool","showHounsfieldUnits","showMinMax","_getImagePixelSpacing","getImagePixelSpacing","seriesModule","modality","rectOptions","initialRotation","cachedStats","throttledUpdateCachedStats","defaultCoords","viewport","_findTextBoxAnchorPoints","textBoxContent","_createTextBoxContent","unit","_getUnit","RectangleRoiTool","_getRectangleImageCoordinates","startHandle","endHandle","_getRectangleImageCoo","_formatArea","area","hasPixelSpacing","isColorImage","mean","stdDev","meanStdDevSUV","textLines","otherLines","showStats","hasStandardUptakeValues","meanString","stdDevString","SUVtext","meanSuvString","stdDevSuvString","targetStringLength","measureText","minString","maxString","corners","_determineCorners","centerX","centerY","rotation","hflip","vflip","handlesLeftToRight","_compareX","handlesTopToBottom","_compareY","drawEllipse","pointInEllipse","calculateEllipseStatistics","calculateSUV","AstCircleRoi","maxClickDuration","isDragging","_currentPoints$image","startCanvas","endCanvas","minorEllipse","majorEllipse","centerCrossHairs","pointInMinorEllipse","pointInCenter","pointInMajorEllipse","createCircleFromDiameter","_createCircleFromDiameter","upEvent","handleDoneMove","handleDiameter","pixelSpacing","_objectWithoutProperties","_excluded","_drawCenter","_throttledUpdateCachedStats","_updateCachedStats","diameter","_getRadius","_createCircleFromDiameter2","existingCircle","imageBounds","_getImagePixelSpacing2","defaultDiameter","newCircle","_this4","abrupt","parseNumber","defaultValue","t1","CustomEvent","_x","_x2","_x3","_x4","_getImagePixelSpacing3","_excluded2","throttle","circleStatistics","_calculateCircleStatistics","_getCircleImageCoordi","_getCircleImageCoordinates","leftCanvas","topCanvas","widthCanvas","heightCanvas","xCenter","yCenter","plusSize","beginPath","moveTo","lineTo","closePath","stroke","_formatDiameter","circleCoordinates","pixels","getPixels","circleMeanStdDev","count","variance","AstEllipticalRoi","_EllipticalRoiTool","ellipseOptions","EllipticalRoiTool","_getEllipseImageCoord","_getEllipseImageCoordinates","convertToVector3","BaseTool","imagePointToPatientPoint","projectPatientPointToImagePlane","scrollToIndex","AstCrossPoint","_BaseTool","updatePoint","_updatePoint","clearPointsIfNotSynced","_clearPointsIfNotSynced","syncedId","postTouchStartCallback","onStart","touchDragCallback","onDrag","touchEndCallback","onEnd","postMouseDownCallback","mouseDragCallback","mouseUpCallback","mouseMoveCallback","NEW_IMAGE","setToolDisabled","enabledElements","isEnabled","hasLoadedImage","clearToolState","waitForElementToBeEnabled","waitForEnabledElementImageToLoad","_drawCrosshairs","consumeEvent","getActiveColor","sourceElement","sourceEnabledElement","getEnabledElement","sourceImageId","sourceImagePlane","rowCosines","columnCosines","imagePositionPatient","frameOfReferenceUID","sourceImagePoint","sourcePatientPoint","_callee2","stackToolDataSource","isMissingStackData","seriesStack","bestImageIdIndex","targetTool","targetMeta","crossPoint","errorLoadingHandler","_imageId","_context2","_findBestImageIdIndex","imageIds","find","loadHandlerManager","getErrorLoadingHandler","_this5","sourceFrameOfReference","newImageIdIndex","Number","MAX_VALUE","sliceThickness","isLocalizerImage","imagePosition","column","targetPlanePosition","sourcePointPlanePosition","tolerance","drawCircle","AstHipDysplasia","defaultAngle","disabledCallback","_clearIncompleteToolData","passiveCallback","enabledCallback","isExistingInstance","isDrawingSecondCircle","_addCircleHandles","pointOnCircle","pointOnLine","centerPoint","outerPoint","maxDistance","pointDistance","haveLeftCircle","haveRightCircle","haveUpperRimHandles","haveTextBoxes","inner","leftRadius","rightRadius","points","drawTextBoxes","textBoxes","textBoxOffset","correspondingHandle","getAngleFromPoints","ab","bc","ac","_addUpperRimHandles","_addTextBoxes","isToolInstance","isIncompleteDrawing","leftOuter","leftCenter","rightOuter","rightCenter","rightDrawnFirst","circleDistance","leftDistancePercent","rightDistancePercent","leftIntersection","rightIntersection","_rotatePoint","topRight","_addHandle","drawLink","AstLengthAngle","showAngles","goodEventData","hasStartAndEndHandles","validParameters","lineLengthTolerance","save","textBoxHandle","strokeStyle","rightmostHandle","lengthText","getLengthText","isNotDestroyedAngle","otherLine","getIntersection","angleTextBoxes","lineId","uuid","createAngleTextBox","isObtuseAngle","indexToRemove","getAngle","linkAnchors","getClosestHandlePair","_getAcuteObtuseCoords","getAcuteObtuseCoords","acute","obtuse","getMidpoint","textBoxColor","anchorCanvas","existingLineIds","restore","lineA","lineB","slopeA","getSlope","slopeB","atan","invalidLineHandles","pointPairs","closestPair","pointPair","_sort","_sort2","_sort3","_sort4","_sort5","angleA","angleB","_sort6","horizontalAcute","horizontalObtuse","atan2","pointA","pointB","AstOrientationMarkers","mixins","_forceImageUpdate","hasImageToUpdate","markers","getOrientationMarkers","getOrientationMarkerPositions","getToolColor","textWidths","drawAllMarkers","imagePlaneMetaData","rowString","getOrientationString","columnString","oppositeRowString","invertOrientationString","oppositeColumnString","isRotatedClockwise","orientationStrings","unshift","pop","shift","moveAllHandles","AstPennHip","returnShape","isInstanceUnfinished","startMovingHandles","movableHandles","startPoints","circle","pointNearTool","circleHandles","first","second","makeCircleMoveIndependently","indices","linkedLineHandle","circle1Outer","circle1Inner","circle2Outer","circle2Inner","firstRadius","secondRadius","firstRadiusPixels","secondRadiusPixels","haveFirstCircle","haveSecondCircle","femurRadius","rightEdgeOfFemur","distractionIndex","rightCircle","rightEdgeOfShape","AstProbe","defaultProps","_movingEventCallback","_endMovingEventCallback","mouseClickCallback","activeInstance","_clearAllPoints","columns","rows","drawProbe","toolCoords","storedPixels","getStoredPixels","sp","mo","slope","intercept","pixelPoint","currentImageIdIndex","AstTplo","isAddingTibialAxis","isAddingPlateau","startMovingHandle","addSingleHandle","referenceLine","_getReferenceLine","_getIntersection","_getCutRadius","haveTalusCircle","haveTibialAxis","havePlateau","drawTalusCircle","getTPA","getCutDiameter","tibialAxis","plateau","distanceA","getAspectDistance","distanceB","aspectA","aspectB","referenceSlope","cutRadius","AstTta","isAddingCircle","isAddingLigament","haveThirdCircle","haveLigament","drawNewCircle","rightVertical","verticalSlope","horizontalSlope","lowerHorizontal","leftVertical","leftMidpoint","midHorizontal","advanceLine","getActualLength","outerIndex","innerIndex","lineAStart","lineASlope","MOUSE","TOUCH","moveAndRotateHandlesMouse","moveAndRotateHandles","moveAndRotateHandlesTouch","upEvents","dragCallback","oppositeHandleIndeces","0","1","3","4","handleIndex","oppositeHandleIndex","angleDelta","_getRelativeAngle","startingPoint","otherHandle","newLocation","upCallback","endpoint","AstVertebralHeart","isAddingSecondLine","isAddingVertEdge","_addHeartLine","_addVertEdge","handleMove","isVhsTextbox","_handleDoneMove","promptForVertebrae","_promptForVertebrae","shapeHandles","heart1","heart2","vert","shape","_makeHandlesMoveAsGroup","pointNearVert","vertLines","_getVertLines","haveFirstLine","haveSecondLine","haveVertEdge","firstLength","secondLength","drawCenteredTextBox","getVhsText","getLength","drawAnchoredTextBox","long","short","vhs","placeAbove","verticalOffset","isIntersecting","snapToPerpendicular","lambda","gamma","_getCrossPoint","isHorizontal","snapToX","snapToY","isWithinBounds","yInBounds","xInBounds","getDistance","heartLengths","defaultHeight","topHandle","bottomHandle","_promptForVertebrae2","lengths","_lengths","longLength","shortLength","longToShortRatio","calculatedShortCount","t2","t3","indeces","getVertLine","edgeDeltaX","edgeDeltaY","lineDeltaY","lineDeltaX","originDeltaX","originDeltaY","AstEraser","preMouseDownCallback","_deleteAllNearbyTools","preTouchStartCallback","removeTool","_pointsNear","fromX","fromY","toX","toY","ReferenceLinesTool","renderer","renderActiveReferenceLine","synchronizationContext","_enabledCallback","_args","forceImageUpdate","referenceMetaData","viewer","activeImageMetadata","getSourceElements","setToPixelCoordinateSystem","referenceEnabledElement","referenceImageMetadata","targetImage","targetImagePlane","referenceImagePlane","targetNormal","referenceNormal","angleInRadians","calculateReferenceLine","setTransform","planePlaneIntersection","RotateTool","strategies","horizontalStrategy","verticalStrategy","defaultStrategy","roundAngles","flipHorizontal","flipVertical","rotateScale","rotationValue","_endMobileMovingEventCallback","firstTouchOnMobile","log","applyActiveStrategy","setViewport","initialPointX","client","currentPointX","_this$configuration2","initialPointY","currentPointY","AstReferenceLines","AstRotateTool","isFullScreenSupported","fullScreenProperties","fullScreenProperty","fullscreenEnabled","onResize","$once","exitFullScreen","enterFullScreen","enterMethods","method","exitMethods","toolInfo","setCircleDiameter","textboxes","textbox","canHideTextbox","domProps","composing","$set","getTextboxLabel","erase","model","callback","$$v","AstCheckbox","required","diameterInputValue","updateNewCircleDiameter","_k","onEnterKeydown","canSetDiameter","hasChangedDiameter","newCircleDiameter","$options","filters","watch","hasChangedLength","currentLength","updatenewLength","calibrate","canCalibrate","AstRadio","$nextTick","getSelection","lengthInput","select","immediate","beforeDestroy","AnnotationCheckbox","popper","angleTextboxes","settingsPanel","isLengthAnglesEnabled","isRelatedAngle","isTextbox","isArray","canEditTextbox","availableTools","alias","_a","$forceUpdate","deep","onAnnotationClick","ANNOTATIONS_CLEARED","onAnnotationRemoved","mounted","onKeydown","activeElement","destroyed","listenForAnnotationRemoved","destroy","small","positionDialog","referenceElement","createReferenceElement","createPopper","dialog","placement","modifiers","fallbackPlacements","boundary","altAxis","isAddingListener","toggleListener","csEvents","MEASUREMENT_REMOVED","join","newDiameter","getHandleCoords","xValues","yValues","_coords","regularHandles","handleToCanvasCoords","textBoxToCoords","TOOLS","CIRCLE_TOOL","ARROW_TOOL","TEXT_TOOL","statText","onEnter","formattedDiameter","setDiameter","componentRef","validateDiameter","worldDiameter","updateDiameter","CircleAnnotationDialog","Checkbox","consts","mpr","MPR_ANNOTATION_CLICK","MPR_ANNOTATION_REMOVED","MPR_ANNOTATIONS_CLEARED","$el","closeModal","keygroup","hotkey","_f","keyBinding","description","keyGroups","toUpperCase","showHotkeys","hotkeys","viewerHotkeys","hotkeyGroups","filtered","hotKeys","background","canvasColor","showOverlayText","compact","useCompactOverlay","imageOverlayInfo","zoom","seriesIndex","seriesTotal","imageIndex","series","images","fullName","simpleName","overlayInformation","lotNumber","chipId","sire","dam","institutionName","studyDate","forceUTC","acquisitionTime","patientName","patientId","ownerName","windowWidth","windowCenter","isLevelingAdjusted","activeDisplaySet","isInitializing","stackIndex","shouldRenderWebGL","isMobileOS","toolActivationDebounce","_cornerstone$EVENTS","IMAGE_RENDERED","_cornerstoneTools$EVE","STACK_SCROLL","TOOL_EVENTS","globalImageIdSpecificToolStateManager","disablePrecisionEvents","MOUSE_DOWN","MEASUREMENT_ADDED","modifiedAnnotationEvents","AstImageScroll","frameIndex","defaultViewport","isAnyImageLevelAdjusted","showViewportCacheMessage","showLoadingSpinner","updateDebounce","mapGetters","canvasColors","previousSeries","loadSeries","updateStackToolState","imageLoader","prefetch","applyCinePlayerSettings","opts","addListeners","domCanvas","vueCanvas","isPlaying","canvases","err","removeListeners","mapActions","onNewImage","updateOverlayInformation","onStackScroll","onAnnotationModified","onDisablePrecision","_getEnabledElement","blacklist","_e$detail","getImageIdToolState","displayedArea","brhc","voi","_e$detail$image","some","updateCanvas","defaultVoi","isDicom","scaledDisplayValues","scaleJpegVoiToDicom","scale","initCanvasTools","disableWheelTools","updateActiveWheelTool","activeWheelTool","frameRate","initTools","loadingSpinnerDelay","cornerstoneImageId","cachedImage","getCornerstoneImageId","isArchived","firstScanPromise","dicomServiceData","firstStatusPromise","loadMetadata","cachedImages","removeImageLoadObject","refreshCanvas","glitchCanvas","seriesViewportCache","message","notificationType","currentState","getCornerstoneImageIdsForSeries","_this6","hide","layout","layoutSelected","setting","toggle","location","capitalize","AstToolbarButton","AstToolbarMenu","layouts","showImageOrientationMarkers","showAxis","isSyncWindowLevelsEnabled","showAxisOverlay","syncWindowLevels","mapMutations","setLayout","MPRKeys","SET_MPR_LAYOUT","hideDropdown","isLoading","showCompactToolbar","isGrouped","levels","itemsInGroup","dropdownLocation","activateTool","binding","activeBlendMethod","blendMethods","rotateItems","resetViewData","AstToolbar","isBurningAnnotations","ungroupedTools","groups","groupTools","toolbar","isToolbarOverflowing","fullToolbar","groupOrder","isHiddenForRepository","burnInAnnotations","finish","ViewerToolsMixin","activeTools","switchModeActive","volumeData","invertVolume","setSwitchModeActive","flipHActiveView","flipVActiveView","rotateActiveViewClockwise","rotateActiveViewCounterClockwise","BLEND_NONE","setBlendMode","BLEND_MIP","BLEND_MINIP","BLEND_AVG","blendMode","compactItems","updateToolBindings","buttonMask","whichToButtons","validButtons","setMprActiveToolAndBroadcast","updateMouseBinding","button","activeLayout","LayoutGridSelector","saveViewerSetting","isImageOrientationMarkersEnabled","isReferenceLineSynchronizationEnabled","canvasLayout","canvasesPerRow","numCanvases","debounceTimer","setMaxRowsAndColumns","minCanvasHeight","minCanvasWidth","overlayTextEnabled","imageOrientationMarkersEnabled","lengthAnglesEnabled","referenceLineSynchronizationEnabled","api","user","setUserSetting","JSON","stringify","hasMultipleImages","toggleCine","hangingProtocol","hasPreviousDisplaySet","setHangingProtocolDisplaySet","activeDisplaySetIndex","hasNextDisplaySet","hasPreviousSeries","hasNextSeries","hangingProtocols","isHangingProtocolLoading","showDropdownsBelow","hangingProtocolLabel","hangingProtocolOptions","protocol","setHangingProtocol","displaySets","switchDisplaySet","displaySet","allSeries","activeSeriesIndex","noHangingProtocol","inputClass","Hammer","TouchInput","recognizers","Swipe","DIRECTION_HORIZONTAL","hammertime","ev","velocityX","updateHangingProtocol","displaySetIndex","isCollapsed","studyDateTime","showTime","removeStudy","imageData","thumbnails","attachments","reports","gotoSignalPET","thumbnail","startLongPress","onDragStart","onDragEnd","findImageBackground","getCanvasColor","seriesNumber","doNothing","refreshSeriesProgress","throttledProgress","loadedImages","imageProgress","has","getElementById","percent","storageLocation","url","findThumbnailUrl","backgroundImage","startEvent","longPressTimer","startDragging","vibrate","cancelDragListeners","onTouchMove","moveEvent","isMoved","getTouch","isTrusted","reportId","_dndHandle","ghostImage","closest","report","date","isComplete","isVetCT","thirdPartyCaseLink","vetCTCaseStatus","consultantClinicCode","IDEXXAPI","downloadExternalReport","consultantReportId","isVetsChoice","openReportPdf","$IDEXXAPI","VetsChoice_ClinicCode","$VetsChoice_ClinicCode","tryOpenFromUrlQuery","found","providerClinicCode","clientClinicCode","consultations","getReportResult","reportBinaryString","pdfWindow","write","encodeURI","AstThumbnailList","AstAttachmentList","AstReportList","showHeading","showPatientName","hasSignalPETAttachment","imageViewId","SIGNALPET_IMAGEVIEW_ID","consultationRequest","show","Promise","all","getReports","$router","params","studyData","getRelatedStudiesAndReports","toEmail","emailedReports","emailedReport","_iterator","_createForOfIteratorHelper","_step","done","getConsultantReport","consultantReport","consultant","$VetCTAPI","getThirdPartyRadiologyReport","vetCTCase","Message","Data","thirdPartyReportResult","_context3","getCase","_callee3","surgical","currentSyncMethod","syncItems","resetActiveCanvas","isStackScrollSynchronizationEnabled","isManualStackScrollSynchronizationEnabled","setStackSynchronizationMethodAndBroadcast","hasMultiImageSeries","deduplicateItems","each","mouseButtonMask","activeStudy","addItem","canAddSeries","sendEmail","removeItem","thumbUrl","countText","openEmailStudyDlg","then","catch","entireSeries","img","EmailItem","existingSeriesItems","reasonKeys","reasonKey","disabledReasons","warningKeys","launchMPR","hideWarningChecked","MprDisabledDlg","ModalDialog","AstButton","minimumImages","mobile","edge","minimg","invalidmin","missing","orientation","spacing","derived","showMprDisabledDialog","preventDefaultAndStopPropagation","hoveredCanvasIndex","isEmail","draggingFromThumbnailList","types","parse","addProvider","metadataProvider","setToolColor","setBackgroundColor","shouldLoadLevelPresets","shouldLoadDicom","DesktopDownloader","AnnotationDialog","MprAnnotationDialog","AstHotkeyModal","AstImagePlaceholder","AstImageViewer","AstMprViewerLayoutSelector","AstMprViewerTools","AstToolbarBranding","AstViewerLayoutSelector","AstViewerNavigation","AstViewerStudy","AstViewerTools","EmailImagesSidebar","ModalDrawer","PersistentNavigationDrawer","UserMenu","HelpMenu","AstCineDialog","AstViewerAddRelatedStudy","AstViewerContextMenu","AstViewerToolHelp","ViewerActionsDrawer","DicomTagsDrawer","AstMprViewer","FullScreenMixin","primaryToolbarConfig","defaultPrimaryToolbar","Thumbnails","viewerHelpItems","mprHelpItems","startMprTour","openMPRPerformanceModal","about","eventStartX","eventStartY","eventStartTime","ui","studiesNotFound","toolManager","_this$activeStudy","large","primaryToolbar","viewerHasImages","viewerHasAttachments","firstPatientName","layoutPaneSize","findImageUrlFromImage","mprDisabledReasons","reasons","ipadSize","validateMPRImages","mprWarningReasons","warnings","numImages","_cornerstone$metaData","currentCount","oldCount","onInitialStudyLoadOrReload","viewerHasLoaded","setHotkeys","setMouseBindings","startImageViewerSync","isActive","setMPRHotkeys","setLevelPresets","updateDocumentTitle","globalToolSyncEnabled","addTools","setDefaultToolsActive","synchronizers","create","onCacheFull","decacheInactiveStudies","empty","toggleDicomTagsDrawer","openEmailAction","$api","cancelAllPendingRequests","removeTools","clearAnnotations","updateThumbnailProgress","viewerCineDialog","viewerDragAndDrop","patientInfo","titlePrefix","meta","omniOrCommunity","setInitialCanvasLayout","openInitialAttachment","_this$$route$query","sid","numSeries","sids","listToArray","attachment","isPrimaryViewer","isFirstPrimaryViewerWindow","fileExtension","toolbarGroup","toolClass","isCustom","CustomTools","instanceName","drawer","getActiveDomCanvas","activeVueCanvas","propsData","file","openAttachmentDlg","startContextMenuWatch","timeStamp","pointerType","isRightClickHandledByTool","tooMuchMovement","tooMuchTime","$ga","_cornerstone$getViewp","setLevels","scaledLevels","scaleDicomPresetToJpeg","dragTimeout","_this7","exportName","VENDOR_PREFIXES","TEST_ELEMENT","TYPE_FUNCTION","now","Date","setTimeoutContext","timeout","bindFn","invokeArrayArg","arg","iterator","deprecate","deprecationMessage","stack","output","nextKey","extend","dest","src","merge","inherit","child","base","properties","childP","baseP","_super","boolOrFn","val","args","ifUndefined","val1","val2","addEventListeners","splitStr","removeEventListeners","hasParent","node","inStr","trim","inArray","findByKey","uniqueArray","results","prefixed","prefix","camelProp","_uniqueId","uniqueId","getWindowForElement","doc","ownerDocument","parentWindow","MOBILE_REGEX","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","COMPUTE_INTERVAL","INPUT_START","INPUT_MOVE","INPUT_END","INPUT_CANCEL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","DIRECTION_VERTICAL","DIRECTION_ALL","PROPS_XY","PROPS_CLIENT_XY","Input","manager","inputTarget","domHandler","enable","init","createInputInstance","Type","PointerEventInput","TouchMouseInput","MouseInput","inputHandler","input","pointersLen","pointers","changedPointersLen","changedPointers","isFirst","isFinal","session","computeInputData","emit","recognize","prevInput","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","getCenter","deltaTime","computeDeltaXY","offsetDirection","getDirection","deltaX","deltaY","overallVelocity","getVelocity","overallVelocityX","overallVelocityY","getScale","getRotation","maxPointers","computeIntervalInputData","srcEvent","offsetDelta","prevDelta","velocityY","last","lastInterval","p1","p2","evEl","evTarget","evWin","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MOUSE_ELEMENT_EVENTS","MOUSE_WINDOW_EVENTS","pressed","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","2","5","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","MSPointerEvent","PointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","SingleTouchInput","started","normalizeSingleTouches","changed","TOUCH_INPUT_MAP","TOUCH_TARGET_EVENTS","targetIds","getTouches","allTouches","targetTouches","changedTargetTouches","DEDUP_TIMEOUT","DEDUP_DISTANCE","primaryTouch","lastTouches","recordTouches","setLastTouch","lastTouch","lts","removeLastTouch","isSyntheticEvent","inputEvent","inputData","sourceCapabilities","firesTouchEvents","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MAP","getTouchActionProps","TouchAction","cleanTouchActions","hasPanX","hasPanY","touchMap","cssSupports","CSS","supports","compute","update","touchAction","recognizer","getTouchAction","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","STATE_POSSIBLE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","STATE_FAILED","Recognizer","defaults","simultaneous","requireFail","stateStr","directionStr","getRecognizerByNameIfManager","otherRecognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","preset","Manager","recognizeWith","dropRecognizeWith","requireFailure","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","reset","process","attrTest","optionPointers","isRecognized","directionTest","inOut","time","validPointers","validMovement","validTime","taps","interval","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","domEvents","cssProps","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","handlers","oldCssProps","toggleCssProps","triggerDomEvent","gestureEvent","createEvent","initEvent","gesture","stopped","curRecognizer","existing","events","Tap","Pan","Pinch","Rotate","Press","freeGlobal","baseFlatten","baseRest","isArrayLikeObject","difference","isObject","debounce","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","useRAF","invokeFunc","thisArg","startTimer","pendingFunc","cancelTimer","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","pending","debounced","isInvoking","_len","_key","isArrayLike","isObjectLike","downloadStudies","onDropStudyReport","goBack","imageComment","isAddingComment","isImageCommentAllowed","isRefreshingReport","updateImageComment","isImageCommentOpen","activeReportId","originalSeriesId","refreshReport","imageUrl","_m","form","htmlValue","updateTextValue","hasNotAddedComment","updateComment","textValue","deleteComment","CKEditor","reportImageCommentId","previewUrl","isEmpty","hasNulls","hasUndefined","canDisplay","reportImageId","confirmUnload","warning","reportService","saveImageComment","showConfirm","deleteImageComment","arrayToList","Set","instruction","isStudyExcluded","toggleStudy","toggleSeries","isSeriesExcluded","numberOfImages","seriesToExclude","_q","downloadType","folderOption","downloadDisabled","download","optionsVisible","downloadOptionsTip","ViewerStudyDownloadModal","AttachmentList","studiesToExclude","hasThumbnails","hasAttachments","tip","studiesGroupedByReportId","downloadReportStudies","reportStudies","seriesIds","includeSeriesIds","seriesToExcludeIndex","studyToExcludeIndex","reportIds","studyIds","excludeStudyIds","excludeSeriesIds","downloadImages","openViewerStudyDownloadModal","_ref3","isUserDataLoadedUnwatch","ViewerLayout","AstImageCommentForm","initialSeriesIds","initialSeriesId","initialImageId","fromRoutePath","fallbackRoutePath","isUserDataLoaded","shouldOpenInNewWindow","imageComments","isTeleconsultation","isConsultantUser","groupConsultantId","userId","lockedByUserId","isPartnerViewer","allowHangingProtocol","promptToAddStudiesToClinic","oldValue","wsData","unsubscribeByCallback","refreshStudy","subscribe","_this$$route","path","route","loadedStudyIds","loadedReportIds","diff","removeStudies","addStudies","removeReports","addReports","loadData","previousSeriesIds","keyboard","stopListening","startListening","setupPrimaryToolbarConfig","isNewWindow","opener","beforeRouteEnter","vm","beforeRouteUpdate","onViewerClosed","isShowingStudyOrReport","onAddToViewer","onOpenReportCommentAction","REPORT_COMPLETED","onReportCompleted","CLOSE","onExternalWindowClosed","onResetViewer","$watch","_callee4","_context4","getStudy","ids","fillCanvases","_this8","_callee5","hasStudies","hasReports","requests","_this8$$route$query$l","_this8$$route$query$l2","getStudyViewerVm","_context5","getHangingProtocols","getStudyPartnerViewerVmAsync","getStudyViewerVmAsync","getReportViewerVmAsync","getUserViewerSettings","_this9","_callee6","isConfirmed","confirmAddingStudies","_context6","confirmText","cancelText","addStudiesAndReload","goToPartnerViewer","_this10","_callee7","_context7","addStudiesToClinic","sourceClinicCode","reload","optedForPartnerViewer","VIEWER_CLOSED","routeName","routePath","fallbackRoutes","_this11","_callee8","_context8","addMprImageComment","REPORT_IMAGE_COMMENT","_this12","_callee9","newSeries","_context9","createMprAnnotationRenderingAsync","showNotification","_this13","_callee10","_context10","getReportImageComments","_this14","_callee11","_context11","_this15","_callee12","burnInAction","_context12","createAnnotationRenderingAsync","_this16","_callee13","windowOpeners","fallback","shouldAttemptContactingParent","_context13","history","go"],"mappings":"0GAAA,W;;CCCC,SAASA,EAAEC,GAAwDA,EAAEC,GAArE,CAAoLC,GAAK,SAASH,GAAG,aAAa,SAASC,IAAI,IAAID,EAAE,CAACI,WAAW,gBAAgBC,SAASC,gBAAgBC,UAAU,cAAcF,SAASC,gBAAgBE,YAAY,iBAAiBH,SAASC,gBAAgBG,kCAA6B,GAAQR,IAAIS,OAAOC,QAAQ,UAAUC,KAAKC,UAAUC,WAAW,OAAOd,EAAES,+BAA+B,2BAA2BG,KAAKC,UAAUC,YAAYb,GAAGD,EAAEQ,aAAaO,GAAGC,OAAOC,KAAKjB,GAAGkB,SAAQ,SAASlB,OAAMA,EAAE,SAASmB,IAAI,IAAInB,GAAE,EAAG,IAAI,IAAIC,EAAEe,OAAOI,eAAe,GAAG,UAAU,CAACC,IAAI,WAAWrB,GAAE,KAAMU,OAAOY,iBAAiB,OAAO,KAAKrB,GAAG,MAAMD,IAAI,OAAOA,EAAE,SAASuB,EAAEvB,GAAG,GAAGA,GAAGgB,OAAOC,KAAKjB,GAAGkB,SAAQ,SAASjB,GAAGuB,EAAEvB,GAAGD,EAAEC,OAAMuB,EAAEC,WAAW,CAAC,IAAIF,EAAEtB,IAAI,GAAGsB,EAAEd,8BAA8Bc,EAAEhB,WAAWgB,EAAEnB,W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eAAAiqE,EAAA5qE,KAAA,iBACA2qE,GAEAJ,EAAA/tB,QAAA9xE,QAAA,YAGArF,OAAA+2B,KAAA,GAAA/2B,OAAAsgG,OAAA10F,MAAA4gB,SACA04E,EAAA/G,cACA+G,EAAA/tB,QAAAtzE,KAAAqhG,EAAA/G,eACAn+F,OAAAwlG,QAAArjG,OAAA,EACA+iG,EAAA/tB,QAAAsuB,IAAA,GAEAJ,IACA,QAAAE,EAAA5qE,KAAA,iBAAA4qE,EAAA7qE,KAAA,GAAA6qE,EAAA1nD,GAAA0nD,EAAA,YAGAF,IAAA,yBAAAE,EAAAvqE,UAAAmqE,EAAA,kBAnCAhrE,OE7hB4W,ICQxW,G,UAAY,eACd,EACAlF,EACAS,GACA,EACA,KACA,KACA,OAIa,e,kECnBf","file":"js/Viewer.8377b77f63a0e4077983.bundle.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EmailImagesSidebar.vue?vue&type=style&index=0&id=1d80bbc9&prod&lang=scss\"","/*! mobile-drag-drop 2.1.0 | Copyright (c) 2017 Tim Ruffles | MIT License */\n!function(a,b){\"object\"==typeof exports&&\"undefined\"!=typeof module?b(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],b):b(a.MobileDragDrop=a.MobileDragDrop||{})}(this,function(a){\"use strict\";function b(){var a={dragEvents:\"ondragstart\"in document.documentElement,draggable:\"draggable\"in document.documentElement,touchEvents:\"ontouchstart\"in document.documentElement,userAgentSupportingNativeDnD:void 0},b=!!window.chrome||/chrome/i.test(navigator.userAgent);return a.userAgentSupportingNativeDnD=!(/iPad|iPhone|iPod|Android/.test(navigator.userAgent)||b&&a.touchEvents),A&&Object.keys(a).forEach(function(a){}),a}function c(){var a=!1;try{var b=Object.defineProperty({},\"passive\",{get:function(){a=!0}});window.addEventListener(\"test\",null,b)}catch(a){}return a}function d(a){if(a&&Object.keys(a).forEach(function(b){B[b]=a[b]}),!B.forceApply){var d=b();if(d.userAgentSupportingNativeDnD&&d.draggable&&d.dragEvents)return!1}return y=c(),B.holdToDrag?h(\"touchstart\",w,!1):h(\"touchstart\",e,!1),!0}function e(a){if(!z){var b=f(a);if(b)try{z=new J(a,B,b,g)}catch(b){throw g(B,a,3),b}}}function f(a){var b=a.target;do if(b.draggable!==!1&&b.getAttribute&&\"true\"===b.getAttribute(\"draggable\"))return b;while((b=b.parentNode)&&b!==document.body)}function g(a,b,c){if(0===c&&a.defaultActionOverride)try{a.defaultActionOverride(b),b.defaultPrevented}catch(a){}z=null}function h(a,b,c){void 0===c&&(c=!0),document.addEventListener(a,b,!!y&&{passive:c})}function i(a,b){document.removeEventListener(a,b)}function j(a){return 0===a.length?0:a.reduce(function(a,b){return b+a},0)/a.length}function k(a){return a&&a.tagName}function l(a,b){for(var c=0;c-1)return D[3]}else if(b===D[2]&&(0===a.indexOf(D[2])||a.indexOf(\"Move\")>-1))return D[2];return D[0]}function w(a){var b=a.target,c=function(){g.off(),h.off(),i.off(),e(a)},d=function(){g.off(),h.off(),i.off(),clearTimeout(f)},f=setTimeout(c,B.holdToDrag),g=x(b,\"touchend\",d,this),h=x(b,\"touchcancel\",d,this),i=x(window,\"scroll\",d,this)}function x(a,b,c,d){return d&&(c=c.bind(d)),a.addEventListener(b,c),{off:function(){return a.removeEventListener(b,c)}}}var y,z,A=!1,B={iterationInterval:150},C=[\"none\",\"copy\",\"copyLink\",\"copyMove\",\"link\",\"linkMove\",\"move\",\"all\"],D=[\"none\",\"copy\",\"move\",\"link\"],E=[\"\",\"-webkit-\"],F=\"dnd-poly-\",G=F+\"drag-image\",H=F+\"snapback\",I=F+\"icon\",J=function(){function a(a,b,c,d){this.h=a,this.i=b,this.j=c,this.k=d,this.l=0,this.m=null,this.o=null,this.p=a,this.q=a.changedTouches[0],this.s=this.t.bind(this),this.u=this.v.bind(this),h(\"touchmove\",this.s,!1),h(\"touchend\",this.u,!1),h(\"touchcancel\",this.u,!1)}return a.prototype.A=function(){var a=this;this.l=1,this.B=D[0],this.C={D:{},F:void 0,g:3,G:[]},this.H={x:null,y:null},this.I={x:null,y:null};var b=this.j;if(this.J=new K(this.C,function(c,d,e){b=c,\"number\"!=typeof d&&\"number\"!=typeof e||(a.K={x:d||0,y:e||0})}),this.C.g=2,this.J.dropEffect=D[0],u(\"dragstart\",this.j,this.p,this.C,this.J))return this.l=3,this.L(),!1;if(n(\"page\",this.p,this.I),this.M=p(b),this.N=q(this.M),!this.K)if(this.i.dragImageOffset)this.K={x:this.i.dragImageOffset.x,y:this.i.dragImageOffset.y};else if(this.i.dragImageCenterOnTouch){var c=getComputedStyle(b);this.K={x:0-parseInt(c.marginLeft,10),y:0-parseInt(c.marginTop,10)}}else{var d=b.getBoundingClientRect(),c=getComputedStyle(b);this.K={x:d.left-this.q.clientX-parseInt(c.marginLeft,10)+d.width/2,y:d.top-this.q.clientY-parseInt(c.marginTop,10)+d.height/2}}return r(this.M,this.I,this.N,this.K,this.i.dragImageCenterOnTouch),document.body.appendChild(this.M),this.O=setInterval(function(){a.P||(a.P=!0,a.R(),a.P=!1)},this.i.iterationInterval),!0},a.prototype.L=function(){this.O&&(clearInterval(this.O),this.O=null),i(\"touchmove\",this.s),i(\"touchend\",this.u),i(\"touchcancel\",this.u),this.M&&(this.M.parentNode.removeChild(this.M),this.M=null),this.k(this.i,this.p,this.l)},a.prototype.t=function(a){var b=this;if(l(a,this.q.identifier)!==!1){if(this.p=a,0===this.l){var c=void 0;if(this.i.dragStartConditionOverride)try{c=this.i.dragStartConditionOverride(a)}catch(a){c=!1}else c=1===a.touches.length;return c?void(this.A()===!0&&(this.h.preventDefault(),a.preventDefault())):void this.L()}if(a.preventDefault(),n(\"client\",a,this.H),n(\"page\",a,this.I),this.i.dragImageTranslateOverride)try{var d=!1;if(this.i.dragImageTranslateOverride(a,{x:this.H.x,y:this.H.y},this.m,function(a,c){b.M&&(d=!0,b.H.x+=a,b.H.y+=c,b.I.x+=a,b.I.y+=c,r(b.M,b.I,b.N,b.K,b.i.dragImageCenterOnTouch))}),d)return}catch(a){}r(this.M,this.I,this.N,this.K,this.i.dragImageCenterOnTouch)}},a.prototype.v=function(a){if(l(a,this.q.identifier)!==!1){if(this.i.dragImageTranslateOverride)try{this.i.dragImageTranslateOverride(void 0,void 0,void 0,function(){})}catch(a){}if(0===this.l)return void this.L();a.preventDefault(),this.l=\"touchcancel\"===a.type?3:2}},a.prototype.R=function(){var a=this;if(A)var b=F+\"debug\",c=F+\"immediate-user-selection\",d=F+\"current-drop-target\";var e=this.B;this.C.g=3,this.J.dropEffect=D[0];var f=u(\"drag\",this.j,this.p,this.C,this.J);if(f&&(this.B=D[0]),f||2===this.l||3===this.l){var g=this.S(this.l);return g?void s(this.j,this.M,this.N,function(){a.T()}):void this.T()}var h=document.elementFromPoint(this.H.x,this.H.y),i=this.o;h!==this.m&&h!==this.o&&(A&&(this.m&&this.m.classList.remove(c),h&&(h.classList.add(b),h.classList.add(c))),this.m=h,null!==this.o&&(this.C.g=3,this.J.dropEffect=D[0],u(\"dragexit\",this.o,this.p,this.C,this.J,!1)),null===this.m?this.o=this.m:(this.C.g=3,this.J.dropEffect=t(this.C.F,this.j),u(\"dragenter\",this.m,this.p,this.C,this.J)?(this.o=this.m,this.B=v(this.J.effectAllowed,this.J.dropEffect)):this.m!==document.body&&(this.o=document.body))),i!==this.o&&k(i)&&(A&&i.classList.remove(d),this.C.g=3,this.J.dropEffect=D[0],u(\"dragleave\",i,this.p,this.C,this.J,!1,this.o)),k(this.o)&&(A&&(this.o.classList.add(b),this.o.classList.add(d)),this.C.g=3,this.J.dropEffect=t(this.C.F,this.j),u(\"dragover\",this.o,this.p,this.C,this.J)===!1?this.B=D[0]:this.B=v(this.J.effectAllowed,this.J.dropEffect)),e!==this.B&&this.M.classList.remove(F+e);var j=F+this.B;this.M.classList.contains(j)===!1&&this.M.classList.add(j)},a.prototype.S=function(a){if(A){var b=F+\"immediate-user-selection\",c=F+\"current-drop-target\";this.o&&this.o.classList.remove(c),this.m&&this.m.classList.remove(b)}var d=this.B===D[0]||null===this.o||3===a;return d?k(this.o)&&(this.C.g=3,this.J.dropEffect=D[0],u(\"dragleave\",this.o,this.p,this.C,this.J,!1)):k(this.o)&&(this.C.g=1,this.J.dropEffect=this.B,u(\"drop\",this.o,this.p,this.C,this.J)===!0?this.B=this.J.dropEffect:this.B=D[0]),d},a.prototype.T=function(){this.C.g=3,this.J.dropEffect=this.B,u(\"dragend\",this.j,this.p,this.C,this.J,!1),this.l=2,this.L()},a}(),K=function(){function a(a,b){this.U=a,this.V=b,this.W=D[0]}return Object.defineProperty(a.prototype,\"types\",{get:function(){if(0!==this.U.g)return Object.freeze(this.U.G)},enumerable:!0,configurable:!0}),a.prototype.setData=function(a,b){if(2===this.U.g){if(a.indexOf(\" \")>-1)throw new Error(\"illegal arg: type contains space\");this.U.D[a]=b,this.U.G.indexOf(a)===-1&&this.U.G.push(a)}},a.prototype.getData=function(a){if(1===this.U.g||2===this.U.g)return this.U.D[a]||\"\"},a.prototype.clearData=function(a){if(2===this.U.g){if(a&&this.U.D[a]){delete this.U.D[a];var b=this.U.G.indexOf(a);return void(b>-1&&this.U.G.splice(b,1))}this.U.D={},this.U.G=[]}},a.prototype.setDragImage=function(a,b,c){2===this.U.g&&this.V(a,b,c)},Object.defineProperty(a.prototype,\"effectAllowed\",{get:function(){return this.U.F},set:function(a){2===this.U.g&&C.indexOf(a)>-1&&(this.U.F=a)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,\"dropEffect\",{get:function(){return this.W},set:function(a){0!==this.U.g&&C.indexOf(a)>-1&&(this.W=a)},enumerable:!0,configurable:!0}),a}();a.polyfill=d,Object.defineProperty(a,\"__esModule\",{value:!0})});\n//# sourceMappingURL=index.min.js.map","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerImageCommentForm.vue?vue&type=style&index=0&id=5fcb1334&prod&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprViewerAnnotationDialog.vue?vue&type=style&index=0&id=6a1265b4&prod&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImagePlaceholder.vue?vue&type=style&index=0&id=4ec63bbe&prod&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HotkeyModal.vue?vue&type=style&index=0&id=28ebfed9&prod&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerLayoutSelector.vue?vue&type=style&index=0&id=408da2f8&prod&lang=scss\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Viewer.vue?vue&type=style&index=0&id=576c527a&prod&lang=scss\"","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n","/*! cornerstone-math - 0.1.6 - 2017-06-09 | (c) 2017 Chris Hafey | https://github.com/chafey/cornerstoneTools */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"cornerstoneMath\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cornerstoneMath\"] = factory();\n\telse\n\t\troot[\"cornerstoneMath\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 9);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// Based on THREE.JS\nfunction clamp(x, a, b) {\n return x < a ? a : x > b ? b : x;\n}\n\nfunction degToRad(degrees) {\n var degreeToRadiansFactor = Math.PI / 180;\n\n return degrees * degreeToRadiansFactor;\n}\n\nfunction radToDeg(radians) {\n var radianToDegreesFactor = 180 / Math.PI;\n\n return radians * radianToDegreesFactor;\n}\n\n// Returns sign of number\nfunction sign(x) {\n return typeof x === 'number' ? x ? x < 0 ? -1 : 1 : x === x ? 0 : NaN : NaN;\n}\n\nexports.clamp = clamp;\nexports.degToRad = degToRad;\nexports.radToDeg = radToDeg;\nexports.sign = sign;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _quaternion = __webpack_require__(3);\n\nvar _quaternion2 = _interopRequireDefault(_quaternion);\n\nvar _math = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Based on THREE.JS\nvar Vector3 = function Vector3(x, y, z) {\n\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n};\n\nVector3.prototype = {\n\n constructor: Vector3,\n\n set: function set(x, y, z) {\n\n this.x = x;\n this.y = y;\n this.z = z;\n\n return this;\n },\n setX: function setX(x) {\n\n this.x = x;\n\n return this;\n },\n setY: function setY(y) {\n\n this.y = y;\n\n return this;\n },\n setZ: function setZ(z) {\n\n this.z = z;\n\n return this;\n },\n setComponent: function setComponent(index, value) {\n\n switch (index) {\n\n case 0:\n this.x = value;break;\n case 1:\n this.y = value;break;\n case 2:\n this.z = value;break;\n default:\n throw new Error('index is out of range: ' + index);\n\n }\n },\n getComponent: function getComponent(index) {\n\n switch (index) {\n\n case 0:\n return this.x;\n case 1:\n return this.y;\n case 2:\n return this.z;\n default:\n throw new Error('index is out of range: ' + index);\n\n }\n },\n copy: function copy(v) {\n\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n\n return this;\n },\n add: function add(v, w) {\n\n if (w !== undefined) {\n\n console.warn('DEPRECATED: Vector3\\'s .add() now only accepts one argument. Use .addVectors( a, b ) instead.');\n\n return this.addVectors(v, w);\n }\n\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n\n return this;\n },\n addScalar: function addScalar(s) {\n\n this.x += s;\n this.y += s;\n this.z += s;\n\n return this;\n },\n addVectors: function addVectors(a, b) {\n\n this.x = a.x + b.x;\n this.y = a.y + b.y;\n this.z = a.z + b.z;\n\n return this;\n },\n sub: function sub(v, w) {\n\n if (w !== undefined) {\n\n console.warn('DEPRECATED: Vector3\\'s .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');\n\n return this.subVectors(v, w);\n }\n\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n\n return this;\n },\n subVectors: function subVectors(a, b) {\n\n this.x = a.x - b.x;\n this.y = a.y - b.y;\n this.z = a.z - b.z;\n\n return this;\n },\n multiply: function multiply(v, w) {\n\n if (w !== undefined) {\n\n console.warn('DEPRECATED: Vector3\\'s .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.');\n\n return this.multiplyVectors(v, w);\n }\n\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z;\n\n return this;\n },\n multiplyScalar: function multiplyScalar(scalar) {\n\n this.x *= scalar;\n this.y *= scalar;\n this.z *= scalar;\n\n return this;\n },\n multiplyVectors: function multiplyVectors(a, b) {\n\n this.x = a.x * b.x;\n this.y = a.y * b.y;\n this.z = a.z * b.z;\n\n return this;\n },\n\n\n applyAxisAngle: function () {\n\n var quaternion = void 0;\n\n return function (axis, angle) {\n\n if (quaternion === undefined) {\n quaternion = new _quaternion2.default();\n }\n\n this.applyQuaternion(quaternion.setFromAxisAngle(axis, angle));\n\n return this;\n };\n }(),\n\n applyMatrix3: function applyMatrix3(m) {\n\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n var e = m.elements;\n\n this.x = e[0] * x + e[3] * y + e[6] * z;\n this.y = e[1] * x + e[4] * y + e[7] * z;\n this.z = e[2] * x + e[5] * y + e[8] * z;\n\n return this;\n },\n applyMatrix4: function applyMatrix4(m) {\n\n // Input: THREE.Matrix4 affine matrix\n\n var x = this.x,\n y = this.y,\n z = this.z;\n\n var e = m.elements;\n\n this.x = e[0] * x + e[4] * y + e[8] * z + e[12];\n this.y = e[1] * x + e[5] * y + e[9] * z + e[13];\n this.z = e[2] * x + e[6] * y + e[10] * z + e[14];\n\n return this;\n },\n applyProjection: function applyProjection(m) {\n\n // Input: THREE.Matrix4 projection matrix\n\n var x = this.x,\n y = this.y,\n z = this.z;\n\n var e = m.elements;\n var d = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]); // Perspective divide\n\n this.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * d;\n this.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * d;\n this.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * d;\n\n return this;\n },\n applyQuaternion: function applyQuaternion(q) {\n\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // Calculate quat * vector\n\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // Calculate result * inverse quat\n\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n transformDirection: function transformDirection(m) {\n\n // Input: THREE.Matrix4 affine matrix\n // Vector interpreted as a direction\n\n var x = this.x,\n y = this.y,\n z = this.z;\n\n var e = m.elements;\n\n this.x = e[0] * x + e[4] * y + e[8] * z;\n this.y = e[1] * x + e[5] * y + e[9] * z;\n this.z = e[2] * x + e[6] * y + e[10] * z;\n\n this.normalize();\n\n return this;\n },\n divide: function divide(v) {\n\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z;\n\n return this;\n },\n divideScalar: function divideScalar(scalar) {\n\n if (scalar !== 0) {\n\n var invScalar = 1 / scalar;\n\n this.x *= invScalar;\n this.y *= invScalar;\n this.z *= invScalar;\n } else {\n\n this.x = 0;\n this.y = 0;\n this.z = 0;\n }\n\n return this;\n },\n min: function min(v) {\n\n if (this.x > v.x) {\n\n this.x = v.x;\n }\n\n if (this.y > v.y) {\n\n this.y = v.y;\n }\n\n if (this.z > v.z) {\n\n this.z = v.z;\n }\n\n return this;\n },\n max: function max(v) {\n\n if (this.x < v.x) {\n\n this.x = v.x;\n }\n\n if (this.y < v.y) {\n\n this.y = v.y;\n }\n\n if (this.z < v.z) {\n\n this.z = v.z;\n }\n\n return this;\n },\n clamp: function clamp(min, max) {\n\n // This function assumes min < max, if this assumption isn't true it will not operate correctly\n\n if (this.x < min.x) {\n\n this.x = min.x;\n } else if (this.x > max.x) {\n\n this.x = max.x;\n }\n\n if (this.y < min.y) {\n\n this.y = min.y;\n } else if (this.y > max.y) {\n\n this.y = max.y;\n }\n\n if (this.z < min.z) {\n\n this.z = min.z;\n } else if (this.z > max.z) {\n\n this.z = max.z;\n }\n\n return this;\n },\n\n\n clampScalar: function () {\n\n var min = void 0,\n max = void 0;\n\n return function (minVal, maxVal) {\n\n if (min === undefined) {\n\n min = new Vector3();\n max = new Vector3();\n }\n\n min.set(minVal, minVal, minVal);\n max.set(maxVal, maxVal, maxVal);\n\n return this.clamp(min, max);\n };\n }(),\n\n floor: function floor() {\n\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n this.z = Math.floor(this.z);\n\n return this;\n },\n ceil: function ceil() {\n\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n this.z = Math.ceil(this.z);\n\n return this;\n },\n round: function round() {\n\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n this.z = Math.round(this.z);\n\n return this;\n },\n roundToZero: function roundToZero() {\n\n this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z);\n\n return this;\n },\n negate: function negate() {\n\n return this.multiplyScalar(-1);\n },\n dot: function dot(v) {\n\n return this.x * v.x + this.y * v.y + this.z * v.z;\n },\n lengthSq: function lengthSq() {\n\n return this.x * this.x + this.y * this.y + this.z * this.z;\n },\n length: function length() {\n\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n },\n lengthManhattan: function lengthManhattan() {\n\n return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);\n },\n normalize: function normalize() {\n\n return this.divideScalar(this.length());\n },\n setLength: function setLength(l) {\n\n var oldLength = this.length();\n\n if (oldLength !== 0 && l !== oldLength) {\n\n this.multiplyScalar(l / oldLength);\n }\n\n return this;\n },\n lerp: function lerp(v, alpha) {\n\n this.x += (v.x - this.x) * alpha;\n this.y += (v.y - this.y) * alpha;\n this.z += (v.z - this.z) * alpha;\n\n return this;\n },\n cross: function cross(v, w) {\n\n if (w !== undefined) {\n\n console.warn('DEPRECATED: Vector3\\'s .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.');\n\n return this.crossVectors(v, w);\n }\n\n var x = this.x,\n y = this.y,\n z = this.z;\n\n this.x = y * v.z - z * v.y;\n this.y = z * v.x - x * v.z;\n this.z = x * v.y - y * v.x;\n\n return this;\n },\n crossVectors: function crossVectors(a, b) {\n\n var ax = a.x,\n ay = a.y,\n az = a.z;\n var bx = b.x,\n by = b.y,\n bz = b.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n\n projectOnVector: function () {\n\n var v1 = void 0,\n dot = void 0;\n\n return function (vector) {\n\n if (v1 === undefined) {\n v1 = new Vector3();\n }\n\n v1.copy(vector).normalize();\n\n dot = this.dot(v1);\n\n return this.copy(v1).multiplyScalar(dot);\n };\n }(),\n\n projectOnPlane: function () {\n\n var v1 = void 0;\n\n return function (planeNormal) {\n\n if (v1 === undefined) {\n v1 = new Vector3();\n }\n\n v1.copy(this).projectOnVector(planeNormal);\n\n return this.sub(v1);\n };\n }(),\n\n reflect: function () {\n\n // Reflect incident vector off plane orthogonal to normal\n // Normal is assumed to have unit length\n\n var v1 = void 0;\n\n return function (normal) {\n\n if (v1 === undefined) {\n v1 = new Vector3();\n }\n\n return this.sub(v1.copy(normal).multiplyScalar(2 * this.dot(normal)));\n };\n }(),\n\n angleTo: function angleTo(v) {\n\n var theta = this.dot(v) / (this.length() * v.length());\n\n // Clamp, to handle numerical problems\n\n return Math.acos((0, _math.clamp)(theta, -1, 1));\n },\n distanceTo: function distanceTo(v) {\n\n return Math.sqrt(this.distanceToSquared(v));\n },\n distanceToSquared: function distanceToSquared(v) {\n\n var dx = this.x - v.x;\n var dy = this.y - v.y;\n var dz = this.z - v.z;\n\n return dx * dx + dy * dy + dz * dz;\n },\n setFromMatrixPosition: function setFromMatrixPosition(m) {\n\n this.x = m.elements[12];\n this.y = m.elements[13];\n this.z = m.elements[14];\n\n return this;\n },\n setFromMatrixScale: function setFromMatrixScale(m) {\n\n var sx = this.set(m.elements[0], m.elements[1], m.elements[2]).length();\n var sy = this.set(m.elements[4], m.elements[5], m.elements[6]).length();\n var sz = this.set(m.elements[8], m.elements[9], m.elements[10]).length();\n\n this.x = sx;\n this.y = sy;\n this.z = sz;\n\n return this;\n },\n setFromMatrixColumn: function setFromMatrixColumn(index, matrix) {\n\n var offset = index * 4;\n\n var me = matrix.elements;\n\n this.x = me[offset];\n this.y = me[offset + 1];\n this.z = me[offset + 2];\n\n return this;\n },\n equals: function equals(v) {\n\n return v.x === this.x && v.y === this.y && v.z === this.z;\n },\n fromArray: function fromArray(array) {\n\n this.x = array[0];\n this.y = array[1];\n this.z = array[2];\n\n return this;\n },\n toArray: function toArray() {\n\n return [this.x, this.y, this.z];\n },\n clone: function clone() {\n\n return new Vector3(this.x, this.y, this.z);\n }\n};\n\nexports.default = Vector3;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _math = __webpack_require__(0);\n\n// Based on http://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment\nfunction sqr(x) {\n return x * x;\n}\n\nfunction dist2(v, w) {\n return sqr(v.x - w.x) + sqr(v.y - w.y);\n}\n\nfunction distanceToPointSquared(lineSegment, point) {\n var l2 = dist2(lineSegment.start, lineSegment.end);\n\n if (l2 === 0) {\n return dist2(point, lineSegment.start);\n }\n var t = ((point.x - lineSegment.start.x) * (lineSegment.end.x - lineSegment.start.x) + (point.y - lineSegment.start.y) * (lineSegment.end.y - lineSegment.start.y)) / l2;\n\n if (t < 0) {\n return dist2(point, lineSegment.start);\n }\n if (t > 1) {\n return dist2(point, lineSegment.end);\n }\n\n var pt = {\n x: lineSegment.start.x + t * (lineSegment.end.x - lineSegment.start.x),\n y: lineSegment.start.y + t * (lineSegment.end.y - lineSegment.start.y)\n };\n\n return dist2(point, pt);\n}\n\nfunction distanceToPoint(lineSegment, point) {\n return Math.sqrt(distanceToPointSquared(lineSegment, point));\n}\n\n// Returns intersection points of two lines\nfunction intersectLine(lineSegment1, lineSegment2) {\n var intersectionPoint = {};\n\n var x1 = lineSegment1.start.x,\n y1 = lineSegment1.start.y,\n x2 = lineSegment1.end.x,\n y2 = lineSegment1.end.y,\n x3 = lineSegment2.start.x,\n y3 = lineSegment2.start.y,\n x4 = lineSegment2.end.x,\n y4 = lineSegment2.end.y;\n\n var a1 = void 0,\n a2 = void 0,\n b1 = void 0,\n b2 = void 0,\n c1 = void 0,\n c2 = void 0; // Coefficients of line equations\n var r1 = void 0,\n r2 = void 0,\n r3 = void 0,\n r4 = void 0; // Sign values\n\n var denom = void 0,\n num = void 0; // Intermediate values\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is \"a1 x + b1 y + c1 = 0\"\n a1 = y2 - y1;\n b1 = x1 - x2;\n c1 = x2 * y1 - x1 * y2;\n\n // Compute r3 and r4\n r3 = a1 * x3 + b1 * y3 + c1;\n r4 = a1 * x4 + b1 * y4 + c1;\n\n /* Check signs of r3 and r4. If both point 3 and point 4 lie on\n * same side of line 1, the line segments do not intersect.\n */\n\n if (r3 !== 0 && r4 !== 0 && (0, _math.sign)(r3) === (0, _math.sign)(r4)) {\n return;\n }\n\n /* Compute a2, b2, c2 */\n\n a2 = y4 - y3;\n b2 = x3 - x4;\n c2 = x4 * y3 - x3 * y4;\n\n /* Compute r1 and r2 */\n\n r1 = a2 * x1 + b2 * y1 + c2;\n r2 = a2 * x2 + b2 * y2 + c2;\n\n /* Check signs of r1 and r2. If both point 1 and point 2 lie\n * on same side of second line segment, the line segments do\n * not intersect.\n */\n\n if (r1 !== 0 && r2 !== 0 && (0, _math.sign)(r1) === (0, _math.sign)(r2)) {\n return;\n }\n\n /* Line segments intersect: compute intersection point.\n */\n\n denom = a1 * b2 - a2 * b1;\n\n /* The denom/2 is to get rounding instead of truncating. It\n * is added or subtracted to the numerator, depending upon the\n * sign of the numerator.\n */\n\n num = b1 * c2 - b2 * c1;\n var x = parseFloat(num / denom);\n\n num = a2 * c1 - a1 * c2;\n var y = parseFloat(num / denom);\n\n intersectionPoint.x = x;\n intersectionPoint.y = y;\n\n return intersectionPoint;\n}\n\n// Module exports\nvar lineSegment = {\n distanceToPoint: distanceToPoint,\n intersectLine: intersectLine\n};\n\nexports.default = lineSegment;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar Quaternion = function Quaternion(x, y, z, w) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w !== undefined ? w : 1;\n};\n\nQuaternion.prototype.setFromAxisAngle = function (axis, angle) {\n var halfAngle = angle / 2,\n s = Math.sin(halfAngle);\n\n this.x = axis.x * s;\n this.y = axis.y * s;\n this.z = axis.z * s;\n this.w = Math.cos(halfAngle);\n\n return this;\n};\n\nQuaternion.prototype.multiplyQuaternions = function (a, b) {\n var qax = a.x,\n qay = a.y,\n qaz = a.z,\n qaw = a.w;\n var qbx = b.x,\n qby = b.y,\n qbz = b.z,\n qbw = b.w;\n\n this.x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n this.y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n this.z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n this.w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n\n return this;\n};\n\nQuaternion.prototype.setFromRotationMatrix = function (m) {\n var te = m.elements,\n m11 = te[0],\n m12 = te[4],\n m13 = te[8],\n m21 = te[1],\n m22 = te[5],\n m23 = te[9],\n m31 = te[2],\n m32 = te[6],\n m33 = te[10],\n trace = m11 + m22 + m33,\n s = void 0;\n\n if (trace > 0) {\n\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n this.w = 0.25 / s;\n this.x = (m32 - m23) * s;\n this.y = (m13 - m31) * s;\n this.z = (m21 - m12) * s;\n } else if (m11 > m22 && m11 > m33) {\n\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n this.w = (m32 - m23) / s;\n this.x = 0.25 * s;\n this.y = (m12 + m21) / s;\n this.z = (m13 + m31) / s;\n } else if (m22 > m33) {\n\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n this.w = (m13 - m31) / s;\n this.x = (m12 + m21) / s;\n this.y = 0.25 * s;\n this.z = (m23 + m32) / s;\n } else {\n\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n this.w = (m21 - m12) / s;\n this.x = (m13 + m31) / s;\n this.y = (m23 + m32) / s;\n this.z = 0.25 * s;\n }\n\n return this;\n};\n\nexports.default = Quaternion;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _vector = __webpack_require__(1);\n\nvar _vector2 = _interopRequireDefault(_vector);\n\nvar _math = __webpack_require__(0);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// Copied from THREE.JS\n/**\n * @author bhouston / http://exocortex.com\n */\n\nvar Line3 = function () {\n function Line3(start, end) {\n _classCallCheck(this, Line3);\n\n this.start = start !== undefined ? start : new _vector2.default();\n this.end = end !== undefined ? end : new _vector2.default();\n }\n\n _createClass(Line3, [{\n key: 'set',\n value: function set(start, end) {\n\n this.start.copy(start);\n this.end.copy(end);\n\n return this;\n }\n }, {\n key: 'copy',\n value: function copy(line) {\n\n this.start.copy(line.start);\n this.end.copy(line.end);\n\n return this;\n }\n }, {\n key: 'center',\n value: function center(optionalTarget) {\n\n var result = optionalTarget || new _vector2.default();\n\n return result.addVectors(this.start, this.end).multiplyScalar(0.5);\n }\n }, {\n key: 'delta',\n value: function delta(optionalTarget) {\n\n var result = optionalTarget || new _vector2.default();\n\n return result.subVectors(this.end, this.start);\n }\n }, {\n key: 'distanceSq',\n value: function distanceSq() {\n\n return this.start.distanceToSquared(this.end);\n }\n }, {\n key: 'distance',\n value: function distance() {\n\n return this.start.distanceTo(this.end);\n }\n }, {\n key: 'at',\n value: function at(t, optionalTarget) {\n\n var result = optionalTarget || new _vector2.default();\n\n return this.delta(result).multiplyScalar(t).add(this.start);\n }\n }, {\n key: 'closestPointToPointParameter',\n value: function closestPointToPointParameter() {\n\n var startP = new _vector2.default();\n var startEnd = new _vector2.default();\n\n return function (point, clampToLine) {\n\n startP.subVectors(point, this.start);\n startEnd.subVectors(this.end, this.start);\n\n var startEnd2 = startEnd.dot(startEnd);\n var startEnd_startP = startEnd.dot(startP);\n\n var t = startEnd_startP / startEnd2;\n\n if (clampToLine) {\n\n t = (0, _math.clamp)(t, 0, 1);\n }\n\n return t;\n };\n }\n }, {\n key: 'closestPointToPoint',\n value: function closestPointToPoint(point, clampToLine, optionalTarget) {\n\n var t = this.closestPointToPointParameter(point, clampToLine);\n\n var result = optionalTarget || new _vector2.default();\n\n return this.delta(result).multiplyScalar(t).add(this.start);\n }\n }, {\n key: 'applyMatrix4',\n value: function applyMatrix4(matrix) {\n\n this.start.applyMatrix4(matrix);\n this.end.applyMatrix4(matrix);\n\n return this;\n }\n }, {\n key: 'equals',\n value: function equals(line) {\n\n return line.start.equals(this.start) && line.end.equals(this.end);\n }\n }, {\n key: 'clone',\n value: function clone() {\n\n return new Line3().copy(this);\n }\n }, {\n key: 'intersectLine',\n value: function intersectLine(line) {\n // http://stackoverflow.com/questions/2316490/the-algorithm-to-find-the-point-of-intersection-of-two-3d-line-segment/10288710#10288710\n var da = this.end.clone().sub(this.start);\n var db = line.end.clone().sub(line.start);\n var dc = line.start.clone().sub(this.start);\n\n var daCrossDb = da.clone().cross(db);\n var dcCrossDb = dc.clone().cross(db);\n\n if (dc.dot(da) === 0) {\n // Lines are not coplanar, stop here\n return;\n }\n\n var s = dcCrossDb.dot(daCrossDb) / daCrossDb.lengthSq();\n\n // Make sure we have an intersection\n if (s > 1.0 || isNaN(s)) {\n return;\n }\n\n var intersection = this.start.clone().add(da.clone().multiplyScalar(s));\n var distanceTest = intersection.clone().sub(line.start).lengthSq() + intersection.clone().sub(line.end).lengthSq();\n\n if (distanceTest <= line.distanceSq()) {\n return intersection;\n }\n\n return;\n }\n }]);\n\n return Line3;\n}();\n\nexports.default = Line3;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _vector = __webpack_require__(1);\n\nvar _vector2 = _interopRequireDefault(_vector);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Based on THREE.JS\nvar Matrix4 = function Matrix4(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) {\n this.elements = new Float32Array(16);\n\n // TODO: if n11 is undefined, then just set to identity, otherwise copy all other values into matrix\n // We should not support semi specification of Matrix4, it is just weird.\n\n var te = this.elements;\n\n te[0] = n11 !== undefined ? n11 : 1;te[4] = n12 || 0;te[8] = n13 || 0;te[12] = n14 || 0;\n te[1] = n21 || 0;te[5] = n22 !== undefined ? n22 : 1;te[9] = n23 || 0;te[13] = n24 || 0;\n te[2] = n31 || 0;te[6] = n32 || 0;te[10] = n33 !== undefined ? n33 : 1;te[14] = n34 || 0;\n te[3] = n41 || 0;te[7] = n42 || 0;te[11] = n43 || 0;te[15] = n44 !== undefined ? n44 : 1;\n};\n\nMatrix4.prototype.makeRotationFromQuaternion = function (q) {\n var te = this.elements;\n\n var x = q.x,\n y = q.y,\n z = q.z,\n w = q.w;\n var x2 = x + x,\n y2 = y + y,\n z2 = z + z;\n var xx = x * x2,\n xy = x * y2,\n xz = x * z2;\n var yy = y * y2,\n yz = y * z2,\n zz = z * z2;\n var wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n te[0] = 1 - (yy + zz);\n te[4] = xy - wz;\n te[8] = xz + wy;\n\n te[1] = xy + wz;\n te[5] = 1 - (xx + zz);\n te[9] = yz - wx;\n\n te[2] = xz - wy;\n te[6] = yz + wx;\n te[10] = 1 - (xx + yy);\n\n // Last column\n te[3] = 0;\n te[7] = 0;\n te[11] = 0;\n\n // Bottom row\n te[12] = 0;\n te[13] = 0;\n te[14] = 0;\n te[15] = 1;\n\n return this;\n};\n\nMatrix4.prototype.multiplyMatrices = function (a, b) {\n var ae = a.elements;\n var be = b.elements;\n var te = this.elements;\n\n var a11 = ae[0],\n a12 = ae[4],\n a13 = ae[8],\n a14 = ae[12];\n var a21 = ae[1],\n a22 = ae[5],\n a23 = ae[9],\n a24 = ae[13];\n var a31 = ae[2],\n a32 = ae[6],\n a33 = ae[10],\n a34 = ae[14];\n var a41 = ae[3],\n a42 = ae[7],\n a43 = ae[11],\n a44 = ae[15];\n\n var b11 = be[0],\n b12 = be[4],\n b13 = be[8],\n b14 = be[12];\n var b21 = be[1],\n b22 = be[5],\n b23 = be[9],\n b24 = be[13];\n var b31 = be[2],\n b32 = be[6],\n b33 = be[10],\n b34 = be[14];\n var b41 = be[3],\n b42 = be[7],\n b43 = be[11],\n b44 = be[15];\n\n te[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n te[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n te[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n te[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n\n te[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n te[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n te[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n te[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n\n te[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n te[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n te[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n te[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n\n te[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n te[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n te[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n te[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n\n return this;\n};\n\nMatrix4.prototype.multiply = function (m, n) {\n\n if (n !== undefined) {\n\n console.warn('DEPRECATED: Matrix4\\'s .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.');\n\n return this.multiplyMatrices(m, n);\n }\n\n return this.multiplyMatrices(this, m);\n};\n\nMatrix4.prototype.getInverse = function (m, throwOnInvertible) {\n\n // Based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n var te = this.elements;\n var me = m.elements;\n\n var n11 = me[0],\n n12 = me[4],\n n13 = me[8],\n n14 = me[12];\n var n21 = me[1],\n n22 = me[5],\n n23 = me[9],\n n24 = me[13];\n var n31 = me[2],\n n32 = me[6],\n n33 = me[10],\n n34 = me[14];\n var n41 = me[3],\n n42 = me[7],\n n43 = me[11],\n n44 = me[15];\n\n te[0] = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44;\n te[4] = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44;\n te[8] = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44;\n te[12] = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n te[1] = n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44;\n te[5] = n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44;\n te[9] = n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44;\n te[13] = n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34;\n te[2] = n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44;\n te[6] = n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44;\n te[10] = n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44;\n te[14] = n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34;\n te[3] = n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43;\n te[7] = n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43;\n te[11] = n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43;\n te[15] = n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33;\n\n var det = n11 * te[0] + n21 * te[4] + n31 * te[8] + n41 * te[12];\n\n if (det === 0) {\n\n var msg = 'Matrix4.getInverse(): can\\'t invert matrix, determinant is 0';\n\n if (throwOnInvertible || false) {\n\n throw new Error(msg);\n } else {\n\n console.warn(msg);\n }\n\n this.identity();\n\n return this;\n }\n\n this.multiplyScalar(1 / det);\n\n return this;\n};\n\nMatrix4.prototype.applyToVector3Array = function () {\n\n var v1 = new _vector2.default();\n\n return function (array, offset, length) {\n\n if (offset === undefined) {\n offset = 0;\n }\n if (length === undefined) {\n length = array.length;\n }\n\n for (var i = 0, j = offset; i < length; i += 3, j += 3) {\n\n v1.x = array[j];\n v1.y = array[j + 1];\n v1.z = array[j + 2];\n\n v1.applyMatrix4(this);\n\n array[j] = v1.x;\n array[j + 1] = v1.y;\n array[j + 2] = v1.z;\n }\n\n return array;\n };\n};\n\nMatrix4.prototype.makeTranslation = function (x, y, z) {\n\n this.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1);\n\n return this;\n};\nMatrix4.prototype.multiplyScalar = function (s) {\n\n var te = this.elements;\n\n te[0] *= s;te[4] *= s;te[8] *= s;te[12] *= s;\n te[1] *= s;te[5] *= s;te[9] *= s;te[13] *= s;\n te[2] *= s;te[6] *= s;te[10] *= s;te[14] *= s;\n te[3] *= s;te[7] *= s;te[11] *= s;te[15] *= s;\n\n return this;\n};\nMatrix4.prototype.set = function (n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) {\n\n var te = this.elements;\n\n te[0] = n11;te[4] = n12;te[8] = n13;te[12] = n14;\n te[1] = n21;te[5] = n22;te[9] = n23;te[13] = n24;\n te[2] = n31;te[6] = n32;te[10] = n33;te[14] = n34;\n te[3] = n41;te[7] = n42;te[11] = n43;te[15] = n44;\n\n return this;\n};\n\nMatrix4.prototype.makeScale = function (x, y, z) {\n\n this.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1);\n\n return this;\n};\n\nexports.default = Matrix4;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _vector = __webpack_require__(1);\n\nvar _vector2 = _interopRequireDefault(_vector);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Copied from Three.JS\n/**\n * @author bhouston / http://exocortex.com\n */\n\nvar Plane = function Plane(normal, constant) {\n\n this.normal = normal !== undefined ? normal : new _vector2.default(1, 0, 0);\n this.constant = constant !== undefined ? constant : 0;\n};\n\nPlane.prototype = {\n\n constructor: Plane,\n\n set: function set(normal, constant) {\n\n this.normal.copy(normal);\n this.constant = constant;\n\n return this;\n },\n setComponents: function setComponents(x, y, z, w) {\n\n this.normal.set(x, y, z);\n this.constant = w;\n\n return this;\n },\n setFromNormalAndCoplanarPoint: function setFromNormalAndCoplanarPoint(normal, point) {\n\n this.normal.copy(normal);\n this.constant = -point.dot(this.normal); // Must be this.normal, not normal, as this.normal is normalized\n\n return this;\n },\n\n\n setFromCoplanarPoints: function () {\n\n var v1 = new _vector2.default();\n var v2 = new _vector2.default();\n\n return function (a, b, c) {\n\n var normal = v1.subVectors(c, b).cross(v2.subVectors(a, b)).normalize();\n\n // Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n\n this.setFromNormalAndCoplanarPoint(normal, a);\n\n return this;\n };\n }(),\n\n copy: function copy(plane) {\n\n this.normal.copy(plane.normal);\n this.constant = plane.constant;\n\n return this;\n },\n normalize: function normalize() {\n\n // Note: will lead to a divide by zero if the plane is invalid.\n\n var inverseNormalLength = 1.0 / this.normal.length();\n\n this.normal.multiplyScalar(inverseNormalLength);\n this.constant *= inverseNormalLength;\n\n return this;\n },\n negate: function negate() {\n\n this.constant *= -1;\n this.normal.negate();\n\n return this;\n },\n distanceToPoint: function distanceToPoint(point) {\n\n return this.normal.dot(point) + this.constant;\n },\n distanceToSphere: function distanceToSphere(sphere) {\n\n return this.distanceToPoint(sphere.center) - sphere.radius;\n },\n projectPoint: function projectPoint(point, optionalTarget) {\n\n return this.orthoPoint(point, optionalTarget).sub(point).negate();\n },\n orthoPoint: function orthoPoint(point, optionalTarget) {\n\n var perpendicularMagnitude = this.distanceToPoint(point);\n\n var result = optionalTarget || new _vector2.default();\n\n return result.copy(this.normal).multiplyScalar(perpendicularMagnitude);\n },\n isIntersectionLine: function isIntersectionLine(line) {\n\n // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n\n var startSign = this.distanceToPoint(line.start);\n var endSign = this.distanceToPoint(line.end);\n\n return startSign < 0 && endSign > 0 || endSign < 0 && startSign > 0;\n },\n\n\n intersectLine: function () {\n\n var v1 = new _vector2.default();\n\n return function (line, optionalTarget) {\n\n var result = optionalTarget || new _vector2.default();\n\n var direction = line.delta(v1);\n\n var denominator = this.normal.dot(direction);\n\n if (denominator === 0) {\n\n // Line is coplanar, return origin\n if (this.distanceToPoint(line.start) === 0) {\n\n return result.copy(line.start);\n }\n\n // Unsure if this is the correct method to handle this case.\n return undefined;\n }\n\n var t = -(line.start.dot(this.normal) + this.constant) / denominator;\n\n if (t < 0 || t > 1) {\n\n return undefined;\n }\n\n return result.copy(direction).multiplyScalar(t).add(line.start);\n };\n }(),\n\n intersectPlane: function intersectPlane(targetPlane) {\n // Returns the intersection line between two planes\n var direction = this.normal.clone().cross(targetPlane.normal);\n var origin = new _vector2.default();\n var intersectionData = {\n origin: origin,\n direction: direction\n };\n\n // If the planes are parallel, return an empty vector for the\n // Intersection line\n if (this.normal.clone().cross(targetPlane.normal).length < 1e-10) {\n intersectionData.direction = new _vector2.default();\n\n return intersectionData;\n }\n\n var h1 = this.constant;\n var h2 = targetPlane.constant;\n var n1dotn2 = this.normal.clone().dot(targetPlane.normal);\n\n var c1 = -(h1 - h2 * n1dotn2) / (1 - n1dotn2 * n1dotn2);\n var c2 = -(h2 - h1 * n1dotn2) / (1 - n1dotn2 * n1dotn2);\n\n intersectionData.origin = this.normal.clone().multiplyScalar(c1).add(targetPlane.normal.clone().multiplyScalar(c2));\n\n return intersectionData;\n },\n coplanarPoint: function coplanarPoint(optionalTarget) {\n\n var result = optionalTarget || new _vector2.default();\n\n return result.copy(this.normal).multiplyScalar(-this.constant);\n },\n translate: function translate(offset) {\n\n this.constant = this.constant - offset.dot(this.normal);\n\n return this;\n },\n equals: function equals(plane) {\n\n return plane.normal.equals(this.normal) && plane.constant === this.constant;\n },\n clone: function clone() {\n\n return new Plane().copy(this);\n }\n};\n\nexports.default = Plane;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction pageToPoint(e) {\n return {\n x: e.pageX,\n y: e.pageY\n };\n}\n\nfunction subtract(lhs, rhs) {\n return {\n x: lhs.x - rhs.x,\n y: lhs.y - rhs.y\n };\n}\n\nfunction copy(point) {\n return {\n x: point.x,\n y: point.y\n };\n}\n\nfunction distance(from, to) {\n return Math.sqrt(distanceSquared(from, to));\n}\n\nfunction distanceSquared(from, to) {\n var delta = subtract(from, to);\n\n return delta.x * delta.x + delta.y * delta.y;\n}\n\nfunction insideRect(point, rect) {\n if (point.x < rect.left || point.x > rect.left + rect.width || point.y < rect.top || point.y > rect.top + rect.height) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Returns the closest source point to a target point\n * given an array of source points.\n *\n * @param sources An Array of source Points\n * @param target The target Point\n * @returns Point The closest point from the points array\n */\nfunction findClosestPoint(sources, target) {\n var distances = [];\n var minDistance = void 0;\n\n sources.forEach(function (source, index) {\n var d = distance(source, target);\n\n distances.push(d);\n\n if (index === 0) {\n minDistance = d;\n } else {\n minDistance = Math.min(d, minDistance);\n }\n });\n\n var index = distances.indexOf(minDistance);\n\n return sources[index];\n}\n\nvar point = {\n subtract: subtract,\n copy: copy,\n pageToPoint: pageToPoint,\n distance: distance,\n distanceSquared: distanceSquared,\n insideRect: insideRect,\n findClosestPoint: findClosestPoint\n};\n\nexports.default = point;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _lineSegment = __webpack_require__(2);\n\nvar _lineSegment2 = _interopRequireDefault(_lineSegment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction rectToLineSegments(rect) {\n var top = {\n start: {\n x: rect.left,\n y: rect.top\n },\n end: {\n x: rect.left + rect.width,\n y: rect.top\n\n }\n };\n var right = {\n start: {\n x: rect.left + rect.width,\n y: rect.top\n },\n end: {\n x: rect.left + rect.width,\n y: rect.top + rect.height\n\n }\n };\n var bottom = {\n start: {\n x: rect.left + rect.width,\n y: rect.top + rect.height\n },\n end: {\n x: rect.left,\n y: rect.top + rect.height\n\n }\n };\n var left = {\n start: {\n x: rect.left,\n y: rect.top + rect.height\n },\n end: {\n x: rect.left,\n y: rect.top\n\n }\n };\n var lineSegments = [top, right, bottom, left];\n\n return lineSegments;\n}\n\nfunction distanceToPoint(rect, point) {\n var minDistance = 655535;\n var lineSegments = rectToLineSegments(rect);\n\n lineSegments.forEach(function (segment) {\n var distance = _lineSegment2.default.distanceToPoint(segment, point);\n\n if (distance < minDistance) {\n minDistance = distance;\n }\n });\n\n return minDistance;\n}\n\n// Returns top-left and bottom-right points of the rectangle\nfunction rectToPoints(rect) {\n var rectPoints = {\n topLeft: {\n x: rect.left,\n y: rect.top\n },\n bottomRight: {\n x: rect.left + rect.width,\n y: rect.top + rect.height\n }\n };\n\n return rectPoints;\n}\n\n// Returns whether two non-rotated rectangles are intersected\nfunction doesIntersect(rect1, rect2) {\n var intersectLeftRight = void 0;\n var intersectTopBottom = void 0;\n\n var rect1Points = rectToPoints(rect1);\n var rect2Points = rectToPoints(rect2);\n\n if (rect1.width >= 0) {\n if (rect2.width >= 0) {\n intersectLeftRight = !(rect1Points.bottomRight.x <= rect2Points.topLeft.x || rect2Points.bottomRight.x <= rect1Points.topLeft.x);\n } else {\n intersectLeftRight = !(rect1Points.bottomRight.x <= rect2Points.bottomRight.x || rect2Points.topLeft.x <= rect1Points.topLeft.x);\n }\n } else if (rect2.width >= 0) {\n intersectLeftRight = !(rect1Points.topLeft.x <= rect2Points.topLeft.x || rect2Points.bottomRight.x <= rect1Points.bottomRight.x);\n } else {\n intersectLeftRight = !(rect1Points.topLeft.x <= rect2Points.bottomRight.x || rect2Points.topLeft.x <= rect1Points.bottomRight.x);\n }\n\n if (rect1.height >= 0) {\n if (rect2.height >= 0) {\n intersectTopBottom = !(rect1Points.bottomRight.y <= rect2Points.topLeft.y || rect2Points.bottomRight.y <= rect1Points.topLeft.y);\n } else {\n intersectTopBottom = !(rect1Points.bottomRight.y <= rect2Points.bottomRight.y || rect2Points.topLeft.y <= rect1Points.topLeft.y);\n }\n } else if (rect2.height >= 0) {\n intersectTopBottom = !(rect1Points.topLeft.y <= rect2Points.topLeft.y || rect2Points.bottomRight.y <= rect1Points.bottomRight.y);\n } else {\n intersectTopBottom = !(rect1Points.topLeft.y <= rect2Points.bottomRight.y || rect2Points.top <= rect1Points.bottomRight.y);\n }\n\n return intersectLeftRight && intersectTopBottom;\n}\n\n// Returns intersection points of two non-rotated rectangles\nfunction getIntersectionRect(rect1, rect2) {\n var intersectRect = {\n topLeft: {},\n bottomRight: {}\n };\n\n if (!doesIntersect(rect1, rect2)) {\n return;\n }\n\n var rect1Points = rectToPoints(rect1);\n var rect2Points = rectToPoints(rect2);\n\n if (rect1.width >= 0) {\n if (rect2.width >= 0) {\n intersectRect.topLeft.x = Math.max(rect1Points.topLeft.x, rect2Points.topLeft.x);\n intersectRect.bottomRight.x = Math.min(rect1Points.bottomRight.x, rect2Points.bottomRight.x);\n } else {\n intersectRect.topLeft.x = Math.max(rect1Points.topLeft.x, rect2Points.bottomRight.x);\n intersectRect.bottomRight.x = Math.min(rect1Points.bottomRight.x, rect2Points.topLeft.x);\n }\n } else if (rect2.width >= 0) {\n intersectRect.topLeft.x = Math.min(rect1Points.topLeft.x, rect2Points.bottomRight.x);\n intersectRect.bottomRight.x = Math.max(rect1Points.bottomRight.x, rect2Points.topLeft.x);\n } else {\n intersectRect.topLeft.x = Math.min(rect1Points.topLeft.x, rect2Points.topLeft.x);\n intersectRect.bottomRight.x = Math.max(rect1Points.bottomRight.x, rect2Points.bottomRight.x);\n }\n\n if (rect1.height >= 0) {\n if (rect2.height >= 0) {\n intersectRect.topLeft.y = Math.max(rect1Points.topLeft.y, rect2Points.topLeft.y);\n intersectRect.bottomRight.y = Math.min(rect1Points.bottomRight.y, rect2Points.bottomRight.y);\n } else {\n intersectRect.topLeft.y = Math.max(rect1Points.topLeft.y, rect2Points.bottomRight.y);\n intersectRect.bottomRight.y = Math.min(rect1Points.bottomRight.y, rect2Points.topLeft.y);\n }\n } else if (rect2.height >= 0) {\n intersectRect.topLeft.y = Math.min(rect1Points.topLeft.y, rect2Points.bottomRight.y);\n intersectRect.bottomRight.y = Math.max(rect1Points.bottomRight.y, rect2Points.topLeft.y);\n } else {\n intersectRect.topLeft.y = Math.min(rect1Points.topLeft.y, rect2Points.topLeft.y);\n intersectRect.bottomRight.y = Math.max(rect1Points.bottomRight.y, rect2Points.bottomRight.y);\n }\n\n // Returns top-left and bottom-right points of intersected rectangle\n return intersectRect;\n}\n\nvar rect = {\n distanceToPoint: distanceToPoint,\n getIntersectionRect: getIntersectionRect\n};\n\nexports.default = rect;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Line = __webpack_require__(4);\n\nObject.defineProperty(exports, 'Line3', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Line).default;\n }\n});\n\nvar _lineSegment = __webpack_require__(2);\n\nObject.defineProperty(exports, 'lineSegment', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_lineSegment).default;\n }\n});\n\nvar _math = __webpack_require__(0);\n\nObject.defineProperty(exports, 'clamp', {\n enumerable: true,\n get: function get() {\n return _math.clamp;\n }\n});\nObject.defineProperty(exports, 'degToRad', {\n enumerable: true,\n get: function get() {\n return _math.degToRad;\n }\n});\nObject.defineProperty(exports, 'radToDeg', {\n enumerable: true,\n get: function get() {\n return _math.radToDeg;\n }\n});\nObject.defineProperty(exports, 'sign', {\n enumerable: true,\n get: function get() {\n return _math.sign;\n }\n});\n\nvar _matrix = __webpack_require__(5);\n\nObject.defineProperty(exports, 'Matrix4', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_matrix).default;\n }\n});\n\nvar _plane = __webpack_require__(6);\n\nObject.defineProperty(exports, 'Plane', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_plane).default;\n }\n});\n\nvar _point = __webpack_require__(7);\n\nObject.defineProperty(exports, 'point', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_point).default;\n }\n});\n\nvar _quaternion = __webpack_require__(3);\n\nObject.defineProperty(exports, 'quaternion', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_quaternion).default;\n }\n});\n\nvar _rect = __webpack_require__(8);\n\nObject.defineProperty(exports, 'rect', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_rect).default;\n }\n});\n\nvar _vector = __webpack_require__(1);\n\nObject.defineProperty(exports, 'Vector3', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_vector).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=cornerstoneMath.js.map","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LayoutGridSelector.vue?vue&type=style&index=0&id=77ea46e2&prod&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerAnnotationDialog.vue?vue&type=style&index=0&id=7d21e374&prod&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerNavigation.vue?vue&type=style&index=0&id=11c5467c&prod&lang=scss&scoped=true\"","/**\n * Intro.js v2.9.3\n * https://github.com/usablica/intro.js\n *\n * Copyright (C) 2017 Afshin Mehrabani (@afshinmeh)\n */\n\n(function(f) {\n if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n module.exports = f();\n // deprecated function\n // @since 2.8.0\n module.exports.introJs = function () {\n console.warn('Deprecated: please use require(\"intro.js\") directly, instead of the introJs method of the function');\n // introJs()\n return f().apply(this, arguments);\n };\n } else if (typeof define === \"function\" && define.amd) {\n define([], f);\n } else {\n var g;\n if (typeof window !== \"undefined\") {\n g = window;\n } else if (typeof global !== \"undefined\") {\n g = global;\n } else if (typeof self !== \"undefined\") {\n g = self;\n } else {\n g = this;\n }\n g.introJs = f();\n }\n})(function () {\n //Default config/variables\n var VERSION = '2.9.3';\n\n /**\n * IntroJs main class\n *\n * @class IntroJs\n */\n function IntroJs(obj) {\n this._targetElement = obj;\n this._introItems = [];\n\n this._options = {\n /* Next button label in tooltip box */\n nextLabel: 'Next →',\n /* Previous button label in tooltip box */\n prevLabel: '← Back',\n /* Skip button label in tooltip box */\n skipLabel: 'Skip',\n /* Done button label in tooltip box */\n doneLabel: 'Done',\n /* Hide previous button in the first step? Otherwise, it will be disabled button. */\n hidePrev: false,\n /* Hide next button in the last step? Otherwise, it will be disabled button. */\n hideNext: false,\n /* Default tooltip box position */\n tooltipPosition: 'bottom',\n /* Next CSS class for tooltip boxes */\n tooltipClass: '',\n /* CSS class that is added to the helperLayer */\n highlightClass: '',\n /* Close introduction when pressing Escape button? */\n exitOnEsc: true,\n /* Close introduction when clicking on overlay layer? */\n exitOnOverlayClick: true,\n /* Show step numbers in introduction? */\n showStepNumbers: true,\n /* Let user use keyboard to navigate the tour? */\n keyboardNavigation: true,\n /* Show tour control buttons? */\n showButtons: true,\n /* Show tour bullets? */\n showBullets: true,\n /* Show tour progress? */\n showProgress: false,\n /* Scroll to highlighted element? */\n scrollToElement: true,\n /*\n * Should we scroll the tooltip or target element?\n *\n * Options are: 'element' or 'tooltip'\n */\n scrollTo: 'element',\n /* Padding to add after scrolling when element is not in the viewport (in pixels) */\n scrollPadding: 30,\n /* Set the overlay opacity */\n overlayOpacity: 0.8,\n /* Precedence of positions, when auto is enabled */\n positionPrecedence: [\"bottom\", \"top\", \"right\", \"left\"],\n /* Disable an interaction with element? */\n disableInteraction: false,\n /* Set how much padding to be used around helper element */\n helperElementPadding: 10,\n /* Default hint position */\n hintPosition: 'top-middle',\n /* Hint button label */\n hintButtonLabel: 'Got it',\n /* Adding animation to hints? */\n hintAnimation: true,\n /* additional classes to put on the buttons */\n buttonClass: \"introjs-button\"\n };\n }\n\n /**\n * Initiate a new introduction/guide from an element in the page\n *\n * @api private\n * @method _introForElement\n * @param {Object} targetElm\n * @param {String} group\n * @returns {Boolean} Success or not?\n */\n function _introForElement(targetElm, group) {\n var allIntroSteps = targetElm.querySelectorAll(\"*[data-intro]\"),\n introItems = [];\n\n if (this._options.steps) {\n //use steps passed programmatically\n _forEach(this._options.steps, function (step) {\n var currentItem = _cloneObject(step);\n\n //set the step\n currentItem.step = introItems.length + 1;\n\n //use querySelector function only when developer used CSS selector\n if (typeof (currentItem.element) === 'string') {\n //grab the element with given selector from the page\n currentItem.element = document.querySelector(currentItem.element);\n }\n\n //intro without element\n if (typeof (currentItem.element) === 'undefined' || currentItem.element === null) {\n var floatingElementQuery = document.querySelector(\".introjsFloatingElement\");\n\n if (floatingElementQuery === null) {\n floatingElementQuery = document.createElement('div');\n floatingElementQuery.className = 'introjsFloatingElement';\n\n document.body.appendChild(floatingElementQuery);\n }\n\n currentItem.element = floatingElementQuery;\n currentItem.position = 'floating';\n }\n\n currentItem.scrollTo = currentItem.scrollTo || this._options.scrollTo;\n\n if (typeof (currentItem.disableInteraction) === 'undefined') {\n currentItem.disableInteraction = this._options.disableInteraction;\n }\n\n if (currentItem.element !== null) {\n introItems.push(currentItem);\n } \n }.bind(this));\n\n } else {\n //use steps from data-* annotations\n var elmsLength = allIntroSteps.length;\n var disableInteraction;\n \n //if there's no element to intro\n if (elmsLength < 1) {\n return false;\n }\n\n _forEach(allIntroSteps, function (currentElement) {\n \n // PR #80\n // start intro for groups of elements\n if (group && (currentElement.getAttribute(\"data-intro-group\") !== group)) {\n return;\n }\n\n // skip hidden elements\n if (currentElement.style.display === 'none') {\n return;\n }\n\n var step = parseInt(currentElement.getAttribute('data-step'), 10);\n\n if (typeof (currentElement.getAttribute('data-disable-interaction')) !== 'undefined') {\n disableInteraction = !!currentElement.getAttribute('data-disable-interaction');\n } else {\n disableInteraction = this._options.disableInteraction;\n }\n\n if (step > 0) {\n introItems[step - 1] = {\n element: currentElement,\n intro: currentElement.getAttribute('data-intro'),\n step: parseInt(currentElement.getAttribute('data-step'), 10),\n tooltipClass: currentElement.getAttribute('data-tooltipclass'),\n highlightClass: currentElement.getAttribute('data-highlightclass'),\n position: currentElement.getAttribute('data-position') || this._options.tooltipPosition,\n scrollTo: currentElement.getAttribute('data-scrollto') || this._options.scrollTo,\n disableInteraction: disableInteraction\n };\n }\n }.bind(this));\n\n //next add intro items without data-step\n //todo: we need a cleanup here, two loops are redundant\n var nextStep = 0;\n\n _forEach(allIntroSteps, function (currentElement) {\n \n // PR #80\n // start intro for groups of elements\n if (group && (currentElement.getAttribute(\"data-intro-group\") !== group)) {\n return;\n }\n \n if (currentElement.getAttribute('data-step') === null) {\n\n while (true) {\n if (typeof introItems[nextStep] === 'undefined') {\n break;\n } else {\n nextStep++;\n }\n } \n\n if (typeof (currentElement.getAttribute('data-disable-interaction')) !== 'undefined') {\n disableInteraction = !!currentElement.getAttribute('data-disable-interaction');\n } else {\n disableInteraction = this._options.disableInteraction;\n }\n\n introItems[nextStep] = {\n element: currentElement,\n intro: currentElement.getAttribute('data-intro'),\n step: nextStep + 1,\n tooltipClass: currentElement.getAttribute('data-tooltipclass'),\n highlightClass: currentElement.getAttribute('data-highlightclass'),\n position: currentElement.getAttribute('data-position') || this._options.tooltipPosition,\n scrollTo: currentElement.getAttribute('data-scrollto') || this._options.scrollTo,\n disableInteraction: disableInteraction\n };\n }\n }.bind(this));\n }\n\n //removing undefined/null elements\n var tempIntroItems = [];\n for (var z = 0; z < introItems.length; z++) {\n if (introItems[z]) {\n // copy non-falsy values to the end of the array\n tempIntroItems.push(introItems[z]); \n } \n }\n\n introItems = tempIntroItems;\n\n //Ok, sort all items with given steps\n introItems.sort(function (a, b) {\n return a.step - b.step;\n });\n\n //set it to the introJs object\n this._introItems = introItems;\n\n //add overlay layer to the page\n if(_addOverlayLayer.call(this, targetElm)) {\n //then, start the show\n _nextStep.call(this);\n\n if (this._options.keyboardNavigation) {\n DOMEvent.on(window, 'keydown', _onKeyDown, this, true);\n }\n //for window resize\n DOMEvent.on(window, 'resize', _onResize, this, true);\n }\n return false;\n }\n\n function _onResize () {\n this.refresh.call(this);\n }\n\n /**\n * on keyCode:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\n * This feature has been removed from the Web standards.\n * Though some browsers may still support it, it is in\n * the process of being dropped.\n * Instead, you should use KeyboardEvent.code,\n * if it's implemented.\n *\n * jQuery's approach is to test for\n * (1) e.which, then\n * (2) e.charCode, then\n * (3) e.keyCode\n * https://github.com/jquery/jquery/blob/a6b0705294d336ae2f63f7276de0da1195495363/src/event.js#L638\n *\n * @param type var\n * @return type\n */\n function _onKeyDown (e) {\n var code = (e.code === null) ? e.which : e.code;\n\n // if code/e.which is null\n if (code === null) {\n code = (e.charCode === null) ? e.keyCode : e.charCode;\n }\n \n if ((code === 'Escape' || code === 27) && this._options.exitOnEsc === true) {\n //escape key pressed, exit the intro\n //check if exit callback is defined\n _exitIntro.call(this, this._targetElement);\n } else if (code === 'ArrowLeft' || code === 37) {\n //left arrow\n _previousStep.call(this);\n } else if (code === 'ArrowRight' || code === 39) {\n //right arrow\n _nextStep.call(this);\n } else if (code === 'Enter' || code === 13) {\n //srcElement === ie\n var target = e.target || e.srcElement;\n if (target && target.className.match('introjs-prevbutton')) {\n //user hit enter while focusing on previous button\n _previousStep.call(this);\n } else if (target && target.className.match('introjs-skipbutton')) {\n //user hit enter while focusing on skip button\n if (this._introItems.length - 1 === this._currentStep && typeof (this._introCompleteCallback) === 'function') {\n this._introCompleteCallback.call(this);\n }\n\n _exitIntro.call(this, this._targetElement);\n } else if (target && target.getAttribute('data-stepnumber')) {\n // user hit enter while focusing on step bullet\n target.click();\n } else {\n //default behavior for responding to enter\n _nextStep.call(this);\n }\n\n //prevent default behaviour on hitting Enter, to prevent steps being skipped in some browsers\n if(e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n }\n }\n }\n\n /*\n * makes a copy of the object\n * @api private\n * @method _cloneObject\n */\n function _cloneObject(object) {\n if (object === null || typeof (object) !== 'object' || typeof (object.nodeType) !== 'undefined') {\n return object;\n }\n var temp = {};\n for (var key in object) {\n if (typeof(window.jQuery) !== 'undefined' && object[key] instanceof window.jQuery) {\n temp[key] = object[key];\n } else {\n temp[key] = _cloneObject(object[key]);\n }\n }\n return temp;\n }\n /**\n * Go to specific step of introduction\n *\n * @api private\n * @method _goToStep\n */\n function _goToStep(step) {\n //because steps starts with zero\n this._currentStep = step - 2;\n if (typeof (this._introItems) !== 'undefined') {\n _nextStep.call(this);\n }\n }\n\n /**\n * Go to the specific step of introduction with the explicit [data-step] number\n *\n * @api private\n * @method _goToStepNumber\n */\n function _goToStepNumber(step) {\n this._currentStepNumber = step;\n if (typeof (this._introItems) !== 'undefined') {\n _nextStep.call(this);\n }\n }\n\n /**\n * Go to next step on intro\n *\n * @api private\n * @method _nextStep\n */\n function _nextStep() {\n this._direction = 'forward';\n\n if (typeof (this._currentStepNumber) !== 'undefined') {\n _forEach(this._introItems, function (item, i) {\n if( item.step === this._currentStepNumber ) {\n this._currentStep = i - 1;\n this._currentStepNumber = undefined;\n }\n }.bind(this));\n }\n\n if (typeof (this._currentStep) === 'undefined') {\n this._currentStep = 0;\n } else {\n ++this._currentStep;\n }\n\n var nextStep = this._introItems[this._currentStep];\n var continueStep = true;\n\n if (typeof (this._introBeforeChangeCallback) !== 'undefined') {\n continueStep = this._introBeforeChangeCallback.call(this, nextStep.element);\n }\n\n // if `onbeforechange` returned `false`, stop displaying the element\n if (continueStep === false) {\n --this._currentStep;\n return false;\n }\n\n if ((this._introItems.length) <= this._currentStep) {\n //end of the intro\n //check if any callback is defined\n if (typeof (this._introCompleteCallback) === 'function') {\n this._introCompleteCallback.call(this);\n }\n _exitIntro.call(this, this._targetElement);\n return;\n }\n\n _showElement.call(this, nextStep);\n }\n\n /**\n * Go to previous step on intro\n *\n * @api private\n * @method _previousStep\n */\n function _previousStep() {\n this._direction = 'backward';\n\n if (this._currentStep === 0) {\n return false;\n }\n\n --this._currentStep;\n\n var nextStep = this._introItems[this._currentStep];\n var continueStep = true;\n\n if (typeof (this._introBeforeChangeCallback) !== 'undefined') {\n continueStep = this._introBeforeChangeCallback.call(this, nextStep.element);\n }\n\n // if `onbeforechange` returned `false`, stop displaying the element\n if (continueStep === false) {\n ++this._currentStep;\n return false;\n }\n\n _showElement.call(this, nextStep);\n }\n\n /**\n * Update placement of the intro objects on the screen\n * @api private\n */\n function _refresh() {\n // re-align intros\n _setHelperLayerPosition.call(this, document.querySelector('.introjs-helperLayer'));\n _setHelperLayerPosition.call(this, document.querySelector('.introjs-tooltipReferenceLayer'));\n _setHelperLayerPosition.call(this, document.querySelector('.introjs-disableInteraction'));\n\n // re-align tooltip\n if(this._currentStep !== undefined && this._currentStep !== null) {\n var oldHelperNumberLayer = document.querySelector('.introjs-helperNumberLayer'),\n oldArrowLayer = document.querySelector('.introjs-arrow'),\n oldtooltipContainer = document.querySelector('.introjs-tooltip');\n _placeTooltip.call(this, this._introItems[this._currentStep].element, oldtooltipContainer, oldArrowLayer, oldHelperNumberLayer);\n }\n\n //re-align hints\n _reAlignHints.call(this);\n return this;\n }\n\n /**\n * Exit from intro\n *\n * @api private\n * @method _exitIntro\n * @param {Object} targetElement\n * @param {Boolean} force - Setting to `true` will skip the result of beforeExit callback\n */\n function _exitIntro(targetElement, force) {\n var continueExit = true;\n\n // calling onbeforeexit callback\n //\n // If this callback return `false`, it would halt the process\n if (this._introBeforeExitCallback !== undefined) {\n continueExit = this._introBeforeExitCallback.call(this);\n }\n\n // skip this check if `force` parameter is `true`\n // otherwise, if `onbeforeexit` returned `false`, don't exit the intro\n if (!force && continueExit === false) return;\n\n //remove overlay layers from the page\n var overlayLayers = targetElement.querySelectorAll('.introjs-overlay');\n\n if (overlayLayers && overlayLayers.length) {\n _forEach(overlayLayers, function (overlayLayer) {\n overlayLayer.style.opacity = 0;\n window.setTimeout(function () {\n if (this.parentNode) {\n this.parentNode.removeChild(this);\n }\n }.bind(overlayLayer), 500);\n }.bind(this));\n }\n\n //remove all helper layers\n var helperLayer = targetElement.querySelector('.introjs-helperLayer');\n if (helperLayer) {\n helperLayer.parentNode.removeChild(helperLayer);\n }\n\n var referenceLayer = targetElement.querySelector('.introjs-tooltipReferenceLayer');\n if (referenceLayer) {\n referenceLayer.parentNode.removeChild(referenceLayer);\n }\n\n //remove disableInteractionLayer\n var disableInteractionLayer = targetElement.querySelector('.introjs-disableInteraction');\n if (disableInteractionLayer) {\n disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);\n }\n\n //remove intro floating element\n var floatingElement = document.querySelector('.introjsFloatingElement');\n if (floatingElement) {\n floatingElement.parentNode.removeChild(floatingElement);\n }\n\n _removeShowElement();\n\n //remove `introjs-fixParent` class from the elements\n var fixParents = document.querySelectorAll('.introjs-fixParent');\n _forEach(fixParents, function (parent) {\n _removeClass(parent, /introjs-fixParent/g);\n });\n\n //clean listeners\n DOMEvent.off(window, 'keydown', _onKeyDown, this, true);\n DOMEvent.off(window, 'resize', _onResize, this, true);\n\n //check if any callback is defined\n if (this._introExitCallback !== undefined) {\n this._introExitCallback.call(this);\n }\n\n //set the step to zero\n this._currentStep = undefined;\n }\n\n /**\n * Render tooltip box in the page\n *\n * @api private\n * @method _placeTooltip\n * @param {HTMLElement} targetElement\n * @param {HTMLElement} tooltipLayer\n * @param {HTMLElement} arrowLayer\n * @param {HTMLElement} helperNumberLayer\n * @param {Boolean} hintMode\n */\n function _placeTooltip(targetElement, tooltipLayer, arrowLayer, helperNumberLayer, hintMode) {\n var tooltipCssClass = '',\n currentStepObj,\n tooltipOffset,\n targetOffset,\n windowSize,\n currentTooltipPosition;\n\n hintMode = hintMode || false;\n\n //reset the old style\n tooltipLayer.style.top = null;\n tooltipLayer.style.right = null;\n tooltipLayer.style.bottom = null;\n tooltipLayer.style.left = null;\n tooltipLayer.style.marginLeft = null;\n tooltipLayer.style.marginTop = null;\n\n arrowLayer.style.display = 'inherit';\n\n if (typeof(helperNumberLayer) !== 'undefined' && helperNumberLayer !== null) {\n helperNumberLayer.style.top = null;\n helperNumberLayer.style.left = null;\n }\n\n //prevent error when `this._currentStep` is undefined\n if (!this._introItems[this._currentStep]) return;\n\n //if we have a custom css class for each step\n currentStepObj = this._introItems[this._currentStep];\n if (typeof (currentStepObj.tooltipClass) === 'string') {\n tooltipCssClass = currentStepObj.tooltipClass;\n } else {\n tooltipCssClass = this._options.tooltipClass;\n }\n\n tooltipLayer.className = ('introjs-tooltip ' + tooltipCssClass).replace(/^\\s+|\\s+$/g, '');\n tooltipLayer.setAttribute('role', 'dialog');\n\n currentTooltipPosition = this._introItems[this._currentStep].position;\n\n // Floating is always valid, no point in calculating\n if (currentTooltipPosition !== \"floating\") { \n currentTooltipPosition = _determineAutoPosition.call(this, targetElement, tooltipLayer, currentTooltipPosition);\n }\n\n var tooltipLayerStyleLeft;\n targetOffset = _getOffset(targetElement);\n tooltipOffset = _getOffset(tooltipLayer);\n windowSize = _getWinSize();\n\n _addClass(tooltipLayer, 'introjs-' + currentTooltipPosition);\n\n switch (currentTooltipPosition) {\n case 'top-right-aligned':\n arrowLayer.className = 'introjs-arrow bottom-right';\n\n var tooltipLayerStyleRight = 0;\n _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer);\n tooltipLayer.style.bottom = (targetOffset.height + 20) + 'px';\n break;\n\n case 'top-middle-aligned':\n arrowLayer.className = 'introjs-arrow bottom-middle';\n\n var tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2;\n\n // a fix for middle aligned hints\n if (hintMode) {\n tooltipLayerStyleLeftRight += 5;\n }\n\n if (_checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) {\n tooltipLayer.style.right = null;\n _checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer);\n }\n tooltipLayer.style.bottom = (targetOffset.height + 20) + 'px';\n break;\n\n case 'top-left-aligned':\n // top-left-aligned is the same as the default top\n case 'top':\n arrowLayer.className = 'introjs-arrow bottom';\n\n tooltipLayerStyleLeft = (hintMode) ? 0 : 15;\n\n _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);\n tooltipLayer.style.bottom = (targetOffset.height + 20) + 'px';\n break;\n case 'right':\n tooltipLayer.style.left = (targetOffset.width + 20) + 'px';\n if (targetOffset.top + tooltipOffset.height > windowSize.height) {\n // In this case, right would have fallen below the bottom of the screen.\n // Modify so that the bottom of the tooltip connects with the target\n arrowLayer.className = \"introjs-arrow left-bottom\";\n tooltipLayer.style.top = \"-\" + (tooltipOffset.height - targetOffset.height - 20) + \"px\";\n } else {\n arrowLayer.className = 'introjs-arrow left';\n }\n break;\n case 'left':\n if (!hintMode && this._options.showStepNumbers === true) {\n tooltipLayer.style.top = '15px';\n }\n\n if (targetOffset.top + tooltipOffset.height > windowSize.height) {\n // In this case, left would have fallen below the bottom of the screen.\n // Modify so that the bottom of the tooltip connects with the target\n tooltipLayer.style.top = \"-\" + (tooltipOffset.height - targetOffset.height - 20) + \"px\";\n arrowLayer.className = 'introjs-arrow right-bottom';\n } else {\n arrowLayer.className = 'introjs-arrow right';\n }\n tooltipLayer.style.right = (targetOffset.width + 20) + 'px';\n\n break;\n case 'floating':\n arrowLayer.style.display = 'none';\n\n //we have to adjust the top and left of layer manually for intro items without element\n tooltipLayer.style.left = '50%';\n tooltipLayer.style.top = '50%';\n tooltipLayer.style.marginLeft = '-' + (tooltipOffset.width / 2) + 'px';\n tooltipLayer.style.marginTop = '-' + (tooltipOffset.height / 2) + 'px';\n\n if (typeof(helperNumberLayer) !== 'undefined' && helperNumberLayer !== null) {\n helperNumberLayer.style.left = '-' + ((tooltipOffset.width / 2) + 18) + 'px';\n helperNumberLayer.style.top = '-' + ((tooltipOffset.height / 2) + 18) + 'px';\n }\n\n break;\n case 'bottom-right-aligned':\n arrowLayer.className = 'introjs-arrow top-right';\n\n tooltipLayerStyleRight = 0;\n _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer);\n tooltipLayer.style.top = (targetOffset.height + 20) + 'px';\n break;\n\n case 'bottom-middle-aligned':\n arrowLayer.className = 'introjs-arrow top-middle';\n\n tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2;\n\n // a fix for middle aligned hints\n if (hintMode) {\n tooltipLayerStyleLeftRight += 5;\n }\n\n if (_checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) {\n tooltipLayer.style.right = null;\n _checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer);\n }\n tooltipLayer.style.top = (targetOffset.height + 20) + 'px';\n break;\n\n // case 'bottom-left-aligned':\n // Bottom-left-aligned is the same as the default bottom\n // case 'bottom':\n // Bottom going to follow the default behavior\n default:\n arrowLayer.className = 'introjs-arrow top';\n\n tooltipLayerStyleLeft = 0;\n _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);\n tooltipLayer.style.top = (targetOffset.height + 20) + 'px';\n }\n }\n\n /**\n * Set tooltip left so it doesn't go off the right side of the window\n *\n * @return boolean true, if tooltipLayerStyleLeft is ok. false, otherwise.\n */\n function _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer) {\n if (targetOffset.left + tooltipLayerStyleLeft + tooltipOffset.width > windowSize.width) {\n // off the right side of the window\n tooltipLayer.style.left = (windowSize.width - tooltipOffset.width - targetOffset.left) + 'px';\n return false;\n }\n tooltipLayer.style.left = tooltipLayerStyleLeft + 'px';\n return true;\n }\n\n /**\n * Set tooltip right so it doesn't go off the left side of the window\n *\n * @return boolean true, if tooltipLayerStyleRight is ok. false, otherwise.\n */\n function _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer) {\n if (targetOffset.left + targetOffset.width - tooltipLayerStyleRight - tooltipOffset.width < 0) {\n // off the left side of the window\n tooltipLayer.style.left = (-targetOffset.left) + 'px';\n return false;\n }\n tooltipLayer.style.right = tooltipLayerStyleRight + 'px';\n return true;\n }\n\n /**\n * Determines the position of the tooltip based on the position precedence and availability\n * of screen space.\n *\n * @param {Object} targetElement\n * @param {Object} tooltipLayer\n * @param {String} desiredTooltipPosition\n * @return {String} calculatedPosition\n */\n function _determineAutoPosition(targetElement, tooltipLayer, desiredTooltipPosition) {\n\n // Take a clone of position precedence. These will be the available\n var possiblePositions = this._options.positionPrecedence.slice();\n\n var windowSize = _getWinSize();\n var tooltipHeight = _getOffset(tooltipLayer).height + 10;\n var tooltipWidth = _getOffset(tooltipLayer).width + 20;\n var targetElementRect = targetElement.getBoundingClientRect();\n\n // If we check all the possible areas, and there are no valid places for the tooltip, the element\n // must take up most of the screen real estate. Show the tooltip floating in the middle of the screen.\n var calculatedPosition = \"floating\";\n\n /*\n * auto determine position \n */\n\n // Check for space below\n if (targetElementRect.bottom + tooltipHeight + tooltipHeight > windowSize.height) {\n _removeEntry(possiblePositions, \"bottom\");\n }\n\n // Check for space above\n if (targetElementRect.top - tooltipHeight < 0) {\n _removeEntry(possiblePositions, \"top\");\n }\n\n // Check for space to the right\n if (targetElementRect.right + tooltipWidth > windowSize.width) {\n _removeEntry(possiblePositions, \"right\");\n }\n\n // Check for space to the left\n if (targetElementRect.left - tooltipWidth < 0) {\n _removeEntry(possiblePositions, \"left\");\n }\n\n // @var {String} ex: 'right-aligned'\n var desiredAlignment = (function (pos) {\n var hyphenIndex = pos.indexOf('-');\n if (hyphenIndex !== -1) {\n // has alignment\n return pos.substr(hyphenIndex);\n }\n return '';\n })(desiredTooltipPosition || '');\n\n // strip alignment from position\n if (desiredTooltipPosition) {\n // ex: \"bottom-right-aligned\"\n // should return 'bottom'\n desiredTooltipPosition = desiredTooltipPosition.split('-')[0];\n }\n\n if (possiblePositions.length) {\n if (desiredTooltipPosition !== \"auto\" &&\n possiblePositions.indexOf(desiredTooltipPosition) > -1) {\n // If the requested position is in the list, choose that\n calculatedPosition = desiredTooltipPosition;\n } else {\n // Pick the first valid position, in order\n calculatedPosition = possiblePositions[0];\n }\n }\n\n // only top and bottom positions have optional alignments\n if (['top', 'bottom'].indexOf(calculatedPosition) !== -1) {\n calculatedPosition += _determineAutoAlignment(targetElementRect.left, tooltipWidth, windowSize, desiredAlignment);\n }\n\n return calculatedPosition;\n }\n\n /**\n * auto-determine alignment\n * @param {Integer} offsetLeft\n * @param {Integer} tooltipWidth\n * @param {Object} windowSize\n * @param {String} desiredAlignment\n * @return {String} calculatedAlignment\n */\n function _determineAutoAlignment (offsetLeft, tooltipWidth, windowSize, desiredAlignment) {\n var halfTooltipWidth = tooltipWidth / 2,\n winWidth = Math.min(windowSize.width, window.screen.width),\n possibleAlignments = ['-left-aligned', '-middle-aligned', '-right-aligned'],\n calculatedAlignment = '';\n \n // valid left must be at least a tooltipWidth\n // away from right side\n if (winWidth - offsetLeft < tooltipWidth) {\n _removeEntry(possibleAlignments, '-left-aligned');\n }\n\n // valid middle must be at least half \n // width away from both sides\n if (offsetLeft < halfTooltipWidth || \n winWidth - offsetLeft < halfTooltipWidth) {\n _removeEntry(possibleAlignments, '-middle-aligned');\n }\n\n // valid right must be at least a tooltipWidth\n // width away from left side\n if (offsetLeft < tooltipWidth) {\n _removeEntry(possibleAlignments, '-right-aligned');\n }\n\n if (possibleAlignments.length) {\n if (possibleAlignments.indexOf(desiredAlignment) !== -1) {\n // the desired alignment is valid\n calculatedAlignment = desiredAlignment;\n } else {\n // pick the first valid position, in order\n calculatedAlignment = possibleAlignments[0];\n }\n } else {\n // if screen width is too small \n // for ANY alignment, middle is \n // probably the best for visibility\n calculatedAlignment = '-middle-aligned';\n }\n\n return calculatedAlignment;\n }\n\n /**\n * Remove an entry from a string array if it's there, does nothing if it isn't there.\n *\n * @param {Array} stringArray\n * @param {String} stringToRemove\n */\n function _removeEntry(stringArray, stringToRemove) {\n if (stringArray.indexOf(stringToRemove) > -1) {\n stringArray.splice(stringArray.indexOf(stringToRemove), 1);\n }\n }\n\n /**\n * Update the position of the helper layer on the screen\n *\n * @api private\n * @method _setHelperLayerPosition\n * @param {Object} helperLayer\n */\n function _setHelperLayerPosition(helperLayer) {\n if (helperLayer) {\n //prevent error when `this._currentStep` in undefined\n if (!this._introItems[this._currentStep]) return;\n\n var currentElement = this._introItems[this._currentStep],\n elementPosition = _getOffset(currentElement.element),\n widthHeightPadding = this._options.helperElementPadding;\n\n // If the target element is fixed, the tooltip should be fixed as well.\n // Otherwise, remove a fixed class that may be left over from the previous\n // step.\n if (_isFixed(currentElement.element)) {\n _addClass(helperLayer, 'introjs-fixedTooltip');\n } else {\n _removeClass(helperLayer, 'introjs-fixedTooltip');\n }\n\n if (currentElement.position === 'floating') {\n widthHeightPadding = 0;\n }\n\n //set new position to helper layer\n helperLayer.style.cssText = 'width: ' + (elementPosition.width + widthHeightPadding) + 'px; ' +\n 'height:' + (elementPosition.height + widthHeightPadding) + 'px; ' +\n 'top:' + (elementPosition.top - widthHeightPadding / 2) + 'px;' +\n 'left: ' + (elementPosition.left - widthHeightPadding / 2) + 'px;';\n\n }\n }\n\n /**\n * Add disableinteraction layer and adjust the size and position of the layer\n *\n * @api private\n * @method _disableInteraction\n */\n function _disableInteraction() {\n var disableInteractionLayer = document.querySelector('.introjs-disableInteraction');\n\n if (disableInteractionLayer === null) {\n disableInteractionLayer = document.createElement('div');\n disableInteractionLayer.className = 'introjs-disableInteraction';\n this._targetElement.appendChild(disableInteractionLayer);\n }\n\n _setHelperLayerPosition.call(this, disableInteractionLayer);\n }\n\n /**\n * Setting anchors to behave like buttons\n *\n * @api private\n * @method _setAnchorAsButton\n */\n function _setAnchorAsButton(anchor){\n anchor.setAttribute('role', 'button');\n anchor.tabIndex = 0;\n }\n\n /**\n * Show an element on the page\n *\n * @api private\n * @method _showElement\n * @param {Object} targetElement\n */\n function _showElement(targetElement) {\n if (typeof (this._introChangeCallback) !== 'undefined') {\n this._introChangeCallback.call(this, targetElement.element);\n }\n\n var self = this,\n oldHelperLayer = document.querySelector('.introjs-helperLayer'),\n oldReferenceLayer = document.querySelector('.introjs-tooltipReferenceLayer'),\n highlightClass = 'introjs-helperLayer',\n nextTooltipButton,\n prevTooltipButton,\n skipTooltipButton,\n scrollParent;\n\n //check for a current step highlight class\n if (typeof (targetElement.highlightClass) === 'string') {\n highlightClass += (' ' + targetElement.highlightClass);\n }\n //check for options highlight class\n if (typeof (this._options.highlightClass) === 'string') {\n highlightClass += (' ' + this._options.highlightClass);\n }\n\n if (oldHelperLayer !== null) {\n var oldHelperNumberLayer = oldReferenceLayer.querySelector('.introjs-helperNumberLayer'),\n oldtooltipLayer = oldReferenceLayer.querySelector('.introjs-tooltiptext'),\n oldArrowLayer = oldReferenceLayer.querySelector('.introjs-arrow'),\n oldtooltipContainer = oldReferenceLayer.querySelector('.introjs-tooltip');\n \n skipTooltipButton = oldReferenceLayer.querySelector('.introjs-skipbutton');\n prevTooltipButton = oldReferenceLayer.querySelector('.introjs-prevbutton');\n nextTooltipButton = oldReferenceLayer.querySelector('.introjs-nextbutton');\n\n //update or reset the helper highlight class\n oldHelperLayer.className = highlightClass;\n //hide the tooltip\n oldtooltipContainer.style.opacity = 0;\n oldtooltipContainer.style.display = \"none\";\n\n if (oldHelperNumberLayer !== null) {\n var lastIntroItem = this._introItems[(targetElement.step - 2 >= 0 ? targetElement.step - 2 : 0)];\n\n if (lastIntroItem !== null && (this._direction === 'forward' && lastIntroItem.position === 'floating') || (this._direction === 'backward' && targetElement.position === 'floating')) {\n oldHelperNumberLayer.style.opacity = 0;\n }\n }\n\n // scroll to element\n scrollParent = _getScrollParent( targetElement.element );\n\n if (scrollParent !== document.body) {\n // target is within a scrollable element\n _scrollParentToElement(scrollParent, targetElement.element);\n }\n\n // set new position to helper layer\n _setHelperLayerPosition.call(self, oldHelperLayer);\n _setHelperLayerPosition.call(self, oldReferenceLayer);\n\n //remove `introjs-fixParent` class from the elements\n var fixParents = document.querySelectorAll('.introjs-fixParent');\n _forEach(fixParents, function (parent) {\n _removeClass(parent, /introjs-fixParent/g);\n });\n \n //remove old classes if the element still exist\n _removeShowElement();\n\n //we should wait until the CSS3 transition is competed (it's 0.3 sec) to prevent incorrect `height` and `width` calculation\n if (self._lastShowElementTimer) {\n window.clearTimeout(self._lastShowElementTimer);\n }\n\n self._lastShowElementTimer = window.setTimeout(function() {\n //set current step to the label\n if (oldHelperNumberLayer !== null) {\n oldHelperNumberLayer.innerHTML = targetElement.step;\n }\n //set current tooltip text\n oldtooltipLayer.innerHTML = targetElement.intro;\n //set the tooltip position\n oldtooltipContainer.style.display = \"block\";\n _placeTooltip.call(self, targetElement.element, oldtooltipContainer, oldArrowLayer, oldHelperNumberLayer);\n\n //change active bullet\n if (self._options.showBullets) {\n oldReferenceLayer.querySelector('.introjs-bullets li > a.active').className = '';\n oldReferenceLayer.querySelector('.introjs-bullets li > a[data-stepnumber=\"' + targetElement.step + '\"]').className = 'active';\n }\n oldReferenceLayer.querySelector('.introjs-progress .introjs-progressbar').style.cssText = 'width:' + _getProgress.call(self) + '%;';\n oldReferenceLayer.querySelector('.introjs-progress .introjs-progressbar').setAttribute('aria-valuenow', _getProgress.call(self));\n\n //show the tooltip\n oldtooltipContainer.style.opacity = 1;\n if (oldHelperNumberLayer) oldHelperNumberLayer.style.opacity = 1;\n\n //reset button focus\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null && /introjs-donebutton/gi.test(skipTooltipButton.className)) {\n // skip button is now \"done\" button\n skipTooltipButton.focus();\n } else if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n //still in the tour, focus on next\n nextTooltipButton.focus();\n }\n\n // change the scroll of the window, if needed\n _scrollTo.call(self, targetElement.scrollTo, targetElement, oldtooltipLayer);\n }, 350);\n\n // end of old element if-else condition\n } else {\n var helperLayer = document.createElement('div'),\n referenceLayer = document.createElement('div'),\n arrowLayer = document.createElement('div'),\n tooltipLayer = document.createElement('div'),\n tooltipTextLayer = document.createElement('div'),\n bulletsLayer = document.createElement('div'),\n progressLayer = document.createElement('div'),\n buttonsLayer = document.createElement('div');\n\n helperLayer.className = highlightClass;\n referenceLayer.className = 'introjs-tooltipReferenceLayer';\n\n // scroll to element\n scrollParent = _getScrollParent( targetElement.element );\n\n if (scrollParent !== document.body) {\n // target is within a scrollable element\n _scrollParentToElement(scrollParent, targetElement.element);\n }\n\n //set new position to helper layer\n _setHelperLayerPosition.call(self, helperLayer);\n _setHelperLayerPosition.call(self, referenceLayer);\n\n //add helper layer to target element\n this._targetElement.appendChild(helperLayer);\n this._targetElement.appendChild(referenceLayer);\n\n arrowLayer.className = 'introjs-arrow';\n\n tooltipTextLayer.className = 'introjs-tooltiptext';\n tooltipTextLayer.innerHTML = targetElement.intro;\n\n bulletsLayer.className = 'introjs-bullets';\n\n if (this._options.showBullets === false) {\n bulletsLayer.style.display = 'none';\n }\n\n var ulContainer = document.createElement('ul');\n ulContainer.setAttribute('role', 'tablist');\n\n var anchorClick = function () {\n self.goToStep(this.getAttribute('data-stepnumber'));\n };\n\n _forEach(this._introItems, function (item, i) {\n var innerLi = document.createElement('li');\n var anchorLink = document.createElement('a');\n \n innerLi.setAttribute('role', 'presentation');\n anchorLink.setAttribute('role', 'tab');\n\n anchorLink.onclick = anchorClick;\n\n if (i === (targetElement.step-1)) {\n anchorLink.className = 'active';\n } \n\n _setAnchorAsButton(anchorLink);\n anchorLink.innerHTML = \" \";\n anchorLink.setAttribute('data-stepnumber', item.step);\n\n innerLi.appendChild(anchorLink);\n ulContainer.appendChild(innerLi);\n });\n\n bulletsLayer.appendChild(ulContainer);\n\n progressLayer.className = 'introjs-progress';\n\n if (this._options.showProgress === false) {\n progressLayer.style.display = 'none';\n }\n var progressBar = document.createElement('div');\n progressBar.className = 'introjs-progressbar';\n progressBar.setAttribute('role', 'progress');\n progressBar.setAttribute('aria-valuemin', 0);\n progressBar.setAttribute('aria-valuemax', 100);\n progressBar.setAttribute('aria-valuenow', _getProgress.call(this));\n progressBar.style.cssText = 'width:' + _getProgress.call(this) + '%;';\n\n progressLayer.appendChild(progressBar);\n\n buttonsLayer.className = 'introjs-tooltipbuttons';\n if (this._options.showButtons === false) {\n buttonsLayer.style.display = 'none';\n }\n\n tooltipLayer.className = 'introjs-tooltip';\n tooltipLayer.appendChild(tooltipTextLayer);\n tooltipLayer.appendChild(bulletsLayer);\n tooltipLayer.appendChild(progressLayer);\n\n //add helper layer number\n var helperNumberLayer = document.createElement('span');\n if (this._options.showStepNumbers === true) {\n helperNumberLayer.className = 'introjs-helperNumberLayer';\n helperNumberLayer.innerHTML = targetElement.step;\n referenceLayer.appendChild(helperNumberLayer);\n }\n\n tooltipLayer.appendChild(arrowLayer);\n referenceLayer.appendChild(tooltipLayer);\n\n //next button\n nextTooltipButton = document.createElement('a');\n\n nextTooltipButton.onclick = function() {\n if (self._introItems.length - 1 !== self._currentStep) {\n _nextStep.call(self);\n }\n };\n\n _setAnchorAsButton(nextTooltipButton);\n nextTooltipButton.innerHTML = this._options.nextLabel;\n\n //previous button\n prevTooltipButton = document.createElement('a');\n\n prevTooltipButton.onclick = function() {\n if (self._currentStep !== 0) {\n _previousStep.call(self);\n }\n };\n\n _setAnchorAsButton(prevTooltipButton);\n prevTooltipButton.innerHTML = this._options.prevLabel;\n\n //skip button\n skipTooltipButton = document.createElement('a');\n skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton ';\n _setAnchorAsButton(skipTooltipButton);\n skipTooltipButton.innerHTML = this._options.skipLabel;\n\n skipTooltipButton.onclick = function() {\n if (self._introItems.length - 1 === self._currentStep && typeof (self._introCompleteCallback) === 'function') {\n self._introCompleteCallback.call(self);\n }\n\n if (self._introItems.length - 1 !== self._currentStep && typeof (self._introExitCallback) === 'function') {\n self._introExitCallback.call(self);\n }\n\n if (typeof(self._introSkipCallback) === 'function') {\n self._introSkipCallback.call(self);\n }\n\n _exitIntro.call(self, self._targetElement);\n };\n\n buttonsLayer.appendChild(skipTooltipButton);\n\n //in order to prevent displaying next/previous button always\n if (this._introItems.length > 1) {\n buttonsLayer.appendChild(prevTooltipButton);\n buttonsLayer.appendChild(nextTooltipButton);\n }\n\n tooltipLayer.appendChild(buttonsLayer);\n\n //set proper position\n _placeTooltip.call(self, targetElement.element, tooltipLayer, arrowLayer, helperNumberLayer);\n\n // change the scroll of the window, if needed\n _scrollTo.call(this, targetElement.scrollTo, targetElement, tooltipLayer);\n\n //end of new element if-else condition\n }\n\n // removing previous disable interaction layer\n var disableInteractionLayer = self._targetElement.querySelector('.introjs-disableInteraction');\n if (disableInteractionLayer) {\n disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);\n }\n\n //disable interaction\n if (targetElement.disableInteraction) {\n _disableInteraction.call(self);\n }\n\n // when it's the first step of tour\n if (this._currentStep === 0 && this._introItems.length > 1) {\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\n skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton';\n }\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton';\n }\n\n if (this._options.hidePrev === true) {\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-hidden';\n }\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n _addClass(nextTooltipButton, 'introjs-fullbutton');\n }\n } else {\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-disabled';\n }\n }\n\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\n skipTooltipButton.innerHTML = this._options.skipLabel;\n }\n } else if (this._introItems.length - 1 === this._currentStep || this._introItems.length === 1) {\n // last step of tour\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\n skipTooltipButton.innerHTML = this._options.doneLabel;\n // adding donebutton class in addition to skipbutton\n _addClass(skipTooltipButton, 'introjs-donebutton');\n }\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton';\n }\n\n if (this._options.hideNext === true) {\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-hidden';\n }\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n _addClass(prevTooltipButton, 'introjs-fullbutton');\n }\n } else {\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-disabled';\n }\n }\n } else {\n // steps between start and end\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\n skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton';\n }\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton';\n }\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton';\n }\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\n skipTooltipButton.innerHTML = this._options.skipLabel;\n }\n }\n\n prevTooltipButton.setAttribute('role', 'button');\n nextTooltipButton.setAttribute('role', 'button');\n skipTooltipButton.setAttribute('role', 'button');\n\n //Set focus on \"next\" button, so that hitting Enter always moves you onto the next step\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.focus();\n }\n\n _setShowElement(targetElement);\n\n if (typeof (this._introAfterChangeCallback) !== 'undefined') {\n this._introAfterChangeCallback.call(this, targetElement.element);\n }\n }\n\n /**\n * To change the scroll of `window` after highlighting an element\n *\n * @api private\n * @method _scrollTo\n * @param {String} scrollTo\n * @param {Object} targetElement\n * @param {Object} tooltipLayer\n */\n function _scrollTo(scrollTo, targetElement, tooltipLayer) {\n if (scrollTo === 'off') return; \n var rect;\n\n if (!this._options.scrollToElement) return;\n\n if (scrollTo === 'tooltip') {\n rect = tooltipLayer.getBoundingClientRect();\n } else {\n rect = targetElement.element.getBoundingClientRect();\n }\n\n if (!_elementInViewport(targetElement.element)) {\n var winHeight = _getWinSize().height;\n var top = rect.bottom - (rect.bottom - rect.top);\n\n // TODO (afshinm): do we need scroll padding now?\n // I have changed the scroll option and now it scrolls the window to\n // the center of the target element or tooltip.\n\n if (top < 0 || targetElement.element.clientHeight > winHeight) {\n window.scrollBy(0, rect.top - ((winHeight / 2) - (rect.height / 2)) - this._options.scrollPadding); // 30px padding from edge to look nice\n\n //Scroll down\n } else {\n window.scrollBy(0, rect.top - ((winHeight / 2) - (rect.height / 2)) + this._options.scrollPadding); // 30px padding from edge to look nice\n }\n }\n }\n\n /**\n * To remove all show element(s)\n *\n * @api private\n * @method _removeShowElement\n */\n function _removeShowElement() {\n var elms = document.querySelectorAll('.introjs-showElement');\n\n _forEach(elms, function (elm) {\n _removeClass(elm, /introjs-[a-zA-Z]+/g);\n });\n }\n\n /**\n * To set the show element\n * This function set a relative (in most cases) position and changes the z-index\n *\n * @api private\n * @method _setShowElement\n * @param {Object} targetElement\n */\n function _setShowElement(targetElement) {\n var parentElm;\n // we need to add this show element class to the parent of SVG elements\n // because the SVG elements can't have independent z-index\n if (targetElement.element instanceof SVGElement) {\n parentElm = targetElement.element.parentNode;\n\n while (targetElement.element.parentNode !== null) {\n if (!parentElm.tagName || parentElm.tagName.toLowerCase() === 'body') break;\n\n if (parentElm.tagName.toLowerCase() === 'svg') {\n _addClass(parentElm, 'introjs-showElement introjs-relativePosition');\n }\n\n parentElm = parentElm.parentNode;\n }\n }\n\n _addClass(targetElement.element, 'introjs-showElement');\n\n var currentElementPosition = _getPropValue(targetElement.element, 'position');\n if (currentElementPosition !== 'absolute' &&\n currentElementPosition !== 'relative' &&\n currentElementPosition !== 'fixed') {\n //change to new intro item\n _addClass(targetElement.element, 'introjs-relativePosition');\n }\n\n parentElm = targetElement.element.parentNode;\n while (parentElm !== null) {\n if (!parentElm.tagName || parentElm.tagName.toLowerCase() === 'body') break;\n\n //fix The Stacking Context problem.\n //More detail: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context\n var zIndex = _getPropValue(parentElm, 'z-index');\n var opacity = parseFloat(_getPropValue(parentElm, 'opacity'));\n var transform = _getPropValue(parentElm, 'transform') || _getPropValue(parentElm, '-webkit-transform') || _getPropValue(parentElm, '-moz-transform') || _getPropValue(parentElm, '-ms-transform') || _getPropValue(parentElm, '-o-transform');\n if (/[0-9]+/.test(zIndex) || opacity < 1 || (transform !== 'none' && transform !== undefined)) {\n _addClass(parentElm, 'introjs-fixParent');\n }\n\n parentElm = parentElm.parentNode;\n }\n }\n\n /**\n * Iterates arrays\n *\n * @param {Array} arr\n * @param {Function} forEachFnc\n * @param {Function} completeFnc\n * @return {Null}\n */\n function _forEach(arr, forEachFnc, completeFnc) {\n // in case arr is an empty query selector node list\n if (arr) {\n for (var i = 0, len = arr.length; i < len; i++) {\n forEachFnc(arr[i], i);\n }\n }\n\n if (typeof(completeFnc) === 'function') {\n completeFnc();\n }\n }\n\n /**\n * Mark any object with an incrementing number\n * used for keeping track of objects\n *\n * @param Object obj Any object or DOM Element\n * @param String key\n * @return Object\n */\n var _stamp = (function () {\n var keys = {};\n return function stamp (obj, key) {\n \n // get group key\n key = key || 'introjs-stamp';\n\n // each group increments from 0\n keys[key] = keys[key] || 0;\n\n // stamp only once per object\n if (obj[key] === undefined) {\n // increment key for each new object\n obj[key] = keys[key]++;\n }\n\n return obj[key];\n };\n })();\n\n /**\n * DOMEvent Handles all DOM events\n *\n * methods:\n *\n * on - add event handler\n * off - remove event\n */\n var DOMEvent = (function () {\n function DOMEvent () {\n var events_key = 'introjs_event';\n \n /**\n * Gets a unique ID for an event listener\n *\n * @param Object obj\n * @param String type event type\n * @param Function listener\n * @param Object context\n * @return String\n */\n this._id = function (obj, type, listener, context) {\n return type + _stamp(listener) + (context ? '_' + _stamp(context) : '');\n };\n\n /**\n * Adds event listener\n *\n * @param Object obj\n * @param String type event type\n * @param Function listener\n * @param Object context\n * @param Boolean useCapture\n * @return null\n */\n this.on = function (obj, type, listener, context, useCapture) {\n var id = this._id.apply(this, arguments),\n handler = function (e) {\n return listener.call(context || obj, e || window.event);\n };\n\n if ('addEventListener' in obj) {\n obj.addEventListener(type, handler, useCapture);\n } else if ('attachEvent' in obj) {\n obj.attachEvent('on' + type, handler);\n }\n\n obj[events_key] = obj[events_key] || {};\n obj[events_key][id] = handler;\n };\n\n /**\n * Removes event listener\n *\n * @param Object obj\n * @param String type event type\n * @param Function listener\n * @param Object context\n * @param Boolean useCapture\n * @return null\n */\n this.off = function (obj, type, listener, context, useCapture) {\n var id = this._id.apply(this, arguments),\n handler = obj[events_key] && obj[events_key][id];\n\n if (!handler) {\n return;\n }\n\n if ('removeEventListener' in obj) {\n obj.removeEventListener(type, handler, useCapture);\n } else if ('detachEvent' in obj) {\n obj.detachEvent('on' + type, handler);\n }\n\n obj[events_key][id] = null;\n };\n }\n\n return new DOMEvent();\n })();\n\n /**\n * Append a class to an element\n *\n * @api private\n * @method _addClass\n * @param {Object} element\n * @param {String} className\n * @returns null\n */\n function _addClass(element, className) {\n if (element instanceof SVGElement) {\n // svg\n var pre = element.getAttribute('class') || '';\n\n element.setAttribute('class', pre + ' ' + className);\n } else {\n if (element.classList !== undefined) {\n // check for modern classList property\n var classes = className.split(' ');\n _forEach(classes, function (cls) {\n element.classList.add( cls );\n });\n } else if (!element.className.match( className )) {\n // check if element doesn't already have className\n element.className += ' ' + className;\n }\n }\n }\n\n /**\n * Remove a class from an element\n *\n * @api private\n * @method _removeClass\n * @param {Object} element\n * @param {RegExp|String} classNameRegex can be regex or string\n * @returns null\n */\n function _removeClass(element, classNameRegex) {\n if (element instanceof SVGElement) {\n var pre = element.getAttribute('class') || '';\n\n element.setAttribute('class', pre.replace(classNameRegex, '').replace(/^\\s+|\\s+$/g, ''));\n } else {\n element.className = element.className.replace(classNameRegex, '').replace(/^\\s+|\\s+$/g, '');\n }\n }\n\n /**\n * Get an element CSS property on the page\n * Thanks to JavaScript Kit: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml\n *\n * @api private\n * @method _getPropValue\n * @param {Object} element\n * @param {String} propName\n * @returns Element's property value\n */\n function _getPropValue (element, propName) {\n var propValue = '';\n if (element.currentStyle) { //IE\n propValue = element.currentStyle[propName];\n } else if (document.defaultView && document.defaultView.getComputedStyle) { //Others\n propValue = document.defaultView.getComputedStyle(element, null).getPropertyValue(propName);\n }\n\n //Prevent exception in IE\n if (propValue && propValue.toLowerCase) {\n return propValue.toLowerCase();\n } else {\n return propValue;\n }\n }\n\n /**\n * Checks to see if target element (or parents) position is fixed or not\n *\n * @api private\n * @method _isFixed\n * @param {Object} element\n * @returns Boolean\n */\n function _isFixed (element) {\n var p = element.parentNode;\n\n if (!p || p.nodeName === 'HTML') {\n return false;\n }\n\n if (_getPropValue(element, 'position') === 'fixed') {\n return true;\n }\n\n return _isFixed(p);\n }\n\n /**\n * Provides a cross-browser way to get the screen dimensions\n * via: http://stackoverflow.com/questions/5864467/internet-explorer-innerheight\n *\n * @api private\n * @method _getWinSize\n * @returns {Object} width and height attributes\n */\n function _getWinSize() {\n if (window.innerWidth !== undefined) {\n return { width: window.innerWidth, height: window.innerHeight };\n } else {\n var D = document.documentElement;\n return { width: D.clientWidth, height: D.clientHeight };\n }\n }\n\n /**\n * Check to see if the element is in the viewport or not\n * http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport\n *\n * @api private\n * @method _elementInViewport\n * @param {Object} el\n */\n function _elementInViewport(el) {\n var rect = el.getBoundingClientRect();\n\n return (\n rect.top >= 0 &&\n rect.left >= 0 &&\n (rect.bottom+80) <= window.innerHeight && // add 80 to get the text right\n rect.right <= window.innerWidth\n );\n }\n\n /**\n * Add overlay layer to the page\n *\n * @api private\n * @method _addOverlayLayer\n * @param {Object} targetElm\n */\n function _addOverlayLayer(targetElm) {\n var overlayLayer = document.createElement('div'),\n styleText = '',\n self = this;\n\n //set css class name\n overlayLayer.className = 'introjs-overlay';\n\n //check if the target element is body, we should calculate the size of overlay layer in a better way\n if (!targetElm.tagName || targetElm.tagName.toLowerCase() === 'body') {\n styleText += 'top: 0;bottom: 0; left: 0;right: 0;position: fixed;';\n overlayLayer.style.cssText = styleText;\n } else {\n //set overlay layer position\n var elementPosition = _getOffset(targetElm);\n if (elementPosition) {\n styleText += 'width: ' + elementPosition.width + 'px; height:' + elementPosition.height + 'px; top:' + elementPosition.top + 'px;left: ' + elementPosition.left + 'px;';\n overlayLayer.style.cssText = styleText;\n }\n }\n\n targetElm.appendChild(overlayLayer);\n\n overlayLayer.onclick = function() {\n if (self._options.exitOnOverlayClick === true) {\n _exitIntro.call(self, targetElm);\n }\n };\n\n window.setTimeout(function() {\n styleText += 'opacity: ' + self._options.overlayOpacity.toString() + ';';\n overlayLayer.style.cssText = styleText;\n }, 10);\n\n return true;\n }\n\n /**\n * Removes open hint (tooltip hint)\n *\n * @api private\n * @method _removeHintTooltip\n */\n function _removeHintTooltip() {\n var tooltip = document.querySelector('.introjs-hintReference');\n\n if (tooltip) {\n var step = tooltip.getAttribute('data-step');\n tooltip.parentNode.removeChild(tooltip);\n return step;\n }\n }\n\n /**\n * Start parsing hint items\n *\n * @api private\n * @param {Object} targetElm\n * @method _startHint\n */\n function _populateHints(targetElm) {\n\n this._introItems = [];\n\n if (this._options.hints) {\n _forEach(this._options.hints, function (hint) {\n var currentItem = _cloneObject(hint);\n\n if (typeof(currentItem.element) === 'string') {\n //grab the element with given selector from the page\n currentItem.element = document.querySelector(currentItem.element);\n }\n\n currentItem.hintPosition = currentItem.hintPosition || this._options.hintPosition;\n currentItem.hintAnimation = currentItem.hintAnimation || this._options.hintAnimation;\n\n if (currentItem.element !== null) {\n this._introItems.push(currentItem);\n }\n }.bind(this));\n } else {\n var hints = targetElm.querySelectorAll('*[data-hint]');\n\n if (!hints || !hints.length) {\n return false;\n }\n\n //first add intro items with data-step\n _forEach(hints, function (currentElement) {\n // hint animation\n var hintAnimation = currentElement.getAttribute('data-hintanimation');\n\n if (hintAnimation) {\n hintAnimation = (hintAnimation === 'true');\n } else {\n hintAnimation = this._options.hintAnimation;\n }\n\n this._introItems.push({\n element: currentElement,\n hint: currentElement.getAttribute('data-hint'),\n hintPosition: currentElement.getAttribute('data-hintposition') || this._options.hintPosition,\n hintAnimation: hintAnimation,\n tooltipClass: currentElement.getAttribute('data-tooltipclass'),\n position: currentElement.getAttribute('data-position') || this._options.tooltipPosition\n });\n }.bind(this));\n }\n\n _addHints.call(this);\n\n /* \n todo:\n these events should be removed at some point \n */\n DOMEvent.on(document, 'click', _removeHintTooltip, this, false);\n DOMEvent.on(window, 'resize', _reAlignHints, this, true);\n }\n\n /**\n * Re-aligns all hint elements\n *\n * @api private\n * @method _reAlignHints\n */\n function _reAlignHints() {\n _forEach(this._introItems, function (item) {\n if (typeof(item.targetElement) === 'undefined') {\n return;\n }\n\n _alignHintPosition.call(this, item.hintPosition, item.element, item.targetElement);\n }.bind(this));\n }\n\n /**\n * Get a queryselector within the hint wrapper\n *\n * @param {String} selector\n * @return {NodeList|Array}\n */\n function _hintQuerySelectorAll(selector) {\n var hintsWrapper = document.querySelector('.introjs-hints');\n return (hintsWrapper) ? hintsWrapper.querySelectorAll(selector) : [];\n }\n\n /**\n * Hide a hint\n *\n * @api private\n * @method _hideHint\n */\n function _hideHint(stepId) {\n var hint = _hintQuerySelectorAll('.introjs-hint[data-step=\"' + stepId + '\"]')[0];\n \n _removeHintTooltip.call(this);\n\n if (hint) {\n _addClass(hint, 'introjs-hidehint');\n }\n\n // call the callback function (if any)\n if (typeof (this._hintCloseCallback) !== 'undefined') {\n this._hintCloseCallback.call(this, stepId);\n }\n }\n\n /**\n * Hide all hints\n *\n * @api private\n * @method _hideHints\n */\n function _hideHints() {\n var hints = _hintQuerySelectorAll('.introjs-hint');\n\n _forEach(hints, function (hint) {\n _hideHint.call(this, hint.getAttribute('data-step'));\n }.bind(this));\n }\n\n /**\n * Show all hints\n *\n * @api private\n * @method _showHints\n */\n function _showHints() {\n var hints = _hintQuerySelectorAll('.introjs-hint');\n\n if (hints && hints.length) {\n _forEach(hints, function (hint) {\n _showHint.call(this, hint.getAttribute('data-step'));\n }.bind(this));\n } else {\n _populateHints.call(this, this._targetElement);\n }\n }\n\n /**\n * Show a hint\n *\n * @api private\n * @method _showHint\n */\n function _showHint(stepId) {\n var hint = _hintQuerySelectorAll('.introjs-hint[data-step=\"' + stepId + '\"]')[0];\n\n if (hint) {\n _removeClass(hint, /introjs-hidehint/g);\n }\n }\n\n /**\n * Removes all hint elements on the page\n * Useful when you want to destroy the elements and add them again (e.g. a modal or popup)\n *\n * @api private\n * @method _removeHints\n */\n function _removeHints() {\n var hints = _hintQuerySelectorAll('.introjs-hint');\n\n _forEach(hints, function (hint) {\n _removeHint.call(this, hint.getAttribute('data-step'));\n }.bind(this));\n }\n\n /**\n * Remove one single hint element from the page\n * Useful when you want to destroy the element and add them again (e.g. a modal or popup)\n * Use removeHints if you want to remove all elements.\n *\n * @api private\n * @method _removeHint\n */\n function _removeHint(stepId) {\n var hint = _hintQuerySelectorAll('.introjs-hint[data-step=\"' + stepId + '\"]')[0];\n\n if (hint) {\n hint.parentNode.removeChild(hint);\n }\n }\n\n /**\n * Add all available hints to the page\n *\n * @api private\n * @method _addHints\n */\n function _addHints() {\n var self = this;\n\n var hintsWrapper = document.querySelector('.introjs-hints');\n\n if (hintsWrapper === null) {\n hintsWrapper = document.createElement('div');\n hintsWrapper.className = 'introjs-hints';\n }\n\n /**\n * Returns an event handler unique to the hint iteration\n * \n * @param {Integer} i\n * @return {Function}\n */\n var getHintClick = function (i) {\n return function(e) {\n var evt = e ? e : window.event;\n \n if (evt.stopPropagation) {\n evt.stopPropagation();\n }\n\n if (evt.cancelBubble !== null) {\n evt.cancelBubble = true;\n }\n\n _showHintDialog.call(self, i);\n };\n };\n\n _forEach(this._introItems, function(item, i) {\n // avoid append a hint twice\n if (document.querySelector('.introjs-hint[data-step=\"' + i + '\"]')) {\n return;\n }\n\n var hint = document.createElement('a');\n _setAnchorAsButton(hint);\n\n hint.onclick = getHintClick(i);\n\n hint.className = 'introjs-hint';\n\n if (!item.hintAnimation) {\n _addClass(hint, 'introjs-hint-no-anim');\n }\n\n // hint's position should be fixed if the target element's position is fixed\n if (_isFixed(item.element)) {\n _addClass(hint, 'introjs-fixedhint');\n }\n\n var hintDot = document.createElement('div');\n hintDot.className = 'introjs-hint-dot';\n var hintPulse = document.createElement('div');\n hintPulse.className = 'introjs-hint-pulse';\n\n hint.appendChild(hintDot);\n hint.appendChild(hintPulse);\n hint.setAttribute('data-step', i);\n\n // we swap the hint element with target element\n // because _setHelperLayerPosition uses `element` property\n item.targetElement = item.element;\n item.element = hint;\n\n // align the hint position\n _alignHintPosition.call(this, item.hintPosition, hint, item.targetElement);\n\n hintsWrapper.appendChild(hint);\n }.bind(this));\n\n // adding the hints wrapper\n document.body.appendChild(hintsWrapper);\n\n // call the callback function (if any)\n if (typeof (this._hintsAddedCallback) !== 'undefined') {\n this._hintsAddedCallback.call(this);\n }\n }\n\n /**\n * Aligns hint position\n *\n * @api private\n * @method _alignHintPosition\n * @param {String} position\n * @param {Object} hint\n * @param {Object} element\n */\n function _alignHintPosition(position, hint, element) {\n // get/calculate offset of target element\n var offset = _getOffset.call(this, element);\n var iconWidth = 20;\n var iconHeight = 20;\n\n // align the hint element\n switch (position) {\n default:\n case 'top-left':\n hint.style.left = offset.left + 'px';\n hint.style.top = offset.top + 'px';\n break;\n case 'top-right':\n hint.style.left = (offset.left + offset.width - iconWidth) + 'px';\n hint.style.top = offset.top + 'px';\n break;\n case 'bottom-left':\n hint.style.left = offset.left + 'px';\n hint.style.top = (offset.top + offset.height - iconHeight) + 'px';\n break;\n case 'bottom-right':\n hint.style.left = (offset.left + offset.width - iconWidth) + 'px';\n hint.style.top = (offset.top + offset.height - iconHeight) + 'px';\n break;\n case 'middle-left':\n hint.style.left = offset.left + 'px';\n hint.style.top = (offset.top + (offset.height - iconHeight) / 2) + 'px';\n break;\n case 'middle-right':\n hint.style.left = (offset.left + offset.width - iconWidth) + 'px';\n hint.style.top = (offset.top + (offset.height - iconHeight) / 2) + 'px';\n break;\n case 'middle-middle':\n hint.style.left = (offset.left + (offset.width - iconWidth) / 2) + 'px';\n hint.style.top = (offset.top + (offset.height - iconHeight) / 2) + 'px';\n break;\n case 'bottom-middle':\n hint.style.left = (offset.left + (offset.width - iconWidth) / 2) + 'px';\n hint.style.top = (offset.top + offset.height - iconHeight) + 'px';\n break;\n case 'top-middle':\n hint.style.left = (offset.left + (offset.width - iconWidth) / 2) + 'px';\n hint.style.top = offset.top + 'px';\n break;\n }\n }\n\n /**\n * Triggers when user clicks on the hint element\n *\n * @api private\n * @method _showHintDialog\n * @param {Number} stepId\n */\n function _showHintDialog(stepId) {\n var hintElement = document.querySelector('.introjs-hint[data-step=\"' + stepId + '\"]');\n var item = this._introItems[stepId];\n\n // call the callback function (if any)\n if (typeof (this._hintClickCallback) !== 'undefined') {\n this._hintClickCallback.call(this, hintElement, item, stepId);\n }\n\n // remove all open tooltips\n var removedStep = _removeHintTooltip.call(this);\n\n // to toggle the tooltip\n if (parseInt(removedStep, 10) === stepId) {\n return;\n }\n\n var tooltipLayer = document.createElement('div');\n var tooltipTextLayer = document.createElement('div');\n var arrowLayer = document.createElement('div');\n var referenceLayer = document.createElement('div');\n\n tooltipLayer.className = 'introjs-tooltip';\n\n tooltipLayer.onclick = function (e) {\n //IE9 & Other Browsers\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n //IE8 and Lower\n else {\n e.cancelBubble = true;\n }\n };\n\n tooltipTextLayer.className = 'introjs-tooltiptext';\n\n var tooltipWrapper = document.createElement('p');\n tooltipWrapper.innerHTML = item.hint;\n\n var closeButton = document.createElement('a');\n closeButton.className = this._options.buttonClass;\n closeButton.setAttribute('role', 'button');\n closeButton.innerHTML = this._options.hintButtonLabel;\n closeButton.onclick = _hideHint.bind(this, stepId);\n\n tooltipTextLayer.appendChild(tooltipWrapper);\n tooltipTextLayer.appendChild(closeButton);\n\n arrowLayer.className = 'introjs-arrow';\n tooltipLayer.appendChild(arrowLayer);\n\n tooltipLayer.appendChild(tooltipTextLayer);\n\n // set current step for _placeTooltip function\n this._currentStep = hintElement.getAttribute('data-step');\n\n // align reference layer position\n referenceLayer.className = 'introjs-tooltipReferenceLayer introjs-hintReference';\n referenceLayer.setAttribute('data-step', hintElement.getAttribute('data-step'));\n _setHelperLayerPosition.call(this, referenceLayer);\n\n referenceLayer.appendChild(tooltipLayer);\n document.body.appendChild(referenceLayer);\n\n //set proper position\n _placeTooltip.call(this, hintElement, tooltipLayer, arrowLayer, null, true);\n }\n\n /**\n * Get an element position on the page\n * Thanks to `meouw`: http://stackoverflow.com/a/442474/375966\n *\n * @api private\n * @method _getOffset\n * @param {Object} element\n * @returns Element's position info\n */\n function _getOffset(element) {\n var body = document.body;\n var docEl = document.documentElement;\n var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\n var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\n var x = element.getBoundingClientRect();\n return {\n top: x.top + scrollTop,\n width: x.width,\n height: x.height,\n left: x.left + scrollLeft\n };\n }\n\n /**\n * Find the nearest scrollable parent\n * copied from https://stackoverflow.com/questions/35939886/find-first-scrollable-parent\n *\n * @param Element element\n * @return Element\n */\n function _getScrollParent(element) {\n var style = window.getComputedStyle(element);\n var excludeStaticParent = (style.position === \"absolute\");\n var overflowRegex = /(auto|scroll)/;\n\n if (style.position === \"fixed\") return document.body;\n \n for (var parent = element; (parent = parent.parentElement);) {\n style = window.getComputedStyle(parent);\n if (excludeStaticParent && style.position === \"static\") {\n continue;\n }\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) return parent;\n }\n\n return document.body;\n }\n\n /**\n * scroll a scrollable element to a child element\n *\n * @param Element parent\n * @param Element element\n * @return Null\n */\n function _scrollParentToElement (parent, element) {\n parent.scrollTop = element.offsetTop - parent.offsetTop;\n }\n\n /**\n * Gets the current progress percentage\n *\n * @api private\n * @method _getProgress\n * @returns current progress percentage\n */\n function _getProgress() {\n // Steps are 0 indexed\n var currentStep = parseInt((this._currentStep + 1), 10);\n return ((currentStep / this._introItems.length) * 100);\n }\n\n /**\n * Overwrites obj1's values with obj2's and adds obj2's if non existent in obj1\n * via: http://stackoverflow.com/questions/171251/how-can-i-merge-properties-of-two-javascript-objects-dynamically\n *\n * @param obj1\n * @param obj2\n * @returns obj3 a new object based on obj1 and obj2\n */\n function _mergeOptions(obj1,obj2) {\n var obj3 = {},\n attrname;\n for (attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }\n\n var introJs = function (targetElm) {\n var instance;\n\n if (typeof (targetElm) === 'object') {\n //Ok, create a new instance\n instance = new IntroJs(targetElm);\n\n } else if (typeof (targetElm) === 'string') {\n //select the target element with query selector\n var targetElement = document.querySelector(targetElm);\n\n if (targetElement) {\n instance = new IntroJs(targetElement);\n } else {\n throw new Error('There is no element with given selector.');\n }\n } else {\n instance = new IntroJs(document.body);\n }\n // add instance to list of _instances\n // passing group to _stamp to increment\n // from 0 onward somewhat reliably\n introJs.instances[ _stamp(instance, 'introjs-instance') ] = instance;\n\n return instance;\n };\n\n /**\n * Current IntroJs version\n *\n * @property version\n * @type String\n */\n introJs.version = VERSION;\n\n /**\n * key-val object helper for introJs instances\n *\n * @property instances\n * @type Object\n */\n introJs.instances = {};\n\n //Prototype\n introJs.fn = IntroJs.prototype = {\n clone: function () {\n return new IntroJs(this);\n },\n setOption: function(option, value) {\n this._options[option] = value;\n return this;\n },\n setOptions: function(options) {\n this._options = _mergeOptions(this._options, options);\n return this;\n },\n start: function (group) {\n _introForElement.call(this, this._targetElement, group);\n return this;\n },\n goToStep: function(step) {\n _goToStep.call(this, step);\n return this;\n },\n addStep: function(options) {\n if (!this._options.steps) {\n this._options.steps = [];\n }\n\n this._options.steps.push(options);\n\n return this;\n },\n addSteps: function(steps) {\n if (!steps.length) return;\n\n for(var index = 0; index < steps.length; index++) {\n this.addStep(steps[index]);\n }\n\n return this;\n },\n goToStepNumber: function(step) {\n _goToStepNumber.call(this, step);\n\n return this;\n },\n nextStep: function() {\n _nextStep.call(this);\n return this;\n },\n previousStep: function() {\n _previousStep.call(this);\n return this;\n },\n exit: function(force) {\n _exitIntro.call(this, this._targetElement, force);\n return this;\n },\n refresh: function() {\n _refresh.call(this);\n return this;\n },\n onbeforechange: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._introBeforeChangeCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onbeforechange was not a function');\n }\n return this;\n },\n onchange: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._introChangeCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onchange was not a function.');\n }\n return this;\n },\n onafterchange: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._introAfterChangeCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onafterchange was not a function');\n }\n return this;\n },\n oncomplete: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._introCompleteCallback = providedCallback;\n } else {\n throw new Error('Provided callback for oncomplete was not a function.');\n }\n return this;\n },\n onhintsadded: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._hintsAddedCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onhintsadded was not a function.');\n }\n return this;\n },\n onhintclick: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._hintClickCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onhintclick was not a function.');\n }\n return this;\n },\n onhintclose: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._hintCloseCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onhintclose was not a function.');\n }\n return this;\n },\n onexit: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._introExitCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onexit was not a function.');\n }\n return this;\n },\n onskip: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._introSkipCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onskip was not a function.');\n }\n return this;\n },\n onbeforeexit: function(providedCallback) {\n if (typeof (providedCallback) === 'function') {\n this._introBeforeExitCallback = providedCallback;\n } else {\n throw new Error('Provided callback for onbeforeexit was not a function.');\n }\n return this;\n },\n addHints: function() {\n _populateHints.call(this, this._targetElement);\n return this;\n },\n hideHint: function (stepId) {\n _hideHint.call(this, stepId);\n return this;\n },\n hideHints: function () {\n _hideHints.call(this);\n return this;\n },\n showHint: function (stepId) {\n _showHint.call(this, stepId);\n return this;\n },\n showHints: function () {\n _showHints.call(this);\n return this;\n },\n removeHints: function () {\n _removeHints.call(this);\n return this;\n },\n removeHint: function (stepId) {\n _removeHint.call(this, stepId);\n return this;\n },\n showHintDialog: function (stepId) {\n _showHintDialog.call(this, stepId);\n return this;\n }\n };\n\n return introJs;\n});\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImageViewer.vue?vue&type=style&index=0&id=396a52cf&prod&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AboutOmni.vue?vue&type=style&index=0&id=15595f87&prod&lang=scss&scoped=true\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ast-toolbar-dropdown',{staticClass:\"help-btn\",attrs:{\"icon\":\"help-circle\",\"title\":\"Help\",\"items\":_vm.completeList}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal-wrapper',{on:{\"close\":function($event){return _vm.close()}}},[_c('div',{staticClass:\"dialog\",staticStyle:{\"width\":\"400px\"}},[_c('dlg-header',{attrs:{\"title\":\"About Omni\"},on:{\"close\":_vm.close}}),_c('div',{staticStyle:{\"padding\":\"16px\"}},[_c('p',{staticStyle:{\"margin-bottom\":\"35px\"}},[_vm._v(\"\\n\\t\\t\\t\\tKeystone Omni is a modern progressive web application (PWA). Below is a brief summary of\\n\\t\\t\\t\\tinformation that may be helpful for diagnostic purposes:\\n\\t\\t\\t\")]),_c('ast-data-table',{attrs:{\"is-hoverable\":false,\"is-striped\":true,\"is-condensed\":true}},[_c('tbody',[_c('tr',[_c('td',{staticClass:\"title-row\",attrs:{\"colspan\":\"2\"}},[_vm._v(\"Omni\")])]),_c('tr',[_c('td',[_vm._v(\"Release:\")]),_c('td',[_vm._v(_vm._s(_vm.release))])]),_c('tr',[_c('td',{staticClass:\"title-row\",attrs:{\"colspan\":\"2\"}},[_vm._v(\"Browser\")])]),_c('tr',[_c('td',[_vm._v(\"Name:\")]),_c('td',[_vm._v(_vm._s(_vm.browser.name))])]),_c('tr',[_c('td',[_vm._v(\"Version:\")]),_c('td',[_vm._v(_vm._s(_vm.browser.version))])]),_c('tr',[_c('td',[_vm._v(\"OS:\")]),_c('td',[_vm._v(_vm._s(_vm.browser.os))])])])])],1)],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AboutOmni.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AboutOmni.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AboutOmni.vue?vue&type=template&id=15595f87&scoped=true\"\nimport script from \"./AboutOmni.vue?vue&type=script&lang=js\"\nexport * from \"./AboutOmni.vue?vue&type=script&lang=js\"\nimport style0 from \"./AboutOmni.vue?vue&type=style&index=0&id=15595f87&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"15595f87\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal-wrapper',{on:{\"close\":function($event){return _vm.close()}}},[_c('div',{staticClass:\"dialog\",staticStyle:{\"width\":\"400px\"}},[_c('dlg-header',{attrs:{\"title\":\"About Community\"},on:{\"close\":_vm.close}}),_c('div',{staticStyle:{\"padding\":\"16px\"}},[_c('p',{staticStyle:{\"margin-bottom\":\"35px\"}},[_vm._v(\"\\n\\t\\t\\t\\tAsteris Community is a modern progressive web application (PWA). Below is a brief summary\\n\\t\\t\\t\\tof information that may be helpful for diagnostic purposes:\\n\\t\\t\\t\")]),_c('ast-data-table',{attrs:{\"is-hoverable\":false,\"is-striped\":true,\"is-condensed\":true}},[_c('tbody',[_c('tr',[_c('td',{staticClass:\"title-row\",attrs:{\"colspan\":\"2\"}},[_vm._v(\"Community\")])]),_c('tr',[_c('td',[_vm._v(\"Release:\")]),_c('td',[_vm._v(_vm._s(_vm.release))])]),_c('tr',[_c('td',{staticClass:\"title-row\",attrs:{\"colspan\":\"2\"}},[_vm._v(\"Browser\")])]),_c('tr',[_c('td',[_vm._v(\"Name:\")]),_c('td',[_vm._v(_vm._s(_vm.browser.name))])]),_c('tr',[_c('td',[_vm._v(\"Version:\")]),_c('td',[_vm._v(_vm._s(_vm.browser.version))])]),_c('tr',[_c('td',[_vm._v(\"OS:\")]),_c('td',[_vm._v(_vm._s(_vm.browser.os))])])])])],1),_c('community-upsell-promo')],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AboutCommunity.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AboutCommunity.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AboutCommunity.vue?vue&type=template&id=d816edec&scoped=true\"\nimport script from \"./AboutCommunity.vue?vue&type=script&lang=js\"\nexport * from \"./AboutCommunity.vue?vue&type=script&lang=js\"\nimport style0 from \"./AboutCommunity.vue?vue&type=style&index=0&id=d816edec&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d816edec\",\n null\n \n)\n\nexport default component.exports","\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelpMenu.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelpMenu.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./HelpMenu.vue?vue&type=template&id=cb46a3ca\"\nimport script from \"./HelpMenu.vue?vue&type=script&lang=js\"\nexport * from \"./HelpMenu.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{\"name\":\"fade\"}},[(_vm.isVisible)?_c('div',[_c('div',{staticClass:\"banner\",class:[{ 'is-rounded': _vm.isRounded }, (\"banner-\" + _vm.type)]},[(_vm.isClosable)?_c('span',{staticClass:\"close-button\",on:{\"click\":_vm.close}},[_vm._v(\"×\")]):_vm._e(),_c('svg-icon',{attrs:{\"icon\":\"info-circle\"}}),_c('div',{staticClass:\"content\"},[_c('div',{staticClass:\"message\"},[_vm._t(\"default\",[_vm._v(\"Insert banner message here\")])],2),_vm._t(\"learn-more\",[_c('a',{staticClass:\"learn-more\",attrs:{\"href\":_vm.learnMoreLink,\"target\":\"hidden-iframe\"},on:{\"click\":_vm.learnMore}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\tLearn more.\\n\\t\\t\\t\\t\\t\")])])],2)],1)]):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Banner.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Banner.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Banner.vue?vue&type=template&id=0abe1cff&scoped=true\"\nimport script from \"./Banner.vue?vue&type=script&lang=js\"\nexport * from \"./Banner.vue?vue&type=script&lang=js\"\nimport style0 from \"./Banner.vue?vue&type=style&index=0&id=0abe1cff&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0abe1cff\",\n null\n \n)\n\nexport default component.exports","// extracted by mini-css-extract-plugin\nmodule.exports = {\"small\":\"640px\",\"medium\":\"800px\",\"large\":\"1024px\",\"xLarge\":\"1280px\"};","import introJs from 'intro.js'\nimport storage from '@services/storage'\nimport { omniDesktop } from '@/electron/omniDesktop'\nimport store from '@store'\n\nconst flagKey = 'intro-new'\n\nconst tryStartTour = async function() {\n\t// Don't auto-start if cookie or localStorage item is set\n\tconst shouldStartTour = !storage.getItem(flagKey) && (await shouldOpenTour())\n\tif (shouldStartTour) {\n\t\tstartTour()\n\t}\n}\n\nfunction shouldOpenTour() {\n\treturn (\n\t\t!omniDesktop.isConnected ||\n\t\t!store.state.windows.openStudiesInNewWindow ||\n\t\tomniDesktop.request('isFirstPrimaryViewerWindow')\n\t)\n}\n\nexport const getIcon = icon =>\n\t``\n\nlet initialBodyStyle\n\nconst startTour = function() {\n\tconst topNavigation = document.querySelector('.top-navigation')\n\tconst bottomNavigation = document.querySelector('.bottom-navigation')\n\tlet navigationElement = bottomNavigation\n\tif (topNavigation && (!bottomNavigation || !bottomNavigation.clientWidth)) {\n\t\tnavigationElement = topNavigation\n\t}\n\n\tconst intro = introJs()\n\tintro\n\t\t.setOptions({\n\t\t\texitOnEsc: true,\n\t\t\texitOnOverlayClick: false,\n\t\t\tshowStepNumbers: false,\n\t\t\tshowBullets: false,\n\t\t\tshowProgress: true,\n\t\t\tscrollToElement: false,\n\t\t\toverlayOpacity: 0.75,\n\t\t\tdisableInteraction: false,\n\t\t\tsteps: [\n\t\t\t\t// Welcome\n\t\t\t\t{\n\t\t\t\t\telement: null,\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Welcome to the Keystone Omni viewer!

\n\t\t\t\t\t\t

Select Next for an overview of the viewer's features.

\n\t\t\t\t\t`,\n\t\t\t\t},\n\t\t\t\t// Viewer\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.layout-pane-container'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Image Viewer

\n\t\t\t\t\t\t

This pane shows the active image, and allows you to interact using your mouse or touch device.

\n\t\t\t\t\t\t

Go ahead! Try tapping, clicking, or dragging the image.

\n\t\t\t\t\t`,\n\t\t\t\t},\n\t\t\t\t// Thumbnail navigation\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.navigation-drawer'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Navigation

\n\t\t\t\t\t\t

You can jump to a specific image in the study by clicking its thumbnail.

\n\t\t\t\t\t\t

A green bar at the bottom of a thumbnail indicates the progress as it loads images into memory for fast and easy viewing.

\n\t\t\t\t\t\t

Click the menu icon ${getIcon('menu')} to show or hide this pane.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'right',\n\t\t\t\t},\n\t\t\t\t// Series navigation\n\t\t\t\t{\n\t\t\t\t\telement: navigationElement,\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Navigation - Part 2

\n\t\t\t\t\t\t

You can also move through the the series in a study using the ${getIcon('skip-previous')} and ${getIcon(\n\t\t\t\t\t\t'skip-next'\n\t\t\t\t\t)} navigation buttons.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'top',\n\t\t\t\t},\n\t\t\t\t// Viewer tools\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.tools'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Image Tools

\n\t\t\t\t\t\t

The toolbar offers quick access to commonly used tools.

\n\t\t\t\t\t\t

Select a tool to assign that tool to whichever mouse button you used to click.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'bottom',\n\t\t\t\t},\n\t\t\t\t// Settings / Help\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.btn-help'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Farewell Notes

\n\t\t\t\t\t\t

Open the Help menu ${getIcon('help-circle')} if you want to see this walkthrough again.

\n\t\t\t\t\t\t

Open the viewer layout menu ${getIcon(\n\t\t\t\t\t\t\t'layout'\n\t\t\t\t\t\t)} to change the image layout or access advanced settings and features.

\n\t\t\t\t\t\t

Most importantly... Have fun! Play around, and don't be afraid to ask questions.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'bottom',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t\t.onbeforechange(function() {\n\t\t\tinitialBodyStyle = initialBodyStyle || document.body.style // store initial body style\n\t\t\tdocument.body.style.overflow = 'hidden' // prevent tooltip layer from creating scrollbars\n\t\t})\n\t\t.onexit(function() {\n\t\t\tdocument.body.style.overflow = initialBodyStyle // restore initial body style\n\t\t\tstorage.setItem(flagKey, true)\n\t\t})\n\tintro.start()\n}\n\nexport { tryStartTour, startTour }\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerStudyDownloadModal.vue?vue&type=style&index=0&id=03720b08&prod&lang=scss&scoped=true\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.$store.getters.isCommunityUser)?_c('banner',_vm._b({attrs:{\"id\":\"community-upsell\",\"learn-more-link\":\"mailto:sales@asteris.com?subject=Community user interested in other Asteris Apps\"}},'banner',_vm.$attrs,false),[_vm._v(\"\\n\\tAsteris has other apps that can help you manage your images.\\n\")]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommunityUpsellPromo.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommunityUpsellPromo.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./CommunityUpsellPromo.vue?vue&type=template&id=06c41108\"\nimport script from \"./CommunityUpsellPromo.vue?vue&type=script&lang=js\"\nexport * from \"./CommunityUpsellPromo.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AstCalibration.vue?vue&type=style&index=0&id=e4ba6302&prod&lang=scss\"","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (factory((global.MobileDragDrop = global.MobileDragDrop || {})));\n}(this, (function (exports) { 'use strict';\n\n function isTopLevelEl(el) {\n return (el === document.body || el === document.documentElement);\n }\n function getElementViewportOffset(el, axis) {\n var offset;\n if (isTopLevelEl(el)) {\n offset = (axis === 0) ? el.clientLeft : el.clientTop;\n }\n else {\n var bounds = el.getBoundingClientRect();\n offset = (axis === 0) ? bounds.left : bounds.top;\n }\n return offset;\n }\n function getElementViewportSize(el, axis) {\n var size;\n if (isTopLevelEl(el)) {\n size = (axis === 0) ? window.innerWidth : window.innerHeight;\n }\n else {\n size = (axis === 0) ? el.clientWidth : el.clientHeight;\n }\n return size;\n }\n function getSetElementScroll(el, axis, scroll) {\n var prop = (axis === 0) ? \"scrollLeft\" : \"scrollTop\";\n var isTopLevel = isTopLevelEl(el);\n if (arguments.length === 2) {\n if (isTopLevel) {\n return document.body[prop] || document.documentElement[prop];\n }\n return el[prop];\n }\n if (isTopLevel) {\n document.documentElement[prop] += scroll;\n document.body[prop] += scroll;\n }\n else {\n el[prop] += scroll;\n }\n }\n function isScrollable(el) {\n var cs = getComputedStyle(el);\n if (el.scrollHeight > el.clientHeight && (cs.overflowY === \"scroll\" || cs.overflowY === \"auto\")) {\n return true;\n }\n if (el.scrollWidth > el.clientWidth && (cs.overflowX === \"scroll\" || cs.overflowX === \"auto\")) {\n return true;\n }\n return false;\n }\n function findScrollableParent(el) {\n do {\n if (!el) {\n return undefined;\n }\n if (isScrollable(el)) {\n return el;\n }\n if (el === document.documentElement) {\n return null;\n }\n } while (el = el.parentNode);\n return null;\n }\n function determineScrollIntention(currentCoordinate, size, threshold) {\n if (currentCoordinate < threshold) {\n return -1;\n }\n else if (size - currentCoordinate < threshold) {\n return 1;\n }\n return 0;\n }\n function determineDynamicVelocity(scrollIntention, currentCoordinate, size, threshold) {\n if (scrollIntention === -1) {\n return Math.abs(currentCoordinate - threshold);\n }\n else if (scrollIntention === 1) {\n return Math.abs(size - currentCoordinate - threshold);\n }\n return 0;\n }\n function isScrollEndReached(axis, scrollIntention, scrollBounds) {\n var currentScrollOffset = (axis === 0) ? (scrollBounds.scrollX) : (scrollBounds.scrollY);\n if (scrollIntention === 1) {\n var maxScrollOffset = (axis === 0) ? (scrollBounds.scrollWidth - scrollBounds.width) : (scrollBounds.scrollHeight -\n scrollBounds.height);\n return currentScrollOffset >= maxScrollOffset;\n }\n else if (scrollIntention === -1) {\n return (currentScrollOffset <= 0);\n }\n return true;\n }\n var _options = {\n threshold: 75,\n velocityFn: function (velocity, threshold) {\n var multiplier = velocity / threshold;\n var easeInCubic = multiplier * multiplier * multiplier;\n return easeInCubic * threshold;\n }\n };\n var _scrollIntentions = {\n horizontal: 0,\n vertical: 0\n };\n var _dynamicVelocity = {\n x: 0,\n y: 0\n };\n var _scrollAnimationFrameId;\n var _currentCoordinates;\n var _hoveredElement;\n var _scrollableParent;\n var _translateDragImageFn;\n function handleDragImageTranslateOverride(event, currentCoordinates, hoveredElement, translateDragImageFn) {\n _currentCoordinates = currentCoordinates;\n _translateDragImageFn = translateDragImageFn;\n if (_hoveredElement !== hoveredElement) {\n _hoveredElement = hoveredElement;\n _scrollableParent = findScrollableParent(_hoveredElement);\n }\n var performScrollAnimation = updateScrollIntentions(_currentCoordinates, _scrollableParent, _options.threshold, _scrollIntentions, _dynamicVelocity);\n if (performScrollAnimation) {\n scheduleScrollAnimation();\n }\n else if (!!_scrollAnimationFrameId) {\n window.cancelAnimationFrame(_scrollAnimationFrameId);\n _scrollAnimationFrameId = null;\n }\n }\n function scheduleScrollAnimation() {\n if (!!_scrollAnimationFrameId) {\n return;\n }\n _scrollAnimationFrameId = window.requestAnimationFrame(scrollAnimation);\n }\n function scrollAnimation() {\n var scrollDiffX = 0, scrollDiffY = 0, isTopLevel = isTopLevelEl(_scrollableParent);\n if (_scrollIntentions.horizontal !== 0) {\n scrollDiffX = Math.round(_options.velocityFn(_dynamicVelocity.x, _options.threshold) * _scrollIntentions.horizontal);\n getSetElementScroll(_scrollableParent, 0, scrollDiffX);\n }\n if (_scrollIntentions.vertical !== 0) {\n scrollDiffY = Math.round(_options.velocityFn(_dynamicVelocity.y, _options.threshold) * _scrollIntentions.vertical);\n getSetElementScroll(_scrollableParent, 1, scrollDiffY);\n }\n if (isTopLevel) {\n _translateDragImageFn(scrollDiffX, scrollDiffY);\n }\n else {\n _translateDragImageFn(0, 0);\n }\n _scrollAnimationFrameId = null;\n if (updateScrollIntentions(_currentCoordinates, _scrollableParent, _options.threshold, _scrollIntentions, _dynamicVelocity)) {\n scheduleScrollAnimation();\n }\n }\n function updateScrollIntentions(currentCoordinates, scrollableParent, threshold, scrollIntentions, dynamicVelocity) {\n if (!currentCoordinates || !scrollableParent) {\n return false;\n }\n var scrollableParentBounds = {\n x: getElementViewportOffset(scrollableParent, 0),\n y: getElementViewportOffset(scrollableParent, 1),\n width: getElementViewportSize(scrollableParent, 0),\n height: getElementViewportSize(scrollableParent, 1),\n scrollX: getSetElementScroll(scrollableParent, 0),\n scrollY: getSetElementScroll(scrollableParent, 1),\n scrollWidth: scrollableParent.scrollWidth,\n scrollHeight: scrollableParent.scrollHeight\n };\n var currentCoordinatesOffset = {\n x: currentCoordinates.x - scrollableParentBounds.x,\n y: currentCoordinates.y - scrollableParentBounds.y\n };\n scrollIntentions.horizontal = determineScrollIntention(currentCoordinatesOffset.x, scrollableParentBounds.width, threshold);\n scrollIntentions.vertical = determineScrollIntention(currentCoordinatesOffset.y, scrollableParentBounds.height, threshold);\n if (scrollIntentions.horizontal && isScrollEndReached(0, scrollIntentions.horizontal, scrollableParentBounds)) {\n scrollIntentions.horizontal = 0;\n }\n else if (scrollIntentions.horizontal) {\n dynamicVelocity.x = determineDynamicVelocity(scrollIntentions.horizontal, currentCoordinatesOffset.x, scrollableParentBounds.width, threshold);\n }\n if (scrollIntentions.vertical && isScrollEndReached(1, scrollIntentions.vertical, scrollableParentBounds)) {\n scrollIntentions.vertical = 0;\n }\n else if (scrollIntentions.vertical) {\n dynamicVelocity.y = determineDynamicVelocity(scrollIntentions.vertical, currentCoordinatesOffset.y, scrollableParentBounds.height, threshold);\n }\n return !!(scrollIntentions.horizontal || scrollIntentions.vertical);\n }\n var scrollBehaviourDragImageTranslateOverride = handleDragImageTranslateOverride;\n\n exports.scrollBehaviourDragImageTranslateOverride = scrollBehaviourDragImageTranslateOverride;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n//# sourceMappingURL=scroll-behaviour.js.map","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerReportList.vue?vue&type=style&index=0&id=c152e392&prod&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerTools.vue?vue&type=style&index=0&id=3c1cc306&prod&lang=scss\"","'use strict';\nvar $ = require('../internals/export');\n\n// `Number.MAX_SAFE_INTEGER` constant\n// https://tc39.es/ecma262/#sec-number.max_safe_integer\n$({ target: 'Number', stat: true, nonConfigurable: true, nonWritable: true }, {\n MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"layout-grid\",on:{\"mouseleave\":function($event){return _vm.onHover(0, 0)}}},[_vm._l((_vm.maxRows),function(row){return _vm._l((_vm.maxColumns),function(col){return _c('div',{key:(row - 1) * _vm.maxColumns + col,staticClass:\"cell\",class:{\n\t\t\t\tdisabled: _vm.isCellDisabled(row, col),\n\t\t\t\thovered: _vm.hover.r >= row && _vm.hover.c >= col,\n\t\t\t\tselected: _vm.value.r >= row && _vm.value.c >= col,\n\t\t\t},on:{\"mouseover\":function($event){$event.stopPropagation();return _vm.onHover(row, col)},\"click\":function($event){return _vm.onSelect(row, col)}}})})})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LayoutGridSelector.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LayoutGridSelector.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./LayoutGridSelector.vue?vue&type=template&id=77ea46e2&scoped=true\"\nimport script from \"./LayoutGridSelector.vue?vue&type=script&lang=js\"\nexport * from \"./LayoutGridSelector.vue?vue&type=script&lang=js\"\nimport style0 from \"./LayoutGridSelector.vue?vue&type=style&index=0&id=77ea46e2&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"77ea46e2\",\n null\n \n)\n\nexport default component.exports","import introJs from 'intro.js'\nimport { getIcon } from './ViewerTour'\nimport storage from '@services/storage'\n\nconst flagKey = 'mpr-intro-new'\nlet initialBodyStyle\n\nconst tryStartTour = function() {\n\t// Don't auto-start if flag is set\n\tif (!storage.getItem(flagKey)) {\n\t\tstartTour()\n\t}\n}\n\nconst startTour = function() {\n\tconst intro = introJs()\n\tintro\n\t\t.setOptions({\n\t\t\texitOnEsc: true,\n\t\t\texitOnOverlayClick: false,\n\t\t\tshowStepNumbers: false,\n\t\t\tshowBullets: false,\n\t\t\tshowProgress: true,\n\t\t\tscrollToElement: false,\n\t\t\toverlayOpacity: 0.75,\n\t\t\tdisableInteraction: false,\n\t\t\tsteps: [\n\t\t\t\t// Welcome\n\t\t\t\t{\n\t\t\t\t\telement: null,\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Welcome to the Multi-Planar Reconstruction viewer!

\n\t\t\t\t\t\t

Select Next for an overview of the viewer's features.

\n\t\t\t\t\t`,\n\t\t\t\t},\n\t\t\t\t// Viewer\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.viewer2d.active'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Image Views

\n\t\t\t\t\t\t

MPR constructs an image volume with 3 orthogonal views.

\n\t\t\t\t\t\t

This view matches the DICOM series. The colored border denotes it as the active view.

\n\t\t\t\t\t`,\n\t\t\t\t},\n\t\t\t\t// Dot indicator\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.viewColor'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Dot Indicator

\n\t\t\t\t\t\t

The colored indicator helps associate this view with the same-colored axis in the other two views.

\n\t\t\t\t\t\t

Click it to toggle the fullscreen layout for this particular view.

\n\t\t\t\t\t`,\n\t\t\t\t},\n\t\t\t\t// Axis rotation\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.rotateCursor.y-top'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Axis Rotation

\n\t\t\t\t\t\t

Drag the circular handle to rotate the axis for its associated view (purple axis will rotate view with purple dot indicator).

\n\t\t\t\t\t\t

Advanced Usage

\n\t\t\t\t\t\t

DblClick resets the axes to their default orientation\n\t\t\t\t\t\t

Shift+Drag to rotate a single axis. Relative angles will be preserved when rotating normally.

\n\t\t\t\t\t\t

Shift+DblClick re-orthogonalizes the axes if an axis was rotated individually.

\n\t\t\t\t\t`,\n\t\t\t\t},\n\t\t\t\t// Slice thickness\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.thicknessCursor.y-top'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Slick Thickness

\n\t\t\t\t\t\t

Drag the square handles to adjust the slice thickness for its associated view.

\n\t\t\t\t\t\t

That view will display the thickness amount (mm) in the bottom left corner.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'right',\n\t\t\t\t},\n\t\t\t\t// Layout selector\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.btn-select-layout'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Select Layout & Settings

\n\t\t\t\t\t\t

Click the layout & settings button ${getIcon(\n\t\t\t\t\t\t\t'layout'\n\t\t\t\t\t\t)} to select a different view layout or toggle various overlay, axis and window level settings.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'bottom',\n\t\t\t\t},\n\t\t\t\t// Viewer tools\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.viewer-toolbar-container'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Image Tools

\n\t\t\t\t\t\t

The MPR Viewer Toolbar provides most of the same tools provided by the image viewer.

\n\t\t\t\t\t\t

Select a tool to assign that tool to whichever mouse button you used to click.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'bottom',\n\t\t\t\t},\n\t\t\t\t// Rotate slice plane tool\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.btn-rotate-slice-plane'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Rotate Slice Plane Tool

\n\t\t\t\t\t\t

Click and Drag to rotate the active view’s slice plane, horizontal rotation and vertical rotation.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'bottom',\n\t\t\t\t},\n\t\t\t\t// Blend mode selection tools\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.btn-maximum-intensity-projection'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Blend Modes

\n\t\t\t\t\t\t

Select the intensity projection / blend mode used to interpolate the slice thicknesses.

\n\t\t\t\t\t\t

Defaults to MIP (Maximum Intensity Projection)

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'bottom',\n\t\t\t\t},\n\t\t\t\t// Switch tool\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.btn-switch-views'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Switch Tool

\n\t\t\t\t\t\t

Click to switch the position of the active view with another view.

\n\t\t\t\t\t\t

Keyboard Shorcut

\n\t\t\t\t\t\t

Hold Option (Mac) or Alt (Win) and Click to perform the same action.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'bottom',\n\t\t\t\t},\n\t\t\t\t// Settings / Help\n\t\t\t\t{\n\t\t\t\t\telement: document.querySelector('.btn-help'),\n\t\t\t\t\tintro: `\n\t\t\t\t\t\t

Farewell Notes

\n\t\t\t\t\t\t

Open the Help menu ${getIcon('help-circle')} if you want to see this walkthrough again.

\n\t\t\t\t\t\t

Most importantly... Have fun! Play around, and don't be afraid to ask questions.

\n\t\t\t\t\t`,\n\t\t\t\t\tposition: 'bottom',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t\t.onbeforechange(function() {\n\t\t\tinitialBodyStyle = initialBodyStyle || document.body.style // store initial body style\n\t\t\tdocument.body.style.overflow = 'hidden' // prevent tooltip layer from creating scrollbars\n\t\t})\n\t\t.onexit(function() {\n\t\t\tdocument.body.style.overflow = initialBodyStyle // restore initial body style\n\t\t\tstorage.setItem(flagKey, true)\n\t\t})\n\tintro.start()\n}\n\nexport { tryStartTour, startTour }\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('main',{staticClass:\"viewer-layout\"},[_c('desktop-downloader'),(_vm.toolbarLocation === 'bottom')?[(_vm.mprActive)?_c('ast-mpr-viewer-tools',{attrs:{\"toolbar-location\":_vm.toolbarLocation},on:{\"toggle-drawer\":_vm.toggleDrawer}}):_c('ast-viewer-tools',{attrs:{\"active-series\":_vm.activeSeries,\"active-image\":_vm.activeImage,\"is-repository\":_vm.isRepository,\"toolbar-location\":_vm.toolbarLocation},on:{\"toggle-drawer\":_vm.toggleDrawer}})]:_vm._e(),_c('div',{staticClass:\"viewer-content\"},[_c('transition',{attrs:{\"name\":\"reveal-right\"},on:{\"after-enter\":_vm.resizeCanvases,\"after-leave\":_vm.resizeCanvases}},[(_vm.mq.medium && _vm.isPersistentDrawerOpen && !_vm.mprActive)?_c('persistent-navigation-drawer',{staticClass:\"navigation-drawer\",class:{ 'dragged-over': _vm.navPanelDraggedOver },on:{\"transition\":_vm.resizeCanvases},nativeOn:{\"dragover\":function($event){return _vm.onNavDrawerDragOver($event)},\"dragleave\":function($event){return _vm.onNavDrawerDragLeave($event)},\"drop\":function($event){return _vm.onNavDrawerDrop($event)}}},[(_vm.allowRelatedStudies && !_vm.isViewerLoading)?_c('ast-viewer-add-related-study',{attrs:{\"related-studies\":_vm.relatedStudies}}):_vm._e(),_c('div',{staticClass:\"study-container\"},[_c('transition-group',{attrs:{\"name\":\"fade\"}},_vm._l((_vm.studies),function(study){return _c('ast-viewer-study',{key:study.studyId,attrs:{\"study\":study,\"show-heading\":_vm.studies.length > 1,\"show-patient-name\":_vm.isMultiplePatients,\"clinic-code\":_vm.clinicCode}})}),1)],1)],1):_vm._e()],1),(_vm.toolbarLocation === 'left')?[(_vm.mprActive)?_c('ast-mpr-viewer-tools',{attrs:{\"toolbar-location\":_vm.toolbarLocation},on:{\"toggle-drawer\":_vm.toggleDrawer}}):_c('ast-viewer-tools',{attrs:{\"active-series\":_vm.activeSeries,\"active-image\":_vm.activeImage,\"is-repository\":_vm.isRepository,\"toolbar-location\":_vm.toolbarLocation},on:{\"toggle-drawer\":_vm.toggleDrawer}})]:_vm._e(),_c('div',{staticClass:\"page-wrapper\"},[(!_vm.mprActive)?_c('div',{ref:\"layoutContainer\",staticClass:\"layout-pane-container\"},[_vm._l((_vm.visibleCanvases),function(canvas){return _c('div',{key:canvas.index,staticClass:\"layout-pane\",style:(_vm.layoutPaneSize),on:{\"contextmenu\":_vm.openRelatedMenu,\"dragover\":function($event){return _vm.onCanvasDragOver(canvas.index, $event)},\"dragenter\":_vm.onCanvasDragEnter,\"dragexit\":_vm.onCanvasDragExit,\"dragleave\":_vm.onCanvasDragLeave,\"drop\":_vm.onCanvasDrop,\"mousedown\":function($event){return _vm.onImageViewerMouseDown($event, canvas.index)},\"touchstart\":function($event){return _vm.setActiveCanvas({ canvasIndex: canvas.index })},\"wheel\":function($event){return _vm.setActiveCanvas({ canvasIndex: canvas.index })}}},[[(_vm.canvasIsVisible(canvas))?_c('ast-image-viewer',_vm._b({directives:[{name:\"dblclick\",rawName:\"v-dblclick\",value:(function () { return _vm.$store.dispatch('resetLevels'); }),expression:\"() => $store.dispatch('resetLevels')\"}],key:canvas.index,ref:\"canvases\",refInFor:true,class:{ isActiveViewer: _vm.activeCanvasIndex == canvas.index },attrs:{\"is-repository\":_vm.isRepository,\"series\":_vm.getCanvasSeries(canvas),\"series-index\":_vm.activeStudySeries.findIndex(function (x) { return x.seriesId == canvas.seriesId; }),\"series-total\":_vm.activeStudySeries.length,\"show-overlay-text\":_vm.settings.overlayText}},'ast-image-viewer',canvas,false)):(_vm.isUnmatchedImageView(canvas) || _vm.hideLoadingText)?_c('ast-image-placeholder',{key:canvas.index,class:{ isActiveViewer: _vm.activeCanvasIndex == canvas.index },attrs:{\"index\":canvas.index}},[(_vm.studies.length && _vm.isUnmatchedImageView(canvas))?[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(canvas.imageView.name)+\" is not available\\n\\t\\t\\t\\t\\t\\t\\t\\t\")]:_vm._e()],2):_vm._e()]],2)}),(_vm.loadingText)?_c('transition',{attrs:{\"name\":\"fade\"}},[_c('h1',{staticClass:\"loading-text\"},[_vm._v(_vm._s(_vm.loadingText))])]):_vm._e()],2):_vm._e(),(_vm.mprActive)?_c('ast-mpr-viewer',_vm._b({attrs:{\"series\":_vm.getCanvasSeries(_vm.activeCanvas),\"initial-slice\":_vm.mprInitialSlice,\"initial-voi\":_vm.mprInitialVoi}},'ast-mpr-viewer',_vm.activeCanvas,false)):_vm._e(),(!_vm.mprActive && _vm.showBottomNavigation)?_c('ast-toolbar',{staticClass:\"bottom-navigation\"},[_c('ast-viewer-navigation',{attrs:{\"active-series\":_vm.activeSeries,\"all-series\":_vm.activeStudySeries,\"show-dropdowns-below\":false},on:{\"toggle-cine\":function($event){_vm.isCineDialogOpen = !_vm.isCineDialogOpen}}})],1):_vm._e()],1),(_vm.toolbarLocation === 'right')?[(_vm.mprActive)?_c('ast-mpr-viewer-tools',{attrs:{\"toolbar-location\":_vm.toolbarLocation},on:{\"toggle-drawer\":_vm.toggleDrawer}}):_c('ast-viewer-tools',{attrs:{\"active-series\":_vm.activeSeries,\"active-image\":_vm.activeImage,\"is-repository\":_vm.isRepository,\"toolbar-location\":_vm.toolbarLocation},on:{\"toggle-drawer\":_vm.toggleDrawer}})]:_vm._e(),_c('persistent-navigation-drawer',{staticClass:\"tool-help-drawer\"},[_vm._t(\"right-drawer\",[_c('ast-viewer-tool-help',{on:{\"transition\":_vm.resizeCanvases}})])],2),(_vm.showEmailImages)?_c('email-images-sidebar',{on:{\"close\":function($event){_vm.showEmailImages = false}}}):_vm._e()],2),(_vm.toolbarLocation === 'top')?[(_vm.mprActive)?_c('ast-mpr-viewer-tools',{attrs:{\"toolbar-location\":_vm.toolbarLocation},on:{\"toggle-drawer\":_vm.toggleDrawer}}):_c('ast-viewer-tools',{attrs:{\"active-series\":_vm.activeSeries,\"active-image\":_vm.activeImage,\"is-repository\":_vm.isRepository,\"toolbar-location\":_vm.toolbarLocation},on:{\"toggle-drawer\":_vm.toggleDrawer}})]:_vm._e(),_c('ast-toolbar',{attrs:{\"is-primary\":true}},[(!_vm.mprActive)?_c('div',{staticClass:\"left\"},[(!_vm.isDesktop)?_c('ast-toolbar-branding'):_vm._e(),_vm._t(\"primary-buttons-left\"),_vm._l((_vm.getPrimaryToolbarGroup('left')),function(btn,title){return _c('ast-toolbar-button',{key:title,class:btn.class,attrs:{\"icon\":btn.icon,\"title\":title,\"label\":btn.label,\"has-notification\":btn.hasNotification},nativeOn:{\"click\":function($event){return btn.action()}}})}),_c('ast-viewer-layout-selector',{attrs:{\"settings-config\":_vm.settingsConfig},on:{\"layout-selected\":_vm.handleLayoutSelected},scopedSlots:_vm._u([{key:\"mpr\",fn:function(){return [(!_vm.isRepository)?_c('ul',[_c('li',{class:{ disabled: !!_vm.mprLoadingReason },staticStyle:{\"display\":\"flex\",\"flex-direction\":\"row\",\"align-items\":\"flex-start\",\"max-width\":\"250px\"},on:{\"mousedown\":function($event){$event.stopPropagation();return _vm.checkAndLoadMpr($event)}}},[(_vm.hasActiveSeries && !!_vm.mprLoadingReason)?_c('svg-icon',{staticClass:\"no-disable\",attrs:{\"icon\":\"spinner-circle-thick\",\"spin\":\"\"}}):_c('svg-icon',{attrs:{\"icon\":\"layout-mpr-3x1\",\"fixed\":\"\",\"inline\":\"\"}}),_c('span',{staticStyle:{\"white-space\":\"normal\",\"text-overflow\":\"initial\",\"flex-grow\":\"1\",\"margin-left\":\"4px\"}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.mprLoadingReason || 'View MPR')+\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\")])],1)]):_vm._e()]},proxy:true}],null,false,2026806100)}),(_vm.isFullScreenSupported)?_c('ast-toolbar-button',{attrs:{\"icon\":_vm.isFullScreen ? 'fullscreen-exit-alt' : 'fullscreen-alt',\"title\":_vm.isFullScreen ? 'Exit Full Screen' : 'Full Screen'},nativeOn:{\"click\":function($event){return _vm.toggleFullScreen($event)}}}):_vm._e()],2):_c('div',{staticClass:\"left\"},[_c('ast-toolbar-branding'),_c('ast-toolbar-button',{staticClass:\"back-btn\",attrs:{\"label\":\"Exit MPR\",\"icon\":\"arrow-left\"},nativeOn:{\"click\":function($event){return (function () { return _vm.setMprActive(false); })($event)}}}),_c('ast-mpr-viewer-layout-selector')],1),(!_vm.mprActive && !_vm.showBottomNavigation)?_c('ast-viewer-navigation',{staticClass:\"top-navigation\",attrs:{\"active-series\":_vm.activeSeries,\"all-series\":_vm.activeStudySeries},on:{\"toggle-cine\":function($event){_vm.isCineDialogOpen = !_vm.isCineDialogOpen}}}):_vm._e(),_c('div',{staticClass:\"right\"},[_vm._t(\"primary-buttons-right\"),_c('help-menu',{attrs:{\"items\":_vm.helpItems}}),_c('user-menu'),_vm._l((_vm.getPrimaryToolbarGroup('right')),function(btn,title){return _c('ast-toolbar-button',{key:title,class:btn.class,attrs:{\"icon\":btn.icon,\"title\":title,\"label\":btn.label,\"has-notification\":btn.hasNotification},nativeOn:{\"click\":function($event){return btn.action()}}})})],2)],1),(!_vm.mq.medium && _vm.isModalDrawerOpen)?_c('modal-drawer',{staticClass:\"navigation-drawer\",on:{\"close\":function($event){return _vm.$store.commit('TOGGLE_MODAL_DRAWER', false)}}},[(_vm.allowRelatedStudies && !_vm.isViewerLoading)?_c('ast-viewer-add-related-study',{attrs:{\"related-studies\":_vm.relatedStudies}}):_vm._e(),_c('div',{staticClass:\"study-container\"},[_c('transition-group',{attrs:{\"name\":\"fade\"}},_vm._l((_vm.studies),function(study){return _c('ast-viewer-study',{key:study.studyId,attrs:{\"study\":study,\"show-heading\":_vm.studies.length > 1,\"show-patient-name\":_vm.isMultiplePatients},on:{\"drag-thumbnail\":function($event){return _vm.$store.commit('TOGGLE_MODAL_DRAWER', false)},\"openattachment\":_vm.openAttachment}})}),1)],1)],1):_vm._e(),_vm._t(\"dialogs\"),_vm._t(\"panels\"),(_vm.isDrawerOpen.mprActions)?_c('viewer-actions-drawer',{on:{\"save\":_vm.saveMprImageAsync,\"print\":_vm.printMprImageAsync,\"copy\":_vm.copyMprImageAsync,\"clear-annotations\":function () { return _vm.clearMprActiveAnnotations(); },\"burn-in-annotations\":function($event){return _vm.$emit('burn-in-annotations', $event)},\"close\":function($event){_vm.isDrawerOpen.mprActions = false}}}):_vm._e(),(_vm.isDrawerOpen.actions)?_c('viewer-actions-drawer',{on:{\"save\":_vm.saveCanvasAsync,\"print\":_vm.printCanvasAsync,\"copy\":_vm.copyCanvasAsync,\"show-email-images\":function($event){_vm.showEmailImages = true},\"clear-annotations\":function () { return _vm.syncClearAnnotations({ activeImage: _vm.activeImage, activeSeries: _vm.activeSeries }); },\"burn-in-annotations\":function($event){return _vm.$emit('burn-in-annotations', $event)},\"download-study\":function($event){return _vm.$emit('download-study')},\"download-dicom-images\":function($event){return _vm.$emit('download-dicom-images')},\"download-jpeg-images\":function($event){return _vm.$emit('download-jpeg-images')},\"import-into-keystone\":function($event){return _vm.$emit('import-into-keystone')},\"close\":function($event){_vm.isDrawerOpen.actions = false}}}):_vm._e(),(_vm.isDrawerOpen.dicom)?_c('dicom-tags-drawer',{attrs:{\"preview-image-url\":_vm.previewImageUrl,\"dicom-tags\":_vm.activeDicomTags,\"canvas\":_vm.activeCanvas},on:{\"close\":function($event){_vm.isDrawerOpen.dicom = false}}}):_vm._e(),(_vm.contextMenu.isOpen)?_c('ast-viewer-context-menu',{attrs:{\"top\":_vm.contextMenu.top,\"left\":_vm.contextMenu.left,\"active-series\":_vm.activeSeries,\"allow-related-studies\":_vm.allowRelatedStudies,\"related-studies\":_vm.relatedStudies,\"mpr-title\":_vm.mprLoadingReason || 'View MPR',\"mpr-loading\":!!_vm.mprLoadingReason,\"container-ref\":_vm.$refs.layoutContainer},on:{\"select\":_vm.switchSeries,\"view-mpr\":function($event){return _vm.checkAndLoadMpr()},\"close\":function($event){_vm.contextMenu.isOpen = false}}}):_vm._e(),(_vm.isCineDialogOpen)?_c('ast-cine-dialog',_vm._b({attrs:{\"is-open\":_vm.isCineDialogOpen},on:{\"play-clip\":_vm.playClip,\"pause-clip\":_vm.pauseClip,\"framerate-change\":_vm.onFrameRateChange,\"goto-image\":_vm.goToImage,\"goto-next-series\":_vm.cineNextSeries,\"goto-previous-series\":_vm.cinePreviousSeries}},'ast-cine-dialog',_vm.activeCanvas.cinePlayer,false)):_vm._e(),(_vm.mprActive)?_c('mpr-annotation-dialog'):_c('annotation-dialog'),_c('ast-hotkey-modal',{attrs:{\"show-hotkeys\":_vm.hotkeysVisible},on:{\"close\":_vm.toggleHotkeyModal}})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export const MEASUREMENT_DONE_MODIFYING = 'measurementdonemodifying'\n\nexport default {\n\tMEASUREMENT_DONE_MODIFYING,\n}\n","import { import as csTools } from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { MEASUREMENT_DONE_MODIFYING } from '@/cornerstone/_shared/events'\n\nconst triggerEvent = csTools('util/triggerEvent')\n\nexport default function triggerDoneModifying(toolName, element, image) {\n\ttriggerEvent(element, MEASUREMENT_DONE_MODIFYING, {\n\t\ttoolName,\n\t\ttoolType: toolName, // Deprecation notice: toolType will be replaced by toolName\n\t\telement,\n\t\timage,\n\t})\n}\n","import { getToolState, import as csTools } from 'cornerstone-tools'\nimport { eventBus } from '@services/eventBus'\nimport triggerDoneModifying from '../util/triggerDoneModifying'\n\nconst moveAnnotation = csTools('manipulators/moveAnnotation')\n\nexport default function toolSelectedCallback(event, annotation, interactionType = 'mouse') {\n\tmoveAnnotation(event, this, annotation, interactionType)\n\tconst UP_EVENT = interactionType === 'mouse' ? 'mouseup' : 'touchend'\n\n\t// Notify once we're done moving the tool, regardless of click vs drag\n\t// Do this before the right click check to be notified whenever moveAnnotation happens\n\tconst changedEvent = evt => {\n\t\tconst { element, image } = event.detail\n\t\ttriggerDoneModifying(this.name, element, image)\n\t\tevent.detail.element.removeEventListener(UP_EVENT, changedEvent)\n\t}\n\tevent.detail.element.addEventListener(UP_EVENT, changedEvent)\n\n\tif (event.detail.buttons === 2) return\n\n\t// wait 180ms for mouseup/touchend, indicating a click rather than a drag\n\tconst postClickEvent = () => {\n\t\tconst toolState = getToolState(event.detail.element, this.name)\n\t\teventBus.post(eventBus.type.ANNOTATION_CLICK, {\n\t\t\ttool: this,\n\t\t\ttoolState,\n\t\t\tannotation,\n\t\t\tevent,\n\t\t})\n\t}\n\tevent.detail.element.addEventListener(UP_EVENT, postClickEvent)\n\tsetTimeout(() => {\n\t\tevent.detail.element.removeEventListener(UP_EVENT, postClickEvent)\n\t}, 180)\n}\n","import * as cornerstoneTools from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { pixelToCanvas } from 'cornerstone-core/dist/cornerstone.js'\nimport { point } from 'cornerstone-math'\n\nexport const _radii = {\n\tmouse: {\n\t\tdefault: {\n\t\t\tdisplayRadius: 6,\n\t\t\thitRadius: 15,\n\t\t},\n\t\tprecision: {\n\t\t\tdisplayRadius: 50,\n\t\t\thitRadius: 54,\n\t\t},\n\t},\n\ttouch: {\n\t\tdefault: {\n\t\t\tdisplayRadius: 6,\n\t\t\thitRadius: 25,\n\t\t},\n\t\tprecision: {\n\t\t\tdisplayRadius: 50,\n\t\t\thitRadius: 56,\n\t\t},\n\t},\n}\n\nexport const precisionTools = [\n\t'AstCalibration',\n\t'AstLengthAngle',\n\t'AstRectangleRoi',\n\t'AstAngle',\n\t'AstVertebralHeart',\n\t'AstTplo',\n\t'AstTta',\n\t'AstHipDysplasia',\n\t'AstPennHip',\n]\n\nexport function initHandle(handle, coords, interactionType, options = {}) {\n\tif (handle.hasBoundingBox) return\n\tif (!handle.pointNearHandle) {\n\t\thandle.pointNearHandle = pointNearHandle\n\t}\n\tif (!handle.radii) {\n\t\thandle.radii = _radii[interactionType]\n\t}\n\tif (!handle.radius) {\n\t\thandle.radius = handle.radii.default.displayRadius\n\t}\n\tif (options.precisionHandlesEnabled) {\n\t\thandle.precisionEnabled = true\n\t}\n\tif (coords) {\n\t\thandle.drag = {\n\t\t\toriginX: handle.x,\n\t\t\toriginY: handle.y,\n\t\t\toriginDragX: coords.x,\n\t\t\toriginDragY: coords.y,\n\t\t}\n\t}\n}\n\nexport function handleLengthsAreValid(handles) {\n\tconst { start, middle, end } = handles\n\tlet isValid = true\n\tif (start && middle) {\n\t\tisValid = handleLengthIsValid(start, middle)\n\t} else if (start && end) {\n\t\tisValid = handleLengthIsValid(start, end)\n\t}\n\treturn isValid\n}\n\nexport function handleLengthIsValid(from, to) {\n\tconst handleLengthTolerance = 0.8\n\treturn !(from && to && point.distance(from, to) <= handleLengthTolerance)\n}\n\nexport function pointNearHandle(el, handle, coords) {\n\tconst handleCanvas = pixelToCanvas(el, handle)\n\tconst distance = point.distance(handleCanvas, coords)\n\tconst radiusType = handle.precision ? 'precision' : 'default'\n\tconst radius = handle.radii[radiusType].hitRadius\n\treturn distance < radius\n}\n\nexport function setPrecisionMode(handle, precision) {\n\tif (!handle.precisionEnabled) return\n\thandle.precision = !!precision\n\tconst radiusType = handle.precision ? 'precision' : 'default'\n\thandle.radius = handle.radii[radiusType].displayRadius\n}\n\nexport function disablePrecisionForInactiveHandles(element) {\n\titeratePrecisionHandles(element, handle => {\n\t\tif (handle.active || !handle.precision) return\n\t\tsetPrecisionMode(handle, false)\n\t})\n}\n\nexport function iteratePrecisionHandles(element, fn) {\n\tprecisionTools.forEach(tool => {\n\t\tconst state = cornerstoneTools.getToolState(element, tool)\n\t\tif (!state || !state.data) return\n\t\tstate.data.forEach(data => {\n\t\t\tconst { handles } = data\n\t\t\tif (!handles) return\n\t\t\tObject.entries(handles).forEach(([handleType, handleValue]) => {\n\t\t\t\tif (typeof handleValue !== 'object') return\n\t\t\t\thandleValue.type = handleType\n\t\t\t\tfn(handleValue, tool)\n\t\t\t})\n\t\t})\n\t})\n}\n","import { updateImage, pageToPixel } from 'cornerstone-core/dist/cornerstone.js'\nimport * as cornerstoneTools from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { initHandle, handleLengthsAreValid, disablePrecisionForInactiveHandles } from '@/cornerstone/tools/util/handles'\nimport triggerDoneModifying from '../tools/util/triggerDoneModifying'\n\nconst { EVENTS, removeToolState, import: csTools, store } = cornerstoneTools\nconst anyHandlesOutsideImage = csTools('manipulators/anyHandlesOutsideImage')\nconst clipToBox = csTools('util/clipToBox')\nconst triggerEvent = csTools('util/triggerEvent')\nconst state = store.state\n\nconst _moveEvents = {\n\tmouse: [EVENTS.MOUSE_MOVE, EVENTS.MOUSE_DRAG],\n\ttouch: [EVENTS.TOUCH_DRAG],\n}\n\nconst _moveEndEvents = {\n\tmouse: [EVENTS.MOUSE_UP, EVENTS.MOUSE_CLICK],\n\ttouch: [EVENTS.TOUCH_END, EVENTS.TOUCH_PINCH, EVENTS.TAP],\n}\n\n/**\n * Move a new handle\n * @public\n * @method moveNewHandle\n * @memberof Manipulators\n *\n * @param {*} evtDetail\n * @param {*} toolName\n * @param {*} annotation\n * @param {*} handle\n * @param {*} [options={}]\n * @param {Boolean} [options.deleteIfHandleOutsideImage]\n * @param {Boolean} [options.preventHandleOutsideImage]\n * @param {*} [interactionType=mouse]\n * @param {function} [doneMovingCallback]\n * @returns {undefined}\n */\nexport default function(\n\tevtDetail,\n\ttoolName,\n\tannotation,\n\thandle,\n\toptions,\n\tinteractionType = 'mouse',\n\tdoneMovingCallback\n) {\n\t// Use global defaults, unless overidden by provided options\n\toptions = Object.assign(\n\t\t{\n\t\t\tdeleteIfHandleOutsideImage: state.deleteIfHandleOutsideImage,\n\t\t\tpreventHandleOutsideImage: state.preventHandleOutsideImage,\n\t\t},\n\t\toptions\n\t)\n\n\tannotation.active = true\n\thandle.active = true\n\tstate.isToolLocked = true\n\n\tconst { element, currentPoints } = evtDetail\n\tconst coords = currentPoints.image\n\tinitHandle(handle, coords, interactionType, options)\n\tdisablePrecisionForInactiveHandles(element)\n\n\tconst moveHandler = _moveHandler.bind(this, toolName, annotation, handle, options, interactionType)\n\t// So we don't need to inline the entire `moveEndEventHandler` function\n\tconst moveEndHandler = evt => {\n\t\t_moveEndHandler(\n\t\t\ttoolName,\n\t\t\tannotation,\n\t\t\thandle,\n\t\t\toptions,\n\t\t\tinteractionType,\n\t\t\t{\n\t\t\t\tmoveHandler,\n\t\t\t\tmoveEndHandler,\n\t\t\t},\n\t\t\tevt,\n\t\t\tdoneMovingCallback\n\t\t)\n\t}\n\n\t// Add event listeners\n\t_moveEvents[interactionType].forEach(eventType => {\n\t\telement.addEventListener(eventType, moveHandler)\n\t})\n\t_moveEndEvents[interactionType].forEach(eventType => {\n\t\telement.addEventListener(eventType, moveEndHandler)\n\t})\n\telement.addEventListener(EVENTS.TOUCH_START, _stopImmediatePropagation)\n}\n\nfunction _moveHandler(toolName, annotation, handle, options, interactionType, evt) {\n\tconst { currentPoints, image, element } = evt.detail\n\tconst page = currentPoints.page\n\tconst targetLocation = pageToPixel(element, page.x, page.y)\n\n\tannotation.invalidated = true\n\thandle.active = true\n\n\tconst drag = handle.drag\n\tif (drag) {\n\t\thandle.x = drag.originX + currentPoints.image.x - drag.originDragX\n\t\thandle.y = drag.originY + currentPoints.image.y - drag.originDragY\n\t\tif (options.constrainSquare) {\n\t\t\tconst distanceDragged = {\n\t\t\t\tx: currentPoints.image.x - drag.originX,\n\t\t\t\ty: currentPoints.image.y - drag.originY,\n\t\t\t}\n\t\t\tconst isDifferentDirection =\n\t\t\t\t(distanceDragged.x < 0 && distanceDragged.y > 0) || (distanceDragged.x > 0 && distanceDragged.y < 0)\n\n\t\t\tif (Math.abs(distanceDragged.x) > Math.abs(distanceDragged.y)) {\n\t\t\t\thandle.y = isDifferentDirection ? drag.originY - distanceDragged.x : drag.originY + distanceDragged.x\n\t\t\t} else {\n\t\t\t\thandle.x = isDifferentDirection ? drag.originX - distanceDragged.y : drag.originX + distanceDragged.y\n\t\t\t}\n\t\t}\n\t} else {\n\t\thandle.x = targetLocation.x\n\t\thandle.y = targetLocation.y\n\t}\n\n\tif (options && options.preventHandleOutsideImage) {\n\t\tclipToBox(handle, image)\n\t}\n\n\tupdateImage(element)\n\n\tconst eventType = EVENTS.MEASUREMENT_MODIFIED\n\tconst modifiedEventData = {\n\t\ttoolName,\n\t\telement,\n\t\tmeasurementData: annotation,\n\t}\n\n\ttriggerEvent(element, eventType, modifiedEventData)\n}\n\nfunction _moveEndHandler(\n\ttoolName,\n\tannotation,\n\thandle,\n\toptions,\n\tinteractionType,\n\t{ moveHandler, moveEndHandler },\n\tevt,\n\tdoneMovingCallback\n) {\n\tconst { element, image } = evt.detail\n\n\t// \"Release\" the handle\n\tannotation.active = false\n\tannotation.invalidated = true\n\thandle.active = false\n\tstate.isToolLocked = false\n\n\tlet success = true\n\n\t// Remove event listeners\n\t_moveEvents[interactionType].forEach(eventType => {\n\t\telement.removeEventListener(eventType, moveHandler)\n\t})\n\t_moveEndEvents[interactionType].forEach(eventType => {\n\t\telement.removeEventListener(eventType, moveEndHandler)\n\t})\n\telement.removeEventListener(EVENTS.TOUCH_START, _stopImmediatePropagation)\n\n\tif (options.preventHandleOutsideImage) {\n\t\tclipToBox(handle, evt.detail.image)\n\t}\n\n\t// Delete the tool data if any handle is outside the image\n\tif (options.deleteIfHandleOutsideImage && anyHandlesOutsideImage(evt.detail, annotation.handles)) {\n\t\tremoveToolState(element, toolName, annotation)\n\t\tsuccess = false\n\t}\n\n\t// Delete the tool data if handle lengths are invalid\n\tif (!handleLengthsAreValid(annotation.handles)) {\n\t\tremoveToolState(element, toolName, annotation)\n\t\tsuccess = false\n\t}\n\n\t// Update Image\n\tupdateImage(element)\n\ttriggerDoneModifying(toolName, element, evt.detail.image)\n\n\tif (typeof doneMovingCallback === 'function') {\n\t\tdoneMovingCallback(evt, success)\n\t}\n}\n\n/**\n * Stop the CornerstoneToolsTouchStart event from\n * Becoming a CornerstoneToolsTouchStartActive event when\n * MoveNewHandle ends\n *\n * @private\n * @function _stopImmediatePropagation\n *\n * @param {*} evt\n * @returns {Boolean} false\n */\nfunction _stopImmediatePropagation(evt) {\n\tevt.stopImmediatePropagation()\n\n\treturn false\n}\n","import * as cornerstoneTools from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport {\n\tinitHandle,\n\tsetPrecisionMode,\n\thandleLengthsAreValid,\n\tdisablePrecisionForInactiveHandles,\n} from '@/cornerstone/tools/util/handles'\nimport triggerDoneModifying from '../tools/util/triggerDoneModifying'\n\nconst { EVENTS, external, removeToolState, import: csTools, store } = cornerstoneTools\nconst anyHandlesOutsideImage = csTools('manipulators/anyHandlesOutsideImage')\nconst clipToBox = csTools('util/clipToBox')\nconst triggerEvent = csTools('util/triggerEvent')\nconst state = store.state\n\nconst _dragEvents = {\n\tmouse: [EVENTS.MOUSE_DRAG],\n\ttouch: [EVENTS.TOUCH_DRAG],\n}\n\nconst _upOrEndEvents = {\n\tmouse: [EVENTS.MOUSE_UP, EVENTS.MOUSE_CLICK],\n\ttouch: [EVENTS.TOUCH_END, EVENTS.TOUCH_DRAG_END, EVENTS.TOUCH_PINCH, EVENTS.TOUCH_PRESS, EVENTS.TAP],\n}\n\n/**\n * Move the provided handle\n *\n * @public\n * @method moveHandle\n * @memberof Manipulators\n *\n * @param {*} evtDetail\n * @param {*} toolName\n * @param {*} annotation\n * @param {*} handle\n * @param {*} [options={}]\n * @param {Boolean} [options.deleteIfHandleOutsideImage]\n * @param {Boolean} [options.preventHandleOutsideImage]\n * @param {*} [interactionType=mouse]\n * @param {function} [doneMovingCallback]\n * @returns {undefined}\n */\nexport default function(\n\tevtDetail,\n\ttoolName,\n\tannotation,\n\thandle,\n\toptions = {},\n\tinteractionType = 'mouse',\n\tdoneMovingCallback\n) {\n\t// Use global defaults, unless overidden by provided options\n\toptions = Object.assign(\n\t\t{\n\t\t\tdeleteIfHandleOutsideImage: state.deleteIfHandleOutsideImage,\n\t\t\tpreventHandleOutsideImage: state.preventHandleOutsideImage,\n\t\t},\n\t\toptions\n\t)\n\n\tconst dragHandler = _dragHandler.bind(this, toolName, annotation, handle, options, interactionType)\n\t// So we don't need to inline the entire `upOrEndHandler` function\n\tconst upOrEndHandler = evt => {\n\t\t_upOrEndHandler(\n\t\t\ttoolName,\n\t\t\tevtDetail,\n\t\t\tannotation,\n\t\t\thandle,\n\t\t\toptions,\n\t\t\tinteractionType,\n\t\t\t{\n\t\t\t\tdragHandler,\n\t\t\t\tupOrEndHandler,\n\t\t\t},\n\t\t\tevt,\n\t\t\tdoneMovingCallback\n\t\t)\n\t}\n\n\thandle.active = true\n\tannotation.active = true\n\tstate.isToolLocked = true\n\n\tconst { element, currentPoints } = evtDetail\n\tconst coords = currentPoints.image\n\tinitHandle(handle, coords, interactionType, options)\n\tdisablePrecisionForInactiveHandles(element)\n\n\t// Add Event Listeners\n\t_dragEvents[interactionType].forEach(eventType => {\n\t\telement.addEventListener(eventType, dragHandler)\n\t})\n\t_upOrEndEvents[interactionType].forEach(eventType => {\n\t\telement.addEventListener(eventType, upOrEndHandler)\n\t})\n}\n\nfunction _dragHandler(toolName, annotation, handle, options, interactionType, evt) {\n\tconst { image, currentPoints, element } = evt.detail\n\tconst page = currentPoints.page\n\tconst targetLocation = external.cornerstone.pageToPixel(element, page.x, page.y)\n\n\thandle.active = true\n\thandle.hasMoved = true\n\n\tconst drag = handle.drag\n\tif (drag) {\n\t\thandle.x = drag.originX + currentPoints.image.x - drag.originDragX\n\t\thandle.y = drag.originY + currentPoints.image.y - drag.originDragY\n\t\tif (options.constrainSquare) {\n\t\t\tlet oppositeHandle\n\t\t\tif (Math.abs(annotation.handles.start.x - handle.x) > Math.abs(annotation.handles.end.x - handle.x)) {\n\t\t\t\toppositeHandle = annotation.handles.start\n\t\t\t} else {\n\t\t\t\toppositeHandle = annotation.handles.end\n\t\t\t}\n\t\t\tconst distanceFromOppositeHandle = {\n\t\t\t\tx: handle.x - oppositeHandle.x,\n\t\t\t\ty: handle.y - oppositeHandle.y,\n\t\t\t}\n\t\t\tconst isDifferentDirection =\n\t\t\t\t(distanceFromOppositeHandle.x < 0 && distanceFromOppositeHandle.y > 0) ||\n\t\t\t\t(distanceFromOppositeHandle.x > 0 && distanceFromOppositeHandle.y < 0)\n\t\t\tif (Math.abs(distanceFromOppositeHandle.x) > Math.abs(distanceFromOppositeHandle.y)) {\n\t\t\t\thandle.y = isDifferentDirection\n\t\t\t\t\t? oppositeHandle.y - distanceFromOppositeHandle.x\n\t\t\t\t\t: oppositeHandle.y + distanceFromOppositeHandle.x\n\t\t\t} else {\n\t\t\t\thandle.x = isDifferentDirection\n\t\t\t\t\t? oppositeHandle.x - distanceFromOppositeHandle.y\n\t\t\t\t\t: oppositeHandle.x + distanceFromOppositeHandle.y\n\t\t\t}\n\t\t}\n\t} else {\n\t\thandle.x = targetLocation.x\n\t\thandle.y = targetLocation.y\n\t}\n\n\t// TODO: A way to not flip this for textboxes on annotations\n\tannotation.invalidated = true\n\n\tif (options.preventHandleOutsideImage) {\n\t\tclipToBox(handle, image)\n\t}\n\n\texternal.cornerstone.updateImage(element)\n\n\tconst eventType = EVENTS.MEASUREMENT_MODIFIED\n\tconst modifiedEventData = {\n\t\ttoolName,\n\t\telement,\n\t\tmeasurementData: annotation,\n\t}\n\n\ttriggerEvent(element, eventType, modifiedEventData)\n}\n\nfunction _upOrEndHandler(\n\ttoolName,\n\tevtDetail,\n\tannotation,\n\thandle,\n\toptions = {},\n\tinteractionType,\n\t{ dragHandler, upOrEndHandler },\n\tevt,\n\tdoneMovingCallback\n) {\n\tconst image = evtDetail.currentPoints.image\n\tconst { element, currentPoints } = evt.detail\n\tconst coords = currentPoints.canvas\n\tconst nearHandle = handle.pointNearHandle && handle.pointNearHandle(element, handle, coords)\n\tif (nearHandle && (evt.type === EVENTS.MOUSE_CLICK || evt.type === EVENTS.TOUCH_END)) {\n\t\t// Toggle precision mode for handle on click or tap\n\t\tsetPrecisionMode(handle, !handle.precision)\n\t}\n\n\thandle.active = false\n\tannotation.active = false\n\n\t// TODO: A way to not flip this for textboxes on annotations\n\tannotation.invalidated = true\n\tstate.isToolLocked = false\n\n\t// Remove Event Listeners\n\t_dragEvents[interactionType].forEach(eventType => {\n\t\telement.removeEventListener(eventType, dragHandler)\n\t})\n\t_upOrEndEvents[interactionType].forEach(eventType => {\n\t\telement.removeEventListener(eventType, upOrEndHandler)\n\t})\n\n\t// Delete the tool data if any handle is outside the image\n\tif (options.deleteIfHandleOutsideImage && anyHandlesOutsideImage(evtDetail, annotation.handles)) {\n\t\tremoveToolState(element, toolName, annotation)\n\t}\n\n\t// Delete the tool data if handle lengths are invalid\n\tif (!handleLengthsAreValid(annotation.handles)) {\n\t\tremoveToolState(element, toolName, annotation)\n\t}\n\n\t// TODO: What dark magic makes us want to handle TOUCH_PRESS differently?\n\tif (evt.type === EVENTS.TOUCH_PRESS) {\n\t\tevt.detail.handlePressed = annotation\n\t\thandle.x = image.x // Original Event\n\t\thandle.y = image.y\n\t}\n\n\texternal.cornerstone.updateImage(element)\n\ttriggerDoneModifying(toolName, element, evt.detail.image)\n\n\tif (typeof doneMovingCallback === 'function') {\n\t\tdoneMovingCallback()\n\t}\n}\n","import {\n\texternal,\n\taddToolState,\n\tgetToolState,\n\timport as csTools,\n\ttoolColors,\n\ttoolStyle,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\n\nimport toolSelectedCallback from './_shared/toolSelectedCallback.js'\n\n// Manipulators\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\n\n// Handle helpers\nimport { initHandle } from './util/handles'\nimport { formatNumber } from '@utils/numberUtils'\nimport round from 'lodash/round'\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawJoinedLines = csTools('drawing/drawJoinedLines')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst getNewContext = csTools('drawing/getNewContext')\nconst setShadow = csTools('drawing/setShadow')\nconst textBoxWidth = csTools('drawing/textBoxWidth')\n\n// Utils\nconst lineSegDistance = csTools('util/lineSegDistance')\n\n// Cursors\nconst { angleCursor } = csTools('tools/cursors')\n\n/**\n * @public\n * @class AstAngle\n * @memberof Tools.Annotation\n * @classdesc Create and position an angle by placing three consecutive points.\n * @extends Tools.Base.BaseAnnotationTool\n * @hideconstructor\n *\n * @param {ToolConfiguration} [props={}]\n */\nexport default class AstAngle extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstAngle',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t},\n\t\t\tsvgCursor: angleCursor,\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\t\tsuper(initialConfiguration)\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t\tthis.preventNewMeasurement = false\n\t}\n\n\t// custom toolSelectedCallback for opening annotation dialog\n\ttoolSelectedCallback = toolSelectedCallback.bind(this)\n\n\t// No stats to cache when moving, but CS complains otherwise\n\tupdateCachedStats() {}\n\n\tcreateNewMeasurement(eventData) {\n\t\t// Create the measurement data for this tool with the end handle activated\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tcolor: undefined,\n\t\t\thandles: {\n\t\t\t\tstart: {\n\t\t\t\t\tx: eventData.currentPoints.image.x,\n\t\t\t\t\ty: eventData.currentPoints.image.y,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\tmiddle: {\n\t\t\t\t\tx: eventData.currentPoints.image.x,\n\t\t\t\t\ty: eventData.currentPoints.image.y,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\tx: eventData.currentPoints.image.x,\n\t\t\t\t\ty: eventData.currentPoints.image.y,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\ttextBox: {\n\t\t\t\t\tactive: false,\n\t\t\t\t\thasMoved: false,\n\t\t\t\t\tmovesIndependently: false,\n\t\t\t\t\tdrawnIndependently: true,\n\t\t\t\t\tallowedOutsideImage: true,\n\t\t\t\t\thasBoundingBox: true,\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t}\n\n\tpointNearTool(element, data, coords, isMouse = true) {\n\t\tif (data.visible === false) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst distance = isMouse ? 15 : 25\n\t\treturn (\n\t\t\tlineSegDistance(element, data.handles.start, data.handles.middle, coords) < distance ||\n\t\t\tlineSegDistance(element, data.handles.middle, data.handles.end, coords) < distance\n\t\t)\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst enabledElement = eventData.enabledElement\n\t\tconst { handleRadius, drawHandlesOnHover } = this.configuration\n\t\t// If we have no toolData for this element, return immediately as there is nothing to do\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\n\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\n\t\t// We have tool data for this element - iterate over each one and draw it\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\n\t\tconst lineWidth = toolStyle.getToolWidth()\n\n\t\tfor (let i = 0; i < toolData.data.length; i++) {\n\t\t\tconst data = toolData.data[i]\n\n\t\t\tif (data.visible === false) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tdraw(context, context => {\n\t\t\t\tsetShadow(context, this.configuration)\n\n\t\t\t\t// Differentiate the color of activation tool\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\n\t\t\t\tconst handleStartCanvas = external.cornerstone.pixelToCanvas(eventData.element, data.handles.start)\n\t\t\t\tconst handleMiddleCanvas = external.cornerstone.pixelToCanvas(eventData.element, data.handles.middle)\n\t\t\t\thandleMiddleCanvas.radius = data.handles.middle.radius || 6\n\n\t\t\t\tdrawJoinedLines(context, eventData.element, data.handles.start, [data.handles.middle, data.handles.end], {\n\t\t\t\t\tcolor,\n\t\t\t\t})\n\n\t\t\t\t// Draw the handles\n\t\t\t\tconst handleOptions = {\n\t\t\t\t\tcolor,\n\t\t\t\t\thandleRadius,\n\t\t\t\t\tdrawHandlesIfActive: drawHandlesOnHover,\n\t\t\t\t}\n\n\t\t\t\tdrawHandles(context, eventData, data.handles, handleOptions)\n\n\t\t\t\t// Default to isotropic pixel size, update suffix to reflect this\n\t\t\t\tconst columnPixelSpacing = eventData.image.columnPixelSpacing || 1\n\t\t\t\tconst rowPixelSpacing = eventData.image.rowPixelSpacing || 1\n\n\t\t\t\tconst sideA = {\n\t\t\t\t\tx: (data.handles.middle.x - data.handles.start.x) * columnPixelSpacing,\n\t\t\t\t\ty: (data.handles.middle.y - data.handles.start.y) * rowPixelSpacing,\n\t\t\t\t}\n\n\t\t\t\tconst sideB = {\n\t\t\t\t\tx: (data.handles.end.x - data.handles.middle.x) * columnPixelSpacing,\n\t\t\t\t\ty: (data.handles.end.y - data.handles.middle.y) * rowPixelSpacing,\n\t\t\t\t}\n\n\t\t\t\tconst sideC = {\n\t\t\t\t\tx: (data.handles.end.x - data.handles.start.x) * columnPixelSpacing,\n\t\t\t\t\ty: (data.handles.end.y - data.handles.start.y) * rowPixelSpacing,\n\t\t\t\t}\n\n\t\t\t\tconst sideALength = length(sideA)\n\t\t\t\tconst sideBLength = length(sideB)\n\t\t\t\tconst sideCLength = length(sideC)\n\n\t\t\t\t// Cosine law\n\t\t\t\tlet angle = Math.acos(\n\t\t\t\t\t(Math.pow(sideALength, 2) + Math.pow(sideBLength, 2) - Math.pow(sideCLength, 2)) /\n\t\t\t\t\t\t(2 * sideALength * sideBLength)\n\t\t\t\t)\n\n\t\t\t\tangle *= 180 / Math.PI\n\n\t\t\t\tdata.rAngle = formatNumber(round(angle, 2) || '')\n\n\t\t\t\tif (data.rAngle) {\n\t\t\t\t\tconst text = textBoxText(data, eventData.image.rowPixelSpacing, eventData.image.columnPixelSpacing)\n\n\t\t\t\t\tconst distance = handleMiddleCanvas.radius + 10\n\n\t\t\t\t\tlet textCoords\n\n\t\t\t\t\tif (!data.handles.textBox.hasMoved) {\n\t\t\t\t\t\ttextCoords = {\n\t\t\t\t\t\t\tx: handleMiddleCanvas.x,\n\t\t\t\t\t\t\ty: handleMiddleCanvas.y,\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst padding = 5\n\t\t\t\t\t\tconst textWidth = textBoxWidth(context, text, padding)\n\n\t\t\t\t\t\tif (handleMiddleCanvas.x < handleStartCanvas.x) {\n\t\t\t\t\t\t\ttextCoords.x -= distance + textWidth\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttextCoords.x += distance\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst transform = external.cornerstone.internal.getTransform(enabledElement)\n\n\t\t\t\t\t\ttransform.invert()\n\n\t\t\t\t\t\tconst coords = transform.transformPoint(textCoords.x, textCoords.y)\n\n\t\t\t\t\t\tdata.handles.textBox.x = coords.x\n\t\t\t\t\t\tdata.handles.textBox.y = coords.y\n\t\t\t\t\t}\n\t\t\t\t\tif (!data.handles.textBox.hidden) {\n\t\t\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\teventData.element,\n\t\t\t\t\t\t\tdata.handles.textBox,\n\t\t\t\t\t\t\ttext,\n\t\t\t\t\t\t\tdata.handles,\n\t\t\t\t\t\t\ttextBoxAnchorPoints,\n\t\t\t\t\t\t\tcolor,\n\t\t\t\t\t\t\tlineWidth,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tfunction textBoxText(data, rowPixelSpacing, columnPixelSpacing) {\n\t\t\tconst suffix = !rowPixelSpacing || !columnPixelSpacing ? ' (isotropic)' : ''\n\t\t\tconst str = '00B0' // Degrees symbol\n\n\t\t\treturn data.rAngle.toString() + String.fromCharCode(parseInt(str, 16)) + suffix\n\t\t}\n\n\t\tfunction textBoxAnchorPoints(handles) {\n\t\t\treturn [handles.start, handles.middle, handles.end]\n\t\t}\n\t}\n\n\taddNewMeasurement(evt, interactionType) {\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\n\t\tconst eventData = evt.detail\n\t\tconst element = evt.detail.element\n\t\tconst measurementData = this.createNewMeasurement(eventData)\n\n\t\tif (!measurementData) return\n\n\t\tinitHandle(measurementData.handles.start, null, interactionType, this.options)\n\t\tinitHandle(measurementData.handles.middle, null, interactionType, this.options)\n\t\tinitHandle(measurementData.handles.end, null, interactionType, this.options)\n\n\t\t// Associate this data with this imageId so we can render it and manipulate it\n\t\taddToolState(element, this.name, measurementData)\n\n\t\texternal.cornerstone.updateImage(element)\n\n\t\tconst doneMovingEndHandleCallback = () => {\n\t\t\tmeasurementData.active = false\n\t\t\tthis.preventNewMeasurement = false\n\t\t\texternal.cornerstone.updateImage(element)\n\t\t}\n\n\t\tconst doneMovingMiddleHandleCallback = doneEvt => {\n\t\t\t// Prevents if the user clicks instead of move the angle points\n\t\t\tif (doneEvt.type !== 'cornerstonetoolsmouseup' && doneEvt.type !== 'cornerstonetoolstouchend') return\n\n\t\t\tmeasurementData.active = false\n\t\t\tconst { middle, end } = measurementData.handles\n\t\t\tend.active = true\n\t\t\tend.x = middle.x\n\t\t\tend.y = middle.y\n\t\t\tif (interactionType === 'touch') {\n\t\t\t\tend.x += 50\n\t\t\t\tend.y += 50\n\t\t\t} else {\n\t\t\t\tmoveNewHandle(\n\t\t\t\t\tdoneEvt.detail,\n\t\t\t\t\tthis.name,\n\t\t\t\t\tmeasurementData,\n\t\t\t\t\tmeasurementData.handles.end,\n\t\t\t\t\tthis.options,\n\t\t\t\t\tinteractionType,\n\t\t\t\t\tdoneMovingEndHandleCallback\n\t\t\t\t)\n\t\t\t}\n\t\t\texternal.cornerstone.updateImage(element)\n\t\t}\n\n\t\t// Step 1, create start and second middle\n\t\tmoveNewHandle(\n\t\t\teventData,\n\t\t\tthis.name,\n\t\t\tmeasurementData,\n\t\t\tmeasurementData.handles.middle,\n\t\t\tthis.options,\n\t\t\tinteractionType,\n\t\t\tdoneMovingMiddleHandleCallback\n\t\t)\n\t}\n}\n\nfunction length(vector) {\n\treturn Math.sqrt(Math.pow(vector.x, 2) + Math.pow(vector.y, 2))\n}\n","/**\n * @typedef Point\n * @prop {number} x\n * @prop {number} y\n */\n\n/**\n * Finds the distance between two points\n *\n * @private\n * @function calculateLength\n *\n * @param {Object} data\n * @param {Point} data.start\n * @param {Point} data.end\n * @param {number} [colPixelSpacing=1]\n * @param {number} [rowPixelSpacing=1]\n * @returns {number} - The calculated distance\n */\nexport default function(\n { start, end },\n colPixelSpacing = 1,\n rowPixelSpacing = 1\n) {\n const dx = (end.x - start.x) * colPixelSpacing\n const dy = (end.y - start.y) * rowPixelSpacing\n\n return Math.sqrt(dx * dx + dy * dy)\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { metaData, updateImage, getEnabledElementsByImageId } from 'cornerstone-core/dist/cornerstone.js'\nimport { eventBus } from '@services/eventBus'\nimport {\n\taddToolState,\n\tgetToolState,\n\timport as csTools,\n\tremoveToolState,\n\ttoolColors,\n\tstore as csStore,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\n\nimport calculateLength from './astCalibration/calculateLength.js'\nimport store from '@store/'\nimport toolSelectedCallback from './_shared/toolSelectedCallback.js'\n\n// Manipulators\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\nimport { initHandle } from './util/handles'\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawLine = csTools('drawing/drawLine')\nconst setShadow = csTools('drawing/setShadow')\nconst getNewContext = csTools('drawing/getNewContext')\nconst lineSegDistance = csTools('util/lineSegDistance')\n\n/**\n * @public\n * @class AstCalibration\n * @memberof Tools.Custom\n *\n * @classdesc Tool for measuring distances.\n * @extends Tools.Base.BaseAnnotationTool\n */\nexport default class AstCalibration extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstCalibration',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandlesOnHover: false,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\n\t\tsuper(initialConfiguration)\n\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t}\n\n\t// custom toolSelectedCallback for opening annotation dialog\n\ttoolSelectedCallback = toolSelectedCallback.bind(this)\n\n\tcreateNewMeasurement(eventData) {\n\t\tconst { x, y } = eventData.currentPoints.image\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tcolor: undefined,\n\t\t\thandles: {\n\t\t\t\tstart: {\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t}\n\n\taddNewMeasurement(event, interactionType) {\n\t\tconst { element, image } = event.detail\n\t\tconst toolState = getToolState(element, this.name)\n\t\tif (toolState && toolState.data && toolState.data.length) return // prevent multiple calibration annotations\n\t\tconst annotation = this.createNewMeasurement(event.detail)\n\n\t\taddToolState(element, this.name, annotation)\n\t\tupdateImage(element)\n\n\t\tconst doneMovingCallback = () => {\n\t\t\teventBus.post(eventBus.type.ANNOTATION_CLICK, {\n\t\t\t\ttool: this,\n\t\t\t\ttoolState,\n\t\t\t\tannotation,\n\t\t\t\tevent,\n\t\t\t})\n\t\t\tannotation.active = false\n\t\t}\n\n\t\tinitHandle(annotation.handles.start, null, interactionType, this.options)\n\t\tmoveNewHandle(\n\t\t\tevent.detail,\n\t\t\tthis.name,\n\t\t\tannotation,\n\t\t\tannotation.handles.end,\n\t\t\tthis.options,\n\t\t\tinteractionType,\n\t\t\tdoneMovingCallback\n\t\t)\n\t}\n\n\tcalibrate(event, annotation, newLength) {\n\t\tconst { image, element } = event.detail\n\t\tconst imagePlane = metaData.get('imagePlaneModule', image.imageId)\n\t\tconst rowPixelSpacing = (imagePlane ? imagePlane.rowPixelSpacing : image.rowPixelSpacing) || 1\n\t\tconst colPixelSpacing = (imagePlane ? imagePlane.columnPixelSpacing : image.columnPixelSpacing) || 1\n\t\tconst oldPixelSpacing = {\n\t\t\tcolPixelSpacing,\n\t\t\trowPixelSpacing,\n\t\t}\n\t\tconst oldLength = calculateLength(annotation.handles, colPixelSpacing, rowPixelSpacing)\n\t\tstore.dispatch('updateCalibration', { imageId: image.asterisImageId, oldLength, oldPixelSpacing, newLength })\n\t\teventBus.broadcast(eventBus.type.VUEX_ACTION, {\n\t\t\ttype: 'calibrateFromExternalImage',\n\t\t\tpayload: {\n\t\t\t\timageId: image.asterisImageId,\n\t\t\t\toldLength,\n\t\t\t\toldPixelSpacing,\n\t\t\t\tnewLength,\n\t\t\t},\n\t\t})\n\t\tremoveToolState(element, this.name, annotation)\n\n\t\t// Force cached stats update for all tool data\n\t\tcsStore.state.tools.forEach(tool => {\n\t\t\tconst toolState = getToolState(element, tool.name)\n\t\t\tif (toolState && toolState.data && tool.updateCachedStats) {\n\t\t\t\ttoolState.data.forEach(d => {\n\t\t\t\t\ttool.updateCachedStats(image, element, d)\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t\tupdateImage(element)\n\t\t// NOTE: Could potentially remove the filter and the above `updateImage` call,\n\t\t// but this way we're guaranteed to update the current canvas element, should something strange happen upstream\n\t\tgetEnabledElementsByImageId(image.imageId)\n\t\t\t.filter(enabledElement => enabledElement.element !== element)\n\t\t\t.forEach(enabledElement => {\n\t\t\t\tupdateImage(enabledElement.element)\n\t\t\t})\n\t}\n\n\tpointNearTool(element, data, coords) {\n\t\treturn lineSegDistance(element, data.handles.start, data.handles.end, coords) < 25\n\t}\n\n\thandleSelectedCallback(evt, annotation, handle, interactionType = 'mouse') {\n\t\tconst { element, image } = event.detail\n\t\tconst toolState = getToolState(element, this.name)\n\t\tconst doneMovingCallback = () => {\n\t\t\tconst imagePlane = metaData.get('imagePlaneModule', image.imageId)\n\t\t\tconst rowPixelSpacing = (imagePlane ? imagePlane.rowPixelSpacing : image.rowPixelSpacing) || 1\n\t\t\tconst colPixelSpacing = (imagePlane ? imagePlane.columnPixelSpacing : image.columnPixelSpacing) || 1\n\t\t\tannotation.length = calculateLength(annotation.handles, colPixelSpacing, rowPixelSpacing).toFixed(2)\n\t\t}\n\t\tmoveHandle(evt.detail, this.name, annotation, handle, this.options, interactionType, doneMovingCallback)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\tif (!toolData) return\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\t\tconst { element, image } = eventData\n\t\tconst config = this.configuration\n\t\tfor (let i = 0; i < toolData.data.length; i++) {\n\t\t\tconst data = toolData.data[i]\n\t\t\tif (data.visible === false) continue\n\n\t\t\t// update length\n\t\t\tconst imagePlane = metaData.get('imagePlaneModule', image.imageId)\n\t\t\tconst rowPixelSpacing = (imagePlane ? imagePlane.rowPixelSpacing : image.rowPixelSpacing) || 1\n\t\t\tconst colPixelSpacing = (imagePlane ? imagePlane.columnPixelSpacing : image.columnPixelSpacing) || 1\n\t\t\tdata.length = calculateLength(data.handles, colPixelSpacing, rowPixelSpacing).toFixed(2)\n\n\t\t\tdraw(context, context => {\n\t\t\t\tsetShadow(context, config)\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tdrawLine(context, element, data.handles.start, data.handles.end, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tlineDash: [5, 5],\n\t\t\t\t})\n\t\t\t\tconst handleOptions = {\n\t\t\t\t\tcolor,\n\t\t\t\t\tdrawHandlesIfActive: config && config.drawHandlesOnHover,\n\t\t\t\t}\n\t\t\t\tdrawHandles(context, eventData, data.handles, handleOptions)\n\t\t\t})\n\t\t}\n\t}\n}\n","import {\n\texternal,\n\timport as csTools,\n\tgetToolState,\n\ttoolColors,\n\taddToolState,\n\tremoveToolState,\n\tEVENTS,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { openPromptDlg } from '@dialogs/TextPromptDlg'\nimport toolSelectedCallback from './_shared/toolSelectedCallback.js'\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport triggerDoneModifying from './util/triggerDoneModifying.js'\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\nconst triggerEvent = csTools('util/triggerEvent')\nconst getNewContext = csTools('drawing/getNewContext')\nconst draw = csTools('drawing/draw')\nconst setShadow = csTools('drawing/setShadow')\nconst drawTextBox = csTools('drawing/drawTextBox')\nconst pointInsideBoundingBox = csTools('util/pointInsideBoundingBox')\n\nexport default class AstText extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstText',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\tconfiguration: {\n\t\t\t\tasync getTextCallback(cb) {\n\t\t\t\t\tconst text = await openPromptDlg({\n\t\t\t\t\t\ttitle: 'New Text Annotation',\n\t\t\t\t\t\tprompt: 'Enter your annotation text:',\n\t\t\t\t\t\trequireInput: true,\n\t\t\t\t\t})\n\t\t\t\t\tcb(text)\n\t\t\t\t},\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t},\n\t\t}\n\t\tsuper(configuration, defaultConfig)\n\t}\n\n\t// custom toolSelectedCallback for opening annotation dialog\n\ttoolSelectedCallback = toolSelectedCallback.bind(this)\n\n\tcreateNewMeasurement(e) {\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tcolor: undefined,\n\t\t\ttext: '...',\n\t\t\thandles: {\n\t\t\t\tend: {\n\t\t\t\t\tx: e.detail.currentPoints.image.x,\n\t\t\t\t\ty: e.detail.currentPoints.image.y,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t\thasBoundingBox: true,\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t}\n\n\taddNewMeasurement(e, interactionType) {\n\t\tconst element = e.detail.element\n\t\tconst measurementData = this.createNewMeasurement(e)\n\n\t\taddToolState(element, this.name, measurementData)\n\t\texternal.cornerstone.updateImage(element)\n\n\t\tmoveNewHandle(\n\t\t\te.detail,\n\t\t\tthis.name,\n\t\t\tmeasurementData,\n\t\t\tmeasurementData.handles.end,\n\t\t\tthis.options,\n\t\t\tinteractionType,\n\t\t\t(e, success) => {\n\t\t\t\tif (!success) {\n\t\t\t\t\tremoveToolState(element, this.name, measurementData)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.configuration.getTextCallback(text => {\n\t\t\t\t\tif (!text) {\n\t\t\t\t\t\tremoveToolState(element, this.name, measurementData)\n\t\t\t\t\t\texternal.cornerstone.updateImage(element)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tmeasurementData.text = text\n\t\t\t\t\tmeasurementData.active = false\n\t\t\t\t\texternal.cornerstone.updateImage(element)\n\t\t\t\t\ttriggerDoneModifying(this.name, element, e.detail.image)\n\t\t\t\t}, e.detail)\n\t\t\t\texternal.cornerstone.updateImage(element)\n\n\t\t\t\tconst modifiedEventData = {\n\t\t\t\t\ttoolName: this.name,\n\t\t\t\t\ttoolType: this.name, // Deprecation notice: toolType will be replaced by toolName\n\t\t\t\t\telement,\n\t\t\t\t\tmeasurementData,\n\t\t\t\t}\n\t\t\t\ttriggerEvent(element, EVENTS.MEASUREMENT_COMPLETED, modifiedEventData)\n\t\t\t}\n\t\t)\n\t}\n\n\tupdateCachedStats() {}\n\n\trenderToolData(e) {\n\t\tconst toolData = getToolState(e.detail.element, this.name)\n\t\tif (!toolData) return\n\n\t\tconst canvas = e.detail.canvasContext.canvas\n\t\tconst context = getNewContext(canvas)\n\n\t\tfor (let i = 0; i < toolData.data.length; i++) {\n\t\t\tconst data = toolData.data[i]\n\t\t\tif (data.visible === false) continue\n\n\t\t\tdraw(context, context => {\n\t\t\t\tsetShadow(context, this.configuration)\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tconst textCoords = external.cornerstone.pixelToCanvas(e.detail.element, data.handles.end)\n\t\t\t\tconst options = {\n\t\t\t\t\tcentering: {\n\t\t\t\t\t\tx: true,\n\t\t\t\t\t\ty: true,\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t\tdata.handles.end.boundingBox = drawTextBox(\n\t\t\t\t\tcontext,\n\t\t\t\t\tdata.text || ' ',\n\t\t\t\t\ttextCoords.x,\n\t\t\t\t\ttextCoords.y - 10,\n\t\t\t\t\tcolor,\n\t\t\t\t\toptions\n\t\t\t\t)\n\t\t\t})\n\t\t}\n\t}\n\n\thandleSelectedCallback(e, toolData, handle, interactionType = 'mouse') {\n\t\t// open annotation dialog when textbox is clicked\n\t\tthis.toolSelectedCallback(e, toolData, interactionType)\n\t}\n\n\tpointNearTool(element, data, coords) {\n\t\tif (data.visible === false) return false\n\t\tif (!data.handles.end.boundingBox) return false\n\n\t\tconst distanceToPoint = external.cornerstoneMath.rect.distanceToPoint(data.handles.end.boundingBox, coords)\n\t\tconst insideBoundingBox = pointInsideBoundingBox(data.handles.end, coords)\n\t\treturn distanceToPoint < 10 || insideBoundingBox\n\t}\n}\n","import {\n\tArrowAnnotateTool,\n\texternal,\n\taddToolState,\n\tremoveToolState,\n\tEVENTS,\n\timport as csTools,\n\tgetToolState,\n\ttoolStyle,\n\tgetModule,\n\ttextStyle,\n\ttoolColors,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { openPromptDlg } from '@dialogs/TextPromptDlg'\nimport toolSelectedCallback from './_shared/toolSelectedCallback.js'\n\n// Manipulators\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\nimport triggerDoneModifying from './util/triggerDoneModifying.js'\n\nconst triggerEvent = csTools('util/triggerEvent')\nconst getNewContext = csTools('drawing/getNewContext')\nconst draw = csTools('drawing/draw')\nconst setShadow = csTools('drawing/setShadow')\nconst drawArrow = csTools('drawing/drawArrow')\nconst textBoxWidth = csTools('drawing/textBoxWidth')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\n\nexport default class AstArrowAnnotate extends ArrowAnnotateTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstArrowAnnotate',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tchangeTextCallback: () => {},\n\t\t\t\tasync getTextCallback(cb) {\n\t\t\t\t\tconst text = await openPromptDlg({\n\t\t\t\t\t\ttitle: 'New Arrow Annotation',\n\t\t\t\t\t\tprompt: 'Enter your annotation text (optional):',\n\t\t\t\t\t\trequireInput: false,\n\t\t\t\t\t})\n\t\t\t\t\tcb(text)\n\t\t\t\t},\n\t\t\t\tdrawHandlesOnHover: true,\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\t\tsuper(initialConfiguration)\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t}\n\n\t// custom toolSelectedCallback for opening annotation dialog\n\ttoolSelectedCallback = toolSelectedCallback.bind(this)\n\n\taddNewMeasurement(evt, interactionType) {\n\t\tconst element = evt.detail.element\n\t\tconst measurementData = this.createNewMeasurement(evt)\n\n\t\t// Associate this data with this imageId so we can render it and manipulate it\n\t\taddToolState(element, this.name, measurementData)\n\t\texternal.cornerstone.updateImage(element)\n\n\t\tmoveNewHandle(\n\t\t\tevt.detail,\n\t\t\tthis.name,\n\t\t\tmeasurementData,\n\t\t\tmeasurementData.handles.end,\n\t\t\tthis.options,\n\t\t\tinteractionType,\n\t\t\t(evt, success) => {\n\t\t\t\tif (success) {\n\t\t\t\t\tif (measurementData.text === undefined) {\n\t\t\t\t\t\tthis.configuration.getTextCallback(text => {\n\t\t\t\t\t\t\tif (text) {\n\t\t\t\t\t\t\t\tmeasurementData.text = text\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmeasurementData.active = false\n\t\t\t\t\t\t\texternal.cornerstone.updateImage(element)\n\t\t\t\t\t\t\ttriggerDoneModifying(this.name, element, evt.detail.image)\n\t\t\t\t\t\t}, evt.detail)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tremoveToolState(element, this.name, measurementData)\n\t\t\t\t}\n\n\t\t\t\texternal.cornerstone.updateImage(element)\n\n\t\t\t\tconst modifiedEventData = {\n\t\t\t\t\ttoolName: this.name,\n\t\t\t\t\ttoolType: this.name, // Deprecation notice: toolType will be replaced by toolName\n\t\t\t\t\telement,\n\t\t\t\t\tmeasurementData,\n\t\t\t\t}\n\n\t\t\t\ttriggerEvent(element, EVENTS.MEASUREMENT_COMPLETED, modifiedEventData)\n\t\t\t}\n\t\t)\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\trenderToolData(evt) {\n\t\tconst { element, enabledElement } = evt.detail\n\t\tconst { handleRadius, drawHandlesOnHover, renderDashed } = this.configuration\n\n\t\t// If we have no toolData for this element, return immediately as there is nothing to do\n\t\tconst toolData = getToolState(element, this.name)\n\n\t\tif (!toolData) {\n\t\t\treturn\n\t\t}\n\n\t\t// We have tool data for this element - iterate over each one and draw it\n\t\tconst canvas = evt.detail.canvasContext.canvas\n\t\tconst context = getNewContext(canvas)\n\n\t\tconst lineWidth = toolStyle.getToolWidth()\n\n\t\tlet lineDash\n\t\tif (renderDashed) {\n\t\t\tlineDash = getModule('globalConfiguration').configuration.lineDash\n\t\t}\n\n\t\tfor (let i = 0; i < toolData.data.length; i++) {\n\t\t\tconst data = toolData.data[i]\n\n\t\t\tif (data.visible === false) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tdraw(context, context => {\n\t\t\t\tsetShadow(context, this.configuration)\n\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\n\t\t\t\t// Draw the arrow\n\t\t\t\tconst handleStartCanvas = external.cornerstone.pixelToCanvas(element, data.handles.start)\n\t\t\t\tconst handleEndCanvas = external.cornerstone.pixelToCanvas(element, data.handles.end)\n\n\t\t\t\t// Config.arrowFirst = false;\n\t\t\t\tif (this.configuration.arrowFirst) {\n\t\t\t\t\tdrawArrow(context, handleEndCanvas, handleStartCanvas, color, lineWidth, lineDash)\n\t\t\t\t} else {\n\t\t\t\t\tdrawArrow(context, handleStartCanvas, handleEndCanvas, color, lineWidth, lineDash)\n\t\t\t\t}\n\n\t\t\t\tconst handleOptions = {\n\t\t\t\t\tcolor,\n\t\t\t\t\thandleRadius,\n\t\t\t\t\tdrawHandlesIfActive: drawHandlesOnHover,\n\t\t\t\t}\n\n\t\t\t\tif (this.configuration.drawHandles) {\n\t\t\t\t\tdrawHandles(context, evt.detail, data.handles, handleOptions)\n\t\t\t\t}\n\n\t\t\t\tconst text = textBoxText(data)\n\n\t\t\t\t// Draw the text\n\t\t\t\tif (text && text !== '') {\n\t\t\t\t\t// Calculate the text coordinates.\n\t\t\t\t\tconst padding = 5\n\t\t\t\t\tconst textWidth = textBoxWidth(context, text, padding)\n\t\t\t\t\tconst textHeight = textStyle.getFontSize() + 10\n\n\t\t\t\t\tlet distance = Math.max(textWidth, textHeight) / 2 + 5\n\n\t\t\t\t\tif (handleEndCanvas.x < handleStartCanvas.x) {\n\t\t\t\t\t\tdistance = -distance\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!data.handles.textBox.hasMoved) {\n\t\t\t\t\t\tlet textCoords\n\n\t\t\t\t\t\tif (this.configuration.arrowFirst) {\n\t\t\t\t\t\t\ttextCoords = {\n\t\t\t\t\t\t\t\tx: handleEndCanvas.x - textWidth / 2 + distance,\n\t\t\t\t\t\t\t\ty: handleEndCanvas.y - textHeight / 2,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If the arrow is at the End position, the text should\n\t\t\t\t\t\t\t// Be placed near the Start position\n\t\t\t\t\t\t\ttextCoords = {\n\t\t\t\t\t\t\t\tx: handleStartCanvas.x - textWidth / 2 - distance,\n\t\t\t\t\t\t\t\ty: handleStartCanvas.y - textHeight / 2,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst transform = external.cornerstone.internal.getTransform(enabledElement)\n\n\t\t\t\t\t\ttransform.invert()\n\n\t\t\t\t\t\tconst coords = transform.transformPoint(textCoords.x, textCoords.y)\n\n\t\t\t\t\t\tdata.handles.textBox.x = coords.x\n\t\t\t\t\t\tdata.handles.textBox.y = coords.y\n\t\t\t\t\t}\n\t\t\t\t\tif (!data.handles.textBox.hidden) {\n\t\t\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\telement,\n\t\t\t\t\t\t\tdata.handles.textBox,\n\t\t\t\t\t\t\ttext,\n\t\t\t\t\t\t\tdata.handles,\n\t\t\t\t\t\t\ttextBoxAnchorPoints,\n\t\t\t\t\t\t\tcolor,\n\t\t\t\t\t\t\tlineWidth,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tfunction textBoxText(data) {\n\t\t\treturn data.text\n\t\t}\n\n\t\tfunction textBoxAnchorPoints(handles) {\n\t\t\tconst midpoint = {\n\t\t\t\tx: (handles.start.x + handles.end.x) / 2,\n\t\t\t\ty: (handles.start.y + handles.end.y) / 2,\n\t\t\t}\n\n\t\t\treturn [handles.start, midpoint, handles.end]\n\t\t}\n\t}\n}\n","import { metaData } from 'cornerstone-core/dist/cornerstone.js'\n\nexport default function getPixelSpacing(image: any) {\n\tlet { rowPixelSpacing, columnPixelSpacing } = image || {}\n\tlet isPixelSpacingDefined = true\n\tconst imagePlane = metaData.get('imagePlaneModule', image.imageId)\n\tif (imagePlane) {\n\t\trowPixelSpacing = imagePlane.rowPixelSpacing || imagePlane.rowImagePixelSpacing\n\t\tcolumnPixelSpacing = imagePlane.columnPixelSpacing || imagePlane.colImagePixelSpacing\n\t\tisPixelSpacingDefined = imagePlane.isPixelSpacingDefined\n\t}\n\tif (rowPixelSpacing == null || columnPixelSpacing == null) {\n\t\trowPixelSpacing = 1\n\t\tcolumnPixelSpacing = 1\n\t\tisPixelSpacingDefined = false\n\t}\n\treturn {\n\t\trowPixelSpacing,\n\t\tcolumnPixelSpacing,\n\t\tisPixelSpacingDefined,\n\t}\n}\n","import {\n\tRectangleRoiTool,\n\texternal,\n\taddToolState,\n\timport as csTools,\n\tgetToolState,\n\ttoolStyle,\n\tgetModule,\n\ttoolColors,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\n\n// Manipulators\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport toolSelectedCallback from './_shared/toolSelectedCallback.js'\n\n// Handle helpers\nimport { initHandle } from './util/handles'\nimport getImagePixelSpacing from './util/getImagePixelSpacing'\nimport { formatNumber } from '@utils/numberUtils'\nimport round from 'lodash/round'\n\nconst getNewContext = csTools('drawing/getNewContext')\nconst draw = csTools('drawing/draw')\nconst setShadow = csTools('drawing/setShadow')\nconst drawRect = csTools('drawing/drawRect')\nconst drawHandles = csTools('drawing/drawHandles')\nconst getROITextBoxCoords = csTools('util/getROITextBoxCoords')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst calculateSUV = csTools('util/calculateSUV')\n\nexport default class AstRectangleRoi extends RectangleRoiTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstRectangleRoi',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandles: true,\n\t\t\t\tshowHounsfieldUnits: true,\n\t\t\t\tshowMinMax: true,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\t\tsuper(initialConfiguration)\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t}\n\n\t// custom toolSelectedCallback for opening annotation dialog\n\ttoolSelectedCallback = toolSelectedCallback.bind(this)\n\n\taddNewMeasurement(evt, interactionType) {\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\t\tconst eventData = evt.detail\n\t\tconst element = eventData.element\n\t\tconst measurementData = this.createNewMeasurement(eventData)\n\n\t\tif (!measurementData) {\n\t\t\treturn\n\t\t}\n\n\t\t// Associate this data with this imageId so we can render it and manipulate it\n\t\taddToolState(element, this.name, measurementData)\n\n\t\texternal.cornerstone.updateImage(element)\n\n\t\tinitHandle(measurementData.handles.start, null, interactionType, this.options)\n\t\tmoveNewHandle(eventData, this.name, measurementData, measurementData.handles.end, this.options, interactionType)\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\trenderToolData(evt) {\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\n\t\tif (!toolData) {\n\t\t\treturn\n\t\t}\n\n\t\tconst eventData = evt.detail\n\t\tconst { image, element } = eventData\n\t\tconst lineWidth = toolStyle.getToolWidth()\n\t\tconst lineDash = getModule('globalConfiguration').configuration.lineDash\n\t\tconst { handleRadius, drawHandlesOnHover, renderDashed } = this.configuration\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\t\tconst { rowPixelSpacing, columnPixelSpacing, isPixelSpacingDefined } = getImagePixelSpacing(image)\n\n\t\t// Meta\n\t\tconst seriesModule = external.cornerstone.metaData.get('series', image.imageId) || {}\n\n\t\t// Pixel Spacing\n\t\tconst modality = seriesModule.modality\n\n\t\tdraw(context, context => {\n\t\t\t// If we have tool data for this element - iterate over each set and draw it\n\t\t\tfor (let i = 0; i < toolData.data.length; i++) {\n\t\t\t\tconst data = toolData.data[i]\n\n\t\t\t\tif (data.visible === false) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// Configure\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tconst handleOptions = {\n\t\t\t\t\tcolor,\n\t\t\t\t\thandleRadius,\n\t\t\t\t\tdrawHandlesIfActive: drawHandlesOnHover,\n\t\t\t\t}\n\n\t\t\t\tsetShadow(context, this.configuration)\n\n\t\t\t\tconst rectOptions = { color }\n\n\t\t\t\tif (renderDashed) {\n\t\t\t\t\trectOptions.lineDash = lineDash\n\t\t\t\t}\n\n\t\t\t\t// Draw\n\t\t\t\tdrawRect(\n\t\t\t\t\tcontext,\n\t\t\t\t\telement,\n\t\t\t\t\tdata.handles.start,\n\t\t\t\t\tdata.handles.end,\n\t\t\t\t\trectOptions,\n\t\t\t\t\t'pixel',\n\t\t\t\t\tdata.handles.initialRotation\n\t\t\t\t)\n\n\t\t\t\tif (this.configuration.drawHandles) {\n\t\t\t\t\tdrawHandles(context, eventData, data.handles, handleOptions)\n\t\t\t\t}\n\n\t\t\t\t// Update textbox stats\n\t\t\t\tif (data.invalidated === true) {\n\t\t\t\t\tif (data.cachedStats) {\n\t\t\t\t\t\tthis.throttledUpdateCachedStats(image, element, data)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.updateCachedStats(image, element, data)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Default to textbox on right side of ROI\n\t\t\t\tif (!data.handles.textBox.hasMoved) {\n\t\t\t\t\tconst defaultCoords = getROITextBoxCoords(eventData.viewport, data.handles)\n\n\t\t\t\t\tObject.assign(data.handles.textBox, defaultCoords)\n\t\t\t\t}\n\n\t\t\t\tconst textBoxAnchorPoints = handles => _findTextBoxAnchorPoints(handles.start, handles.end)\n\t\t\t\tconst textBoxContent = _createTextBoxContent(\n\t\t\t\t\tcontext,\n\t\t\t\t\timage.color,\n\t\t\t\t\tdata.cachedStats,\n\t\t\t\t\tmodality,\n\t\t\t\t\tisPixelSpacingDefined,\n\t\t\t\t\tthis.configuration\n\t\t\t\t)\n\t\t\t\tdata.handles.textBox.text = textBoxContent\n\n\t\t\t\tdata.unit = _getUnit(modality, this.configuration.showHounsfieldUnits)\n\n\t\t\t\tif (!data.handles.textBox.hidden) {\n\t\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\telement,\n\t\t\t\t\t\tdata.handles.textBox,\n\t\t\t\t\t\ttextBoxContent,\n\t\t\t\t\t\tdata.handles,\n\t\t\t\t\t\ttextBoxAnchorPoints,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tlineWidth,\n\t\t\t\t\t\t10,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n\n/**\n * TODO: This is the same method (+ GetPixels) for the other ROIs\n * TODO: The pixel filtering is the unique bit\n *\n * @param {*} startHandle\n * @param {*} endHandle\n * @returns {{ left: number, top: number, width: number, height: number}}\n */\nfunction _getRectangleImageCoordinates(startHandle, endHandle) {\n\treturn {\n\t\tleft: Math.min(startHandle.x, endHandle.x),\n\t\ttop: Math.min(startHandle.y, endHandle.y),\n\t\twidth: Math.abs(startHandle.x - endHandle.x),\n\t\theight: Math.abs(startHandle.y - endHandle.y),\n\t}\n}\n\n/**\n *\n *\n * @param {*} image\n * @param {*} element\n * @param {*} handles\n * @param {*} modality\n * @param {*} pixelSpacing\n * @returns {Object} The Stats object\n */\nfunction _calculateStats(image, element, handles, modality, pixelSpacing) {\n\t// Retrieve the bounds of the rectangle in image coordinates\n\tconst roiCoordinates = _getRectangleImageCoordinates(handles.start, handles.end)\n\n\t// Retrieve the array of pixels that the rectangle bounds cover\n\tconst pixels = external.cornerstone.getPixels(\n\t\telement,\n\t\troiCoordinates.left,\n\t\troiCoordinates.top,\n\t\troiCoordinates.width,\n\t\troiCoordinates.height\n\t)\n\n\t// Calculate the mean & standard deviation from the pixels and the rectangle details\n\tconst roiMeanStdDev = _calculateRectangleStats(pixels, roiCoordinates)\n\n\tlet meanStdDevSUV\n\n\tif (modality === 'PT') {\n\t\tmeanStdDevSUV = {\n\t\t\tmean: calculateSUV(image, roiMeanStdDev.mean, true) || 0,\n\t\t\tstdDev: calculateSUV(image, roiMeanStdDev.stdDev, true) || 0,\n\t\t}\n\t}\n\n\t// Calculate the image area from the rectangle dimensions and pixel spacing\n\tconst area =\n\t\troiCoordinates.width *\n\t\t(pixelSpacing.colPixelSpacing || 1) *\n\t\t(roiCoordinates.height * (pixelSpacing.rowPixelSpacing || 1))\n\n\treturn {\n\t\tarea: area || 0,\n\t\tcount: roiMeanStdDev.count || 0,\n\t\tmean: roiMeanStdDev.mean || 0,\n\t\tvariance: roiMeanStdDev.variance || 0,\n\t\tstdDev: roiMeanStdDev.stdDev || 0,\n\t\tmin: roiMeanStdDev.min || 0,\n\t\tmax: roiMeanStdDev.max || 0,\n\t\tmeanStdDevSUV,\n\t}\n}\n\n/**\n *\n *\n * @param {*} sp\n * @param {*} rectangle\n * @returns {{ count, number, mean: number, variance: number, stdDev: number, min: number, max: number }}\n */\nfunction _calculateRectangleStats(sp, rectangle) {\n\tlet sum = 0\n\tlet sumSquared = 0\n\tlet count = 0\n\tlet index = 0\n\tlet min = sp ? sp[0] : null\n\tlet max = sp ? sp[0] : null\n\n\tfor (let y = rectangle.top; y < rectangle.top + rectangle.height; y++) {\n\t\tfor (let x = rectangle.left; x < rectangle.left + rectangle.width; x++) {\n\t\t\tsum += sp[index]\n\t\t\tsumSquared += sp[index] * sp[index]\n\t\t\tmin = Math.min(min, sp[index])\n\t\t\tmax = Math.max(max, sp[index])\n\t\t\tcount++ // TODO: Wouldn't this just be sp.length?\n\t\t\tindex++\n\t\t}\n\t}\n\n\tif (count === 0) {\n\t\treturn {\n\t\t\tcount,\n\t\t\tmean: 0.0,\n\t\t\tvariance: 0.0,\n\t\t\tstdDev: 0.0,\n\t\t\tmin: 0.0,\n\t\t\tmax: 0.0,\n\t\t}\n\t}\n\n\tconst mean = sum / count\n\tconst variance = sumSquared / count - mean * mean\n\n\treturn {\n\t\tcount,\n\t\tmean,\n\t\tvariance,\n\t\tstdDev: Math.sqrt(variance),\n\t\tmin,\n\t\tmax,\n\t}\n}\n\n/**\n *\n *\n * @param {*} startHandle\n * @param {*} endHandle\n * @returns {Array.<{x: number, y: number}>}\n */\nfunction _findTextBoxAnchorPoints(startHandle, endHandle) {\n\tconst { left, top, width, height } = _getRectangleImageCoordinates(startHandle, endHandle)\n\n\treturn [\n\t\t{\n\t\t\t// Top middle point of rectangle\n\t\t\tx: left + width / 2,\n\t\t\ty: top,\n\t\t},\n\t\t{\n\t\t\t// Left middle point of rectangle\n\t\t\tx: left,\n\t\t\ty: top + height / 2,\n\t\t},\n\t\t{\n\t\t\t// Bottom middle point of rectangle\n\t\t\tx: left + width / 2,\n\t\t\ty: top + height,\n\t\t},\n\t\t{\n\t\t\t// Right middle point of rectangle\n\t\t\tx: left + width,\n\t\t\ty: top + height / 2,\n\t\t},\n\t]\n}\n\n/**\n *\n *\n * @param {*} area\n * @param {*} hasPixelSpacing\n * @returns {string} The formatted label for showing area\n */\nfunction _formatArea(area, hasPixelSpacing) {\n\t// This uses Char code 178 for a superscript 2\n\tconst suffix = hasPixelSpacing ? ` mm${String.fromCharCode(178)}` : ` px${String.fromCharCode(178)}`\n\n\treturn `Area: ${formatNumber(round(area, 2))}${suffix}`\n}\n\nfunction _getUnit(modality, showHounsfieldUnits) {\n\treturn modality === 'CT' && showHounsfieldUnits !== false ? 'HU' : ''\n}\n\n/**\n * TODO: This is identical to EllipticalROI's same fn\n * TODO: We may want to make this a utility for ROIs with these values?\n *\n * @param {*} context\n * @param {*} isColorImage\n * @param {*} { area, mean, stdDev, min, max, meanStdDevSUV }\n * @param {*} modality\n * @param {*} hasPixelSpacing\n * @param {*} [options={}]\n * @returns {string[]}\n */\nfunction _createTextBoxContent(\n\tcontext,\n\tisColorImage,\n\t{ area, mean, stdDev, min, max, meanStdDevSUV } = {},\n\tmodality,\n\thasPixelSpacing,\n\toptions = {}\n) {\n\tconst showMinMax = options.showMinMax || false\n\tconst textLines = []\n\n\tconst otherLines = []\n\n\tconst showStats = !isColorImage && ['PT', 'CT'].includes(modality)\n\n\tif (showStats) {\n\t\tconst hasStandardUptakeValues = meanStdDevSUV && meanStdDevSUV.mean !== 0\n\t\tconst unit = _getUnit(modality, options.showHounsfieldUnits)\n\n\t\tlet meanString = `Mean: ${formatNumber(round(mean, 2))} ${unit}`\n\t\tconst stdDevString = `Std Dev: ${formatNumber(round(stdDev, 2))} ${unit}`\n\n\t\t// If this image has SUV values to display, concatenate them to the text line\n\t\tif (hasStandardUptakeValues) {\n\t\t\tconst SUVtext = ' SUV: '\n\n\t\t\tconst meanSuvString = `${SUVtext}${formatNumber(round(meanStdDevSUV.mean, 2))}`\n\t\t\tconst stdDevSuvString = `${SUVtext}${formatNumber(round(meanStdDevSUV.stdDev, 2))}`\n\n\t\t\tconst targetStringLength = Math.floor(context.measureText(`${stdDevString} `).width)\n\n\t\t\twhile (context.measureText(meanString).width < targetStringLength) {\n\t\t\t\tmeanString += ' '\n\t\t\t}\n\n\t\t\totherLines.push(`${meanString}${meanSuvString}`)\n\t\t\totherLines.push(`${stdDevString} ${stdDevSuvString}`)\n\t\t} else {\n\t\t\totherLines.push(`${meanString} ${stdDevString}`)\n\t\t}\n\n\t\tif (showMinMax) {\n\t\t\tlet minString = `Min: ${formatNumber(min)} ${unit}`\n\t\t\tconst maxString = `Max: ${formatNumber(max)} ${unit}`\n\t\t\tconst targetStringLength = hasStandardUptakeValues\n\t\t\t\t? Math.floor(context.measureText(`${stdDevString} `).width)\n\t\t\t\t: Math.floor(context.measureText(`${meanString} `).width)\n\n\t\t\twhile (context.measureText(minString).width < targetStringLength) {\n\t\t\t\tminString += ' '\n\t\t\t}\n\n\t\t\totherLines.push(`${minString}${maxString}`)\n\t\t}\n\t}\n\n\ttextLines.push(_formatArea(area, hasPixelSpacing))\n\totherLines.forEach(x => textLines.push(x))\n\n\treturn textLines\n}\n","// TODO: get rid of this in favor of lib export once we upgrade to cornerstone-tools >= v.4.6.0\n// https://github.com/cornerstonejs/cornerstoneTools/pull/1099\n\n/**\n * Determine the coordinates that will place the textbox to the right of the\n * annotation, taking rotation, hflip, and vflip into account.\n *\n * @param {Object} viewport - The object that stores rotation, hflip, and vflip.\n * @param {Object} handles - The handles of the annotation.\n * @returns {Object} - The coordinates for default placement of the textbox\n */\nexport default function getROITextBoxCoords(viewport, handles) {\n\tconst corners = _determineCorners(handles)\n\tconst centerX = (corners.left.x + corners.right.x) / 2\n\tconst centerY = (corners.top.y + corners.bottom.y) / 2\n\tconst textBox = {}\n\n\tif (viewport.rotation >= 0 && viewport.rotation < 90) {\n\t\ttextBox.x = viewport.hflip ? corners.left.x : corners.right.x\n\t\ttextBox.y = centerY\n\t}\n\tif (viewport.rotation >= 90 && viewport.rotation < 180) {\n\t\ttextBox.x = centerX\n\t\ttextBox.y = viewport.vflip ? corners.bottom.y : corners.top.y\n\t}\n\tif (viewport.rotation >= 180 && viewport.rotation < 270) {\n\t\ttextBox.x = viewport.hflip ? corners.right.x : corners.left.x\n\t\ttextBox.y = centerY\n\t}\n\tif (viewport.rotation >= 270 && viewport.rotation < 360) {\n\t\ttextBox.x = centerX\n\t\ttextBox.y = viewport.vflip ? corners.top.y : corners.bottom.y\n\t}\n\n\treturn textBox\n}\n\n/**\n * Determine the handles that have the min/max x and y values.\n *\n * @param {Object} handles - The handles of the annotation.\n * @returns {Object} - The top, left, bottom, and right handles\n */\nfunction _determineCorners(handles) {\n\tconst handlesLeftToRight = [handles.start, handles.end].sort(_compareX)\n\tconst handlesTopToBottom = [handles.start, handles.end].sort(_compareY)\n\tconst left = handlesLeftToRight[0]\n\tconst right = handlesLeftToRight[handlesLeftToRight.length - 1]\n\tconst top = handlesTopToBottom[0]\n\tconst bottom = handlesTopToBottom[handlesTopToBottom.length - 1]\n\n\treturn {\n\t\ttop,\n\t\tleft,\n\t\tbottom,\n\t\tright,\n\t}\n\n\tfunction _compareX(a, b) {\n\t\treturn a.x < b.x ? -1 : 1\n\t}\n\tfunction _compareY(a, b) {\n\t\treturn a.y < b.y ? -1 : 1\n\t}\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { updateImage, metaData, pixelToCanvas, getPixels } from 'cornerstone-core/dist/cornerstone.js'\nimport {\n\taddToolState,\n\tgetToolState,\n\timport as csTools,\n\tremoveToolState,\n\tstore,\n\ttoolColors,\n\ttoolStyle,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { point } from 'cornerstone-math/dist/cornerstoneMath.js'\n\n//\nimport throttle from '@/utils/throttle.js'\nimport { formatNumber, parseNumber } from '@utils/numberUtils'\nimport { openPromptDlg } from '@dialogs/TextPromptDlg'\n\nimport toolSelectedCallback from './_shared/toolSelectedCallback.js'\n\n// Manipulators\nimport moveHandle from './../manipulators/moveHandle.js'\nimport moveNewHandle from './../manipulators/moveNewHandle.js'\nimport getROITextBoxCoords from './util/getROITextBoxCoords.js'\n\n// Handle helpers\nimport { initHandle } from './util/handles.js'\nimport getImagePixelSpacing from './util/getImagePixelSpacing'\nimport { eventBus } from '@services/eventBus'\nimport round from 'lodash/round'\nimport triggerDoneModifying from './util/triggerDoneModifying.js'\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawEllipse = csTools('drawing/drawEllipse')\nconst drawHandles = csTools('drawing/drawHandles')\nconst getNewContext = csTools('drawing/getNewContext')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst setShadow = csTools('drawing/setShadow')\n\n// Util\nconst { pointInEllipse, calculateEllipseStatistics } = csTools('util/ellipseUtils')\nconst calculateSUV = csTools('util/calculateSUV')\n\n/**\n * @export @public @class\n * @name AstCircleRoi\n * @classdesc\n * @extends BaseAnnotationTool\n */\nexport default class AstCircleRoi extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstCircleRoi',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandlesOnHover: false,\n\t\t\t\tmaxClickDuration: 150,\n\t\t\t\tshowHounsfieldUnits: true,\n\t\t\t\tshowMinMax: true,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\n\t\tsuper(initialConfiguration)\n\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t\tthis.isDragging = true\n\t}\n\n\t// custom toolSelectedCallback for opening annotation dialog\n\ttoolSelectedCallback = toolSelectedCallback.bind(this)\n\n\t/**\n\t * Create the measurement data for this tool with the end handle activated\n\t *\n\t * @param {*} eventData\n\t * @returns\n\t */\n\tcreateNewMeasurement({ currentPoints, element }) {\n\t\tconst { x, y } = currentPoints.image\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tinvalidated: true,\n\t\t\thandles: {\n\t\t\t\tstart: {\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t\ttextBox: {\n\t\t\t\t\tactive: false,\n\t\t\t\t\thasMoved: false,\n\t\t\t\t\tmovesIndependently: false,\n\t\t\t\t\tdrawnIndependently: true,\n\t\t\t\t\tallowedOutsideImage: true,\n\t\t\t\t\thasBoundingBox: true,\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {HTMLElement} element\n\t * @param {*} data\n\t * @param {*} coords\n\t * @returns {boolean}\n\t */\n\tpointNearTool(element, data, coords, isMouse = true) {\n\t\tconst distance = isMouse ? 15 : 25\n\t\tconst startCanvas = pixelToCanvas(element, data.handles.start)\n\t\tconst endCanvas = pixelToCanvas(element, data.handles.end)\n\n\t\tconst minorEllipse = {\n\t\t\tleft: Math.min(startCanvas.x, endCanvas.x) + distance / 2,\n\t\t\ttop: Math.min(startCanvas.y, endCanvas.y) + distance / 2,\n\t\t\twidth: Math.abs(startCanvas.x - endCanvas.x) - distance,\n\t\t\theight: Math.abs(startCanvas.y - endCanvas.y) - distance,\n\t\t}\n\n\t\tconst majorEllipse = {\n\t\t\tleft: Math.min(startCanvas.x, endCanvas.x) - distance / 2,\n\t\t\ttop: Math.min(startCanvas.y, endCanvas.y) - distance / 2,\n\t\t\twidth: Math.abs(startCanvas.x - endCanvas.x) + distance,\n\t\t\theight: Math.abs(startCanvas.y - endCanvas.y) + distance,\n\t\t}\n\n\t\tconst centerCrossHairs = {\n\t\t\tleft: startCanvas.x + (endCanvas.x - startCanvas.x) / 2 - distance,\n\t\t\ttop: startCanvas.y + (endCanvas.y - startCanvas.y) / 2 - distance,\n\t\t\twidth: distance * 2,\n\t\t\theight: distance * 2,\n\t\t}\n\n\t\tconst pointInMinorEllipse = pointInEllipse(minorEllipse, coords)\n\t\tconst pointInCenter = pointInEllipse(centerCrossHairs, coords)\n\t\tconst pointInMajorEllipse = pointInEllipse(majorEllipse, coords)\n\n\t\tif ((pointInMajorEllipse && !pointInMinorEllipse) || pointInCenter) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\taddNewMeasurement(evt, interactionType = 'mouse') {\n\t\tconst isMouse = interactionType === 'mouse'\n\t\tconst eventData = evt.detail\n\t\tconst element = eventData.element\n\t\tconst measurementData = this.createNewMeasurement(eventData)\n\n\t\tif (!measurementData) {\n\t\t\treturn\n\t\t}\n\n\t\tinitHandle(measurementData.handles.start, null, interactionType, this.options)\n\t\tinitHandle(measurementData.handles.end, null, interactionType, this.options)\n\n\t\t// Drag handle if we haven't released in `maxClickDuration`\n\t\tconst createCircleFromDiameter = this._createCircleFromDiameter.bind(this, eventData, element, null, null)\n\t\tconst upEvent = isMouse ? 'mouseup' : 'touchend'\n\t\tconst handleDoneMove = () => {\n\t\t\tstore.state.isToolLocked = false\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\telement.removeEventListener(upEvent, createCircleFromDiameter)\n\t\t\tif (this.isDragging) {\n\t\t\t\t// Associate this data with this imageId so we can render it and manipulate it\n\t\t\t\taddToolState(element, this.name, measurementData)\n\t\t\t\tupdateImage(element)\n\n\t\t\t\tstore.state.isToolLocked = true\n\t\t\t\tmoveNewHandle(\n\t\t\t\t\teventData,\n\t\t\t\t\tthis.name,\n\t\t\t\t\tmeasurementData,\n\t\t\t\t\tmeasurementData.handles.end,\n\t\t\t\t\t{ constrainSquare: true },\n\t\t\t\t\tinteractionType,\n\t\t\t\t\thandleDoneMove\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\thandleDoneMove()\n\t\t\t}\n\t\t}, this.configuration.maxClickDuration)\n\n\t\tthis.isDragging = true\n\t\telement.addEventListener(upEvent, createCircleFromDiameter)\n\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tstore.state.isToolLocked = true\n\t\ttoolData.active = true\n\t\tconst eventData = evt.detail\n\n\t\t// Move handle\n\t\tconst handleDoneMove = () => {\n\t\t\tstore.state.isToolLocked = false\n\t\t}\n\n\t\tmoveHandle(\n\t\t\teventData,\n\t\t\tthis.name,\n\t\t\ttoolData,\n\t\t\thandle,\n\t\t\t{ constrainSquare: handle !== toolData.handles.textBox },\n\t\t\tinteractionType,\n\t\t\thandleDoneMove\n\t\t)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} evt\n\t * @returns\n\t */\n\trenderToolData(evt) {\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\n\t\t// If we have no toolData for this element, return immediately as there is nothing to do\n\t\tif (!toolData || !toolData.data || !toolData.data.length) {\n\t\t\treturn\n\t\t}\n\n\t\tconst eventData = evt.detail\n\t\tconst { image, element } = eventData\n\t\tconst lineWidth = toolStyle.getToolWidth()\n\t\tconst { handleDiameter, drawHandlesOnHover } = this.configuration\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\n\t\t// Meta\n\t\tconst seriesModule = metaData.get('series', image.imageId) || {}\n\n\t\t// Pixel Spacing\n\t\tconst modality = seriesModule.modality\n\n\t\tconst { isPixelSpacingDefined, ...pixelSpacing } = getImagePixelSpacing(image)\n\n\t\tdraw(context, context => {\n\t\t\t// If we have tool data for this element - iterate over each set and draw it\n\t\t\tfor (let i = 0; i < toolData.data.length; i++) {\n\t\t\t\tconst data = toolData.data[i]\n\n\t\t\t\t// Configure\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tconst handleOptions = {\n\t\t\t\t\tcolor,\n\t\t\t\t\thandleDiameter,\n\t\t\t\t\tdrawHandlesIfActive: drawHandlesOnHover,\n\t\t\t\t}\n\n\t\t\t\tsetShadow(context, this.configuration)\n\n\t\t\t\t// Draw ellipse, center, and handles\n\t\t\t\tdrawEllipse(context, element, data.handles.start, data.handles.end, {\n\t\t\t\t\tcolor,\n\t\t\t\t})\n\t\t\t\t_drawCenter(context, element, data.handles.start, data.handles.end)\n\t\t\t\tdrawHandles(context, eventData, data.handles, handleOptions)\n\n\t\t\t\t// Update textbox stats\n\t\t\t\tif (data.invalidated === true) {\n\t\t\t\t\tif (data.cachedStats) {\n\t\t\t\t\t\t_throttledUpdateCachedStats(image, element, data, modality, pixelSpacing)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_updateCachedStats(image, element, data, modality, pixelSpacing)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Default position to right most side of circle\n\t\t\t\tif (!data.handles.textBox.hasMoved) {\n\t\t\t\t\tconst defaultCoords = getROITextBoxCoords(eventData.viewport, data.handles)\n\t\t\t\t\tObject.assign(data.handles.textBox, defaultCoords)\n\t\t\t\t}\n\n\t\t\t\tif (!data.cachedStats.diameter)\n\t\t\t\t\tdata.cachedStats.diameter = _getRadius(data.handles, pixelSpacing.rowPixelSpacing) * 2\n\n\t\t\t\tconst textBoxAnchorPoints = handles => {\n\t\t\t\t\treturn _findTextBoxAnchorPoints(handles.start, handles.end)\n\t\t\t\t}\n\t\t\t\tconst textBoxContent = _createTextBoxContent(\n\t\t\t\t\tcontext,\n\t\t\t\t\timage.color,\n\t\t\t\t\tdata.cachedStats,\n\t\t\t\t\tmodality,\n\t\t\t\t\tisPixelSpacingDefined,\n\t\t\t\t\tthis.configuration\n\t\t\t\t)\n\t\t\t\tdata.handles.textBox.text = textBoxContent\n\n\t\t\t\t// If the textbox has moved, it will use `textBoxAnchorPoints` to\n\t\t\t\t// find the best location to link the textbox to the annotation\n\t\t\t\tif (!data.handles.textBox.hidden) {\n\t\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\telement,\n\t\t\t\t\t\tdata.handles.textBox,\n\t\t\t\t\t\ttextBoxContent,\n\t\t\t\t\t\tdata.handles,\n\t\t\t\t\t\ttextBoxAnchorPoints,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tlineWidth,\n\t\t\t\t\t\t10,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tasync _createCircleFromDiameter(eventData, element, existingCircle, diameter) {\n\t\t/* eslint-disable no-alert */\n\t\tthis.isDragging = false\n\t\t// do not prompt if click was outside image\n\t\tconst imageBounds = {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\twidth: eventData.image.width,\n\t\t\theight: eventData.image.height,\n\t\t}\n\t\tif (!point.insideRect(eventData.currentPoints.image, imageBounds)) return\n\n\t\tconst { rowPixelSpacing, columnPixelSpacing, isPixelSpacingDefined } = getImagePixelSpacing(eventData.image)\n\n\t\tconst defaultDiameter =\n\t\t\texistingCircle && existingCircle.cachedStats && existingCircle.cachedStats.diameter\n\t\t\t\t? round(existingCircle.cachedStats.diameter, 2)\n\t\t\t\t: ''\n\t\tif (!diameter) {\n\t\t\tconst unit = isPixelSpacingDefined ? 'mm' : 'px'\n\t\t\tdiameter = parseNumber(\n\t\t\t\tawait openPromptDlg({\n\t\t\t\t\ttitle: 'New Circle',\n\t\t\t\t\tprompt: `Enter circle diameter [${unit}]:`,\n\t\t\t\t\tdefaultValue: formatNumber(defaultDiameter),\n\t\t\t\t})\n\t\t\t)\n\t\t}\n\t\tif (!diameter) return\n\t\tlet origin = eventData.currentPoints && eventData.currentPoints.image\n\n\t\tif (existingCircle) {\n\t\t\tconst start = existingCircle.handles.start\n\t\t\tconst end = existingCircle.handles.end\n\n\t\t\torigin = {\n\t\t\t\tx: (end.x - start.x) / 2 + start.x,\n\t\t\t\ty: (end.y - start.y) / 2 + start.y,\n\t\t\t}\n\t\t}\n\n\t\tconst pixelSpacing = columnPixelSpacing || rowPixelSpacing\n\t\tif (pixelSpacing) {\n\t\t\tdiameter /= pixelSpacing\n\t\t}\n\t\tlet newCircle = this.createNewMeasurement(eventData)\n\t\tconst radius = diameter / 2\n\t\tnewCircle.handles.start.x = origin.x - radius\n\t\tnewCircle.handles.start.y = origin.y - radius\n\t\tnewCircle.handles.end.x = origin.x + radius\n\t\tnewCircle.handles.end.y = origin.y + radius\n\t\tnewCircle.handles.end.active = false\n\n\t\t/* Create and render new circle */\n\t\taddToolState(element, this.name, newCircle)\n\t\tremoveToolState(element, this.name, existingCircle)\n\t\tupdateImage(element)\n\n\t\t// Simulate tool selected to refresh annotation dialog\n\t\tsetTimeout(() => {\n\t\t\tconst event = new CustomEvent('circlecreatedfromdiameter', {\n\t\t\t\tdetail: eventData,\n\t\t\t})\n\t\t\tconst toolState = getToolState(eventData.element, this.name)\n\t\t\tconst annotation = toolState.data[toolState.data.length - 1]\n\t\t\teventBus.post(eventBus.type.ANNOTATION_CLICK, {\n\t\t\t\ttool: this,\n\t\t\t\ttoolState,\n\t\t\t\tannotation,\n\t\t\t\tevent,\n\t\t\t})\n\t\t\ttriggerDoneModifying(this.name, element, eventData.image)\n\t\t}, 50) // Generous delay for cached stats\n\t}\n\n\tupdateCachedStats(image, element, data) {\n\t\t// Meta\n\t\tconst seriesModule = metaData.get('series', image.imageId) || {}\n\t\t// Pixel Spacing\n\t\tconst modality = seriesModule.modality\n\t\t// const data = toolData.data[i]\n\t\tconst { isPixelSpacingDefined, ...pixelSpacing } = getImagePixelSpacing(image)\n\t\t_updateCachedStats(image, element, data, modality, pixelSpacing)\n\t}\n}\n\n/**\n *\n */\nconst _throttledUpdateCachedStats = throttle(_updateCachedStats, 110)\n\n/**\n *\n *\n * @param {*} image\n * @param {*} element\n * @param {*} data\n * @param {*} pixelSpacing\n */\nfunction _updateCachedStats(image, element, data, modality, pixelSpacing) {\n\tconst circleStatistics = _calculateCircleStatistics(\n\t\timage,\n\t\telement,\n\t\tdata.handles,\n\t\tmodality,\n\t\tpixelSpacing.rowPixelSpacing\n\t)\n\tdata.cachedStats = circleStatistics\n}\n\nfunction _findTextBoxAnchorPoints(startHandle, endHandle) {\n\tconst { left, top, width, height } = _getCircleImageCoordinates(startHandle, endHandle)\n\n\treturn [\n\t\t{\n\t\t\t// Top middle point of ellipse\n\t\t\tx: left + width / 2,\n\t\t\ty: top,\n\t\t},\n\t\t{\n\t\t\t// Left middle point of ellipse\n\t\t\tx: left,\n\t\t\ty: top + height / 2,\n\t\t},\n\t\t{\n\t\t\t// Bottom middle point of ellipse\n\t\t\tx: left + width / 2,\n\t\t\ty: top + height,\n\t\t},\n\t\t{\n\t\t\t// Right middle point of ellipse\n\t\t\tx: left + width,\n\t\t\ty: top + height / 2,\n\t\t},\n\t]\n}\n\n/**\n *\n *\n * @param {CanvasRenderingContext2D} context\n * @param {*} element\n * @param {*} startHandle\n * @param {*} endHandle\n */\nfunction _drawCenter(context, element, startHandle, endHandle) {\n\t// Convert Image coordinates to Canvas coordinates given the element\n\tconst handleStartCanvas = pixelToCanvas(element, startHandle)\n\tconst handleEndCanvas = pixelToCanvas(element, endHandle)\n\n\t// Retrieve the bounds of the ellipse (left, top, width, and height)\n\t// In Canvas coordinates\n\tconst leftCanvas = Math.min(handleStartCanvas.x, handleEndCanvas.x)\n\tconst topCanvas = Math.min(handleStartCanvas.y, handleEndCanvas.y)\n\tconst widthCanvas = Math.abs(handleStartCanvas.x - handleEndCanvas.x)\n\tconst heightCanvas = Math.abs(handleStartCanvas.y - handleEndCanvas.y)\n\n\t// Draw center +\n\tconst xCenter = leftCanvas + widthCanvas / 2\n\tconst yCenter = topCanvas + heightCanvas / 2\n\tconst plusSize = 4\n\n\tcontext.beginPath()\n\tcontext.moveTo(xCenter - plusSize, yCenter)\n\tcontext.lineTo(xCenter + plusSize, yCenter)\n\tcontext.closePath()\n\tcontext.stroke()\n\tcontext.beginPath()\n\tcontext.moveTo(xCenter, yCenter - plusSize)\n\tcontext.lineTo(xCenter, yCenter + plusSize)\n\tcontext.closePath()\n\tcontext.stroke()\n\tcontext.closePath()\n}\n\nfunction _getUnit(modality, showHounsfieldUnits) {\n\treturn modality === 'CT' && showHounsfieldUnits !== false ? 'HU' : ''\n}\n\n/**\n *\n *\n * @param {*} context\n * @param {*} isColorImage\n * @param {*} [{ area, diameter, mean, stdDev, min, max }={}]\n * @param {*} modality\n * @param {*} hasPixelSpacing\n * @param {*} options\n * @returns\n */\nfunction _createTextBoxContent(\n\tcontext,\n\tisColorImage,\n\t{ area, diameter, mean, stdDev, min, max, meanStdDevSUV } = {},\n\tmodality,\n\thasPixelSpacing,\n\toptions\n) {\n\tconst showMinMax = options.showMinMax || false\n\n\tconst textLines = []\n\n\t// Don't display mean/standardDev for color images\n\tlet otherLines = []\n\tconst showStats = !isColorImage && ['PT', 'CT'].includes(modality)\n\n\tif (showStats) {\n\t\tconst hasStandardUptakeValues = meanStdDevSUV && meanStdDevSUV.mean !== 0\n\t\tconst unit = _getUnit(modality, options.showHounsfieldUnits)\n\n\t\tlet meanString = `Mean: ${formatNumber(round(mean, 2))} ${unit}`\n\t\tconst stdDevString = `Std Dev: ${formatNumber(round(stdDev, 2))} ${unit}`\n\n\t\t// If this image has SUV values to display, concatenate them to the text line\n\t\tif (hasStandardUptakeValues) {\n\t\t\tconst SUVtext = ' SUV: '\n\n\t\t\tconst meanSuvString = `${SUVtext}${formatNumber(round(meanStdDevSUV.mean, 2))}`\n\t\t\tconst stdDevSuvString = `${SUVtext}${formatNumber(round(meanStdDevSUV.stdDev, 2))}`\n\n\t\t\tconst targetStringLength = Math.floor(context.measureText(`${stdDevString} `).width)\n\n\t\t\twhile (context.measureText(meanString).width < targetStringLength) {\n\t\t\t\tmeanString += ' '\n\t\t\t}\n\n\t\t\totherLines.push(`${meanString}${meanSuvString}`)\n\t\t\totherLines.push(`${stdDevString} ${stdDevSuvString}`)\n\t\t} else {\n\t\t\totherLines.push(`${meanString} ${stdDevString}`)\n\t\t}\n\n\t\tif (showMinMax) {\n\t\t\tlet minString = `Min: ${formatNumber(min)} ${unit}`\n\t\t\tconst maxString = `Max: ${formatNumber(max)} ${unit}`\n\t\t\tconst targetStringLength = hasStandardUptakeValues\n\t\t\t\t? Math.floor(context.measureText(`${stdDevString} `).width)\n\t\t\t\t: Math.floor(context.measureText(`${meanString} `).width)\n\n\t\t\twhile (context.measureText(minString).width < targetStringLength) {\n\t\t\t\tminString += ' '\n\t\t\t}\n\n\t\t\totherLines.push(`${minString}${maxString}`)\n\t\t}\n\t}\n\n\t// Build our text content\n\ttextLines.push(_formatArea(area, hasPixelSpacing))\n\ttextLines.push(_formatDiameter(diameter, hasPixelSpacing))\n\totherLines.forEach(x => textLines.push(x))\n\n\treturn textLines\n}\n\n/**\n *\n *\n * @param {*} area\n * @param {*} hasPixelSpacing\n * @returns\n */\nfunction _formatArea(area, hasPixelSpacing) {\n\t// This uses Char code 178 for a superscript 2\n\tconst suffix = hasPixelSpacing ? ` mm${String.fromCharCode(178)}` : ` px${String.fromCharCode(178)}`\n\n\treturn `Area: ${formatNumber(round(area, 2))}${suffix}`\n}\n\n/**\n *\n *\n * @param {*} diameter\n * @param {*} hasPixelSpacing\n * @returns\n */\nfunction _formatDiameter(diameter, hasPixelSpacing) {\n\tconst suffix = hasPixelSpacing ? ' mm' : ' px'\n\treturn `Diameter: ${formatNumber(round(diameter, 2))}${suffix}`\n}\n\n/**\n *\n *\n * @param {*} image\n * @param {*} element\n * @param {*} handles\n * @param {number} rowPixelSpacing\n * @returns\n */\nfunction _calculateCircleStatistics(image, element, handles, modality, rowPixelSpacing) {\n\t// Retrieve the bounds of the ellipse in image coordinates\n\tconst circleCoordinates = _getCircleImageCoordinates(handles.start, handles.end)\n\n\t// Retrieve the array of pixels that the ellipse bounds cover\n\tconst pixels = getPixels(\n\t\telement,\n\t\tcircleCoordinates.left,\n\t\tcircleCoordinates.top,\n\t\tcircleCoordinates.width,\n\t\tcircleCoordinates.height\n\t)\n\n\t// Calculate the mean & standard deviation from the pixels and the ellipse details\n\tconst circleMeanStdDev = calculateEllipseStatistics(pixels, circleCoordinates)\n\n\tlet meanStdDevSUV\n\n\tif (modality === 'PT') {\n\t\tmeanStdDevSUV = {\n\t\t\tmean: calculateSUV(image, circleMeanStdDev.mean, true) || 0,\n\t\t\tstdDev: calculateSUV(image, circleMeanStdDev.stdDev, true) || 0,\n\t\t}\n\t}\n\n\t// Calculate the image area from the ellipse dimensions and pixel spacing\n\tconst radius = _getRadius(handles, rowPixelSpacing)\n\tconst area = Math.PI * radius * radius\n\n\treturn {\n\t\tdiameter: radius ? radius * 2 : 0,\n\t\tarea: area || 0,\n\t\t//\n\t\tcount: circleMeanStdDev.count || 0,\n\t\tmean: circleMeanStdDev.mean || 0,\n\t\tvariance: circleMeanStdDev.variance || 0,\n\t\tstdDev: circleMeanStdDev.stdDev || 0,\n\t\tmin: circleMeanStdDev.min || 0,\n\t\tmax: circleMeanStdDev.max || 0,\n\t\t//\n\t\tmeanStdDevSUV,\n\t}\n}\n\nfunction _getRadius(handles, rowPixelSpacing) {\n\tconst circleCoordinates = _getCircleImageCoordinates(handles.start, handles.end)\n\treturn (circleCoordinates.width * rowPixelSpacing) / 2\n}\n\n/**\n *\n *\n * @param {*} startHandle\n * @param {*} endHandle\n * @returns\n */\nfunction _getCircleImageCoordinates(startHandle, endHandle) {\n\treturn {\n\t\tleft: Math.min(startHandle.x, endHandle.x),\n\t\ttop: Math.min(startHandle.y, endHandle.y),\n\t\twidth: Math.abs(startHandle.x - endHandle.x),\n\t\theight: Math.abs(startHandle.y - endHandle.y),\n\t}\n}\n","import {\n\tEllipticalRoiTool,\n\texternal,\n\taddToolState,\n\timport as csTools,\n\tgetToolState,\n\ttoolStyle,\n\tgetModule,\n\ttoolColors,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\n\nimport toolSelectedCallback from './_shared/toolSelectedCallback.js'\nimport { formatNumber } from '@utils/numberUtils'\n\n// Manipulators\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\n\n// Handle helpers\nimport { initHandle } from './util/handles.js'\nimport getImagePixelSpacing from './util/getImagePixelSpacing'\nimport round from 'lodash/round'\n\nconst getNewContext = csTools('drawing/getNewContext')\nconst draw = csTools('drawing/draw')\nconst setShadow = csTools('drawing/setShadow')\nconst drawEllipse = csTools('drawing/drawEllipse')\nconst drawHandles = csTools('drawing/drawHandles')\nconst getROITextBoxCoords = csTools('util/getROITextBoxCoords')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst calculateSUV = csTools('util/calculateSUV')\n\nexport default class AstEllipticalRoi extends EllipticalRoiTool {\n\tconstructor(configuration = {}) {\n\t\tsuper({\n\t\t\tname: 'AstEllipticalRoi',\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandles: true,\n\t\t\t\tshowHounsfieldUnits: true,\n\t\t\t\tshowMinMax: true,\n\t\t\t},\n\t\t\t...configuration,\n\t\t})\n\t}\n\n\t// custom toolSelectedCallback for opening annotation dialog\n\ttoolSelectedCallback = toolSelectedCallback.bind(this)\n\n\taddNewMeasurement(evt, interactionType) {\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\t\tconst eventData = evt.detail\n\t\tconst element = eventData.element\n\t\tconst measurementData = this.createNewMeasurement(eventData)\n\n\t\tif (!measurementData) {\n\t\t\treturn\n\t\t}\n\n\t\tinitHandle(measurementData.handles.start, null, interactionType, this.options)\n\t\tinitHandle(measurementData.handles.end, null, interactionType, this.options)\n\n\t\t// Associate this data with this imageId so we can render it and manipulate it\n\t\taddToolState(element, this.name, measurementData)\n\n\t\texternal.cornerstone.updateImage(element)\n\n\t\tmoveNewHandle(eventData, this.name, measurementData, measurementData.handles.end, this.options, interactionType)\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\trenderToolData(evt) {\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\n\t\tif (!toolData) {\n\t\t\treturn\n\t\t}\n\n\t\tconst eventData = evt.detail\n\t\tconst { image, element } = eventData\n\t\tconst lineWidth = toolStyle.getToolWidth()\n\t\tconst lineDash = getModule('globalConfiguration').configuration.lineDash\n\t\tconst { handleRadius, drawHandlesOnHover, renderDashed } = this.configuration\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\t\tconst { isPixelSpacingDefined } = getImagePixelSpacing(image)\n\n\t\t// Meta\n\t\tconst seriesModule = external.cornerstone.metaData.get('series', image.imageId) || {}\n\n\t\t// Pixel Spacing\n\t\tconst modality = seriesModule.modality\n\n\t\tdraw(context, context => {\n\t\t\t// If we have tool data for this element - iterate over each set and draw it\n\t\t\tfor (let i = 0; i < toolData.data.length; i++) {\n\t\t\t\tconst data = toolData.data[i]\n\n\t\t\t\tif (data.visible === false) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// Configure\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tconst handleOptions = {\n\t\t\t\t\tcolor,\n\t\t\t\t\thandleRadius,\n\t\t\t\t\tdrawHandlesIfActive: drawHandlesOnHover,\n\t\t\t\t}\n\n\t\t\t\tsetShadow(context, this.configuration)\n\n\t\t\t\tconst ellipseOptions = { color }\n\n\t\t\t\tif (renderDashed) {\n\t\t\t\t\tellipseOptions.lineDash = lineDash\n\t\t\t\t}\n\n\t\t\t\t// Draw\n\t\t\t\tdrawEllipse(\n\t\t\t\t\tcontext,\n\t\t\t\t\telement,\n\t\t\t\t\tdata.handles.start,\n\t\t\t\t\tdata.handles.end,\n\t\t\t\t\tellipseOptions,\n\t\t\t\t\t'pixel',\n\t\t\t\t\tdata.handles.initialRotation\n\t\t\t\t)\n\t\t\t\tdrawHandles(context, eventData, data.handles, handleOptions)\n\n\t\t\t\t// Update textbox stats\n\t\t\t\tif (data.invalidated === true) {\n\t\t\t\t\tif (data.cachedStats) {\n\t\t\t\t\t\tthis.throttledUpdateCachedStats(image, element, data)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.updateCachedStats(image, element, data)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Default to textbox on right side of ROI\n\t\t\t\tif (!data.handles.textBox.hasMoved) {\n\t\t\t\t\tconst defaultCoords = getROITextBoxCoords(eventData.viewport, data.handles)\n\n\t\t\t\t\tObject.assign(data.handles.textBox, defaultCoords)\n\t\t\t\t}\n\n\t\t\t\tconst textBoxAnchorPoints = handles => _findTextBoxAnchorPoints(handles.start, handles.end)\n\t\t\t\tconst textBoxContent = _createTextBoxContent(\n\t\t\t\t\tcontext,\n\t\t\t\t\timage.color,\n\t\t\t\t\tdata.cachedStats,\n\t\t\t\t\tmodality,\n\t\t\t\t\tisPixelSpacingDefined,\n\t\t\t\t\tthis.configuration\n\t\t\t\t)\n\t\t\t\tdata.handles.textBox.text = textBoxContent\n\n\t\t\t\tdata.unit = _getUnit(modality, this.configuration.showHounsfieldUnits)\n\n\t\t\t\tif (!data.handles.textBox.hidden) {\n\t\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\telement,\n\t\t\t\t\t\tdata.handles.textBox,\n\t\t\t\t\t\ttextBoxContent,\n\t\t\t\t\t\tdata.handles,\n\t\t\t\t\t\ttextBoxAnchorPoints,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tlineWidth,\n\t\t\t\t\t\t10,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n\n/**\n *\n *\n * @param {*} startHandle\n * @param {*} endHandle\n * @returns {Array.<{x: number, y: number}>}\n */\nfunction _findTextBoxAnchorPoints(startHandle, endHandle) {\n\tconst { left, top, width, height } = _getEllipseImageCoordinates(startHandle, endHandle)\n\n\treturn [\n\t\t{\n\t\t\t// Top middle point of ellipse\n\t\t\tx: left + width / 2,\n\t\t\ty: top,\n\t\t},\n\t\t{\n\t\t\t// Left middle point of ellipse\n\t\t\tx: left,\n\t\t\ty: top + height / 2,\n\t\t},\n\t\t{\n\t\t\t// Bottom middle point of ellipse\n\t\t\tx: left + width / 2,\n\t\t\ty: top + height,\n\t\t},\n\t\t{\n\t\t\t// Right middle point of ellipse\n\t\t\tx: left + width,\n\t\t\ty: top + height / 2,\n\t\t},\n\t]\n}\n\nfunction _getUnit(modality, showHounsfieldUnits) {\n\treturn modality === 'CT' && showHounsfieldUnits !== false ? 'HU' : ''\n}\n\n/**\n *\n *\n * @param {*} context\n * @param {*} isColorImage\n * @param {*} { area, mean, stdDev, min, max, meanStdDevSUV }\n * @param {*} modality\n * @param {*} hasPixelSpacing\n * @param {*} [options={}] - { showMinMax, showHounsfieldUnits }\n * @returns {string[]}\n */\nfunction _createTextBoxContent(\n\tcontext,\n\tisColorImage,\n\t{ area, mean, stdDev, min, max, meanStdDevSUV } = {},\n\tmodality,\n\thasPixelSpacing,\n\toptions = {}\n) {\n\tconst showMinMax = options.showMinMax || false\n\tconst textLines = []\n\n\t// Don't display mean/standardDev for color images\n\tconst otherLines = []\n\n\tconst showStats = !isColorImage && ['PT', 'CT'].includes(modality)\n\n\tif (showStats) {\n\t\tconst hasStandardUptakeValues = meanStdDevSUV && meanStdDevSUV.mean !== 0\n\t\tconst unit = _getUnit(modality, options.showHounsfieldUnits)\n\n\t\tlet meanString = `Mean: ${formatNumber(round(mean, 2))} ${unit}`\n\t\tconst stdDevString = `Std Dev: ${formatNumber(round(stdDev, 2))} ${unit}`\n\n\t\t// If this image has SUV values to display, concatenate them to the text line\n\t\tif (hasStandardUptakeValues) {\n\t\t\tconst SUVtext = ' SUV: '\n\n\t\t\tconst meanSuvString = `${SUVtext}${formatNumber(round(meanStdDevSUV.mean, 2))}`\n\t\t\tconst stdDevSuvString = `${SUVtext}${formatNumber(round(meanStdDevSUV.stdDev, 2))}`\n\n\t\t\tconst targetStringLength = Math.floor(context.measureText(`${stdDevString} `).width)\n\n\t\t\twhile (context.measureText(meanString).width < targetStringLength) {\n\t\t\t\tmeanString += ' '\n\t\t\t}\n\n\t\t\totherLines.push(`${meanString}${meanSuvString}`)\n\t\t\totherLines.push(`${stdDevString} ${stdDevSuvString}`)\n\t\t} else {\n\t\t\totherLines.push(`${meanString} ${stdDevString}`)\n\t\t}\n\n\t\tif (showMinMax) {\n\t\t\tlet minString = `Min: ${formatNumber(min)} ${unit}`\n\t\t\tconst maxString = `Max: ${formatNumber(max)} ${unit}`\n\t\t\tconst targetStringLength = hasStandardUptakeValues\n\t\t\t\t? Math.floor(context.measureText(`${stdDevString} `).width)\n\t\t\t\t: Math.floor(context.measureText(`${meanString} `).width)\n\n\t\t\twhile (context.measureText(minString).width < targetStringLength) {\n\t\t\t\tminString += ' '\n\t\t\t}\n\n\t\t\totherLines.push(`${minString}${maxString}`)\n\t\t}\n\t}\n\n\ttextLines.push(_formatArea(area, hasPixelSpacing))\n\totherLines.forEach(x => textLines.push(x))\n\n\treturn textLines\n}\n\n/**\n *\n *\n * @param {*} area\n * @param {*} hasPixelSpacing\n * @returns {string} The formatted label for showing area\n */\nfunction _formatArea(area, hasPixelSpacing) {\n\t// This uses Char code 178 for a superscript 2\n\tconst suffix = hasPixelSpacing ? ` mm${String.fromCharCode(178)}` : ` px${String.fromCharCode(178)}`\n\n\treturn `Area: ${formatNumber(round(area, 2))}${suffix}`\n}\n\n/**\n *\n *\n * @param {*} image\n * @param {*} element\n * @param {*} handles\n * @param {*} modality\n * @param {*} pixelSpacing\n * @returns {Object} The Stats object\n */\nfunction _calculateStats(image, element, handles, modality, pixelSpacing) {\n\t// Retrieve the bounds of the ellipse in image coordinates\n\tconst ellipseCoordinates = _getEllipseImageCoordinates(handles.start, handles.end)\n\n\t// Retrieve the array of pixels that the ellipse bounds cover\n\tconst pixels = external.cornerstone.getPixels(\n\t\telement,\n\t\tellipseCoordinates.left,\n\t\tellipseCoordinates.top,\n\t\tellipseCoordinates.width,\n\t\tellipseCoordinates.height\n\t)\n\n\t// Calculate the mean & standard deviation from the pixels and the ellipse details.\n\tconst ellipseMeanStdDev = _calculateEllipseStatistics(pixels, ellipseCoordinates)\n\n\tlet meanStdDevSUV\n\n\tif (modality === 'PT') {\n\t\tmeanStdDevSUV = {\n\t\t\tmean: calculateSUV(image, ellipseMeanStdDev.mean, true) || 0,\n\t\t\tstdDev: calculateSUV(image, ellipseMeanStdDev.stdDev, true) || 0,\n\t\t}\n\t}\n\n\t// Calculate the image area from the ellipse dimensions and pixel spacing\n\tconst area =\n\t\tMath.PI *\n\t\t((ellipseCoordinates.width * (pixelSpacing.colPixelSpacing || 1)) / 2) *\n\t\t((ellipseCoordinates.height * (pixelSpacing.rowPixelSpacing || 1)) / 2)\n\n\treturn {\n\t\tarea: area || 0,\n\t\tcount: ellipseMeanStdDev.count || 0,\n\t\tmean: ellipseMeanStdDev.mean || 0,\n\t\tvariance: ellipseMeanStdDev.variance || 0,\n\t\tstdDev: ellipseMeanStdDev.stdDev || 0,\n\t\tmin: ellipseMeanStdDev.min || 0,\n\t\tmax: ellipseMeanStdDev.max || 0,\n\t\tmeanStdDevSUV,\n\t}\n}\n\n/**\n * Retrieve the bounds of the ellipse in image coordinates\n *\n * @param {*} startHandle\n * @param {*} endHandle\n * @returns {{ left: number, top: number, width: number, height: number }}\n */\nfunction _getEllipseImageCoordinates(startHandle, endHandle) {\n\treturn {\n\t\tleft: Math.min(startHandle.x, endHandle.x),\n\t\ttop: Math.min(startHandle.y, endHandle.y),\n\t\twidth: Math.abs(startHandle.x - endHandle.x),\n\t\theight: Math.abs(startHandle.y - endHandle.y),\n\t}\n}\n\n/**\n * Calculates the statistics of an elliptical region of interest.\n *\n * @private\n * @function calculateEllipseStatistics\n *\n * @param {number[]} sp - Array of the image data's pixel values.\n * @param {Object} ellipse - { top, left, height, width } - An object describing the ellipse.\n * @returns {Object} { count, mean, variance, stdDev, min, max }\n */\nfunction _calculateEllipseStatistics(sp, ellipse) {\n\tlet sum = 0\n\tlet sumSquared = 0\n\tlet count = 0\n\tlet index = 0\n\tlet min = null\n\tlet max = null\n\n\tfor (let y = ellipse.top; y < ellipse.top + ellipse.height; y++) {\n\t\tfor (let x = ellipse.left; x < ellipse.left + ellipse.width; x++) {\n\t\t\tconst point = {\n\t\t\t\tx,\n\t\t\t\ty,\n\t\t\t}\n\n\t\t\tif (_pointInEllipse(ellipse, point)) {\n\t\t\t\tif (min === null) {\n\t\t\t\t\tmin = sp[index]\n\t\t\t\t\tmax = sp[index]\n\t\t\t\t}\n\n\t\t\t\tsum += sp[index]\n\t\t\t\tsumSquared += sp[index] * sp[index]\n\t\t\t\tmin = Math.min(min, sp[index])\n\t\t\t\tmax = Math.max(max, sp[index])\n\t\t\t\tcount++\n\t\t\t}\n\n\t\t\tindex++\n\t\t}\n\t}\n\n\tif (count === 0) {\n\t\treturn {\n\t\t\tcount,\n\t\t\tmean: 0.0,\n\t\t\tvariance: 0.0,\n\t\t\tstdDev: 0.0,\n\t\t\tmin: 0.0,\n\t\t\tmax: 0.0,\n\t\t}\n\t}\n\n\tconst mean = sum / count\n\tconst variance = sumSquared / count - mean * mean\n\n\treturn {\n\t\tcount,\n\t\tmean,\n\t\tvariance,\n\t\tstdDev: Math.sqrt(variance),\n\t\tmin,\n\t\tmax,\n\t}\n}\n\n/**\n * Returns true if a point is within an ellipse\n * @export @public @method\n * @name pointInEllipse\n *\n * @param {Object} ellipse Object defining the ellipse.\n * @param {Object} location The location of the point.\n * @returns {boolean} True if the point is within the ellipse.\n */\nfunction _pointInEllipse(ellipse, location) {\n\tconst xRadius = ellipse.width / 2\n\tconst yRadius = ellipse.height / 2\n\n\tif (xRadius <= 0.0 || yRadius <= 0.0) {\n\t\treturn false\n\t}\n\n\tconst center = {\n\t\tx: ellipse.left + xRadius,\n\t\ty: ellipse.top + yRadius,\n\t}\n\n\t/* This is a more general form of the circle equation\n\t *\n\t * X^2/a^2 + Y^2/b^2 <= 1\n\t */\n\n\tconst normalized = {\n\t\tx: location.x - center.x,\n\t\ty: location.y - center.y,\n\t}\n\n\tconst inEllipse =\n\t\t(normalized.x * normalized.x) / (xRadius * xRadius) + (normalized.y * normalized.y) / (yRadius * yRadius) <= 1.0\n\n\treturn inEllipse\n}\n","import * as cornerstoneMath from 'cornerstone-math'\n\n/**\n * @param {Object} (x, y, z)\n * @returns Vector3\n */\nconst convertToVector3 = (obj: { x: number; y: number; z: number }) => {\n\treturn new cornerstoneMath.Vector3(obj.x, obj.y, obj.z)\n}\nexport default convertToVector3\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { EVENTS, getEnabledElement, metaData, pixelToCanvas, updateImage } from 'cornerstone-core/dist/cornerstone.js'\nimport {\n\taddToolState,\n\tclearToolState,\n\tgetToolState,\n\timport as csTools,\n\tloadHandlerManager,\n\tsetToolDisabled,\n\tstore,\n\ttoolColors,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { waitForElementToBeEnabled, waitForEnabledElementImageToLoad } from '@/utils/wait.js'\nimport convertToVector3 from '@/utils/convertToVector3'\nimport isLocalizerImage from '../_shared/isLocalizerImage'\n\nconst BaseTool = csTools('base/BaseTool')\n\n// Drawing\nconst drawLine = csTools('drawing/drawLine')\nconst getNewContext = csTools('drawing/getNewContext')\n\n// Util\nconst imagePointToPatientPoint = csTools('util/imagePointToPatientPoint')\nconst projectPatientPointToImagePlane = csTools('util/projectPatientPointToImagePlane')\nconst scrollToIndex = csTools('util/scrollToIndex')\n\n/**\n * @export @public @class\n * @name AstCrossPoint\n * @classdesc\n * @extends BaseAnnotationTool\n */\nexport default class AstCrossPoint extends BaseTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstCrossPoint',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tpreventHandleOutsideImage: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\n\t\tsuper(initialConfiguration)\n\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\n\t\tthis.updatePoint = _updatePoint.bind(this)\n\t\tthis.clearPointsIfNotSynced = _clearPointsIfNotSynced.bind(this)\n\t\tthis.syncedId = null\n\n\t\tthis.postTouchStartCallback = this.onStart.bind(this)\n\t\tthis.touchDragCallback = this.onDrag.bind(this)\n\t\tthis.touchEndCallback = this.onEnd.bind(this)\n\n\t\tthis.postMouseDownCallback = this.onStart.bind(this)\n\t\tthis.mouseDragCallback = this.onDrag.bind(this)\n\t\tthis.mouseUpCallback = this.onEnd.bind(this)\n\n\t\tthis.mouseMoveCallback = () => false\n\t}\n\n\tactiveCallback(element, options) {\n\t\tthis.element.removeEventListener(EVENTS.NEW_IMAGE, this.clearPointsIfNotSynced)\n\t\tthis.element.addEventListener(EVENTS.NEW_IMAGE, this.clearPointsIfNotSynced)\n\t}\n\n\tpassiveCallback(element, options) {\n\t\tsetToolDisabled(this.name, options)\n\t}\n\n\tenabledCallback(element, options) {\n\t\tsetToolDisabled(this.name, options)\n\t}\n\n\tdisabledCallback(element, options) {\n\t\tthis.element.removeEventListener(EVENTS.NEW_IMAGE, this.clearPointsIfNotSynced)\n\t\tstore.state.enabledElements.forEach(async enabledElement => {\n\t\t\tclearToolState(enabledElement, this.name)\n\t\t\tconst isEnabled = await waitForElementToBeEnabled(enabledElement)\n\t\t\tconst hasLoadedImage = await waitForEnabledElementImageToLoad(enabledElement)\n\t\t\tif (isEnabled && hasLoadedImage) {\n\t\t\t\tupdateImage(enabledElement)\n\t\t\t}\n\t\t})\n\t}\n\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst element = eventData.element\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\t\ttoolData.data.forEach(data => {\n\t\t\tif (data.visible === false) return\n\t\t\tif (!data.point) return\n\t\t\t_drawCrosshairs(data, context, element)\n\t\t})\n\t}\n\n\t// Universal Event Handlers (Touch, Mouse)\n\tonStart(evt) {\n\t\tthis.updatePoint(evt)\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\n\t\tconst consumeEvent = true\n\t\treturn consumeEvent\n\t}\n\tonDrag(evt) {\n\t\tthis.updatePoint(evt)\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\t}\n\tonEnd(evt) {\n\t\tstore.state.enabledElements.forEach(enabledElement => {\n\t\t\tclearToolState(enabledElement, this.name)\n\t\t\tupdateImage(enabledElement)\n\t\t})\n\t}\n}\n\n/**\n *\n *\n * @param {*} data\n * @param {*} context\n * @param {*} element\n */\nconst _drawCrosshairs = function(data, context, element) {\n\tconst color = toolColors.getActiveColor()\n\tconst point = pixelToCanvas(element, data.point)\n\tconst distance = 15\n\tconst top = {\n\t\tx: point.x,\n\t\ty: point.y - distance,\n\t}\n\tconst right = {\n\t\tx: point.x + distance,\n\t\ty: point.y,\n\t}\n\tconst bottom = {\n\t\tx: point.x,\n\t\ty: point.y + distance,\n\t}\n\tconst left = {\n\t\tx: point.x - distance,\n\t\ty: point.y,\n\t}\n\tdrawLine(context, element, top, bottom, { color }, 'canvas')\n\tdrawLine(context, element, left, right, { color }, 'canvas')\n}\n\n/**\n *\n *\n * @param {*} evt\n * @returns\n */\nconst _updatePoint = function(evt) {\n\tconst eventData = evt.detail\n\tevt.stopImmediatePropagation()\n\tconst sourceElement = evt.currentTarget\n\tconst sourceEnabledElement = getEnabledElement(sourceElement)\n\tconst sourceImageId = sourceEnabledElement.image.imageId\n\tconst sourceImagePlane = metaData.get('imagePlaneModule', sourceImageId)\n\tif (\n\t\t!sourceImagePlane ||\n\t\t!sourceImagePlane.rowCosines ||\n\t\t!sourceImagePlane.columnCosines ||\n\t\t!sourceImagePlane.imagePositionPatient ||\n\t\t!sourceImagePlane.frameOfReferenceUID\n\t)\n\t\treturn\n\n\tconst sourceImagePoint = eventData.currentPoints.image\n\tconst sourcePatientPoint = imagePointToPatientPoint(sourceImagePoint, sourceImagePlane)\n\n\tstore.state.enabledElements.forEach(async targetElement => {\n\t\tconst stackToolDataSource = getToolState(targetElement, 'stack')\n\t\tconst isMissingStackData = !stackToolDataSource || !stackToolDataSource.data || !stackToolDataSource.data.length\n\t\tif (isMissingStackData) return\n\t\tconst seriesStack = stackToolDataSource.data[0]\n\n\t\t// Clear\n\t\tclearToolState(targetElement, this.name)\n\n\t\t// Update\n\t\tconst bestImageIdIndex = _findBestImageIdIndex(\n\t\t\tseriesStack,\n\t\t\tsourcePatientPoint,\n\t\t\tsourceImagePlane.frameOfReferenceUID,\n\t\t\tsourceImageId\n\t\t)\n\t\tif (bestImageIdIndex !== null) {\n\t\t\ttry {\n\t\t\t\tconst imageId = seriesStack.imageIds[bestImageIdIndex]\n\t\t\t\tconst targetTool = store.state.tools.find(tool => tool.element === targetElement && tool.name === this.name)\n\n\t\t\t\tif (targetTool) {\n\t\t\t\t\ttargetTool.syncedId = imageId\n\t\t\t\t}\n\t\t\t\tscrollToIndex(targetElement, bestImageIdIndex)\n\n\t\t\t\t// New ToolState w/ bestImageId\n\t\t\t\tconst targetMeta = metaData.get('imagePlaneModule', imageId)\n\t\t\t\tif (!targetMeta || !targetMeta.rowCosines || !targetMeta.columnCosines || !targetMeta.imagePositionPatient)\n\t\t\t\t\treturn\n\n\t\t\t\tconst crossPoint = projectPatientPointToImagePlane(sourcePatientPoint, targetMeta)\n\t\t\t\tconst toolData = getToolState(targetElement, this.name)\n\t\t\t\tif (!toolData || !toolData.data || !toolData.data.length) {\n\t\t\t\t\taddToolState(targetElement, this.name, {\n\t\t\t\t\t\tpoint: crossPoint,\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\ttoolData.data[0].point = crossPoint\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tconst errorLoadingHandler = loadHandlerManager.getErrorLoadingHandler()\n\t\t\t\tconst imageId = seriesStack.imageIds[bestImageIdIndex]\n\t\t\t\tif (errorLoadingHandler) errorLoadingHandler(targetElement, imageId, err)\n\t\t\t}\n\t\t}\n\n\t\t// Force redraw\n\t\tupdateImage(targetElement)\n\t})\n}\n\nconst _clearPointsIfNotSynced = function() {\n\tconst imageId = getEnabledElement(this.element).image.imageId\n\n\tif (!imageId) return // No image\n\tif (!this.syncedId) return // No syncedId\n\tif (imageId === this.syncedId) return // SyncedId matches :+1:\n\n\tstore.state.enabledElements.forEach(enabledElement => {\n\t\tclearToolState(enabledElement, this.name)\n\t\tupdateImage(enabledElement)\n\t})\n}\n\nconst _findBestImageIdIndex = function(seriesStack, sourcePatientPoint, sourceFrameOfReference, sourceImageId) {\n\tlet newImageIdIndex = null\n\tlet minDistance = Number.MAX_VALUE\n\tfor (let index = 0; index < seriesStack.imageIds.length; index++) {\n\t\tconst imageId = seriesStack.imageIds[index]\n\t\t// if this is the source image, use this index\n\t\tif (imageId === sourceImageId) {\n\t\t\tnewImageIdIndex = index\n\t\t\tbreak\n\t\t}\n\t\tconst targetMeta = metaData.get('imagePlaneModule', imageId)\n\t\tif (\n\t\t\t!targetMeta ||\n\t\t\t!targetMeta.imagePositionPatient ||\n\t\t\t!targetMeta.rowCosines ||\n\t\t\t!targetMeta.columnCosines ||\n\t\t\t!targetMeta.sliceThickness\n\t\t)\n\t\t\tcontinue\n\t\t// Verify image is from same study as source image\n\t\tif (targetMeta.frameOfReferenceUID !== sourceFrameOfReference) continue\n\t\t// Verify image is not a localizer image [ch4638]\n\t\tif (isLocalizerImage(seriesStack.imageIds, imageId, targetMeta)) continue\n\t\tconst imagePosition = convertToVector3(targetMeta.imagePositionPatient)\n\t\tconst row = convertToVector3(targetMeta.rowCosines)\n\t\tconst column = convertToVector3(targetMeta.columnCosines)\n\t\t// A vector that is perpendicular to both `column` and `row` and thus 'normal'\n\t\tconst normal = column.clone().cross(row.clone())\n\t\t// Distance from image's plane to normal's origin\n\t\tconst targetPlanePosition = normal.clone().dot(imagePosition)\n\t\t// Distance from a same-oriented plane containing the source point to normal's origin\n\t\tconst sourcePointPlanePosition = normal.clone().dot(sourcePatientPoint)\n\t\t// Distance between derived target and source planes\n\t\tconst distance = Math.abs(targetPlanePosition - sourcePointPlanePosition)\n\t\tconst tolerance = targetMeta.sliceThickness * 2\n\t\t// Do not scroll to an image that is more than double the slice thickness away\n\t\tif (distance > tolerance) continue\n\t\tif (distance < minDistance) {\n\t\t\tminDistance = distance\n\t\t\tnewImageIdIndex = index\n\t\t}\n\t}\n\n\treturn newImageIdIndex\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { updateImage, pixelToCanvas } from 'cornerstone-core/dist/cornerstone.js'\nimport { point } from 'cornerstone-math/dist/cornerstoneMath.js'\nimport {\n\taddToolState,\n\tclearToolState,\n\tgetToolState,\n\timport as csTools,\n\ttoolColors,\n\ttoolStyle,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport triggerDoneModifying from './util/triggerDoneModifying'\nimport { handleLengthIsValid } from '@/cornerstone/tools/util/handles'\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawCircle = csTools('drawing/drawCircle')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawJoinedLines = csTools('drawing/drawJoinedLines')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst getNewContext = csTools('drawing/getNewContext')\n\n// Util\nconst lineSegDistance = csTools('util/lineSegDistance')\nconst moveAnnotation = csTools('manipulators/moveAnnotation')\n\n/**\n * @export @public @class\n * @name AstHipDysplasia\n * @classdesc\n * @extends BaseAnnotationTool\n */\nexport default class AstHipDysplasia extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstHipDysplasia',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandlesOnHover: false,\n\t\t\t\tdefaultAngle: 105,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\n\t\tsuper(initialConfiguration)\n\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\n\t\tthis.disabledCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.passiveCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.enabledCallback = this._clearIncompleteToolData.bind(this)\n\t}\n\n\t// No stats to cache when moving, but CS complains otherwise\n\tupdateCachedStats() {}\n\n\t/**\n\t * Create the measurement data for this tool with the end handle activated\n\t *\n\t * @param {*} eventData\n\t * @returns\n\t */\n\tcreateNewMeasurement({ currentPoints, element }) {\n\t\tconst { x, y } = currentPoints.image\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tinvalidated: true,\n\t\t\tcolor: undefined,\n\t\t\thandles: [\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t],\n\t\t}\n\t}\n\n\taddNewMeasurement(evt, interactionType = 'mouse') {\n\t\tconst eventData = evt.detail\n\t\tconst { element } = eventData\n\t\tconst isMouse = interactionType === 'mouse'\n\t\tconst toolData = getToolState(element, this.name)\n\t\tconst isExistingInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isDrawingSecondCircle = isExistingInstance && toolData.data[0].handles.length === 2\n\t\tlet data\n\n\t\tif (isExistingInstance) {\n\t\t\tdata = toolData.data[0]\n\t\t} else {\n\t\t\tdata = this.createNewMeasurement(eventData)\n\t\t\taddToolState(element, this.name, data)\n\t\t}\n\t\tif (isDrawingSecondCircle) {\n\t\t\tdata.handles = data.handles.concat(this.createNewMeasurement(eventData).handles)\n\t\t}\n\t\tif (!isExistingInstance || isDrawingSecondCircle)\n\t\t\tthis._addCircleHandles(eventData, data, isMouse, isDrawingSecondCircle, interactionType)\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} element\n\t * @param {*} data\n\t * @param {*} coords\n\t * @returns\n\t */\n\tpointNearTool(element, data, coords) {\n\t\tconst distance = 25 // isMouse ? 15 : 25\n\t\tif (pointOnCircle(data.handles[1], data.handles[0])) return true\n\t\tif (pointOnCircle(data.handles[3], data.handles[2])) return true\n\t\tif (pointOnLine(data.handles[4], data.handles[1])) return true\n\t\tif (pointOnLine(data.handles[1], data.handles[3])) return true\n\t\tif (pointOnLine(data.handles[3], data.handles[5])) return true\n\t\treturn false\n\n\t\tfunction pointOnCircle(centerPoint, outerPoint) {\n\t\t\tif (!centerPoint || !outerPoint) return false\n\t\t\tcenterPoint = pixelToCanvas(element, centerPoint)\n\t\t\touterPoint = pixelToCanvas(element, outerPoint)\n\t\t\tconst radius = point.distance(centerPoint, outerPoint)\n\t\t\tconst minDistance = radius - distance / 2\n\t\t\tconst maxDistance = radius + distance / 2\n\t\t\tconst pointDistance = point.distance(centerPoint, coords)\n\t\t\treturn pointDistance > minDistance && pointDistance < maxDistance\n\t\t}\n\t\tfunction pointOnLine(start, end) {\n\t\t\tif (!start || !end) return false\n\t\t\treturn lineSegDistance(element, start, end, coords) < distance\n\t\t}\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\t// Custom selected callback for modified notification\n\ttoolSelectedCallback(evt, annotation, interactionType = 'mouse') {\n\t\tmoveAnnotation(evt, this, annotation, interactionType)\n\n\t\t// wait 180ms for mouseup/touchend, indicating a click rather than a drag\n\t\tconst UP_EVENT = interactionType === 'mouse' ? 'mouseup' : 'touchend'\n\n\t\t// Notify once we're done moving the tool, regardless of click vs drag\n\t\tconst changedEvent = e => {\n\t\t\tconst { element, image } = evt.detail\n\t\t\ttriggerDoneModifying(this.name, element, image)\n\t\t\tevt.detail.element.removeEventListener(UP_EVENT, changedEvent)\n\t\t}\n\t\tevt.detail.element.addEventListener(UP_EVENT, changedEvent)\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} evt\n\t * @returns\n\t */\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst { element, canvasContext } = eventData\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\n\t\tconst context = getNewContext(canvasContext.canvas)\n\t\tconst data = toolData.data[0] // only ever one instance of this tool\n\n\t\tif (data.visible === false) return\n\n\t\tdraw(context, context => {\n\t\t\tif (this.configuration.shadow) {\n\t\t\t\tcontext.shadowColor = this.configuration.shadowColor\n\t\t\t\tcontext.shadowOffsetX = this.configuration.shadowOffsetX\n\t\t\t\tcontext.shadowOffsetY = this.configuration.shadowOffsetY\n\t\t\t}\n\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\tconst haveLeftCircle = data.handles.length >= 2\n\t\t\tconst haveRightCircle = data.handles.length >= 4\n\t\t\tconst haveUpperRimHandles = data.handles.length >= 6\n\t\t\tconst haveTextBoxes = data.handles.length === 8\n\n\t\t\tif (haveLeftCircle) {\n\t\t\t\tconst outer = pixelToCanvas(element, data.handles[0])\n\t\t\t\tconst inner = pixelToCanvas(element, data.handles[1])\n\t\t\t\tconst leftRadius = point.distance(outer, inner)\n\t\t\t\tdrawCircle(context, element, data.handles[1], leftRadius, { color })\n\t\t\t}\n\t\t\tif (haveRightCircle) {\n\t\t\t\tconst outer = pixelToCanvas(element, data.handles[2])\n\t\t\t\tconst inner = pixelToCanvas(element, data.handles[3])\n\t\t\t\tconst rightRadius = point.distance(outer, inner)\n\t\t\t\tdrawCircle(context, element, data.handles[3], rightRadius, { color })\n\t\t\t}\n\t\t\tif (haveUpperRimHandles) {\n\t\t\t\tconst start = data.handles[4]\n\t\t\t\tconst points = [data.handles[1], data.handles[3], data.handles[5]]\n\t\t\t\tdrawJoinedLines(context, element, start, points, { color })\n\t\t\t}\n\t\t\tif (this.configuration.drawHandlesOnHover && data.active !== true) {\n\t\t\t\tdrawHandles(context, eventData, data.handles, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tdrawHandlesIfActive: true,\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tdrawHandles(context, eventData, data.handles, { color })\n\t\t\t}\n\t\t\tif (haveTextBoxes) drawTextBoxes()\n\t\t})\n\n\t\tfunction drawTextBoxes() {\n\t\t\tconst textBoxes = data.handles.slice(6)\n\t\t\ttextBoxes.forEach((textBox, i) => {\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tlet textBoxOffset = 0\n\t\t\t\tconst correspondingHandle = i === 0 ? data.handles[4] : data.handles[5]\n\t\t\t\tconst angle =\n\t\t\t\t\ti === 0\n\t\t\t\t\t\t? getAngleFromPoints(correspondingHandle, data.handles[1], data.handles[3])\n\t\t\t\t\t\t: getAngleFromPoints(data.handles[1], data.handles[3], correspondingHandle)\n\t\t\t\tif (!textBox.hasMoved) {\n\t\t\t\t\ttextBoxOffset = (correspondingHandle.radius || 6) + 6\n\t\t\t\t\ttextBox.x = correspondingHandle.x\n\t\t\t\t\ttextBox.y = correspondingHandle.y\n\t\t\t\t}\n\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\tcontext,\n\t\t\t\t\telement,\n\t\t\t\t\ttextBox,\n\t\t\t\t\t[`${angle}°`],\n\t\t\t\t\t[correspondingHandle],\n\t\t\t\t\t() => [correspondingHandle],\n\t\t\t\t\tcolor,\n\t\t\t\t\ttoolStyle.getToolWidth(),\n\t\t\t\t\ttextBoxOffset,\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t})\n\t\t}\n\n\t\tfunction getAngleFromPoints(a, b, c) {\n\t\t\tconst ab = Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2))\n\t\t\tconst bc = Math.sqrt(Math.pow(b.x - c.x, 2) + Math.pow(b.y - c.y, 2))\n\t\t\tconst ac = Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2))\n\t\t\tconst angle = Math.abs(Math.acos((bc * bc + ab * ab - ac * ac) / (2 * bc * ab)))\n\t\t\treturn Math.round((angle * 180) / Math.PI)\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @private @method\n\t * @param {*} eventData\n\t * @param {*} data\n\t * @param {*} isMouse\n\t * @param {*} isDrawingSecondCircle\n\t * @memberof AstHipDysplasia\n\t */\n\t_addCircleHandles(eventData, data, isMouse, isDrawingSecondCircle, interactionType) {\n\t\tconst doneMovingCallback = () => {\n\t\t\tdata.active = !isDrawingSecondCircle // show active color until both circles are done\n\t\t\tdata.invalidated = true\n\n\t\t\t// Prevent single click events from creating tiny handles\n\t\t\tif (!handleLengthIsValid(data.handles[0], data.handles[1])) {\n\t\t\t\tclearToolState(this.element, this.name)\n\t\t\t}\n\n\t\t\tif (isDrawingSecondCircle) {\n\t\t\t\t// Prevent single click events from creating tiny handles\n\t\t\t\tif (!handleLengthIsValid(data.handles[2], data.handles[3])) {\n\t\t\t\t\tdata.handles.splice(2)\n\t\t\t\t} else {\n\t\t\t\t\t_addUpperRimHandles(data, this.configuration.defaultAngle)\n\t\t\t\t\t_addTextBoxes(data)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tmoveNewHandle(\n\t\t\teventData,\n\t\t\tthis.name,\n\t\t\tdata,\n\t\t\tdata.handles[data.handles.length - 1],\n\t\t\tthis.options,\n\t\t\tinteractionType,\n\t\t\tdoneMovingCallback\n\t\t)\n\t}\n\n\t/**\n\t * Clears the tool's state if it is not a completed annotation. Usually\n\t * fired when exiting the tool's `active` mode.\n\t *\n\t * @memberof AstHipDysplasia\n\t */\n\t_clearIncompleteToolData(element, options) {\n\t\tconst toolData = getToolState(this.element, this.name)\n\t\tconst isToolInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isIncompleteDrawing = isToolInstance && toolData.data[0].handles.length < 8\n\t\tif (isIncompleteDrawing) {\n\t\t\tclearToolState(this.element, this.name)\n\t\t\tupdateImage(this.element)\n\t\t}\n\t}\n}\n\n/**\n *\n *\n * @param {Object} data - Tool data\n * @param {Number} defaultAngle\n */\nconst _addUpperRimHandles = function(data, defaultAngle) {\n\t// create points that are 2*radius away from each circle's center and rotate to 105 degrees\n\tlet leftOuter = data.handles[0]\n\tlet leftCenter = data.handles[1]\n\tlet rightOuter = data.handles[2]\n\tlet rightCenter = data.handles[3]\n\tconst rightDrawnFirst = data.handles[3].x < data.handles[1].x\n\tif (rightDrawnFirst) {\n\t\tleftOuter = data.handles[2]\n\t\tleftCenter = data.handles[3]\n\t\trightOuter = data.handles[0]\n\t\trightCenter = data.handles[1]\n\t}\n\tconst leftRadius = point.distance(leftOuter, leftCenter)\n\tconst rightRadius = point.distance(rightOuter, rightCenter)\n\tconst circleDistance = point.distance(leftCenter, rightCenter)\n\tconst leftDistancePercent = Math.abs((leftRadius * 2) / circleDistance)\n\tconst rightDistancePercent = Math.abs((rightRadius * 2) / circleDistance)\n\tconst leftIntersection = {\n\t\tx: leftDistancePercent * rightCenter.x + (1 - leftDistancePercent) * leftCenter.x,\n\t\ty: leftDistancePercent * rightCenter.y + (1 - leftDistancePercent) * leftCenter.y,\n\t}\n\tconst rightIntersection = {\n\t\tx: (1 - rightDistancePercent) * rightCenter.x + rightDistancePercent * leftCenter.x,\n\t\ty: (1 - rightDistancePercent) * rightCenter.y + rightDistancePercent * leftCenter.y,\n\t}\n\tconst topLeft = _rotatePoint(leftIntersection, leftCenter, defaultAngle * -1)\n\tconst topRight = _rotatePoint(rightIntersection, rightCenter, defaultAngle)\n\tif (rightDrawnFirst) {\n\t\t_addHandle(data, topRight)\n\t\t_addHandle(data, topLeft)\n\t} else {\n\t\t_addHandle(data, topLeft)\n\t\t_addHandle(data, topRight)\n\t}\n}\n\n/**\n *\n *\n * @param {Object} point - { x, y }\n * @param {Object} origin - { x, y }\n * @param {Number} angle\n * @returns\n */\nconst _rotatePoint = function(point, origin, angle) {\n\tangle = (angle * Math.PI) / 180\n\treturn {\n\t\tx: Math.cos(angle) * (point.x - origin.x) - Math.sin(angle) * (point.y - origin.y) + origin.x,\n\t\ty: Math.sin(angle) * (point.x - origin.x) + Math.cos(angle) * (point.y - origin.y) + origin.y,\n\t}\n}\n\n/**\n *\n *\n * @param {Object} data - Tool data to add a new handle to\n * @param {Object} point - {x, y}\n */\nconst _addHandle = function(data, point) {\n\tdata.handles.push({\n\t\tx: point.x,\n\t\ty: point.y,\n\t\thighlight: true,\n\t\tactive: false,\n\t})\n}\n\n/**\n *\n *\n * @param {Object} data - Tool data\n */\nconst _addTextBoxes = function(data) {\n\tconst textBox = {\n\t\tactive: false,\n\t\thasMoved: false,\n\t\tmovesIndependently: true,\n\t\tdrawnIndependently: true,\n\t\tallowedOutsideImage: true,\n\t\thasBoundingBox: true,\n\t}\n\tdata.handles.push(Object.assign({}, textBox))\n\tdata.handles.push(Object.assign({}, textBox))\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { metaData, pixelToCanvas } from 'cornerstone-core/dist/cornerstone.js'\nimport { lineSegment, point } from 'cornerstone-math/dist/cornerstoneMath.js'\nimport {\n\texternal,\n\tgetToolState,\n\taddToolState,\n\timport as csTools,\n\ttoolColors,\n\ttoolStyle,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\n\nimport toolSelectedCallback from './_shared/toolSelectedCallback.js'\n\n// Manipulators\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\n\n// Handle helpers\nimport { initHandle } from './util/handles'\nimport getImagePixelSpacing from './util/getImagePixelSpacing'\nimport { formatNumber } from '@utils/numberUtils'\nimport round from 'lodash/round'\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawLink = csTools('drawing/drawLink')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst drawTextBox = csTools('drawing/drawTextBox')\nconst getNewContext = csTools('drawing/getNewContext')\n\n// Util\nconst lineSegDistance = csTools('util/lineSegDistance')\n\n/**\n * @export @public @class\n * @name AstLengthAngleTool\n * @classdesc Tool for measuring distances.\n * @extends BaseAnnotationTool\n */\nexport default class AstLengthAngle extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstLengthAngle',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t\tshowAngles: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandlesOnHover: false,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\t\tsuper(initialConfiguration)\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t}\n\n\t// custom toolSelectedCallback for opening annotation dialog\n\ttoolSelectedCallback = toolSelectedCallback.bind(this)\n\n\taddNewMeasurement(evt, interactionType) {\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\n\t\tconst eventData = evt.detail\n\t\tconst element = evt.detail.element\n\t\tconst measurementData = this.createNewMeasurement(eventData)\n\n\t\tif (!measurementData) return\n\n\t\t// Associate this data with this imageId so we can render it and manipulate it\n\t\taddToolState(element, this.name, measurementData)\n\n\t\texternal.cornerstone.updateImage(element)\n\n\t\tconst doneMovingCallback = () => {\n\t\t\tmeasurementData.active = false\n\t\t\tthis.preventNewMeasurement = false\n\t\t\texternal.cornerstone.updateImage(element)\n\t\t}\n\n\t\t// Step 1, create start and end handle\n\t\tinitHandle(measurementData.handles.start, null, interactionType, this.options)\n\t\tmoveNewHandle(\n\t\t\teventData,\n\t\t\tthis.name,\n\t\t\tmeasurementData,\n\t\t\tmeasurementData.handles.end,\n\t\t\tthis.options,\n\t\t\tinteractionType,\n\t\t\tdoneMovingCallback\n\t\t)\n\t}\n\n\t/**\n\t * Create the measurement data for this tool with the end handle activated\n\t *\n\t * @param {*} eventData\n\t * @returns\n\t */\n\tcreateNewMeasurement(eventData) {\n\t\tconst goodEventData = eventData && eventData.currentPoints && eventData.currentPoints.image\n\t\tif (!goodEventData) return\n\n\t\tconst { x, y } = eventData.currentPoints.image\n\t\tconst measurementData = {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tinvalidated: true,\n\t\t\tcolor: undefined,\n\t\t\thandles: {\n\t\t\t\tstart: {\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t\ttextBox: {\n\t\t\t\t\tactive: false,\n\t\t\t\t\thasMoved: false,\n\t\t\t\t\tmovesIndependently: false,\n\t\t\t\t\tdrawnIndependently: true,\n\t\t\t\t\tallowedOutsideImage: true,\n\t\t\t\t\thasBoundingBox: true,\n\t\t\t\t},\n\t\t\t\ttextBoxes: [],\n\t\t\t},\n\t\t}\n\t\treturn measurementData\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} element\n\t * @param {*} data\n\t * @param {*} coords\n\t * @returns\n\t */\n\tpointNearTool(element, data, coords, isMouse = true) {\n\t\tconst hasStartAndEndHandles = data && data.handles && data.handles.start && data.handles.end\n\t\tconst validParameters = hasStartAndEndHandles\n\t\tconst distance = isMouse ? 15 : 25\n\n\t\tif (!validParameters) {\n\t\t\treturn false\n\t\t}\n\n\t\tif (data.visible === false) {\n\t\t\treturn false\n\t\t}\n\n\t\treturn lineSegDistance(element, data.handles.start, data.handles.end, coords) < distance\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\tupdateCachedStats() {}\n\n\t/**\n\t *\n\t *\n\t * @param {*} evt\n\t * @returns\n\t */\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst { image, element } = eventData\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\n\t\tconst lineWidth = toolStyle.getToolWidth()\n\t\tconst imagePlane = metaData.get('imagePlaneModule', image.imageId)\n\t\tconst { rowPixelSpacing, columnPixelSpacing, isPixelSpacingDefined } = getImagePixelSpacing(image)\n\n\t\t// Any lines or angles for lines with length less than or equal to\n\t\t// this tolerance value won't get rendered\n\t\tconst lineLengthTolerance = 0\n\t\ttoolData.data.forEach((line, i) => {\n\t\t\tif (line.visible === false) return\n\t\t\tcontext.save()\n\n\t\t\tdraw(context, context => {\n\t\t\t\tif (this.configuration.shadow) {\n\t\t\t\t\tcontext.shadowColor = this.configuration.shadowColor\n\t\t\t\t\tcontext.shadowOffsetX = this.configuration.shadowOffsetX\n\t\t\t\t\tcontext.shadowOffsetY = this.configuration.shadowOffsetY\n\t\t\t\t}\n\t\t\t\tconst color = toolColors.getColorIfActive(line)\n\n\t\t\t\tconst startHandle = line.handles['start']\n\t\t\t\tconst endHandle = line.handles['end']\n\t\t\t\tconst textBoxHandle = line.handles['textBox']\n\t\t\t\tconst handleStartCanvas = pixelToCanvas(element, startHandle)\n\t\t\t\tconst handleEndCanvas = pixelToCanvas(element, endHandle)\n\n\t\t\t\t// Don't render 0-length measurement lines\n\t\t\t\tif (point.distance(startHandle, endHandle) <= lineLengthTolerance) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tstartHandle.radius = startHandle.radius || 6\n\t\t\t\tendHandle.radius = endHandle.radius || 6\n\n\t\t\t\t// Draw the measurement line\n\t\t\t\tcontext.beginPath()\n\t\t\t\tcontext.strokeStyle = color\n\t\t\t\tcontext.lineWidth = lineWidth\n\t\t\t\tcontext.moveTo(handleStartCanvas.x, handleStartCanvas.y)\n\t\t\t\tcontext.lineTo(handleEndCanvas.x, handleEndCanvas.y)\n\t\t\t\tcontext.stroke()\n\n\t\t\t\t// Draw the handles\n\t\t\t\tconst handleOptions = {\n\t\t\t\t\tcolor,\n\t\t\t\t\tdrawHandlesIfActive: this.configuration.drawHandlesOnHover,\n\t\t\t\t}\n\t\t\t\tdrawHandles(context, eventData, [startHandle, endHandle], handleOptions)\n\n\t\t\t\t// Calculate length\n\t\t\t\tif (!line.length || line.invalidated) {\n\t\t\t\t\tconst dx = (endHandle.x - startHandle.x) * columnPixelSpacing\n\t\t\t\t\tconst dy = (endHandle.y - startHandle.y) * rowPixelSpacing\n\t\t\t\t\tconst length = Math.sqrt(dx * dx + dy * dy)\n\t\t\t\t\tline.length = length\n\t\t\t\t}\n\n\t\t\t\t// Draw length textbox\n\t\t\t\tlet textBoxOffset = 0\n\t\t\t\tif (!textBoxHandle.hasMoved) {\n\t\t\t\t\tconst rightmostHandle =\n\t\t\t\t\t\tstartHandle.x + startHandle.radius > endHandle.x + endHandle.radius ? startHandle : endHandle\n\t\t\t\t\ttextBoxHandle.x = rightmostHandle.x\n\t\t\t\t\ttextBoxHandle.y = rightmostHandle.y\n\t\t\t\t\ttextBoxOffset = (rightmostHandle.radius || 6) + 6\n\t\t\t\t}\n\t\t\t\tconst lengthText = getLengthText(line, isPixelSpacingDefined)\n\t\t\t\tif (!textBoxHandle.hidden) {\n\t\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\telement,\n\t\t\t\t\t\ttextBoxHandle,\n\t\t\t\t\t\tlengthText,\n\t\t\t\t\t\t[startHandle, endHandle, textBoxHandle],\n\t\t\t\t\t\ttextBoxAnchorPoints,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tlineWidth,\n\t\t\t\t\t\ttextBoxOffset,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\tif (!this.options.showAngles) return\n\n\t\t\t\t// Remove any angle textboxes related to destroyed lines\n\t\t\t\tline.handles['textBoxes'] = line.handles['textBoxes'].filter(isNotDestroyedAngle)\n\n\t\t\t\tfunction isNotDestroyedAngle(handle) {\n\t\t\t\t\tif (!('lineId' in handle)) return true\n\t\t\t\t\tconst existingLineIds = toolData.data.map(line => line.uuid)\n\t\t\t\t\treturn existingLineIds.includes(handle.lineId)\n\t\t\t\t}\n\n\t\t\t\t// Add/update angle textbox for every other line\n\t\t\t\tfor (let j = i + 1; j < toolData.data.length; j++) {\n\t\t\t\t\tconst otherLine = toolData.data[j]\n\n\t\t\t\t\t// Don't render angle if the other line doesn't meet length tolerance\n\t\t\t\t\tconst startHandle = otherLine.handles['start']\n\t\t\t\t\tconst endHandle = otherLine.handles['end']\n\t\t\t\t\tif (point.distance(startHandle, endHandle) <= lineLengthTolerance) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\tconst intersection = getIntersection(line, otherLine)\n\t\t\t\t\tconst angleTextBoxes = line.handles['textBoxes'].filter(handle => handle.lineId === otherLine.uuid)\n\n\t\t\t\t\t// Create angle on otherLine\n\t\t\t\t\tif (!angleTextBoxes.length) {\n\t\t\t\t\t\tline.handles['textBoxes'].push(createAngleTextBox(otherLine.uuid))\n\t\t\t\t\t}\n\t\t\t\t\t// Create angle on current line\n\t\t\t\t\tif (intersection && angleTextBoxes.length === 1) {\n\t\t\t\t\t\tconst isObtuseAngle = true\n\t\t\t\t\t\tline.handles['textBoxes'].push(createAngleTextBox(otherLine.uuid, isObtuseAngle))\n\t\t\t\t\t}\n\t\t\t\t\t// Remove angle on currentLine\n\t\t\t\t\tif (!intersection && angleTextBoxes.length === 2) {\n\t\t\t\t\t\tconst indexToRemove = line.handles['textBoxes'].findIndex(\n\t\t\t\t\t\t\thandle => handle.lineId === otherLine.uuid && handle.isObtuseAngle\n\t\t\t\t\t\t)\n\t\t\t\t\t\tline.handles['textBoxes'].splice(indexToRemove, 1)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Draw angle textboxes\n\t\t\t\tconst angleTextBoxes = line.handles['textBoxes'].filter(handle => 'lineId' in handle)\n\t\t\t\tangleTextBoxes.forEach(textBox => {\n\t\t\t\t\tconst otherLine = toolData.data.find(line => line.uuid === textBox.lineId)\n\t\t\t\t\tif (line.invalidated || !textBox.angle) {\n\t\t\t\t\t\ttextBox.angle = getAngle(line, otherLine)\n\t\t\t\t\t\tif (textBox.isObtuseAngle) textBox.angle = 180 - textBox.angle\n\t\t\t\t\t}\n\t\t\t\t\tconst intersection = getIntersection(line, otherLine)\n\t\t\t\t\tconst linkAnchors = intersection ? [intersection] : getClosestHandlePair(line, otherLine)\n\t\t\t\t\tif (!textBox.hasMoved) {\n\t\t\t\t\t\tlet coords\n\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\tconst { acute, obtuse } = getAcuteObtuseCoords(line, otherLine, intersection)\n\t\t\t\t\t\t\tcoords = textBox.isObtuseAngle ? obtuse : acute\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcoords = getMidpoint(...linkAnchors)\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttextBox.x = coords.x\n\t\t\t\t\t\ttextBox.y = coords.y\n\t\t\t\t\t}\n\t\t\t\t\tconst textCoords = pixelToCanvas(element, textBox)\n\t\t\t\t\tconst textBoxColor = toolColors.getColorIfActive(line.active ? line : otherLine)\n\t\t\t\t\tif (!textBox.hidden) {\n\t\t\t\t\t\ttextBox.boundingBox = drawTextBox(\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t`${formatNumber(textBox.angle)}°`,\n\t\t\t\t\t\t\ttextCoords.x,\n\t\t\t\t\t\t\ttextCoords.y,\n\t\t\t\t\t\t\ttextBoxColor,\n\t\t\t\t\t\t\t{ centering: { x: true, y: true } },\n\t\t\t\t\t\t\ttextBox.hidden\n\t\t\t\t\t\t)\n\t\t\t\t\t\tlinkAnchors.forEach(anchor => {\n\t\t\t\t\t\t\tconst anchorCanvas = pixelToCanvas(element, anchor)\n\t\t\t\t\t\t\tdrawLink([anchorCanvas], textCoords, textBox.boundingBox, context, textBoxColor, lineWidth)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t\t\tcontext.restore()\n\t\t})\n\t}\n}\n\n// START PRIVATE\n\nfunction createAngleTextBox(lineId, isObtuseAngle = false) {\n\treturn {\n\t\tlineId,\n\t\tisObtuseAngle,\n\t\tangle: null,\n\t\tactive: false,\n\t\thasMoved: false,\n\t\tmovesIndependently: false,\n\t\tdrawnIndependently: true,\n\t\tallowedOutsideImage: true,\n\t\thasBoundingBox: true,\n\t}\n}\n\nfunction getAngle(lineA, lineB) {\n\tconst slopeA = getSlope(lineA)\n\tconst slopeB = getSlope(lineB)\n\tlet angle = 0\n\tif ([-1, 0].includes(slopeA * slopeB)) {\n\t\tangle = Math.PI / 2\n\t} else {\n\t\tangle = Math.abs(Math.atan((slopeA - slopeB) / (1 + slopeA * slopeB)))\n\t}\n\tif (Number.isNaN(angle)) return\n\treturn round(angle * (180 / Math.PI), 1)\n}\n\nfunction getSlope(line) {\n\tconst startHandle = line.handles['start']\n\tconst endHandle = line.handles['end']\n\tif (startHandle.x - endHandle.x === 0) return Number.MAX_SAFE_INTEGER\n\treturn (startHandle.y - endHandle.y) / (startHandle.x - endHandle.x)\n}\n\nfunction getIntersection(lineA, lineB) {\n\tfunction invalidLineHandles(line) {\n\t\treturn !line || !line.handles || !line.handles.start || !line.handles.end\n\t}\n\tif (invalidLineHandles(lineA) || invalidLineHandles(lineB)) {\n\t\treturn\n\t}\n\treturn lineSegment.intersectLine(\n\t\t{ start: lineA.handles.start, end: lineA.handles.end },\n\t\t{ start: lineB.handles.start, end: lineB.handles.end }\n\t)\n}\n\nfunction getClosestHandlePair(lineA, lineB) {\n\tconst pointPairs = [\n\t\t[lineA.handles['start'], lineB.handles['start']],\n\t\t[lineA.handles['end'], lineB.handles['start']],\n\t\t[lineA.handles['start'], lineB.handles['end']],\n\t\t[lineA.handles['end'], lineB.handles['end']],\n\t]\n\tlet closestPair = pointPairs[0]\n\tpointPairs.forEach(pointPair => {\n\t\tif (point.distance(...pointPair) < point.distance(...closestPair)) {\n\t\t\tclosestPair = pointPair\n\t\t}\n\t})\n\treturn closestPair\n}\n\nfunction getAcuteObtuseCoords(lineA, lineB, intersection) {\n\tconst [horizontal, vertical] = [lineA, lineB].sort((a, b) => Math.abs(getSlope(a)) - Math.abs(getSlope(b)))\n\tconst [top] = [vertical.handles['start'], vertical.handles['end']].sort((a, b) => a.y - b.y)\n\tconst [horizontalAcute, horizontalObtuse] = [horizontal.handles['start'], horizontal.handles['end']].sort((a, b) => {\n\t\tconst angleA = getAngleFromPoints(intersection, top, a)\n\t\tconst angleB = getAngleFromPoints(intersection, top, b)\n\t\treturn angleA - angleB\n\t})\n\tconst acute = getMidpoint(horizontalAcute, top)\n\tconst obtuse = getMidpoint(horizontalObtuse, top)\n\tlet offset = 40 // space textboxes further apart\n\tacute.y -= offset\n\tobtuse.y -= offset\n\tif (acute.x > obtuse.x) offset *= -1\n\tacute.x -= offset\n\tobtuse.x += offset\n\treturn { acute, obtuse }\n}\n\nfunction getAngleFromPoints(origin, a, b) {\n\tconst radians = Math.atan2(b.y - origin.y, b.x - origin.x) - Math.atan2(a.y - origin.y, a.x - origin.x)\n\tlet degrees = Math.abs((radians * 180) / Math.PI)\n\tif (degrees > 360) degrees -= 360\n\tif (degrees > 180) degrees = 360 - degrees\n\treturn degrees\n}\n\nfunction getMidpoint(pointA, pointB) {\n\treturn {\n\t\tx: (pointA.x + pointB.x) / 2,\n\t\ty: (pointA.y + pointB.y) / 2,\n\t}\n}\n\nfunction getLengthText(data, isPixelSpacingDefined) {\n\tlet suffix = isPixelSpacingDefined ? ' mm' : ' px'\n\treturn `${formatNumber(round(data.length, 2))}${suffix}`\n}\n\nfunction textBoxAnchorPoints(handles) {\n\tconst midpoint = {\n\t\tx: (handles[0].x + handles[1].x) / 2,\n\t\ty: (handles[0].y + handles[1].y) / 2,\n\t}\n\treturn [handles[0], midpoint, handles[1]]\n}\n","import * as cornerstone from 'cornerstone-core/dist/cornerstone.js'\nimport * as cornerstoneTools from 'cornerstone-tools/dist/cornerstoneTools.js'\n\n// Pulling in modules :celebrate:\nconst BaseTool = cornerstoneTools.import('base/BaseTool')\nconst drawTextBox = cornerstoneTools.import('drawing/drawTextBox')\nconst textBoxWidth = cornerstoneTools.import('drawing/textBoxWidth')\nconst getNewContext = cornerstoneTools.import('drawing/getNewContext')\n\nexport default class AstOrientationMarkers extends BaseTool {\n constructor(configuration = {}) {\n const defaultConfig = {\n name: 'AstOrientationMarkers',\n mixins: ['enabledOrDisabledBinaryTool'],\n }\n const initialConfiguration = Object.assign(defaultConfig, configuration)\n\n super(initialConfiguration)\n\n this.initialConfiguration = initialConfiguration\n }\n\n enabledCallback() {\n this._forceImageUpdate()\n }\n\n disabledCallback() {\n this._forceImageUpdate()\n }\n\n _forceImageUpdate() {\n const enabledElement = cornerstone.getEnabledElement(this.element)\n const hasImageToUpdate = enabledElement.image\n\n if (hasImageToUpdate) {\n cornerstone.updateImage(this.element, true)\n }\n }\n\n renderToolData(evt) {\n const eventData = evt.detail\n const { element, viewport } = eventData\n\n const markers = getOrientationMarkers(viewport, element)\n\n if (!markers) {\n return\n }\n\n const coords = getOrientationMarkerPositions(element, markers)\n const context = getNewContext(eventData.canvasContext.canvas)\n const color = cornerstoneTools.toolColors.getToolColor()\n\n const textWidths = {\n top: textBoxWidth(context, markers.top, 0),\n left: textBoxWidth(context, markers.left, 0),\n right: textBoxWidth(context, markers.right, 0),\n bottom: textBoxWidth(context, markers.bottom, 0),\n }\n\n drawTextBox(\n context,\n markers.top,\n coords.top.x - textWidths.top / 2,\n coords.top.y,\n color\n )\n drawTextBox(\n context,\n markers.left,\n coords.left.x - textWidths.left / 2,\n coords.left.y,\n color\n )\n\n const config = this.configuration\n\n if (config && config.drawAllMarkers) {\n drawTextBox(\n context,\n markers.right,\n coords.right.x - textWidths.right / 2,\n coords.right.y,\n color\n )\n drawTextBox(\n context,\n markers.bottom,\n coords.bottom.x - textWidths.bottom / 2,\n coords.bottom.y,\n color\n )\n }\n }\n}\n\nfunction getOrientationMarkers(viewport, element) {\n const enabledElement = cornerstone.getEnabledElement(element)\n const imagePlaneMetaData = cornerstone.metaData.get(\n 'imagePlaneModule',\n enabledElement.image.imageId\n )\n\n if (\n !imagePlaneMetaData ||\n !imagePlaneMetaData.rowCosines ||\n !imagePlaneMetaData.columnCosines\n ) {\n return\n }\n\n const rowString = cornerstoneTools.orientation.getOrientationString(\n imagePlaneMetaData.rowCosines\n )\n const columnString = cornerstoneTools.orientation.getOrientationString(\n imagePlaneMetaData.columnCosines\n )\n\n const oppositeRowString = cornerstoneTools.orientation.invertOrientationString(\n rowString\n )\n const oppositeColumnString = cornerstoneTools.orientation.invertOrientationString(\n columnString\n )\n\n const rotation = viewport.rotation - (viewport.rotation % 90)\n const isRotatedClockwise = rotation > 0\n const steps = Math.abs(rotation) / 90\n const orientationStrings = [\n viewport.vflip ? columnString : oppositeColumnString,\n viewport.hflip ? oppositeRowString : rowString,\n viewport.vflip ? oppositeColumnString : columnString,\n viewport.hflip ? rowString : oppositeRowString,\n ]\n\n for (let i = 0; i < steps; i++) {\n if (isRotatedClockwise) {\n orientationStrings.unshift(orientationStrings.pop())\n } else {\n orientationStrings.push(orientationStrings.shift())\n }\n }\n\n return {\n top: orientationStrings[0],\n right: orientationStrings[1],\n bottom: orientationStrings[2],\n left: orientationStrings[3],\n }\n}\n\nfunction getOrientationMarkerPositions(element) {\n const enabledElement = cornerstone.getEnabledElement(element)\n\n const top = {\n x: enabledElement.canvas.width / 2,\n y: 5,\n }\n const bottom = {\n x: enabledElement.canvas.width / 2,\n y: enabledElement.canvas.height - 27,\n }\n const left = {\n x: 10,\n y: enabledElement.canvas.height / 2,\n }\n const right = {\n x: enabledElement.canvas.width - 24,\n y: enabledElement.canvas.height / 2,\n }\n\n return {\n top,\n bottom,\n left,\n right,\n }\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { updateImage, pixelToCanvas } from 'cornerstone-core/dist/cornerstone.js'\nimport { point } from 'cornerstone-math/dist/cornerstoneMath.js'\nimport {\n\taddToolState,\n\tclearToolState,\n\tgetToolState,\n\timport as csTools,\n\ttoolColors,\n\ttoolStyle,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\n\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport { formatNumber } from '@utils/numberUtils'\nimport round from 'lodash/round'\nimport triggerDoneModifying from './util/triggerDoneModifying'\n\nconst moveAllHandles = csTools('manipulators/moveAllHandles')\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawCircle = csTools('drawing/drawCircle')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawLine = csTools('drawing/drawLine')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst getNewContext = csTools('drawing/getNewContext')\n\n/**\n * @export @public @class\n * @name AstPennHip\n * @classdesc\n * @extends BaseAnnotationTool\n */\nexport default class AstPennHip extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstPennHip',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandlesOnHover: false,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\n\t\tsuper(initialConfiguration)\n\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\n\t\tthis.disabledCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.passiveCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.enabledCallback = this._clearIncompleteToolData.bind(this)\n\t}\n\n\t// No stats to cache when moving, but CS complains otherwise\n\tupdateCachedStats() {}\n\n\t/**\n\t * Create the measurement data for this tool with the end handle activated\n\t *\n\t * @param {*} eventData\n\t * @returns\n\t */\n\tcreateNewMeasurement({ currentPoints }) {\n\t\tconst { x, y } = currentPoints.image\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tinvalidated: true,\n\t\t\tcolor: undefined,\n\t\t\thandles: [\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t],\n\t\t}\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {HTMLElement} element\n\t * @param {*} data\n\t * @param {*} coords\n\t * @returns {boolean}\n\t */\n\tpointNearTool(element, data, coords, isMouse = true, returnShape = true) {\n\t\tconst distance = isMouse ? 6 : 12\n\t\tif (pointOnCircle(data.handles[1], data.handles[0])) return returnShape ? 'first' : true\n\t\tif (pointOnCircle(data.handles[3], data.handles[2])) return returnShape ? 'second' : true\n\t\treturn false\n\n\t\tfunction pointOnCircle(centerPoint, outerPoint) {\n\t\t\tif (!centerPoint || !outerPoint) return false\n\t\t\tcenterPoint = pixelToCanvas(element, centerPoint)\n\t\t\touterPoint = pixelToCanvas(element, outerPoint)\n\t\t\tconst radius = point.distance(centerPoint, outerPoint)\n\t\t\tconst minDistance = radius - distance / 2\n\t\t\tconst maxDistance = radius + distance / 2\n\t\t\tconst pointDistance = point.distance(centerPoint, coords)\n\t\t\treturn pointDistance > minDistance && pointDistance < maxDistance\n\t\t}\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\taddNewMeasurement(evt, interactionType = 'mouse') {\n\t\tconst eventData = evt.detail\n\t\tconst element = eventData.element\n\t\tconst measurementData = getToolState(element, this.name)\n\n\t\tconst isExistingInstance = measurementData && measurementData.data && measurementData.data.length\n\t\tconst isInstanceUnfinished =\n\t\t\tisExistingInstance && measurementData.data[measurementData.data.length - 1].handles.length < 4\n\n\t\tlet data\n\t\tif (isInstanceUnfinished) {\n\t\t\tdata = measurementData.data[measurementData.data.length - 1]\n\t\t\tdata.handles = data.handles.concat(this.createNewMeasurement(eventData).handles)\n\t\t\tdata.handles.push({\n\t\t\t\tactive: false,\n\t\t\t\thasMoved: false,\n\t\t\t\tmovesIndependently: true,\n\t\t\t\tdrawnIndependently: true,\n\t\t\t\tallowedOutsideImage: true,\n\t\t\t\thasBoundingBox: true,\n\t\t\t})\n\t\t} else {\n\t\t\tdata = this.createNewMeasurement(eventData)\n\t\t\taddToolState(element, this.name, data)\n\t\t}\n\n\t\tstartMovingHandles.call(this)\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\n\t\tfunction startMovingHandles() {\n\t\t\tconst movableHandles = data.handles.filter(handle => !handle.movesIndependently)\n\n\t\t\tconst doneMovingCallback = () => {\n\t\t\t\tdata.active = isInstanceUnfinished // show active color until both circles are done\n\t\t\t\tdata.invalidated = true\n\t\t\t}\n\n\t\t\tmoveNewHandle(\n\t\t\t\teventData,\n\t\t\t\tthis.name,\n\t\t\t\tdata,\n\t\t\t\tmovableHandles[movableHandles.length - 1],\n\t\t\t\tthis.options,\n\t\t\t\tinteractionType,\n\t\t\t\tdoneMovingCallback\n\t\t\t)\n\t\t}\n\t}\n\n\ttoolSelectedCallback(evt, toolData, interactionType = 'mouse') {\n\t\tconst eventData = evt.detail\n\t\tconst { element, image } = eventData\n\t\tconst coords = eventData.startPoints.canvas\n\n\t\tconst circle = this.pointNearTool(element, toolData, coords, true)\n\t\tif (!circle) return\n\t\ttoolData.active = true\n\n\t\t// Move individual circle\n\t\tconst circleHandles = {\n\t\t\tfirst: [0, 1],\n\t\t\tsecond: [2, 3],\n\t\t}\n\t\tmakeCircleMoveIndependently(circleHandles[circle])\n\n\t\tconst doneMovingCallback = () => {\n\t\t\ttriggerDoneModifying(this.name, element, image)\n\t\t}\n\t\tmoveAllHandles(evt.detail, this.name, toolData, null, this.options, interactionType, doneMovingCallback)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\n\t\tfunction makeCircleMoveIndependently(indices) {\n\t\t\ttoolData.handles = toolData.handles.map((handle, i) => {\n\t\t\t\thandle.movesIndependently = !indices.includes(i)\n\t\t\t\treturn handle\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} evt\n\t * @returns\n\t */\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst { element } = eventData\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\n\t\t// If we have no toolData for this element, return immediately as there is nothing to do\n\t\tif (!toolData || !toolData.data || !toolData.data.length) {\n\t\t\treturn\n\t\t}\n\n\t\ttoolData.data.forEach(data => {\n\t\t\tif (data.visible === false) return\n\n\t\t\tdraw(context, context => {\n\t\t\t\tif (this.configuration.shadow) {\n\t\t\t\t\tcontext.shadowColor = this.configuration.shadowColor\n\t\t\t\t\tcontext.shadowOffsetX = this.configuration.shadowOffsetX\n\t\t\t\t\tcontext.shadowOffsetY = this.configuration.shadowOffsetY\n\t\t\t\t}\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tconst haveFirstCircle = data.handles.length >= 2\n\t\t\t\tconst haveSecondCircle = data.handles.length >= 4\n\t\t\t\t// Draw handles\n\t\t\t\tif (this.configuration.drawHandlesOnHover && data.active !== true) {\n\t\t\t\t\tdrawHandles(context, eventData, data.handles, {\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tdrawHandlesIfActive: true,\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tdrawHandles(context, eventData, data.handles, { color })\n\t\t\t\t}\n\t\t\t\tlet circle1Outer, circle1Inner, circle2Outer, circle2Inner\n\t\t\t\tlet firstRadius, secondRadius, firstRadiusPixels, secondRadiusPixels\n\t\t\t\tif (haveFirstCircle) {\n\t\t\t\t\t// Draw first circle\n\t\t\t\t\tcircle1Outer = pixelToCanvas(element, data.handles[0])\n\t\t\t\t\tcircle1Inner = pixelToCanvas(element, data.handles[1])\n\t\t\t\t\tfirstRadius = point.distance(circle1Outer, circle1Inner)\n\t\t\t\t\tfirstRadiusPixels = point.distance(data.handles[0], data.handles[1])\n\t\t\t\t\tdrawCircle(context, element, data.handles[1], firstRadius, { color })\n\t\t\t\t}\n\t\t\t\tif (haveSecondCircle) {\n\t\t\t\t\t// Draw second circle\n\t\t\t\t\tcircle2Outer = pixelToCanvas(element, data.handles[2])\n\t\t\t\t\tcircle2Inner = pixelToCanvas(element, data.handles[3])\n\t\t\t\t\tsecondRadius = point.distance(circle2Outer, circle2Inner)\n\t\t\t\t\tsecondRadiusPixels = point.distance(data.handles[2], data.handles[3])\n\t\t\t\t\tdrawCircle(context, element, data.handles[3], secondRadius, { color })\n\t\t\t\t\tconst lineDash = [1, 3]\n\t\t\t\t\t// Draw connector\n\t\t\t\t\tdrawLine(context, element, data.handles[1], data.handles[3], {\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tlineDash,\n\t\t\t\t\t})\n\t\t\t\t\t// Draw femur radius\n\t\t\t\t\tconst femurRadius = Math.min(firstRadius, secondRadius)\n\t\t\t\t\tif (femurRadius === firstRadius) {\n\t\t\t\t\t\tconst rightEdgeOfFemur = {\n\t\t\t\t\t\t\tx: data.handles[1].x,\n\t\t\t\t\t\t\ty: data.handles[1].y - firstRadiusPixels,\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdrawLine(context, element, data.handles[1], rightEdgeOfFemur, {\n\t\t\t\t\t\t\tcolor,\n\t\t\t\t\t\t\tlineDash,\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst rightEdgeOfFemur = {\n\t\t\t\t\t\t\tx: data.handles[3].x,\n\t\t\t\t\t\t\ty: data.handles[3].y - secondRadiusPixels,\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdrawLine(context, element, data.handles[3], rightEdgeOfFemur, {\n\t\t\t\t\t\t\tcolor,\n\t\t\t\t\t\t\tlineDash,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\t// Draw textbox connected to rightmost circle's edge\n\t\t\t\t\tconst distance = point.distance(circle1Inner, circle2Inner)\n\t\t\t\t\tconst distractionIndex = formatNumber(round(distance / femurRadius, 2))\n\t\t\t\t\tconst rightCircle = {\n\t\t\t\t\t\tcenter: data.handles[3].x > data.handles[1].x ? data.handles[3] : data.handles[1],\n\t\t\t\t\t\tradius: data.handles[3].x > data.handles[1].x ? secondRadiusPixels : firstRadiusPixels,\n\t\t\t\t\t}\n\t\t\t\t\tconst rightEdgeOfShape = {\n\t\t\t\t\t\tx: rightCircle.center.x + rightCircle.radius,\n\t\t\t\t\t\ty: rightCircle.center.y,\n\t\t\t\t\t}\n\t\t\t\t\tdrawTextBox(data.handles[4], rightEdgeOfShape, [`DI: ${distractionIndex}`])\n\t\t\t\t}\n\t\t\t})\n\t\t\tfunction drawTextBox(textBox, linkedLineHandle, text) {\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tlet textBoxOffset = 0\n\t\t\t\tif (!textBox.hasMoved) {\n\t\t\t\t\ttextBoxOffset = (linkedLineHandle.radius || 6) + 6\n\t\t\t\t\ttextBox.x = linkedLineHandle.x + textBoxOffset\n\t\t\t\t\ttextBox.y = linkedLineHandle.y\n\t\t\t\t}\n\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\tcontext,\n\t\t\t\t\telement,\n\t\t\t\t\ttextBox,\n\t\t\t\t\ttext,\n\t\t\t\t\t[linkedLineHandle],\n\t\t\t\t\t() => [linkedLineHandle],\n\t\t\t\t\tcolor,\n\t\t\t\t\ttoolStyle.getToolWidth(),\n\t\t\t\t\ttextBoxOffset,\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Clears the tool's state if it is not a completed annotation. Usually\n\t * fired when exiting the tool's `active` mode.\n\t *\n\t * @memberof AstVertebralHeart\n\t */\n\t_clearIncompleteToolData(element, options) {\n\t\tconst toolData = getToolState(this.element, this.name)\n\t\tconst isToolInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isIncompleteDrawing = isToolInstance && toolData.data[0].handles.length < 5\n\t\tif (isIncompleteDrawing) {\n\t\t\tclearToolState(this.element, this.name)\n\t\t\tupdateImage(this.element)\n\t\t}\n\t}\n}\n","import {\n\tgetEnabledElement,\n\tmetaData,\n\tpixelToCanvas,\n\tupdateImage,\n\tgetStoredPixels,\n} from 'cornerstone-core/dist/cornerstone.js'\nimport convertToVector3 from '@/utils/convertToVector3'\nimport {\n\taddToolState,\n\tclearToolState,\n\tgetToolState,\n\timport as csTools,\n\ttextStyle,\n\ttoolColors,\n\tstore,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport isLocalizerImage from '../_shared/isLocalizerImage'\nimport { formatNumber } from '@utils/numberUtils'\nimport round from 'lodash/round'\n\n// Base\nconst BaseTool = csTools('base/BaseTool')\n\n// Drawing\nconst drawLine = csTools('drawing/drawLine')\nconst getNewContext = csTools('drawing/getNewContext')\nconst draw = csTools('drawing/draw')\nconst setShadow = csTools('drawing/setShadow')\nconst drawTextBox = csTools('drawing/drawTextBox')\n\n// Util\nconst imagePointToPatientPoint = csTools('util/imagePointToPatientPoint')\nconst projectPatientPointToImagePlane = csTools('util/projectPatientPointToImagePlane')\n\n/**\n * @public\n * @class AstProbe\n * @memberof Tools\n *\n * @classdesc Tool which provides a probe of the image data at the\n * input position on drag.\n * @extends Tools.Base.BaseTool\n */\nexport default class AstProbe extends BaseTool {\n\tconstructor(props = {}) {\n\t\tconst defaultProps = {\n\t\t\tname: 'AstProbe',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\tsvgCursor: null,\n\t\t\toptions: {\n\t\t\t\tpreventHandleOutsideImage: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t},\n\t\t}\n\t\tsuper(props, defaultProps)\n\t\tthis.mergeOptions(defaultProps.options)\n\n\t\tthis.postTouchStartCallback = this._movingEventCallback.bind(this)\n\t\tthis.touchDragCallback = this._movingEventCallback.bind(this)\n\t\tthis.touchEndCallback = this._endMovingEventCallback.bind(this)\n\n\t\tthis.postMouseDownCallback = this._movingEventCallback.bind(this)\n\t\tthis.mouseDragCallback = this._movingEventCallback.bind(this)\n\t\tthis.mouseUpCallback = this._endMovingEventCallback.bind(this)\n\n\t\tthis.mouseClickCallback = this._endMovingEventCallback.bind(this)\n\n\t\tthis.updatePoint = _updatePoint.bind(this)\n\t\tthis.syncedId = null\n\n\t\t// Used to ensure the actively clicked canvas doesn't render a crosshair\n\t\tthis.activeInstance = false\n\t}\n\n\t_movingEventCallback(evt) {\n\t\tthis.updatePoint(evt)\n\t\tthis.activeInstance = true\n\t}\n\n\t_endMovingEventCallback() {\n\t\tthis.activeInstance = false\n\t\tthis._clearAllPoints()\n\t}\n\n\trenderToolData(evt) {\n\t\tif (evt && evt.detail) {\n\t\t\tconst eventData = evt.detail\n\t\t\tconst element = eventData.element\n\t\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\t\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\t\t\ttoolData.data.forEach(data => {\n\t\t\t\tif (data.visible === false) return\n\t\t\t\tif (!data.point) return\n\t\t\t\tif (\n\t\t\t\t\tdata.point.x < 0 ||\n\t\t\t\t\tdata.point.y < 0 ||\n\t\t\t\t\tdata.point.x >= evt.detail.image.columns ||\n\t\t\t\t\tdata.point.y >= evt.detail.image.rows\n\t\t\t\t) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tdrawProbe.bind(this)(data.point, evt.detail.image, context, element)\n\t\t\t\tif (!this.activeInstance) _drawCrosshairs(data.point, context, element)\n\t\t\t})\n\t\t}\n\t}\n\t_clearAllPoints() {\n\t\tstore.state.enabledElements.forEach(enabledElement => {\n\t\t\tclearToolState(enabledElement, this.name)\n\t\t\tupdateImage(enabledElement)\n\t\t})\n\t}\n}\n\n/**\n * Minimal strategy will use the mouse position to get the HU value and display probe data.\n *\n * @param {Object} evt Image rendered event\n * @returns {void}\n */\nfunction drawProbe(toolCoords, image, context, element) {\n\tconst config = this.configuration\n\tconst color = toolColors.getToolColor()\n\n\tdraw(context, context => {\n\t\tsetShadow(context, config)\n\t\tlet storedPixels\n\n\t\t// Assume modality is CT or we wouldn't be able to get to this point\n\t\tstoredPixels = getStoredPixels(element, toolCoords.x, toolCoords.y, 1, 1)\n\t\tconst sp = storedPixels[0]\n\t\tconst mo = sp * image.slope + image.intercept\n\t\tconst text = `${formatNumber(round(mo, 2))} HU`\n\n\t\t// Prepare text\n\t\tconst textCoords = pixelToCanvas(element, toolCoords)\n\n\t\t// Translate the x/y away from the cursor\n\t\ttextCoords.x += 12\n\t\ttextCoords.y += -18 - (textStyle.getFontSize() + 10) / 2\n\t\tdrawTextBox(context, text, textCoords.x, textCoords.y, color)\n\t})\n}\n\n/**\n * @param {*} data\n * @param {*} context\n * @param {*} element\n */\nfunction _drawCrosshairs(pixelPoint, context, element) {\n\tconst color = toolColors.getActiveColor()\n\tconst point = pixelToCanvas(element, pixelPoint)\n\tconst distance = 15\n\tconst top = {\n\t\tx: point.x,\n\t\ty: point.y - distance,\n\t}\n\tconst right = {\n\t\tx: point.x + distance,\n\t\ty: point.y,\n\t}\n\tconst bottom = {\n\t\tx: point.x,\n\t\ty: point.y + distance,\n\t}\n\tconst left = {\n\t\tx: point.x - distance,\n\t\ty: point.y,\n\t}\n\tdrawLine(context, element, top, bottom, { color }, 'canvas')\n\tdrawLine(context, element, left, right, { color }, 'canvas')\n}\n\n// Very similar to AstCrossPoint's tool\nconst _updatePoint = function(evt) {\n\tconst eventData = evt.detail\n\tevt.stopImmediatePropagation()\n\tconst sourceElement = evt.currentTarget\n\tconst sourceEnabledElement = getEnabledElement(sourceElement)\n\tconst sourceImageId = sourceEnabledElement.image.imageId\n\tconst sourceImagePlane = metaData.get('imagePlaneModule', sourceImageId)\n\tif (\n\t\t!sourceImagePlane ||\n\t\t!sourceImagePlane.rowCosines ||\n\t\t!sourceImagePlane.columnCosines ||\n\t\t!sourceImagePlane.imagePositionPatient ||\n\t\t!sourceImagePlane.frameOfReferenceUID\n\t)\n\t\treturn\n\n\tconst sourceImagePoint = eventData.currentPoints.image\n\tconst sourcePatientPoint = imagePointToPatientPoint(sourceImagePoint, sourceImagePlane)\n\n\tstore.state.enabledElements.forEach(async targetElement => {\n\t\tconst stackToolDataSource = getToolState(targetElement, 'stack')\n\t\tconst isMissingStackData = !stackToolDataSource || !stackToolDataSource.data || !stackToolDataSource.data.length\n\t\tif (isMissingStackData) return\n\t\tconst seriesStack = stackToolDataSource.data[0]\n\n\t\t// Clear\n\t\tclearToolState(targetElement, this.name)\n\n\t\t// Update\n\t\tconst bestImageIdIndex = _findBestImageIdIndex(\n\t\t\tseriesStack,\n\t\t\tsourcePatientPoint,\n\t\t\tsourceImagePlane.frameOfReferenceUID,\n\t\t\tsourceImageId\n\t\t)\n\t\t// Only show where the \"best\" ImageID is the currently shown ID. Ignores out of sync images.\n\t\tif (bestImageIdIndex !== null && seriesStack.currentImageIdIndex === bestImageIdIndex) {\n\t\t\tconst imageId = seriesStack.imageIds[bestImageIdIndex]\n\t\t\tconst targetTool = store.state.tools.find(tool => tool.element === targetElement && tool.name === this.name)\n\n\t\t\tif (targetTool) {\n\t\t\t\ttargetTool.syncedId = imageId\n\t\t\t}\n\t\t\t// New ToolState w/ bestImageId\n\t\t\tconst targetMeta = metaData.get('imagePlaneModule', imageId)\n\t\t\tif (!targetMeta || !targetMeta.rowCosines || !targetMeta.columnCosines || !targetMeta.imagePositionPatient) return\n\n\t\t\tconst crossPoint = projectPatientPointToImagePlane(sourcePatientPoint, targetMeta)\n\t\t\tconst toolData = getToolState(targetElement, this.name)\n\t\t\tif (!toolData || !toolData.data || !toolData.data.length) {\n\t\t\t\taddToolState(targetElement, this.name, {\n\t\t\t\t\tpoint: crossPoint,\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\ttoolData.data[0].point = crossPoint\n\t\t\t}\n\t\t}\n\n\t\t// Force redraw\n\t\tupdateImage(targetElement)\n\t})\n}\n\nconst _findBestImageIdIndex = function(seriesStack, sourcePatientPoint, sourceFrameOfReference, sourceImageId) {\n\tlet newImageIdIndex = null\n\tlet minDistance = Number.MAX_VALUE\n\tfor (let index = 0; index < seriesStack.imageIds.length; index++) {\n\t\tconst imageId = seriesStack.imageIds[index]\n\t\t// if this is the source image, use this index\n\t\tif (imageId === sourceImageId) {\n\t\t\tnewImageIdIndex = index\n\t\t\tbreak\n\t\t}\n\t\tconst targetMeta = metaData.get('imagePlaneModule', imageId)\n\t\tif (\n\t\t\t!targetMeta ||\n\t\t\t!targetMeta.imagePositionPatient ||\n\t\t\t!targetMeta.rowCosines ||\n\t\t\t!targetMeta.columnCosines ||\n\t\t\t!targetMeta.sliceThickness\n\t\t)\n\t\t\tcontinue\n\t\t// Verify image is from same study as source image\n\t\tif (targetMeta.frameOfReferenceUID !== sourceFrameOfReference) continue\n\t\t// Verify image is not a localizer image [ch4638]\n\t\tif (isLocalizerImage(seriesStack.imageIds, imageId, targetMeta)) continue\n\t\tconst imagePosition = convertToVector3(targetMeta.imagePositionPatient)\n\t\tconst row = convertToVector3(targetMeta.rowCosines)\n\t\tconst column = convertToVector3(targetMeta.columnCosines)\n\t\t// A vector that is perpendicular to both `column` and `row` and thus 'normal'\n\t\tconst normal = column.clone().cross(row.clone())\n\t\t// Distance from image's plane to normal's origin\n\t\tconst targetPlanePosition = normal.clone().dot(imagePosition)\n\t\t// Distance from a same-oriented plane containing the source point to normal's origin\n\t\tconst sourcePointPlanePosition = normal.clone().dot(sourcePatientPoint)\n\t\t// Distance between derived target and source planes\n\t\tconst distance = Math.abs(targetPlanePosition - sourcePointPlanePosition)\n\t\tconst tolerance = targetMeta.sliceThickness * 2\n\t\t// Do not scroll to an image that is more than double the slice thickness away\n\t\tif (distance > tolerance) continue\n\t\tif (distance < minDistance) {\n\t\t\tminDistance = distance\n\t\t\tnewImageIdIndex = index\n\t\t}\n\t}\n\n\treturn newImageIdIndex\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { updateImage, metaData, pixelToCanvas } from 'cornerstone-core/dist/cornerstone.js'\nimport { lineSegment, point } from 'cornerstone-math/dist/cornerstoneMath.js'\nimport {\n\taddToolState,\n\tclearToolState,\n\tgetToolState,\n\timport as csTools,\n\ttoolColors,\n\ttoolStyle,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\nimport { formatNumber } from '@utils/numberUtils'\nimport round from 'lodash/round'\nimport triggerDoneModifying from '@/cornerstone/tools/util/triggerDoneModifying'\nimport getImagePixelSpacing from './util/getImagePixelSpacing'\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawCircle = csTools('drawing/drawCircle')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawLine = csTools('drawing/drawLine')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst getNewContext = csTools('drawing/getNewContext')\n\n// Util\nconst lineSegDistance = csTools('util/lineSegDistance')\nconst moveAnnotation = csTools('manipulators/moveAnnotation')\n\n/**\n * @export @public @class\n * @name AstTplo\n * @classdesc\n * @extends BaseAnnotationTool\n */\nexport default class AstTplo extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstTplo',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandlesOnHover: false,\n\t\t\t\tdefaultAngle: 105,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\n\t\tsuper(initialConfiguration)\n\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t\tthis.isDragging = true\n\n\t\tthis.disabledCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.passiveCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.enabledCallback = this._clearIncompleteToolData.bind(this)\n\t}\n\n\t// No stats to cache when moving, but CS complains otherwise\n\tupdateCachedStats() {}\n\n\t/**\n\t * Create the measurement data for this tool with the end handle activated\n\t *\n\t * @param {*} eventData\n\t * @returns\n\t */\n\tcreateNewMeasurement({ currentPoints, element }) {\n\t\tconst { x, y } = currentPoints.image\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tinvalidated: true,\n\t\t\tcolor: undefined,\n\t\t\thandles: [\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t],\n\t\t}\n\t}\n\n\taddNewMeasurement(evt, interactionType = 'mouse') {\n\t\tconst eventData = evt.detail\n\t\tconst { element, image } = eventData\n\t\tconst toolData = getToolState(element, this.name)\n\n\t\t// Determine Current Step\n\t\tconst isExistingInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isAddingTibialAxis = isExistingInstance && toolData.data[0].handles.length === 2\n\t\tconst isAddingPlateau = isExistingInstance && toolData.data[0].handles.length === 3\n\n\t\t//\n\t\tconst startMovingHandle = () => {\n\t\t\tconst movableHandles = data.handles.filter(x => !x.hasBoundingBox)\n\t\t\tmoveNewHandle(\n\t\t\t\teventData,\n\t\t\t\tthis.name,\n\t\t\t\tdata,\n\t\t\t\tmovableHandles[movableHandles.length - 1],\n\t\t\t\tthis.options,\n\t\t\t\tinteractionType\n\t\t\t)\n\t\t}\n\n\t\tlet data\n\t\tif (isExistingInstance) {\n\t\t\tdata = toolData.data[0]\n\t\t} else {\n\t\t\tdata = this.createNewMeasurement(eventData)\n\t\t\taddToolState(element, this.name, data)\n\t\t}\n\t\tif (!isExistingInstance) startMovingHandle()\n\t\tif (isAddingTibialAxis) addSingleHandle.bind(this)()\n\t\tif (isAddingPlateau) {\n\t\t\tdata.handles = data.handles.concat(this.createNewMeasurement(eventData).handles)\n\t\t\tdata.handles.push({\n\t\t\t\t// textbox\n\t\t\t\tactive: false,\n\t\t\t\thasMoved: false,\n\t\t\t\tmovesIndependently: true,\n\t\t\t\tdrawnIndependently: true,\n\t\t\t\tallowedOutsideImage: true,\n\t\t\t\thasBoundingBox: true,\n\t\t\t})\n\t\t\tstartMovingHandle()\n\t\t}\n\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\n\t\tfunction addSingleHandle() {\n\t\t\tdata.handles.push({\n\t\t\t\tx: eventData.currentPoints.image.x,\n\t\t\t\ty: eventData.currentPoints.image.y,\n\t\t\t\thighlight: true,\n\t\t\t\tactive: true,\n\t\t\t})\n\t\t\tupdateImage(element)\n\t\t\ttriggerDoneModifying(this.name, element, image)\n\t\t}\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} element\n\t * @param {*} data\n\t * @param {*} coords\n\t * @returns\n\t */\n\tpointNearTool(element, data, coords, isMouse = true) {\n\t\tconst distance = isMouse ? 15 : 25\n\t\tif (pointOnCircle(data.handles[1], data.handles[0])) return true // Talus\n\t\tif (pointOnLine(data.handles[1], data.handles[2])) return true // Tibial Axis\n\t\tif (pointOnLine(data.handles[3], data.handles[4])) return true // Plateau\n\t\tif (data.handles.length < 5) return\n\t\tconst referenceLine = _getReferenceLine(data.handles)\n\t\tif (referenceLine) {\n\t\t\tif (pointOnLine(referenceLine.start, referenceLine.end)) return true\n\t\t\tif (pointOnCircle(_getIntersection(data.handles), null, _getCutRadius(data.handles, element))) return true // Cut circle\n\t\t}\n\t\treturn false\n\n\t\tfunction pointOnCircle(centerPoint, outerPoint, radius) {\n\t\t\tif (!centerPoint || (!outerPoint && !radius)) return false\n\t\t\tcenterPoint = pixelToCanvas(element, centerPoint)\n\t\t\tif (outerPoint) {\n\t\t\t\touterPoint = pixelToCanvas(element, outerPoint)\n\t\t\t\tradius = point.distance(centerPoint, outerPoint)\n\t\t\t}\n\t\t\tconst minDistance = radius - distance / 2\n\t\t\tconst maxDistance = radius + distance / 2\n\t\t\tconst pointDistance = point.distance(centerPoint, coords)\n\t\t\treturn pointDistance > minDistance && pointDistance < maxDistance\n\t\t}\n\t\tfunction pointOnLine(start, end) {\n\t\t\tif (!start || !end) return false\n\t\t\treturn lineSegDistance(element, start, end, coords) < distance\n\t\t}\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\t// Custom selected callback for modified notification\n\ttoolSelectedCallback(evt, annotation, interactionType = 'mouse') {\n\t\tmoveAnnotation(evt, this, annotation, interactionType)\n\n\t\t// wait 180ms for mouseup/touchend, indicating a click rather than a drag\n\t\tconst UP_EVENT = interactionType === 'mouse' ? 'mouseup' : 'touchend'\n\n\t\t// Notify once we're done moving the tool, regardless of click vs drag\n\t\tconst changedEvent = e => {\n\t\t\tconst { element, image } = evt.detail\n\t\t\ttriggerDoneModifying(this.name, element, image)\n\t\t\tevt.detail.element.removeEventListener(UP_EVENT, changedEvent)\n\t\t}\n\t\tevt.detail.element.addEventListener(UP_EVENT, changedEvent)\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} evt\n\t * @returns\n\t */\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst element = eventData.element\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\t\tconst data = toolData.data[0] // only ever one instance of this tool\n\n\t\tif (data.visible === false) return\n\n\t\tdraw(context, context => {\n\t\t\tif (this.configuration.shadow) {\n\t\t\t\tcontext.shadowColor = this.configuration.shadowColor\n\t\t\t\tcontext.shadowOffsetX = this.configuration.shadowOffsetX\n\t\t\t\tcontext.shadowOffsetY = this.configuration.shadowOffsetY\n\t\t\t}\n\t\t\tconst color = toolColors.getColorIfActive(data)\n\n\t\t\tconst haveTalusCircle = data.handles.length >= 2\n\t\t\tconst haveTibialAxis = data.handles.length >= 3\n\t\t\tconst havePlateau = data.handles.length >= 5\n\n\t\t\t// Draw handles\n\t\t\tif (this.configuration.drawHandlesOnHover && data.active !== true) {\n\t\t\t\tdrawHandles(context, eventData, data.handles, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tdrawHandlesIfActive: true,\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tdrawHandles(context, eventData, data.handles, { color })\n\t\t\t}\n\n\t\t\t// Draw lines\n\t\t\tif (haveTalusCircle) drawTalusCircle()\n\t\t\tif (haveTibialAxis) drawLine(context, element, data.handles[1], data.handles[2], { color })\n\t\t\tif (havePlateau) {\n\t\t\t\tdrawLine(context, element, data.handles[3], data.handles[4], { color })\n\t\t\t\tconst intersection = _getIntersection(data.handles)\n\t\t\t\tif (!intersection) return\n\t\t\t\tconst referenceLine = _getReferenceLine(data.handles)\n\t\t\t\tdrawLine(context, element, referenceLine.start, referenceLine.end, {\n\t\t\t\t\tcolor,\n\t\t\t\t})\n\t\t\t\tdrawCircle(context, element, intersection, _getCutRadius(data.handles, element), { color })\n\t\t\t\tdrawTextBox(data.handles[5], referenceLine.end, [`TPA: ${getTPA()}`, `Diameter: ${getCutDiameter()}`])\n\t\t\t}\n\n\t\t\tfunction drawTalusCircle() {\n\t\t\t\tconst outer = pixelToCanvas(element, data.handles[0])\n\t\t\t\tconst inner = pixelToCanvas(element, data.handles[1])\n\t\t\t\tconst leftRadius = point.distance(outer, inner)\n\t\t\t\tdrawCircle(context, element, data.handles[1], leftRadius, { color })\n\t\t\t}\n\t\t\tfunction drawTextBox(textBox, linkedLineHandle, text) {\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tlet textBoxOffset = 0\n\t\t\t\tif (!textBox.hasMoved) {\n\t\t\t\t\ttextBoxOffset = 6\n\t\t\t\t\ttextBox.x = linkedLineHandle.x + textBoxOffset\n\t\t\t\t\ttextBox.y = linkedLineHandle.y\n\t\t\t\t}\n\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\tcontext,\n\t\t\t\t\telement,\n\t\t\t\t\ttextBox,\n\t\t\t\t\ttext,\n\t\t\t\t\t[linkedLineHandle],\n\t\t\t\t\t() => [linkedLineHandle],\n\t\t\t\t\tcolor,\n\t\t\t\t\ttoolStyle.getToolWidth(),\n\t\t\t\t\ttextBoxOffset,\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t}\n\t\t\tfunction getTPA() {\n\t\t\t\tconst tibialAxis = {\n\t\t\t\t\tstart: data.handles[1],\n\t\t\t\t\tend: data.handles[2],\n\t\t\t\t}\n\t\t\t\tconst plateau = {\n\t\t\t\t\tstart: data.handles[3],\n\t\t\t\t\tend: data.handles[4],\n\t\t\t\t}\n\t\t\t\tconst slopeA = getSlope(tibialAxis)\n\t\t\t\tconst slopeB = getSlope(plateau)\n\t\t\t\tlet angle = 0\n\t\t\t\tif ([-1, 0].includes(slopeA * slopeB)) {\n\t\t\t\t\tangle = Math.PI / 2\n\t\t\t\t} else {\n\t\t\t\t\tangle = Math.abs(Math.atan((slopeA - slopeB) / (1 + slopeA * slopeB)))\n\t\t\t\t}\n\t\t\t\tif (Number.isNaN(angle)) return\n\t\t\t\tangle = 90 - (angle * 180) / Math.PI\n\t\t\t\treturn `${formatNumber(round(angle, 1))}°`\n\n\t\t\t\tfunction getSlope(line) {\n\t\t\t\t\tif (line.start.x - line.end.x === 0) return Number.MAX_SAFE_INTEGER\n\t\t\t\t\treturn (line.start.y - line.end.y) / (line.start.x - line.end.x)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction getCutDiameter() {\n\t\t\t\tconst { rowPixelSpacing, columnPixelSpacing, isPixelSpacingDefined } = getImagePixelSpacing(eventData.image)\n\t\t\t\tconst distanceA = getAspectDistance(data.handles[3])\n\t\t\t\tconst distanceB = getAspectDistance(data.handles[4])\n\t\t\t\tconst unit = isPixelSpacingDefined ? 'mm' : 'px'\n\t\t\t\tconst diameter = Math.max(distanceA, distanceB) * 2\n\t\t\t\treturn `${formatNumber(round(diameter, 2))} ${unit}`\n\n\t\t\t\tfunction getAspectDistance(point) {\n\t\t\t\t\tconst intersection = _getIntersection(data.handles)\n\t\t\t\t\tconst dx = (point.x - intersection.x) * columnPixelSpacing\n\t\t\t\t\tconst dy = (point.y - intersection.y) * rowPixelSpacing\n\t\t\t\t\treturn Math.sqrt(dx * dx + dy * dy)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Clears the tool's state if it is not a completed annotation. Usually\n\t * fired when exiting the tool's `active` mode.\n\t *\n\t * @memberof AstTplo\n\t */\n\t_clearIncompleteToolData(element, options) {\n\t\tconst toolData = getToolState(this.element, this.name)\n\t\tconst isToolInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isIncompleteDrawing = isToolInstance && toolData.data[0].handles.length < 6\n\t\tif (isIncompleteDrawing) {\n\t\t\tclearToolState(this.element, this.name)\n\t\t\tupdateImage(this.element)\n\t\t}\n\t}\n}\n\n/**\n * Get the point where the tibial axis and plateau intersect\n *\n * @param {*} handles\n * @returns\n */\nfunction _getIntersection(handles) {\n\tconst tibialAxis = {\n\t\tstart: handles[1],\n\t\tend: handles[2],\n\t}\n\tconst plateau = {\n\t\tstart: handles[3],\n\t\tend: handles[4],\n\t}\n\treturn lineSegment.intersectLine(tibialAxis, plateau)\n}\n\n/**\n * Get the osteotomy cut radius\n *\n * @param {*} handles\n * @param {*} element\n * @returns {Number} Osteotomy cut radius\n */\nfunction _getCutRadius(handles, element) {\n\tlet intersection = _getIntersection(handles)\n\tif (!intersection) return\n\tlet aspectA = handles[3]\n\tlet aspectB = handles[4]\n\tif (element) {\n\t\tintersection = pixelToCanvas(element, intersection)\n\t\taspectA = pixelToCanvas(element, aspectA)\n\t\taspectB = pixelToCanvas(element, aspectB)\n\t}\n\tconst distanceA = point.distance(intersection, aspectA)\n\tconst distanceB = point.distance(intersection, aspectB)\n\treturn Math.max(distanceA, distanceB)\n}\n\n/**\n * Get the perpendicular reference line for TPA\n *\n * @param {Array} handles\n * @returns {Object} {start: {x, y}, end: {x, y}}\n */\nfunction _getReferenceLine(handles) {\n\tconst intersection = _getIntersection(handles)\n\tif (!intersection) return\n\tconst referenceSlope = ((handles[2].x - handles[1].x) / (handles[2].y - handles[1].y)) * -1\n\tconst cutRadius = _getCutRadius(handles)\n\tconst cos = 1 / Math.sqrt(1 + referenceSlope * referenceSlope)\n\tconst sin = referenceSlope / Math.sqrt(1 + referenceSlope * referenceSlope)\n\treturn {\n\t\tstart: {\n\t\t\tx: intersection.x - cutRadius * cos,\n\t\t\ty: intersection.y - cutRadius * sin,\n\t\t},\n\t\tend: {\n\t\t\tx: intersection.x + cutRadius * cos,\n\t\t\ty: intersection.y + cutRadius * sin,\n\t\t},\n\t}\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { updateImage, metaData, pixelToCanvas } from 'cornerstone-core/dist/cornerstone.js'\nimport { point } from 'cornerstone-math/dist/cornerstoneMath.js'\nimport {\n\taddToolState,\n\tclearToolState,\n\tgetToolState,\n\timport as csTools,\n\ttoolColors,\n\ttoolStyle,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport moveHandle from '@/cornerstone/manipulators/moveHandle'\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport { formatNumber } from '@utils/numberUtils'\nimport round from 'lodash/round'\nimport triggerDoneModifying from './util/triggerDoneModifying'\nimport getImagePixelSpacing from './util/getImagePixelSpacing'\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawCircle = csTools('drawing/drawCircle')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawLine = csTools('drawing/drawLine')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst getNewContext = csTools('drawing/getNewContext')\n\n// Util\nconst lineSegDistance = csTools('util/lineSegDistance')\nconst moveAnnotation = csTools('manipulators/moveAnnotation')\n\n/**\n * @export @public @class\n * @name AstTta\n * @classdesc\n * @extends BaseAnnotationTool\n */\nexport default class AstTta extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstTta',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandlesOnHover: false,\n\t\t\t\tdefaultAngle: 105,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\n\t\tsuper(initialConfiguration)\n\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t\tthis.isDragging = true\n\n\t\tthis.disabledCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.passiveCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.enabledCallback = this._clearIncompleteToolData.bind(this)\n\t}\n\n\t// No stats to cache when moving, but CS complains otherwise\n\tupdateCachedStats() {}\n\n\t/**\n\t * Create the measurement data for this tool with the end handle activated\n\t *\n\t * @param {*} eventData\n\t * @returns\n\t */\n\tcreateNewMeasurement({ currentPoints, element }) {\n\t\tconst { x, y } = currentPoints.image\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tinvalidated: true,\n\t\t\tcolor: undefined,\n\t\t\thandles: [\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t],\n\t\t}\n\t}\n\n\taddNewMeasurement(evt, interactionType = 'mouse') {\n\t\tconst eventData = evt.detail\n\t\tconst { element } = eventData\n\t\tconst toolData = getToolState(element, this.name)\n\n\t\t// Determine Current Step\n\t\tconst isExistingInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isAddingCircle = isExistingInstance && toolData.data[0].handles.length < 6\n\t\tconst isAddingLigament = isExistingInstance && toolData.data[0].handles.length === 6\n\n\t\t//\n\t\tconst startMovingHandle = () => {\n\t\t\tconst movableHandles = data.handles.filter(x => !x.hasBoundingBox)\n\t\t\tmoveNewHandle(\n\t\t\t\teventData,\n\t\t\t\tthis.name,\n\t\t\t\tdata,\n\t\t\t\tmovableHandles[movableHandles.length - 1],\n\t\t\t\tthis.options,\n\t\t\t\tinteractionType\n\t\t\t)\n\t\t}\n\n\t\tlet data\n\t\tif (isExistingInstance) {\n\t\t\tdata = toolData.data[0]\n\t\t} else {\n\t\t\tdata = this.createNewMeasurement(eventData)\n\t\t\taddToolState(element, this.name, data)\n\t\t}\n\t\tif (!isExistingInstance) startMovingHandle()\n\t\tif (isAddingCircle || isAddingLigament) {\n\t\t\tdata.handles = data.handles.concat(this.createNewMeasurement(eventData).handles)\n\t\t\tif (isAddingLigament) {\n\t\t\t\tdata.handles.push({\n\t\t\t\t\t// textbox\n\t\t\t\t\tactive: false,\n\t\t\t\t\thasMoved: false,\n\t\t\t\t\tmovesIndependently: true,\n\t\t\t\t\tdrawnIndependently: true,\n\t\t\t\t\tallowedOutsideImage: true,\n\t\t\t\t\thasBoundingBox: true,\n\t\t\t\t})\n\t\t\t}\n\t\t\tstartMovingHandle()\n\t\t}\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} element\n\t * @param {*} data\n\t * @param {*} coords\n\t * @returns\n\t */\n\tpointNearTool(element, data, coords, isMouse = true) {\n\t\tconst distance = isMouse ? 6 : 12\n\t\tif (pointOnCircle(data.handles[1], data.handles[0])) return true // First Condyle\n\t\tif (pointOnCircle(data.handles[3], data.handles[2])) return true // Second Condyle\n\t\tif (pointOnCircle(data.handles[5], data.handles[4])) return true // Femoral Head\n\t\tif (pointOnLine(data.handles[6], data.handles[7])) return true // Ligament\n\t\treturn false\n\n\t\tfunction pointOnCircle(centerPoint, outerPoint, radius) {\n\t\t\tif (!centerPoint || (!outerPoint && !radius)) return false\n\t\t\tcenterPoint = pixelToCanvas(element, centerPoint)\n\t\t\tif (outerPoint) {\n\t\t\t\touterPoint = pixelToCanvas(element, outerPoint)\n\t\t\t\tradius = point.distance(centerPoint, outerPoint)\n\t\t\t}\n\t\t\tconst minDistance = radius - distance / 2\n\t\t\tconst maxDistance = radius + distance / 2\n\t\t\tconst pointDistance = point.distance(centerPoint, coords)\n\t\t\treturn pointDistance > minDistance && pointDistance < maxDistance\n\t\t}\n\t\tfunction pointOnLine(start, end) {\n\t\t\tif (!start || !end) return false\n\t\t\treturn lineSegDistance(element, start, end, coords) < distance\n\t\t}\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tmoveHandle(evt.detail, this.name, toolData, handle, this.options, interactionType)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\t// Custom selected callback for modified notification\n\ttoolSelectedCallback(evt, annotation, interactionType = 'mouse') {\n\t\tmoveAnnotation(evt, this, annotation, interactionType)\n\n\t\t// wait 180ms for mouseup/touchend, indicating a click rather than a drag\n\t\tconst UP_EVENT = interactionType === 'mouse' ? 'mouseup' : 'touchend'\n\n\t\t// Notify once we're done moving the tool, regardless of click vs drag\n\t\tconst changedEvent = e => {\n\t\t\tconst { element, image } = evt.detail\n\t\t\ttriggerDoneModifying(this.name, element, image)\n\t\t\tevt.detail.element.removeEventListener(UP_EVENT, changedEvent)\n\t\t}\n\t\tevt.detail.element.addEventListener(UP_EVENT, changedEvent)\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} evt\n\t * @returns\n\t */\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst { image, element } = eventData\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\t\tconst data = toolData.data[0] // only ever one instance of this tool\n\n\t\tdraw(context, context => {\n\t\t\tif (this.configuration.shadow) {\n\t\t\t\tcontext.shadowColor = this.configuration.shadowColor\n\t\t\t\tcontext.shadowOffsetX = this.configuration.shadowOffsetX\n\t\t\t\tcontext.shadowOffsetY = this.configuration.shadowOffsetY\n\t\t\t}\n\t\t\tconst color = toolColors.getColorIfActive(data)\n\n\t\t\tconst haveFirstCircle = data.handles.length >= 2\n\t\t\tconst haveSecondCircle = data.handles.length >= 4\n\t\t\tconst haveThirdCircle = data.handles.length >= 6\n\t\t\tconst haveLigament = data.handles.length >= 8\n\n\t\t\t// Draw handles\n\t\t\tif (this.configuration.drawHandlesOnHover && data.active !== true) {\n\t\t\t\tdrawHandles(context, eventData, data.handles, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tdrawHandlesIfActive: true,\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tdrawHandles(context, eventData, data.handles, { color })\n\t\t\t}\n\n\t\t\t// Draw condyle circles\n\t\t\tif (haveFirstCircle) drawNewCircle(0, 1)\n\t\t\tif (haveSecondCircle) drawNewCircle(2, 3)\n\t\t\t// Draw condyle connector\n\t\t\tconst lineDash = [1, 3]\n\t\t\tif (haveFirstCircle && haveSecondCircle)\n\t\t\t\tdrawLine(context, element, data.handles[1], data.handles[3], {\n\t\t\t\t\tcolor,\n\t\t\t\t\tlineDash,\n\t\t\t\t})\n\t\t\t// Draw third circle and connector\n\t\t\tlet rightVertical\n\t\t\tif (haveThirdCircle) {\n\t\t\t\tdrawNewCircle(4, 5)\n\t\t\t\tconst start = {\n\t\t\t\t\tx: data.handles[1].x + (data.handles[3].x - data.handles[1].x) / 2,\n\t\t\t\t\ty: data.handles[1].y + (data.handles[3].y - data.handles[1].y) / 2,\n\t\t\t\t}\n\t\t\t\tconst end = data.handles[5]\n\t\t\t\trightVertical = {\n\t\t\t\t\tstart,\n\t\t\t\t\tend,\n\t\t\t\t}\n\t\t\t\tdrawLine(context, element, rightVertical.start, rightVertical.end, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tlineDash,\n\t\t\t\t})\n\t\t\t}\n\t\t\t// Draw ligament, remaining lines, and textbox\n\t\t\tif (haveLigament) {\n\t\t\t\tdrawLine(context, element, data.handles[6], data.handles[7], { color })\n\t\t\t\tconst verticalSlope =\n\t\t\t\t\t(rightVertical.end.y - rightVertical.start.y) / (rightVertical.end.x - rightVertical.start.x)\n\t\t\t\tconst horizontalSlope =\n\t\t\t\t\t((rightVertical.end.x - rightVertical.start.x) / (rightVertical.end.y - rightVertical.start.y)) * -1\n\t\t\t\tconst lowerHorizontal = {\n\t\t\t\t\tstart: data.handles[7],\n\t\t\t\t\tend: _getIntersection(data.handles[7], horizontalSlope, rightVertical),\n\t\t\t\t}\n\t\t\t\tconst leftVertical = {\n\t\t\t\t\tstart: data.handles[6],\n\t\t\t\t\tend: _getIntersection(data.handles[6], verticalSlope, lowerHorizontal),\n\t\t\t\t}\n\t\t\t\tconst leftMidpoint = {\n\t\t\t\t\tx: leftVertical.start.x + (leftVertical.end.x - leftVertical.start.x) / 2,\n\t\t\t\t\ty: leftVertical.start.y + (leftVertical.end.y - leftVertical.start.y) / 2,\n\t\t\t\t}\n\t\t\t\tconst midHorizontal = {\n\t\t\t\t\tstart: leftMidpoint,\n\t\t\t\t\tend: _getIntersection(leftMidpoint, horizontalSlope, rightVertical),\n\t\t\t\t}\n\t\t\t\tconst advanceLine = {\n\t\t\t\t\tstart: leftVertical.end,\n\t\t\t\t\tend: lowerHorizontal.start,\n\t\t\t\t}\n\t\t\t\tdrawLine(context, element, advanceLine.start, advanceLine.end, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tlineWidth: 2,\n\t\t\t\t})\n\t\t\t\tdrawLine(context, element, midHorizontal.start, midHorizontal.end, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tlineDash,\n\t\t\t\t})\n\t\t\t\tdrawLine(context, element, leftVertical.start, leftVertical.end, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tlineDash,\n\t\t\t\t})\n\t\t\t\tdrawTextBox(data.handles[8], leftVertical.end, [`TTA: ${getActualLength(advanceLine)}`])\n\t\t\t}\n\n\t\t\tfunction drawNewCircle(outerIndex, innerIndex) {\n\t\t\t\tconst outer = pixelToCanvas(element, data.handles[outerIndex])\n\t\t\t\tconst inner = pixelToCanvas(element, data.handles[innerIndex])\n\t\t\t\tconst radius = point.distance(outer, inner)\n\t\t\t\tdrawCircle(context, element, data.handles[innerIndex], radius, {\n\t\t\t\t\tcolor,\n\t\t\t\t})\n\t\t\t}\n\t\t\tfunction drawTextBox(textBox, linkedLineHandle, text) {\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tlet textBoxOffset = 0\n\t\t\t\tif (!textBox.hasMoved) {\n\t\t\t\t\ttextBoxOffset = 12\n\t\t\t\t\ttextBox.x = linkedLineHandle.x\n\t\t\t\t\ttextBox.y = linkedLineHandle.y + textBoxOffset\n\t\t\t\t}\n\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\tcontext,\n\t\t\t\t\telement,\n\t\t\t\t\ttextBox,\n\t\t\t\t\ttext,\n\t\t\t\t\t[linkedLineHandle],\n\t\t\t\t\t() => [linkedLineHandle],\n\t\t\t\t\tcolor,\n\t\t\t\t\ttoolStyle.getToolWidth(),\n\t\t\t\t\ttextBoxOffset,\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t}\n\t\t\tfunction getActualLength(line) {\n\t\t\t\tconst { rowPixelSpacing, columnPixelSpacing, isPixelSpacingDefined } = getImagePixelSpacing(image)\n\t\t\t\tconst dx = (line.end.x - line.start.x) * columnPixelSpacing\n\t\t\t\tconst dy = (line.end.y - line.start.y) * rowPixelSpacing\n\t\t\t\tconst length = Math.sqrt(dx * dx + dy * dy)\n\t\t\t\tconst unit = isPixelSpacingDefined ? 'mm' : 'px'\n\t\t\t\treturn `${formatNumber(round(length, 2))} ${unit}`\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Clears the tool's state if it is not a completed annotation. Usually\n\t * fired when exiting the tool's `active` mode.\n\t *\n\t * @memberof AstTta\n\t */\n\t_clearIncompleteToolData(element, options) {\n\t\tconst toolData = getToolState(this.element, this.name)\n\t\tconst isToolInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isIncompleteDrawing = isToolInstance && toolData.data[0].handles.length < 9\n\t\tif (isIncompleteDrawing) {\n\t\t\tclearToolState(this.element, this.name)\n\t\t\tupdateImage(this.element)\n\t\t}\n\t}\n}\n\n/**\n *\n *\n * @private @function\n * @param {*} lineAStart\n * @param {*} lineASlope\n * @param {*} lineB\n * @returns {Object} {x, y}\n */\nconst _getIntersection = function(lineAStart, lineASlope, lineB) {\n\t// https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection#Given_two_points_on_each_line\n\tconst x1 = lineAStart.x\n\tconst y1 = lineAStart.y\n\tconst x2 = lineAStart.x + 1\n\tconst y2 = lineASlope + lineAStart.y\n\tconst x3 = lineB.start.x\n\tconst y3 = lineB.start.y\n\tconst x4 = lineB.end.x\n\tconst y4 = lineB.end.y\n\tconst x =\n\t\t((x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4)) /\n\t\t((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4))\n\tconst y =\n\t\t((x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4)) /\n\t\t((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4))\n\treturn {\n\t\tx,\n\t\ty,\n\t}\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { updateImage, pageToPixel } from 'cornerstone-core/dist/cornerstone.js'\nimport { import as csTools, EVENTS } from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport {\n\tinitHandle,\n\tsetPrecisionMode,\n\tdisablePrecisionForInactiveHandles,\n} from '@/cornerstone/tools/util/handles'\n\nconst triggerEvent = csTools('util/triggerEvent')\n\nconst MOUSE = true\nconst TOUCH = false\nexport const moveAndRotateHandlesMouse = moveAndRotateHandles(MOUSE)\nexport const moveAndRotateHandlesTouch = moveAndRotateHandles(TOUCH)\n\n// Move handles and rotate other movable handles relative to opposite handle\nfunction moveAndRotateHandles(isMouse) {\n\tconst dragEvents = isMouse ? ['MOUSE_DRAG'] : ['TOUCH_DRAG']\n\tconst upEvents = isMouse\n\t\t? ['MOUSE_UP', 'MOUSE_CLICK']\n\t\t: ['TOUCH_END', 'TOUCH_DRAG_END', 'TOUCH_PINCH', 'TOUCH_PRESS', 'TAP']\n\n\treturn function(eventData, toolType, data, handle, doneMovingCallback) {\n\t\tif (!isMouse) eventData = eventData.detail\n\t\thandle.active = true\n\t\tconst element = eventData.element\n\t\tconst coords = isMouse\n\t\t\t? eventData.currentPoints.image\n\t\t\t: pageToPixel(element, eventData.currentPoints.page.x, eventData.currentPoints.page.y)\n\t\tconst interactionType = isMouse ? 'mouse' : 'touch'\n\t\tinitHandle(handle, coords, interactionType, { precisionHandlesEnabled: true })\n\t\tdisablePrecisionForInactiveHandles(element)\n\n\t\t// Store each handle's starting position for relative angle calculation\n\t\tdata.handles = data.handles.map(handle => {\n\t\t\thandle.startingPoint = {\n\t\t\t\tx: handle.x,\n\t\t\t\ty: handle.y,\n\t\t\t}\n\t\t\treturn handle\n\t\t})\n\n\t\tdragEvents.forEach(event => {\n\t\t\telement.addEventListener(EVENTS[event], dragCallback)\n\t\t})\n\t\tupEvents.forEach(event => {\n\t\t\telement.addEventListener(EVENTS[event], upCallback)\n\t\t})\n\n\t\tfunction dragCallback({ detail }) {\n\t\t\tconst coords = isMouse\n\t\t\t\t? detail.currentPoints.image\n\t\t\t\t: pageToPixel(element, detail.currentPoints.page.x, detail.currentPoints.page.y)\n\t\t\tif (handle.hasMoved === false) handle.hasMoved = true\n\t\t\thandle.active = true\n\t\t\tconst drag = handle.drag\n\t\t\tif (drag) {\n\t\t\t\thandle.x = drag.originX + coords.x - drag.originDragX\n\t\t\t\thandle.y = drag.originY + coords.y - drag.originDragY\n\t\t\t} else {\n\t\t\t\thandle.x = coords.x\n\t\t\t\thandle.y = coords.y\n\t\t\t}\n\n\t\t\tif (!handle.movesIndependently) {\n\t\t\t\tconst oppositeHandleIndeces = {\n\t\t\t\t\t0: 1,\n\t\t\t\t\t1: 0,\n\t\t\t\t\t3: 4,\n\t\t\t\t\t4: 3,\n\t\t\t\t}\n\t\t\t\tconst handleIndex = data.handles.indexOf(handle)\n\t\t\t\tconst oppositeHandleIndex = oppositeHandleIndeces[handleIndex]\n\t\t\t\tconst oppositeHandle = data.handles[oppositeHandleIndex]\n\t\t\t\tconst angleDelta =\n\t\t\t\t\t_getRelativeAngle(oppositeHandle, handle) -\n\t\t\t\t\t_getRelativeAngle(oppositeHandle, handle.startingPoint)\n\t\t\t\tdata.handles.forEach((otherHandle, i) => {\n\t\t\t\t\tif (i === handleIndex || i === oppositeHandleIndex) return\n\t\t\t\t\tif (otherHandle.movesIndependently) return\n\t\t\t\t\tconst newLocation = _rotatePoint(\n\t\t\t\t\t\totherHandle.startingPoint,\n\t\t\t\t\t\toppositeHandle,\n\t\t\t\t\t\tangleDelta || 0\n\t\t\t\t\t)\n\t\t\t\t\totherHandle = Object.assign(otherHandle, newLocation)\n\t\t\t\t})\n\t\t\t}\n\t\t\tupdateImage(element)\n\t\t\tconst eventType = EVENTS.MEASUREMENT_MODIFIED\n\t\t\tconst modifiedEventData = {\n\t\t\t\ttoolType,\n\t\t\t\telement,\n\t\t\t\tmeasurementData: data,\n\t\t\t}\n\t\t\ttriggerEvent(element, eventType, modifiedEventData)\n\t\t}\n\n\t\tfunction upCallback(evt) {\n\t\t\tconst { element, currentPoints } = evt.detail\n\t\t\tconst coords = currentPoints.canvas\n\t\t\tconst nearHandle = handle.pointNearHandle && handle.pointNearHandle(element, handle, coords)\n\t\t\tif (nearHandle && [EVENTS.MOUSE_CLICK, EVENTS.TOUCH_END].includes(evt.type)) {\n\t\t\t\t// Toggle precision mode for handle on click or tap\n\t\t\t\tsetPrecisionMode(handle, nearHandle && !handle.precision)\n\t\t\t}\n\n\t\t\thandle.active = false\n\n\t\t\tdragEvents.forEach(event => {\n\t\t\t\telement.removeEventListener(EVENTS[event], dragCallback)\n\t\t\t})\n\t\t\tupEvents.forEach(event => {\n\t\t\t\telement.removeEventListener(EVENTS[event], upCallback)\n\t\t\t})\n\t\t\tupdateImage(element)\n\t\t\tif (typeof doneMovingCallback === 'function') {\n\t\t\t\tdoneMovingCallback()\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n *\n * @private @function\n * @param {*} center\n * @param {*} endpoint\n * @returns {Number} angle\n */\nconst _getRelativeAngle = function(center, endpoint) {\n\tconst dy = endpoint.y - center.y\n\tconst dx = endpoint.x - center.x\n\treturn Math.atan2(dy, dx)\n}\n\n/**\n *\n * @private @function\n * @param {*} point\n * @param {*} origin\n * @param {*} angle\n * @returns {Object} {x, y}\n */\nconst _rotatePoint = function(point, origin, angle) {\n\treturn {\n\t\tx: Math.cos(angle) * (point.x - origin.x) - Math.sin(angle) * (point.y - origin.y) + origin.x,\n\t\ty: Math.sin(angle) * (point.x - origin.x) + Math.cos(angle) * (point.y - origin.y) + origin.y,\n\t}\n}\n","/* eslint-disable curly, capitalized-comments, newline-before-return, newline-after-var, object-property-newline */\nimport { updateImage, metaData, pixelToCanvas } from 'cornerstone-core/dist/cornerstone.js'\nimport { point } from 'cornerstone-math/dist/cornerstoneMath.js'\nimport {\n\taddToolState,\n\tclearToolState,\n\tgetToolState,\n\timport as csTools,\n\tstore,\n\ttoolColors,\n\ttoolStyle,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { openPromptDlg } from '@dialogs/TextPromptDlg'\nimport { formatNumber, parseNumber } from '@utils/numberUtils'\nimport {\n\tmoveAndRotateHandlesMouse,\n\tmoveAndRotateHandlesTouch,\n} from '@/cornerstone/manipulators/moveAndRotateHandles.js'\nimport moveNewHandle from '@/cornerstone/manipulators/moveNewHandle'\nimport round from 'lodash/round'\nimport triggerDoneModifying from './util/triggerDoneModifying'\nimport getImagePixelSpacing from './util/getImagePixelSpacing'\n\nconst BaseAnnotationTool = csTools('base/BaseAnnotationTool')\n\n// Drawing\nconst draw = csTools('drawing/draw')\nconst drawHandles = csTools('drawing/drawHandles')\nconst drawLine = csTools('drawing/drawLine')\nconst drawLink = csTools('drawing/drawLink')\nconst drawLinkedTextBox = csTools('drawing/drawLinkedTextBox')\nconst drawTextBox = csTools('drawing/drawTextBox')\nconst getNewContext = csTools('drawing/getNewContext')\n\n// Manipulators\nconst moveAllHandles = csTools('manipulators/moveAllHandles')\n\n// Util\nconst lineSegDistance = csTools('util/lineSegDistance')\n\n/**\n * @export @public @class\n * @name AstVertebralHeart\n * @classdesc\n * @extends BaseAnnotationTool\n */\nexport default class AstVertebralHeart extends BaseAnnotationTool {\n\tconstructor(configuration = {}) {\n\t\tconst defaultConfig = {\n\t\t\tname: 'AstVertebralHeart',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\toptions: {\n\t\t\t\tprecisionHandlesEnabled: true,\n\t\t\t},\n\t\t\tconfiguration: {\n\t\t\t\tshadow: true,\n\t\t\t\tshadowColor: '#000000',\n\t\t\t\tshadowOffsetX: 1,\n\t\t\t\tshadowOffsetY: 1,\n\t\t\t\tdrawHandlesOnHover: false,\n\t\t\t\tdefaultAngle: 105,\n\t\t\t},\n\t\t}\n\t\tconst initialConfiguration = Object.assign(defaultConfig, configuration)\n\n\t\tsuper(initialConfiguration)\n\n\t\tthis.initialConfiguration = initialConfiguration\n\t\tthis.mergeOptions(initialConfiguration.options)\n\t\tthis.isDragging = true\n\n\t\tthis.disabledCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.passiveCallback = this._clearIncompleteToolData.bind(this)\n\t\tthis.enabledCallback = this._clearIncompleteToolData.bind(this)\n\t}\n\n\t// No stats to cache when moving, but CS complains otherwise\n\tupdateCachedStats() {}\n\n\t/**\n\t * Create the measurement data for this tool with the end handle activated\n\t *\n\t * @param {*} eventData\n\t * @returns\n\t */\n\tcreateNewMeasurement({ currentPoints, element }) {\n\t\tconst { x, y } = currentPoints.image\n\t\treturn {\n\t\t\tvisible: true,\n\t\t\tactive: true,\n\t\t\tinvalidated: true,\n\t\t\tcolor: undefined,\n\t\t\thandles: [\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: false,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\thighlight: true,\n\t\t\t\t\tactive: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tactive: false,\n\t\t\t\t\thasMoved: false,\n\t\t\t\t\tmovesIndependently: true,\n\t\t\t\t\tdrawnIndependently: true,\n\t\t\t\t\tallowedOutsideImage: true,\n\t\t\t\t\thasBoundingBox: true,\n\t\t\t\t},\n\t\t\t],\n\t\t}\n\t}\n\n\taddNewMeasurement(evt, interactionType = 'mouse') {\n\t\tconst eventData = evt.detail\n\t\tconst { element } = eventData\n\t\tconst toolData = getToolState(element, this.name)\n\n\t\t// Determine Current Step\n\t\tconst isExistingInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isAddingSecondLine = isExistingInstance && toolData.data[0].handles.length === 3\n\t\tconst isAddingVertEdge = isExistingInstance && toolData.data[0].handles.length === 6\n\n\t\tlet data\n\t\tif (isExistingInstance) {\n\t\t\tdata = toolData.data[0]\n\t\t} else {\n\t\t\tdata = this.createNewMeasurement(eventData)\n\t\t\taddToolState(element, this.name, data)\n\t\t}\n\t\tif (isAddingSecondLine) {\n\t\t\tdata.handles = data.handles.concat(this.createNewMeasurement(eventData).handles)\n\t\t}\n\t\tif (!isExistingInstance || isAddingSecondLine)\n\t\t\tthis._addHeartLine(eventData, data, isAddingSecondLine, interactionType)\n\t\tif (isAddingVertEdge) this._addVertEdge(eventData, data)\n\t\tevt.preventDefault()\n\t\tevt.stopPropagation()\n\t}\n\n\thandleSelectedCallback(evt, toolData, handle, interactionType = 'mouse') {\n\t\tstore.state.isToolLocked = true\n\t\ttoolData.active = true\n\t\tconst isMouse = interactionType === 'mouse'\n\t\tconst eventData = evt.detail\n\t\tconst { element } = eventData\n\t\tconst upEvent = isMouse ? 'mouseup' : 'touchend'\n\n\t\t// Move handle\n\t\tconst handleMove = isMouse ? moveAndRotateHandlesMouse : moveAndRotateHandlesTouch\n\t\tconst isVhsTextbox = toolData.handles.indexOf(handle) === 9\n\t\tconst handleDoneMove = _handleDoneMove.bind(this, eventData, toolData, element, this.name)\n\t\t// If VHS textbox, show prompt if mouseup event occurs right away (a click)\n\t\tif (isVhsTextbox) {\n\t\t\tconst maxClickDuration = 150\n\t\t\tconst promptForVertebrae = _promptForVertebrae.bind(this, eventData, toolData)\n\t\t\tthis.isDragging = true\n\n\t\t\t// Drag handle if we haven't released in `maxClickDuration`\n\t\t\tsetTimeout(() => {\n\t\t\t\telement.removeEventListener(upEvent, promptForVertebrae)\n\t\t\t\tif (this.isDragging) {\n\t\t\t\t\thandleMove(\n\t\t\t\t\t\tisMouse ? eventData : evt,\n\t\t\t\t\t\tthis.name,\n\t\t\t\t\t\ttoolData,\n\t\t\t\t\t\thandle,\n\t\t\t\t\t\thandleDoneMove,\n\t\t\t\t\t\tthis.configuration.preventHandleOutsideImage,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t} else {\n\t\t\t\t\t_handleDoneMove(eventData, toolData, element, this.name)\n\t\t\t\t}\n\t\t\t}, maxClickDuration)\n\n\t\t\t// Prompt for vertebrae count if we released within `maxClickDuration`\n\t\t\telement.addEventListener(upEvent, promptForVertebrae)\n\t\t} else {\n\t\t\thandleMove(\n\t\t\t\tisMouse ? eventData : evt,\n\t\t\t\tthis.name,\n\t\t\t\ttoolData,\n\t\t\t\thandle,\n\t\t\t\thandleDoneMove,\n\t\t\t\tthis.configuration.preventHandleOutsideImage,\n\t\t\t\ttrue\n\t\t\t)\n\t\t}\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\ttoolSelectedCallback(evt, toolData, interactionType = 'mouse') {\n\t\tconst isMouse = interactionType === 'mouse'\n\t\tconst shapeHandles = {\n\t\t\theart1: [0, 1],\n\t\t\theart2: [3, 4],\n\t\t\tvert: [6, 7],\n\t\t}\n\n\t\tconst eventData = evt.detail\n\t\tconst { element } = eventData\n\t\tconst coords = eventData.startPoints.canvas\n\t\tconst shape = this.pointNearTool(element, toolData, coords, true, isMouse)\n\t\tif (!shape) return\n\n\t\ttoolData.active = true\n\n\t\t// Move shape\n\t\t_makeHandlesMoveAsGroup(toolData, shapeHandles[shape])\n\n\t\tconst doneMovingCallback = _handleDoneMove.bind(this, eventData, toolData, element, this.name)\n\t\tmoveAllHandles(evt.detail, this.name, toolData, null, this.options, interactionType, doneMovingCallback)\n\n\t\tevt.stopImmediatePropagation()\n\t\tevt.stopPropagation()\n\t\tevt.preventDefault()\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} element\n\t * @param {*} data\n\t * @param {*} coords\n\t * @returns\n\t */\n\tpointNearTool(element, data, coords, returnShape = true, isMouse = true) {\n\t\tconst distance = isMouse ? 15 : 25\n\t\tif (pointOnLine(data.handles[0], data.handles[1])) return returnShape ? 'heart1' : true\n\t\tif (pointOnLine(data.handles[3], data.handles[4])) return returnShape ? 'heart2' : true\n\t\tif (pointNearVert()) return returnShape ? 'vert' : true\n\t\treturn false\n\n\t\tfunction pointNearVert() {\n\t\t\tif (data.handles.length < 10) return\n\t\t\tif (pointOnLine(data.handles[6], data.handles[7])) return true\n\t\t\tconst vertLines = _getVertLines(data.handles)\n\t\t\tif (pointOnLine(vertLines[0].start, vertLines[0].end)) return true\n\t\t\tif (pointOnLine(vertLines[1].start, vertLines[1].end)) return true\n\t\t}\n\t\tfunction pointOnLine(start, end) {\n\t\t\tif (!start || !end) return false\n\t\t\treturn lineSegDistance(element, start, end, coords) < distance\n\t\t}\n\t}\n\n\t/**\n\t *\n\t *\n\t * @param {*} evt\n\t * @returns\n\t */\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\t\tconst { image, element } = eventData\n\t\tconst toolData = getToolState(evt.currentTarget, this.name)\n\t\tif (!toolData || !toolData.data || !toolData.data.length) return\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\t\tconst data = toolData.data[0] // only ever one instance of this tool\n\n\t\tif (data.visible === false) return\n\n\t\tdraw(context, context => {\n\t\t\tif (this.configuration.shadow) {\n\t\t\t\tcontext.shadowColor = this.configuration.shadowColor || '#000000'\n\t\t\t\tcontext.shadowOffsetX = this.configuration.shadowOffsetX || 1\n\t\t\t\tcontext.shadowOffsetY = this.configuration.shadowOffsetY || 1\n\t\t\t}\n\t\t\tconst color = toolColors.getColorIfActive(data)\n\n\t\t\tconst haveFirstLine = data.handles.length >= 3\n\t\t\tconst haveSecondLine = data.handles.length >= 6\n\t\t\tconst haveVertEdge = data.handles.length >= 10\n\n\t\t\t// Draw handles\n\t\t\tif (this.configuration.drawHandlesOnHover && data.active !== true) {\n\t\t\t\tdrawHandles(context, eventData, data.handles, {\n\t\t\t\t\tcolor,\n\t\t\t\t\tdrawHandlesIfActive: true,\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tdrawHandles(context, eventData, data.handles, { color })\n\t\t\t}\n\n\t\t\t// Draw lines\n\t\t\tconst { rowPixelSpacing, columnPixelSpacing, isPixelSpacingDefined } = getImagePixelSpacing(image)\n\t\t\tlet firstLength, secondLength, unit\n\t\t\tif (haveFirstLine) {\n\t\t\t\tdrawLine(context, element, data.handles[0], data.handles[1], { color })\n\t\t\t}\n\t\t\tif (haveSecondLine) {\n\t\t\t\tdrawLine(context, element, data.handles[3], data.handles[4], { color })\n\t\t\t}\n\t\t\tif (haveVertEdge) {\n\t\t\t\tdrawLine(context, element, data.handles[6], data.handles[7], { color })\n\t\t\t\tconst vertLines = _getVertLines(data.handles)\n\t\t\t\tdrawLine(context, element, vertLines[0].start, vertLines[0].end, {\n\t\t\t\t\tcolor,\n\t\t\t\t})\n\t\t\t\tdrawLine(context, element, vertLines[1].start, vertLines[1].end, {\n\t\t\t\t\tcolor,\n\t\t\t\t})\n\t\t\t\tdrawCenteredTextBox(data.handles[8], data.handles[7], 'T4', true)\n\t\t\t\tdrawCenteredTextBox(data.handles[9], data.handles[6], getVhsText(), false)\n\t\t\t}\n\n\t\t\t// Draw measurement textboxes\n\t\t\tif (haveFirstLine) {\n\t\t\t\tunit = isPixelSpacingDefined ? 'mm' : 'px'\n\t\t\t\tlet label = ''\n\t\t\t\tfirstLength = getLength(data.handles[0], data.handles[1])\n\t\t\t\tif (haveSecondLine) {\n\t\t\t\t\tsecondLength = getLength(data.handles[3], data.handles[4])\n\t\t\t\t\tlabel = firstLength > secondLength ? 'L: ' : 'S: '\n\t\t\t\t}\n\t\t\t\tdrawAnchoredTextBox(data.handles[2], data.handles[1], `${label}${formatNumber(round(firstLength, 2))} ${unit}`)\n\t\t\t}\n\t\t\tif (haveSecondLine) {\n\t\t\t\tconst label = secondLength > firstLength ? 'L: ' : 'S: '\n\t\t\t\tdrawAnchoredTextBox(data.handles[5], data.handles[4], `${label}${formatNumber(round(secondLength, 2))} ${unit}`)\n\t\t\t}\n\n\t\t\tfunction getLength(start, end) {\n\t\t\t\tconst dx = (end.x - start.x) * columnPixelSpacing\n\t\t\t\tconst dy = (end.y - start.y) * rowPixelSpacing\n\t\t\t\treturn Math.sqrt(dx * dx + dy * dy)\n\t\t\t}\n\t\t\tfunction getVhsText() {\n\t\t\t\tif (!data.long || !data.short) return '[Click to add score]'\n\t\t\t\tconst vhs = formatNumber(round(data.long + data.short, 1))\n\t\t\t\treturn `VHS: ${vhs} (${formatNumber(data.long)} + ${formatNumber(data.short)})`\n\t\t\t}\n\t\t\tfunction drawCenteredTextBox(textBox, linkedLineHandle, text, placeAbove) {\n\t\t\t\tif (!textBox.hasMoved) {\n\t\t\t\t\ttextBox.x = linkedLineHandle.x\n\t\t\t\t\ttextBox.y = linkedLineHandle.y\n\t\t\t\t}\n\t\t\t\tconst textCoords = pixelToCanvas(element, textBox)\n\t\t\t\tconst verticalOffset = (20 + (linkedLineHandle.radius || 6)) * (placeAbove ? -1 : 1)\n\t\t\t\tif (!textBox.hasMoved) textCoords.y += verticalOffset\n\t\t\t\tconst options = {\n\t\t\t\t\tcentering: {\n\t\t\t\t\t\tx: true,\n\t\t\t\t\t\ty: true,\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t\ttextBox.boundingBox = drawTextBox(context, [text], textCoords.x, textCoords.y, color, options)\n\t\t\t\tif (textBox.hasMoved) {\n\t\t\t\t\t// Draw dashed link line between tool and text\n\t\t\t\t\tdrawLink(\n\t\t\t\t\t\t[pixelToCanvas(element, linkedLineHandle)],\n\t\t\t\t\t\ttextCoords,\n\t\t\t\t\t\ttextBox.boundingBox,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\ttoolStyle.getToolWidth()\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction drawAnchoredTextBox(textBox, linkedLineHandle, text) {\n\t\t\t\tconst color = toolColors.getColorIfActive(data)\n\t\t\t\tlet textBoxOffset = 0\n\t\t\t\tif (!textBox.hasMoved) {\n\t\t\t\t\ttextBoxOffset = linkedLineHandle.radius + 6\n\t\t\t\t\ttextBox.x = linkedLineHandle.x\n\t\t\t\t\ttextBox.y = linkedLineHandle.y\n\t\t\t\t}\n\t\t\t\tdrawLinkedTextBox(\n\t\t\t\t\tcontext,\n\t\t\t\t\telement,\n\t\t\t\t\ttextBox,\n\t\t\t\t\t[text],\n\t\t\t\t\t[linkedLineHandle],\n\t\t\t\t\t() => [linkedLineHandle],\n\t\t\t\t\tcolor,\n\t\t\t\t\ttoolStyle.getToolWidth(),\n\t\t\t\t\ttextBoxOffset,\n\t\t\t\t\tfalse\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\n\t_addHeartLine(eventData, data, isAddingSecondLine, interactionType) {\n\t\tconst doneMovingCallback = () => {\n\t\t\tdata.invalidated = true\n\n\t\t\tif (isAddingSecondLine) {\n\t\t\t\tif (isIntersecting()) snapToPerpendicular()\n\t\t\t\tif (!isIntersecting()) data.handles = data.handles.slice(0, 3) // remove badly placed second line\n\t\t\t}\n\t\t\tupdateImage(this.element)\n\t\t}\n\n\t\t// Move our new handle :+1:\n\t\tmoveNewHandle(\n\t\t\teventData,\n\t\t\tthis.name,\n\t\t\tdata,\n\t\t\tdata.handles[data.handles.length - 2],\n\t\t\tthis.options,\n\t\t\tinteractionType,\n\t\t\tdoneMovingCallback\n\t\t)\n\n\t\tfunction isIntersecting() {\n\t\t\tconst lineA = [data.handles[0], data.handles[1]]\n\t\t\tconst lineB = [data.handles[3], data.handles[4]]\n\t\t\tconst det =\n\t\t\t\t(lineA[1].x - lineA[0].x) * (lineB[1].y - lineB[0].y) - (lineB[1].x - lineB[0].x) * (lineA[1].y - lineA[0].y)\n\t\t\tif (det === 0) return false\n\t\t\tconst lambda =\n\t\t\t\t((lineB[1].y - lineB[0].y) * (lineB[1].x - lineA[0].x) +\n\t\t\t\t\t(lineB[0].x - lineB[1].x) * (lineB[1].y - lineA[0].y)) /\n\t\t\t\tdet\n\t\t\tconst gamma =\n\t\t\t\t((lineA[0].y - lineA[1].y) * (lineB[1].x - lineA[0].x) +\n\t\t\t\t\t(lineA[1].x - lineA[0].x) * (lineB[1].y - lineA[0].y)) /\n\t\t\t\tdet\n\t\t\treturn lambda > 0 && lambda < 1 && gamma > 0 && gamma < 1\n\t\t}\n\t\tfunction snapToPerpendicular() {\n\t\t\tconst crossPoint = _getCrossPoint(data.handles)\n\t\t\tconst slope = (crossPoint.y - data.handles[3].y) / (crossPoint.x - data.handles[3].x)\n\t\t\tconst isHorizontal = Math.abs(slope) < 1\n\t\t\tconst padding = 6\n\t\t\tif (isHorizontal) {\n\t\t\t\tsnapToX()\n\t\t\t\tif (!isWithinBounds()) {\n\t\t\t\t\tif (data.handles[4].y < padding) data.handles[4].y = padding\n\t\t\t\t\tif (data.handles[4].y > eventData.image.height - padding) data.handles[4].y = eventData.image.height - padding\n\t\t\t\t\tsnapToY()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsnapToY()\n\t\t\t\tif (!isWithinBounds()) {\n\t\t\t\t\tif (data.handles[4].x < padding) data.handles[4].x = padding\n\t\t\t\t\tif (data.handles[4].x > eventData.image.width - padding) data.handles[4].x = eventData.image.width - padding\n\t\t\t\t\tsnapToX()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isWithinBounds()) data.handles = data.handles.slice(0, 3)\n\n\t\t\tfunction snapToX() {\n\t\t\t\tdata.handles[4].y = slope * (data.handles[4].x - crossPoint.x) + crossPoint.y\n\t\t\t}\n\t\t\tfunction snapToY() {\n\t\t\t\tdata.handles[4].x = (data.handles[4].y - crossPoint.y) / slope + crossPoint.x\n\t\t\t}\n\t\t\tfunction isWithinBounds() {\n\t\t\t\tconst yInBounds = data.handles[4].y >= padding && data.handles[4].y <= eventData.image.height - padding\n\t\t\t\tconst xInBounds = data.handles[4].x >= padding && data.handles[4].x <= eventData.image.width - padding\n\t\t\t\treturn yInBounds && xInBounds\n\t\t\t}\n\t\t}\n\t}\n\n\t_addVertEdge(eventData, data) {\n\t\tconst getDistance = (a, b) => Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2))\n\t\tconst heartLengths = [getDistance(data.handles[0], data.handles[1]), getDistance(data.handles[3], data.handles[4])]\n\t\tconst defaultHeight = Math.max(...heartLengths) / 2\n\t\tconst topHandle = {\n\t\t\tx: eventData.currentPoints.image.x,\n\t\t\ty: eventData.currentPoints.image.y,\n\t\t\thighlight: true,\n\t\t\tactive: true,\n\t\t\tmovesIndependently: true,\n\t\t}\n\t\tconst bottomHandle = {\n\t\t\tx: eventData.currentPoints.image.x,\n\t\t\ty: eventData.currentPoints.image.y + defaultHeight,\n\t\t\thighlight: true,\n\t\t\tactive: false,\n\t\t\tmovesIndependently: true,\n\t\t}\n\t\tconst textBox = {\n\t\t\tactive: false,\n\t\t\thasMoved: false,\n\t\t\tmovesIndependently: true,\n\t\t\tdrawnIndependently: true,\n\t\t\tallowedOutsideImage: true,\n\t\t\thasBoundingBox: true,\n\t\t}\n\t\tdata.handles.push(bottomHandle, topHandle, Object.assign({}, textBox), Object.assign({}, textBox))\n\t\tdata.invalidated = true\n\t\tupdateImage(this.element)\n\t\ttriggerDoneModifying(this.name, this.element, eventData.image)\n\t}\n\n\t/**\n\t * Clears the tool's state if it is not a completed annotation. Usually\n\t * fired when exiting the tool's `active` mode.\n\t *\n\t * @memberof AstVertebralHeart\n\t */\n\t_clearIncompleteToolData(element, options) {\n\t\tconst toolData = getToolState(this.element, this.name)\n\t\tconst isToolInstance = toolData && toolData.data && toolData.data.length\n\t\tconst isIncompleteDrawing = isToolInstance && toolData.data[0].handles.length < 10\n\t\tif (isIncompleteDrawing) {\n\t\t\tclearToolState(this.element, this.name)\n\t\t\tupdateImage(this.element)\n\t\t}\n\t}\n}\n\n/**\n *\n *\n * @param {*} data\n * @returns\n */\nasync function _promptForVertebrae(eventData, data) {\n\t/* eslint-disable no-alert */\n\tthis.isDragging = false\n\tconst lengths = _getVertLines(data.handles).map(line => point.distance(line.start, line.end))\n\tconst [longLength, shortLength] = lengths\n\tconst longToShortRatio = longLength / shortLength\n\tconst long = parseNumber(\n\t\tawait openPromptDlg({\n\t\t\ttitle: 'Vertabrae',\n\t\t\tprompt: 'Enter the vertebrae count for the long axis:',\n\t\t\tdefaultValue: (data.long && formatNumber(data.long)) || '',\n\t\t})\n\t)\n\tif (!long) return\n\tconst calculatedShortCount = round(long * longToShortRatio, 1)\n\tconst short = parseNumber(\n\t\tawait openPromptDlg({\n\t\t\ttitle: 'Vertabrae',\n\t\t\tprompt: 'Enter the vertebrae count for the short axis:',\n\t\t\tdefaultValue: formatNumber(data.short || calculatedShortCount),\n\t\t})\n\t)\n\tif (!short) return\n\tdata.long = long\n\tdata.short = short\n\tupdateImage(this.element)\n\ttriggerDoneModifying(this.name, this.element, eventData.image)\n}\n\n/**\n *\n *\n * @param {*} data\n * @param {*} indeces\n */\nfunction _makeHandlesMoveAsGroup(data, indeces) {\n\tdata.handles = data.handles.map((handle, i) => {\n\t\thandle.movesIndependently = !indeces.includes(i)\n\t\treturn handle\n\t})\n}\n\n/**\n *\n *\n * @param {*} eventData\n * @param {*} toolData\n * @param {HTMLElement} element\n * @param {string} toolName - The tool's name\n */\nfunction _handleDoneMove(eventData, toolData, element, toolName) {\n\tconst shapeHandles = {\n\t\theart1: [0, 1],\n\t\theart2: [3, 4],\n\t\tvert: [6, 7],\n\t}\n\t_makeHandlesMoveAsGroup(toolData, shapeHandles.heart1.concat(shapeHandles.heart2)) // reset heart back to move as group for rotation\n\ttoolData.active = false\n\ttoolData.invalidated = true\n\tstore.state.isToolLocked = false\n\tupdateImage(element)\n\n\ttriggerDoneModifying(toolName, element, eventData.image)\n}\n\n/**\n * Gets points for vertebrae lines (for both drawing and pointNearTool)\n *\n * @private @function\n * @param {*} handles\n * @returns {Array} {start, end} Sorted array of vertebrae lines\n */\nconst _getVertLines = function(handles) {\n\tconst lengths = [point.distance(handles[0], handles[1]), point.distance(handles[3], handles[4])]\n\treturn lengths.sort((a, b) => a - b).map((length, i) => getVertLine(handles, length, i))\n\n\tfunction getVertLine(handles, length, index) {\n\t\tconst position = index === 0 ? 0.4 : 0.6\n\t\tconst edgeDeltaX = handles[7].x - handles[6].x\n\t\tconst edgeDeltaY = handles[7].y - handles[6].y\n\t\tif (edgeDeltaY > 0) length *= -1 // allow lines to be rotated to left side\n\t\tconst start = {\n\t\t\tx: handles[6].x + edgeDeltaX * position,\n\t\t\ty: handles[6].y + edgeDeltaY * position,\n\t\t}\n\t\tconst slope = edgeDeltaX / edgeDeltaY\n\t\tconst end = {\n\t\t\tx: start.x + length * Math.sqrt(1 / (1 + Math.pow(slope, 2))),\n\t\t\ty: start.y - length * slope * Math.sqrt(1 / (1 + Math.pow(slope, 2))),\n\t\t}\n\t\treturn {\n\t\t\tstart,\n\t\t\tend,\n\t\t}\n\t}\n}\n\n/**\n * Gets points where heart lines intersect (for snapping last heart handle)\n *\n * @private @function\n * @param {*} handles\n * @returns {Object} {x, y}\n */\nconst _getCrossPoint = function(handles) {\n\tconst lineDeltaY = handles[1].y - handles[0].y\n\tconst lineDeltaX = handles[1].x - handles[0].x\n\tconst originDeltaX = handles[3].x - handles[0].x\n\tconst originDeltaY = handles[3].y - handles[0].y\n\tconst k =\n\t\t(lineDeltaY * originDeltaX - lineDeltaX * originDeltaY) / (lineDeltaY * lineDeltaY + lineDeltaX * lineDeltaX)\n\treturn {\n\t\tx: handles[3].x - k * lineDeltaY,\n\t\ty: handles[3].y + k * lineDeltaX,\n\t}\n}\n","import {\n updateImage,\n pixelToCanvas,\n} from 'cornerstone-core/dist/cornerstone.js'\n\nimport {\n import as csTools,\n store,\n getToolState,\n removeToolState,\n} from 'cornerstone-tools/dist/cornerstoneTools.js'\n\nconst BaseTool = csTools('base/BaseTool')\nconst state = store.state\n// const { eraserCursor } = csTools('tools/cursors')\n\n/**\n * @public\n * @class AstEraserTool\n * @memberof Tools.Custom\n *\n * @classdesc Tool for deleting the data of other Annotation Tools.\n * @extends Tools.Base.BaseTool\n */\nexport default class AstEraser extends BaseTool {\n constructor(config = {}) {\n const defaultConfig = {\n name: 'AstEraser',\n supportedInteractionTypes: ['Mouse', 'Touch'],\n // svgCursor: eraserCursor,\n }\n super(Object.assign(defaultConfig, config))\n\n this.preMouseDownCallback = this._deleteAllNearbyTools.bind(this)\n this.preTouchStartCallback = this._deleteAllNearbyTools.bind(this)\n }\n\n _deleteAllNearbyTools(evt) {\n const coords = evt.detail.currentPoints.canvas\n const element = evt.detail.element\n\n state.tools.forEach(tool => {\n const toolState = getToolState(element, tool.name)\n if (toolState) {\n toolState.data.forEach(data => {\n const handles = data.handles\n let removeTool = false\n // Check for handles\n if (handles) {\n if (handles.length) {\n // Remove if coordinates are near any of the handle elements\n removeTool = !!handles.find(h => this._pointsNear(coords, h))\n } else if (handles.start && handles.end) {\n // Remove if coordinates are near the handle start or end\n const startCanvas = pixelToCanvas(element, handles.start)\n const endCanvas = pixelToCanvas(element, handles.end)\n removeTool =\n this._pointsNear(coords, startCanvas) ||\n this._pointsNear(coords, endCanvas)\n }\n }\n // Or remove tool if coordinates are near the tool\n if (\n !removeTool &&\n typeof tool.pointNearTool === 'function' &&\n tool.pointNearTool(element, data, coords)\n ) {\n removeTool = true\n }\n // Remove it!\n if (removeTool) {\n removeToolState(element, tool.name, data)\n updateImage(element)\n }\n })\n }\n })\n return true\n }\n\n _pointsNear({ x: fromX, y: fromY }, { x: toX, y: toY }, tolerance = 5) {\n return (\n Math.abs(fromX - toX) <= tolerance && Math.abs(fromY - toY) <= tolerance\n )\n }\n}\n","/**\n * Copied from Cornerstone Tools so we can use previously stored metadata instead of relying on dom elements from other pages.\n * One file because that's easier.\n */\nimport { external, import as csTools, toolColors } from 'cornerstone-tools/dist/cornerstoneTools.js'\nimport { waitForEnabledElementImageToLoad } from '@/utils/wait.js'\n\nimport convertToVector3 from '@/utils/convertToVector3'\nimport store from '@store'\n\nconst BaseTool = csTools('base/BaseTool')\nconst draw = csTools('drawing/draw')\nconst drawLine = csTools('drawing/drawLine')\n\nconst getNewContext = csTools('drawing/getNewContext')\n\n/**\n * When enabled, this tool will display references lines for each source\n * enabledElement in the provided synchronizer. This tool can also be configured\n * to use a custom renderer for alternative reference line rendering behavior\n *\n * TODO: Need to watch for configuration changes to update ToolState\n * TODO:\n *\n * @export @public @class\n * @name ReferenceLinesTool\n * @classdesc Tool for displaying reference lines of other enabledElements\n * @extends Tools.Base.BaseTool\n */\nexport default class ReferenceLinesTool extends BaseTool {\n\tconstructor(props = {}) {\n\t\tconst defaultProps = {\n\t\t\tname: 'ReferenceLines',\n\t\t\tmixins: ['enabledOrDisabledBinaryTool'],\n\t\t\tconfiguration: {\n\t\t\t\trenderer: renderActiveReferenceLine,\n\t\t\t},\n\t\t}\n\n\t\tsuper(props, defaultProps)\n\n\t\tthis.renderer = null\n\t\tthis.synchronizationContext = null\n\t}\n\n\tasync enabledCallback(element, { synchronizationContext } = {}) {\n\t\tconst renderer = this.configuration.renderer\n\t\tconst enabledElement = await waitForEnabledElementImageToLoad(element)\n\n\t\tif (!enabledElement || !renderer || !synchronizationContext) {\n\t\t\t// TODO: Unable to add tool state, image never loaded.\n\t\t\t// Should we `setToolDisabledForElement` here?\n\t\t\t// logger.warn(\n\t\t\t// `Unable to enable ${this.name}. Exiting enable callback. Tool will be enabled, but will not render.`\n\t\t\t// );\n\t\t\treturn\n\t\t}\n\t\tthis.renderer = renderer\n\t\tthis.synchronizationContext = synchronizationContext\n\n\t\tthis.forceImageUpdate(element)\n\t}\n\n\tdisabledCallback(element) {\n\t\tthis.forceImageUpdate(element)\n\t}\n\n\tforceImageUpdate(element) {\n\t\tconst enabledElement = external.cornerstone.getEnabledElement(element)\n\n\t\tif (enabledElement.image) {\n\t\t\texternal.cornerstone.updateImage(element)\n\t\t}\n\t}\n\n\trenderToolData(evt) {\n\t\tconst eventData = evt.detail\n\n\t\t// No renderer or synch context? Adios\n\t\tif (!this.renderer || !this.synchronizationContext) {\n\t\t\treturn\n\t\t}\n\n\t\t// This is a onetime check to see if the metadata hasn't been set yet.\n\t\t// Not ideal, but the first pass kept failing for some reason.\n\t\tlet referenceMetaData = store.state.viewer.activeImageMetadata\n\n\t\t// Get the enabled elements associated with this synchronization context and draw them\n\t\tconst enabledElements = this.synchronizationContext.getSourceElements()\n\t\tconst context = getNewContext(eventData.canvasContext.canvas)\n\n\t\texternal.cornerstone.setToPixelCoordinateSystem(eventData.enabledElement, context)\n\n\t\tif (enabledElements.length) {\n\t\t\tenabledElements.forEach(referenceEnabledElement => {\n\t\t\t\t// Render it\n\t\t\t\tthis.renderer(context, eventData, evt.currentTarget, referenceMetaData)\n\t\t\t})\n\t\t} else if (referenceMetaData) {\n\t\t\t// There is no enabled element (because it's on the other window)\n\t\t\tthis.renderer(context, eventData, evt.currentTarget, referenceMetaData)\n\t\t}\n\t}\n}\n\n/**\n * Renders the active reference line.\n *\n * @export @public @method\n * @name renderActiveReferenceLine\n * @param {Object} context The canvas context.\n * @param {Object} eventData The data associated with the event.\n * @param {HTMLElement} targetElement The element on which to render the reference line.\n * @param {Object} referenceImageMetadata The metadata for the element referenced by the line.\n * @returns {void}\n */\nexport function renderActiveReferenceLine(\n\tcontext,\n\teventData,\n\ttargetElement,\n\treferenceImageMetadata\n) {\n\tconst cornerstone = external.cornerstone\n\tconst targetImage = cornerstone.getEnabledElement(targetElement).image\n\n\t// Make sure the images are actually loaded for the target and reference\n\tif (!targetImage || !referenceImageMetadata) {\n\t\treturn\n\t}\n\n\tconst targetImagePlane = cornerstone.metaData.get('imagePlaneModule', targetImage.imageId)\n\tconst referenceImagePlane = referenceImageMetadata\n\n\t// Make sure the target and reference actually have image plane metadata\n\tif (\n\t\t!targetImagePlane ||\n\t\t!referenceImagePlane ||\n\t\t!targetImagePlane.rowCosines ||\n\t\t!targetImagePlane.columnCosines ||\n\t\t!targetImagePlane.imagePositionPatient ||\n\t\t!referenceImagePlane.rowCosines ||\n\t\t!referenceImagePlane.columnCosines ||\n\t\t!referenceImagePlane.imagePositionPatient\n\t) {\n\t\treturn\n\t}\n\n\t// The image planes must be in the same frame of reference\n\tif (targetImagePlane.frameOfReferenceUID !== referenceImagePlane.frameOfReferenceUID) {\n\t\treturn\n\t}\n\n\ttargetImagePlane.rowCosines = convertToVector3(targetImagePlane.rowCosines)\n\ttargetImagePlane.columnCosines = convertToVector3(targetImagePlane.columnCosines)\n\ttargetImagePlane.imagePositionPatient = convertToVector3(targetImagePlane.imagePositionPatient)\n\treferenceImagePlane.rowCosines = convertToVector3(referenceImagePlane.rowCosines)\n\treferenceImagePlane.columnCosines = convertToVector3(referenceImagePlane.columnCosines)\n\treferenceImagePlane.imagePositionPatient = convertToVector3(\n\t\treferenceImagePlane.imagePositionPatient\n\t)\n\n\t// The image plane normals must be > 30 degrees apart\n\tconst targetNormal = targetImagePlane.rowCosines.clone().cross(targetImagePlane.columnCosines)\n\tconst referenceNormal = referenceImagePlane.rowCosines\n\t\t.clone()\n\t\t.cross(referenceImagePlane.columnCosines)\n\tlet angleInRadians = targetNormal.angleTo(referenceNormal)\n\n\tangleInRadians = Math.abs(angleInRadians)\n\tif (angleInRadians < 0.5) {\n\t\t// 0.5 radians = ~30 degrees\n\t\treturn\n\t}\n\n\tconst referenceLine = calculateReferenceLine(targetImagePlane, referenceImagePlane)\n\n\tif (!referenceLine) {\n\t\treturn\n\t}\n\n\tconst color = toolColors.getActiveColor()\n\n\t// Draw the referenceLines\n\tcontext.setTransform(1, 0, 0, 1, 0, 0)\n\n\tdraw(context, context => {\n\t\tdrawLine(context, eventData.element, referenceLine.start, referenceLine.end, { color })\n\t})\n}\n\nconst planePlaneIntersection = csTools('util/planePlaneIntersection')\nconst projectPatientPointToImagePlane = csTools('util/projectPatientPointToImagePlane')\n\n/**\n * Calculates a reference line between two planes by projecting the top left hand corner and bottom right hand corner\n * Of the reference image onto the target image. Ideally we would calculate the intersection between the planes but\n * That requires a bit more math and this works fine for most cases.\n *\n * @export\n * @public\n * @method\n * @name calculateReferenceLine\n * @param {Object} targetImagePlane The imagePlane on which the reference line will be drawn.\n * @param {Object} referenceImagePlane The imagePlane being referenced.\n * @returns {Object} The start and end points of the line to be drawn.\n */\nexport function calculateReferenceLine(targetImagePlane, referenceImagePlane) {\n\tconst points = planePlaneIntersection(targetImagePlane, referenceImagePlane)\n\n\tif (!points) {\n\t\treturn\n\t}\n\n\treturn {\n\t\tstart: projectPatientPointToImagePlane(points.start, targetImagePlane),\n\t\tend: projectPatientPointToImagePlane(points.end, targetImagePlane),\n\t}\n}\n","import { external, import as csTools } from 'cornerstone-tools/dist/cornerstoneTools.js'\nconst BaseTool = csTools('base/BaseTool')\n\n/**\n * @public\n * @class RotateTool\n * @memberof Tools\n *\n * @classdesc Tool for rotating the image.\n * @extends Tools.Base.BaseTool\n */\n\nexport default class RotateTool extends BaseTool {\n\tfirstTouchOnMobile = true\n\tconstructor(props = {}) {\n\t\tconst defaultProps = {\n\t\t\tname: 'Rotate',\n\t\t\tstrategies: {\n\t\t\t\thorizontal: horizontalStrategy,\n\t\t\t\tvertical: verticalStrategy,\n\t\t\t},\n\t\t\tdefaultStrategy: 'vertical',\n\t\t\tsupportedInteractionTypes: ['Mouse', 'Touch'],\n\t\t\tconfiguration: {\n\t\t\t\troundAngles: true,\n\t\t\t\tflipHorizontal: true,\n\t\t\t\tflipVertical: true,\n\t\t\t\trotateScale: 0.33,\n\t\t\t},\n\t\t\trotationValue: 0,\n\t\t}\n\t\tsuper(props, defaultProps)\n\t\tthis.postMouseDownCallback = this._movingEventCallback.bind(this)\n\t\tthis.touchEndCallback = this._endMobileMovingEventCallback.bind(this)\n\t}\n\ttouchDragCallback(evt) {\n\t\tthis.dragCallback(evt)\n\t\tif (this.firstTouchOnMobile) {\n\t\t\tif (typeof this.rotationValue === 'undefined') {\n\t\t\t\tevt.detail.viewport.rotation = 0\n\t\t\t\tthis._movingEventCallback(evt)\n\t\t\t}\n\t\t}\n\t\tthis.firstTouchOnMobile = false\n\t}\n\n\t_endMobileMovingEventCallback(evt) {\n\t\tthis.rotationValue = evt.detail.viewport.rotation\n\t}\n\n\tmouseDragCallback(evt) {\n\t\tthis.dragCallback(evt)\n\t}\n\n\t_movingEventCallback(evt) {\n\t\tconst { viewport } = evt.detail\n\t\tthis.rotationValue = viewport.rotation\n\t}\n\n\tdragCallback(evt) {\n\t\tconsole.log('dragcallback')\n\t\tif (this.initialRotation === undefined) this.initialRotation = evt.detail.viewport.rotation\n\t\tevt.detail.viewport.initialRotation = this.initialRotation\n\t\tthis.applyActiveStrategy(evt)\n\t\texternal.cornerstone.setViewport(evt.detail.element, evt.detail.viewport)\n\t}\n}\n\nfunction horizontalStrategy(evt) {\n\tconst { roundAngles, flipHorizontal, rotateScale } = this.configuration\n\tconst { viewport, startPoints, currentPoints } = evt.detail\n\tif (!startPoints) return\n\tconst initialRotation = viewport.initialRotation\n\tconst initialPointX = startPoints.client.x\n\tconst currentPointX = currentPoints.client.x\n\n\tlet angle = (currentPointX - initialPointX) * rotateScale\n\n\tif (roundAngles) {\n\t\tangle = Math.round(Math.abs(angle)) * (angle > 0 ? 1 : -1)\n\t}\n\tif (flipHorizontal) {\n\t\tangle = -angle\n\t}\n\n\tviewport.rotation = initialRotation + angle\n}\n\nfunction verticalStrategy(evt) {\n\tconst { roundAngles, flipVertical, rotateScale } = this.configuration\n\tconst { viewport, startPoints, currentPoints } = evt.detail\n\tif (!startPoints) return\n\tconst initialRotation = this.rotationValue\n\tconst initialPointY = startPoints.client.y\n\tconst currentPointY = currentPoints.client.y\n\n\tlet angle = (currentPointY - initialPointY) * rotateScale\n\n\tif (roundAngles) {\n\t\tangle = Math.round(Math.abs(angle)) * (angle > 0 ? 1 : -1)\n\t}\n\tif (flipVertical) {\n\t\tangle = -angle\n\t}\n\n\tviewport.rotation = initialRotation + angle\n}\n","import AstAngle from './AstAngle'\nimport AstCalibration from './AstCalibration'\nimport AstText from './AstText'\nimport AstArrowAnnotate from './AstArrowAnnotate'\nimport AstRectangleRoi from './AstRectangleRoi'\nimport AstCircleRoi from './AstCircleRoi'\nimport AstEllipticalRoi from './AstEllipticalRoi'\nimport AstCrossPoint from './AstCrossPoint'\nimport AstHipDysplasia from './AstHipDysplasia'\nimport AstLengthAngle from './AstLengthAngle'\nimport AstOrientationMarkers from './AstOrientationMarkers'\nimport AstPennHip from './AstPennHip'\nimport AstProbe from './AstProbe'\nimport AstTplo from './AstTplo'\nimport AstTta from './AstTta'\nimport AstVertebralHeart from './AstVertebralHeart'\nimport AstEraser from './AstEraser'\nimport AstReferenceLines from './AstReferenceLines'\nimport AstRotateTool from './AstRotateTool'\n\nexport default {\n\tAstAngle,\n\tAstCalibration,\n\tAstText,\n\tAstArrowAnnotate,\n\tAstRectangleRoi,\n\tAstCircleRoi,\n\tAstEllipticalRoi,\n\tAstCrossPoint,\n\tAstHipDysplasia,\n\tAstLengthAngle,\n\tAstOrientationMarkers,\n\tAstPennHip,\n\tAstProbe,\n\tAstTplo,\n\tAstTta,\n\tAstVertebralHeart,\n\tAstEraser,\n\tAstReferenceLines,\n\tAstRotateTool,\n}\n","// This cannot detect, or exit from, fullscreen triggered by F11/browser UI\n// https://stackoverflow.com/a/44368592/6136739\nimport { omniDesktop } from '@/electron/omniDesktop'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tisFullScreenSupported: true,\n\t\t\tisFullScreen: false,\n\t\t}\n\t},\n\tcreated() {\n\t\t// make sure browser supports a fullscreen property, as well as an enter and exit method\n\t\tconst fullScreenProperties = ['fullscreen', 'mozFullScreen', 'webkitIsFullScreen']\n\t\tconst fullScreenProperty = fullScreenProperties.find(p => p in document)\n\t\tif ((!fullScreenProperty || document.fullscreenEnabled === false) && !omniDesktop.isConnected)\n\t\t\tthis.isFullScreenSupported = false\n\t\tif (this.isFullScreenSupported) {\n\t\t\tconst onResize = async () => {\n\t\t\t\tif (omniDesktop.isConnected) {\n\t\t\t\t\tthis.isFullScreen = await omniDesktop.request('isWindowFullscreen')\n\t\t\t\t} else this.isFullScreen = document[fullScreenProperty]\n\t\t\t}\n\t\t\t// The fullscreenchange event is not as well supported as the resize event, so we use that\n\t\t\twindow.addEventListener('resize', onResize)\n\t\t\tthis.$once('hook:beforeDestroy', () => window.removeEventListener('resize', onResize))\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggleFullScreen() {\n\t\t\tif (this.isFullScreen) return exitFullScreen()\n\t\t\treturn enterFullScreen()\n\n\t\t\tfunction enterFullScreen() {\n\t\t\t\tif (omniDesktop.isConnected) {\n\t\t\t\t\tomniDesktop.request('setWindowFullscreen', true)\n\t\t\t\t} else {\n\t\t\t\t\tconst enterMethods = [\n\t\t\t\t\t\t'requestFullscreen',\n\t\t\t\t\t\t'mozRequestFullScreen',\n\t\t\t\t\t\t'webkitRequestFullscreen',\n\t\t\t\t\t\t'msRequestFullscreen',\n\t\t\t\t\t]\n\t\t\t\t\tconst el = document.documentElement\n\t\t\t\t\tconst method = enterMethods.find(m => m in el)\n\t\t\t\t\tif (!method) return\n\t\t\t\t\tel[method]()\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction exitFullScreen() {\n\t\t\t\tif (omniDesktop.isConnected) {\n\t\t\t\t\tomniDesktop.request('setWindowFullscreen', false)\n\t\t\t\t} else {\n\t\t\t\t\tconst exitMethods = ['exitFullscreen', 'mozCancelFullScreen', 'webkitExitFullscreen', 'msExitFullscreen']\n\t\t\t\t\tconst method = exitMethods.find(m => m in document)\n\t\t\t\t\tif (!method) return\n\t\t\t\t\tdocument[method]()\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isOpen)?_c('dialog',{directives:[{name:\"draggable\",rawName:\"v-draggable\"}],ref:\"dialog\",staticClass:\"annotation-dialog\",attrs:{\"open\":\"\"}},[_c('h4',{staticStyle:{\"margin-bottom\":\"16px\"}},[_c('svg-icon',{attrs:{\"icon\":_vm.toolInfo.iconName,\"fixed\":\"\"}}),_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.toolInfo.title)+\"\\n\\t\")],1),(_vm.tool.name === 'AstCircleRoi')?_c('ast-circle-roi',{attrs:{\"diameter\":_vm.annotation.cachedStats.diameter.toFixed(2),\"event\":_vm.event,\"tool\":_vm.tool,\"unit\":_vm.unit},on:{\"set-diameter\":_vm.setCircleDiameter,\"close\":function($event){return _vm.close()}}}):_vm._e(),(_vm.tool.name === 'AstCalibration')?_c('ast-calibration',{attrs:{\"annotation\":_vm.annotation,\"event\":_vm.event,\"tool\":_vm.tool},on:{\"update-image\":_vm.updateImage,\"close\":function($event){return _vm.close()}}}):_vm._e(),(_vm.textboxes.length)?[_c('h5',{staticStyle:{\"margin-bottom\":\"4px\"}},[_vm._v(\"Textboxes\")]),_c('ul',{staticClass:\"unlist\"},_vm._l((_vm.textboxes),function(textbox,i){return _c('li',{key:((_vm.annotation.uuid) + \"-\" + i),staticStyle:{\"padding\":\"2px 0\"}},[_c('annotation-checkbox',{attrs:{\"textbox\":textbox,\"disabled\":!_vm.canHideTextbox},on:{\"update-image\":_vm.updateImage}},[(_vm.canEditTextbox)?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.annotation.text),expression:\"annotation.text\"}],staticClass:\"input\",attrs:{\"placeholder\":\"Annotation Text\"},domProps:{\"value\":(_vm.annotation.text)},on:{\"mousedown\":function($event){$event.stopPropagation();},\"input\":[function($event){if($event.target.composing){ return; }_vm.$set(_vm.annotation, \"text\", $event.target.value)},_vm.updateImage]}}):_c('span',{staticClass:\"textbox-label\"},[_vm._v(_vm._s(_vm.getTextboxLabel(textbox)))])])],1)}),0)]:_vm._e(),_c('button',{staticClass:\"btn btn-default\",staticStyle:{\"margin-top\":\"8px\",\"float\":\"right\"},attrs:{\"title\":\"Erase Annotation (Del)\"},on:{\"click\":_vm.erase}},[_c('svg-icon',{attrs:{\"icon\":\"eraser\"}}),_vm._v(\"\\n\\t\\tErase\\n\\t\")],1),_c('button',{staticClass:\"close\",on:{\"click\":function($event){return _vm.close()}}},[_c('svg-icon',{attrs:{\"icon\":\"close\"}})],1)],2):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ast-checkbox',{staticStyle:{\"margin-bottom\":\"4px\"},attrs:{\"disabled\":_vm.disabled},model:{value:(_vm.isVisible),callback:function ($$v) {_vm.isVisible=$$v},expression:\"isVisible\"}},[_vm._t(\"default\")],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerAnnotationDialogCheckbox.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerAnnotationDialogCheckbox.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ViewerAnnotationDialogCheckbox.vue?vue&type=template&id=7aaff10e\"\nimport script from \"./ViewerAnnotationDialogCheckbox.vue?vue&type=script&lang=js\"\nexport * from \"./ViewerAnnotationDialogCheckbox.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h5',[_vm._v(\"Diameter (\"+_vm._s(_vm.unit)+\")\")]),_c('div',{staticStyle:{\"display\":\"flex\",\"margin-bottom\":\"24px\"}},[_c('input',{staticClass:\"input\",domProps:{\"value\":_vm.diameterInputValue},on:{\"mousedown\":function($event){$event.stopPropagation();},\"input\":_vm.updateNewCircleDiameter,\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.onEnterKeydown($event)}}}),_c('button',{staticClass:\"btn btn-primary\",attrs:{\"disabled\":!_vm.canSetDiameter},on:{\"click\":_vm.setCircleDiameter,\"mousedown\":function($event){$event.stopPropagation();}}},[_c('svg-icon',{staticStyle:{\"opacity\":\"1\"},attrs:{\"icon\":\"check\"}})],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AstCircleRoi.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AstCircleRoi.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AstCircleRoi.vue?vue&type=template&id=6209bb8b\"\nimport script from \"./AstCircleRoi.vue?vue&type=script&lang=js\"\nexport * from \"./AstCircleRoi.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"calibration-annotation\"},[_c('h5',[_vm._v(\"Length\")]),_c('input',{ref:\"lengthInput\",staticClass:\"input\",domProps:{\"value\":_vm.hasChangedLength ? _vm.newLength : _vm.currentLength},on:{\"mousedown\":function($event){$event.stopPropagation();},\"input\":_vm.updatenewLength,\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.calibrate($event)}}}),_c('div',[_c('ast-radio',{attrs:{\"value\":\"mm\"},model:{value:(_vm.unit),callback:function ($$v) {_vm.unit=$$v},expression:\"unit\"}},[_vm._v(\"mm\")]),_c('ast-radio',{attrs:{\"value\":\"cm\"},model:{value:(_vm.unit),callback:function ($$v) {_vm.unit=$$v},expression:\"unit\"}},[_vm._v(\"cm\")])],1),_c('div',{staticStyle:{\"text-align\":\"right\"}},[_c('button',{staticClass:\"btn btn-default\",on:{\"click\":function($event){return _vm.$emit('close')}}},[_vm._v(\"\\n\\t\\t\\tCancel\\n\\t\\t\")]),_c('button',{staticClass:\"btn btn-primary\",attrs:{\"disabled\":!_vm.canCalibrate},on:{\"click\":_vm.calibrate}},[_c('svg-icon',{attrs:{\"icon\":\"check\",\"fixed\":\"\"}}),_vm._v(\"\\n\\t\\t\\tCalibrate\\n\\t\\t\")],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AstCalibration.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AstCalibration.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AstCalibration.vue?vue&type=template&id=e4ba6302\"\nimport script from \"./AstCalibration.vue?vue&type=script&lang=js\"\nexport * from \"./AstCalibration.vue?vue&type=script&lang=js\"\nimport style0 from \"./AstCalibration.vue?vue&type=style&index=0&id=e4ba6302&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { eventBus } from '@services/eventBus'\nimport AnnotationCheckbox from './ViewerAnnotationDialogCheckbox.vue'\nimport AstCircleRoi from './ViewerAnnotationDialog/AstCircleRoi.vue'\nimport AstCalibration from './ViewerAnnotationDialog/AstCalibration.vue'\nimport { updateImage, pixelToCanvas } from 'cornerstone-core'\nimport { createPopper, VirtualElement } from '@popperjs/core'\nimport round from 'lodash/round'\nimport { formatNumber } from '@utils/numberUtils'\nimport getImagePixelSpacing from '@/cornerstone/tools/util/getImagePixelSpacing'\nimport { EVENTS as csEvents, removeToolState } from 'cornerstone-tools'\n\nexport default {\n\tname: 'AnnotationDialog',\n\tcomponents: {\n\t\tAnnotationCheckbox,\n\t\tAstCalibration,\n\t\tAstCircleRoi,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tannotation: null,\n\t\t\tevent: null,\n\t\t\tisOpen: false,\n\t\t\tpopper: null,\n\t\t\ttool: null,\n\t\t\ttoolState: null,\n\t\t}\n\t},\n\tcomputed: {\n\t\tangleTextboxes() {\n\t\t\tif (this.tool.name !== 'AstLengthAngle') return []\n\t\t\tif (!this.$store.state.viewer.settingsPanel.isLengthAnglesEnabled) return []\n\t\t\tconst textboxes = []\n\t\t\t// angle textboxes need to show for either annotation, regardless of which annotation\n\t\t\t// the handles are actually attached to, so we find those related textboxes via lineId\n\t\t\tthis.toolState.data.forEach(annotation => {\n\t\t\t\tconst isRelatedAngle = t => t.lineId === this.annotation.uuid || annotation === this.annotation\n\t\t\t\ttextboxes.push(...annotation.handles.textBoxes.filter(isRelatedAngle))\n\t\t\t})\n\t\t\treturn textboxes\n\t\t},\n\t\ttextboxes() {\n\t\t\tif (!this.annotation || !this.annotation.handles) return []\n\t\t\tconst isTextbox = handle => handle.hasBoundingBox\n\t\t\t// handles array\n\t\t\tif (Array.isArray(this.annotation.handles)) {\n\t\t\t\treturn this.annotation.handles.filter(isTextbox)\n\t\t\t}\n\t\t\t// handles object\n\t\t\tconst textboxes = []\n\t\t\tfor (const key in this.annotation.handles) {\n\t\t\t\tconst handle = this.annotation.handles[key]\n\t\t\t\tif (isTextbox(handle)) textboxes.push(handle)\n\t\t\t}\n\t\t\treturn textboxes.concat(this.angleTextboxes)\n\t\t},\n\t\tcanHideTextbox() {\n\t\t\treturn this.tool.name !== 'AstText'\n\t\t},\n\t\tcanEditTextbox() {\n\t\t\treturn ['AstArrowAnnotate', 'AstText'].includes(this.tool.name)\n\t\t},\n\t\ttoolInfo() {\n\t\t\tif (!this.tool) return {}\n\t\t\treturn this.$store.getters.availableTools.find(t => t.alias === this.tool.name)\n\t\t},\n\t\tunit() {\n\t\t\tif (!this.isOpen) return\n\t\t\tconst { isPixelSpacingDefined } = getImagePixelSpacing(this.event.detail?.image)\n\t\t\treturn isPixelSpacingDefined ? 'mm' : 'px'\n\t\t},\n\t},\n\twatch: {\n\t\t'$store.getters.activeImage'() {\n\t\t\tif (this.isOpen) this.close()\n\t\t},\n\t\t'annotation.handles': {\n\t\t\t// HACK: Fixes view not updating (though devtools does) for annotations that are not the first\n\t\t\t// annotation for that tool AND were created after the dialog was first opened. Vue 3 might\n\t\t\t// fix this.\n\t\t\thandler() {\n\t\t\t\tif (this.isOpen) this.$forceUpdate()\n\t\t\t},\n\t\t\tdeep: true,\n\t\t},\n\t},\n\tcreated() {\n\t\teventBus.on(eventBus.type.ANNOTATION_CLICK, this.onAnnotationClick)\n\t\teventBus.on(eventBus.type.ANNOTATIONS_CLEARED, this.onAnnotationRemoved)\n\t},\n\tmounted() {\n\t\tconst onKeydown = e => {\n\t\t\tif (!this.isOpen) return\n\t\t\tconst activeElement = document.activeElement as HTMLInputElement\n\t\t\tif (activeElement.tagName.toLowerCase() === 'input' && activeElement.type.toLowerCase() === 'text') return\n\t\t\tif (e.key === 'Delete') this.erase()\n\t\t}\n\t\tdocument.addEventListener('keydown', onKeydown)\n\t\tthis.$once('beforeDestroy', () => {\n\t\t\tdocument.removeEventListener('keydown', onKeydown)\n\t\t})\n\t},\n\tdestroyed() {\n\t\teventBus.off(eventBus.type.ANNOTATION_CLICK, this.onAnnotationClick)\n\t\teventBus.off(eventBus.type.ANNOTATIONS_CLEARED, this.onAnnotationRemoved)\n\t\tthis.listenForAnnotationRemoved(false)\n\t\tif (this.popper) this.popper.destroy()\n\t},\n\tmethods: {\n\t\tonAnnotationClick({ tool, annotation, toolState, event }) {\n\t\t\tthis.listenForAnnotationRemoved(false)\n\t\t\tthis.tool = tool // cornerstone tool class instance\n\t\t\tthis.toolState = toolState // all annotations for the tool\n\t\t\tthis.annotation = annotation // the clicked annotation\n\t\t\tthis.event = event // the click event\n\t\t\tthis.listenForAnnotationRemoved(true)\n\t\t\tif (!this.isOpen) {\n\t\t\t\tthis.isOpen = true\n\t\t\t\tif (this.mq.small) this.$nextTick(this.positionDialog)\n\t\t\t}\n\t\t},\n\t\tpositionDialog() {\n\t\t\tif (this.popper) this.popper.destroy()\n\t\t\tconst referenceElement: VirtualElement = createReferenceElement(\n\t\t\t\tthis.annotation,\n\t\t\t\tthis.textboxes, // pass textboxes since it contains related angle textboxes from other annotations\n\t\t\t\tthis.event\n\t\t\t)\n\t\t\tthis.popper = createPopper(referenceElement, this.$refs.dialog, {\n\t\t\t\tplacement: 'left',\n\t\t\t\tmodifiers: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'offset',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\toffset: [16, 16],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t// if no room on the left, try the other placements\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'flip',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tfallbackPlacements: ['top', 'bottom', 'right'],\n\t\t\t\t\t\t\tpadding: 8,\n\t\t\t\t\t\t\tboundary: document.querySelector('.layout-pane-container'),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t// otherwise overlap the annotation if no room in the layout-pane-container\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'preventOverflow',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\taltAxis: true,\n\t\t\t\t\t\t\tpadding: 8,\n\t\t\t\t\t\t\tboundary: document.querySelector('.layout-pane-container'),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t})\n\t\t},\n\t\tlistenForAnnotationRemoved(isAddingListener) {\n\t\t\tif (!this.event) return\n\t\t\tconst toggleListener = isAddingListener ? 'addEventListener' : 'removeEventListener'\n\t\t\tthis.event.detail.element[toggleListener](csEvents.MEASUREMENT_REMOVED, this.onAnnotationRemoved)\n\t\t},\n\t\terase() {\n\t\t\tremoveToolState(this.event.detail.element, this.tool.name, this.annotation)\n\t\t\tthis.updateImage()\n\t\t},\n\t\tonAnnotationRemoved(e) {\n\t\t\tif (!e || e.detail.measurementData === this.annotation) this.close()\n\t\t},\n\t\tgetTextboxLabel(textbox) {\n\t\t\tif (textbox.text) return textbox.text.join('\\n') // ellipse, rectangle & circle\n\t\t\tif (this.annotation.text) return this.annotation.text // text/arrow annotation\n\t\t\tif (textbox.angle) return formatNumber(round(textbox.angle, 1)) + '°' // length angles\n\t\t\tif (this.annotation.rAngle) return this.annotation.rAngle + '°' // angle\n\t\t\tif (this.annotation.length) return formatNumber(round(this.annotation.length, 2)) + ' ' + this.unit // length\n\t\t},\n\t\tsetCircleDiameter(newDiameter) {\n\t\t\tthis.tool._createCircleFromDiameter(\n\t\t\t\tthis.event.detail,\n\t\t\t\tthis.event.detail.element,\n\t\t\t\tthis.annotation,\n\t\t\t\tNumber(newDiameter)\n\t\t\t)\n\t\t},\n\t\tupdateImage() {\n\t\t\tupdateImage(this.event.detail.element)\n\t\t},\n\t\tclose() {\n\t\t\tthis.isOpen = false\n\t\t},\n\t},\n}\n\nfunction createReferenceElement(annotation, textboxes, event): VirtualElement {\n\t// get min and max x and y values for all handles\n\tconst bounds = event.detail.element.getBoundingClientRect()\n\tconst coords: { x: number; y: number }[] = getHandleCoords()\n\tconst xValues = coords.map(c => c.x + bounds.left)\n\tconst yValues = coords.map(c => c.y + bounds.top)\n\tconst left = Math.max(Math.min(...xValues), bounds.left)\n\tconst right = Math.min(Math.max(...xValues), bounds.right)\n\tconst top = Math.max(Math.min(...yValues), bounds.top)\n\tconst bottom = Math.min(Math.max(...yValues), bounds.bottom)\n\t// offset canvas coordinates to get page coordinates\n\tconst getBoundingClientRect:any = () => {\n\t\treturn {\n\t\t\twidth: right - left,\n\t\t\theight: bottom - top,\n\t\t\ttop,\n\t\t\tright,\n\t\t\tbottom,\n\t\t\tleft,\n\t\t}\n\t}\n\treturn { getBoundingClientRect }\n\n\tfunction getHandleCoords(): { x: number; y: number }[] {\n\t\tlet regularHandles = [] // not textboxes\n\t\tif (Array.isArray(annotation.handles)) {\n\t\t\tregularHandles = annotation.handles.filter(h => !h.hasBoundingBox)\n\t\t} else {\n\t\t\tfor (const key in annotation.handles) {\n\t\t\t\tconst handle = annotation.handles[key]\n\t\t\t\tif (!handle.hasBoundingBox) regularHandles.push(handle)\n\t\t\t}\n\t\t}\n\t\tlet coords = [].concat(...regularHandles.map(handleToCanvasCoords)) // convert regular handles\n\t\tcoords = coords.concat(...textboxes.map(handleToCanvasCoords)) // convert textboxes\n\t\treturn coords\n\t}\n\n\tfunction handleToCanvasCoords(handle): { x: number; y: number }[] {\n\t\tif (!handle.x) return []\n\t\tconst textBoxToCoords = textBox => {\n\t\t\t// textbox coordinates are already relative to the canvas\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tx: textBox.left,\n\t\t\t\t\ty: textBox.top,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tx: textBox.left + textBox.width,\n\t\t\t\t\ty: textBox.top + textBox.height,\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t\t// convert textbox handles\n\t\tif (handle.boundingBox) return textBoxToCoords(handle.boundingBox)\n\t\t// other handles' coordinates are relative to the image, so they must be transformed\n\t\treturn [pixelToCanvas(event.detail.element, handle)]\n\t}\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerAnnotationDialog.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerAnnotationDialog.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./ViewerAnnotationDialog.vue?vue&type=template&id=7d21e374&scoped=true\"\nimport script from \"./ViewerAnnotationDialog.vue?vue&type=script&lang=ts\"\nexport * from \"./ViewerAnnotationDialog.vue?vue&type=script&lang=ts\"\nimport style0 from \"./ViewerAnnotationDialog.vue?vue&type=style&index=0&id=7d21e374&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7d21e374\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isOpen)?_c('dialog',{directives:[{name:\"draggable\",rawName:\"v-draggable\"}],ref:\"dialog\",staticClass:\"annotation-dialog\",attrs:{\"open\":\"\"}},[_c('h4',{staticStyle:{\"margin-bottom\":\"16px\"}},[_c('svg-icon',{attrs:{\"icon\":_vm.toolInfo.iconName,\"fixed\":\"\"}}),_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.toolInfo.title)+\"\\n\\t\")],1),(_vm.annotation.type === _vm.TOOLS.CIRCLE_TOOL)?_c('circle-annotation-dialog',{attrs:{\"annotation\":_vm.annotation},on:{\"close\":_vm.close}}):_vm._e(),_c('h5',{staticStyle:{\"margin-bottom\":\"4px\"}},[_vm._v(\"Textboxes\")]),_c('checkbox',{attrs:{\"disabled\":!_vm.canHideTextbox},model:{value:(_vm.component.statsVisible),callback:function ($$v) {_vm.$set(_vm.component, \"statsVisible\", $$v)},expression:\"component.statsVisible\"}},[([_vm.TOOLS.ARROW_TOOL, _vm.TOOLS.TEXT_TOOL].includes(_vm.annotation.type))?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.component.text),expression:\"component.text\"},{name:\"focus\",rawName:\"v-focus\"}],staticClass:\"input\",attrs:{\"placeholder\":\"Annotation Text\"},domProps:{\"value\":(_vm.component.text)},on:{\"mousedown\":function($event){$event.stopPropagation();},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.component, \"text\", $event.target.value)}}}):_c('span',{staticClass:\"textbox-label\"},[_vm._v(_vm._s(_vm.component.statText))])]),_c('button',{staticClass:\"btn btn-default\",staticStyle:{\"margin-top\":\"8px\",\"float\":\"right\"},attrs:{\"title\":\"Erase Annotation (Del)\"},on:{\"click\":_vm.erase}},[_c('svg-icon',{attrs:{\"icon\":\"eraser\"}}),_vm._v(\"\\n\\t\\tErase\\n\\t\")],1),_c('button',{staticClass:\"close\",on:{\"click\":_vm.close}},[_c('svg-icon',{attrs:{\"icon\":\"close\"}})],1)],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h5',{staticStyle:{\"margin-bottom\":\"4px\"}},[_vm._v(\"Diameter (mm)\")]),_c('div',{staticStyle:{\"display\":\"flex\",\"margin-bottom\":\"1rem\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.formattedDiameter),expression:\"formattedDiameter\"},{name:\"focus\",rawName:\"v-focus\"}],staticClass:\"input\",domProps:{\"value\":(_vm.formattedDiameter)},on:{\"mousedown\":function($event){$event.stopPropagation();},\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.onEnter($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.formattedDiameter=$event.target.value}}}),_c('button',{staticClass:\"btn btn-primary\",attrs:{\"disabled\":!_vm.canSetDiameter},on:{\"click\":_vm.setDiameter,\"mousedown\":function($event){$event.stopPropagation();}}},[_c('svg-icon',{staticStyle:{\"opacity\":\"1\"},attrs:{\"icon\":\"check\"}})],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CircleAnnotationDialog.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CircleAnnotationDialog.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./CircleAnnotationDialog.vue?vue&type=template&id=227a508c\"\nimport script from \"./CircleAnnotationDialog.vue?vue&type=script&lang=js\"\nexport * from \"./CircleAnnotationDialog.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport CircleAnnotationDialog from './ViewerAnnotationDialog/CircleAnnotationDialog.vue'\nimport Checkbox from '../Checkbox.vue'\nimport { createPopper } from '@popperjs/core'\nimport { eventBus } from '@services/eventBus'\nimport { consts } from '@vtk'\n\nexport default {\n\tname: 'MprViewerAnnotationDialog',\n\tcomponents: {\n\t\tCircleAnnotationDialog,\n\t\tCheckbox,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tannotation: null,\n\t\t\tcomponent: null,\n\t\t\tisOpen: false,\n\t\t\tpopper: null,\n\t\t\tTOOLS: consts,\n\t\t}\n\t},\n\tcomputed: {\n\t\tcanHideTextbox() {\n\t\t\treturn this.annotation.type !== consts.TEXT_TOOL\n\t\t},\n\t\ttoolInfo() {\n\t\t\tif (!this.annotation) return {}\n\t\t\treturn this.$store.state.mpr.tools.find(t => t.alias === this.annotation.type)\n\t\t},\n\t},\n\tcreated() {\n\t\teventBus.on(eventBus.type.MPR_ANNOTATION_CLICK, this.onAnnotationClick)\n\t\teventBus.on(eventBus.type.MPR_ANNOTATION_REMOVED, this.onAnnotationRemoved)\n\t\teventBus.on(eventBus.type.MPR_ANNOTATIONS_CLEARED, this.onAnnotationRemoved)\n\t},\n\tmounted() {\n\t\tconst onKeydown = e => {\n\t\t\tif (!this.isOpen) return\n\t\t\tconst activeElement = document.activeElement as HTMLInputElement\n\t\t\tif (activeElement.tagName.toLowerCase() === 'input' && activeElement.type.toLowerCase() === 'text') return\n\t\t\tif (e.key === 'Delete') this.erase()\n\t\t}\n\t\tdocument.addEventListener('keydown', onKeydown)\n\t\tthis.$once('beforeDestroy', () => {\n\t\t\tdocument.removeEventListener('keydown', onKeydown)\n\t\t})\n\t},\n\tdestroyed() {\n\t\teventBus.off(eventBus.type.MPR_ANNOTATION_CLICK, this.onAnnotationClick)\n\t\teventBus.off(eventBus.type.MPR_ANNOTATION_REMOVED, this.onAnnotationRemoved)\n\t\teventBus.off(eventBus.type.MPR_ANNOTATIONS_CLEARED, this.onAnnotationRemoved)\n\t\tif (this.popper) this.popper.destroy()\n\t},\n\tmethods: {\n\t\tonAnnotationClick(annotation) {\n\t\t\tthis.annotation = annotation\n\t\t\tthis.component = annotation.componentRef\n\t\t\tif (!this.isOpen) {\n\t\t\t\tthis.isOpen = true\n\t\t\t\tif (this.mq.small) this.$nextTick(this.positionDialog)\n\t\t\t}\n\t\t},\n\t\terase() {\n\t\t\tthis.annotation.componentRef.$emit('delete', this.annotation.componentRef)\n\t\t},\n\t\tonAnnotationRemoved(annotation) {\n\t\t\tif (!annotation || annotation === this.annotation) {\n\t\t\t\tthis.annotation = null\n\t\t\t\tthis.close()\n\t\t\t}\n\t\t},\n\t\tpositionDialog() {\n\t\t\t// Get nested annotation element with `data-position-ref` attribute\n\t\t\tconst ref = this.component.$el.querySelector('[data-position-ref]')\n\t\t\tif (!ref) return\n\t\t\tconst selector = '.viewer-content'\n\t\t\tif (this.popper) this.popper.destroy()\n\t\t\tthis.popper = createPopper(ref, this.$refs.dialog, {\n\t\t\t\tplacement: 'left',\n\t\t\t\tmodifiers: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'offset',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\toffset: [16, 16],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t// If no room on the left, try the other placements\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'flip',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tfallbackPlacements: ['top', 'bottom', 'right'],\n\t\t\t\t\t\t\tpadding: 8,\n\t\t\t\t\t\t\tboundary: document.querySelector(selector),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t// Otherwise overlap the annotation if no room in the container\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'preventOverflow',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\taltAxis: true,\n\t\t\t\t\t\t\tpadding: 8,\n\t\t\t\t\t\t\tboundary: document.querySelector(selector),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t})\n\t\t},\n\t\tclose() {\n\t\t\tthis.isOpen = false\n\t\t},\n\t},\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprViewerAnnotationDialog.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprViewerAnnotationDialog.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./MprViewerAnnotationDialog.vue?vue&type=template&id=6a1265b4&scoped=true\"\nimport script from \"./MprViewerAnnotationDialog.vue?vue&type=script&lang=ts\"\nexport * from \"./MprViewerAnnotationDialog.vue?vue&type=script&lang=ts\"\nimport style0 from \"./MprViewerAnnotationDialog.vue?vue&type=style&index=0&id=6a1265b4&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6a1265b4\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showHotkeys)?_c('modal-wrapper',{on:{\"close\":_vm.closeModal}},[_c('div',{staticClass:\"hotkey-modal\"},[_c('dlg-header',{attrs:{\"title\":\"Keyboard Shortcuts\"},on:{\"close\":_vm.closeModal}}),_c('div',{staticClass:\"hotkey-modal-body\"},_vm._l((_vm.hotkeyGroups),function(keygroup){return _c('div',{key:keygroup.key},[_c('div',{staticClass:\"hotkey-list\"},[_c('ul',[_c('li',[_c('h5',[_vm._v(_vm._s(keygroup.title))])]),_vm._l((keygroup.hotKeys),function(hotkey){return _c('li',{key:hotkey.name},[_c('div',{staticClass:\"key\"},[_c('span',[_vm._v(_vm._s(_vm._f(\"hotkey\")(hotkey.keyBinding)))])]),_c('div',{staticClass:\"keyname\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(hotkey.description)+\"\\n\\t\\t\\t\\t\\t\\t\\t\")])])})],2)])])}),0)],1)]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HotkeyModal.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HotkeyModal.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./HotkeyModal.vue?vue&type=template&id=28ebfed9&scoped=true\"\nimport script from \"./HotkeyModal.vue?vue&type=script&lang=js\"\nexport * from \"./HotkeyModal.vue?vue&type=script&lang=js\"\nimport style0 from \"./HotkeyModal.vue?vue&type=style&index=0&id=28ebfed9&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"28ebfed9\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"image-placeholder\",attrs:{\"oncontextmenu\":\"return false\",\"unselectable\":\"on\",\"onselectstart\":\"return false;\"}},[_c('p',{staticClass:\"placeholder-text\"},[_vm._t(\"default\")],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImagePlaceholder.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImagePlaceholder.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ImagePlaceholder.vue?vue&type=template&id=4ec63bbe&scoped=true\"\nimport script from \"./ImagePlaceholder.vue?vue&type=script&lang=js\"\nexport * from \"./ImagePlaceholder.vue?vue&type=script&lang=js\"\nimport style0 from \"./ImagePlaceholder.vue?vue&type=style&index=0&id=4ec63bbe&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4ec63bbe\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"wrapper\"},[_c('div',{ref:\"canvas\",staticClass:\"dicom-image-canvas\",on:{\"contextmenu\":function($event){$event.preventDefault();}}}),_c('div',{staticClass:\"border\"}),_c('div',{staticClass:\"dicom-image-overlay\"},[_c('div',{staticClass:\"dot\",style:({ background: _vm.canvasColor })}),(_vm.showOverlayText && _vm.image)?_c('div',{staticClass:\"dicom-image-overlay-text\",class:{ compact: _vm.useCompactOverlay }},[_c('div',{staticClass:\"top-left\"},[_c('ul',[_c('li',{staticClass:\"full-only\"},[_vm._v(\"Zoom: \"+_vm._s(_vm._f(\"formatNumber\")(+_vm.imageOverlayInfo.zoom))+\"%\")]),_c('li',[_vm._v(\"Series: \"+_vm._s(_vm.seriesIndex + 1)+\" / \"+_vm._s(_vm.seriesTotal))]),_c('li',[_vm._v(\"Image: \"+_vm._s(_vm.imageOverlayInfo.imageIndex)+\" / \"+_vm._s(_vm.series.images.length))]),(_vm.image.fullName || _vm.image.simpleName)?_c('li',{staticClass:\"full-only\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\tView: \"+_vm._s(_vm.image.fullName || _vm.image.simpleName)+\"\\n\\t\\t\\t\\t\\t\")]):_vm._e(),(_vm.series.images.length > 1 && _vm.imageView)?_c('li',{staticClass:\"is-danger\"},[_c('strong',[_vm._v(\"View contains multiple images\")])]):_vm._e()])]),_c('div',{staticClass:\"top-right\"},[_c('ul',[(!_vm.isRepository)?[_c('li',[_vm._v(\"Name: \"+_vm._s(_vm.series.overlayInformation.patientName))]),_c('li',[_vm._v(\"Id: \"+_vm._s(_vm.series.overlayInformation.patientId))]),_c('li',[_vm._v(\"Owner: \"+_vm._s(_vm.series.overlayInformation.ownerName))]),_c('li',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\tInstitution:\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.series.overlayInformation.institutionName)+\"\\n\\t\\t\\t\\t\\t\\t\")]),_c('li',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\tStudy Date:\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm._f(\"localizeDate\")(_vm.series.overlayInformation.studyDate,{ forceUTC: false }))+\"\\n\\t\\t\\t\\t\\t\\t\")]),(_vm.image.acquisitionTime)?_c('li',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\tAcq Time: \"+_vm._s(_vm._f(\"localizeDate\")(_vm.image.acquisitionTime,{ forceUTC: false }))+\"\\n\\t\\t\\t\\t\\t\\t\")]):_vm._e()]:[_c('li',[_vm._v(\"Id: \"+_vm._s(_vm.image.overlayInformation.lotNumber))]),_c('li',[_vm._v(\"Chip Id: \"+_vm._s(_vm.image.overlayInformation.chipId))]),_c('li',[_vm._v(\"Sire: \"+_vm._s(_vm.image.overlayInformation.sire))]),_c('li',[_vm._v(\"Dam: \"+_vm._s(_vm.image.overlayInformation.dam))]),_c('li',[_vm._v(\"Institution: \"+_vm._s(_vm.image.overlayInformation.institutionName))]),_c('li',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\tStudy Date:\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm._f(\"localizeDate\")(_vm.image.overlayInformation.studyDate,{ forceUTC: false }))+\"\\n\\t\\t\\t\\t\\t\\t\")]),_c('li',[_vm._v(\"Acq Time: \"+_vm._s(_vm._f(\"localizeDate\")(_vm.image.acquisitionTime,{ forceUTC: false })))])]],2)]),_c('div',{staticClass:\"bottom-right\"},[_c('ul',[(_vm.imageOverlayInfo.hflip || _vm.imageOverlayInfo.vflip)?_c('li',[(_vm.imageOverlayInfo.hflip)?_c('span',[_vm._v(\"H. Flip\")]):_vm._e(),(_vm.imageOverlayInfo.hflip && _vm.imageOverlayInfo.vflip)?_c('span',[_vm._v(\"/\")]):_vm._e(),(_vm.imageOverlayInfo.vflip)?_c('span',[_vm._v(\"V. Flip\")]):_vm._e()]):_vm._e(),_c('li',[_vm._v(\" Rotation Angle: \"+_vm._s(_vm.imageOverlayInfo.rotation)+\"°\")])])]),_c('div',{staticClass:\"bottom-left\"},[_c('ul',[(_vm.imageOverlayInfo.invert)?_c('li',[_vm._v(\"Inverted\")]):_vm._e(),_c('li',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\tW/L:\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.imageOverlayInfo.windowWidth +\n\t\t\t\t\t\t\t\t'/' +\n\t\t\t\t\t\t\t\t_vm.imageOverlayInfo.windowCenter +\n\t\t\t\t\t\t\t\t(_vm.imageOverlayInfo.isLevelingAdjusted ? '*' : ''))+\"\\n\\t\\t\\t\\t\\t\")]),_c('li',{staticClass:\"compact-only\"},[_vm._v(\"Zoom: \"+_vm._s(_vm.imageOverlayInfo.zoom)+\"%\")]),_c('li',{staticClass:\"compact-only\"},[_vm._v(\" Rotation Angle: \"+_vm._s(_vm.imageOverlayInfo.rotation)+\"°\")]),(_vm.image.fullName || _vm.image.simpleName)?_c('li',{staticClass:\"compact-only\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\tView: \"+_vm._s(_vm.image.fullName || _vm.image.simpleName)+\"\\n\\t\\t\\t\\t\\t\")]):_vm._e(),(_vm.activeDisplaySet)?_c('li',[_vm._v(\"Display Set: \"+_vm._s(_vm.activeDisplaySet))]):_vm._e()])])]):_vm._e(),_c('transition',{attrs:{\"name\":\"fade\"}},[(_vm.showViewportCacheMessage)?_c('div',{staticClass:\"viewport-message\"},[_c('div',{staticClass:\"overlay-wrapper\"},[_vm._v(\"\\n\\t\\t\\t\\t\\tUsing saved leveling and orientation information\\n\\t\\t\\t\\t\")])]):_vm._e()]),_c('transition',{attrs:{\"name\":\"fade\"}},[(_vm.showLoadingSpinner)?_c('div',{staticClass:\"loading\"},[_c('svg-icon',{attrs:{\"icon\":\"spinner\",\"pulse\":\"\"}})],1):_vm._e()]),(_vm.series.images.length > 1 && _vm.image && !_vm.isInitializing)?_c('ast-image-scroll',{attrs:{\"image\":_vm.image,\"stack-index\":_vm.stackIndex,\"series\":_vm.series}}):_vm._e()],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import isMobileOS from './isMobileOS'\n\nexport default function shouldRenderWebGL() {\n\treturn !(isMobileOS() || window.screen.width <= 768)\n}\n","\n\n\n","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImageViewer.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImageViewer.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ImageViewer.vue?vue&type=template&id=396a52cf&scoped=true\"\nimport script from \"./ImageViewer.vue?vue&type=script&lang=js\"\nexport * from \"./ImageViewer.vue?vue&type=script&lang=js\"\nimport style0 from \"./ImageViewer.vue?vue&type=style&index=0&id=396a52cf&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"396a52cf\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hasActiveSeries)?_c('ast-toolbar-button',{attrs:{\"title\":\"Select Layout\",\"icon\":\"layout\"},scopedSlots:_vm._u([{key:\"dropdown\",fn:function(ref){\nvar hide = ref.hide;\nreturn [_c('ast-toolbar-menu',{staticClass:\"viewer-layout-menu\"},[_c('div',{staticClass:\"layouts\"},_vm._l((_vm.layouts),function(layout){return _c('ast-toolbar-button',{key:layout.name,attrs:{\"title\":layout.title,\"icon\":layout.icon},nativeOn:{\"click\":function($event){return _vm.layoutSelected(layout, hide)}}})}),1),_c('ul',_vm._l((_vm.settings),function(setting,i){return _c('li',{key:i,on:{\"mousedown\":function($event){$event.stopPropagation();return setting.toggle($event)}}},[_c('checkbox',{staticStyle:{\"margin\":\"0\"},attrs:{\"value\":_vm._self[setting.computed]}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(setting.label)+\"\\n\\t\\t\\t\\t\\t\")])],1)}),0),(_vm.mq.small)?_c('div',{staticClass:\"dock-toolbar\"},[_vm._v(\"\\n\\t\\t\\t\\tDock Toolbar\\n\\t\\t\\t\\t\"),_c('div',_vm._l((['top', 'bottom', 'left', 'right']),function(location,i){return _c('svg-icon',{key:i,class:{ 'is-selected': _vm.toolbarLocation === location },style:({ transform: i === 0 || i === 3 ? 'rotate(180deg)' : '' }),attrs:{\"icon\":i <= 1 ? 'dock-bottom' : 'dock-left',\"title\":_vm.$options.filters.capitalize(location)},nativeOn:{\"click\":function($event){_vm.toolbarLocation = location}}})}),1)]):_vm._e()])]}}],null,false,1246470958)}):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprViewerLayoutSelector.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprViewerLayoutSelector.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./MprViewerLayoutSelector.vue?vue&type=template&id=f3d3b0cc&scoped=true\"\nimport script from \"./MprViewerLayoutSelector.vue?vue&type=script&lang=js\"\nexport * from \"./MprViewerLayoutSelector.vue?vue&type=script&lang=js\"\nimport style0 from \"./MprViewerLayoutSelector.vue?vue&type=style&index=0&id=f3d3b0cc&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"f3d3b0cc\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"viewer-toolbar-container\",class:({ 'is-disabled': _vm.isLoading, 'show-compact': _vm.showCompactToolbar }, _vm.toolbarLocation)},[_c('ast-toolbar',{ref:\"fullToolbar\",staticClass:\"full\"},[(!_vm.isGrouped.levels)?[_vm._l((_vm.itemsInGroup('levels')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();tool.command ? tool.command() : _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('span',{staticClass:\"separator\"})]:_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.itemsInGroup('levels'),\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),_vm._l((_vm.ungroupedTools),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();return _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('span',{staticClass:\"separator\"}),(!_vm.isGrouped.annotation)?[_vm._l((_vm.itemsInGroup('annotation')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();return _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('span',{staticClass:\"separator\"})]:_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.itemsInGroup('annotation'),\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),(!_vm.isGrouped.scroll)?_vm._l((_vm.itemsInGroup('scroll')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();return _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}):_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.itemsInGroup('scroll'),\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),_c('ast-toolbar-dropdown',{key:\"hack-bugfix?!\",attrs:{\"icon\":\"gradient\",\"dropdown-location\":_vm.dropdownLocation,\"label\":_vm.activeBlendMethod.label,\"title\":_vm.activeBlendMethod.title,\"items\":_vm.blendMethods}}),_c('span',{staticClass:\"separator\"}),_vm._l((_vm.itemsInGroup('switch')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();return tool.command()},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('ast-toolbar-dropdown',{attrs:{\"icon\":\"repeat2\",\"label\":\"Rotate\",\"title\":\"Rotation Tools\",\"dropdown-location\":_vm.dropdownLocation,\"items\":_vm.rotateItems}}),_c('ast-toolbar-button',{attrs:{\"icon\":\"backup-restore\",\"label\":\"Reset\",\"title\":\"Reset Image\"},nativeOn:{\"click\":function($event){return _vm.resetViewData($event)}}}),_c('span',{staticClass:\"separator\"}),_c('ast-toolbar-button',{attrs:{\"icon\":\"dots-horizontal\",\"label\":\"Actions\"},nativeOn:{\"click\":function($event){return _vm.$emit('toggle-drawer', 'mprActions')}}})],2)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import AstToolbar from '@components/Toolbar'\nimport AstToolbarButton from '@components/ToolbarButton'\nimport AstToolbarDropdown from '@components/ToolbarDropdown'\nimport { eventBus } from '@services/eventBus'\n\nexport default {\n\tcomponents: {\n\t\tAstToolbar,\n\t\tAstToolbarButton,\n\t\tAstToolbarDropdown,\n\t},\n\tprops: {\n\t\tisRepository: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\ttoolbarLocation: {\n\t\t\ttype: String,\n\t\t\tdefault: 'top',\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisBurningAnnotations: false,\n\t\t\tshowCompactToolbar: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tdropdownLocation() {\n\t\t\treturn this.toolbarLocation === 'top'\n\t\t\t\t? 'bottom'\n\t\t\t\t: this.toolbarLocation === 'bottom'\n\t\t\t\t? 'top'\n\t\t\t\t: this.toolbarLocation === 'left'\n\t\t\t\t? 'right'\n\t\t\t\t: 'left'\n\t\t},\n\t\tungroupedTools() {\n\t\t\treturn this.availableTools.filter(tool => !tool.groups.length)\n\t\t},\n\t},\n\twatch: {\n\t\t'availableTools.length'() {\n\t\t\tthis.groupTools()\n\t\t},\n\t\ttoolbarLocation() {\n\t\t\tthis.groupTools()\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.groupTools()\n\t\teventBus.on('resize', this.groupTools)\n\t},\n\tdestroyed() {\n\t\teventBus.off('resize', this.groupTools)\n\t},\n\tmethods: {\n\t\tasync groupTools() {\n\t\t\tthis.showCompactToolbar = false\n\t\t\tawait this.$nextTick()\n\t\t\tif (!this.$refs.fullToolbar) return\n\t\t\tconst toolbar = this.$refs.fullToolbar.$el\n\t\t\tif (!toolbar || !toolbar.clientWidth) return\n\t\t\ttoolbar.style.opacity = 0 // makes rendering look less glitchy in IE\n\t\t\t// Ungroup all tools\n\t\t\tthis.groupOrder.forEach(group => {\n\t\t\t\tthis.isGrouped[group] = false\n\t\t\t})\n\t\t\tconst isToolbarOverflowing = () => {\n\t\t\t\treturn ['top', 'bottom'].includes(this.toolbarLocation)\n\t\t\t\t\t? toolbar.clientWidth < toolbar.scrollWidth\n\t\t\t\t\t: toolbar.clientHeight < toolbar.scrollHeight\n\t\t\t}\n\t\t\t// Group tools until toolbar is not overflowing\n\t\t\tfor (let i = 0; i < this.groupOrder.length; i++) {\n\t\t\t\tawait this.$nextTick()\n\t\t\t\tif (!isToolbarOverflowing()) break\n\t\t\t\tthis.isGrouped[this.groupOrder[i]] = true\n\t\t\t}\n\t\t\tawait this.$nextTick()\n\t\t\tthis.showCompactToolbar = isToolbarOverflowing()\n\t\t\ttoolbar.style.opacity = 1\n\t\t},\n\t\titemsInGroup(group) {\n\t\t\tlet tools = this.availableTools.filter(tool => tool.groups.includes(group))\n\t\t\tlet actions = this.actions.filter(action => action.groups.includes(group))\n\t\t\treturn [].concat(tools, actions).filter(item => !(item.isHiddenForRepository && this.isRepository))\n\t\t},\n\t\tasync burnInAnnotations() {\n\t\t\tif (this.isBurningAnnotations) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tthis.isBurningAnnotations = true\n\t\t\t\tawait this.$store.dispatch('createAnnotationRenderingAsync')\n\t\t\t} finally {\n\t\t\t\tthis.isBurningAnnotations = false\n\t\t\t}\n\t\t},\n\t},\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprViewerTools.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprViewerTools.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./MprViewerTools.vue?vue&type=template&id=5faf4614\"\nimport script from \"./MprViewerTools.vue?vue&type=script&lang=js\"\nexport * from \"./MprViewerTools.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ast-toolbar-button',{attrs:{\"icon\":\"layout\",\"title\":\"Viewer Settings\"},scopedSlots:_vm._u([{key:\"dropdown\",fn:function(ref){\nvar hide = ref.hide;\nreturn [_c('ast-toolbar-menu',{staticClass:\"viewer-layout-menu\"},[_c('layout-grid-selector',{staticStyle:{\"margin\":\"1em 0\"},attrs:{\"value\":_vm.activeLayout},on:{\"input\":function($event){return _vm.layoutSelected($event, hide)}}}),_vm._t(\"mpr\"),_c('ul',_vm._l((_vm.settings),function(setting,i){return _c('li',{key:i,on:{\"mousedown\":function($event){$event.stopPropagation();return setting.toggle($event)}}},[_c('checkbox',{staticStyle:{\"margin\":\"0\"},attrs:{\"value\":_vm._self[setting.computed]}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(setting.label)+\"\\n\\t\\t\\t\\t\\t\")])],1)}),0),(_vm.mq.small)?_c('div',{staticClass:\"dock-toolbar\"},[_vm._v(\"\\n\\t\\t\\t\\tDock Toolbar\\n\\t\\t\\t\\t\"),_c('div',_vm._l((['top', 'bottom', 'left', 'right']),function(location,i){return _c('svg-icon',{key:i,class:{ 'is-selected': _vm.toolbarLocation === location },style:({ transform: i === 0 || i === 3 ? 'rotate(180deg)' : '' }),attrs:{\"icon\":i <= 1 ? 'dock-bottom' : 'dock-left',\"title\":_vm.$options.filters.capitalize(location)},nativeOn:{\"click\":function($event){_vm.toolbarLocation = location}}})}),1)]):_vm._e()],2)]}}],null,true)})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerLayoutSelector.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerLayoutSelector.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ViewerLayoutSelector.vue?vue&type=template&id=408da2f8\"\nimport script from \"./ViewerLayoutSelector.vue?vue&type=script&lang=js\"\nexport * from \"./ViewerLayoutSelector.vue?vue&type=script&lang=js\"\nimport style0 from \"./ViewerLayoutSelector.vue?vue&type=style&index=0&id=408da2f8&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"navigation\"},[_c('div',{staticClass:\"buttons\"},[_c('ast-toolbar-button',{attrs:{\"icon\":\"play-box-outline\",\"title\":\"CINE\",\"disabled\":!_vm.hasMultipleImages},nativeOn:{\"click\":function($event){return _vm.toggleCine($event)}}}),(!_vm.hangingProtocol)?[_c('ast-toolbar-button',{attrs:{\"icon\":\"skip-previous\",\"title\":\"Previous Series\",\"disabled\":!_vm.hasPreviousSeries},nativeOn:{\"click\":function($event){return _vm.$store.dispatch('previousSeries')}}}),_c('ast-toolbar-button',{attrs:{\"icon\":\"skip-next\",\"title\":\"Next Series\",\"disabled\":!_vm.hasNextSeries},nativeOn:{\"click\":function($event){return _vm.$store.dispatch('nextSeries')}}})]:[_c('ast-toolbar-button',{attrs:{\"icon\":\"skip-previous\",\"title\":\"Previous Display Set\",\"disabled\":!_vm.hasPreviousDisplaySet},nativeOn:{\"click\":function($event){return _vm.setHangingProtocolDisplaySet(_vm.activeDisplaySetIndex - 1)}}}),_c('ast-toolbar-button',{attrs:{\"icon\":\"skip-next\",\"title\":\"Next Display Set\",\"disabled\":!_vm.hasNextDisplaySet},nativeOn:{\"click\":function($event){return _vm.setHangingProtocolDisplaySet(_vm.activeDisplaySetIndex + 1)}}})]],2),(_vm.hangingProtocols && _vm.hangingProtocols.length)?_c('div',{staticClass:\"dropdowns\"},[_c('ast-toolbar-button',{attrs:{\"title\":\"Hanging Protocol\",\"disabled\":_vm.isHangingProtocolLoading,\"dropdown-location\":_vm.showDropdownsBelow ? 'bottom' : 'top'},scopedSlots:_vm._u([{key:\"label\",fn:function(){return [_c('p',{staticClass:\"label full-label\"},[_vm._v(_vm._s(_vm.hangingProtocolLabel))]),_c('p',{staticClass:\"label compact-label\"},[_vm._v(\"Hanging Protocol\")])]},proxy:true},{key:\"dropdown\",fn:function(ref){\nvar hide = ref.hide;\nreturn [_c('ast-toolbar-menu',{attrs:{\"items\":_vm.hangingProtocolOptions},on:{\"select\":function (protocol) { return _vm.setHangingProtocol(protocol.value, hide); }},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\nvar protocol = ref.item;\nreturn [_c('span',{class:{ selected: _vm.hangingProtocol && protocol.value === _vm.hangingProtocol.id }},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(protocol.label)+\"\\n\\t\\t\\t\\t\\t\\t\")])]}}],null,true)})]}}],null,false,3110910219)}),(_vm.hangingProtocol)?_c('ast-toolbar-button',{attrs:{\"title\":\"Display Sets\",\"disabled\":_vm.isHangingProtocolLoading,\"dropdown-location\":_vm.showDropdownsBelow ? 'bottom' : 'top'},scopedSlots:_vm._u([{key:\"label\",fn:function(){return [_c('p',{staticClass:\"label full-label\"},[_vm._v(\" DS: \"+_vm._s(_vm.hangingProtocol.displaySets[_vm.activeDisplaySetIndex].name)+\" \")]),_c('p',{staticClass:\"label compact-label\"},[_vm._v(\"Display Set\")])]},proxy:true},{key:\"dropdown\",fn:function(ref){\nvar hide = ref.hide;\nreturn [_c('ast-toolbar-menu',{attrs:{\"items\":_vm.hangingProtocol.displaySets},on:{\"select\":function (e) { return _vm.switchDisplaySet(e, hide); }},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\nvar displaySet = ref.item;\nreturn [_c('span',{class:{\n\t\t\t\t\t\t\t\tselected: displaySet === _vm.hangingProtocol.displaySets[_vm.activeDisplaySetIndex],\n\t\t\t\t\t\t\t}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(displaySet.name)+\"\\n\\t\\t\\t\\t\\t\\t\")])]}}],null,true)})]}}],null,false,1589826515)}):_vm._e()],1):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerNavigation.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerNavigation.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ViewerNavigation.vue?vue&type=template&id=11c5467c&scoped=true\"\nimport script from \"./ViewerNavigation.vue?vue&type=script&lang=js\"\nexport * from \"./ViewerNavigation.vue?vue&type=script&lang=js\"\nimport style0 from \"./ViewerNavigation.vue?vue&type=style&index=0&id=11c5467c&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"11c5467c\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"study\"},[(_vm.showHeading)?_c('div',{staticClass:\"study-heading\",attrs:{\"title\":(\"Click to \" + (_vm.isCollapsed ? 'expand' : 'collapse') + \" this study\")},on:{\"click\":function($event){_vm.isCollapsed = !_vm.isCollapsed}}},[_c('div',{staticClass:\"heading-left\"},[_c('svg-icon',{style:({ transform: _vm.isCollapsed ? '' : 'rotate(90deg)' }),attrs:{\"icon\":\"chevron-right\"}}),_c('div',[(_vm.showPatientName)?_c('p',{staticClass:\"patient-name\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.study.patientName)+\"\\n\\t\\t\\t\\t\")]):_vm._e(),_c('p',{staticClass:\"study-date\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm._f(\"localizeDate\")(_vm.study.studyDateTime,{ forceUTC: false, showTime: false }))+\"\\n\\t\\t\\t\\t\")])])],1),_c('button',{staticClass:\"close-button\",attrs:{\"title\":\"Remove study\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.removeStudy(_vm.study)}}},[_c('div',{staticClass:\"circle\"},[_c('svg-icon',{attrs:{\"icon\":\"close\"}})],1)])]):_vm._e(),(!_vm.isCollapsed)?_c('div',{staticClass:\"series\"},[_c('ast-thumbnail-list',{attrs:{\"thumbnails\":_vm.study.imageData.thumbnails,\"study\":_vm.study},on:{\"drag-thumbnail\":function($event){return _vm.$emit('drag-thumbnail')},\"click\":function($event){return _vm.updateCanvas({ seriesId: $event })}}}),_c('ast-attachment-list',{attrs:{\"attachments\":_vm.study.imageData.attachments}}),(_vm.reports)?_c('ast-report-list',{attrs:{\"reports\":_vm.reports}}):_vm._e(),(_vm.hasSignalPETAttachment)?_c('a',{staticStyle:{\"margin\":\"16px\"},on:{\"click\":_vm.gotoSignalPET}},[_c('svg-icon',{attrs:{\"icon\":\"signalpet\",\"fixed\":\"\"}}),_vm._v(\"\\n\\t\\t\\tOpen SignalPET\\n\\t\\t\")],1):_vm._e()],1):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"thumbnail-list\"},_vm._l((_vm.thumbnails),function(thumbnail,index){return _c('div',{key:index,staticClass:\"thumbnail\",attrs:{\"draggable\":\"true\"},on:{\"touchstart\":_vm.startLongPress,\"selectstart\":function($event){$event.preventDefault();},\"contextmenu\":function($event){$event.preventDefault();},\"dragstart\":function($event){return _vm.onDragStart(thumbnail.seriesId, $event)},\"dragend\":function($event){return _vm.onDragEnd($event)},\"click\":function($event){$event.preventDefault();return _vm.$emit('click', thumbnail.seriesId)}}},[_c('div',{staticClass:\"thumbnail-image\",style:(_vm.findImageBackground(thumbnail))},[_c('div',{staticClass:\"dot\",style:(_vm.getCanvasColor(thumbnail.seriesId))}),_c('div',{staticClass:\"progress-bar\",attrs:{\"id\":(\"progress-\" + (thumbnail.seriesId))}})]),(thumbnail.isMultiFrame)?_c('svg-icon',{attrs:{\"icon\":\"play-box-outline\"}}):_vm._e(),_c('div',{staticClass:\"thumbnail-text\"},[_c('p',{staticClass:\"name\"},[_vm._v(_vm._s(thumbnail.simpleName))]),_c('p',[_vm._v(\"S:\"+_vm._s(thumbnail.seriesNumber))])])],1)}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerThumbnailList.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerThumbnailList.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ViewerThumbnailList.vue?vue&type=template&id=1f6197a4&scoped=true\"\nimport script from \"./ViewerThumbnailList.vue?vue&type=script&lang=js\"\nexport * from \"./ViewerThumbnailList.vue?vue&type=script&lang=js\"\nimport style0 from \"./ViewerThumbnailList.vue?vue&type=style&index=0&id=1f6197a4&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1f6197a4\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"report-list\"},[(_vm.reports && _vm.reports.length)?_c('h4',[_vm._v(\"Reports\")]):_vm._e(),_c('ul',[_c('transition-group',{attrs:{\"name\":\"fade\"}},_vm._l((_vm.reports),function(report){return _c('li',{key:report.reportId},[(report.isVetCT)?_c('div',[_c('span',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(report.name)+\" \"+_vm._s(_vm._f(\"localizeDate\")(report.date))+\"\\n\\t\\t\\t\\t\\t\\t\")]),(report.isComplete && report.isVetCT)?_c('a',{staticClass:\"link\",attrs:{\"href\":report.thirdPartyCaseLink,\"target\":\"_blank\"}},[_c('span',[_vm._v(\"Open In VetCT\")])]):(report.isVetCT)?_c('span',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(report.vetCTCaseStatus)+\"\\n\\t\\t\\t\\t\\t\\t\")]):_vm._e()]):(report.consultantClinicCode === _vm.IDEXXAPI)?_c('div',[(report.isComplete)?_c('div',[_c('a',{staticClass:\"report-title\",on:{\"click\":function($event){return _vm.downloadExternalReport(_vm.IDEXXAPI, report.consultantReportId)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s('IDEXX VMS')+\" \"+_vm._s(_vm._f(\"localizeDate\")(report.date))+\"\\n\\t\\t\\t\\t\\t\\t\\t\")]),_c('a',{staticClass:\"pdf\",on:{\"click\":function($event){return _vm.downloadExternalReport(_vm.IDEXXAPI, report.consultantReportId)}}},[_c('svg-icon',{attrs:{\"icon\":\"file-pdf-o\"}}),_vm._v(\" \\n\\t\\t\\t\\t\\t\\t\\t\\t\"),_c('span',[_vm._v(\"PDF\")])],1)]):_c('div',[_c('span',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s('IDEXX VMS')+\" \"+_vm._s(_vm._f(\"localizeDate\")(report.date))+\"\\n\\t\\t\\t\\t\\t\\t\\t\")])])]):(_vm.isVetsChoice(report))?_c('div',[(report.isComplete)?_c('div',[_c('a',{staticClass:\"report-title\",attrs:{\"href\":report.thirdPartyCaseLink,\"target\":\"_blank\"}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s('Vets Choice')+\" \"+_vm._s(_vm._f(\"localizeDate\")(report.date))+\"\\n\\t\\t\\t\\t\\t\\t\\t\")]),_c('a',{staticClass:\"pdf\",attrs:{\"href\":report.thirdPartyCaseLink,\"target\":\"_blank\"}},[_c('svg-icon',{attrs:{\"icon\":\"file-pdf-o\"}}),_vm._v(\" \\n\\t\\t\\t\\t\\t\\t\\t\\t\"),_c('span',[_vm._v(\"PDF\")])],1)]):_c('div',[_c('span',[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s('Vets Choice')+\" \"+_vm._s(_vm._f(\"localizeDate\")(report.date))+\"\\n\\t\\t\\t\\t\\t\\t\\t\")])])]):_c('div',[_c('a',{staticClass:\"report-title\",on:{\"click\":function($event){return _vm.openReportPdf(report)}}},[_c('svg-icon',{attrs:{\"icon\":\"file-pdf-o\",\"fixed\":\"\",\"inline\":\"\"}}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(report.name)+\"\\n\\t\\t\\t\\t\\t\\t\")],1)])])}),0)],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { openReportPdf } from '@dialogs/ReportPdf.vue'\nimport consultations from \"@services/consultationService\";\n\nexport default {\n\tname: 'ReportList',\n\tprops: {\n\t\treports: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t},\n\tdata: function() {\n return {\n IDEXXAPI : this.$IDEXXAPI,\n\t\t\tVetsChoice_ClinicCode : this.$VetsChoice_ClinicCode\n }\n },\n\twatch: {\n\t\treports() {\n\t\t\tthis.tryOpenFromUrlQuery()\n\t\t},\n\t},\n\tmethods: {\n\t\ttryOpenFromUrlQuery() {\n\t\t\tif (this.reports && this.$route.query.reportId) {\n\t\t\t\tlet found = this.reports.find(r => r.reportId === this.$route.query.reportId)\n\t\t\t\tif (found) {\n\t\t\t\t\tthis.openReportPdf(found)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\topenReportPdf(report) {\n\t\t\tconst { reportId, consultantReportId, isComplete } = report\n\t\t\topenReportPdf(reportId, consultantReportId, isComplete)\n\t\t},\n\t\tasync downloadExternalReport(providerClinicCode: string, consultantReportId: string) {\n\t\t\tvar clientClinicCode = this.$store.state.auth.claims.activeClinicCode\n var getReportResult = await consultations.downloadExternalReport(providerClinicCode, clientClinicCode, consultantReportId)\n\n\t\t\tif (getReportResult['Success']){\n\t\t\t\tvar reportBinaryString = getReportResult['Data']\n\t\t\t\tlet pdfWindow = window.open(\"\")\n\t\t\t\tpdfWindow.document.write(\n \t\t\t\"\"\n\t\t\t\t)\n\t\t\t}\n\t\t},\n isVetsChoice(report) {\n return report.consultantClinicCode && report.consultantClinicCode.toUpperCase().includes(this.VetsChoice_ClinicCode)\n },\n\t},\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerReportList.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerReportList.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./ViewerReportList.vue?vue&type=template&id=c152e392&scoped=true\"\nimport script from \"./ViewerReportList.vue?vue&type=script&lang=ts\"\nexport * from \"./ViewerReportList.vue?vue&type=script&lang=ts\"\nimport style0 from \"./ViewerReportList.vue?vue&type=style&index=0&id=c152e392&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"c152e392\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { mapActions, mapState, mapGetters } from 'vuex'\nimport AstThumbnailList from '@components/view/ViewerThumbnailList.vue'\nimport AstAttachmentList from '@components/AttachmentList.vue'\nimport AstReportList from '@components/view/ViewerReportList.vue'\nimport { SIGNALPET_IMAGEVIEW_ID } from '@services/dicomPartners'\nimport consultations from \"@services/consultationService\";\nimport { studyData } from '@services/studyData'\n\nexport default {\n\tname: 'ViewerStudy',\n\tcomponents: {\n\t\tAstThumbnailList,\n\t\tAstAttachmentList,\n\t\tAstReportList,\n\t},\n\tprops: {\n\t\tstudy: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tshowHeading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tshowPatientName: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tclinicCode: {\n\t\t\ttype: String,\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisCollapsed: false,\n\t\t\treports: [],\n\t\t}\n\t},\n\tcomputed: {\n\t\thasSignalPETAttachment() {\n\t\t\treturn this.study.imageData.attachments.find(a => a.imageViewId === SIGNALPET_IMAGEVIEW_ID)\n\t\t},\n\t\t...mapGetters(['isAuthenticated']),\n\t\t...mapState({\n\t\t\t// @ts-ignore\n\t\t\tconsultationRequest: state => state.viewer.consultationRequest,\n\t\t\t// @ts-ignore\n\t\t\tviewer: state => state.viewer,\n\t\t}),\n\t},\n\twatch: {\n\t\tshowHeading(show) {\n\t\t\tif (!show) this.isCollapsed = false\n\t\t},\n\t},\n\tasync created() {\n\t\tawait Promise.all([\n\t\t\tthis.getReports(),])\n\t},\n\tmethods: {\n\t\t...mapActions(['removeStudy', 'updateCanvas']),\n\t\tgotoSignalPET() {\n\t\t\tthis.$router.push({\n\t\t\t\tname: 'signalpet',\n\t\t\t\tparams: {\n\t\t\t\t\tstudyId: this.study.studyId,\n\t\t\t\t\tclinicCode: this.study.clinicCode,\n\t\t\t\t},\n\t\t\t})\n\t\t},\n\t\tasync getReports() {\n\t\t\tlet reports = []\n\t\t\tconst data = await studyData.getRelatedStudiesAndReports(this.study.studyId, this.clinicCode)\n\n\t\t\tif (!data) return\n\t\t\tif (this.consultationRequest.toEmail) {\n\t\t\t\tconst emailedReports = this.consultationRequest.reports\n\t\t\t\treports = data.reports.filter(r => emailedReports.some(emailedReport => (emailedReport.reportId === r.reportId) || (emailedReport.reportId === r.consultantReportId)))\n\t\t\t} else {\n\t\t\t\treports = data.reports\n\t\t\t}\n\t\t\tfor (const report of reports) {\n\n\t\t\t\tconst { reportId, consultantReportId, isComplete } = report\n\t\t\t\tif (consultantReportId !== null && this.isAuthenticated) {\n\t\t\t\t\tlet consultantReport = await consultations.getConsultantReport(consultantReportId)\n\t\t\t\t\treport.consultantClinicCode = consultantReport.consultant.clinicCode\n\n\t\t\t\t\tif (consultantReport.consultant.clinicCode === this.$VetCTAPI) {\n\t\t\t\t\t\tvar vetCTCase = await this.getThirdPartyRadiologyReport(report)\n\t\t\t\t\t\tif (vetCTCase !== undefined && vetCTCase[\"Success\"] === true && vetCTCase[\"Message\"]) {\n\t\t\t\t\t\t\treport.isVetCT = true\n\t\t\t\t\t\t\treport.thirdPartyCaseLink = vetCTCase.Message\n\t\t\t\t\t\t\treport.vetCTCaseStatus = vetCTCase.Data\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (consultantReport.consultant.clinicCode && consultantReport.consultant.clinicCode.toUpperCase().includes(this.$VetsChoice_ClinicCode)) {\n\t\t\t\t\t\tvar thirdPartyReportResult = await this.getThirdPartyRadiologyReport(report)\n\t\t\t\t\t\tif (thirdPartyReportResult !== undefined && thirdPartyReportResult[\"Success\"] === true && thirdPartyReportResult[\"Message\"]) {\n\t\t\t\t\t\t\treport.thirdPartyCaseLink = thirdPartyReportResult.Message\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.reports = reports\n\t\t},\n\t\tasync getThirdPartyRadiologyReport(report: IReportInfo) {\n\t\t\tvar result\n\t\t\tconst { reportId, consultantReportId, isComplete } = report\n\t\t\tif (consultantReportId !== null) {\n\t\t\t\tlet consultantReport = await consultations.getConsultantReport(consultantReportId)\n\t\t\t\tresult = await consultations.getCase(consultantReport.consultant.clinicCode, consultantReportId)\n\t\t\t\tthis.thirdPartyCaseLink = result.Message\n\t\t\t\tthis.vetCTCaseStatus = result.Data\n\t\t\t}\n\t\t\treturn result\n\t\t},\n\t},\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerStudy.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerStudy.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./ViewerStudy.vue?vue&type=template&id=57701a2f&scoped=true\"\nimport script from \"./ViewerStudy.vue?vue&type=script&lang=ts\"\nexport * from \"./ViewerStudy.vue?vue&type=script&lang=ts\"\nimport style0 from \"./ViewerStudy.vue?vue&type=style&index=0&id=57701a2f&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"57701a2f\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"viewer-toolbar-container\",class:({ 'show-compact': _vm.showCompactToolbar }, _vm.toolbarLocation)},[_c('ast-toolbar',{ref:\"fullToolbar\",staticClass:\"full\"},[(!_vm.isGrouped.levels)?[_vm._l((_vm.itemsInGroup('levels')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();tool.command ? tool.command() : _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('span',{staticClass:\"separator\"})]:_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.itemsInGroup('levels'),\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),(!_vm.isGrouped.zoom)?_vm._l((_vm.itemsInGroup('zoom')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();tool.command ? tool.command() : _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}):_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.itemsInGroup('zoom'),\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),_vm._l((_vm.ungroupedTools),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();return _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('span',{staticClass:\"separator\"}),(!_vm.isGrouped.annotation)?[_vm._l((_vm.itemsInGroup('annotation')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();return _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('span',{staticClass:\"separator\"})]:_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.itemsInGroup('annotation'),\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),(!_vm.isRepository)?[(!_vm.isGrouped.surgical)?[_vm._l((_vm.itemsInGroup('surgical')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();return _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('span',{staticClass:\"separator\"})]:_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.itemsInGroup('surgical'),\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),(!_vm.isGrouped.scroll)?[_vm._l((_vm.itemsInGroup('scroll')),function(tool){return _c('ast-toolbar-button',{key:tool.label,attrs:{\"icon\":tool.iconName,\"label\":tool.label,\"title\":tool.title,\"badge\":tool.binding,\"disabled\":tool.disabled},nativeOn:{\"mousedown\":function($event){$event.preventDefault();return _vm.activateTool({ event: $event, tool: tool })},\"contextmenu\":function($event){$event.preventDefault();}}})}),_c('span',{staticClass:\"separator\"})]:_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.itemsInGroup('scroll'),\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),_c('ast-toolbar-dropdown',{attrs:{\"icon\":_vm.currentSyncMethod.iconName,\"label\":\"Sync\",\"title\":_vm.currentSyncMethod.title,\"items\":_vm.syncItems,\"dropdown-location\":_vm.dropdownLocation}})]:_vm._e(),_c('ast-toolbar-dropdown',{attrs:{\"icon\":\"repeat2\",\"label\":\"Rotate\",\"title\":\"Rotation Tools\",\"items\":_vm.rotateItems,\"dropdown-location\":_vm.dropdownLocation}}),_c('ast-toolbar-button',{attrs:{\"icon\":\"backup-restore\",\"label\":\"Reset\",\"title\":\"Reset Image\"},nativeOn:{\"click\":function($event){return _vm.resetActiveCanvas($event)}}}),_c('span',{staticClass:\"separator\"}),_c('ast-toolbar-button',{attrs:{\"icon\":\"tag\",\"label\":\"DICOM\"},nativeOn:{\"click\":function($event){return _vm.$emit('toggle-drawer', 'dicom')}}}),_c('ast-toolbar-button',{attrs:{\"icon\":\"dots-horizontal\",\"label\":\"Actions\",\"title\":\"Export images, burn in annotations, etc.\"},nativeOn:{\"click\":function($event){return _vm.$emit('toggle-drawer', 'actions')}}})],2),_c('ast-toolbar',{staticClass:\"compact\"},[_c('ast-toolbar-button',{attrs:{\"icon\":\"backup-restore\",\"label\":\"Reset\"},nativeOn:{\"click\":function($event){return _vm.resetActiveCanvas($event)}}}),_c('ast-toolbar-dropdown',{attrs:{\"icon\":\"repeat2\",\"label\":\"Rotate\",\"title\":\"Rotation Tools\",\"items\":_vm.rotateItems,\"dropdown-location\":_vm.dropdownLocation}}),_c('ast-toolbar-dropdown',{attrs:{\"items\":_vm.compactItems,\"available-tools\":_vm.availableTools,\"dropdown-location\":_vm.dropdownLocation},on:{\"activate-tool\":_vm.activateTool}}),_c('ast-toolbar-button',{attrs:{\"icon\":\"tag\",\"label\":\"DICOM\"},nativeOn:{\"click\":function($event){return _vm.$emit('toggle-drawer', 'dicom')}}}),_c('ast-toolbar-button',{attrs:{\"icon\":\"dots-horizontal\",\"label\":\"Actions\",\"title\":\"Export images, burn in annotations, etc.\"},nativeOn:{\"click\":function($event){return _vm.$emit('toggle-drawer', 'actions')}}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerTools.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerTools.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ViewerTools.vue?vue&type=template&id=3c1cc306\"\nimport script from \"./ViewerTools.vue?vue&type=script&lang=js\"\nexport * from \"./ViewerTools.vue?vue&type=script&lang=js\"\nimport style0 from \"./ViewerTools.vue?vue&type=style&index=0&id=3c1cc306&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"email-images-bar\"}},[_c('h3',[_vm._v(\"Email Images\")]),_c('div',{staticClass:\"buttons\"},[_c('button',{staticClass:\"btn btn-default\",on:{\"click\":function($event){return _vm.addItem()}}},[_vm._v(\"Add Image\")]),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":!_vm.canAddSeries},on:{\"click\":function($event){return _vm.addItem(true)}}},[_vm._v(\"\\n\\t\\t\\tAdd Series\\n\\t\\t\")]),_c('button',{staticClass:\"btn btn-success\",attrs:{\"disabled\":_vm.items.length == 0},on:{\"click\":_vm.sendEmail}},[_vm._v(\"\\n\\t\\t\\tSend Email\\n\\t\\t\")]),_c('button',{staticClass:\"btn btn-danger\",on:{\"click\":_vm.close}},[_vm._v(\"Cancel\")])]),_c('div',{staticClass:\"image-list\"},_vm._l((_vm.items),function(item){return _c('span',{key:item.key,staticClass:\"item\",on:{\"click\":function($event){return _vm.removeItem(item)}}},[_c('img',{attrs:{\"src\":item.thumbUrl}}),(item.entireSeries)?_c('span',{staticClass:\"seriesTag\"},[_vm._v(_vm._s(item.countText))]):_vm._e(),_c('span',{staticClass:\"removeBtn\"},[_vm._v(\"Remove\")])])}),0)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EmailImagesSidebar.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./EmailImagesSidebar.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./EmailImagesSidebar.vue?vue&type=template&id=1d80bbc9\"\nimport script from \"./EmailImagesSidebar.vue?vue&type=script&lang=js\"\nexport * from \"./EmailImagesSidebar.vue?vue&type=script&lang=js\"\nimport style0 from \"./EmailImagesSidebar.vue?vue&type=style&index=0&id=1d80bbc9&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"dialog\"},[_c('modal-dialog',{attrs:{\"is-open\":true,\"title\":\"Multi-Planar Reconstruction\"},on:{\"close\":_vm.close}},[(_vm.reasonKeys.length)?[_c('p',[_vm._v(\"\\n\\t\\t\\t\\tWe are unable to run MPR for this series, for the following reason\"+_vm._s(_vm.reasonKeys.length > 1 ? 's' : '')+\":\\n\\t\\t\\t\")]),_c('ul',_vm._l((_vm.reasonKeys),function(reasonKey){return _c('li',{key:reasonKey},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.disabledReasons[reasonKey])+\"\\n\\t\\t\\t\\t\")])}),0)]:_vm._e(),(_vm.warningKeys.length)?[_c('p',[_c('strong',[_vm._v(\"Warning:\")])]),_c('ul',[(_vm.warningKeys.includes('512'))?_c('li',[_vm._v(\"\\n\\t\\t\\t\\t\\tThis Series has over 900 images, which have a width and height of 512 pixels. This is approaching the limit\\n\\t\\t\\t\\t\\tof what Keystone Omni can handle, and you may experience slow loading, instability, or it just won't load.\\n\\t\\t\\t\\t\")]):_vm._e(),(_vm.warningKeys.includes('1024'))?_c('li',[_vm._v(\"\\n\\t\\t\\t\\t\\tThis Series has over 200 images, which have a width and height of 1024 pixels. This is approaching the limit\\n\\t\\t\\t\\t\\tof what Keystone Omni can handle, and you may experience slow loading, instability, or it just won't load.\\n\\t\\t\\t\\t\")]):_vm._e(),_c('br'),_c('div',[_c('ast-button',{nativeOn:{\"click\":function($event){return _vm.launchMPR($event)}}},[_vm._v(\"Attempt Loading MPR\")]),_c('checkbox',{staticStyle:{\"margin\":\"16px 0 0 0\"},model:{value:(_vm.hideWarningChecked),callback:function ($$v) {_vm.hideWarningChecked=$$v},expression:\"hideWarningChecked\"}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\tDon't warn me again\\n\\t\\t\\t\\t\\t\")])],1)])]:_vm._e()],2)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprDisabledDlg.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprDisabledDlg.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./MprDisabledDlg.vue?vue&type=template&id=7097eca2&scoped=true\"\nimport script from \"./MprDisabledDlg.vue?vue&type=script&lang=js\"\nexport * from \"./MprDisabledDlg.vue?vue&type=script&lang=js\"\nimport style0 from \"./MprDisabledDlg.vue?vue&type=style&index=0&id=7097eca2&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7097eca2\",\n null\n \n)\n\nexport default component.exports","import store from '@store'\n\nconst playClip = function() {\n store.commit('CINE_PLAY')\n}\n\nconst pauseClip = function() {\n store.commit('CINE_PAUSE')\n}\n\nconst cineNextSeries = function() {\n pauseClip()\n store.dispatch('nextSeries')\n}\n\nconst cinePreviousSeries = function() {\n pauseClip()\n store.dispatch('previousSeries')\n}\n\nconst goToImage = function(action) {\n pauseClip()\n\n switch (action) {\n case 'first':\n store.dispatch('firstImage')\n break\n case 'previous':\n store.dispatch('previousImage')\n break\n case 'next':\n store.dispatch('nextImage')\n break\n case 'last':\n store.dispatch('lastImage')\n break\n }\n}\n\nconst onFrameRateChange = function(event) {\n const value = parseInt(event.target.value)\n store.commit('SET_CINE_FRAMERATE', value)\n}\n\nexport default {\n cineNextSeries,\n cinePreviousSeries,\n playClip,\n pauseClip,\n goToImage,\n onFrameRateChange,\n}\n","const preventDefaultAndStopPropagation = function(event) {\n\tevent.preventDefault()\n\tevent.stopPropagation()\n}\n\nconst onCanvasDragOver = function(hoveredCanvasIndex, event) {\n\t// Only allow drags from current window for repository/email viewers\n\tif ((this.isRepository || this.isEmail) && !this.draggingFromThumbnailList) {\n\t\treturn\n\t}\n\n\tif (event.dataTransfer.types.length > 0) {\n\t\t// Set active canvas to the one we're hovering over\n\t\tif (this.activeCanvasIndex !== hoveredCanvasIndex) {\n\t\t\tthis.$store.dispatch('setActiveCanvas', {\n\t\t\t\tcanvasIndex: hoveredCanvasIndex,\n\t\t\t})\n\t\t}\n\t\t// Tell the world that it is okay to drop here\n\t\tpreventDefaultAndStopPropagation(event)\n\t\tevent.dataTransfer.dropEffect = 'copy'\n\t}\n}\n\nconst onCanvasDrop = function(event) {\n\ttry {\n\t\tconst data = JSON.parse(event.dataTransfer.getData('text/plain'))\n\t\tif (data) this.switchSeries(data)\n\t} catch (err) {\n\t\t// ignore exceptions when non-JSON text is dropped onto canvas\n\t} finally {\n\t\tpreventDefaultAndStopPropagation(event)\n\t}\n}\n\nexport default {\n\tonCanvasDragEnter: preventDefaultAndStopPropagation,\n\tonCanvasDragExit: preventDefaultAndStopPropagation,\n\tonCanvasDragLeave: preventDefaultAndStopPropagation,\n\tonCanvasDragOver,\n\tonCanvasDrop,\n}\n","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Viewer.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Viewer.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Viewer.vue?vue&type=template&id=576c527a\"\nimport script from \"./Viewer.vue?vue&type=script&lang=js\"\nexport * from \"./Viewer.vue?vue&type=script&lang=js\"\nimport style0 from \"./Viewer.vue?vue&type=style&index=0&id=576c527a&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AboutCommunity.vue?vue&type=style&index=0&id=d816edec&prod&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Banner.vue?vue&type=style&index=0&id=0abe1cff&prod&lang=scss&scoped=true\"","/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n 'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n return function() {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n var log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n var baseP = base.prototype,\n childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node == parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n\n var i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n}\n\nInput.prototype = {\n /**\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler: function() { },\n\n /**\n * bind the events\n */\n init: function() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n\n /**\n * unbind the events\n */\n destroy: function() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n var target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input,\n deltaTime = input.timeStamp - last.timeStamp,\n velocity, velocityX, velocityY, direction;\n\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n var pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0, y = 0, i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n\n this.pressed = false; // mousedown state\n\n Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n});\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n\n Input.apply(this, arguments);\n\n this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n\n Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n\n Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i,\n targetTouches,\n changedTouches = toArray(ev.changedTouches),\n changedTargetTouches = [],\n target = this.target;\n\n // get target touches from touches\n targetTouches = allTouches.filter(function(touch) {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n Input.apply(this, arguments);\n\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n\n this.primaryTouch = null;\n this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n /**\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n }\n\n // when we're in a touch event, record touches to de-dupe synthetic mouse event\n if (isTouch) {\n recordTouches.call(this, inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n return;\n }\n\n this.callback(manager, inputEvent, inputData);\n },\n\n /**\n * remove the event listeners\n */\n destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n});\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction setLastTouch(eventData) {\n var touch = eventData.changedPointers[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {x: touch.clientX, y: touch.clientY};\n this.lastTouches.push(lastTouch);\n var lts = this.lastTouches;\n var removeLastTouch = function() {\n var i = lts.indexOf(lastTouch);\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n}\n\nTouchAction.prototype = {\n /**\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set: function(value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n },\n\n /**\n * just re-set the touchAction value\n */\n update: function() {\n this.set(this.manager.options.touchAction);\n },\n\n /**\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute: function() {\n var actions = [];\n each(this.manager.recognizers, function(recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n },\n\n /**\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults: function(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n //do not prevent defaults if this is a tap gesture\n\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n },\n\n /**\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc: function(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n var touchMap = {};\n var cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n this.options = assign({}, this.defaults, options || {});\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.options.enable = ifUndefined(this.options.enable, true);\n\n this.state = STATE_POSSIBLE;\n\n this.simultaneous = {};\n this.requireFail = [];\n}\n\nRecognizer.prototype = {\n /**\n * @virtual\n * @type {Object}\n */\n defaults: {},\n\n /**\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set: function(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n },\n\n /**\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n },\n\n /**\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n\n /**\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n },\n\n /**\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n },\n\n /**\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures: function() {\n return this.requireFail.length > 0;\n },\n\n /**\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith: function(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n\n /**\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit: function(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n },\n\n /**\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit: function(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n },\n\n /**\n * can we emit?\n * @returns {boolean}\n */\n canEmit: function() {\n var i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n },\n\n /**\n * update the recognizer\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n },\n\n /**\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {Const} STATE\n */\n process: function(inputData) { }, // jshint ignore:line\n\n /**\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction: function() { },\n\n /**\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n if (direction == DIRECTION_DOWN) {\n return 'down';\n } else if (direction == DIRECTION_UP) {\n return 'up';\n } else if (direction == DIRECTION_LEFT) {\n return 'left';\n } else if (direction == DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof AttrRecognizer\n */\n defaults: {\n /**\n * @type {Number}\n * @default 1\n */\n pointers: 1\n },\n\n /**\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest: function(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n\n /**\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process: function(input) {\n var state = this.state;\n var eventType = input.eventType;\n\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n\n this.pX = null;\n this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PanRecognizer\n */\n defaults: {\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n\n getTouchAction: function() {\n var direction = this.options.direction;\n var actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n },\n\n directionTest: function(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n\n attrTest: function(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n },\n\n emit: function(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'pinch',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n\n emit: function(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n Recognizer.apply(this, arguments);\n\n this._timer = null;\n this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PressRecognizer\n */\n defaults: {\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9 // a minimal movement is ok, but keep it low\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_AUTO];\n },\n\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(this.options.event + 'up', input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof RotateRecognizer\n */\n defaults: {\n event: 'rotate',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof SwipeRecognizer\n */\n defaults: {\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n\n getTouchAction: function() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n\n attrTest: function(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return this._super.attrTest.call(this, input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers == this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n\n emit: function(input) {\n var direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n Recognizer.apply(this, arguments);\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_MANIPULATION];\n },\n\n process: function(input) {\n var options = this.options;\n\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n var tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n },\n\n failTimeout: function() {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function() {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n /**\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {enable: false}],\n [PinchRecognizer, {enable: false}, ['rotate']],\n [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n [TapRecognizer],\n [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n [PressRecognizer]\n ],\n\n /**\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: 'none',\n\n /**\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: 'none',\n\n /**\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: 'none',\n\n /**\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: 'none',\n\n /**\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: 'none',\n\n /**\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: 'rgba(0,0,0,0)'\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n this.options = assign({}, Hammer.defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, function(item) {\n var recognizer = this.add(new (item[0])(item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n}\n\nManager.prototype = {\n /**\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n set: function(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n },\n\n /**\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n stop: function(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n\n /**\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n var session = this.session;\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n var recognizer;\n var recognizers = this.recognizers;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n var curRecognizer = session.curRecognizer;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n curRecognizer = session.curRecognizer = null;\n }\n\n var i = 0;\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n curRecognizer = session.curRecognizer = recognizer;\n }\n i++;\n }\n },\n\n /**\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n get: function(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event == recognizer) {\n return recognizers[i];\n }\n }\n return null;\n },\n\n /**\n * add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n add: function(recognizer) {\n if (invokeArrayArg(recognizer, 'add', this)) {\n return this;\n }\n\n // remove existing\n var existing = this.get(recognizer.options.event);\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n },\n\n /**\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n remove: function(recognizer) {\n if (invokeArrayArg(recognizer, 'remove', this)) {\n return this;\n }\n\n recognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, recognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n },\n\n /**\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n on: function(events, handler) {\n if (events === undefined) {\n return;\n }\n if (handler === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n\n /**\n * unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n off: function(events, handler) {\n if (events === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n },\n\n /**\n * emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n emit: function(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n var handlers = this.handlers[event] && this.handlers[event].slice();\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function() {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n },\n\n /**\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n destroy: function() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n if (!element.style) {\n return;\n }\n var prop;\n each(manager.options.cssProps, function(value, name) {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || '';\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent('Event');\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n assign: assign,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n// style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (typeof define === 'function' && define.amd) {\n define(function() {\n return Hammer;\n });\n} else if (typeof module != 'undefined' && module.exports) {\n module.exports = Hammer;\n} else {\n window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerThumbnailList.vue?vue&type=style&index=0&id=1f6197a4&prod&lang=scss&scoped=true\"","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"small\":\"640px\",\"medium\":\"800px\",\"large\":\"1024px\",\"xLarge\":\"1280px\"};","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersistentNavigationDrawer.vue?vue&type=style&index=0&id=6f8bee58&prod&lang=scss&scoped=true\"","// extracted by mini-css-extract-plugin\nmodule.exports = {\"small\":\"640px\",\"medium\":\"800px\",\"large\":\"1024px\",\"xLarge\":\"1280px\"};","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * isObject({})\n * // => true\n *\n * isObject([1, 2, 3])\n * // => true\n *\n * isObject(Function)\n * // => true\n *\n * isObject(null)\n * // => false\n */\nfunction isObject(value) {\n\tconst type = typeof value\n\treturn value != null && (type === 'object' || type === 'function')\n}\n\nexport default isObject\n","import isObject from './isObject.js'\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked, or until the next browser frame is drawn. The debounced function\n * comes with a `cancel` method to cancel delayed `func` invocations and a\n * `flush` method to immediately invoke them. Provide `options` to indicate\n * whether `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. The `func` is invoked with the last arguments provided to the\n * debounced function. Subsequent calls to the debounced function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * If `wait` is omitted in an environment with `requestAnimationFrame`, `func`\n * invocation will be deferred until the next frame is drawn (typically about\n * 16ms).\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `debounce` and `throttle`.\n *\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0]\n * The number of milliseconds to delay; if omitted, `requestAnimationFrame` is\n * used (if available).\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', debounce(calculateLayout, 150))\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }))\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * const debounced = debounce(batchLog, 250, { 'maxWait': 1000 })\n * const source = new EventSource('/stream')\n * jQuery(source).on('message', debounced)\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel)\n *\n * // Check for pending invocations.\n * const status = debounced.pending() ? \"Pending...\" : \"Ready\"\n */\nfunction debounce(func, wait, options) {\n\tlet lastArgs, lastThis, maxWait, result, timerId, lastCallTime\n\n\tlet lastInvokeTime = 0\n\tlet leading = false\n\tlet maxing = false\n\tlet trailing = true\n\n\t// Bypass `requestAnimationFrame` by explicitly setting `wait=0`.\n\tconst useRAF = !wait && wait !== 0 && typeof window.requestAnimationFrame === 'function'\n\n\tif (typeof func !== 'function') {\n\t\tthrow new TypeError('Expected a function')\n\t}\n\twait = +wait || 0\n\tif (isObject(options)) {\n\t\tleading = !!options.leading\n\t\tmaxing = 'maxWait' in options\n\t\tmaxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait\n\t\ttrailing = 'trailing' in options ? !!options.trailing : trailing\n\t}\n\n\tfunction invokeFunc(time) {\n\t\tconst args = lastArgs\n\t\tconst thisArg = lastThis\n\n\t\tlastArgs = lastThis = undefined\n\t\tlastInvokeTime = time\n\t\tresult = func.apply(thisArg, args)\n\t\treturn result\n\t}\n\n\tfunction startTimer(pendingFunc, wait) {\n\t\tif (useRAF) {\n\t\t\treturn window.requestAnimationFrame(pendingFunc)\n\t\t}\n\t\treturn setTimeout(pendingFunc, wait)\n\t}\n\n\tfunction cancelTimer(id) {\n\t\tif (useRAF) {\n\t\t\treturn window.cancelAnimationFrame(id)\n\t\t}\n\t\tclearTimeout(id)\n\t}\n\n\tfunction leadingEdge(time) {\n\t\t// Reset any `maxWait` timer.\n\t\tlastInvokeTime = time\n\t\t// Start the timer for the trailing edge.\n\t\ttimerId = startTimer(timerExpired, wait)\n\t\t// Invoke the leading edge.\n\t\treturn leading ? invokeFunc(time) : result\n\t}\n\n\tfunction remainingWait(time) {\n\t\tconst timeSinceLastCall = time - lastCallTime\n\t\tconst timeSinceLastInvoke = time - lastInvokeTime\n\t\tconst timeWaiting = wait - timeSinceLastCall\n\n\t\treturn maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting\n\t}\n\n\tfunction shouldInvoke(time) {\n\t\tconst timeSinceLastCall = time - lastCallTime\n\t\tconst timeSinceLastInvoke = time - lastInvokeTime\n\n\t\t// Either this is the first call, activity has stopped and we're at the\n\t\t// trailing edge, the system time has gone backwards and we're treating\n\t\t// it as the trailing edge, or we've hit the `maxWait` limit.\n\t\treturn (\n\t\t\tlastCallTime === undefined ||\n\t\t\ttimeSinceLastCall >= wait ||\n\t\t\ttimeSinceLastCall < 0 ||\n\t\t\t(maxing && timeSinceLastInvoke >= maxWait)\n\t\t)\n\t}\n\n\tfunction timerExpired() {\n\t\tconst time = Date.now()\n\t\tif (shouldInvoke(time)) {\n\t\t\treturn trailingEdge(time)\n\t\t}\n\t\t// Restart the timer.\n\t\ttimerId = startTimer(timerExpired, remainingWait(time))\n\t}\n\n\tfunction trailingEdge(time) {\n\t\ttimerId = undefined\n\n\t\t// Only invoke if we have `lastArgs` which means `func` has been\n\t\t// debounced at least once.\n\t\tif (trailing && lastArgs) {\n\t\t\treturn invokeFunc(time)\n\t\t}\n\t\tlastArgs = lastThis = undefined\n\t\treturn result\n\t}\n\n\tfunction cancel() {\n\t\tif (timerId !== undefined) {\n\t\t\tcancelTimer(timerId)\n\t\t}\n\t\tlastInvokeTime = 0\n\t\tlastArgs = lastCallTime = lastThis = timerId = undefined\n\t}\n\n\tfunction flush() {\n\t\treturn timerId === undefined ? result : trailingEdge(Date.now())\n\t}\n\n\tfunction pending() {\n\t\treturn timerId !== undefined\n\t}\n\n\tfunction debounced(...args) {\n\t\tconst time = Date.now()\n\t\tconst isInvoking = shouldInvoke(time)\n\n\t\tlastArgs = args\n\t\tlastThis = this\n\t\tlastCallTime = time\n\n\t\tif (isInvoking) {\n\t\t\tif (timerId === undefined) {\n\t\t\t\treturn leadingEdge(lastCallTime)\n\t\t\t}\n\t\t\tif (maxing) {\n\t\t\t\t// Handle invocations in a tight loop.\n\t\t\t\ttimerId = startTimer(timerExpired, wait)\n\t\t\t\treturn invokeFunc(lastCallTime)\n\t\t\t}\n\t\t}\n\t\tif (timerId === undefined) {\n\t\t\ttimerId = startTimer(timerExpired, wait)\n\t\t}\n\t\treturn result\n\t}\n\tdebounced.cancel = cancel\n\tdebounced.flush = flush\n\tdebounced.pending = pending\n\treturn debounced\n}\n\nexport default debounce\n","import debounce from './debounce.js'\nimport isObject from './isObject.js'\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds (or once per browser frame). The throttled function\n * comes with a `cancel` method to cancel delayed `func` invocations and a\n * `flush` method to immediately invoke them. Provide `options` to indicate\n * whether `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * If `wait` is omitted in an environment with `requestAnimationFrame`, `func`\n * invocation will be deferred until the next frame is drawn (typically about\n * 16ms).\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `throttle` and `debounce`.\n *\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0]\n * The number of milliseconds to throttle invocations to; if omitted,\n * `requestAnimationFrame` is used (if available).\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', throttle(updatePosition, 100))\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * const throttled = throttle(renewToken, 300000, { 'trailing': false })\n * jQuery(element).on('click', throttled)\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel)\n */\nfunction throttle(func, wait, options) {\n let leading = true\n let trailing = true\n\n if (typeof func !== 'function') {\n throw new TypeError('Expected a function')\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading\n trailing = 'trailing' in options ? !!options.trailing : trailing\n }\n return debounce(func, wait, {\n leading,\n trailing,\n maxWait: wait,\n })\n}\n\nexport default throttle\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"persistent-drawer\"},[_c('div',{staticClass:\"persistent-drawer-main\"},[_vm._t(\"default\")],2),_c('div',{staticClass:\"persistent-drawer-footer\"},[_vm._t(\"footer\")],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersistentNavigationDrawer.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersistentNavigationDrawer.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./PersistentNavigationDrawer.vue?vue&type=template&id=6f8bee58&scoped=true\"\nimport script from \"./PersistentNavigationDrawer.vue?vue&type=script&lang=js\"\nexport * from \"./PersistentNavigationDrawer.vue?vue&type=script&lang=js\"\nimport style0 from \"./PersistentNavigationDrawer.vue?vue&type=style&index=0&id=6f8bee58&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6f8bee58\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerStudy.vue?vue&type=style&index=0&id=57701a2f&prod&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprViewerLayoutSelector.vue?vue&type=style&index=0&id=f3d3b0cc&prod&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StudyAndReportViewer.vue?vue&type=style&index=0&id=0bbc5359&prod&lang=scss\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('viewer-layout',{ref:\"layout\",attrs:{\"allow-related-studies\":true,\"primary-toolbar-config\":_vm.primaryToolbarConfig,\"clinic-code\":_vm.clinicCode},on:{\"download-study\":_vm.downloadStudies,\"burn-in-annotations\":_vm.burnInAnnotations,\"drop-study-report\":_vm.onDropStudyReport},scopedSlots:_vm._u([{key:\"primary-buttons-left\",fn:function(){return [_c('ast-toolbar-button',{staticClass:\"back-btn\",attrs:{\"icon\":\"close\",\"title\":\"Close\"},nativeOn:{\"click\":function($event){return _vm.goBack($event)}}})]},proxy:true},{key:\"primary-buttons-right\",fn:function(){return [(_vm.activeReportId)?_c('ast-toolbar-button',{staticClass:\"label-right\",class:_vm.imageComment && 'added-to-report',attrs:{\"loading\":_vm.isAddingComment,\"icon\":_vm.imageComment ? 'checkbox-marked' : 'edit',\"label\":_vm.imageComment ? 'Added to report' : 'Add to report',\"disabled\":!_vm.isImageCommentAllowed || _vm.isRefreshingReport || _vm.isAddingComment},nativeOn:{\"click\":function($event){return _vm.updateImageComment($event)}}}):_vm._e()]},proxy:true},{key:\"panels\",fn:function(){return [(_vm.isImageCommentAllowed && _vm.isImageCommentOpen)?_c('modal-drawer',{attrs:{\"title\":\"Image Comment\",\"from-right\":\"\"},on:{\"close\":function($event){_vm.isImageCommentOpen = false}}},[_c('ast-image-comment-form',{attrs:{\"report-id\":_vm.activeReportId,\"image-id\":_vm.activeImage ? _vm.activeImage.imageId : undefined,\"series-id\":_vm.activeSeries ? _vm.activeSeries.originalSeriesId || _vm.activeSeries.seriesId : undefined,\"preview-image-url\":_vm.previewImageUrl,\"image-comment\":_vm.imageComment},on:{\"update-comment\":_vm.refreshReport}})],1):_vm._e()]},proxy:true}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticStyle:{\"padding\":\"16px\"}},[_c('div',{staticClass:\"preview-image-container\",staticStyle:{\"margin-bottom\":\"24px\"}},[(_vm.imageUrl)?_c('img',{attrs:{\"src\":_vm.imageUrl}}):_vm._e()]),_c('p',{staticClass:\"is-success\",staticStyle:{\"margin-bottom\":\"16px\"}},[_c('svg-icon',{attrs:{\"icon\":\"check-circle\",\"fixed\":\"\"}}),_vm._v(\"\\n\\t\\t\\tThis image has been added as a key image on the report!\\n\\t\\t\")],1),_vm._m(0),_c('c-k-editor',{ref:\"editor\",attrs:{\"read-only\":false,\"value\":_vm.form.htmlValue},on:{\"input\":_vm.updateTextValue}}),_c('button',{staticClass:\"btn btn-primary\",attrs:{\"disabled\":_vm.isLoading || _vm.hasNotAddedComment},on:{\"click\":_vm.updateComment}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.imageComment.textValue ? 'Update' : 'Create')+\" Comment\\n\\t\\t\")]),_c('div',{staticStyle:{\"margin-top\":\"24px\"}},[_c('button',{staticClass:\"btn btn-default btn-delete\",attrs:{\"disabled\":_vm.isLoading},on:{\"click\":_vm.deleteComment}},[_vm._v(\"\\n\\t\\t\\t\\tRemove image from report\\n\\t\\t\\t\")])])],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h4',[_vm._v(\"Comment: \"),_c('small',[_vm._v(\"(optional)\")])])}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerImageCommentForm.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerImageCommentForm.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ViewerImageCommentForm.vue?vue&type=template&id=5fcb1334&scoped=true\"\nimport script from \"./ViewerImageCommentForm.vue?vue&type=script&lang=js\"\nexport * from \"./ViewerImageCommentForm.vue?vue&type=script&lang=js\"\nimport style0 from \"./ViewerImageCommentForm.vue?vue&type=style&index=0&id=5fcb1334&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5fcb1334\",\n null\n \n)\n\nexport default component.exports","export default function arrayToList(array: Array): string {\n\treturn array ? [...new Set(array.filter(i => i && i.trim()))].join(',') : ''\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal-wrapper',{on:{\"close\":_vm.close}},[_c('div',{staticClass:\"download-container\"},[_c('dlg-header',{attrs:{\"title\":\"Download Studies\"},on:{\"close\":_vm.close}}),_c('div',{staticClass:\"download-content\"},[_c('p',{staticStyle:{\"margin\":\"0.5rem 1rem\"}},[_c('svg-icon',{staticClass:\"is-info\",staticStyle:{\"margin-right\":\"0.25rem\"},attrs:{\"icon\":\"info-circle\",\"fixed\":\"\"}}),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.instruction)}})],1),_vm._l((_vm.studies),function(ref){\nvar studyId = ref.studyId;\nvar imageData = ref.imageData;\nvar patientName = ref.patientName;\nvar studyDateTime = ref.studyDateTime;\nvar isArchived = ref.isArchived;\nreturn _c('div',{key:studyId},[_c('div',{staticClass:\"download-study-header\",class:{ 'is-excluded': _vm.isStudyExcluded(studyId) || !isArchived }},[_c('h4',{attrs:{\"title\":studyId}},[_vm._v(_vm._s(patientName)+\" on \"+_vm._s(_vm._f(\"localizeDate\")(studyDateTime)))]),_c('checkbox',{attrs:{\"value\":_vm.isStudyExcluded(studyId),\"disabled\":!isArchived},on:{\"input\":function($event){return _vm.toggleStudy(studyId)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\tExclude\\n\\t\\t\\t\\t\\t\")])],1),(!isArchived)?_c('p',{staticStyle:{\"font-size\":\"0.9em\",\"padding\":\"0.5rem 1rem\"}},[_c('svg-icon',{staticClass:\"is-warning\",attrs:{\"icon\":\"exclamation-triangle\",\"fixed\":\"\"}}),_vm._v(\"\\n\\t\\t\\t\\t\\tThis study may be downloaded once it has transferred to the cloud.\\n\\t\\t\\t\\t\")],1):_vm._e(),_c('div',{staticClass:\"download-study\",class:{ 'is-excluded': _vm.isStudyExcluded(studyId) || !isArchived }},[(imageData.thumbnails.length)?_c('div',[_c('h4',{staticStyle:{\"margin\":\"0.5rem 1rem 0 1rem\"}},[_vm._v(\"Thumbnails\")]),_c('ol',{staticClass:\"thumbnail-list\"},_vm._l((imageData.thumbnails),function(thumbnail,i){return _c('li',{key:i,staticClass:\"thumbnail-list-item\",on:{\"click\":function($event){$event.preventDefault();return _vm.toggleSeries(thumbnail.seriesId)}}},[_c('div',{staticClass:\"thumbnail\",style:({\n\t\t\t\t\t\t\t\t\t\t'background-image': (\"url(\" + (_vm.findThumbnailUrl(thumbnail)) + \")\"),\n\t\t\t\t\t\t\t\t\t}),attrs:{\"alt\":\"Thumbnail preview of first image in series\"}},[(_vm.isStudyExcluded(studyId) || _vm.isSeriesExcluded(thumbnail.seriesId))?_c('div',{staticClass:\"excluded\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tExcluded\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\")]):_vm._e()]),_c('div',{staticClass:\"thumbnail-label\"},[(thumbnail.seriesNumber)?_c('strong',[_vm._v(_vm._s(thumbnail.seriesNumber))]):_vm._e(),(thumbnail.simpleName)?_c('span',{staticClass:\"thumbnail-name\"},[_vm._v(_vm._s(thumbnail.simpleName))]):_vm._e(),(thumbnail.numberOfImages > 1)?_c('p',{staticClass:\"thumbnail-images\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(\"+_vm._s(thumbnail.numberOfImages)+\" Images)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\")]):_vm._e()])])}),0)]):_vm._e(),(imageData.attachments.length)?_c('attachment-list',{staticClass:\"attachment-list\",staticStyle:{\"margin\":\"0.5rem 1rem 1rem 1rem\"},attrs:{\"attachments\":imageData.attachments,\"series-to-exclude\":_vm.seriesToExclude,\"open-on-click\":false},on:{\"select\":_vm.toggleSeries}}):_vm._e()],1)])})],2),_c('div',{staticClass:\"download-footer\"},[(_vm.optionsVisible)?[_c('div',{staticClass:\"download-options\"},[_c('div',{staticClass:\"download-option\"},[_c('span',{staticClass:\"download-option-label\"},[_vm._v(\"Image Type:\")]),_c('div',{staticClass:\"download-selections\"},[_c('span',{staticClass:\"radio\"},[_c('label',{attrs:{\"for\":\"dicom\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.downloadType),expression:\"downloadType\"}],attrs:{\"id\":\"dicom\",\"type\":\"radio\",\"value\":\"1\"},domProps:{\"checked\":_vm._q(_vm.downloadType,\"1\")},on:{\"change\":function($event){_vm.downloadType=\"1\"}}}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tDICOM\\n\\t\\t\\t\\t\\t\\t\\t\\t\")])]),_c('span',{staticClass:\"radio\"},[_c('label',{attrs:{\"for\":\"jpeg\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.downloadType),expression:\"downloadType\"}],attrs:{\"id\":\"jpeg\",\"type\":\"radio\",\"value\":\"0\"},domProps:{\"checked\":_vm._q(_vm.downloadType,\"0\")},on:{\"change\":function($event){_vm.downloadType=\"0\"}}}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tJPEG\\n\\t\\t\\t\\t\\t\\t\\t\\t\")])])])]),_c('div',{staticClass:\"download-option\"},[_c('span',{staticClass:\"download-option-label\"},[_vm._v(\"Folder Option:\")]),_c('div',{staticClass:\"download-selections\"},[_c('span',{staticClass:\"radio\"},[_c('label',{attrs:{\"for\":\"single\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.folderOption),expression:\"folderOption\"}],attrs:{\"id\":\"single\",\"type\":\"radio\",\"value\":\"0\"},domProps:{\"checked\":_vm._q(_vm.folderOption,\"0\")},on:{\"change\":function($event){_vm.folderOption=\"0\"}}}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tSingle\\n\\t\\t\\t\\t\\t\\t\\t\\t\")])]),_c('span',{staticClass:\"radio\"},[_c('label',{attrs:{\"for\":\"studySeries\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.folderOption),expression:\"folderOption\"}],attrs:{\"id\":\"studySeries\",\"type\":\"radio\",\"value\":\"1\"},domProps:{\"checked\":_vm._q(_vm.folderOption,\"1\")},on:{\"change\":function($event){_vm.folderOption=\"1\"}}}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tStudy/Series\\n\\t\\t\\t\\t\\t\\t\\t\\t\")])]),_c('span',{staticClass:\"radio\"},[_c('label',{attrs:{\"for\":\"patientDate\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.folderOption),expression:\"folderOption\"}],attrs:{\"id\":\"patientDate\",\"type\":\"radio\",\"value\":\"2\"},domProps:{\"checked\":_vm._q(_vm.folderOption,\"2\")},on:{\"change\":function($event){_vm.folderOption=\"2\"}}}),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tPatient & Date\\n\\t\\t\\t\\t\\t\\t\\t\\t\")])])])])])]:_vm._e(),_c('div',{staticClass:\"download-action\"},[_c('button',{staticClass:\"btn btn-primary\",class:{ disabled: _vm.downloadDisabled },staticStyle:{\"margin\":\"0.5rem 0\"},on:{\"click\":_vm.download}},[_c('svg-icon',{attrs:{\"icon\":\"cloud-download\",\"fixed\":\"\"}}),_vm._v(\"\\n\\t\\t\\t\\t\\tDownload\\n\\t\\t\\t\\t\")],1),(!_vm.optionsVisible)?_c('div',{staticClass:\"download-options-tip\",on:{\"click\":function($event){_vm.optionsVisible = !_vm.optionsVisible}}},[_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.downloadOptionsTip)}}),_c('span',{staticStyle:{\"font-size\":\"8px\",\"margin-left\":\"8px\"}},[_vm._v(\"▲\")])]):_vm._e()])],2)],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerStudyDownloadModal.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewerStudyDownloadModal.vue?vue&type=script&lang=js\"","\n\n\n\n\n","import { render, staticRenderFns } from \"./ViewerStudyDownloadModal.vue?vue&type=template&id=03720b08&scoped=true\"\nimport script from \"./ViewerStudyDownloadModal.vue?vue&type=script&lang=js\"\nexport * from \"./ViewerStudyDownloadModal.vue?vue&type=script&lang=js\"\nimport style0 from \"./ViewerStudyDownloadModal.vue?vue&type=style&index=0&id=03720b08&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"03720b08\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StudyAndReportViewer.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StudyAndReportViewer.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./StudyAndReportViewer.vue?vue&type=template&id=0bbc5359\"\nimport script from \"./StudyAndReportViewer.vue?vue&type=script&lang=js\"\nexport * from \"./StudyAndReportViewer.vue?vue&type=script&lang=js\"\nimport style0 from \"./StudyAndReportViewer.vue?vue&type=style&index=0&id=0bbc5359&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MprDisabledDlg.vue?vue&type=style&index=0&id=7097eca2&prod&lang=scss&scoped=true\""],"sourceRoot":""}