LT-92: Displaying the criteria nonconformities when clicking the warning icon

This commit is contained in:
Bruno Alves de Faria committed 2017-01-18 11:01:52 -02:00
1 parent 65b867d1b0
commit db4792b3de
21 files changed
+137 -54

No files matched your search

@@ -146,7 +146,7 @@ n._simpleSchema=t,n._schema=t.schema(),n._schemaKeys=o.keys(n._schema),n._invali
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.jquery.$,r=Package.jquery.jQuery,i=Package.underscore._,a=Package["templating-runtime"].Template,u=Package["reactive-var"].ReactiveVar,l=Package["clinical:router"].Router,c=Package["clinical:router"].RouteController,s=Package["aldeed:simple-schema"].SimpleSchema,p=Package["aldeed:simple-schema"].MongoObject,m=Package.modules.meteorInstall,d=Package.modules.Buffer,f=Package.modules.process,h=Package["ecmascript-runtime"].Symbol,v=Package["ecmascript-runtime"].Map,g=Package["ecmascript-runtime"].Set,k=Package["babel-runtime"].meteorBabelHelpers,b=Package.promise.Promise,w=Package["iron:core"].Iron,y=Package.webapp.WebApp,x=Package.logging.Log,j=Package.deps.Tracker,T=Package.deps.Deps,I=Package.session.Session,C=Package["ddp-client"].DDP,_=Package.mongo.Mongo,M=Package.ui.Blaze,S=Package.ui.UI,H=Package.ui.Handlebars,F=Package.spacebars.Spacebars,O=Package.check.check,$=Package.check.Match,D=Package.random.Random,P=Package.ejson.EJSON,z=Package["launch-screen"].LaunchScreen,A=Package.htmljs.HTML,E,R=m({node_modules:{meteor:{"ohif:core":{"main.js":["meteor/meteor",function(e,t,n){n.export({OHIF:function(){return r}});var o;n.import("meteor/meteor",{Meteor:function(e){o=e}});var r={log:{},ui:{},viewer:{}};o.isDevelopment&&o.isClient&&(window.OHIF=r)}],client:{"index.js":["./lib","./helpers","./components","./ui","./routes.js",function(e,t,n){n.import("./lib"),n.import("./helpers"),n.import("./components"),n.import("./ui"),n.import("./routes.js")}],"routes.js":["meteor/clinical:router",function(e,t,n){var o;n.import("meteor/clinical:router",{Router:function(e){o=e}}),o.route("/playground",function(){this.render("componentPlayground")})}],components:{"index.js":["./base","./bootstrap","./playground/playground.html","./playground/playground.styl","./playground/playground.js",function(e,t,n){n.import("./base"),n.import("./bootstrap"),n.import("./playground/playground.html"),n.import("./playground/playground.styl"),n.import("./playground/playground.js")}],base:{"component.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core",function(e,t,n){var o;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}});var i=function(){function e(t){o(this,e),t.view._component=this,t.sections={},this.templateInstance=t,this.registeredItems=new g}return e.prototype.registerSelf=function(){function e(){var e=r.blaze.getParentComponent(this.templateInstance.view);e&&(this.parent=e,e.registeredItems.add(this))}return e}(),e.prototype.unregisterSelf=function(){function e(){var e=r.blaze.getParentComponent(this.templateInstance.view);e&&(delete this.parent,e.registeredItems.delete(this))}return e}(),e}();r.Component=i}],"index.js":["./component.js","./mixin.js","./template.js","./section/section.html","./section/section.js","./mixins/action.js","./mixins/button.js","./mixins/checkbox.js","./mixins/component.js","./mixins/form.js","./mixins/formItem.js","./mixins/group.js","./mixins/groupRadio.js","./mixins/input.js","./mixins/link.js","./mixins/schemaData.js","./mixins/select.js","./mixins/select2.js","./templates/button.html","./templates/custom.html","./templates/div.html","./templates/form.html","./templates/input.html","./templates/link.html","./templates/select.html","./wrappers/label.html","./wrappers/labelContent.html",function(e,t,n){n.import("./component.js"),n.import("./mixin.js"),n.import("./template.js"),n.import("./section/section.html"),n.import("./section/section.js"),n.import("./mixins/action.js"),n.import("./mixins/button.js"),n.import("./mixins/checkbox.js"),n.import("./mixins/component.js"),n.import("./mixins/form.js"),n.import("./mixins/formItem.js"),n.import("./mixins/group.js"),n.import("./mixins/groupRadio.js"),n.import("./mixins/input.js"),n.import("./mixins/link.js"),n.import("./mixins/schemaData.js"),n.import("./mixins/select.js"),n.import("./mixins/select2.js"),n.import("./templates/button.html"),n.import("./templates/custom.html"),n.import("./templates/div.html"),n.import("./templates/form.html"),n.import("./templates/input.html"),n.import("./templates/link.html"),n.import("./templates/select.html"),n.import("./wrappers/label.html"),n.import("./wrappers/labelContent.html")}],"mixin.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core","meteor/underscore",function(e,t,n){var o;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}});var i;n.import("meteor/underscore",{_:function(e){i=e}}),r.mixins={};var a=function(){function e(t){var n=t.dependencies,r=t.composition;o(this,e),this.dependencies=n||"",this.composition=r}return e.prototype.init=function(){function t(t,n,o,r){var a=this,u=this.dependencies.split(" ");i.each(u,function(i){if(i){var u=e.getMixin(i);if(u===a)throw new Error("Mixin "+i+" has a cyclic dependency.");u.init(t,n,o,r)}}Line truncated
n.exports=e("./template.confirm.js")}],"template.confirm.js":function(){a.__checkName("dialogConfirm"),a.dialogConfirm=new a("Template.dialogConfirm",function(){var e=this;return M._TemplateWith(function(){return F.dataMustache(e.lookup("extend"),e.lookup("."),F.kw({dialogClass:"modal-sm",title:F.dataMustache(e.lookup("choose"),F.dot(e.lookup("."),"title"),"Confirmation")}))},function(){return F.include(e.lookupTemplate("dialogForm"),function(){return["\n ",A.P(M.View("lookup:choose",function(){return F.mustache(e.lookup("choose"),F.dot(e.lookup("."),"message"),"Are you sure you want to perform this action?")})),"\n "]})})})},"form.html":["./template.form.js",function(e,t,n){n.exports=e("./template.form.js")}],"template.form.js":function(){a.__checkName("dialogForm"),a.dialogForm=new a("Template.dialogForm",function(){var e=this;return A.DIV({id:function(){return F.mustache(F.dot(e.lookup("."),"id"))},class:"modal fade",tabindex:"-1",role:"dialog"},"\n ",A.DIV({class:function(){return["modal-dialog ",F.mustache(F.dot(e.lookup("."),"dialogClass"))]},role:"document"},"\n ",M._TemplateWith(function(){return{class:F.call("modal-content"),hideValidationBox:F.call(!0),api:F.call(F.dataMustache(e.lookup("extend"),F.dot(e.lookup("instance"),"api"),F.dot(e.lookup("instance"),"data","api"))),schema:F.call(F.dot(e.lookup("."),"schema"))}},function(){return F.include(e.lookupTemplate("form"),function(){return["\n ",A.DIV({class:"modal-header"},"\n ",M._TemplateWith(function(){return{class:F.call("close"),action:F.call("cancel"),tagAttributes:F.call(F.dataMustache(e.lookup("extend"),F.dot(e.lookup("."),"tagAttributes"),F.kw({"data-dismiss":"modal","aria-label":"Close"})))}},function(){return F.include(e.lookupTemplate("button"),function(){return A.SPAN({"aria-hidden":"true"},A.CharRef({html:"×",str:"×"}))})}),"\n ",A.H4({class:"modal-title"},M.View("lookup:..title",function(){return F.mustache(F.dot(e.lookup("."),"title"))})),"\n "),"\n ",A.DIV({class:"modal-body"},"\n ",M._InOuterTemplateScope(e,function(){return F.include(function(){return F.call(e.templateContentBlock)})}),"\n "),"\n ",A.DIV({class:"modal-footer"},"\n ",M._TemplateWith(function(){return{action:F.call("cancel"),class:F.call(F.dataMustache(e.lookup("concat"),"btn ",F.dataMustache(e.lookup("choose"),F.dot(e.lookup("."),"cancelClass"),"btn-default"))),tagAttributes:F.call(F.dataMustache(e.lookup("extend"),F.dot(e.lookup("."),"tagAttributes"),F.kw({"data-dismiss":"modal"})))}},function(){return F.include(e.lookupTemplate("button"),function(){return M.View("lookup:choose",function(){return F.mustache(e.lookup("choose"),F.dot(e.lookup("."),"cancelLabel"),"Cancel")})})}),"\n ",M._TemplateWith(function(){return{action:F.call("confirm"),class:F.call(F.dataMustache(e.lookup("concat"),"btn ",F.dataMustache(e.lookup("choose"),F.dot(e.lookup("."),"confirmClass"),"btn-primary")))}},function(){return F.include(e.lookupTemplate("button"),function(){return M.View("lookup:choose",function(){return F.mustache(e.lookup("choose"),F.dot(e.lookup("."),"confirmLabel"),"Confirm")})})}),"\n "),"\n "]})}),"\n "),"\n ")})},"form.js":["meteor/templating","meteor/underscore",function(e,t,n){var o;n.import("meteor/templating",{Template:function(e){o=e}});var r;n.import("meteor/underscore",{_:function(e){r=e}}),o.dialogForm.onCreated(function(){var e=o.instance();e.api={confirm:function(){function t(){var t=e.$("form").data("component");t.validate()&&e.$(".modal").on("hidden.bs.modal",function(n){var o=t.value();r.isFunction(e.data.confirmCallback)?e.data.confirmCallback(o,e.data.promiseResolve):e.data.promiseResolve(o)}).modal("hide")}return t}(),cancel:function(){function t(){e.$(".modal").on("hidden.bs.modal",function(t){r.isFunction(e.data.cancelCallback)?e.data.cancelCallback(e.data.promiseReject):e.data.promiseReject()}).modal("hide")}return t}()}}),o.dialogForm.onRendered(function(){var e=o.instance(),t=r.extend({backdrop:"static",keyboard:!1},e.data.modalOptions),n=e.$(".modal");n.modal(t);var i=e.data.position;i&&OHIF.ui.repositionDialog(n,i.x,i.y)})}],"login.html":["./template.login.js",function(e,t,n){n.exports=e("./template.login.js")}],"template.login.js":function(){a.__checkName("dialogLogin"),a.dialogLogin=new a("Template.dialogLogin",function(){var e=this;return M._TemplateWith(function(){return F.dataMustache(e.lookup("extend"),e.lookup("."),F.kw({dialogClass:"modal-sm",schema:F.dataMustache(e.lookup("choose"),F.dot(e.lookup("."),"schema"),F.dot(e.lookup("instance"),"schema"))}))},function(){return F.include(e.lookupTemplate("dialogForm"),function(){return["\n ",M._TemplateWith(function(){return{labelClass:F.call("form-group"),key:F.call("username")}},function(){return F.include(e.lookupTemplate("inputText"))}),"\n Line truncated
this.$element=o(t),this.options(n),this.setBoundedFlag(!1)}return e.prototype.options=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.boundingElement,n=e.allowResizing;this.boundingElement=t,this.$boundingElement=o(this.boundingElement),this.allowResizing=n,"fixed"===this.$element.css("position")&&(this.boundingElement=window),this.destroy(),this.init()}return e}(),e.prototype.init=function(){function e(){var e=this;this.defineEventHandlers(),this.attachEventHandlers(),this.$element.addClass("bounded"),setTimeout(function(){return e.$element.trigger("spatialChanged")})}return e}(),e.prototype.destroy=function(){function e(){this.detachEventHandlers(),this.$element.removeClass("bounded")}return e}(),e.spatialInfo=function(){function e(e){var t={};if(!e||e===window){var n=o(window),r=n.outerWidth(),i=n.outerHeight();return{width:r,height:i,x0:0,y0:0,x1:r,y1:i}}var a=o(e),u=e.style;u.width&&u.width.indexOf("px")>-1?t.width=parseInt(u.width):t.width=a.outerWidth(),u.height&&u.height.indexOf("px")>-1?t.height=parseInt(u.height):t.height=a.outerHeight();var l="fixed"===a.css("position")?"position":"offset",c=a[l]();return t.x0=c.left,t.y0=c.top,t.x1=t.x0+t.width,t.y1=t.y0+t.height,t}return e}(),e.prototype.defineEventHandlers=function(){function t(){var t=this;this.spatialChangedHandler=function(n){var o=e.spatialInfo(t.element),r=e.spatialInfo(t.boundingElement);t.allowResizing&&o.width>r.width?(t.$element.width(r.width),t.$element.css("left",r.x0),t.setBoundedFlag(!0)):o.x0<r.x0?(t.$element.css("left",r.x0),t.setBoundedFlag(!0)):o.x1>r.x1&&(t.$element.css("left",r.x1-o.width),t.setBoundedFlag(!0)),t.allowResizing&&o.height>r.height?(t.$element.height(r.height),t.$element.css("top",r.y0),t.setBoundedFlag(!0)):o.y0<r.y0?(t.$element.css("top",r.y0),t.setBoundedFlag(!0)):o.y1>r.y1&&(t.$element.css("top",r.y1-o.height),t.setBoundedFlag(!0))}}return t}(),e.prototype.attachEventHandlers=function(){function e(){this.$element.on("spatialChanged",this.spatialChangedHandler),this.$boundingElement.on("resize",this.spatialChangedHandler)}return e}(),e.prototype.detachEventHandlers=function(){function e(){this.$element.off("spatialChanged",this.spatialChangedHandler),this.$boundingElement.off("resize",this.spatialChangedHandler)}return e}(),e.prototype.setBoundedFlag=function(){function e(e){this.$element.data("wasBounded",e)}return e}(),e}();a.ui.Bounded=u}]},dialog:{"form.js":["meteor/templating","meteor/blaze","meteor/underscore","meteor/ohif:core",function(e,t,n){var o;n.import("meteor/templating",{Template:function(e){o=e}});var r;n.import("meteor/blaze",{Blaze:function(e){r=e}});var i;n.import("meteor/underscore",{_:function(e){i=e}});var a;n.import("meteor/ohif:core",{OHIF:function(e){a=e}}),a.ui.showFormDialog=function(e,t){var n=o[e];if(!n)throw{name:"TEMPLATE_NOT_FOUND",message:"Template "+e+" not found."};var a=void 0,u=void 0,l=new b(function(e,t){a=e,u=t}),c=i.extend({},t,{promise:l,promiseResolve:a,promiseReject:u}),s=r.renderWithData(n,c,document.body),p=function e(){return r.remove(s)};return l.then(p,p),l}}],"spatial.js":["meteor/ohif:core",function(e,t,n){var o;n.import("meteor/ohif:core",{OHIF:function(e){o=e}}),o.ui.repositionDialog=function(e,t,n){var o=e.find(".modal-dialog");o.css({margin:0,position:"fixed"}).bounded();var r=e.is(":visible");e.show();var i=o.outerHeight(),a=o.outerWidth(),u=parseInt(t-a/2),l=parseInt(n-i/2);o.css({left:u,top:l}).trigger("spatialChanged"),e.toggle(r)}}]},draggable:{"draggable.js":["meteor/ohif:core",function(e,t,n){var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}}),o.fn.draggable=function(){return r.ui.makeDraggable(this),this},r.ui.makeDraggable=function(e){function t(e){var t={x:e.clientX,y:e.clientY};return void 0===t.x&&(t.x=e.originalEvent.touches[0].pageX),void 0===t.y&&(t.y=e.originalEvent.touches[0].pageY),t}function n(n){if(!n.target.type||"range"!==n.target.type){var s=parseFloat(e.offset().top),p=parseFloat(e.offset().left),m=t(n);u=m.x-p,l=m.y-s,a.css("cursor","move"),e.css("cursor","move"),e.css({cursor:"move",left:p+"px",top:s+"px",bottom:"auto",right:"auto"}),o(document).on("mousemove",i),o(document).on("mouseup",r),o(document).on("touchmove",i),o(document).on("touchend",r),c&&(e.data("wasDragged",!0),c=!1)}}function r(){a.css("cursor","default"),e.css("cursor",E.defaultElementCursor),o(document).off("mousemove",i),o(document).off("touchmove",i)}function i(n){n.preventDefault();var o=parseFloat(e.outerWidth()),r=parseFloat(e.outerHeight()),i=parseFloat(a.width()),c=parseFloat(a.height()),s=t(n),p=s.x-u,m=s.y-l;p=Math.max(p,0),m=Math.max(m,0),p+o>i&&(p=i-o),m+r>c&&(m=c-r),e.css({left:p+"px",top:m+"px",bottom:"auto",right:"auto"})}var a=o(window),u,l,c=!0;E=E||{},E.defaultElementCursor=E.defaultElementCursor||"default",e.data("wasDragged",!1),e.on("mousedown",n),e.on("touchstart",n)}}]},dropdown:{"form.js":["meteor/templating","meteor/blaze","meteor/underscore","meteor/ohif:core",function(e,t,n){var o;n.iLine truncated
this.$element=o(t),this.options(n),this.setBoundedFlag(!1)}return e.prototype.options=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.boundingElement,n=e.allowResizing;this.boundingElement=t,this.$boundingElement=o(this.boundingElement),this.allowResizing=n,"fixed"===this.$element.css("position")&&(this.boundingElement=window),this.destroy(),this.init()}return e}(),e.prototype.init=function(){function e(){var e=this;this.defineEventHandlers(),this.attachEventHandlers(),this.$element.addClass("bounded"),setTimeout(function(){return e.$element.trigger("spatialChanged")})}return e}(),e.prototype.destroy=function(){function e(){this.detachEventHandlers(),this.$element.removeClass("bounded")}return e}(),e.spatialInfo=function(){function e(e){var t={};if(!e||e===window){var n=o(window),r=n.outerWidth(),i=n.outerHeight();return{width:r,height:i,x0:0,y0:0,x1:r,y1:i}}var a=o(e),u=e.style;u.width&&u.width.indexOf("px")>-1?t.width=parseInt(u.width):t.width=a.outerWidth(),u.height&&u.height.indexOf("px")>-1?t.height=parseInt(u.height):t.height=a.outerHeight();var l="fixed"===a.css("position")?"position":"offset",c=a[l]();return t.x0=c.left,t.y0=c.top,t.x1=t.x0+t.width,t.y1=t.y0+t.height,t}return e}(),e.prototype.defineEventHandlers=function(){function t(){var t=this;this.spatialChangedHandler=function(n){var o=e.spatialInfo(t.element),r=e.spatialInfo(t.boundingElement);t.allowResizing&&o.width>r.width?(t.$element.width(r.width),t.$element.css("left",r.x0),t.setBoundedFlag(!0)):o.x0<r.x0?(t.$element.css("left",r.x0),t.setBoundedFlag(!0)):o.x1>r.x1&&(t.$element.css("left",r.x1-o.width),t.setBoundedFlag(!0)),t.allowResizing&&o.height>r.height?(t.$element.height(r.height),t.$element.css("top",r.y0),t.setBoundedFlag(!0)):o.y0<r.y0?(t.$element.css("top",r.y0),t.setBoundedFlag(!0)):o.y1>r.y1&&(t.$element.css("top",r.y1-o.height),t.setBoundedFlag(!0))}}return t}(),e.prototype.attachEventHandlers=function(){function e(){this.$element.on("spatialChanged",this.spatialChangedHandler),this.$boundingElement.on("resize",this.spatialChangedHandler)}return e}(),e.prototype.detachEventHandlers=function(){function e(){this.$element.off("spatialChanged",this.spatialChangedHandler),this.$boundingElement.off("resize",this.spatialChangedHandler)}return e}(),e.prototype.setBoundedFlag=function(){function e(e){this.$element.data("wasBounded",e)}return e}(),e}();a.ui.Bounded=u}]},dialog:{"form.js":["meteor/templating","meteor/blaze","meteor/underscore","meteor/ohif:core",function(e,t,n){var o;n.import("meteor/templating",{Template:function(e){o=e}});var r;n.import("meteor/blaze",{Blaze:function(e){r=e}});var i;n.import("meteor/underscore",{_:function(e){i=e}});var a;n.import("meteor/ohif:core",{OHIF:function(e){a=e}}),a.ui.showDialog=function(e,t){var n=o[e];if(!n)throw{name:"TEMPLATE_NOT_FOUND",message:"Template "+e+" not found."};var a=void 0,u=void 0,l=new b(function(e,t){a=e,u=t}),c=i.extend({},t,{promise:l,promiseResolve:a,promiseReject:u}),s=r.renderWithData(n,c,document.body),p=function e(){return r.remove(s)};return l.then(p,p),l}}],"spatial.js":["meteor/ohif:core",function(e,t,n){var o;n.import("meteor/ohif:core",{OHIF:function(e){o=e}}),o.ui.repositionDialog=function(e,t,n){var o=e.find(".modal-dialog");o.css({margin:0,position:"fixed"}).bounded();var r=e.is(":visible");e.show();var i=o.outerHeight(),a=o.outerWidth(),u=parseInt(t-a/2),l=parseInt(n-i/2);o.css({left:u,top:l}).trigger("spatialChanged"),e.toggle(r)}}]},draggable:{"draggable.js":["meteor/ohif:core",function(e,t,n){var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}}),o.fn.draggable=function(){return r.ui.makeDraggable(this),this},r.ui.makeDraggable=function(e){function t(e){var t={x:e.clientX,y:e.clientY};return void 0===t.x&&(t.x=e.originalEvent.touches[0].pageX),void 0===t.y&&(t.y=e.originalEvent.touches[0].pageY),t}function n(n){if(!n.target.type||"range"!==n.target.type){var s=parseFloat(e.offset().top),p=parseFloat(e.offset().left),m=t(n);u=m.x-p,l=m.y-s,a.css("cursor","move"),e.css("cursor","move"),e.css({cursor:"move",left:p+"px",top:s+"px",bottom:"auto",right:"auto"}),o(document).on("mousemove",i),o(document).on("mouseup",r),o(document).on("touchmove",i),o(document).on("touchend",r),c&&(e.data("wasDragged",!0),c=!1)}}function r(){a.css("cursor","default"),e.css("cursor",E.defaultElementCursor),o(document).off("mousemove",i),o(document).off("touchmove",i)}function i(n){n.preventDefault();var o=parseFloat(e.outerWidth()),r=parseFloat(e.outerHeight()),i=parseFloat(a.width()),c=parseFloat(a.height()),s=t(n),p=s.x-u,m=s.y-l;p=Math.max(p,0),m=Math.max(m,0),p+o>i&&(p=i-o),m+r>c&&(m=c-r),e.css({left:p+"px",top:m+"px",bottom:"auto",right:"auto"})}var a=o(window),u,l,c=!0;E=E||{},E.defaultElementCursor=E.defaultElementCursor||"default",e.data("wasDragged",!1),e.on("mousedown",n),e.on("touchstart",n)}}]},dropdown:{"form.js":["meteor/templating","meteor/blaze","meteor/underscore","meteor/ohif:core",function(e,t,n){var o;n.imporLine truncated
!function(){var Meteor=Package.meteor.Meteor,global=Package.meteor.global,meteorEnv=Package.meteor.meteorEnv,$=Package.jquery.$,jQuery=Package.jquery.jQuery,cornerstone,dicomParser,cornerstoneTools,cornerstoneWADOImageLoader,cornerstoneMath;"undefined"==typeof cornerstone&&(cornerstone={internal:{},rendering:{}}),function(e){"use strict";function i(i){if(void 0===i)throw"disable: element element must not be undefined";for(var t=e.getEnabledElements(),r=0;r<t.length;r++)if(t[r].element===i){var n={element:i};return $(i).trigger("CornerstoneElementDisabled",n),t[r].element.removeChild(t[r].canvas),void t.splice(r,1)}}e.disable=i}(cornerstone),function(e,i){"use strict";function t(t,r,n){if(void 0===t)throw"displayImage: parameter element cannot be undefined";if(void 0===r)throw"displayImage: parameter image cannot be undefined";var a=i.getEnabledElement(t);if(a.image=r,void 0===a.viewport&&(a.viewport=i.internal.getDefaultViewport(a.canvas,r)),n)for(var o in n)null!==n[o]&&(a.viewport[o]=n[o]);var s=new Date,f;if(void 0!==a.lastImageTimeStamp){var l=s.getTime()-a.lastImageTimeStamp;f=(1e3/l).toFixed()}a.lastImageTimeStamp=s.getTime();var u={viewport:a.viewport,element:a.element,image:a.image,enabledElement:a,frameRate:f};e(a.element).trigger("CornerstoneNewImage",u),i.updateImage(t)}i.displayImage=t}($,cornerstone),function(e,i){"use strict";function t(e){var t=i.getEnabledElement(e);if(void 0===t.image)throw"draw: image has not been loaded yet";i.drawImage(t)}i.draw=t}($,cornerstone),function(e,i){"use strict";function t(){for(var e=i.getEnabledElements(),t=0;t<e.length;t++){var r=e[t];r.invalid===!0&&i.drawImage(r)}}i.drawInvalidated=t}($,cornerstone),function(e){"use strict";function i(i,t){if(void 0===i)throw"enable: parameter element cannot be undefined";t&&t.renderer&&"webgl"===t.renderer.toLowerCase()&&(e.webGL.renderer.isWebGLAvailable()?(console.log("Using WebGL rendering path"),e.webGL.renderer.initRenderer(),t.renderer="webgl"):(console.error("WebGL not available, falling back to Canvas renderer"),delete t.renderer));var r=document.createElement("canvas");i.appendChild(r);var n={element:i,canvas:r,image:void 0,invalid:!1,options:t,data:{}};return e.addEnabledElement(n),e.resize(i,!0),i}e.enable=i}(cornerstone),function(e){"use strict";function i(i,t){var r=e.getEnabledElement(i);return r.data.hasOwnProperty(t)===!1&&(r.data[t]={}),r.data[t]}function t(i,t){var r=e.getEnabledElement(i);delete r.data[t]}e.getElementData=i,e.removeElementData=t}(cornerstone),function(e){"use strict";function i(e){if(void 0===e)throw"getEnabledElement: parameter element must not be undefined";for(var i=0;i<a.length;i++)if(a[i].element==e)return a[i];throw"element not enabled"}function t(e){if(void 0===e)throw"getEnabledElement: enabledElement element must not be undefined";a.push(e)}function r(e){var i=[];return a.forEach(function(t){t.image&&t.image.imageId===e&&i.push(t)}),i}function n(){return a}var a=[];e.getEnabledElement=i,e.addEnabledElement=t,e.getEnabledElementsByImageId=r,e.getEnabledElements=n}(cornerstone),function(e){"use strict";function i(e){return 0===e.viewport.rotation||180===e.viewport.rotation?{width:e.image.width,height:e.image.height}:{width:e.image.height,height:e.image.width}}function t(t){var r=e.getEnabledElement(t),n=i(r),a=r.canvas.height/n.height,o=r.canvas.width/n.width;o<a?r.viewport.scale=o:r.viewport.scale=a,r.viewport.translation.x=0,r.viewport.translation.y=0,e.updateImage(t)}e.fitToWindow=t}(cornerstone),function(e,i){"use strict";function t(e,t){var r=i.getEnabledElement(e),n=i.internal.getDefaultViewport(r.canvas,t);return n}i.getDefaultViewportForImage=t}($,cornerstone),function(e,i){"use strict";function t(e){var t=i.getEnabledElement(e);return t.image}i.getImage=t}($,cornerstone),function(e){"use strict";function i(i,t,r,n,a){var o=e.getStoredPixels(i,t,r,n,a),s=e.getEnabledElement(i),f=e.internal.getModalityLUT(s.image.slope,s.image.intercept,s.viewport.modalityLUT),l=o.map(f);return l}e.getPixels=i}(cornerstone),function(e){"use strict";function i(i,t,r,n,a){if(void 0===i)throw"getStoredPixels: parameter element must not be undefined";t=Math.round(t),r=Math.round(r);for(var o=e.getEnabledElement(i),s=[],f=0,l=o.image.getPixelData(),u=0;u<a;u++)for(var c=0;c<n;c++){var d=(u+r)*o.image.columns+(c+t);s[f++]=l[d]}return s}e.getStoredPixels=i}(cornerstone),function(e){"use strict";function i(i){var t=e.getEnabledElement(i),r=t.viewport;if(void 0!==r)return{scale:r.scale,translation:{x:r.translation.x,y:r.translation.y},voi:{windowWidth:r.voi.windowWidth,windowCenter:r.voi.windowCenter},invert:r.invert,pixelReplication:r.pixelReplication,rotation:r.rotation,hflip:r.hflip,vflip:r.vflip,modalityLUT:r.modalityLUT,voiLUT:r.voiLUT}}e.getViewport=i}(cornerstone),function(e){"use strict";function i(e){if(void 0===e)throw"setMaximumSizeBytes: parameter numBytes must not be undefined";if(void 0===e.toFixed)throw"setMaximumSizeBytes: parameter numBytes must be a number";h=e,t()}function t(){Line truncated
e.webGL.shaders.uint8=t}(cornerstone),function(e){"use strict";function i(e){if(void 0===e)throw"setMaximumSizeBytes: parameter numBytes must not be undefined";if(void 0===e.toFixed)throw"setMaximumSizeBytes: parameter numBytes must be a number";u=e,t()}function t(){function i(e,i){return e.timeStamp>i.timeStamp?-1:e.timeStamp<i.timeStamp?1:0}if(!(c<=u)){for(l.sort(i);c>u;){var t=l[l.length-1];c-=t.sizeInBytes,delete f[t.imageId],l.pop(),$(e).trigger("CornerstoneWebGLTextureRemoved",{imageId:t.imageId})}var r=e.imageCache.getCacheInfo();console.log("CornerstoneWebGLTextureCacheFull"),$(e).trigger("CornerstoneWebGLTextureCacheFull",r)}}function r(e,i){var r=e.imageId;if(void 0===e)throw"putImageTexture: image must not be undefined";if(void 0===r)throw"putImageTexture: imageId must not be undefined";if(void 0===i)throw"putImageTexture: imageTexture must not be undefined";if(f.hasOwnProperty(r)===!0)throw"putImageTexture: imageId already in cache";var n={imageId:r,imageTexture:i,timeStamp:new Date,sizeInBytes:i.sizeInBytes};if(f[r]=n,l.push(n),void 0===i.sizeInBytes)throw"putImageTexture: imageTexture does not have sizeInBytes property or";if(void 0===i.sizeInBytes.toFixed)throw"putImageTexture: imageTexture.sizeInBytes is not a number";c+=n.sizeInBytes,t()}function n(e){if(void 0===e)throw"getImageTexture: imageId must not be undefined";var i=f[e];if(void 0!==i)return i.timeStamp=new Date,i.imageTexture}function a(e){if(void 0===e)throw"removeImageTexture: imageId must not be undefined";var i=f[e];if(void 0===i)throw"removeImageTexture: imageId must not be undefined";return l.splice(l.indexOf(i),1),c-=i.sizeInBytes,delete f[e],i.imageTexture}function o(){return{maximumSizeInBytes:u,cacheSizeInBytes:c,numberOfImagesCached:l.length}}function s(){for(;l.length>0;){var e=l.pop();delete f[e.imageId]}c=0}var f={},l=[],u=268435456,c=0;e.webGL.textureCache={putImageTexture:r,getImageTexture:n,removeImageTexture:a,setMaximumSizeBytes:i,getCacheInfo:o,purgeCache:s,cachedImages:l}}(cornerstone),function(e){"use strict";e.webGL||(e.webGL={}),e.webGL.vertexShader="attribute vec2 a_position;attribute vec2 a_texCoord;uniform vec2 u_resolution;varying vec2 v_texCoord;void main() {vec2 zeroToOne = a_position / u_resolution;vec2 zeroToTwo = zeroToOne * 2.0;vec2 clipSpace = zeroToTwo - 1.0;gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);v_texCoord = a_texCoord;}"}(cornerstone);var cornerstoneMath=function(e){"use strict";return void 0===e&&(e={}),e.Vector3=function(e,i,t){this.x=e||0,this.y=i||0,this.z=t||0},e.Vector3.prototype={constructor:e.Vector3,set:function(e,i,t){return this.x=e,this.y=i,this.z=t,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,i){switch(e){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+e)}},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,i){return void 0!==i?(console.warn("DEPRECATED: Vector3's .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,i)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,i){return this.x=e.x+i.x,this.y=e.y+i.y,this.z=e.z+i.z,this},sub:function(e,i){return void 0!==i?(console.warn("DEPRECATED: Vector3's .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,i)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subVectors:function(e,i){return this.x=e.x-i.x,this.y=e.y-i.y,this.z=e.z-i.z,this},multiply:function(e,i){return void 0!==i?(console.warn("DEPRECATED: Vector3's .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,i)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,i){return this.x=e.x*i.x,this.y=e.y*i.y,this.z=e.z*i.z,this},applyAxisAngle:function(){var i;return function(t,r){return void 0===i&&(i=new e.Quaternion),this.applyQuaternion(i.setFromAxisAngle(t,r)),this}}(),applyMatrix3:function(e){var i=this.x,t=this.y,r=this.z,n=e.elements;return this.x=n[0]*i+n[3]*t+n[6]*r,this.y=n[1]*i+n[4]*t+n[7]*r,this.z=n[2]*i+n[5]*t+n[8]*r,this},applyMatrix4:function(e){var i=this.x,t=this.y,r=this.z,n=e.elements;return this.x=n[0]*i+n[4]*t+n[8]*r+n[12],this.y=n[1]*i+n[5]*t+n[9]*r+n[13],this.z=n[2]*i+n[6]*t+n[10]*r+n[14],this},applyProjection:function(e){var i=this.x,t=this.y,r=this.z,n=e.elements,a=1/(n[3]*i+n[7]*t+n[11]*r+n[15]);return this.x=(n[0]*i+n[4]*t+n[8]*r+n[12])*a,this.y=(n[1]*i+n[5]*t+n[9]*r+n[13])*a,this.z=(n[2]*i+n[6]*t+n[10]*r+n[14])*a,this},applyQuaternion:function(e){var i=this.x,t=this.y,r=this.z,n=e.x,a=e.y,o=e.z,s=e.w,f=s*i+a*rLine truncated