@ohif/ui 3.13.0-beta.103 → 3.13.0-beta.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ohif-ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/ohif-ui.umd.js
CHANGED
|
@@ -6,7 +6,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
6
6
|
`);var R5=e=>{var t,r,n,a,i,o,s,l,u,c,d,h,p,f;let{invert:m,toast:g,unstyled:y,interacting:v,setHeights:b,visibleToasts:w,heights:x,index:C,toasts:k,expanded:M,removeToast:S,defaultRichColors:E,closeButton:P,style:I,cancelButtonStyle:T,actionButtonStyle:_,className:D="",descriptionClassName:A="",duration:O,position:R,gap:N,loadingIcon:L,expandByDefault:V,classNames:F,icons:j,closeButtonAriaLabel:B="Close toast",pauseWhenPageIsHidden:W}=e,[U,z]=ee.useState(null),[H,G]=ee.useState(null),[q,$]=ee.useState(!1),[K,Y]=ee.useState(!1),[X,Z]=ee.useState(!1),[J,Q]=ee.useState(!1),[et,er]=ee.useState(!1),[en,ea]=ee.useState(0),[ei,eo]=ee.useState(0),es=ee.useRef(g.duration||O||4e3),el=ee.useRef(null),eu=ee.useRef(null),ec=0===C,ed=C+1<=w,eh=g.type,ep=!1!==g.dismissible,ef=g.className||"",em=g.descriptionClassName||"",eg=ee.useMemo(()=>x.findIndex(e=>e.toastId===g.id)||0,[x,g.id]),ey=ee.useMemo(()=>{var e;return null!=(e=g.closeButton)?e:P},[g.closeButton,P]),ev=ee.useMemo(()=>g.duration||O||4e3,[g.duration,O]),eb=ee.useRef(0),ew=ee.useRef(0),ex=ee.useRef(0),eC=ee.useRef(null),[ek,eM]=R.split("-"),eS=ee.useMemo(()=>x.reduce((e,t,r)=>r>=eg?e:e+t.height,0),[x,eg]),eE=(()=>{let[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),eP=g.invert||m,eI="loading"===eh;ew.current=ee.useMemo(()=>eg*N+eS,[eg,eS]),ee.useEffect(()=>{es.current=ev},[ev]),ee.useEffect(()=>{$(!0)},[]),ee.useEffect(()=>{let e=eu.current;if(e){let t=e.getBoundingClientRect().height;return eo(t),b(e=>[{toastId:g.id,height:t,position:g.position},...e]),()=>b(e=>e.filter(e=>e.toastId!==g.id))}},[b,g.id]),ee.useLayoutEffect(()=>{if(!q)return;let e=eu.current,t=e.style.height;e.style.height="auto";let r=e.getBoundingClientRect().height;e.style.height=t,eo(r),b(e=>e.find(e=>e.toastId===g.id)?e.map(e=>e.toastId===g.id?{...e,height:r}:e):[{toastId:g.id,height:r,position:g.position},...e])},[q,g.title,g.description,b,g.id]);let eT=ee.useCallback(()=>{Y(!0),ea(ew.current),b(e=>e.filter(e=>e.toastId!==g.id)),setTimeout(()=>{S(g)},200)},[g,S,b,ew]);return ee.useEffect(()=>{let e;if((!g.promise||"loading"!==eh)&&g.duration!==1/0&&"loading"!==g.type)return M||v||W&&eE?(()=>{if(ex.current<eb.current){let e=new Date().getTime()-eb.current;es.current=es.current-e}ex.current=new Date().getTime()})():es.current!==1/0&&(eb.current=new Date().getTime(),e=setTimeout(()=>{var e;null==(e=g.onAutoClose)||e.call(g,g),eT()},es.current)),()=>clearTimeout(e)},[M,v,g,eh,W,eE,eT]),ee.useEffect(()=>{g.delete&&eT()},[eT,g.delete]),ee.createElement("li",{tabIndex:0,ref:eu,className:R2(D,ef,null==F?void 0:F.toast,null==(t=null==g?void 0:g.classNames)?void 0:t.toast,null==F?void 0:F.default,null==F?void 0:F[eh],null==(r=null==g?void 0:g.classNames)?void 0:r[eh]),"data-sonner-toast":"","data-rich-colors":null!=(n=g.richColors)?n:E,"data-styled":!(g.jsx||g.unstyled||y),"data-mounted":q,"data-promise":!!g.promise,"data-swiped":et,"data-removed":K,"data-visible":ed,"data-y-position":ek,"data-x-position":eM,"data-index":C,"data-front":ec,"data-swiping":X,"data-dismissible":ep,"data-type":eh,"data-invert":eP,"data-swipe-out":J,"data-swipe-direction":H,"data-expanded":!!(M||V&&q),style:{"--index":C,"--toasts-before":C,"--z-index":k.length-C,"--offset":`${K?en:ew.current}px`,"--initial-height":V?"auto":`${ei}px`,...I,...g.style},onDragEnd:()=>{Z(!1),z(null),eC.current=null},onPointerDown:e=>{eI||!ep||(el.current=new Date,ea(ew.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(Z(!0),eC.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,r,n;if(J||!ep)return;eC.current=null;let a=Number((null==(e=eu.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),i=Number((null==(t=eu.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),o=new Date().getTime()-(null==(r=el.current)?void 0:r.getTime()),s="x"===U?a:i,l=Math.abs(s)/o;if(Math.abs(s)>=20||l>.11){ea(ew.current),null==(n=g.onDismiss)||n.call(g,g),G("x"===U?a>0?"right":"left":i>0?"down":"up"),eT(),Q(!0),er(!1);return}Z(!1),z(null)},onPointerMove:t=>{var r,n,a,i;if(!eC.current||!ep||(null==(r=window.getSelection())?void 0:r.toString().length)>0)return;let o=t.clientY-eC.current.y,s=t.clientX-eC.current.x,l=null!=(n=e.swipeDirections)?n:function(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}(R);!U&&(Math.abs(s)>1||Math.abs(o)>1)&&z(Math.abs(s)>Math.abs(o)?"x":"y");let u={x:0,y:0};"y"===U?(l.includes("top")||l.includes("bottom"))&&(l.includes("top")&&o<0||l.includes("bottom")&&o>0)&&(u.y=o):"x"===U&&(l.includes("left")||l.includes("right"))&&(l.includes("left")&&s<0||l.includes("right")&&s>0)&&(u.x=s),(Math.abs(u.x)>0||Math.abs(u.y)>0)&&er(!0),null==(a=eu.current)||a.style.setProperty("--swipe-amount-x",`${u.x}px`),null==(i=eu.current)||i.style.setProperty("--swipe-amount-y",`${u.y}px`)}},ey&&!g.jsx?ee.createElement("button",{"aria-label":B,"data-disabled":eI,"data-close-button":!0,onClick:eI||!ep?()=>{}:()=>{var e;eT(),null==(e=g.onDismiss)||e.call(g,g)},className:R2(null==F?void 0:F.closeButton,null==(a=null==g?void 0:g.classNames)?void 0:a.closeButton)},null!=(i=null==j?void 0:j.close)?i:RZ):null,g.jsx||(0,ee.isValidElement)(g.title)?g.jsx?g.jsx:"function"==typeof g.title?g.title():g.title:ee.createElement(ee.Fragment,null,eh||g.icon||g.promise?ee.createElement("div",{"data-icon":"",className:R2(null==F?void 0:F.icon,null==(o=null==g?void 0:g.classNames)?void 0:o.icon)},g.promise||"loading"===g.type&&!g.icon?g.icon||(null!=j&&j.loading?ee.createElement("div",{className:R2(null==F?void 0:F.loader,null==(h=null==g?void 0:g.classNames)?void 0:h.loader,"sonner-loader"),"data-visible":"loading"===eh},j.loading):L?ee.createElement("div",{className:R2(null==F?void 0:F.loader,null==(p=null==g?void 0:g.classNames)?void 0:p.loader,"sonner-loader"),"data-visible":"loading"===eh},L):ee.createElement(Rq,{className:R2(null==F?void 0:F.loader,null==(f=null==g?void 0:g.classNames)?void 0:f.loader),visible:"loading"===eh})):null,"loading"!==g.type?g.icon||(null==j?void 0:j[eh])||(e=>{switch(e){case"success":return R$;case"info":return RY;case"warning":return RK;case"error":return RX;default:return null}})(eh):null):null,ee.createElement("div",{"data-content":"",className:R2(null==F?void 0:F.content,null==(s=null==g?void 0:g.classNames)?void 0:s.content)},ee.createElement("div",{"data-title":"",className:R2(null==F?void 0:F.title,null==(l=null==g?void 0:g.classNames)?void 0:l.title)},"function"==typeof g.title?g.title():g.title),g.description?ee.createElement("div",{"data-description":"",className:R2(A,em,null==F?void 0:F.description,null==(u=null==g?void 0:g.classNames)?void 0:u.description)},"function"==typeof g.description?g.description():g.description):null),(0,ee.isValidElement)(g.cancel)?g.cancel:g.cancel&&R0(g.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||T,onClick:e=>{var t,r;R0(g.cancel)&&ep&&(null==(r=(t=g.cancel).onClick)||r.call(t,e),eT())},className:R2(null==F?void 0:F.cancelButton,null==(c=null==g?void 0:g.classNames)?void 0:c.cancelButton)},g.cancel.label):null,(0,ee.isValidElement)(g.action)?g.action:g.action&&R0(g.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||_,onClick:e=>{var t,r;R0(g.action)&&(null==(r=(t=g.action).onClick)||r.call(t,e),e.defaultPrevented||eT())},className:R2(null==F?void 0:F.actionButton,null==(d=null==g?void 0:g.classNames)?void 0:d.actionButton)},g.action.label):null))};function R3(){if("u"<typeof window||"u"<typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}(0,ee.forwardRef)(function(e,t){let{invert:r,position:n="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:o,className:s,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:h,style:p,visibleToasts:f=3,toastOptions:m,dir:g=R3(),gap:y=14,loadingIcon:v,icons:b,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:x}=e,[C,k]=ee.useState([]),M=ee.useMemo(()=>Array.from(new Set([n].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,n]),[S,E]=ee.useState([]),[P,I]=ee.useState(!1),[T,_]=ee.useState(!1),[D,A]=ee.useState("system"!==c?c:"u">typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),O=ee.useRef(null),R=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=ee.useRef(null),L=ee.useRef(!1),V=ee.useCallback(e=>{k(t=>{var r;return null!=(r=t.find(t=>t.id===e.id))&&r.delete||RQ.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return ee.useEffect(()=>RQ.subscribe(e=>{e.dismiss?k(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t)):setTimeout(()=>{rm.flushSync(()=>{k(t=>{let r=t.findIndex(t=>t.id===e.id);return -1!==r?[...t.slice(0,r),{...t[r],...e},...t.slice(r+1)]:[e,...t]})})})}),[]),ee.useEffect(()=>{if("system"!==c)return void A(c);if("system"===c&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?A("dark"):A("light")),"u"<typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{A(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{A(e?"dark":"light")}catch(e){console.error(e)}})}},[c]),ee.useEffect(()=>{C.length<=1&&I(!1)},[C]),ee.useEffect(()=>{let e=e=>{var t,r;a.every(t=>e[t]||e.code===t)&&(I(!0),null==(t=O.current)||t.focus()),"Escape"===e.code&&(document.activeElement===O.current||null!=(r=O.current)&&r.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),ee.useEffect(()=>{if(O.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,L.current=!1)}},[O.current]),ee.createElement("section",{ref:t,"aria-label":`${w} ${R}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((t,n)=>{var a;let c,[w,k]=t.split("-");return C.length?ee.createElement("ol",{key:t,dir:"auto"===g?R3():g,tabIndex:-1,ref:O,className:s,"data-sonner-toaster":!0,"data-theme":D,"data-y-position":w,"data-lifted":P&&C.length>1&&!i,"data-x-position":k,style:{"--front-toast-height":`${(null==(a=S[0])?void 0:a.height)||0}px`,"--width":"356px","--gap":`${y}px`,...p,...(c={},[l,u].forEach((e,t)=>{let r=1===t,n=r?"--mobile-offset":"--offset",a=r?"16px":"32px";function i(e){["top","right","bottom","left"].forEach(t=>{c[`${n}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?c[`${n}-${t}`]=a:c[`${n}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(a)}),c)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||L.current||(L.current=!0,N.current=e.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{T||I(!1)},onDragEnd:()=>I(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||_(!0)},onPointerUp:()=>_(!1)},C.filter(e=>!e.position&&0===n||e.position===t).map((n,a)=>{var s,l;return ee.createElement(R5,{key:n.id,icons:b,index:a,toast:n,defaultRichColors:d,duration:null!=(s=null==m?void 0:m.duration)?s:h,className:null==m?void 0:m.className,descriptionClassName:null==m?void 0:m.descriptionClassName,invert:r,visibleToasts:f,closeButton:null!=(l=null==m?void 0:m.closeButton)?l:o,interacting:T,position:t,style:null==m?void 0:m.style,unstyled:null==m?void 0:m.unstyled,classNames:null==m?void 0:m.classNames,cancelButtonStyle:null==m?void 0:m.cancelButtonStyle,actionButtonStyle:null==m?void 0:m.actionButtonStyle,removeToast:V,toasts:C.filter(e=>e.position==n.position),heights:S.filter(e=>e.position==n.position),setHeights:E,expandByDefault:i,gap:y,loadingIcon:v,expanded:P,pauseWhenPageIsHidden:x,swipeDirections:e.swipeDirections})})):null}))});ee.Component,Y().node.isRequired,Y().object,Y().number;var R4=u(2816);let R8={COMMANDS:"commandsModule",CUSTOMIZATION:"customizationModule",STATE_SYNC:"stateSyncModule",DATA_SOURCE:"dataSourcesModule",PANEL:"panelModule",SOP_CLASS_HANDLER:"sopClassHandlerModule",TOOLBAR:"toolbarModule",VIEWPORT:"viewportModule",CONTEXT:"contextModule",LAYOUT_TEMPLATE:"layoutTemplateModule",HANGING_PROTOCOL:"hangingProtocolModule",UTILITY:"utilityModule"},R6={error:console.error,warn:console.warn,info:console.log,trace:console.trace,debug:console.debug,time:e=>{R6.timingKeys[e]=!0,console.time(e)},timeEnd:e=>{R6.timingKeys[e]&&(R6.timingKeys[e]=!1,console.timeEnd(e))},timingKeys:{scriptToView:!0}},R9=()=>{let e=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},R7=function(e,t,r){var n;let a=function(){var a=this,i=arguments,o=r&&!n;clearTimeout(n),n=setTimeout(function(){n=null,r||e.apply(a,i)},t),o&&e.apply(a,i)};return a.clearDebounceTimeout=()=>{clearTimeout(n),n=null},a},Ne={subscribe:Nt,_broadcastEvent:Na,_unsubscribe:Nr,_isValidEvent:Nn};function Nt(e,t){if(this._isValidEvent(e)){let r=R9(),n={id:r,callback:t};return Array.isArray(this.listeners[e])?this.listeners[e].push(n):this.listeners[e]=[n],{unsubscribe:()=>this._unsubscribe(e,r)}}throw Error(`Event ${e} not supported.`)}function Nr(e,t){if(!this.listeners[e])return;let r=this.listeners[e];Array.isArray(r)?this.listeners[e]=r.filter(({id:e,callback:r})=>(r?.clearDebounceTimeout?.(),e!==t)):this.listeners[e]=void 0}function Nn(e){return Object.values(this.EVENTS).includes(e)}function Na(e,t){let r=Object.keys(this.listeners).length>0,n=Array.isArray(this.listeners[e]),a=new CustomEvent(e,{detail:t});document.body.dispatchEvent(a),r&&n&&this.listeners[e].forEach(e=>{e.callback(t)})}class Ni{constructor(e){this.EVENTS=void 0,this.subscribe=void 0,this._broadcastEvent=void 0,this._unsubscribe=void 0,this._isValidEvent=void 0,this.listeners=void 0,this.unsubscriptions=void 0,this.EVENTS=e,this.subscribe=Nt,this._broadcastEvent=Na,this._unsubscribe=Nr,this._isValidEvent=Nn,this.listeners={},this.unsubscriptions=[]}subscribeDebounced(e,t,r=300,n=!1){if(this._isValidEvent(e)){let a=R7(t,r,n);return this.subscribe(e,a)}throw Error(`Event ${e} not supported.`)}reset(){this.unsubscriptions.forEach(e=>e()),this.unsubscriptions=[],Object.keys(this.listeners).forEach(e=>this.listeners[e].forEach(({callback:e})=>{e?.clearDebounceTimeout?.()})),this.listeners={}}createConsumableEvent(e){return{...e,isConsumed:!1,consume:function(){this.isConsumed=!0}}}}var No=u(2111),Ns=u.n(No);let Nl=function(e){let t=[],r=new Map;return{SeriesInstanceUID:e,instances:t,addInstance:function(e){this.addInstances([e])},addInstances:function(e){for(let n=0,a=e.length;n<a;n++){let a=e[n];r.has(a.SOPInstanceUID)||(r.set(a.SOPInstanceUID,a),t.push(a))}},getInstance:function(e){return r.get(e)}}},Nu=function(e){return{StudyInstanceUID:e,StudyDescription:"",ModalitiesInStudy:[],isLoaded:!1,series:[],addInstanceToSeries:function(e){this.addInstancesToSeries([e])},addInstancesToSeries:function(e){let{SeriesInstanceUID:t}=e[0];this.StudyDescription||(this.StudyDescription=e[0].StudyDescription);let r=this.series.find(e=>e.SeriesInstanceUID===t);r||(r=Nl(t),this.series.push(r)),r.addInstances(e)},setSeriesMetadata:function(e,t){let r=this.series.find(t=>t.SeriesInstanceUID===e);if(r)r=Object.assign(r,t);else{let r=Nl(e);this.series.push(Object.assign(r,t))}}}},Nc=["ImagePositionPatient","ImageOrientationPatient","PixelSpacing"],Nd=Symbol("isMetadataProxy"),Nh=function(e){if(!e||e[Nd])return e;for(let t of Nc)t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:()=>e._parentInstance?.[t]??e._parentInstance?._shared?.[t],set:r=>{Object.defineProperty(e,t,{writable:!0,enumerable:!0,value:r})}});return Object.defineProperty(e,Nd,{value:!0}),e},Np={STUDY_ADDED:"event::dicomMetadataStore:studyAdded",INSTANCES_ADDED:"event::dicomMetadataStore:instancesAdded",SERIES_ADDED:"event::dicomMetadataStore:seriesAdded",SERIES_UPDATED:"event::dicomMetadataStore:seriesUpdated"},Nf=[];function Nm(e){return Nf.find(t=>t.StudyInstanceUID===e)}function Ng(e,t){if(!e)return Nf.map(e=>e.series).flat().find(e=>e.SeriesInstanceUID===t);let r=Nm(e);if(r)return r.series.find(e=>e.SeriesInstanceUID===t)}function Ny(e,t,r){let n=Ng(e,t);if(n)return n.getInstance(r)}let Nv=Object.assign({},{EVENTS:Np,listeners:{},addInstance(e){let t,r,{StudyInstanceUID:n,NumberOfFrames:a}=r=void 0===(t=e instanceof ArrayBuffer?Ns().data.DicomMessage.readFile(e).dict:e).SeriesInstanceUID?Ns().data.DicomMetaDictionary.naturalizeDataset(t):t,i=Nf.find(e=>e.StudyInstanceUID===n);i||(Nf.push(Nu(n)),i=Nf[Nf.length-1]),r=a>1?Nh(r):r,i.addInstanceToSeries(r)},addInstances(e,t=!1){let{StudyInstanceUID:r,SeriesInstanceUID:n,NumberOfFrames:a}=e[0];a>1&&(e=e.map(e=>Nh(e)));let i=Nf.find(e=>e.StudyInstanceUID===r);i||(Nf.push(Nu(r)),i=Nf[Nf.length-1]),i.addInstancesToSeries(e),this._broadcastEvent(Np.INSTANCES_ADDED,{StudyInstanceUID:r,SeriesInstanceUID:n,madeInClient:t})},updateSeriesMetadata(e){let{StudyInstanceUID:t,SeriesInstanceUID:r}=e;if(!Ng(t,r))return;let n=Nm(t);n&&n.setSeriesMetadata(r,e)},addSeriesMetadata(e,t=!1){if(!e||!e.length||!e[0])return;let{StudyInstanceUID:r}=e[0],n=Nm(r);n||((n=Nu(r)).StudyDescription=e[0].StudyDescription,e.forEach(e=>{-1===n.ModalitiesInStudy.indexOf(e.Modality)&&n.ModalitiesInStudy.push(e.Modality)}),n.NumberOfStudyRelatedSeries=e.length,Nf.push(n)),e.forEach(e=>{let{SeriesInstanceUID:t}=e;n.setSeriesMetadata(t,e)}),this._broadcastEvent(Np.SERIES_ADDED,{StudyInstanceUID:r,seriesSummaryMetadata:e,madeInClient:t})},addStudy(e){let{StudyInstanceUID:t}=e;if(!Nf.find(e=>e.StudyInstanceUID===t)){let r=Nu(t);r.PatientID=e.PatientID,r.PatientName=e.PatientName,r.StudyDate=e.StudyDate,r.ModalitiesInStudy=e.ModalitiesInStudy,r.StudyDescription=e.StudyDescription,r.AccessionNumber=e.AccessionNumber,r.NumInstances=e.NumInstances,Nf.push(r)}},getStudyInstanceUIDs:function(){return Nf.map(e=>e.StudyInstanceUID)},getStudy:Nm,getSeries:Ng,getInstance:Ny,getInstanceByImageId:function(e){let t=n?.get("frameModule",e);if(t){let{studyInstanceUID:e,seriesInstanceUID:r,sopInstanceUID:n}=t;return Ny(e,r,n)}for(let t of(console.warn("No metadata result found for",e,"looking through instances"),Nf))for(let r of t.series)for(let t of r.instances)if(t.imageId===e)return t},updateMetadataForSeries:function(e,t,r){let n=Nm(e);if(!n)return;let{instances:a}=n.series.find(e=>e.SeriesInstanceUID===t);a.forEach(e=>{Object.keys(r).forEach(t=>{"object"==typeof r[t]?e[t]={...e[t],...r[t]}:e[t]=r[t]})}),this._broadcastEvent(Np.SERIES_UPDATED,{SeriesInstanceUID:t,StudyInstanceUID:e,madeInClient:!0})},setMetaDataProvider:function(e){n=e}},Ne),Nb=["uid","color","data","getReport","displayText","SOPInstanceUID","FrameOfReferenceUID","referenceStudyUID","referenceSeriesUID","frameNumber","displaySetInstanceUID","label","isLocked","isVisible","description","type","unit","points","source","toolName","metadata","area","mean","stdDev","perimeter","length","shortestDiameter","longestDiameter","cachedStats","isSelected","textBox","referencedImageId","isDirty"],Nw={MEASUREMENT_UPDATED:"event::measurement_updated",INTERNAL_MEASUREMENT_UPDATED:"event:internal_measurement_updated",MEASUREMENT_ADDED:"event::measurement_added",RAW_MEASUREMENT_ADDED:"event::raw_measurement_added",MEASUREMENT_REMOVED:"event::measurement_removed",MEASUREMENTS_CLEARED:"event::measurements_cleared",JUMP_TO_MEASUREMENT:"event:jump_to_measurement"},Nx={ANGLE:"value_type::polyline",POLYLINE:"value_type::polyline",POINT:"value_type::point",BIDIRECTIONAL:"value_type::shortAxisLongAxis",ELLIPSE:"value_type::ellipse",RECTANGLE:"value_type::rectangle",MULTIPOINT:"value_type::multipoint",CIRCLE:"value_type::circle",ROI_THRESHOLD:"value_type::roiThreshold",ROI_THRESHOLD_MANUAL:"value_type::roiThresholdManual"};var NC=((efU=NC||{}).HandlesUpdated="HandlesUpdated",efU.LabelChange="LabelChange",efU);let Nk=new Set;class NM extends Ni{constructor(){super(Nw),this.VALUE_TYPES=Nx,this.measurements=new Map,this.isMeasurementDeletedIndividually=void 0,this.sources={},this.mappings={},this._arrayOfObjects=e=>Object.entries(e).map(e=>({[e[0]]:e[1]})),this.setIsMeasurementDeletedIndividually=e=>{this.isMeasurementDeletedIndividually=e},this.getIsMeasurementDeletedIndividually=()=>this.isMeasurementDeletedIndividually}addMeasurementSchemaKeys(e){Array.isArray(e)||(e=[e]),Nb.push(...e)}addValueType(e){if(!Nx[e]){if(!e||"object"!=typeof e)return void console.warn(`MeasurementService: addValueType: invalid valueType: ${e}`);Object.keys(e).forEach(t=>{Nx[t]||(Nx[t]=e[t])})}}getMeasurements(e){let t=[...this.measurements.values()];return e?t.filter(t=>e.call(this,t)):t}getMeasurement(e){return this.measurements.get(e)}setMeasurementSelected(e,t){let r=this.getMeasurement(e);r&&(r.isSelected=t,this._broadcastEvent(this.EVENTS.MEASUREMENT_UPDATED,{source:r.source,measurement:r,notYetUpdatedAtSource:!1}))}createSource(e,t){if(!e)throw Error("Source name not provided.");if(!t)throw Error("Source version not provided.");let r=Object.keys(this.sources);for(let n=0;n<r.length;n++){let a=this.sources[r[n]];if(a.name===e&&a.version===t)return a}let n=R9(),a={uid:n,name:e,version:t};return a.annotationToMeasurement=(e,t,r=!1)=>this.annotationToMeasurement(a,e,t,r),a.remove=(e,t)=>this.remove(e,a,t),a.getAnnotation=(e,t)=>this.getAnnotation(a,e,t),R6.info(`New '${e}@${t}' source added.`),this.sources[n]=a,a}getSource(e,t){let{sources:r}=this;return r[this._getSourceUID(e,t)]}getSourceMappings(e,t){let{mappings:r}=this;return r[this._getSourceUID(e,t)]}addMapping(e,t,r,n,a){if(!this._isValidSource(e))throw Error("Invalid source.");if(!r)throw Error("Matching criteria not provided.");if(!t)throw Error("annotationType not provided.");if(!n)throw Error("Mapping function to source schema not provided.");if(!a)throw Error("Measurement mapping function not provided.");let i={matchingCriteria:r,annotationType:t,toAnnotationSchema:n,toMeasurementSchema:a};Array.isArray(this.mappings[e.uid])?this.mappings[e.uid].push(i):this.mappings[e.uid]=[i]}getAnnotation(e,t,r){if(!this._isValidSource(e))return void R6.warn("Invalid source. Exiting early.");if(!t)return void R6.warn("No source annotationType provided. Exiting early.");let n=this.getMeasurement(r),a=this._getMappingByMeasurementSource(n,t);if(a)return a.toAnnotationSchema(n,t);let i=this._getMatchingMapping(e,t,n);if(i){R6.info("Matching mapping found:",i);let{toAnnotationSchema:e,annotationType:t}=i;return e(n,t)}}update(e,t,r=!1){if(!this.measurements.has(e))return;let n={...t,modifiedTimestamp:Math.floor(Date.now()/1e3)};return R6.info("Updating internal measurement representation...",n),this.measurements.set(e,n),this._broadcastEvent(this.EVENTS.MEASUREMENT_UPDATED,{source:t.source,measurement:n,notYetUpdatedAtSource:r}),n.uid}addRawMeasurement(e,t,r,n,a={}){if(!this._isValidSource(e))return void R6.warn("Invalid source. Exiting early.");let i=this._getSourceToString(e);if(!t)return void R6.warn("No source annotationType provided. Exiting early.");if(!this._sourceHasMappings(e))return void R6.warn(`No measurement mappings found for '${i}' source. Exiting early.`);let o={};try{if(!(o=n(r)))return;o.source=e}catch(e){R6.warn(`Failed to map '${i}' measurement for annotationType ${t}:`,e);return}if(!this._isValidMeasurement(o))return void R6.warn(`Attempting to add or update a invalid measurement provided by '${i}'. Exiting early.`);let s=r.uid||R9(),{annotation:{predecessorImageId:l,data:u}}=r,c={finding:u.finding,predecessorImageId:l,findingSites:u.findingSites,site:u.findingSites?.[0],...o,modifiedTimestamp:Math.floor(Date.now()/1e3),uid:s};return this.measurements.get(s)?(this.measurements.set(s,c),this._broadcastEvent(this.EVENTS.MEASUREMENT_UPDATED,{source:e,measurement:c})):(R6.info("Measurement added",c),this.measurements.set(s,c),this._broadcastEvent(this.EVENTS.RAW_MEASUREMENT_ADDED,{source:e,measurement:c,data:r,dataSource:a})),c.uid}annotationToMeasurement(e,t,r,n=!1){if(!this._isValidSource(e))throw Error("Invalid source.");if(!t)throw Error("No source annotationType provided.");let a=this._getSourceToString(e);if(!this._sourceHasMappings(e))throw Error(`No measurement mappings found for '${a}' source. Exiting early.`);let i={};try{let n=this.mappings[e.uid].find(e=>e.annotationType===t);if(!n){Nk.has(e.uid)||(console.log("No source mapping",e.uid,t,e),Nk.add(e.uid)),this.addUnmappedMeasurement(r,e);return}let{toMeasurementSchema:a}=n;if(!(i=a(r)))return;i.source=e}catch(n){throw this.addUnmappedMeasurement(r,e),console.log("Failed to map",n),Error(`Failed to map '${a}' measurement for annotationType ${t}: ${n.message}`)}if(!this._isValidMeasurement(i))throw Error(`Attempting to add or update a invalid measurement provided by '${a}'. Exiting early.`);let o=r.uid;o||(o=R9(),R6.info(`Annotation does not have UID, Generating UID for the created Measurement: ${o}`));let s=this.measurements.get(o),l={...s,...i,modifiedTimestamp:Math.floor(Date.now()/1e3),uid:o};return l.isDirty=r.changeType===NC.HandlesUpdated||r.changeType===NC.LabelChange||s?.isDirty,s?(this.measurements.set(o,l),n?this._broadcastEvent(this.EVENTS.MEASUREMENT_UPDATED,{source:e,measurement:l,notYetUpdatedAtSource:!1}):(R6.info("Measurement added.",l),this._broadcastEvent(this.EVENTS.MEASUREMENT_ADDED,{source:e,measurement:l}))):(R6.info("Measurement started.",l),this.measurements.set(o,l)),l.uid}findAttributeRecursively(e,t){if(e&&"object"==typeof e){if(e[t])return e[t];for(let r in e)if(e.hasOwnProperty(r)){let n=this.findAttributeRecursively(e[r],t);if(n)return n}}}addUnmappedMeasurement(e,t){if(e.annotation?.invalidated===!0)return void console.log("Measurement is invalidated, skipping...",e);if(e.annotation?.isPreview===!0)return void console.log("Measurement is preview, skipping...",e);let r=this.findAttributeRecursively(e,"metadata"),n=this.findAttributeRecursively(e,"label"),a=this.findAttributeRecursively(e,"referencedImageId"),i=this.findAttributeRecursively(e,"displaySetInstanceUID"),o={...e,isUnmapped:!0,statusTooltip:"This measurement is not compatible with this application",source:{name:t.name,version:t.version,uid:t.uid}};if(r&&(o.metadata=r),n&&(o.label=n),a){o.referencedImageId=a;let e=Nv.getInstanceByImageId(a);e?(o.referenceStudyUID=e.StudyInstanceUID,o.referenceSeriesUID=e.SeriesInstanceUID):console.warn("Didn't find instance for",a)}i&&(o.displaySetInstanceUID=i),this.measurements.set(e.uid,o)}remove(e){let t=this.measurements.get(e);if(!e||!t)return void console.debug("No uid provided, or unable to find measurement by uid.");let r=t.source;this.measurements.delete(e),this.isMeasurementDeletedIndividually=!0,this._broadcastEvent(this.EVENTS.MEASUREMENT_REMOVED,{source:r,measurement:e})}removeMany(e){let t=[];for(let r of e){let e=this.measurements.get(r);if(!r||!e){console.debug("No uid provided, or unable to find measurement by uid.");continue}this.measurements.delete(r),t.push(e)}t.length&&this._broadcastEvent(this.EVENTS.MEASUREMENTS_CLEARED,{measurements:t})}clearMeasurements(e,t){let r=this.getMeasurements(e),n=[...r];r.forEach(e=>this.measurements.delete(e.uid)),this._broadcastEvent(this.EVENTS.MEASUREMENTS_CLEARED,{measurements:n,...t})}onModeExit(){this.clearMeasurements()}jumpToMeasurement(e,t){let r=this.measurements.get(t);r?this._broadcastEvent(Nw.JUMP_TO_MEASUREMENT,{viewportId:e,measurement:r}):R6.warn("No measurement uid, or unable to find by uid.")}_getSourceUID(e,t){let{sources:r}=this;return Object.keys(r).find(n=>{let a=r[n];return a.name===e&&a.version===t})}_getMappingByMeasurementSource(e,t){if(this._isValidSource(e.source))return this.mappings[e.source.uid].find(e=>e.annotationType===t)}_getMatchingMapping(e,t,r){return this.mappings[e.uid].filter(e=>e.annotationType===t).find(({matchingCriteria:e})=>r.points&&r.points.length===e.points)}_getSourceToString(e){return`${e.name}@${e.version}`}_isValidSource(e){return e&&this.sources[e.uid]}_sourceHasMappings(e){return Array.isArray(this.mappings[e.uid])&&this.mappings[e.uid].length}_isValidMeasurement(e){return Object.keys(e).every(e=>!!Nb.includes(e)||(R6.warn(`Invalid measurement key: ${e}`),!1))}toggleLockMeasurement(e){let t=this.measurements.get(e);t?(t.isLocked=!t.isLocked,this._broadcastEvent(this.EVENTS.MEASUREMENT_UPDATED,{source:t.source,measurement:t,notYetUpdatedAtSource:!0})):console.debug(`No measurement found for uid: ${e}`)}toggleVisibilityMeasurement(e,t){let r=this.measurements.get(e);r?(r.isVisible!==t||void 0===t)&&(r.isVisible=void 0!==t?t:!r.isVisible,this._broadcastEvent(this.EVENTS.MEASUREMENT_UPDATED,{source:r.source,measurement:r,notYetUpdatedAtSource:!0})):console.debug(`No measurement found for uid: ${e}`)}toggleVisibilityMeasurementMany(e,t){return e.forEach(e=>this.toggleVisibilityMeasurement(e,t))}updateColorMeasurement(e,t){let r=this.measurements.get(e);r?(r.color=t,this._broadcastEvent(this.EVENTS.MEASUREMENT_UPDATED,{source:r.source,measurement:r,notYetUpdatedAtSource:!0})):console.debug(`No measurement found for uid: ${e}`)}}NM.REGISTRATION={name:"measurementService",altName:"MeasurementService",create:e=>new NM},NM.EVENTS=Nw,NM.VALUE_TYPES=Nx;let NS="uiDialogService",NE={_show:e=>(console.warn("show() NOT IMPLEMENTED"),""),_hide:e=>console.warn("hide() NOT IMPLEMENTED"),_hideAll:()=>console.warn("hideAll() NOT IMPLEMENTED"),_isEmpty:()=>(console.warn("isEmpty() NOT IMPLEMENTED"),!0),_updatePosition:(e,t)=>console.warn("updatePosition() NOT IMPLEMENTED"),_customComponent:null};class NP{constructor(){this.name=NS}show(e){return NE._show(e)}hide(e){return NE._hide(e)}hideAll(){return NE._hideAll()}isEmpty(){return NE._isEmpty()}updatePosition(e,t){return NE._updatePosition(e,t)}getCustomComponent(){return NE._customComponent}setServiceImplementation({show:e,hide:t,hideAll:r,isEmpty:n,updatePosition:a,customComponent:i}){e&&(NE._show=e),t&&(NE._hide=t),r&&(NE._hideAll=r),n&&(NE._isEmpty=n),a&&(NE._updatePosition=a),i&&(NE._customComponent=i)}}NP.REGISTRATION={name:NS,altName:"UIDialogService",create:()=>new NP};let NI="uiModalService",NT={_hide:()=>console.warn("hide() NOT IMPLEMENTED"),_show:()=>console.warn("show() NOT IMPLEMENTED"),_customComponent:null};class N_{constructor(){this.name=NI}show({content:e=null,contentProps:t=null,title:r=null,className:n=null,shouldCloseOnEsc:a=!0,shouldCloseOnOverlayClick:i=!0,containerClassName:o=null}){return NT._show({content:e,contentProps:t,shouldCloseOnEsc:a,title:r,className:n,shouldCloseOnOverlayClick:i,containerClassName:o})}hide(){return NT._hide()}getCustomComponent(){return NT._customComponent}setServiceImplementation({hide:e,show:t,customComponent:r}){e&&(NT._hide=e),t&&(NT._show=t),r&&(NT._customComponent=r)}}N_.REGISTRATION={name:NI,altName:"UIModalService",create:()=>new N_};let ND={_hide:()=>console.debug("hide() NOT IMPLEMENTED"),_show:e=>(console.debug("show() NOT IMPLEMENTED"),null),_customComponent:null};class NA{getCustomComponent(){return ND._customComponent}setServiceImplementation({hide:e,show:t,customComponent:r}){e&&(ND._hide=e),t&&(ND._show=t),r&&(ND._customComponent=r)}hide(e){return ND._hide(e)}show({title:e,message:t,duration:r=2e3,position:n="bottom-right",type:a="info",autoClose:i=!0,promise:o,promiseMessages:s,id:l,allowDuplicates:u=!1,deduplicationInterval:c=3e4,action:d}){if(o&&s){let t=ND._show({title:e,message:s.loading||"Loading...",type:"loading",autoClose:!1,position:n,id:l?`${l}-loading`:void 0,allowDuplicates:u,deduplicationInterval:c});return o.then(a=>{let o="function"==typeof s.success?s.success(a):s.success||"Success";ND._show({title:e,message:o,type:"success",duration:r,position:n,autoClose:i,id:l?`${l}-success`:void 0,allowDuplicates:u,deduplicationInterval:c,action:d}),this.hide(t)},a=>{let o="function"==typeof s.error?s.error(a):s.error||"Error";ND._show({title:e,message:o,type:"error",duration:r,position:n,autoClose:i,id:l?`${l}-error`:void 0,allowDuplicates:u,deduplicationInterval:c,action:d}),this.hide(t)}),t}return ND._show({title:e,message:t,duration:r,position:n,type:a,autoClose:i,id:l,allowDuplicates:u,deduplicationInterval:c,action:d})}}NA.REGISTRATION={name:"uiNotificationService",altName:"UINotificationService",create:()=>new NA};class NO extends Ni{constructor(){super(NO.EVENTS),this.serviceImplementation={_hide:()=>console.warn("hide() NOT IMPLEMENTED"),_show:()=>console.warn("show() NOT IMPLEMENTED")},this.serviceImplementation={...this.serviceImplementation}}show({viewportId:e,id:t,type:r,message:n,actions:a,onSubmit:i,onOutsideClick:o,onKeyPress:s}){return this.serviceImplementation._show({viewportId:e,id:t,type:r,message:n,actions:a,onSubmit:i,onOutsideClick:o,onKeyPress:s})}hide(){return this.serviceImplementation._hide()}setServiceImplementation({hide:e,show:t}){e&&(this.serviceImplementation._hide=e),t&&(this.serviceImplementation._show=t)}}NO.EVENTS={},NO.REGISTRATION={name:"uiViewportDialogService",altName:"UIViewportDialogService",create:({configuration:e={}})=>new NO};let NR={DISPLAY_SETS_ADDED:"event::displaySetService:displaySetsAdded",DISPLAY_SETS_CHANGED:"event::displaySetService:displaySetsChanged",DISPLAY_SETS_REMOVED:"event::displaySetService:displaySetsRemoved",DISPLAY_SET_SERIES_METADATA_INVALIDATED:"event::displaySetService:displaySetSeriesMetadataInvalidated"},NN=new Map,NL=(e,t)=>{let r=new Set;return t.forEach(e=>{let t=e.instances;t?t.forEach(e=>r.add(e.SOPInstanceUID)):console.warn("No instances in",e)}),e.filter(e=>!r.has(e.SOPInstanceUID))};class NV extends Ni{constructor(){super(NR),this.activeDisplaySets=[],this.unsupportedSOPClassHandler=void 0,this.extensionManager=void 0,this.activeDisplaySetsMap=new Map,this.activeDisplaySetsChanged=!1,this.getDisplaySetsForSeries=e=>[...NN.values()].filter(t=>t.SeriesInstanceUID===e),this.getDisplaySetsForReferences=e=>{let t=new Map;for(let r of Array.isArray(e)?e:[e]){let{SeriesInstanceUID:e,ReferencedInstanceSequence:n}=r;t.has(e)||t.set(e,new Set);let a=t.get(e);for(let e of n)a.add(e.ReferencedSOPInstanceUID)}return[...NN.values()].filter(e=>{let r=t.get(e.SeriesInstanceUID);if(r&&e.instances)return e.instances.some(e=>r.has(e.SOPInstanceUID))})},this.getDisplaySetByUID=e=>{if("string"!=typeof e)throw Error(`getDisplaySetByUID: displaySetInstanceUid must be a string, you passed ${e}`);return NN.get(e)},this.makeDisplaySets=(e,{batch:t=!1,madeInClient:r=!1,settings:n={}}={})=>{if(!e||!e.length)throw Error("No instances were provided.");if(t&&!e[0].length)throw Error("Batch displaySet creation does not contain array of array of instances.");let a=[];if(t)for(let t=0;t<e.length;t++){let r=e[t],i=this.makeDisplaySetForInstances(r,n);a.push(...i)}else{let t=this.makeDisplaySetForInstances(e,n);a.push(...t)}let i={};if(r&&(i.madeInClient=!0),this.activeDisplaySetsChanged&&(this.activeDisplaySetsChanged=!1,this._broadcastEvent(NR.DISPLAY_SETS_CHANGED,this.activeDisplaySets)),a?.length)return this._broadcastEvent(NR.DISPLAY_SETS_ADDED,{displaySetsAdded:a,options:i}),a},this.unsupportedSOPClassHandler="@ohif/extension-default.sopClassHandlerModule.not-supported-display-sets-handler"}init(e,t){this.extensionManager=e,this.SOPClassHandlerIds=t,this.activeDisplaySets=[],this.activeDisplaySetsMap.clear()}_addDisplaySetsToCache(e){e.forEach(e=>{NN.set(e.displaySetInstanceUID,e)})}_addActiveDisplaySets(e){let{activeDisplaySets:t,activeDisplaySetsMap:r}=this;e.forEach(e=>{r.has(e.displaySetInstanceUID)||(this.activeDisplaySetsChanged=!0,t.push(e),r.set(e.displaySetInstanceUID,e))})}setUnsuportedSOPClassHandler(e){this.unsupportedSOPClassHandler=e}addDisplaySets(...e){return this._addDisplaySetsToCache(e),this._addActiveDisplaySets(e),this.activeDisplaySetsChanged=!1,this._broadcastEvent(NR.DISPLAY_SETS_ADDED,{displaySetsAdded:e,options:{madeInClient:e[0].madeInClient}}),e}getDisplaySetCache(){return NN}getMostRecentDisplaySet(){return this.activeDisplaySets[this.activeDisplaySets.length-1]}getActiveDisplaySets(){return this.activeDisplaySets}getDisplaySetForSOPInstanceUID(e,t,r){return(t?this.getDisplaySetsForSeries(t):[...this.getDisplaySetCache().values()]).find(t=>t.instances?.some(t=>t.SOPInstanceUID===e))}setDisplaySetMetadataInvalidated(e,t=!0){this.getDisplaySetByUID(e)&&this._broadcastEvent(NR.DISPLAY_SET_SERIES_METADATA_INVALIDATED,{displaySetInstanceUID:e,invalidateData:t})}deleteDisplaySet(e){if(!e)return;let{activeDisplaySets:t,activeDisplaySetsMap:r}=this,n=t.findIndex(t=>t.displaySetInstanceUID===e);NN.delete(e),t.splice(n,1),r.delete(e),this._broadcastEvent(NR.DISPLAY_SETS_CHANGED,this.activeDisplaySets),this._broadcastEvent(NR.DISPLAY_SETS_REMOVED,{displaySetInstanceUIDs:[e]})}onModeExit(){this.getDisplaySetCache().clear(),this.activeDisplaySets.length=0,this.activeDisplaySetsMap.clear()}makeDisplaySetForInstances(e,t){let r=e.reduce((e,t)=>(t.SOPClassUID in e||(e[t.SOPClassUID]=[]),e[t.SOPClassUID].push(t),e),{}),n=Object.keys(r),a=[];return n.forEach(e=>{let n=this._makeDisplaySetForInstances(r[e],t);a=[...a,...n]}),a}_makeDisplaySetForInstances(e,t){let r=[...e],n=r[0],a=this.getDisplaySetsForSeries(n.SeriesInstanceUID)||[],i=this.SOPClassHandlerIds,o=[];for(let e=0;e<i.length&&r.length;e++){let s=i[e],l=this.extensionManager.getModuleEntry(s);if(l.sopClassUids.includes(n.SOPClassUID)){let e=a.filter(e=>e.SOPClassHandlerId===s);if(e.length){for(let t of(r=NL(r,e),e)){let e=t.addInstances?.(r,this);if(e&&(this.activeDisplaySetsChanged=!0,r=NL(r,[e]),this._addActiveDisplaySets([e]),this.setDisplaySetMetadataInvalidated(e.displaySetInstanceUID)),!r.length)return o}if(!r.length)return this._addActiveDisplaySets(e),o}if(!(e=l.getDisplaySetsFromSeries(r))||!e.length)continue;e.forEach(e=>{Object.keys(t).forEach(r=>{e[r]=t[r]})}),this._addDisplaySetsToCache(e),this._addActiveDisplaySets(e),r=NL(r,e),o.push(...e)}}if(0===o.length){let e=this.extensionManager.getModuleEntry(this.unsupportedSOPClassHandler).getDisplaySetsFromSeries(r);e?.length&&(e.forEach(e=>{Object.keys(t).forEach(r=>{e[r]=t[r]})}),this._addDisplaySetsToCache(e),this._addActiveDisplaySets(e),o.push(...e))}return o}getDisplaySetsBy(e){let t=[];if("function"!=typeof e)throw Error(`The comparator ${e} was not a function`);return this.getActiveDisplaySets().forEach(r=>{e(r)&&t.push(r)}),t}sortDisplaySets(e,t="ascending",r=!1){this.activeDisplaySets.sort(e),"descending"===t&&this.activeDisplaySets.reverse(),r||this._broadcastEvent(NR.DISPLAY_SETS_CHANGED,this.activeDisplaySets)}}NV.REGISTRATION={altName:"DisplaySetService",name:"displaySetService",create:({configuration:e={}})=>new NV};let NF={TOOL_BAR_MODIFIED:"event::toolBarService:toolBarModified",TOOL_BAR_STATE_MODIFIED:"event::toolBarService:toolBarStateModified"},Nj={primary:"primary",secondary:"secondary",viewportActionMenu:{topLeft:"viewportActionMenu.topLeft",topRight:"viewportActionMenu.topRight",bottomLeft:"viewportActionMenu.bottomLeft",bottomRight:"viewportActionMenu.bottomRight",topMiddle:"viewportActionMenu.topMiddle",bottomMiddle:"viewportActionMenu.bottomMiddle",leftMiddle:"viewportActionMenu.leftMiddle",rightMiddle:"viewportActionMenu.rightMiddle"},labelMapSegmentationToolbox:"labelMapSegmentationToolbox",contourSegmentationToolbox:"contourSegmentationToolbox",labelMapSegmentationUtilities:"labelMapSegmentationUtilities",contourSegmentationUtilities:"contourSegmentationUtilities",dynamicToolbox:"dynamic-toolbox",roiThresholdToolbox:"ROIThresholdToolbox"},NB=((efz={})[efz.TopLeft=0]="TopLeft",efz[efz.TopMiddle=1]="TopMiddle",efz[efz.TopRight=2]="TopRight",efz[efz.LeftMiddle=3]="LeftMiddle",efz[efz.RightMiddle=4]="RightMiddle",efz[efz.BottomLeft=5]="BottomLeft",efz[efz.BottomMiddle=6]="BottomMiddle",efz[efz.BottomRight=7]="BottomRight",efz);class NW extends Ni{get sections(){return Nj}static createButton(e){let{id:t,icon:r,label:n,commands:a,tooltip:i,evaluate:o,listeners:s}=e;return{id:t,icon:r,label:n,commands:a,tooltip:i||n,evaluate:o,listeners:s}}constructor(e,t,r){super(NF),this.state={buttons:{},buttonSections:{}},this._commandsManager=void 0,this._extensionManager=void 0,this._servicesManager=void 0,this._evaluateFunction={},this._serviceSubscriptions=[],this.handleEvaluateNested=e=>{let{buttonSection:t}=e;if(!t)return;let r=this.getButtonSection(t);r?.length&&r.forEach(e=>{this.handleEvaluate(e.componentProps)})},this.handleEvaluate=e=>{let{evaluate:t,options:r}=e;if("string"==typeof r){let t=this._getButtonUITypes();e.options=t[r]?.defaultComponent}if("function"!=typeof t){if(Array.isArray(t)){let r=t.map(e=>{let t="object"==typeof e,r=t?e.name:e,n=this._evaluateFunction[r];if(!n)throw Error(`Evaluate function not found for name: ${r}, you can register an evaluate function with the getToolbarModule in your extensions`);return t?t=>n({...t,...e}):n}),n=e.evaluate;e.evaluate=e=>{let t=r.map(t=>t(e)).filter(Boolean),n=t?.some(e=>e.disabled),a=t.reduce((e,t)=>({...e,...t}),{});return n&&(a.disabled=!0),a},e.evaluateProps=n;return}if("string"==typeof t){let r=this._evaluateFunction[t];if(r){e.evaluate=r;return}throw Error(`Evaluate function not found for name: ${t}, you can register an evaluate function with the getToolbarModule in your extensions`)}if("object"==typeof t){let{name:r,...n}=t,a=this._evaluateFunction[r];if(a){let t=e.evaluate;e.evaluate=e=>a({...e,...n}),e.evaluateProps=t;return}throw Error(`Evaluate function not found for name: ${r}, you can register an evaluate function with the getToolbarModule in your extensions`)}}},this._commandsManager=e,this._extensionManager=t,this._servicesManager=r}reset(){this.state={buttons:{},buttonSections:{}},this.unsubscriptions=[]}onModeEnter(){this.reset()}registerEvaluateFunction(e,t){this._evaluateFunction[e]=t}registerEventForToolbarUpdate(e,t){let{viewportGridService:r}=this._servicesManager.services,n=()=>{let e=r.getActiveViewportId();this.refreshToolbarState({viewportId:e})};t.map(t=>e.subscribe?e.subscribe(t,n):e.addEventListener?e.addEventListener(t,n):void 0).forEach(e=>this._serviceSubscriptions.push(e))}removeButton(e){this.state.buttons[e]&&delete this.state.buttons[e],Object.keys(this.state.buttonSections).forEach(t=>{this.state.buttonSections[t]=this.state.buttonSections[t].filter(t=>t!==e)}),this._broadcastEvent(this.EVENTS.TOOL_BAR_MODIFIED,{...this.state})}register(e,t=!1){e.forEach(e=>{(t||!this.state.buttons[e.id])&&(e.props||(e.props={}),!0===e.props.buttonSection&&(e.props.buttonSection=e.id),this.state.buttons[e.id]=e)}),this._broadcastEvent(this.EVENTS.TOOL_BAR_MODIFIED,{...this.state})}recordInteraction(e,t){"string"==typeof e&&(e=this.getButtonProps(e));let r=e.itemId??e.id;e.itemId=r;let n=Array.isArray(e.commands)?e.commands:[e.commands];if(n=n.filter(Boolean),!n?.length)return void this.refreshToolbarState({...t?.refreshProps,itemId:r,interaction:e});let a={...t,...e};(n=(n=n.map(e=>"function"==typeof e?()=>{e({...a,commandsManager:this._commandsManager,servicesManager:this._servicesManager})}:e)).filter(Boolean)).length&&(this._commandsManager.run(n,a),this.refreshToolbarState({...t?.refreshProps,itemId:r,interaction:e}))}refreshToolbarState(e){let t=this.state.buttons,r={...t},n=new Map,a=(e,t,r)=>{if(n.has(e.id)){let{disabled:r,disabledText:a,className:i,isActive:o}=n.get(e.id);return{...t,disabled:r,disabledText:a,className:i,isActive:o}}{let a=t.evaluateProps,i="function"==typeof t.evaluate?t.evaluate({...r,button:e}):void 0,o=a?.hideWhenDisabled||t.hideWhenDisabled,s=i?.visible===void 0?!(o&&i?.disabled):i?.visible,l={...t,...i,disabled:i?.disabled||!1,visible:s,className:i?.className||t?.className||"",isActive:i?.isActive};return n.set(e.id,l),l}},i=new Set;return Object.values(t).forEach(n=>{if(!i.has(n.id))if(n.props?.buttonSection){let o=n.props,{evaluate:s}=o,l="function"==typeof s?s({...e,button:n}):void 0;o={...o,disabled:l?.disabled??o.disabled,disabledText:l?.disabledText??o.disabledText};let u=this.state.buttonSections[o.buttonSection];if(!u)return;u.forEach(n=>{let o=t[n];if(!o||i.has(n))return;let s=a(o,o.props,e);r[n]={...o,props:s},i.add(n)})}else{this.handleEvaluate(n.props);let t=n.props,o=a(n,t,e);r[n.id]={...n,props:o},i.add(n.id)}}),this.setButtons(r),this.state}setButtons(e){this.state.buttons=e,this._broadcastEvent(this.EVENTS.TOOL_BAR_MODIFIED,{buttons:this.state.buttons,buttonSections:this.state.buttonSections})}getButton(e){return this.state.buttons[e]}addButtons(e,t=!1){console.warn("ToolbarService.addButtons() is deprecated. Use ToolbarService.register() instead."),this.register(e,t)}getButtons(){return this.state.buttons}getButtonProps(e){if(this.state.buttons[e])return this.state.buttons[e].props}_getButtonUITypes(){let e=this._extensionManager.modules.toolbarModule;return Array.isArray(e)?e.reduce((e,t)=>(t.module.forEach(t=>{e[t.name]=t}),e),{}):{}}updateSection(e,t){this.state.buttonSections[e]?this.state.buttonSections[e].push(...t.filter(t=>!this.state.buttonSections[e].find(e=>e===t))):this.state.buttonSections[e]=t,this._broadcastEvent(this.EVENTS.TOOL_BAR_MODIFIED,{...this.state})}createButtonSection(e,t){console.warn("ToolbarService.createButtonSection() is deprecated. Use ToolbarService.updateSection() instead."),this.updateSection(e,t)}getButtonSection(e,t){let r=this.state.buttonSections[e];return r?.map(e=>{let r=this.state.buttons[e];return this._mapButtonToDisplay(r,t)})||[]}getButtonPropsInButtonSection(e){let t=this.state.buttonSections[e];return t?.map(e=>this.getButtonProps(e))||[]}getToolNameForButton(e){let{props:t}=e,r=t?.commands||e.commands,n=(Array.isArray(r)?r:[r])[0];return n?.commandOptions?n.commandOptions.toolName??t?.id??e.id:t?.id??e.id}_mapButtonToDisplay(e,t){if(!e)return;let{id:r,uiType:n}=e,{buttonSection:a}=e.props,i=this._getButtonUITypes()[n];if(e.component||(e.component=i.defaultComponent),!i&&!e.component)return void console.warn(`Neither button type nor a component found for button: ${r}`);a?this.handleEvaluateNested(e.props):this.handleEvaluate(e.props);let{id:o,props:s}=e,l=(e,t)=>{let r=Array.isArray(e)?e:[e],n=this.getButtonProps(t);return r.map(e=>"function"==typeof e.optionComponent?e:{...e,onChange:t=>{e.value=t;let r=Array.isArray(e.commands)?e.commands:[e.commands];if(n&&n.options){let r=n.options.findIndex(t=>t.id===e.id);-1!==r&&(n.options[r].value=t)}r.forEach(r=>{let a={...e,value:t,options:n.options,servicesManager:this._servicesManager,commandsManager:this._commandsManager};this._commandsManager.run(r,a)}),this._broadcastEvent(NF.TOOL_BAR_STATE_MODIFIED,{buttons:this.state.buttons,buttonSections:this.state.buttonSections})}})};if(s?.items?.length){let{items:e=[]}=s;e.forEach(e=>{e.options&&(e.options=l(e.options,e.id))})}else s.options?.length?s.options=l(s.options,o):s.optionComponent&&(s.optionComponent=options.optionComponent);return{id:r,Component:e.component,componentProps:Object.assign({id:r},e.props,t)}}getButtonComponentForUIType(e){return e?this._getButtonUITypes()[e]?.defaultComponent??null:null}clearButtonSection(e){this.state.buttonSections[e]=[],this._broadcastEvent(this.EVENTS.TOOL_BAR_MODIFIED,{...this.state})}isInAnySection(e){return!!e&&Object.values(this.state.buttonSections).some(t=>Array.isArray(t)&&t.includes(e))}getAlignAndSide(e){switch(Number(e)){case NB.TopLeft:return{align:"start",side:"bottom"};case NB.TopMiddle:return{align:"center",side:"bottom"};case NB.TopRight:return{align:"end",side:"bottom"};case NB.LeftMiddle:return{align:"start",side:"right"};case NB.RightMiddle:return{align:"end",side:"left"};case NB.BottomLeft:return{align:"start",side:"top"};case NB.BottomMiddle:return{align:"center",side:"top"};case NB.BottomRight:return{align:"end",side:"top"};default:return{align:"start",side:"bottom"}}}getOptionById(e,t){return e.props.options?.find(e=>e.id===t)}}NW.REGISTRATION={name:"toolbarService",altName:"ToolBarService",create:({commandsManager:e,extensionManager:t,servicesManager:r})=>new NW(e,t,r)},NW.TOOLBAR_SECTIONS=Nj;class NU extends Ni{constructor({servicesManager:e}){super(NU.EVENTS),this.serviceImplementation={},this.servicesManager=void 0,this.presentationIdProviders=void 0,this.servicesManager=e,this.serviceImplementation={},this.presentationIdProviders=new Map}addPresentationIdProvider(e,t){this.presentationIdProviders.set(e,t)}getPresentationIdProvider(e){return this.presentationIdProviders.get(e)}getPresentationId(e,t){let r=this.getState(),n=r.viewports.get(t);return this._getPresentationId(e,{viewport:n,viewports:r.viewports})}_getPresentationId(e,{viewport:t,viewports:r}){let n=[...r.values()].some(e=>e.displaySetInstanceUIDs?.toString()===t.displaySetInstanceUIDs?.toString()&&e.viewportId===t.viewportId),a=this.presentationIdProviders.get(e);return a?a(e,{viewport:t,viewports:r,isUpdatingSameViewport:n,servicesManager:this.servicesManager}):null}getPresentationIds({viewport:e,viewports:t}){return Array.from(this.presentationIdProviders.keys()).reduce((r,n)=>{let a=this._getPresentationId(n,{viewport:e,viewports:t});return null!==a&&(r[n]=a),r},{})}setServiceImplementation({getState:e,setActiveViewportId:t,setDisplaySetsForViewports:r,setLayout:n,reset:a,onModeExit:i,set:o,getNumViewportPanes:s,setViewportIsReady:l,getViewportState:u}){u&&(this.serviceImplementation._getViewportState=u),e&&(this.serviceImplementation._getState=e),t&&(this.serviceImplementation._setActiveViewport=t),r&&(this.serviceImplementation._setDisplaySetsForViewports=r),n&&(this.serviceImplementation._setLayout=n),a&&(this.serviceImplementation._reset=a),i&&(this.serviceImplementation._onModeExit=i),o&&(this.serviceImplementation._set=o),s&&(this.serviceImplementation._getNumViewportPanes=s),l&&(this.serviceImplementation._setViewportIsReady=l)}publishViewportsReady(){this._broadcastEvent(this.EVENTS.VIEWPORTS_READY,{})}publishViewportOnDropHandled(e){this._broadcastEvent(this.EVENTS.VIEWPORT_ONDROP_HANDLED,{eventData:e})}setActiveViewportId(e){e!==this.getActiveViewportId()&&(this.serviceImplementation._setActiveViewport(e),setTimeout(()=>{this._broadcastEvent(this.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED,{viewportId:e})},0))}getState(){return this.serviceImplementation._getState()}getViewportState(e){return this.serviceImplementation._getViewportState(e)}setViewportIsReady(e,t){this.serviceImplementation._setViewportIsReady(e,t)}getActiveViewportId(){return this.getState().activeViewportId}setViewportGridSizeChanged(){let e=this.getState();this._broadcastEvent(this.EVENTS.GRID_SIZE_CHANGED,{state:e})}setDisplaySetsForViewport(e){this.setDisplaySetsForViewports([e])}async setDisplaySetsForViewports(e){await this.serviceImplementation._setDisplaySetsForViewports(e);let t=this.getState(),r=[],n=[];for(let a of e){let e=t.viewports.get(a.viewportId);e?(r.push(e),0===(e.displaySetInstanceUIDs||[]).length&&n.push(a.viewportId)):n.push(a.viewportId)}setTimeout(()=>{this._broadcastEvent(NU.EVENTS.GRID_STATE_CHANGED,{state:t,viewports:r,removedViewportIds:n})})}getDisplaySetsUIDsForViewport(e){let t=this.getState().viewports.get(e);return t?.displaySetInstanceUIDs}async setLayout({numCols:e,numRows:t,layoutOptions:r,layoutType:n="grid",activeViewportId:a,findOrCreateViewport:i,isHangingProtocolLayout:o=!1}){let s=new Set(this.getState().viewports.keys());await this.serviceImplementation._setLayout({numCols:e,numRows:t,layoutOptions:r,layoutType:n,activeViewportId:a,findOrCreateViewport:i,isHangingProtocolLayout:o}),setTimeout(()=>{let r=this.getState(),n=new Set(r.viewports.keys()),a=[...s].filter(e=>!n.has(e));this._broadcastEvent(this.EVENTS.LAYOUT_CHANGED,{numCols:e,numRows:t}),this._broadcastEvent(this.EVENTS.GRID_STATE_CHANGED,{state:r,removedViewportIds:a})},0)}reset(){this.serviceImplementation._reset()}onModeExit(){this.serviceImplementation._onModeExit()}set(e){let t=new Set(this.getState().viewports.keys());this.serviceImplementation._set(e);let r=this.getState(),n=new Set(r.viewports.keys()),a=[...t].filter(e=>!n.has(e));setTimeout(()=>{this._broadcastEvent(this.EVENTS.GRID_STATE_CHANGED,{state:r,removedViewportIds:a})},0)}getNumViewportPanes(){return this.serviceImplementation._getNumViewportPanes()}getLayoutOptionsFromState(e){return Array.from(e.viewports.entries()).map(([e,t])=>({x:t.x,y:t.y,width:t.width,height:t.height}))}}NU.EVENTS={ACTIVE_VIEWPORT_ID_CHANGED:"event::activeviewportidchanged",LAYOUT_CHANGED:"event::layoutChanged",GRID_STATE_CHANGED:"event::gridStateChanged",GRID_SIZE_CHANGED:"event::gridSizeChanged",VIEWPORTS_READY:"event::viewportsReady",VIEWPORT_ONDROP_HANDLED:"event::viewportOnDropHandled"},NU.REGISTRATION={name:"viewportGridService",altName:"ViewportGridService",create:({configuration:e={},servicesManager:t})=>new NU({servicesManager:t})};class Nz extends Ni{constructor(){super(Nz.EVENTS),this.serviceImplementation={},this.startedClips=new Map,this.closedViewports=new Set,this.serviceImplementation={}}getState(){return this.serviceImplementation._getState()}setCine({id:e,frameRate:t,isPlaying:r}){return this.serviceImplementation._setCine({id:e,frameRate:t,isPlaying:r})}setIsCineEnabled(e){this.serviceImplementation._setIsCineEnabled(e),e&&this.closedViewports.forEach(e=>{this.clearViewportCineClosed(e)}),queueMicrotask(()=>{this._broadcastEvent(this.EVENTS.CINE_STATE_CHANGED,{isCineEnabled:e})})}playClip(e,t){let r=this.serviceImplementation._playClip(e,t);return this.startedClips.set(e,t),this._broadcastEvent(this.EVENTS.CINE_STATE_CHANGED,{isPlaying:!0}),r}stopClip(e,t){let r=this.serviceImplementation._stopClip(e,t);return this._broadcastEvent(this.EVENTS.CINE_STATE_CHANGED,{isPlaying:!1}),r}onModeExit(){this.setIsCineEnabled(!1),this.startedClips.forEach((e,t)=>{this.stopClip(t,e)})}getSyncedViewports(e){return this.serviceImplementation._getSyncedViewports(e)}setViewportCineClosed(e){this.closedViewports.add(e)}isViewportCineClosed(e){return this.closedViewports.size>0}clearViewportCineClosed(e){this.closedViewports.delete(e)}setServiceImplementation({getState:e,setCine:t,setIsCineEnabled:r,playClip:n,stopClip:a,getSyncedViewports:i}){i&&(this.serviceImplementation._getSyncedViewports=i),e&&(this.serviceImplementation._getState=e),t&&(this.serviceImplementation._setCine=t),r&&(this.serviceImplementation._setIsCineEnabled=r),n&&(this.serviceImplementation._playClip=n),a&&(this.serviceImplementation._stopClip=a)}}Nz.EVENTS={CINE_STATE_CHANGED:"event::cineStateChanged"},Nz.REGISTRATION={name:"cineService",altName:"CineService",create:({configuration:e={}})=>new Nz};var NH=u(3359),NG=u.n(NH);function Nq(){var e=[].slice.call(arguments),t=e.length;return function(r,n){var a,i,o,s,l,u,c;for(c=0;c<t&&(u=0,a=r[s="string"==typeof(o=e[c])?o:o.name],i=n[s],void 0!==o.primer&&(a=o.primer(a),i=o.primer(i)),l=o.reverse?-1:1,a<i&&(u=-1*l),a>i&&(u=+l),0===u);c++);return u}}var N$=u(6834),NK=u.n(N$);NK().validators.equals=function(e,t,r){let n=NY(t),a=NX(e);if(Array.isArray(n)){if(n.length!==a.length)return`${r} must be an array of length ${n.length}`;else for(let e=0;e<n.length;e++)if(n[e]!==a[e])return`${r} ${n[e]} must equal ${a[e]}`}else if(n!==a[0])return`${r} must equal ${n}`},NK().validators.doesNotEqual=function(e,t,r){let n=NY(t),a=NX(e);if(Array.isArray(n)){if(n.length===a.length){let e=0;if(n.forEach((t,r)=>{t===a[r]&&e++}),e===n.length)return`${r} must not equal to ${n}`}}else if(n===a[0])return console.log(a,n),`${r} must not equal to ${n}`},NK().validators.includes=function(e,t,r){let n=NY(t),a=NX(e);return Array.isArray(n)?0===n.filter(e=>a.includes(e)).length?`${r} must include at least one of the following values: ${n.join(", ")}`:void 0:`${r} ${n} must be an array`},NK().validators.doesNotInclude=function(e,t,r){let n=NY(t),a=NX(e);if(!Array.isArray(n))return`${r} ${n} must be an array`;{let e=n.filter(e=>a.includes(e));if(e.length>0)return`${r} must not include the following value: ${e}`}},NK().validators.containsI=function(e,t,r){let n=NY(t);if(Array.isArray(e)){if(e.some(e=>!NK().validators.containsI(e.toLowerCase(),t,r)))return;return`No item of ${e.join(",")} contains ${JSON.stringify(n)}`}if(Array.isArray(n)){if(n.some(t=>!NK().validators.containsI(e,t.toLowerCase(),r)))return;return`${r} must contain at least one of ${n.join(",")}`}if(n&&e.indexOf&&-1===e.toLowerCase().indexOf(n.toLowerCase()))return r+"must contain any case of"+n},NK().validators.contains=function(e,t,r){let n=NY(t);if(Array.isArray(e)){if(e.some(e=>!NK().validators.contains(e,t,r)))return;return`No item of ${e.join(",")} contains ${JSON.stringify(n)}`}if(Array.isArray(n)){if(n.some(t=>!NK().validators.contains(e,t,r)))return;return`${r} must contain at least one of ${n.join(",")}`}if(n&&e.indexOf&&-1===e.indexOf(n))return r+"must contain "+n},NK().validators.containsAll=function(e,t,r){let n=NY(t);if(!Array.isArray(e)||!Array.isArray(n))return`${r} must be an array and test value must be an array.`;let a=n.filter(t=>!e.includes(t));if(a.length>0)return`${r} must contain all of: ${n.join(", ")}. Missing: ${a.join(", ")}`},NK().validators.doesNotContain=function(e,t,r){if(!NK().validators.contains(e,t,r))return`No item of ${e} should contain ${NY(t)}`},NK().validators.doesNotContainI=function(e,t,r){if(!NK().validators.containsI(e,t,r))return`No item of ${e} should not contain ${NY(t)}`},NK().validators.startsWith=function(e,t,r){let n=NY(t);if("string"==typeof n&&(n=[n]),"string"==typeof e){if(!n.some(t=>e.startsWith(t)))return r+" must start with any of these values: "+n}else{if(!Array.isArray(e))return"Value must be a string or an array";let t=!1;for(let r=0;r<e.length;r++){for(let a=0;a<n.length;a++)if(e[r].startsWith(n[a])){t=!0;break}if(t)return}if(!t)return r+" must start with any of these values: "+n}},NK().validators.endsWith=function(e,t,r){let n=NY(t);if("string"==typeof n&&(n=[n]),"string"==typeof e){if(!n.some(t=>e.endsWith(t)))return r+" must end with any of these values: "+n}else{if(!Array.isArray(e))return r+" must be a string or an array";let t=!1;for(let r=0;r<e.length;r++){for(let a=0;a<n.length;a++)if(e[r].endsWith(n[a])){t=!0;break}if(t)return}if(!t)return r+" must end with any of these values: "+n}},NK().validators.greaterThan=function(e,t,r){let n=NY(t);if(Array.isArray(e)||"string"==typeof e)return`${r} is not allowed as an array or string`;if(Array.isArray(n)){if(1===n.length){if(!(e>=n[0]))return`${r} must be greater than or equal to ${n[0]}, but was ${e}`}else if(n.length>1)return r+" must be an array of length 1"}else if(!(e>=n))return r+" must be greater than "+n},NK().validators.lessThan=function(e,t,r){let n=NY(t);if(Array.isArray(n)){if(1===n.length){if(!(e<=n[0]))return`${r} must be less than or equal to ${n[0]}, but was ${e}`}else if(n.length>1)return r+" must be an array of length 1"}else if(!(e<=n))return r+" must be less than "+n},NK().validators.range=function(e,t,r){let n=NY(t);if(!Array.isArray(n)||2!==n.length)return`${r} must be an array of length 2`;{let t=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);if(void 0===e||e<t||e>a)return`${r} with value ${e} must be between ${t} and ${a}`}},NK().validators.notNull=e=>null==e?"Value is null":void 0;let NY=e=>Array.isArray(e)?e.map(e=>e?.value??e):e?.value??e,NX=e=>Array.isArray(e)?[...e]:[e],NZ=NK();class NJ{constructor(e,t){this.protocols=e,this.customAttributeRetrievalCallbacks=t,this.matchedProtocols=new Map,this.matchedProtocolScores={},this.study=void 0}run({studies:e,displaySets:t,activeStudy:r}){return this.studies=e,this.study=r||e[0],this.displaySets=t,this.getBestProtocolMatch()}getBestProtocolMatch(){this.updateProtocolMatches();let e=this._getHighestScoringProtocol();return console.log("ProtocolEngine::getBestProtocolMatch bestMatch",e),e}updateProtocolMatches(){console.log("ProtocolEngine::updateProtocolMatches"),this._clearMatchedProtocols(),this.findMatchByStudy(this.study,{studies:this.studies,displaySets:this.displaySets}).forEach(e=>{let t=e.protocol;t&&(this.matchedProtocols.has(t.id)||(console.log("ProtocolEngine::updateProtocolMatches inserting protocol match",e),this.matchedProtocols.set(t.id,t),this.matchedProtocolScores[t.id]=e.score))})}findMatch(e,t,r){return((e,t=[],r,n)=>{let a={format:"grouped"},i={passed:[],failed:[]},o={},s=!1,l=0,u=n?.studies?.[1],c=n?.studies?.[0],d=e.instances?.[0],h={prior:u,current:c,instance:d,...n,options:n,metadataInstance:e};return t.forEach(t=>{let u,{attribute:c,from:p="metadataInstance"}=t;r.hasOwnProperty(c)?o[c]=r[c].callback.call(t,e,n):o[c]=h[p]?.[c]??d?.[c];let f=((e,t,r,n)=>{if("object"!=typeof t||null===t)return t;let a={};return Object.entries(t).forEach(([e,t])=>{if("object"==typeof t&&Object.keys(t).length>0&&"attribute"in t){let i=t.attribute,o=t.from??"metadataInstance";if(r.hasOwnProperty(i)){let t=r[i].callback.call(null,n[o],n.options);a[e]={value:t}}else a[e]={value:n[o]?.[i]??n.metadataInstance?.[i]}}else a[e]=t},{}),a})(0,t.constraint,r,h),m={[c]:o[c]};try{u=NZ(m,{[c]:f},[a])}catch(e){u=["Something went wrong during validation.",e]}u?(t.required&&(s=!0),i.failed.push({rule:t,errorMessages:u})):(l+=parseInt(t.weight||1,10),i.passed.push({rule:t}))}),s&&(l=0),{score:l,details:i,requiredFailed:s}})(e,t,this.customAttributeRetrievalCallbacks,r)}findMatchByStudy(e,t){let r=[];if(this.protocols.forEach(n=>{let a=n.protocolMatchingRules.slice();if(!a||!a.length)return void console.warn("ProtocolEngine::findMatchByStudy no matching rules - specify protocolMatchingRules for",n.id);let i=this.findMatch(e,a,t).score;i>0&&r.push({score:i,protocol:n})}),!r.length){let e=this.protocols.find(e=>"default"===e.id)??this.protocols[0];return console.log("No protocol matches, defaulting to",e),[{score:0,protocol:e}]}return r.sort((e,t)=>t.score-e.score),console.log("ProtocolEngine::findMatchByStudy matched",r),r}_clearMatchedProtocols(){this.matchedProtocols.clear(),this.matchedProtocolScores={}}_largestKeyByValue(e){return Object.keys(e).reduce((t,r)=>e[t]>e[r]?t:r)}_getHighestScoringProtocol(){if(!Object.keys(this.matchedProtocolScores).length)return;let e=this._largestKeyByValue(this.matchedProtocolScores);return this.matchedProtocols.get(e)}}function NQ(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var N1=u(8985),N0=u(8681),N2=u.n(N0);!function(e,t={timeout:100}){var r=[],n=null,a=[],i=!1,o=null,s=e.prototype.handleKey;function l(e,t,r){if(!this.recording)return void s.apply(this,arguments);if("keydown"==r.type){1===e.length&&i&&c();for(let e=0;e<t.length;++e)u(t[e]);u(e)}else"keyup"==r.type&&a.length>0&&c()}function u(e){for(let t=0;t<a.length;++t)if(a[t]===e)return;a.push(e),1===e.length&&(i=!0)}function c(){r.push(a),a=[],i=!1,clearTimeout(o),o=setTimeout(d,t.timeout)}function d(){if(n){var e=r;for(let t=0;t<e.length;++t)e[t].sort(function(e,t){return e.length>1&&1===t.length?-1:1===e.length&&t.length>1||e>t?1:-1}),e[t]=e[t].join("+");n(r)}r=[],n=null,a=[]}e.prototype.record=function(e){var t=this;t.recording=!0,n=function(){t.recording=!1,e.apply(t,arguments)}},e.prototype.stopRecord=function(){this.recording=!1},e.prototype.startRecording=function(){this.recording=!0},e.prototype.handleKey=function(){l.apply(this,arguments)},e.init()}(N2()),efG=(efH=N2()).prototype.stopCallback,efH.prototype.stopCallback=function(e,t,r){return!!this.paused||efG.call(this,e,t,r)},efH.prototype.pause=function(){this.paused=!0},efH.prototype.unpause=function(){this.paused=!1},efH.init();let N5=N2();Symbol("Type"),Symbol("Task"),Symbol("List");let N3=Object.freeze(["SEG","KO","PR","SR","RTSTRUCT","RTDOSE","RTPLAN","RTRECORD","REG"]);function N4(e){return N3.includes(e)}let N8={ComputedRadiographyImageStorage:"1.2.840.10008.5.1.4.1.1.1",DigitalXRayImageStorageForPresentation:"1.2.840.10008.5.1.4.1.1.1.1",DigitalXRayImageStorageForProcessing:"1.2.840.10008.5.1.4.1.1.1.1.1",DigitalMammographyXRayImageStorageForPresentation:"1.2.840.10008.5.1.4.1.1.1.2",DigitalMammographyXRayImageStorageForProcessing:"1.2.840.10008.5.1.4.1.1.1.2.1",DigitalIntraOralXRayImageStorageForPresentation:"1.2.840.10008.5.1.4.1.1.1.3",DigitalIntraOralXRayImageStorageForProcessing:"1.2.840.10008.5.1.4.1.1.1.3.1",CTImageStorage:"1.2.840.10008.5.1.4.1.1.2",EnhancedCTImageStorage:"1.2.840.10008.5.1.4.1.1.2.1",LegacyConvertedEnhancedCTImageStorage:"1.2.840.10008.5.1.4.1.1.2.2",UltrasoundMultiframeImageStorage:"1.2.840.10008.5.1.4.1.1.3.1",MRImageStorage:"1.2.840.10008.5.1.4.1.1.4",EnhancedMRImageStorage:"1.2.840.10008.5.1.4.1.1.4.1",MRSpectroscopyStorage:"1.2.840.10008.5.1.4.1.1.4.2",EnhancedMRColorImageStorage:"1.2.840.10008.5.1.4.1.1.4.3",LegacyConvertedEnhancedMRImageStorage:"1.2.840.10008.5.1.4.1.1.4.4",UltrasoundImageStorage:"1.2.840.10008.5.1.4.1.1.6.1",EnhancedUSVolumeStorage:"1.2.840.10008.5.1.4.1.1.6.2",SecondaryCaptureImageStorage:"1.2.840.10008.5.1.4.1.1.7",MultiframeSingleBitSecondaryCaptureImageStorage:"1.2.840.10008.5.1.4.1.1.7.1",MultiframeGrayscaleByteSecondaryCaptureImageStorage:"1.2.840.10008.5.1.4.1.1.7.2",MultiframeGrayscaleWordSecondaryCaptureImageStorage:"1.2.840.10008.5.1.4.1.1.7.3",MultiframeTrueColorSecondaryCaptureImageStorage:"1.2.840.10008.5.1.4.1.1.7.4",Sop12LeadECGWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.1.1",GeneralECGWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.1.2",AmbulatoryECGWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.1.3",HemodynamicWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.2.1",CardiacElectrophysiologyWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.3.1",BasicVoiceAudioWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.4.1",GeneralAudioWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.4.2",ArterialPulseWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.5.1",RespiratoryWaveformStorage:"1.2.840.10008.5.1.4.1.1.9.6.1",GrayscaleSoftcopyPresentationStateStorage:"1.2.840.10008.5.1.4.1.1.11.1",ColorSoftcopyPresentationStateStorage:"1.2.840.10008.5.1.4.1.1.11.2",PseudoColorSoftcopyPresentationStateStorage:"1.2.840.10008.5.1.4.1.1.11.3",BlendingSoftcopyPresentationStateStorage:"1.2.840.10008.5.1.4.1.1.11.4",XAXRFGrayscaleSoftcopyPresentationStateStorage:"1.2.840.10008.5.1.4.1.1.11.5",XRayAngiographicImageStorage:"1.2.840.10008.5.1.4.1.1.12.1",EnhancedXAImageStorage:"1.2.840.10008.5.1.4.1.1.12.1.1",XRayRadiofluoroscopicImageStorage:"1.2.840.10008.5.1.4.1.1.12.2",EnhancedXRFImageStorage:"1.2.840.10008.5.1.4.1.1.12.2.1",XRay3DAngiographicImageStorage:"1.2.840.10008.5.1.4.1.1.13.1.1",XRay3DCraniofacialImageStorage:"1.2.840.10008.5.1.4.1.1.13.1.2",BreastTomosynthesisImageStorage:"1.2.840.10008.5.1.4.1.1.13.1.3",BreastProjectionXRayImageStorageForPresentation:"1.2.840.10008.5.1.4.1.1.13.1.4",BreastProjectionXRayImageStorageForProcessing:"1.2.840.10008.5.1.4.1.1.13.1.5",IntravascularOpticalCoherenceTomographyImageStorageForPresentation:"1.2.840.10008.5.1.4.1.1.14.1",IntravascularOpticalCoherenceTomographyImageStorageForProcessing:"1.2.840.10008.5.1.4.1.1.14.2",NuclearMedicineImageStorage:"1.2.840.10008.5.1.4.1.1.20",RawDataStorage:"1.2.840.10008.5.1.4.1.1.66",SpatialRegistrationStorage:"1.2.840.10008.5.1.4.1.1.66.1",SpatialFiducialsStorage:"1.2.840.10008.5.1.4.1.1.66.2",DeformableSpatialRegistrationStorage:"1.2.840.10008.5.1.4.1.1.66.3",SegmentationStorage:"1.2.840.10008.5.1.4.1.1.66.4",LabelmapSegmentationStorage:"1.2.840.10008.5.1.4.1.1.66.7",SurfaceSegmentationStorage:"1.2.840.10008.5.1.4.1.1.66.5",RealWorldValueMappingStorage:"1.2.840.10008.5.1.4.1.1.67",SurfaceScanMeshStorage:"1.2.840.10008.5.1.4.1.1.68.1",SurfaceScanPointCloudStorage:"1.2.840.10008.5.1.4.1.1.68.2",VLEndoscopicImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.1",VideoEndoscopicImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.1.1",VLMicroscopicImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.2",VideoMicroscopicImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.2.1",VLSlideCoordinatesMicroscopicImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.3",VLPhotographicImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.4",VideoPhotographicImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.4.1",OphthalmicPhotography8BitImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.5.1",OphthalmicPhotography16BitImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.5.2",StereometricRelationshipStorage:"1.2.840.10008.5.1.4.1.1.77.1.5.3",OphthalmicTomographyImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.5.4",VLWholeSlideMicroscopyImageStorage:"1.2.840.10008.5.1.4.1.1.77.1.6",LensometryMeasurementsStorage:"1.2.840.10008.5.1.4.1.1.78.1",AutorefractionMeasurementsStorage:"1.2.840.10008.5.1.4.1.1.78.2",KeratometryMeasurementsStorage:"1.2.840.10008.5.1.4.1.1.78.3",SubjectiveRefractionMeasurementsStorage:"1.2.840.10008.5.1.4.1.1.78.4",VisualAcuityMeasurementsStorage:"1.2.840.10008.5.1.4.1.1.78.5",SpectaclePrescriptionReportStorage:"1.2.840.10008.5.1.4.1.1.78.6",OphthalmicAxialMeasurementsStorage:"1.2.840.10008.5.1.4.1.1.78.7",IntraocularLensCalculationsStorage:"1.2.840.10008.5.1.4.1.1.78.8",MacularGridThicknessandVolumeReport:"1.2.840.10008.5.1.4.1.1.79.1",OphthalmicVisualFieldStaticPerimetryMeasurementsStorage:"1.2.840.10008.5.1.4.1.1.80.1",OphthalmicThicknessMapStorage:"1.2.840.10008.5.1.4.1.1.81.1",CornealTopographyMapStorage:"1.2.840.10008.5.1.4.1.1.82.1",BasicTextSR:"1.2.840.10008.5.1.4.1.1.88.11",EnhancedSR:"1.2.840.10008.5.1.4.1.1.88.22",ComprehensiveSR:"1.2.840.10008.5.1.4.1.1.88.33",Comprehensive3DSR:"1.2.840.10008.5.1.4.1.1.88.34",ProcedureLog:"1.2.840.10008.5.1.4.1.1.88.40",MammographyCADSR:"1.2.840.10008.5.1.4.1.1.88.50",KeyObjectSelection:"1.2.840.10008.5.1.4.1.1.88.59",ChestCADSR:"1.2.840.10008.5.1.4.1.1.88.65",XRayRadiationDoseSR:"1.2.840.10008.5.1.4.1.1.88.67",RadiopharmaceuticalRadiationDoseSR:"1.2.840.10008.5.1.4.1.1.88.68",ColonCADSR:"1.2.840.10008.5.1.4.1.1.88.69",ImplantationPlanSRDocumentStorage:"1.2.840.10008.5.1.4.1.1.88.70",EncapsulatedPDFStorage:"1.2.840.10008.5.1.4.1.1.104.1",EncapsulatedCDAStorage:"1.2.840.10008.5.1.4.1.1.104.2",PositronEmissionTomographyImageStorage:"1.2.840.10008.5.1.4.1.1.128",EnhancedPETImageStorage:"1.2.840.10008.5.1.4.1.1.130",LegacyConvertedEnhancedPETImageStorage:"1.2.840.10008.5.1.4.1.1.128.1",BasicStructuredDisplayStorage:"1.2.840.10008.5.1.4.1.1.131",RTImageStorage:"1.2.840.10008.5.1.4.1.1.481.1",RTDoseStorage:"1.2.840.10008.5.1.4.1.1.481.2",RTStructureSetStorage:"1.2.840.10008.5.1.4.1.1.481.3",RTBeamsTreatmentRecordStorage:"1.2.840.10008.5.1.4.1.1.481.4",RTPlanStorage:"1.2.840.10008.5.1.4.1.1.481.5",RTBrachyTreatmentRecordStorage:"1.2.840.10008.5.1.4.1.1.481.6",RTTreatmentSummaryRecordStorage:"1.2.840.10008.5.1.4.1.1.481.7",RTIonPlanStorage:"1.2.840.10008.5.1.4.1.1.481.8",RTIonBeamsTreatmentRecordStorage:"1.2.840.10008.5.1.4.1.1.481.9",RTBeamsDeliveryInstructionStorage:"1.2.840.10008.5.1.4.34.7",GenericImplantTemplateStorage:"1.2.840.10008.5.1.4.43.1",ImplantAssemblyTemplateStorage:"1.2.840.10008.5.1.4.44.1",ImplantTemplateGroupStorage:"1.2.840.10008.5.1.4.45.1"},N6=[N8.ComputedRadiographyImageStorage,N8.DigitalXRayImageStorageForPresentation,N8.DigitalXRayImageStorageForProcessing,N8.DigitalMammographyXRayImageStorageForPresentation,N8.DigitalMammographyXRayImageStorageForProcessing,N8.DigitalIntraOralXRayImageStorageForPresentation,N8.DigitalIntraOralXRayImageStorageForProcessing,N8.CTImageStorage,N8.EnhancedCTImageStorage,N8.LegacyConvertedEnhancedCTImageStorage,N8.UltrasoundMultiframeImageStorage,N8.EnhancedUSVolumeStorage,N8.MRImageStorage,N8.EnhancedMRImageStorage,N8.EnhancedMRColorImageStorage,N8.LegacyConvertedEnhancedMRImageStorage,N8.UltrasoundImageStorage,N8.SecondaryCaptureImageStorage,N8.MultiframeSingleBitSecondaryCaptureImageStorage,N8.MultiframeGrayscaleByteSecondaryCaptureImageStorage,N8.MultiframeGrayscaleWordSecondaryCaptureImageStorage,N8.MultiframeTrueColorSecondaryCaptureImageStorage,N8.XRayAngiographicImageStorage,N8.EnhancedXAImageStorage,N8.XRayRadiofluoroscopicImageStorage,N8.EnhancedXRFImageStorage,N8.XRay3DAngiographicImageStorage,N8.XRay3DCraniofacialImageStorage,N8.BreastTomosynthesisImageStorage,N8.BreastProjectionXRayImageStorageForPresentation,N8.BreastProjectionXRayImageStorageForProcessing,N8.IntravascularOpticalCoherenceTomographyImageStorageForPresentation,N8.IntravascularOpticalCoherenceTomographyImageStorageForProcessing,N8.NuclearMedicineImageStorage,N8.VLEndoscopicImageStorage,N8.VideoEndoscopicImageStorage,N8.VLMicroscopicImageStorage,N8.VideoMicroscopicImageStorage,N8.VLSlideCoordinatesMicroscopicImageStorage,N8.VLPhotographicImageStorage,N8.VideoPhotographicImageStorage,N8.OphthalmicPhotography8BitImageStorage,N8.OphthalmicPhotography16BitImageStorage,N8.OphthalmicTomographyImageStorage,N8.VLWholeSlideMicroscopyImageStorage,N8.PositronEmissionTomographyImageStorage,N8.EnhancedPETImageStorage,N8.LegacyConvertedEnhancedPETImageStorage,N8.RTImageStorage];function N9(e){return Array.isArray(e)?[...e].map(e=>void 0!==e?Number(e):e):void 0!==e?Number(e):e}var N7=u(7155);function Le(e){let t=e.indexOf(":");return e.substring(t+1)}let Lt=(e,t)=>e==t?0:!e&&t?-1:!t&&e?1:e<t?-1:1,Lr=new Map,Ln=(e,t)=>{let{compareSameSeries:r="default"}=e,{compareSameSeries:n="default"}=t,a=Lr.get(r),i=Lr.get(n);if(a&&i){let r=a===i?a.compare(e,t):Lt(a.priority,i.priority);if(!r)return r}return Ls(e.instance,t.instance)},La=(e,t)=>Lt(e.SeriesInstanceUID,t.SeriesInstanceUID)||Ln(e,t),Li=(e,t)=>Lt(`${e.seriesDate??e.SeriesDate} ${e.seriesTime??e.SeriesTime}`,`${t.seriesDate??t.SeriesDate} ${t.seriesTime??t.SeriesTime}`)||La(e,t);function Lo(e,t){let r=N4(e.Modality??e.modality),n=N4(t.Modality??t.modality);return r?n?Li(t,e):1:n?-1:Lt(e.SeriesNumber??e.seriesNumber,t.SeriesNumber??t.seriesNumber)||Li(e,t)}let Ls=(e,t)=>e&&t?(parseInt(e.InstanceNumber)||0)!==(parseInt(t.InstanceNumber)||0)?(parseInt(e.InstanceNumber)||0)-(parseInt(t.InstanceNumber)||0):Lt(e.SOPInstanceUID,t.SOPInstanceUID)||Lt(e.frameNumber,t.frameNumber):!e&&-1||1,Ll=e=>{if(!e)return null;for(let t=0;t<e.length;t++)if(-1!==e[t].indexOf(",")){let r=e[t].split(/,/);e.splice(t,1,...r)}return e},Lu=(e,t=new URLSearchParams(window.location.search))=>{let r=[...t.keys()].find(t=>t.toLowerCase()===e);if(r)return Ll(t.getAll(r))},Lc=(0,ee.createContext)(null),{Provider:Ld}=Lc;function Lh(e){if(e)return t=>e.includes(t.referenceSeriesUID)}function Lp(e){return t=>t.referenceStudyUID==e}function Lf(e){return e?.referencedImageId}function Lm(e){return t=>t.metadata?.toolName===e}function Lg(e){return!0}function Ly(e){return!1}function Lv(...e){return function(t){for(let r of e)if(!r||("string"==typeof r&&(r=this[r]),"function"==typeof r&&r.call(this,t)))return!0;return!1}}let{POINT:Lb}=NM.VALUE_TYPES;function Lw(e){return e.type===Lb&&e.referencedImageId}function Lx(e,t){return r=>!e(r)&&t(r)}let LC=e=>"string"==typeof e||e instanceof String;function Lk(...e){let t=e.filter(e=>!!e);if(t.length)return 1===t.length&&"function"==typeof t[0]?t[0]:function(e){for(let r of t)if(LC(r)){if(!this[r](e))return!1}else if(!r.call(this,e))return!1;return!0}}let LM=e=>{let t=new URLSearchParams(window.location.search),r=Lu("initialseriesinstanceuid",t),n=Lu("initialsopinstanceuid",t);if(!r&&!n)return!1;let a=r?.some(t=>e.SeriesInstanceUID===t),i=n?.some(t=>e.instances?.some(e=>t===e.SOPInstanceUID));return a||i};function LS(e){let t=e?.[0];if(!t)return;let r=Lu("initialsopinstanceuid");if(!r)return;let n=t.instances.findIndex(e=>r.includes(e.SOPInstanceUID));return -1===n?void 0:{index:n}}let LE=(e,t)=>{let r=t?.displaySets?.filter(e=>e.numImageFrames>0)?.length;return console.log("number of display sets with images",r),r},LP=(e,t)=>t?.displaySets?.map(e=>e.SeriesDescription),LI={toolGroupId:"default",viewportType:"stack"};class LT extends Ni{constructor(e,t){super(LT.EVENTS),this.studies=void 0,this.protocols=void 0,this.activeProtocolIds=void 0,this.protocol=void 0,this._originalProtocol=void 0,this.stageIndex=0,this._commandsManager=void 0,this._servicesManager=void 0,this.protocolEngine=void 0,this.customViewportSettings=[],this.displaySets=[],this.activeStudy=void 0,this.debugLogging=void 0,this.customAttributeRetrievalCallbacks={NumberOfStudyRelatedSeries:{name:"The number of series in the study",callback:e=>e.NumberOfStudyRelatedSeries??e.series?.length},NumberOfSeriesRelatedInstances:{name:"The number of instances in the display set",callback:e=>e.numImageFrames},ModalitiesInStudy:{name:"Gets the array of the modalities for the series",callback:e=>{if(e.ModalitiesInStudy?.length>0)return e.ModalitiesInStudy;if(Array.isArray(e.series)){var t,r;return t=e.series,r="Modality",t.reduce((e,t)=>{let n=t[r];return!n&&t.instances&&t.instances[0]&&(n=t.instances[0][r]),n&&-1===e.indexOf(n)&&e.push(n),e},[])}return[]}},isReconstructable:{name:"Checks if the display set is reconstructable",callback:e=>e.isReconstructable??!1},isDisplaySetFromUrl:{name:"Checks if the display set is as specified in the URL",callback:LM},sopInstanceLocation:{name:"Gets the position of the specified sop instance",callback:LS},seriesDescriptions:{name:"seriesDescriptions",description:"List of Series Descriptions",callback:LP},numberOfDisplaySetsWithImages:{name:"numberOfDisplaySetsWithImages",description:"Number of displays sets with images",callback:LE}},this.listeners={},this.registeredImageLoadStrategies={},this.activeImageLoadStrategyName=null,this.customImageLoadPerformed=!1,this.displaySetMatchDetails=new Map,this.viewportMatchDetails=new Map,this._commandsManager=e,this._servicesManager=t,this.protocols=new Map,this.protocolEngine=void 0,this.protocol=void 0,this.stageIndex=void 0,this.studies=[]}destroy(){this.reset(),this.protocols=new Map}reset(){this.studies=[],this.viewportMatchDetails=new Map,this.displaySetMatchDetails=new Map,this.protocol=void 0,this.stageIndex=void 0,this.protocolEngine=void 0}onModeEnter(){this.reset()}getActiveProtocol(){return{protocol:this.protocol,_originalProtocol:this._originalProtocol,stage:this.protocol?.stages?.[this.stageIndex],stageIndex:this.stageIndex,activeStudy:this.activeStudy,viewportMatchDetails:this.viewportMatchDetails,displaySetMatchDetails:this.displaySetMatchDetails,activeImageLoadStrategyName:this.activeImageLoadStrategyName}}getState(){if(this.protocol)return{protocolId:this.protocol.id,stageIndex:this.stageIndex,stageId:this.protocol.stages[this.stageIndex].id,activeStudyUID:this.activeStudy?.StudyInstanceUID}}filterSeriesRequiredForRun(e,t){Array.isArray(e)&&(e=e[0]);let r=this.getProtocolById(e)?.hpInitiationCriteria?.minSeriesLoaded||t.length;return{requiredSeries:t.slice(0,r),remaining:t.slice(r)}}getDefaultProtocol(){return this.getProtocolById("default")}getMatchDetails(){return{viewportMatchDetails:this.viewportMatchDetails,displaySetMatchDetails:this.displaySetMatchDetails}}getProtocols(){let e=[];for(let t of this.activeProtocolIds||this.protocols.keys()){let r=this.getProtocolById(t);r&&e.push(r)}return e}getProtocolById(e,t=!0){if(!e)return;if(e===this.protocol?.id)return this.protocol;let r=this.protocols.get(e);if(!r&&t){let t=e.toLowerCase();for(let[e]of this.protocols)if(e.toLowerCase()===t){r=this.getProtocolById(e);break}}if(!r)throw Error(`No protocol ${e} found`);if(!(r instanceof Function))return this._validateProtocol(r);try{let{protocol:e}=this._getProtocolFromGenerator(r);return e}catch(t){console.warn(`Error while executing protocol generator for protocol ${e}: ${t}`)}}addProtocol(e,t){this.protocols.has(e)&&console.warn(`A protocol with id ${e} already exists. It will be overwritten.`),t instanceof Function||(t=this._validateProtocol(t)),this.protocols.set(e,t)}addActiveProtocolId(e){e&&(this.activeProtocolIds||(this.activeProtocolIds=[]),this.activeProtocolIds.push(e))}setActiveProtocolIds(e){if(!e||!e.length){this.activeProtocolIds=null,console.log("No active protocols, setting all to active");return}"string"==typeof e?this.setActiveProtocolIds([e]):this.activeProtocolIds=[...e]}setActiveStudyUID(e){if(e&&e!==this.activeStudy?.StudyInstanceUID)return this.activeStudy=this.studies.find(t=>t.StudyInstanceUID===e),this.activeStudy}hasStudyUID(e){return this.studies.some(t=>t.StudyInstanceUID===e)}addStudy(e){this.hasStudyUID(e.StudyInstanceUID)||this.studies.push(e)}run({studies:e,displaySets:t,activeStudy:r},n,a={}){if(this.studies=[...e||this.studies],this.displaySets=t,this.setActiveStudyUID(r?.StudyInstanceUID||(r||this.studies[0])?.StudyInstanceUID),this.protocolEngine=new NJ(this.getProtocols(),this.customAttributeRetrievalCallbacks),this.protocol=null,n&&"string"==typeof n){let e=this.getProtocolById(n);this._setProtocol(e,a)}else{let e=this.protocolEngine.run({studies:this.studies,activeStudy:r,displaySets:t});this._setProtocol(e)}this.protocol?.callbacks?.onProtocolEnter&&this._commandsManager.run(this.protocol?.callbacks?.onProtocolEnter)}hasCustomImageLoadStrategy(){return null!==this.activeImageLoadStrategyName&&this.registeredImageLoadStrategies[this.activeImageLoadStrategyName]instanceof Function}getCustomImageLoadPerformed(){return this.customImageLoadPerformed}getShouldPerformCustomImageLoad(){return this.hasCustomImageLoadStrategy()&&!this.getCustomImageLoadPerformed()}registerImageLoadStrategy(e,t){t instanceof Function&&e&&(this.registeredImageLoadStrategies[e]=t)}addCustomAttribute(e,t,r,n={}){this.customAttributeRetrievalCallbacks[e]={...n,id:e,name:t,callback:r}}runImageLoadStrategy(e){let t=(0,this.registeredImageLoadStrategies[this.activeImageLoadStrategyName])({data:e,displaySetsMatchDetails:this.displaySetMatchDetails,viewportMatchDetails:this.viewportMatchDetails});return t?(this.customImageLoadPerformed=!0,this._broadcastEvent(this.EVENTS.CUSTOM_IMAGE_LOAD_PERFORMED,t),!0):(console.warn("Not able to load data with custom strategy"),!1)}_validateProtocol(e){e.name=e.name??e.id;let{stages:t}=e;if(!t)return void console.warn("Protocol has not stages:",e.id,e);for(let t of Object.keys(e.displaySetSelectors)){let r=e.displaySetSelectors[t];r.id=t;let{seriesMatchingRules:n}=r;if(!n)return void console.warn("Selector has no series matching rules",e.id,t)}return t.forEach(t=>{if(t.viewports)t.viewports=t.viewports.map((r,n)=>{let a=t.defaultViewport||e.defaultViewport||{},i=r.viewportOptions?.viewportId;return{...r,viewportOptions:{...a.viewportOptions,...r.viewportOptions,viewportId:i||(0===n?"default":NQ())},displaySets:r.displaySets||[]}}),t.viewports.forEach(e=>{e.displaySets.forEach(e=>{e.options=e.options||{}})});else{t.name=t.name||t.id,t.viewports=[];let{rows:r,columns:n}=t.viewportStructure.properties;for(let a=0;a<r*n;a++){let r=t.defaultViewport||e.defaultViewport||{};t.viewports.push({viewportOptions:{...r.viewportOptions,viewportId:0===a?"default":NQ()},displaySets:[]})}}}),e}_getProtocolFromGenerator(e){let{protocol:t}=e({servicesManager:this._servicesManager,commandsManager:this._commandsManager});return{protocol:this._validateProtocol(t)}}getViewportsRequireUpdate(e,t,r=!0){let n,a=[{viewportId:e,displaySetInstanceUIDs:[t]}];if(!r)return a;let{displaySetService:i}=this._servicesManager.services,o=i.getDisplaySetByUID(t);if(o?.unsupported)throw Error("Unsupported displaySet");if(o?.isOverlayDisplaySet)return a;let s=this.protocol,l=s.stages[this.stageIndex].viewports;if(!l)return a;let u=l.find(t=>t.viewportOptions.viewportId===e);if(!u)return a;if(u.displaySets.length>1)throw Error("Cannot update viewport with multiple displaySets yet");if(0===u.displaySets.length||u.viewportOptions.allowUnmatchedView)return a;let{id:c,matchedDisplaySetsIndex:d=0}=u.displaySets[0],h=s.displaySetSelectors[c];if(!h||h.allowUnmatchedView||(this._validateViewportSpecificMatch({displaySetInstanceUIDs:[t],viewportOptions:{},displaySetOptions:[]},u,s.displaySetSelectors),!this.displaySetMatchDetails.get(c)))return a;let p=this._originalProtocol;p instanceof Function||(n=p.stages[this.stageIndex]);let f=[];return l.forEach((e,r)=>{if(e.displaySets.some(e=>e.id===c&&(e.matchedDisplaySetsIndex||0)===d)){if(n){let a=n.viewports[r],i=a.viewportOptions,o=a.displaySets;e.viewportOptions=this.getComputedOptions(i,[t]),e.displaySets=this.getComputedOptions(o,[t])}let a=[],i=[];this._updateDisplaySetInstanceUIDs(e,c,t,this.displaySetMatchDetails,a,i),f.push({viewportId:e.viewportOptions.viewportId,displaySetInstanceUIDs:a,viewportOptions:e.viewportOptions,displaySetOptions:i})}}),f}runMatchingRules(e,t,r){return this.protocolEngine.findMatch(e,t,r)}_updateDisplaySetInstanceUIDs(e,t,r,n,a,i){e.displaySets.forEach(e=>{let{id:o}=e,s=n.get(o),{displaySetInstanceUID:l}=s,u=e.id===t?r:l;s.displaySetInstanceUID=u,a.push(u),i.push(e)})}getComputedOptions(e,t){if(Array.isArray(e))return e.map(e=>this.getComputedOptions(e,t));if(null===e||"object"!=typeof e)return e;if(e.custom){let r=this.displaySets.filter(e=>t.includes(e.displaySetInstanceUID)),n=e.custom;if(!(n in this.customAttributeRetrievalCallbacks))throw Error(`Custom key "${n}" not found in customAttributeRetrievalCallbacks.`);let a=this.customAttributeRetrievalCallbacks[n].callback.call(e,r);return void 0===a&&(a=e.defaultValue),this.getComputedOptions(a,t)}let r={};for(let n in e)void 0!==e[n]&&(r[n]=this.getComputedOptions(e[n],t));return r}setProtocol(e,t={},r=null){let n=this.protocols.get(e);if(!n)return void console.warn(`ProtocolEngine::setProtocol - Protocol with id ${e} not found - you should register it first via addProtocol`);try{let e=this._validateProtocol(n);t&&this._validateOptions(t),this._setProtocol(e,t)}catch(e){throw console.log(e),r&&r(e),Error(e)}this._commandsManager.run(this.protocol?.callbacks?.onProtocolEnter)}matchActivation(e,t={},r){let{displaySetSelectors:n}=this.protocol,{displaySetSelectorsMatched:a=[]}=t;for(let e of a){let t=n[e];if(!t)return console.warn("No display set selector for",e),!1;let{bestMatch:r}=this._matchImages(t);if(!r)return!1}return e>=(t.minViewportsMatched??r)}_updateStageStatus(e=null){let t=this.protocol.stages;for(let r=0;r<t.length;r++){let n=t[r],{matchedViewports:a}=this._matchAllViewports(n,e,new Map),i=n.stageActivation||{};this.matchActivation(a,i.passive,0)?this.matchActivation(a,i.enabled,1)?n.status="enabled":n.status="passive":n.status="disabled"}this._broadcastEvent(this.EVENTS.STAGE_ACTIVATION,{protocol:this.protocol,stages:this.protocol.stages})}_findStageIndex(e=null){let t,r=e?.stageId,n=this.protocol.stages;if(r){for(let e=0;e<n.length;e++){let t=n[e];if(t.id===r&&"disabled"!==t.status)return e}return}let a=e?.stageIndex;if(void 0!==a)return n[a]?.status!=="disabled"?a:void 0;for(let e=0;e<n.length;e++){if("enabled"===n[e].status)return e;void 0===t&&"disabled"!==n[e].status&&(t=e)}return t}_setProtocol(e,t=null){let r=this.getActiveProtocol();try{if(!this.protocol||this.protocol.id!==e.id){this.stageIndex=t?.stageIndex||0,this.customImageLoadPerformed=!1,this._originalProtocol=this._copyProtocol(e),this.protocol?.callbacks?.onProtocolExit&&this._commandsManager.run(this.protocol.callbacks.onProtocolExit),this.protocol=e;let{imageLoadStrategy:r}=e;r?this.registeredImageLoadStrategies[r]instanceof Function&&(this.activeImageLoadStrategyName=r):this.activeImageLoadStrategyName=null,this._updateStageStatus(t)}let r=this._findStageIndex(t);if(void 0===r)throw Error(`Can't find applicable stage ${e.id} ${t?.stageIndex}`);this.stageIndex=r,this.protocol?.callbacks?.onStageChange&&this._commandsManager.run(this.protocol.callbacks.onStageChange),this._updateViewports(t)}catch(e){throw console.log(e),Object.assign(this,r),Error(e)}t?.restoreProtocol!==!0?this._broadcastEvent(LT.EVENTS.PROTOCOL_CHANGED,{viewportMatchDetails:this.viewportMatchDetails,displaySetMatchDetails:this.displaySetMatchDetails,protocol:this.protocol,stageIdx:this.stageIndex,stage:this.protocol.stages[this.stageIndex],activeStudyUID:this.activeStudy?.StudyInstanceUID}):this._broadcastEvent(LT.EVENTS.PROTOCOL_RESTORED,{protocol:this.protocol,stageIdx:this.stageIndex,stage:this.protocol.stages[this.stageIndex],activeStudyUID:this.activeStudy?.StudyInstanceUID})}getStageIndex(e,t){let r=this.getProtocolById(e),{stageId:n,stageIndex:a}=t;return void 0!==n?r.stages.findIndex(e=>e.id===n):void 0!==a?a:0}_getNumProtocolStages(){if(this.protocol&&this.protocol.stages&&this.protocol.stages.length)return this.protocol.stages.length}_getCurrentStageModel(){return this.protocol.stages[this.stageIndex]}getMissingViewport(e,t,r){this.protocol.id!==e&&(console.warn("setting protocol"),this.protocol=this.getProtocolById(e),this.stageIndex=0);let n=this.protocol,a=(n.stages[t]??n.stages[this.stageIndex]).defaultViewport||n.defaultViewport;if(!a)return;let i={...a};return this._matchViewport(i,r)}getDisplaySetSortFunction(){return(e,t)=>{let r=this._getSeriesSortInfoForDisplaySetSort(e),n=this._getSeriesSortInfoForDisplaySetSort(t);return Nq(this._getSeriesFieldForDisplaySetSort())(r,n)}}_updateViewports(e=null){if(!this._getNumProtocolStages())throw Error("No protocol or stages found");this.viewportMatchDetails=new Map,this.displaySetMatchDetails=new Map;let t=this._getCurrentStageModel();if(!t||!t.viewportStructure||!t.viewports||!t.viewports.length)return void console.log("Stage cannot be applied",t);let{layoutType:r}=t.viewportStructure,n=t.viewportStructure.properties;if(!n)return void console.log("No viewportStructure.properties in",t);let{columns:a,rows:i,layoutOptions:o=[]}=n;this.protocol?.callbacks?.onViewportDataInitialized&&this._commandsManager.runCommand("attachProtocolViewportDataListener",{protocol:this.protocol,stageIndex:this.stageIndex}),this._broadcastEvent(this.EVENTS.NEW_LAYOUT,{layoutType:r,numRows:i,numCols:a,layoutOptions:o}),this._matchAllViewports(this.protocol.stages[this.stageIndex],e)}_matchAllViewports(e,t,r=this.viewportMatchDetails,n=this.displaySetMatchDetails){this.activeStudy||=this.studies[0];let a=0;return e.viewports.forEach(e=>{let i=e.viewportOptions.viewportId,o=this._matchViewport(e,t,r,n);o&&(o.displaySetsInfo?.length&&o.displaySetsInfo[0].displaySetInstanceUID?a++:(console.log("Adding an empty set of display sets for mapping purposes"),o.displaySetsInfo=e.displaySets.map(e=>({displaySetOptions:e}))),r.set(i,o))}),{matchedViewports:a,viewportMatchDetails:r,displaySetMatchDetails:n}}findDeduplicatedMatchDetails(e,t,r={}){if(!e)return;if(0===t)return e;let{matchingScores:n=[]}=e;if(-1===t){let{inDisplay:t}=r;if(!t)return e;for(let r=0;r<e.matchingScores.length;r++)if(-1===t.indexOf(e.matchingScores[r].displaySetInstanceUID))return e.matchingScores[r].matchingScore>0?{matchingScores:n,...e.matchingScores[r]}:null;return}let a=n[t];return a?{...a,matchingScores:n}:void 0}validateDisplaySetSelectMatch(e,t,r){if(e.displaySetInstanceUID!==r){if(!e.matchingScores)throw Error("No matchingScores found in "+e);for(let t of e.matchingScores)if(t.displaySetInstanceUID===r)return;throw Error(`Reused viewport details ${t} with ds ${r} not valid`)}}_matchViewport(e,t,r=this.viewportMatchDetails,n=this.displaySetMatchDetails){let a=t?.displaySetSelectorMap||{},{displaySetSelectors:i={}}=this.protocol;for(let t of e.displaySets){let{id:e}=t,r=i[e];if(!r){console.warn("No display set selector for",e);continue}let{bestMatch:a,matchingScores:o}=this._matchImages(r);n.set(e,a),a&&(a.matchingScores=o)}let{viewportOptions:o=LI}=e,s=[],{StudyInstanceUID:l}=this.activeStudy;return e.displaySets.forEach(e=>{let{id:r,matchedDisplaySetsIndex:n=0}=e,i=r&&a[`${l}:${r}:${n||0}`],o=this.displaySetMatchDetails.get(r),u=this.findDeduplicatedMatchDetails(o,n,t);if(i)return void i.forEach(t=>{s.push({displaySetInstanceUID:t,displaySetOptions:e})});if(u){let{displaySetInstanceUID:t}=u;s.push({displaySetInstanceUID:t,displaySetOptions:e})}else console.warn(`
|
|
7
7
|
The hanging protocol viewport is requesting to display ${r} displaySet that is not
|
|
8
8
|
matched based on the provided criteria (e.g. matching rules).
|
|
9
|
-
`)}),{viewportOptions:o,displaySetsInfo:s}}_validateViewportSpecificMatch(e,t,r){let{displaySetService:n}=this._servicesManager.services,a=t.displaySets,i=e.displaySetInstanceUIDs.length;if(a.length>0&&i!==a.length)throw Error(`The number of displaySets to set ${i} does not match the number of displaySets in the protocol ${a} - not currently implemented`);e.displaySetInstanceUIDs.forEach(e=>{let a=n.getDisplaySetByUID(e),{displaySets:i}=t;for(let e of i){let t=r[e.id];t&&this._validateRequiredSelectors(t,a)}})}areRequiredSelectorsValid(e,t){let r=!0;for(let n of e)try{this._validateRequiredSelectors(n,t)}catch(e){r=!1;break}return r}_validateRequiredSelectors(e,t){let{seriesMatchingRules:r}=e,n=r.filter(e=>e.required);if(n.length){let e=this.protocolEngine.findMatch(t,n);if(!e||0===e.score)throw Error(`The displaySetInstanceUID ${t.displaySetInstanceUID} does not satisfy the required seriesMatching criteria for the protocol`)}}_validateOptions(e){let{displaySetService:t}=this._servicesManager.services,{displaySetSelectorMap:r}=e;r&&Object.entries(r).forEach(([e,r])=>{r.forEach(e=>{if(!t.getDisplaySetByUID(e))throw Error(`The displaySetInstanceUID ${e} is not found in the displaySetService`)})})}_matchImages(e){let{id:t,studyMatchingRules:r=[],seriesMatchingRules:n}=e,a=[],i=0;console.log("ProtocolEngine::matchImages",r,n);let o=-1===this.protocol.numberOfPriorsReferenced;this.studies.forEach((e,t)=>{if(o&&this.activeStudy!==e)return;let s=this.displaySets.filter(t=>t.StudyInstanceUID===e.StudyInstanceUID&&!t?.unsupported),l=this.protocolEngine.findMatch(e,r,{studies:this.studies,displaySets:s,allDisplaySets:this.displaySets,displaySetMatchDetails:this.displaySetMatchDetails,studyInstanceUIDsIndex:t});!0!==l.requiredFailed&&(this.debug("study",e.StudyInstanceUID,"display sets #",s.length),s.forEach(t=>{let{StudyInstanceUID:r,SeriesInstanceUID:o,displaySetInstanceUID:u}=t,c=this.protocolEngine.findMatch(t,n,{studies:this.studies,instance:t.images?.[0],displaySetMatchDetails:this.displaySetMatchDetails,displaySets:s});if(!0===c.requiredFailed)return void this.debug("Display set required failed",t,n);this.debug("Found displaySet for rules",t),i=Math.max(c.score,i);let d={passed:[],failed:[]};d.passed=d.passed.concat(c.details.passed),d.passed=d.passed.concat(l.details.passed),d.failed=d.failed.concat(c.details.failed),d.failed=d.failed.concat(l.details.failed);let h=c.score+l.score,p={StudyInstanceUID:r,SeriesInstanceUID:o,displaySetInstanceUID:u,matchingScore:h,matchDetails:d,sortingInfo:{score:h,study:e.StudyInstanceUID,...this._getSeriesSortInfoForDisplaySetSort(t)}};this.debug("Adding display set",t,p),a.push(p)}))}),0===a.length&&console.log("No match found",t);let s=Nq({name:"score",reverse:!0},{name:"study",reverse:!0},this._getSeriesFieldForDisplaySetSort());a.sort((e,t)=>s(e.sortingInfo,t.sortingInfo));let l=a[0];return console.log("ProtocolEngine::matchImages bestMatch",l,a),{bestMatch:l,matchingScores:a}}_getSeriesSortInfoForDisplaySetSort(e){return{[this._getSeriesFieldForDisplaySetSort().name]:null!=e.SeriesNumber?parseInt(e.SeriesNumber):parseInt(e.seriesNumber)}}_getSeriesFieldForDisplaySetSort(){return{name:"series"}}_isNextStageAvailable(){let e=this._getNumProtocolStages();return this.stageIndex+1<e}_isPreviousStageAvailable(){return this.stageIndex-1>=0}_setCurrentProtocolStage(e,t){let r;for(r=this.stageIndex+e;r>=0&&r<this.protocol.stages.length&&"disabled"===this.protocol.stages[r].status;r+=e);return!(r<0)&&!(r>=this.protocol.stages.length)&&(this.stageIndex=r,this.debug(`ProtocolEngine::setCurrentProtocolStage stage = ${this.stageIndex}`),this._updateViewports(t),this._broadcastEvent(this.EVENTS.PROTOCOL_CHANGED,{viewportMatchDetails:this.viewportMatchDetails,displaySetMatchDetails:this.displaySetMatchDetails,protocol:this.protocol,stageIdx:this.stageIndex,stage:this.protocol.stages[this.stageIndex]}),!0)}debug(...e){this.debugLogging&&console.log(...e)}_copyProtocol(e){return NG()(e)}}LT.EVENTS={PROTOCOL_CHANGED:"event::hanging_protocol_changed",PROTOCOL_RESTORED:"event::hanging_protocol_restore",NEW_LAYOUT:"event::hanging_protocol_new_layout",STAGE_ACTIVATION:"event::hanging_protocol_stage_activation",CUSTOM_IMAGE_LOAD_PERFORMED:"event::hanging_protocol_custom_image_load_performed"},LT.REGISTRATION={name:"hangingProtocolService",altName:"HangingProtocolService",create:({configuration:e={},commandsManager:t,servicesManager:r})=>new LT(t,r)};class L_ extends Ni{constructor(){super(L_.EVENTS),this.serviceImplementation={_getState:()=>console.warn("getState() NOT IMPLEMENTED"),_setUser:()=>console.warn("_setUser() NOT IMPLEMENTED"),_getUser:()=>console.warn("_getUser() NOT IMPLEMENTED"),_getAuthorizationHeader:()=>{},_handleUnauthenticated:()=>console.warn("_handleUnauthenticated() NOT IMPLEMENTED"),_reset:()=>console.warn("reset() NOT IMPLEMENTED"),_set:()=>console.warn("set() NOT IMPLEMENTED")},this.serviceImplementation={...this.serviceImplementation}}getState(){return this.serviceImplementation._getState()}setUser(e){return this.serviceImplementation._setUser(e)}getUser(){return this.serviceImplementation._getUser()}getAuthorizationHeader(){return this.serviceImplementation._getAuthorizationHeader()}handleUnauthenticated(){return this.serviceImplementation._handleUnauthenticated()}reset(){return this.serviceImplementation._reset()}set(e){return this.serviceImplementation._set(e)}setServiceImplementation({getState:e,setUser:t,getUser:r,getAuthorizationHeader:n,handleUnauthenticated:a,reset:i,set:o}){e&&(this.serviceImplementation._getState=e),t&&(this.serviceImplementation._setUser=t),r&&(this.serviceImplementation._getUser=r),n&&(this.serviceImplementation._getAuthorizationHeader=n),a&&(this.serviceImplementation._handleUnauthenticated=a),i&&(this.serviceImplementation._reset=i),o&&(this.serviceImplementation._set=o)}}L_.EVENTS={},L_.REGISTRATION={name:"userAuthenticationService",altName:"UserAuthenticationService",create:({configuration:e={}})=>new L_};var LD=u(1752),LA=u.n(LD);let LO={MODE_CUSTOMIZATION_MODIFIED:"event::CustomizationService:modeModified",GLOBAL_CUSTOMIZATION_MODIFIED:"event::CustomizationService:globalModified",DEFAULT_CUSTOMIZATION_MODIFIED:"event::CustomizationService:defaultModified"},LR=((efq={}).Global="global",efq.Mode="mode",efq.Default="default",efq);class LN extends Ni{constructor({configuration:e,commandsManager:t}){super(LO),this.Scope=LR,this.commandsManager=void 0,this.extensionManager=void 0,this.globalCustomizations=new Map,this.modeCustomizations=new Map,this.defaultCustomizations=new Map,this.transformedCustomizations=new Map,this.configuration=void 0,this.configuration=e,this.commandsManager=t}init(e){this.extensionManager=e,this.defaultCustomizations.clear(),this.modeCustomizations.clear(),this.extensionManager.getRegisteredExtensionIds().forEach(e=>{let t=`${e}.customizationModule.default`,r=this._findExtensionValue(t);if(r){let{value:e}=r;this._addReference(e,LR.Default)}let n=`${e}.customizationModule.global`,a=this._findExtensionValue(n);if(a){let{value:e}=a;this._addReference(e,LR.Global)}}),this.configuration?._hasBeenAdded||(this.addReferences(this.configuration),Object.defineProperty(this.configuration,"_hasBeenAdded",{value:!0,writable:!1}))}onModeEnter(){this.clearTransformedCustomizations(),this.init(this.extensionManager)}onModeExit(){this.clearTransformedCustomizations()}clearTransformedCustomizations(){for(let e of(super.reset(),Array.from(this.modeCustomizations.keys())))this.transformedCustomizations.delete(e);this.modeCustomizations.clear()}getCustomization(e){let t=this.transformedCustomizations.get(e);if(t)return t;let r=this.globalCustomizations.get(e)??this.modeCustomizations.get(e)??this.defaultCustomizations.get(e),n=this.transform(r);return void 0!==n&&this.transformedCustomizations.set(e,n),n}setCustomizations(e,t=LR.Mode){Array.isArray(e)?e.forEach(e=>{this._addReference(e,t)}):Object.entries(e).forEach(([e,r])=>{this._setCustomization(e,r,t)})}setCustomization(e,t,r=LR.Mode){console.warn("setCustomization is deprecated. Please use setCustomizations with an object instead."),this._setCustomization(e,t,r)}_setCustomization(e,t,r=LR.Mode){switch(r){case LR.Global:this.setGlobalCustomization(e,t);break;case LR.Mode:this.setModeCustomization(e,t);break;case LR.Default:this.setDefaultCustomization(e,t);break;default:throw Error(`Invalid customization scope: ${r}`)}}getCustomizations(e){return e===LR.Global?this.globalCustomizations:e===LR.Mode?this.modeCustomizations:this.defaultCustomizations}hasCustomization(e){return this.globalCustomizations.has(e)||this.modeCustomizations.has(e)}transform(e){if(!e)return e;let{inheritsFrom:t}=e;if(!t)return e;let r=this.getCustomization(t),n=r?Object.assign({},r,e):e;return n.$transform?.(this)||n}setModeCustomization(e,t){let r=this.defaultCustomizations.get(e),n=this.modeCustomizations.get(e),a=this.globalCustomizations.get(e),i=n||this._cloneIfNeeded(a)||r,o=this._update(i,t);this.modeCustomizations.set(e,o),this.transformedCustomizations.clear(),this._broadcastEvent(this.EVENTS.MODE_CUSTOMIZATION_MODIFIED,{buttons:this.modeCustomizations,button:this.modeCustomizations.get(e)})}setGlobalCustomization(e,t){let r=this.defaultCustomizations.get(e),n=this.globalCustomizations.get(e),a=this._cloneIfNeeded(n)||r;this.globalCustomizations.set(e,this._update(a,t)),this.transformedCustomizations.clear(),this._broadcastEvent(this.EVENTS.GLOBAL_CUSTOMIZATION_MODIFIED,{buttons:this.defaultCustomizations,button:this.defaultCustomizations.get(e)})}setDefaultCustomization(e,t){this.defaultCustomizations.has(e)&&console.warn(`Trying to update existing default for customization ${e}`),this.transformedCustomizations.clear();let r=this.defaultCustomizations.get(e);this.defaultCustomizations.set(e,this._update(r,t)),this._broadcastEvent(this.EVENTS.DEFAULT_CUSTOMIZATION_MODIFIED,{buttons:this.defaultCustomizations,button:this.defaultCustomizations.get(e)})}_findExtensionValue(e){return this.extensionManager.getModuleEntry(e)}registerCustomUpdateCommand(e,t){e.startsWith("$")||(e="$"+e),(0,LD.extend)(e,t)}_update(e,t){return(e||(e=void 0),!function e(t){if(Array.isArray(t)){for(let r of t)if(e(r))return!0}else if(t&&"object"==typeof t){if(t.$$typeof)return!1;for(let r of Object.keys(t))if(r.startsWith("$")&&"$transform"!==r||e(t[r]))return!0}return!1}(t))?t:LA()(e,t)}_cloneIfNeeded(e){return e&&"object"==typeof e?Array.isArray(e)?[...e]:{...e}:e}_addReference(e,t=LR.Global){e&&("string"==typeof e&&(e=this._findExtensionValue(e).value),Object.entries(e).forEach(([e,r])=>{this[t===LR.Global&&"setGlobalCustomization"||t===LR.Default&&"setDefaultCustomization"||"setModeCustomization"](e,r)}))}addReferences(e,t=LR.Global){e&&(Array.isArray(e)?e.forEach(e=>{this._addReference(e,t)}):this._addReference(e,t))}}function LL(){return(LL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}LN.EVENTS=LO,LN.REGISTRATION={name:"customizationService",create:({configuration:e,commandsManager:t})=>new LN({configuration:e,commandsManager:t})},(0,LD.extend)("$filter",(e,t)=>(function e(t,r){if(Array.isArray(t))return"function"==typeof r?t.filter(r):"string"==typeof r?t.filter(e=>e.id!==r):"object"==typeof r&&r.match&&r.$merge?t.map(t=>e(t,r)).map(e=>{var t;return(t=r.match,e&&"object"==typeof e&&Object.entries(t).every(([t,r])=>e[t]===r))?{...e,...r.$merge}:e}):"object"==typeof r&&r.id&&r.$merge?t.map(t=>e(t,r)).map(e=>e.id===r.id?{...e,...r.$merge}:e):t.map(t=>e(t,r));if(t&&"object"==typeof t){let n={...t};for(let[t,a]of Object.entries(n))n[t]=e(a,r);return n}return t})(t,e));let LV={PANELS_CHANGED:"event::panelService:panelsChanged",ACTIVATE_PANEL:"event::panelService:activatePanel"},LF=((ef$={}).Left="left",ef$.Right="right",ef$.Bottom="bottom",ef$);class Lj extends Ni{constructor(e){super(LV),this._extensionManager=void 0,this._panelsGroups=new Map,this._extensionManager=e}get PanelPosition(){return LF}_getPanelComponent(e){let t=this._extensionManager.getModuleEntry(e);if(!t){let t=this._getSimilarPanels(e);if(t.length>0){let r=`Did you mean: ${t.join(", ")}?`;throw Error(`${e} is not a valid entry for an extension module. ${r} Please check your configuration or make sure the extension is registered.`)}throw Error(`${e} is not a valid entry for an extension module, please check your configuration or make sure the extension is registered.`)}if(!t?.component)throw Error(`No component found from extension ${e}. Check the reference string to the extension in your Mode configuration`);let r=t.component;return{entry:t,content:r}}_getSimilarPanels(e,t=.8){return Object.keys(this._extensionManager.modulesMap).filter(e=>e.includes("panelModule")).filter(r=>this._calculateSimilarity(e,r)>=t)}_calculateSimilarity(e,t){let r=new Set(e.toLowerCase().split("")),n=new Set(t.toLowerCase().split("")),a=new Set([...r].filter(e=>n.has(e))),i=new Set([...r,...n]);return a.size/i.size}getPanelData(e){let t,r;if(Array.isArray(e)){let n=e.map(e=>this._getPanelComponent(e));r=n[0].entry,t=e=>er().createElement(er().Fragment,null,n.map(({content:t},r)=>er().createElement(t,LL({key:r},e))))}else({content:t,entry:r}=this._getPanelComponent(e));return{id:r.id,iconName:r.iconName,iconLabel:r.iconLabel,label:r.label,name:r.name,content:t}}addPanel(e,t,r){let n=this._panelsGroups.get(e);n||(n=[],this._panelsGroups.set(e,n));let a=this.getPanelData(t);n.push(a),this._broadcastEvent(LV.PANELS_CHANGED,{position:e,options:r})}addPanels(e,t,r){if(!Array.isArray(t))throw Error('Invalid "panelsIds" array');t.forEach(t=>this.addPanel(e,t,r))}setPanels(e,t){this.reset(),Object.keys(e).forEach(r=>{this.addPanels(r,e[r],t)})}getPanels(e){return[...this._panelsGroups.get(e)??[]]}reset(){let e=Array.from(this._panelsGroups.keys());this._panelsGroups.clear(),e.forEach(e=>this._broadcastEvent(LV.PANELS_CHANGED,{position:e}))}onModeExit(){this.reset()}activatePanel(e,t=!1){this._broadcastEvent(LV.ACTIVATE_PANEL,{panelId:e,forceActive:t})}addActivatePanelTriggers(e,t,r=!1){return t.map(t=>t.sourceEvents.map(n=>t.sourcePubSubService.subscribe(n,()=>this.activatePanel(e,r)))).flat()}}Lj.REGISTRATION={name:"panelService",create:({extensionManager:e})=>new Lj(e)};let LB={ACTIVE_STEP_CHANGED:"event::workflowStepsService:activateStepChanged",STEPS_CHANGED:"event::workflowStepsService:stepsChanged"};class LW extends Ni{constructor(e,t,r){super(LB),this._extensionManager=void 0,this._servicesManager=void 0,this._commandsManager=void 0,this._workflowSteps=void 0,this._activeWorkflowStep=void 0,this._workflowSteps=[],this._activeWorkflowStep=null,this._extensionManager=e,this._commandsManager=t,this._servicesManager=r}get workflowSteps(){return[...this._workflowSteps]}get activeWorkflowStep(){return this._activeWorkflowStep}addWorkflowSteps(e){let t=!1;e.forEach(e=>{if(this._workflowSteps.some(t=>t.id===e.id))throw Error(`Duplicated workflow step id (${e.id})`);this._workflowSteps.push(e),t=!0}),t&&this._broadcastEvent(LB.STEPS_CHANGED,{})}_updateToolBar(e){let{toolbarService:t}=this._servicesManager.services,{toolbarButtons:r}=e;(Array.isArray(r)?r:[r]).forEach(({buttonSection:e,buttons:r})=>{t.clearButtonSection(e),t.updateSection(e,r)})}_updatePanels(e){let{panelService:t}=this._servicesManager.services,r=e?.layout?.panels;r&&t.setPanels(r,e?.layout?.options)}_updateHangingProtocol(e){let{hangingProtocol:t}=e;t&&this._commandsManager.runCommand("setHangingProtocol",{protocolId:t.protocolId,stageId:t.stageId,stageIndex:t.stageIndex})}_invokeCallbacks(e){if(!e)return;let t=this._commandsManager;Array.isArray(e)||(e=[e]),e.forEach(e=>{let r=e;if(e?.commandName){let{commandName:n,options:a}=e;r=()=>t.runCommand(n,a)}r()})}setActiveWorkflowStep(e){let t=this._activeWorkflowStep;if(e===t?.id)return;let r=this._workflowSteps.find(t=>t.id===e);if(!r)throw Error(`Invalid workflowStepId (${e})`);this._activeWorkflowStep&&this._invokeCallbacks(t.onExit),this._invokeCallbacks(r.onEnter),this._activeWorkflowStep=r,this._updateToolBar(r),this._updatePanels(r),this._updateHangingProtocol(r),this._broadcastEvent(LB.ACTIVE_STEP_CHANGED,{activeWorkflowStep:r})}reset(){this._activeWorkflowStep=null,this._workflowSteps=[]}onModeEnter(){this.reset()}}LW.REGISTRATION={name:"workflowStepsService",create:({extensionManager:e,commandsManager:t,servicesManager:r})=>new LW(e,t,r)};var LU=((efK=LU||{}).Interaction="interaction",efK.Thumbnail="thumbnail",efK.Prefetch="prefetch",efK.Compute="compute",efK);let Lz={SERVICE_STARTED:"event::studyPrefetcherService:started",SERVICE_STOPPED:"event::studyPrefetcherService:stopped",DISPLAYSET_LOAD_PROGRESS:"event::studyPrefetcherService:displaySetLoadProgress",DISPLAYSET_LOAD_COMPLETE:"event::studyPrefetcherService:displaySetLoadComplete"};var LH=((efY=LH||{}).closest="closest",efY.downward="downward",efY.upward="upward",efY);class LG extends Ni{constructor({servicesManager:e,extensionManager:t,configuration:r}){super(Lz),this._extensionManager=void 0,this._servicesManager=void 0,this._subscriptions=void 0,this._activeDisplaySetsInstanceUIDs=[],this._pendingRequests=[],this._inflightRequests=new Map,this._isRunning=!1,this._displaySetLoadingStates=new Map,this._imageIdsToDisplaySetsMap=new Map,this.config={enabled:!1,displaySetsCount:1,maxNumPrefetchRequests:10,order:LH.downward},this.requestType=LU.Prefetch,this.cache=void 0,this.imageLoadPoolManager=void 0,this.imageLoader=void 0,this.imageLoadEventsManager=void 0,this._servicesManager=e,this._extensionManager=t,this._subscriptions=[],Object.assign(this.config,r)}onModeEnter(){this._addEventListeners()}onModeExit(){this._removeEventListeners(),this._stopPrefetching()}_addImageLoadingEventsListeners(){let e=e=>{this._inflightRequests.get(e)||this._sendNextRequests()},t=t=>{let{image:r}=t.detail,{imageId:n}=r;this._moveImageIdToLoadedSet(n),e(n)},r=t=>{let{imageId:r}=t.detail;this._moveImageIdToFailedSet(r),e(r)};return this.imageLoadEventsManager.addEventListeners(t,r)}_addServicesListeners(){let{displaySetService:e,viewportGridService:t}=this._servicesManager.services;return[e.subscribe(e.EVENTS.DISPLAY_SETS_CHANGED,()=>this._syncWithActiveViewport({forceRestart:!0})),t.subscribe(NU.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED,({viewportId:e})=>this._syncWithActiveViewport({activeViewportId:e})),t.subscribe(NU.EVENTS.LAYOUT_CHANGED,()=>this._syncWithActiveViewport()),t.subscribe(NU.EVENTS.GRID_STATE_CHANGED,()=>this._syncWithActiveViewport()),t.subscribe(NU.EVENTS.VIEWPORTS_READY,()=>{this._syncWithActiveViewport(),this._startPrefetching()})]}_addEventListeners(){let e=this._addImageLoadingEventsListeners(),t=this._addServicesListeners();this._subscriptions.push(...e),this._subscriptions.push(...t)}_removeEventListeners(){this._subscriptions.forEach(e=>e.unsubscribe()),this._subscriptions=[]}_syncWithActiveViewport({activeViewportId:e,forceRestart:t}={}){let{viewportGridService:r}=this._servicesManager.services,n=r.getState(),{viewports:a}=n;if(!(e=e??n.activeViewportId))return;let i=a.get(e);if(!i)return;let o=this._setActiveDisplaySetsUIDs(i.displaySetInstanceUIDs);(t||o)&&this._restartPrefetching()}_setActiveDisplaySetsUIDs(e){return!(e.length===this._activeDisplaySetsInstanceUIDs.length&&e.every(e=>this._activeDisplaySetsInstanceUIDs.includes(e)))&&(this._activeDisplaySetsInstanceUIDs=[...e],this._restartPrefetching(),!0)}_areActiveDisplaySetsLoaded(){let{_activeDisplaySetsInstanceUIDs:e}=this;return e.length&&e.every(e=>this._displaySetLoadingStates.get(e).loadingProgress>=1)}_getClosestDisplaySets(e,t){let r=[],n=t-1,a=t+1;for(;n>=0||a<e.length;)n>=0&&(r.push(e[n]),n--),a<e.length&&(r.push(e[a]),a++);return r}_getDownwardDisplaySets(e,t){let r=[];for(let n=t+1;n<e.length;n++)r.push(e[n]);return r}_getUpwardDisplaySets(e,t){let r=[];for(let n=t-1;n>=0&&n!==t;n--)r.push(e[n]);return r}_getSortedDisplaySetsToPrefetch(e){if(!this._activeDisplaySetsInstanceUIDs?.length)return[];let{displaySetsCount:t}=this.config,r=this._activeDisplaySetsInstanceUIDs,[n]=r,a=e.findIndex(e=>e.displaySetInstanceUID===n),i={[LH.closest]:this._getClosestDisplaySets,[LH.downward]:this._getDownwardDisplaySets,[LH.upward]:this._getUpwardDisplaySets},{order:o}=this.config,s=i[o];if(!s)throw Error(`Invalid order (${o})`);let l=new Set(r);return s.call(this,e,a).filter(e=>!l.has(e.displaySetInstanceUID)).slice(0,t)}_getDisplaySets(){let{displaySetService:e}=this._servicesManager.services,t=[...e.getActiveDisplaySets()],r=this._getSortedDisplaySetsToPrefetch(t);return{displaySets:t,displaySetsToPrefetch:r}}_updateImageIdsDisplaySetMap(e,t){for(let r of t){let t=this._imageIdsToDisplaySetsMap.get(r);t||(t=new Set,this._imageIdsToDisplaySetsMap.set(r,t)),t.add(e)}}_getImageIdsForDisplaySet(e){return this._extensionManager.getActiveDataSource()[0].getImageIdsForDisplaySet(e)}_updateDisplaySetLoadingProgress(e){let{numInstances:t,loadedImageIds:r,failedImageIds:n}=e;e.loadingProgress=(r.size+n.size)/t}_addDisplaySetLoadingState(e){let{displaySetInstanceUID:t}=e,r=this._getImageIdsForDisplaySet(e),n=this._displaySetLoadingStates.get(t);if(n)return;let a=new Set(r),i=new Set;for(let e of r)this.cache.isImageCached(e)?i.add(e):a.add(e);n={displaySetInstanceUID:t,numInstances:r.length,pendingImageIds:a,loadedImageIds:i,failedImageIds:new Set,loadingProgress:0},this._updateDisplaySetLoadingProgress(n),this._displaySetLoadingStates.set(t,n),this._updateImageIdsDisplaySetMap(t,r),i.size&&this._triggerDisplaySetEvents(t)}_loadDisplaySets(){let{displaySets:e,displaySetsToPrefetch:t}=this._getDisplaySets();e.forEach(e=>this._addDisplaySetLoadingState(e)),t.forEach(e=>this._enqueueDisplaySetImagesRequests(e))}_moveImageIdToLoadedSet(e){let t=this._imageIdsToDisplaySetsMap.get(e);if(t){for(let r of Array.from(t.values())){let t=this._displaySetLoadingStates.get(r),{pendingImageIds:n,loadedImageIds:a}=t;n.delete(e),a.add(e),this._updateDisplaySetLoadingProgress(t),this._triggerDisplaySetEvents(r)}return!0}}_moveImageIdToFailedSet(e){let t=this._imageIdsToDisplaySetsMap.get(e);if(t){for(let r of Array.from(t.values())){let t=this._displaySetLoadingStates.get(r),{pendingImageIds:n,failedImageIds:a}=t;n.delete(e),a.add(e),this._updateDisplaySetLoadingProgress(t),this._triggerDisplaySetEvents(r)}return!0}}_triggerDisplaySetEvents(e){let{loadingProgress:t,numInstances:r}=this._displaySetLoadingStates.get(e);this._broadcastEvent(this.EVENTS.DISPLAYSET_LOAD_PROGRESS,{displaySetInstanceUID:e,numInstances:r,loadingProgress:t}),t>=1&&this._broadcastEvent(this.EVENTS.DISPLAYSET_LOAD_COMPLETE,{displaySetInstanceUID:e})}_onImagePrefetchSuccess(e){if(e.aborted)return;let{imageId:t}=e;this._inflightRequests.delete(t),this._moveImageIdToLoadedSet(t),this._sendNextRequests()}_onImagePrefetchFailed(e,t){if(e.aborted)return;console.warn(`An error ocurred when trying to load "${e.imageId}"`,t);let{imageId:r}=e;this._inflightRequests.delete(r),this._moveImageIdToFailedSet(r),this._sendNextRequests()}async _sendNextRequests(){if(!this._isRunning||!this._areActiveDisplaySetsLoaded())return;let{_pendingRequests:e,_inflightRequests:t}=this,{maxNumPrefetchRequests:r}=this.config;if(!e.length||t.size>=r)return;let n=Math.min(e.length,r-t.size);this._pendingRequests.splice(0,n).forEach(e=>{let{imageId:r}=e,n={priority:-5,requestType:this.requestType,additionalDetails:{imageId:r},preScale:{enabled:!0}};this.imageLoadPoolManager.addRequest(async()=>this.imageLoader.loadAndCacheImage(r,n).then(t=>this._onImagePrefetchSuccess(e),t=>this._onImagePrefetchFailed(e,t)),this.requestType,{imageId:r}),t.set(r,e)})}_enqueueDisplaySetImagesRequests(e){let{displaySetInstanceUID:t}=e;this._getImageIdsForDisplaySet(e).forEach(e=>{this.cache.isImageCached(e)?this._moveImageIdToLoadedSet(e):this._pendingRequests.push({displaySetInstanceUID:t,imageId:e,aborted:!1})})}_startPrefetching(){if(!this._isRunning){if(!this.config.enabled)return void console.log("StudyPrefetcher is not enabled");this._isRunning=!0,this._loadDisplaySets(),this._sendNextRequests(),this._broadcastEvent(this.EVENTS.SERVICE_STARTED,{})}}_stopPrefetching(){this._isRunning&&(this._isRunning=!1,this._inflightRequests.forEach(e=>e.aborted=!0),this._pendingRequests=[],this._displaySetLoadingStates.clear(),this._imageIdsToDisplaySetsMap.clear(),this._inflightRequests.clear(),this.imageLoadPoolManager.clearRequestStack(this.requestType),this._broadcastEvent(this.EVENTS.SERVICE_STOPPED,{}))}_restartPrefetching(){this._isRunning&&(this._stopPrefetching(),this._startPrefetching())}}LG.REGISTRATION={name:"studyPrefetcherService",altName:"StudyPrefetcherService",create:({configuration:e,servicesManager:t,extensionManager:r})=>new LG({servicesManager:t,extensionManager:r,configuration:e})};class Lq{constructor(e,t){this.numberOfScreens=void 0,this.windowsConfig=void 0,this.screenConfig=void 0,this.launchWindows=[],this.basePath=void 0,this.screenNumber=void 0,this.isMultimonitor=void 0,this.setLaunchWindows=e=>{this.launchWindows=e,window.multimonitor.launchWindows=e};const r=new URLSearchParams(window.location.search),n=r.get("screenNumber"),a=r.get("multimonitor"),i={params:r,screenNumber:n,multimonitor:a};this.screenNumber=n?Number(n):-1,this.commandsManager=t;const o=window;for(const r of(o.multimonitor||={setLaunchWindows:this.setLaunchWindows,launchWindows:this.launchWindows,commandsManager:t},o.multimonitor.commandsManager=t,this.launchWindows=window.multimonitor?.launchWindows||this.launchWindows,-1!==this.screenNumber&&(this.launchWindows[this.screenNumber]=window),o.commandsManager=(...t)=>e.commandsManager,Array.isArray(e)?e:[])){if(r.test(i)){if(this.isMultimonitor=!0,this.numberOfScreens=r.screens.length,this.windowsConfig=r,-1===this.screenNumber||null===this.screenNumber)this.screenConfig=Lq.SOURCE_SCREEN;else{if(this.screenConfig=r.screens[this.screenNumber],!this.screenConfig)throw Error(`Screen ${n} not configured in ${this.windowsConfig}`);window.name=this.screenConfig.id}return}this.numberOfScreens=1,this.isMultimonitor=!1}}async run(e=1,t,r){let n=(this.screenNumber+(e??1))%this.numberOfScreens,a=await this.getWindow(n);a?a.multimonitor?.commandsManager?a.multimonitor.commandsManager.runAsync(t,r):console.warn("Didn't find a commands manager to run in the other window",a):console.warn("No multimonitor found for screen",n,t)}async launchWindow(e,t=1,r=""){let n=(this.screenNumber+t)%this.numberOfScreens;return this.getWindow(n,e?`StudyInstanceUIDs=${e}${r}`:"")}async getWindow(e,t){return e===this.screenNumber?window:this.launchWindows[e]&&!this.launchWindows[e].closed?this.launchWindows[e]:await this.createWindow(e,t)}async createWindow(e,t){if(e===this.screenNumber)return window;let r=this.windowsConfig.screens[e],n=await window.getScreenDetails?.(),{width:a=1024,height:i=1024,availLeft:o=0,availTop:s=0}=r.screen>=0&&n.screens[r.screen]||n.currentScreen||window.screen||{},l=this.windowsConfig.screens[e],{width:u=1,height:c=1,top:d=0,left:h=0}=l.location||{},p=Math.round(o+h*a),f=Math.round(s+d*i),m=Math.round(a*u),g=Math.round(i*c),y=`${this.basePath}&screenNumber=${e}`,v=t?`${y}#${t}`:y,b=l.id,w=l.options||"",x=`screenX=${p},screenY=${f},width=${m},height=${g},${w}`,C=window.open("",b,x);return(C?.location.href.startsWith(y)||(C=window.open(v,b,x)),C)?(await new Promise(e=>{"complete"===C.document.readyState?e():C.addEventListener("load",()=>e())}),this.launchWindows[e]=C,C):void console.warn("Unable to launch window",v,"called",b,"at",x)}launchAll(){for(let e=0;e<this.numberOfScreens;e++)this.createWindow(e)}setBasePath(){let e=new URL(window.location.href);e.searchParams.delete("screenNumber"),e.searchParams.delete("protocolId"),e.searchParams.delete("launchAll"),e.searchParams.set("multimonitor",e.searchParams.get("multimonitor")||"split"),e.hash="",this.basePath=e.toString()}async onModeEnter(){this.setBasePath(),(this.isMultimonitor&&-1===this.screenNumber||-1!==window.location.href.toLowerCase().indexOf("launchall"))&&this.launchAll()}}Lq.SOURCE_SCREEN={id:"source",launch:"source",screen:null,location:{screen:null,width:1,height:1,left:0,top:0}},Lq.REGISTRATION={name:"multiMonitorService",create:({configuration:e,commandsManager:t})=>new Lq(e,t)};class L$ extends Ni{constructor({commandsManager:e,servicesManager:t,serviceProvidersManager:r,hotkeysManager:n,appConfig:a={}}){super(L$.EVENTS),this._commandsManager=void 0,this._servicesManager=void 0,this._hotkeysManager=void 0,this._serviceProvidersManager=void 0,this.modulesMap=void 0,this.modules=void 0,this.registeredExtensionIds=void 0,this.moduleTypeNames=void 0,this._appConfig=void 0,this._extensionLifeCycleHooks=void 0,this.dataSourceMap=void 0,this.dataSourceDefs=void 0,this._activeDataSourceName=void 0,this.registerExtensions=async(e,t=[])=>{for(let r=0;r<e.length;r++){let n=e[r],a=Array.isArray(n);try{if(a){let e=n[0],r=n[1];await this.registerExtension(e,r,t)}else await this.registerExtension(n,{},t)}catch(e){console.error(e)}}},this.registerExtension=async(e,t={},r=[])=>{if(!e)throw Error("Attempting to register a null/undefined extension.");let n=e.id;if(!n)throw R6.warn(e),Error("Extension ID not set");this.registeredExtensionIds.includes(n)?R6.warn(`Extension ID ${n} has already been registered. Exiting before duplicating modules.`):(e.preRegistration&&await e.preRegistration({servicesManager:this._servicesManager,serviceProvidersManager:this._serviceProvidersManager,commandsManager:this._commandsManager,hotkeysManager:this._hotkeysManager,extensionManager:this,appConfig:this._appConfig,configuration:t}),e.onModeEnter&&(this._extensionLifeCycleHooks.onModeEnter[n]=e.onModeEnter),e.onModeExit&&(this._extensionLifeCycleHooks.onModeExit[n]=e.onModeExit),this.moduleTypeNames.forEach(a=>{let i=this._getExtensionModule(a,e,n,t);if(i){switch(a){case R8.COMMANDS:this._initCommandsModule(i);break;case R8.DATA_SOURCE:this._initDataSourcesModule(i,n,r);break;case R8.HANGING_PROTOCOL:this._initHangingProtocolsModule(i,n);break;case R8.PANEL:this._initPanelModule(i,n);break;case R8.TOOLBAR:this._initToolbarModule(i,n);break;case R8.VIEWPORT:case R8.SOP_CLASS_HANDLER:case R8.CONTEXT:case R8.LAYOUT_TEMPLATE:case R8.CUSTOMIZATION:case R8.STATE_SYNC:case R8.UTILITY:this.processExtensionModule(i,n,a);break;default:throw Error(`Module type invalid: ${a}`)}this.modules[a].push({extensionId:n,module:i})}}),this.registeredExtensionIds.push(n))},this.getModuleEntry=e=>this.modulesMap[e],this.getModulesByType=e=>this.modules[e],this.getDataSources=e=>(e||(e=this._activeDataSourceName),this.dataSourceMap[e]),this.getDataSourceInstance=e=>this.dataSourceMap[e][0],this.getActiveDataSource=()=>this.dataSourceMap[this._activeDataSourceName],this.getActiveDataSourceOrNull=()=>this.dataSourceMap[this._activeDataSourceName]?.[0]??null,this.getDataSourceDefinition=e=>(void 0===e&&(e=this._activeDataSourceName),this.dataSourceDefs[e]),this.getActiveDataSourceDefinition=()=>this.getDataSourceDefinition(this._activeDataSourceName),this.getDataSourcesForUI=()=>{if(this._appConfig?.allowMultiSelectExport===!1)return[];let e=Object.keys(this.dataSourceMap).filter(e=>{let t=this.dataSourceDefs[e]?.configuration,r=this.dataSourceDefs[e].sourceName!==this._activeDataSourceName;return(t?.supportsStow??t?.wadoRoot)&&r});return[this._activeDataSourceName,...e].map(e=>({value:e,label:e,placeHolder:e}))},this._getExtensionModule=(e,t,r,n)=>{var a;let i="get"+((a=e).charAt(0).toUpperCase()+a.substring(1));if(t[i])try{let e=t[i]({appConfig:this._appConfig,commandsManager:this._commandsManager,servicesManager:this._servicesManager,hotkeysManager:this._hotkeysManager,extensionManager:this,configuration:n});return e||R6.warn(`Null or undefined returned when registering the ${i} module for the ${r} extension`),e}catch(e){throw console.error(e),Error(`Exception thrown while trying to call ${i} for the ${r} extension`)}},this._initHangingProtocolsModule=(e,t)=>{let{hangingProtocolService:r}=this._servicesManager.services;e.forEach(({name:e,protocol:t})=>{t&&r.addProtocol(e,t)})},this._initPanelModule=(e,t)=>{this.processExtensionModule(e,t,R8.PANEL)},this._initToolbarModule=(e,t)=>{let{toolbarService:r}=this._servicesManager.services;e.forEach(e=>{e.evaluate&&r.registerEvaluateFunction(e.name,e.evaluate)})},this._initCommandsModule=e=>{let{definitions:t,defaultContext:r}=e;t&&0!==Object.keys(t).length?(r=r||"VIEWER",this._commandsManager.getContext(r)||this._commandsManager.createContext(r),Object.keys(t).forEach(e=>{let n=t[e];"function"==typeof n&&(n={commandFn:n}),n.context&&!this._commandsManager.getContext(n.context)&&this._commandsManager.createContext(n.context),this._commandsManager.registerCommand(n.context||r,e,n)})):R6.warn("Commands Module contains no command definitions")},this.modules={},this.registeredExtensionIds=[],this.moduleTypeNames=Object.values(R8),this._commandsManager=e,this._servicesManager=t,this._serviceProvidersManager=r,this._hotkeysManager=n,this._appConfig=a,this.modulesMap={},this.moduleTypeNames.forEach(e=>{this.modules[e]=[]}),this._extensionLifeCycleHooks={onModeEnter:{},onModeExit:{}},this.dataSourceMap={},this.dataSourceDefs={},this.defaultDataSourceName=a.defaultDataSourceName,this._activeDataSourceName=a.defaultDataSourceName,this.peerImport=a.peerImport}setActiveDataSource(e){this._activeDataSourceName!==e&&(this._activeDataSourceName=e,this._broadcastEvent(L$.EVENTS.ACTIVE_DATA_SOURCE_CHANGED,this.dataSourceDefs[this._activeDataSourceName]))}getRegisteredExtensionIds(){return[...this.registeredExtensionIds]}getUniqueServicesList(e){return Array.from(new Set(Object.values(e.services)))}onModeEnter(){let{registeredExtensionIds:e,_servicesManager:t,_commandsManager:r,_hotkeysManager:n,_extensionLifeCycleHooks:a}=this;for(let e of this.getUniqueServicesList(t))e?.onModeEnter?.();e.forEach(e=>{let i=a.onModeEnter[e];"function"==typeof i&&i({servicesManager:t,commandsManager:r,hotkeysManager:n,extensionManager:this})})}onModeExit(){let{registeredExtensionIds:e,_servicesManager:t,_commandsManager:r,_extensionLifeCycleHooks:n}=this,a=this.getUniqueServicesList(t);for(let i of(e.forEach(e=>{let a=n.onModeExit[e];"function"==typeof a&&a({servicesManager:t,commandsManager:r})}),a))try{i?.onModeExit?.()}catch(e){console.warn("onModeExit caught",e)}}processExtensionModule(e,t,r){e.forEach(e=>{if(!e.name)throw Error(`Extension ID ${t} module ${r} element has no name`);let n=`${t}.${r}.${e.name}`;e.id=n,this.modulesMap[n]=e})}addDataSource(e,t={activate:!1}){let r=this.getDataSources(e.sourceName);!r?.[0]&&(this._createDataSourceInstance(e),t.activate&&this.setActiveDataSource(e.sourceName))}updateDataSourceConfiguration(e,t){let r=this.getDataSources(e);if(!r?.[0])return;let n=this.dataSourceDefs[e];n.configuration=t,this._createDataSourceInstance(n),this._activeDataSourceName===e&&this._broadcastEvent(L$.EVENTS.ACTIVE_DATA_SOURCE_CHANGED,n)}_createDataSourceInstance(e){let t=this.getModuleEntry(e.namespace);if(!t)return;this.dataSourceDefs[e.sourceName]=e;let r=t.createDataSource(e.configuration,this._servicesManager,this);this.dataSourceMap[e.sourceName]=[r]}_initDataSourcesModule(e,t,r=[]){e.forEach(e=>{this.modulesMap[`${t}.${R8.DATA_SOURCE}.${e.name}`]=e}),e.forEach(e=>{let n=`${t}.${R8.DATA_SOURCE}.${e.name}`;r.forEach(e=>{e.namespace===n&&this.addDataSource(e)})})}get appConfig(){return this._appConfig}get activeDataSourceName(){return this._activeDataSourceName}}L$.EVENTS={ACTIVE_DATA_SOURCE_CHANGED:"event::activedatasourcechanged"},L$.MODULE_TYPES=R8;var LK=u(2203),LY=u.n(LK);let LX=[{commandName:"setToolActive",commandOptions:{toolName:"Zoom"},label:"Zoom",keys:["z"],isEditable:!0},{commandName:"scaleUpViewport",label:"Zoom In",keys:["+"],isEditable:!0},{commandName:"scaleDownViewport",label:"Zoom Out",keys:["-"],isEditable:!0},{commandName:"fitViewportToWindow",label:"Zoom to Fit",keys:["="],isEditable:!0},{commandName:"rotateViewportCW",label:"Rotate Right",keys:["r"],isEditable:!0},{commandName:"rotateViewportCCW",label:"Rotate Left",keys:["l"],isEditable:!0},{commandName:"flipViewportHorizontal",label:"Flip Horizontally",keys:["h"],isEditable:!0},{commandName:"flipViewportVertical",label:"Flip Vertically",keys:["v"],isEditable:!0},{commandName:"toggleCine",label:"Cine",keys:["c"]},{commandName:"invertViewport",label:"Invert",keys:["i"],isEditable:!0},{commandName:"incrementActiveViewport",label:"Next Image Viewport",keys:["right"],isEditable:!0},{commandName:"decrementActiveViewport",label:"Previous Image Viewport",keys:["left"],isEditable:!0},{commandName:"updateViewportDisplaySet",commandOptions:{direction:-1},label:"Previous Series",keys:["pageup"],isEditable:!0},{commandName:"updateViewportDisplaySet",commandOptions:{direction:1},label:"Next Series",keys:["pagedown"],isEditable:!0},{commandName:"nextStage",context:"DEFAULT",label:"Next Stage",keys:["."],isEditable:!0},{commandName:"previousStage",context:"DEFAULT",label:"Previous Stage",keys:[","],isEditable:!0},{commandName:"nextImage",label:"Next Image",keys:["down"],isEditable:!0},{commandName:"previousImage",label:"Previous Image",keys:["up"],isEditable:!0},{commandName:"firstImage",label:"First Image",keys:["home"],isEditable:!0},{commandName:"lastImage",label:"Last Image",keys:["end"],isEditable:!0},{commandName:"resetViewport",label:"Reset",keys:["space"],isEditable:!0},{commandName:"cancelMeasurement",label:"Cancel Measurement",keys:["esc"]},{commandName:"setWindowLevelPreset",commandOptions:{presetName:"ct-soft-tissue",presetIndex:0},label:"W/L Preset 1",keys:["1"]},{commandName:"setWindowLevelPreset",commandOptions:{presetName:"ct-lung",presetIndex:1},label:"W/L Preset 2",keys:["2"]},{commandName:"setWindowLevelPreset",commandOptions:{presetName:"ct-bone",presetIndex:2},label:"W/L Preset 3",keys:["3"]},{commandName:"setWindowLevelPreset",commandOptions:{presetName:"ct-brain",presetIndex:3},label:"W/L Preset 4",keys:["4"]},{commandName:"deleteActiveAnnotation",label:"Delete Annotation",keys:["backspace"]},{commandName:"acceptPreview",label:"Accept Preview",keys:["enter"]},{commandName:"rejectPreview",label:"Reject Preview",keys:["esc"]},{commandName:"undo",label:"Undo",keys:["ctrl+z"],isEditable:!0},{commandName:"redo",label:"Redo",keys:["ctrl+y"],isEditable:!0},{commandName:"interpolateScrollForMarkerLabelmap",label:"Interpolate Scroll",keys:["n"],isEditable:!0},{commandName:"increaseBrushSize",label:"Increase Brush Size",keys:["]"],isEditable:!0},{commandName:"decreaseBrushSize",label:"Decrease Brush Size",keys:["["],isEditable:!0},{commandName:"setToolActive",commandOptions:{toolName:"CircularEraser"},label:"Eraser",keys:["e"],isEditable:!0},{commandName:"setToolActive",commandOptions:{toolName:"CircularBrush"},label:"Brush",keys:["b"],isEditable:!0},{commandName:"addNewSegment",label:"Add New Segment",keys:["a"],isEditable:!0}],LZ=function({generateHash:e}){try{let t=localStorage.getItem("hotkey-definitions"),r=localStorage.getItem("hotkeys-migrated");if(!t||"true"===r)return;let n=JSON.parse(t);if(!Array.isArray(n)||0===n.length)return;let a=LX||[],i=JSON.parse(localStorage.getItem("user-preferred-keys")||"{}");n.forEach(t=>{if(!t.commandName||!t.keys)return;let r=a.find(e=>{let r=e.commandName===t.commandName,n=t.commandOptions||{},a=e.commandOptions||{},i=JSON.stringify(n)===JSON.stringify(a);return r&&i});r&&JSON.stringify(r.keys)===JSON.stringify(t.keys)||(i[e({commandName:t.commandName,commandOptions:t.commandOptions||{}})]=t.keys,console.debug(`HotkeysManager: Migrated custom hotkey for ${t.commandName}`))}),localStorage.setItem("user-preferred-keys",JSON.stringify(i)),localStorage.setItem("hotkeys-migrated","true"),localStorage.removeItem("hotkey-definitions"),console.debug("HotkeysManager: Successfully migrated hotkey definitions to new format")}catch(e){console.error("HotkeysManager: Error migrating hotkey definitions",e),localStorage.setItem("hotkeys-migrated","false")}};class LJ{constructor(e,t){this._servicesManager=void 0,this._commandsManager=void 0,this.isEnabled=!0,this.hotkeyDefinitions={},this.hotkeyDefaults=[],this.EVENTS=void 0,this.listeners={},this.subscribe=void 0,this._broadcastEvent=void 0,this._unsubscribe=void 0,this._isValidEvent=void 0,this._servicesManager=t,this._commandsManager=e,this.EVENTS=LJ.EVENTS,this.subscribe=Ne.subscribe.bind(this),this._broadcastEvent=Ne._broadcastEvent.bind(this),this._unsubscribe=Ne._unsubscribe.bind(this),this._isValidEvent=Ne._isValidEvent.bind(this),LZ({generateHash:this.generateHash})}record(e){return N5.record(e)}cancel(){N5.stopRecord(),N5.unpause()}disable(){this.isEnabled=!1,N5.pause()}enable(){this.isEnabled=!0,N5.unpause()}restoreDefaultBindings(){this.setHotkeys(this.hotkeyDefaults)}destroy(){this.hotkeyDefaults=[],this.hotkeyDefinitions={},N5.reset()}setHotkeys(e=[]){try{this.getValidDefinitions(e).forEach(e=>this.registerHotkeys(e))}catch(t){let{uiNotificationService:e}=this._servicesManager.services;e.show({title:"Hotkeys Manager",message:"Error while setting hotkeys",type:"error"})}}generateHash(e){return LY()({commandName:e.commandName,commandOptions:e.commandOptions||{}})}setDefaultHotKeys(e=[]){let t=this.getValidDefinitions(e);this.hotkeyDefaults=t;let r=JSON.parse(localStorage.getItem("user-preferred-keys")||"{}"),n=t.map(e=>{let t=this.generateHash(e);return r[t]?{...e,keys:r[t]}:e});this.setHotkeys(n)}getValidDefinitions(e){let t=Array.isArray(e)?[...e]:this._parseToArrayLike(e);return t.forEach(e=>{void 0===e.isEditable&&(e.isEditable=!0)}),t}getValidHotkeyDefinitions(e){let t=this.getValidDefinitions(e),r={};return t.forEach(e=>{let{commandName:t,commandOptions:n}=e;r[LY()({commandName:t,commandOptions:n})]=e}),r}_parseToArrayLike(e={}){return Object.entries({...e}).map(e=>this._parseToHotKeyObj(e[0],e[1]))}_parseToHotKeyObj(e,t){return{commandName:e,...t}}registerHotkeys({commandName:e,commandOptions:t={},context:r,keys:n,label:a,isEditable:i}){if(!e)throw Error(`No command was defined for hotkey "${n}"`);let o=this.generateHash({commandName:e,commandOptions:t}),s=this.hotkeyDefinitions[o];if(s&&s.keys===n)return void console.debug("HotkeysManager: Identical hotkey registration skipped.");let l=JSON.parse(localStorage.getItem("user-preferred-keys")||"{}");s&&(l[o]=n,localStorage.setItem("user-preferred-keys",JSON.stringify(l)),this._unbindHotkeys(e,s.keys)),this.hotkeyDefinitions[o]={commandName:e,commandOptions:t,keys:n,label:a,isEditable:i},this._bindHotkeys(e,t,r,n)}_bindHotkeys(e,t={},r,n){if(""===n||void 0===n)return;let a=n instanceof Array?n.join("+"):n;N5.bind(a,n=>{n.preventDefault(),n.stopPropagation(),this._commandsManager.runCommand(e,{evt:n,...t},r),this._broadcastEvent(LJ.EVENTS.HOTKEY_PRESSED,{commandName:e,commandOptions:t,keys:a,context:r,evt:n})})}_unbindHotkeys(e,t){if(""!==t&&void 0!==t){if(t instanceof Array){let r=t.join("+");this._unbindHotkeys(e,r);return}N5.unbind(t)}}}LJ.EVENTS={HOTKEY_PRESSED:"event::hotkeysManager:hotkeyPressed"};var LQ=u(313),L1=u.n(LQ);(efX=emM||(emM={})).ERROR_EVENT="CORNERSTONE_ERROR",efX.CACHE_SIZE_EXCEEDED="CACHE_SIZE_EXCEEDED",efX.IMAGE_LOAD_ERROR="IMAGE_LOAD_ERROR",efX.CAMERA_MODIFIED="CORNERSTONE_CAMERA_MODIFIED",efX.CAMERA_RESET="CORNERSTONE_CAMERA_RESET",efX.VOI_MODIFIED="CORNERSTONE_VOI_MODIFIED",efX.PRESET_MODIFIED="CORNERSTONE_VIEWPORT_RENDERING_PRESET_MODIFIED",efX.DISPLAY_AREA_MODIFIED="CORNERSTONE_DISPLAY_AREA_MODIFIED",efX.ELEMENT_DISABLED="CORNERSTONE_ELEMENT_DISABLED",efX.ELEMENT_ENABLED="CORNERSTONE_ELEMENT_ENABLED",efX.IMAGE_RENDERED="CORNERSTONE_IMAGE_RENDERED",efX.IMAGE_VOLUME_MODIFIED="CORNERSTONE_IMAGE_VOLUME_MODIFIED",efX.IMAGE_VOLUME_LOADING_COMPLETED="CORNERSTONE_IMAGE_VOLUME_LOADING_COMPLETED",efX.IMAGE_LOADED="CORNERSTONE_IMAGE_LOADED",efX.IMAGE_RETRIEVAL_STAGE="CORNERSTONE_IMAGE_RETRIEVAL_STAGE",efX.IMAGE_LOAD_FAILED="CORNERSTONE_IMAGE_LOAD_FAILED",efX.VOLUME_VIEWPORT_NEW_VOLUME="CORNERSTONE_VOLUME_VIEWPORT_NEW_VOLUME",efX.VOLUME_LOADED="CORNERSTONE_VOLUME_LOADED",efX.VOLUME_LOADED_FAILED="CORNERSTONE_VOLUME_LOADED_FAILED",efX.IMAGE_CACHE_IMAGE_ADDED="CORNERSTONE_IMAGE_CACHE_IMAGE_ADDED",efX.IMAGE_CACHE_IMAGE_REMOVED="CORNERSTONE_IMAGE_CACHE_IMAGE_REMOVED",efX.VOLUME_CACHE_VOLUME_ADDED="CORNERSTONE_VOLUME_CACHE_VOLUME_ADDED",efX.VOLUME_CACHE_VOLUME_REMOVED="CORNERSTONE_VOLUME_CACHE_VOLUME_REMOVED",efX.STACK_NEW_IMAGE="CORNERSTONE_STACK_NEW_IMAGE",efX.VOLUME_NEW_IMAGE="CORNERSTONE_VOLUME_NEW_IMAGE",efX.PRE_STACK_NEW_IMAGE="CORNERSTONE_PRE_STACK_NEW_IMAGE",efX.IMAGE_SPACING_CALIBRATED="CORNERSTONE_IMAGE_SPACING_CALIBRATED",efX.VIEWPORT_NEW_IMAGE_SET="CORNERSTONE_VIEWPORT_NEW_IMAGE_SET",efX.STACK_VIEWPORT_SCROLL="CORNERSTONE_STACK_VIEWPORT_SCROLL",efX.STACK_SCROLL_OUT_OF_BOUNDS="STACK_SCROLL_OUT_OF_BOUNDS",efX.GEOMETRY_CACHE_GEOMETRY_ADDED="CORNERSTONE_GEOMETRY_CACHE_GEOMETRY_ADDED",efX.GEOMETRY_CACHE_GEOMETRY_REMOVED="CORNERSTONE_GEOMETRY_CACHE_GEOMETRY_REMOVED",efX.VOLUME_VIEWPORT_SCROLL_OUT_OF_BOUNDS="VOLUME_VIEWPORT_SCROLL_OUT_OF_BOUNDS",efX.VOLUME_VIEWPORT_SCROLL="VOLUME_VIEWPORT_SCROLL",efX.CLIPPING_PLANES_UPDATED="CORNERSTONE_CLIPPING_PLANES_UPDATED",efX.WEB_WORKER_PROGRESS="CORNERSTONE_WEB_WORKER_PROGRESS",efX.COLORMAP_MODIFIED="CORNERSTONE_COLORMAP_MODIFIED",efX.DYNAMIC_VOLUME_DIMENSION_GROUP_CHANGED="DYNAMIC_VOLUME_DIMENSION_GROUP_CHANGED",efX.DYNAMIC_VOLUME_TIME_POINT_INDEX_CHANGED="DYNAMIC_VOLUME_TIME_POINT_INDEX_CHANGED",efX.DYNAMIC_VOLUME_DIMENSION_GROUP_LOADED="DYNAMIC_VOLUME_DIMENSION_GROUP_LOADED",efX.DYNAMIC_VOLUME_TIME_POINT_LOADED="DYNAMIC_VOLUME_TIME_POINT_LOADED",efX.GEOMETRY_LOADED="GEOMETRY_LOADED",efX.GEOMETRY_LOAD_PROGRESS="GEOMETRY_LOAD_PROGRESS",efX.GEOMETRY_LOADED_FAILED="GEOMETRY_LOADED_FAILED",efX.ACTORS_CHANGED="CORNERSTONE_ACTORS_CHANGED";let L0=emM;(efZ=emS||(emS={})).Interaction="interaction",efZ.Thumbnail="thumbnail",efZ.Prefetch="prefetch",efZ.Compute="compute";let L2=emS;(efJ=emE||(emE={})).STACK="stack",efJ.ORTHOGRAPHIC="orthographic",efJ.PERSPECTIVE="perspective",efJ.VOLUME_3D="volume3d",efJ.VOLUME_3D_NEXT="volume3dNext",efJ.PLANAR_NEXT="planarNext",efJ.VIDEO="video",efJ.VIDEO_NEXT="videoNext",efJ.WHOLE_SLIDE="wholeSlide",efJ.WHOLE_SLIDE_NEXT="wholeSlideNext",efJ.ECG="ecg",efJ.ECG_NEXT="ecgNext";let L5=emE,L3={STACK:L5.STACK,ORTHOGRAPHIC:L5.ORTHOGRAPHIC,PERSPECTIVE:L5.PERSPECTIVE,VOLUME_3D:L5.VOLUME_3D,VOLUME_3D_NEXT:L5.VOLUME_3D_NEXT,PLANAR_NEXT:L5.PLANAR_NEXT,VIDEO:L5.VIDEO,VIDEO_NEXT:L5.VIDEO_NEXT,WHOLE_SLIDE:L5.WHOLE_SLIDE,WHOLE_SLIDE_NEXT:L5.WHOLE_SLIDE_NEXT,ECG:L5.ECG,ECG_NEXT:L5.ECG_NEXT};(efQ=emP||(emP={}))[efQ.NEAREST=0]="NEAREST",efQ[efQ.LINEAR=1]="LINEAR",efQ[efQ.FAST_LINEAR=2]="FAST_LINEAR";let L4=emP,L8={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3,ADDITIVE_INTENSITY_BLEND:4,RADON_TRANSFORM_BLEND:5,LABELMAP_EDGE_PROJECTION_BLEND:6};var L6={BlendMode:L8};let{BlendMode:L9}=L6;(ef1=emI||(emI={}))[ef1.COMPOSITE=L9.COMPOSITE_BLEND]="COMPOSITE",ef1[ef1.MAXIMUM_INTENSITY_BLEND=L9.MAXIMUM_INTENSITY_BLEND]="MAXIMUM_INTENSITY_BLEND",ef1[ef1.MINIMUM_INTENSITY_BLEND=L9.MINIMUM_INTENSITY_BLEND]="MINIMUM_INTENSITY_BLEND",ef1[ef1.AVERAGE_INTENSITY_BLEND=L9.AVERAGE_INTENSITY_BLEND]="AVERAGE_INTENSITY_BLEND",ef1[ef1.LABELMAP_EDGE_PROJECTION_BLEND=L9.LABELMAP_EDGE_PROJECTION_BLEND]="LABELMAP_EDGE_PROJECTION_BLEND";let L7=emI;(ef0=emT||(emT={})).AXIAL="axial",ef0.CORONAL="coronal",ef0.SAGITTAL="sagittal",ef0.ACQUISITION="acquisition",ef0.AXIAL_REFORMAT="axial_reformat",ef0.CORONAL_REFORMAT="coronal_reformat",ef0.SAGITTAL_REFORMAT="sagittal_reformat",ef0.REFORMAT="reformat";let Ve=emT;(ef2=em_||(em_={})).CONTOUR="CONTOUR",ef2.SURFACE="SURFACE",ef2.MESH="MESH";let Vt=em_;(ef5=emD||(emD={})).CLOSED_PLANAR="CLOSED_PLANAR",ef5.OPEN_PLANAR="OPEN_PLANAR",(ef3=emA||(emA={})).PLY="PLY",ef3.STL="STL",ef3.OBJ="OBJ",ef3.VTP="VTP";let Vr=emA;(ef4=emO||(emO={})).LINEAR="LINEAR",ef4.SAMPLED_SIGMOID="SIGMOID",ef4.LINEAR_EXACT="LINEAR_EXACT";let Vn=emO;(ef8=emR||(emR={})).SUM="SUM",ef8.AVERAGE="AVERAGE",ef8.SUBTRACT="SUBTRACT";class Va{constructor(e){this.fullDate=e}getTimeInSec(){let e=this.fullDate.substring(0,10),t=this.fullDate.substring(11,28),r=parseInt(e.substring(0,4),10),n=e.length>=7?parseInt(e.substring(5,7),10):void 0,a=e.length>=10?parseInt(e.substring(8,10),10):void 0;if(isNaN(r)||void 0!==n&&isNaN(n)||void 0!==a&&isNaN(a)||r>3e3||n&&(n<1||n>12)||a&&(a<1||a>31))throw Error(`invalid date '${e}'`);let i=new Date(`${e}T00:00:00.000000Z`),o=parseInt(t.substring(0,2),10),s=t.length>=5?parseInt(t.substring(3,5),10):void 0,l=t.length>=8?parseInt(t.substring(6,8),10):void 0,u=t.substring(9,15),c=u?parseInt(u,10)*Math.pow(10,-u.length):void 0;if(isNaN(o)||void 0!==s&&isNaN(s)||void 0!==l&&isNaN(l)||void 0!==c&&isNaN(c)||o<0||o>23||s&&(s<0||s>59)||l&&(l<0||l>59)||c&&(c<0||c>999999))throw Error(`invalid time '${t}'`);let d=i.getTime()/1e3;return d+=3600*o,void 0!==s&&(d+=60*s),void 0!==l&&(d+=l),void 0!==c&&(d+=c),d}getTimeInMicroSec(){return 1e6*this.getTimeInSec()}}function Vi(e,t){let r=`${t.hours||"00"}`.padStart(2,"0"),n=`${t.minutes||"00"}`.padStart(2,"0"),a=`${t.seconds||"00"}`.padStart(2,"0"),i=`${e.month}`.padStart(2,"0"),o=`${e.day}`.padStart(2,"0"),s=`${t.fractionalSeconds||"000000"}`.padEnd(6,"0"),l=`${e.year}-${i}-${o}`,u=`T${r}:${n}:${a}.${s}Z`;return new Va(`${l}${u}`)}function Vo(e){if(null==e||8!==e.length||"string"!=typeof e)throw Error(`invalid DA '${e}'`);let t=parseInt(e.substring(0,4),10),r=parseInt(e.substring(4,6),10),n=parseInt(e.substring(6,8),10);if(!0!=(!isNaN(t)&&r>0&&r<=12&&n>0&&n<=function(e,t){switch(e){case 2:return t%4==0&&t%100||t%400==0?29:28;case 9:case 4:case 6:case 11:return 30;default:return 31}}(r,t)))throw Error(`invalid DA '${e}'`);return{year:t,month:r,day:n}}function Vs(e){if(null==e||e.length<2||"string"!=typeof e)throw Error(`invalid TM '${e}'`);let t=parseInt(e.substring(0,2),10),r=e.length>=4?parseInt(e.substring(2,4),10):void 0,n=e.length>=6?parseInt(e.substring(4,6),10):void 0,a=e.length>=8?e.substring(7,13):void 0,i=a?parseInt(a,10)*Math.pow(10,6-a.length):void 0;if(isNaN(t)||void 0!==r&&isNaN(r)||void 0!==n&&isNaN(n)||void 0!==i&&isNaN(i)||t<0||t>23||r&&(r<0||r>59)||n&&(n<0||n>59)||i&&(i<0||i>999999))throw Error(`invalid TM '${e}'`);return{hours:t,minutes:r,seconds:n,fractionalSeconds:i}}function Vl(e){if(null==e)throw Error("dateTimeToFullDateInterface : dateTime not defined.");return Vi(Vo(e.substring(0,8)),Vs(e.substring(8)))}function Vu(e){let t,r,{CorrectedImage:n,Units:a,PhilipsPETPrivateGroup:i,PatientWeight:o,PatientSex:s,PatientSize:l}=e[0];if(!n.includes("ATTN")||!n.includes("DECY"))throw Error(`CorrectedImage must contain "ATTN" and "DECY": ${n}`);if(!e.every(t=>{let r;return t.Units===a&&((r=t.CorrectedImage)===n||Array.isArray(r)&&Array.isArray(n)&&r.length===n.length&&r.every((e,t)=>e===n[t]))&&t.PatientWeight===o&&t.PatientSex===s&&t.PatientSize===l&&t.RadionuclideHalfLife===e[0].RadionuclideHalfLife&&t.RadionuclideTotalDose===e[0].RadionuclideTotalDose&&t.DecayCorrection===e[0].DecayCorrection&&t.SeriesDate===e[0].SeriesDate&&t.SeriesTime===e[0].SeriesTime}))throw Error("The set of instances does not appear to come from one Series. Every instance must have identical values for series-level metadata properties");if(null==o)throw Error("PatientWeight value is missing. It is not possible to calculate the SUV factors");let u=Array(e.length);u=function(e){let{RadionuclideTotalDose:t,RadionuclideHalfLife:r,RadiopharmaceuticalStartDateTime:n,RadiopharmaceuticalStartTime:a,SeriesDate:i}=e[0];if(null==t)throw Error("calculateDecayCorrection : RadionuclideTotalDose value not found.");if(null==r)throw Error("calculateDecayCorrection : RadionuclideHalfLife value not found.");let o=function(e){let{SeriesDate:t,SeriesTime:r,GEPrivatePostInjectionDateTime:n}=e[0],a=Array(e.length),i=Vi(Vo(t),Vs(r)),o=new Va("3000-01-01T00:00:00.000000Z"),s=o.getTimeInSec();if(e.forEach(e=>{let{AcquisitionDate:t,AcquisitionTime:r}=e,n=Vi(Vo(t),Vs(r));o=o.getTimeInSec()>=s||n.getTimeInSec()<o.getTimeInSec()?n:o}),o.getTimeInSec()>=s)throw Error("Earliest acquisition time or date could not be parsed.");return i.getTimeInSec()<=o.getTimeInSec()?a.fill(i):n?a.fill(Vl(n)):a.fill(o)}(e),s=function(e){let t,{RadiopharmaceuticalStartDateTime:r,RadiopharmaceuticalStartTime:n,SeriesDate:a}=e;if(r)return Vl(r);if(n&&a)return t=Vs(n),Vi(Vo(a),t);throw Error(`Invalid input: ${e}`)}({RadiopharmaceuticalStartDateTime:n,RadiopharmaceuticalStartTime:a,SeriesDate:i});return e.map((e,n)=>{let a=o[n].getTimeInSec()-s.getTimeInSec();if(a<0)throw Error("Decay time cannot be less than zero");return 1/(t*Math.pow(2,-a/r))})}(e);let c=Array(e.length),d=1e3*o;if("BQML"===a)c=u.map(function(e){return e*d});else if("CNTS"===a){let t=e.every(e=>{var t,r,n;return e.PhilipsPETPrivateGroup&&(null==(t=e.PhilipsPETPrivateGroup)?void 0:t.SUVScaleFactor)!==null&&(null==(r=e.PhilipsPETPrivateGroup)?void 0:r.SUVScaleFactor)!==void 0&&(null==(n=e.PhilipsPETPrivateGroup)?void 0:n.SUVScaleFactor)!==0}),r=e.every(e=>{var t,r,n;return e.PhilipsPETPrivateGroup&&!(null!=(t=e.PhilipsPETPrivateGroup)&&t.SUVScaleFactor)&&(null==(r=e.PhilipsPETPrivateGroup)?void 0:r.ActivityConcentrationScaleFactor)!==void 0&&(null==(n=e.PhilipsPETPrivateGroup)?void 0:n.ActivityConcentrationScaleFactor)!==0});if(t)c=e.map(e=>e.PhilipsPETPrivateGroup.SUVScaleFactor);else if(r)c=e.map((e,t)=>e.PhilipsPETPrivateGroup.ActivityConcentrationScaleFactor*u[t]*d);else throw Error(`Units are in CNTS, but PhilipsPETPrivateGroup has invalid values: ${JSON.stringify(i)}`)}else if("GML"===a)c.fill(1);else throw Error(`Units has an invalid value: ${a}`);return null==l?console.warn("PatientSize value is missing. It is not possible to calculate the SUV bsa factors"):t=function(e){let{PatientWeight:t,PatientSize:r}=e;return Math.pow(t,.425)*Math.pow(100*r,.725)*71.84}({PatientWeight:o,PatientSize:l}),null==l?console.warn("PatientSize value is missing. It is not possible to calculate the SUV lbm factors"):null==s?console.warn("PatientSex value is missing. It is not possible to calculate the SUV lbm factors"):r=function(e){let t,{PatientSex:r,PatientWeight:n,PatientSize:a}=e,i=n*n/(a*a*1e4);if("F"===r)t=1.07*n-148*i;else if("M"===r)t=1.1*n-120*i;else throw Error(`PatientSex is an invalid value: ${r}`);return 1e3*t}({PatientWeight:o,PatientSex:s,PatientSize:l}),c.map(function(e,n){let a={suvbw:e};return t&&(a.suvbsa=u[n]*t),r&&(a.suvlbm=u[n]*r),a})}(ef6=emN||(emN={})).NOT_APPLICABLE="",ef6.ERMF="ERMF",ef6.USER="User",ef6.PROJECTION="Proj",ef6.REGION="Region",ef6.ERROR="Error",ef6.UNCALIBRATED="Uncalibrated",ef6.CALIBRATED="Calibrated",ef6.UNKNOWN="Unknown";let Vc=emN;(ef9=emL||(emL={})).CALIBRATION="calibrationModule",ef9.CINE="cineModule",ef9.FRAME_OF_REFERENCE="frameOfReferenceModule",ef9.GENERAL_IMAGE="generalImageModule",ef9.GENERAL_SERIES="generalSeriesModule",ef9.GENERAL_STUDY="generalStudyModule",ef9.IMAGE_PIXEL="imagePixelModule",ef9.IMAGE_PLANE="imagePlaneModule",ef9.IMAGE_URL="imageUrlModule",ef9.MODALITY_LUT="modalityLutModule",ef9.MULTIFRAME="multiframeModule",ef9.NM_MULTIFRAME_GEOMETRY="nmMultiframeGeometryModule",ef9.OVERLAY_PLANE="overlayPlaneModule",ef9.PATIENT="patientModule",ef9.PATIENT_DEMOGRAPHIC="patientDemographicModule",ef9.PATIENT_STUDY="patientStudyModule",ef9.PET_IMAGE="petImageModule",ef9.PET_ISOTOPE="petIsotopeModule",ef9.PET_SERIES="petSeriesModule",ef9.SCALING="scalingModule",ef9.SOP_COMMON="sopCommonModule",ef9.ULTRASOUND_ENHANCED_REGION="ultrasoundEnhancedRegionModule",ef9.ECG="ecgModule",ef9.VOI_LUT="voiLutModule",ef9.TRANSFER_SYNTAX="transferSyntax",ef9.PLANE_ORIENTATION="PlaneOrientation",ef9.PLANE_POSITION="PlanePosition",ef9.PIXEL_MEASURES="PixelMeasures",ef9.XRAY_GEOMETRY="XrayGeometry",ef9.FRAME_PIXEL_DATA="FramePixelData",ef9.FRAME_MODULE="frameModule",ef9.URI_MODULE="uriModule",ef9.WADO_WEB_CLIENT="wadoWebClient",ef9.INSTANCE="instance",ef9.IMAGE_SOP_INSTANCE_REFERENCE="ImageSopInstanceReference",ef9.REFERENCED_SERIES_REFERENCE="ReferencedSeriesReference",ef9.PREDECESSOR_SEQUENCE="PredecessorSequence",ef9.STUDY_DATA="StudyData",ef9.SERIES_DATA="SeriesData",ef9.IMAGE_DATA="ImageData",ef9.RTSS_INSTANCE_DATA="RtssInstanceData",ef9.NEW_INSTANCE_DATA="NewInstanceData",ef9.RTSS_CONTOUR="metaRTSSContour",ef9.SEG_BIT="metaSegBitmap",ef9.SR_ANNOTATION="metaSrAnnotation",ef9.COMPRESSED_FRAME_DATA="compressedFrameData",ef9.BASE_IMAGE_ID="baseImageId",ef9.FRAME_IMAGE_IDS="frameImageIds",ef9.NATURALIZED="naturalized";let Vd=emL,Vh=[],Vp=new Map,Vf=new Map;function Vm(e,t=0){let r;if(!Vh.some(t=>t.provider===e)){for(r=0;r<Vh.length&&!(Vh[r].priority<=t);r++);Vh.splice(r,0,{priority:t,provider:e})}}function Vg(e,t,r){let n=Vf.get(e);if(n)return n(t,null,r)}function Vy(e){for(let t=0;t<Vh.length;t++)if(Vh[t].provider===e){Vh.splice(t,1);break}}function Vv(){for(;Vh.length>0;)Vh.pop();Vp.clear(),Vf.clear()}function Vb(e,t,r){if(void 0!==t)for(let n=0;n<Vh.length;n++){let a=Vh[n].provider(e,t,r);if(void 0!==a)return a}}function Vw(e,t,r){return Vb(e,t,r)}let Vx=(e,t)=>{var r;for(let n of[e,(r=e,`${r}Add`)]){let e=Vp.get(n);if(e)for(let r of e)r?.clearQuery?.(t)}},VC=e=>{var t;for(let r of Array.from(new Set([e,(t=e,`${t}Add`)]))){let e=Vp.get(r);if(e)for(let t of e)t?.clear?.()}},Vk=(e,...t)=>1===t.length?Vb(e,t[0]):t.map(t=>t&&Vb(e,t)).find(e=>void 0!==e);function VM(e,t,r=Vb){let n={};for(let a of t)try{let t=r(a,e);if(t){let e={};for(let r in t)r in t&&(e[VS(r)]=t[r]);Object.assign(n,e)}}catch(e){console.error(`Error retrieving ${a} data:`,e)}return n}let VS=e=>e.startsWith("sop")?`SOP${e.substring(3)}`:e.startsWith("voi")?`VOI${e.substring(3)}`:(e.endsWith("Id")&&(e=`${e.substring(0,e.length-2)}ID`),e.charAt(0).toUpperCase()+e.slice(1)),VE=e=>e.startsWith("SOP")?`sop${e.substring(3)}`:e.startsWith("VOI")?`voi${e.substring(3)}`:(e.endsWith("ID")&&!e.endsWith("UID")&&(e=`${e.substring(0,e.length-2)}Id`),e.charAt(0).toLowerCase()+e.slice(1));function VP(e,t,r){return Math.abs(e-t)<=r}function VI(e){return"number"==typeof e}function VT(e){return e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>0&&"number"==typeof e[0]}function V_(e,t,r=1e-5){return typeof e==typeof t&&null!==e&&null!==t&&(VI(e)&&VI(t)?VP(e,t,r):!!(VT(e)&&VT(t))&&function(e,t,r=1e-5){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!VP(e[n],t[n],r))return!1;return!0}(e,t,r))}let VD=e=>"number"==typeof e?-e:e?.map?e.map(VD):!e,VA=e=>"number"==typeof e?Math.abs(e):e?.map?e.map(VA):e,VO=(e,t,r)=>V_(VA(e),VA(t),r),VR=VH("cs3d"),VN=VR.getLogger("metadata"),VL=VR.getLogger("core"),VV=VR.getLogger("tools"),VF=VR.getLogger("dicomImageLoader"),Vj=VR.getLogger("ai"),VB=VR.getLogger("examples"),VW=VR.getLogger("worker"),VU=No.log.getLogger("consistency.dicom"),Vz=No.log.getLogger("consistency.image");function VH(e){let t=No.log.getLogger(e);return t.getLogger=(...t)=>VH(`${e}.${t.join(".")}`),t}function VG(...e){return VH(e.join("."))}let Vq=new Set(["1.2.840.10008.1.2.4.100","1.2.840.10008.1.2.4.100.1","1.2.840.10008.1.2.4.101","1.2.840.10008.1.2.4.101.1","1.2.840.10008.1.2.4.102","1.2.840.10008.1.2.4.102.1","1.2.840.10008.1.2.4.103","1.2.840.10008.1.2.4.103.1","1.2.840.10008.1.2.4.104","1.2.840.10008.1.2.4.104.1","1.2.840.10008.1.2.4.105","1.2.840.10008.1.2.4.105.1","1.2.840.10008.1.2.4.106","1.2.840.10008.1.2.4.106.1","1.2.840.10008.1.2.4.107","1.2.840.10008.1.2.4.108"]);function V$(e){return!!e&&(Array.isArray(e)?e:[e]).find(e=>Vq.has(e))}let VK=/^[a-zA-Z]+:/;function VY(e){if(!e)return"";let t=e.match(VK);if(!t)return e;let r=e.substring(t[0].length);return VK.test(r)?r:e}let VX=new Set(["1.2.840.10008.5.1.4.1.1.1","1.2.840.10008.5.1.4.1.1.1.1","1.2.840.10008.5.1.4.1.1.1.1.1","1.2.840.10008.5.1.4.1.1.1.2","1.2.840.10008.5.1.4.1.1.1.2.1","1.2.840.10008.5.1.4.1.1.1.3","1.2.840.10008.5.1.4.1.1.1.3.1","1.2.840.10008.5.1.4.1.1.12.1","1.2.840.10008.5.1.4.1.1.12.1.1","1.2.840.10008.5.1.4.1.1.12.2","1.2.840.10008.5.1.4.1.1.12.2.1","1.2.840.10008.5.1.4.1.1.12.3"]);function VZ(e){let{PixelSpacing:t,ImagerPixelSpacing:r,EstimatedRadiographicMagnificationFactor:n,DistanceSourceToDetector:a,DistanceSourceToEntrance:i,DistanceSourceToPatient:o=i}=e;return n>1?n:o<a?a/o:r?.[0]>t?.[0]||void 0}function VJ(e){let{PixelSpacing:t,ImagerPixelSpacing:r,PixelSpacingCalibrationType:n}=e;if(t&&"GEOMETRY"===n)return V_(t,r)&&console.warn("Calibration type is geometry, but pixel spacing and imager pixel spacing identical",t,r),{PixelSpacing:t,type:Vc.ERMF,isProjection:!0};if(t&&"FIDUCIAL"===n)return{PixelSpacing:t,type:Vc.CALIBRATED,isProjection:!0};if(r){let n=VZ(e);return n>1?{PixelSpacing:r.map(e=>e/n),type:Vc.ERMF,isProjection:!0}:!0===n?{PixelSpacing:t,type:Vc.ERMF,isProjection:!0}:(n&&console.error("Illegal ERMF value:",n),{PixelSpacing:t||r,type:Vc.PROJECTION,isProjection:!0})}return{PixelSpacing:t,type:Vc.UNKNOWN,isProjection:!0}}function VQ(e){let{PixelSpacing:t,SOPClassUID:r}=e;return VX.has(r)?VJ(e):{PixelSpacing:t,type:Vc.NOT_APPLICABLE,isProjection:!1}}let V1=new Map,V0={add:(e,t)=>{let r=VY(e);V1.set(r,t),Vx(Vd.IMAGE_PLANE,e)},get:(e,t)=>{if("calibratedPixelSpacing"===e){let e=VY(t);return V1.get(e)}},clear:()=>{V1.clear()}};function V2(e,t){let r=/\/frames\/\d+/;if(!r.test(e))throw Error(`generateFrameImageId: baseImageId must contain a "/frames/" pattern followed by a digit. Expected format: e.g., "wadouri:http://example.com/image/frames/1" or "wadors:/path/to/image.dcm/frames/1". Received: ${e}`);return e.replace(r,`/frames/${t}`)}function V5(e){if(!e||0===e.length)return null;let t=e[0],r=Vk("instance",t);if(!r)return null;let n=r.NumberOfFrames;if(!n||n<=1)return null;let a=r.TimeSlotVector;if(!a||!Array.isArray(a))return null;let i=r.SliceVector,o=r.NumberOfSlices;if(a.length!==n)return console.warn("TimeSlotVector length does not match NumberOfFrames:",a.length,"vs",n),null;if(i){if(!Array.isArray(i))return console.warn("SliceVector exists but is not an array. Expected length:",n),null;if(i.length!==n||i.some(e=>void 0===e))return console.warn("SliceVector exists but has invalid length or undefined entries. Expected length:",n,"Actual length:",i.length),null}let s=new Map;for(let e=0;e<n;e++){let t=a[e],r=i?.[e]??e;s.has(t)||s.set(t,[]),s.get(t).push({frameIndex:e,sliceIndex:r})}let l=Array.from(s.keys()).sort((e,t)=>e-t).map(e=>{let r=s.get(e);return r.sort((e,t)=>e.sliceIndex-t.sliceIndex),r.map(e=>V2(t,e.frameIndex+1))}),u=o||l[0]?.length;return l.every(e=>e.length===u)||console.warn("Multiframe 4D split resulted in uneven time slot groups. Expected",u,"slices per time slot."),{imageIdGroups:l,splittingTag:"TimeSlotVector"}}function V3(e,t){let r=Vk(t,e);try{return parseFloat(r)}catch{return}}function V4(e,t){var r=V3(e,t);if(void 0!==r){if("string"==typeof r||"number"==typeof r||r instanceof String||r instanceof Number){let e=Number(r);return Number.isFinite(e)?e:void 0}return Array.from(r,e=>{let t=Number(e);return Number.isFinite(t)?t:void 0})}}function V8(e){let t=Vk("20011003",e);try{let{InlineBinary:e}=t;if(e){let t=atob(e),r=new ArrayBuffer(t.length),n=new DataView(r);for(let e=0;e<t.length;e++)n.setUint8(e,t.charCodeAt(e));return new Float32Array(r)[0]}return parseFloat(t)}catch{return}}function V6(e){let t=Vk("0019100c",e)||Vk("0019100C",e);try{let{InlineBinary:e}=t;return e&&(t=atob(e)),parseFloat(t)}catch{return}}function V9(e){let t=Vk("00431039",e);try{let{InlineBinary:e}=t;return e&&(t=atob(e).split("//")),parseFloat(t[0])%1e5}catch{return}}function V7(e){let t=Vk("petImageModule",e);return t?t.frameReferenceTime:0}let Fe=function(e){let t=V5(e);if(t)return t;let r=function(e){let t;if(!e||0===e.length||void 0===V4(e[0],"CardiacNumberOfImages"))return null;let r=new Map;for(let t of e){let e=Vk("StackID",t),n=V4(t,"InStackPositionNumber"),a=V4(t,"TriggerTime");if(void 0===e||void 0===n||void 0===a)return null;let i=String(e);r.has(i)||r.set(i,new Map);let o=r.get(i);o.has(n)||o.set(n,[]),o.get(n).push({imageId:t,triggerTime:a})}let n=Array.from(r.keys()).sort((e,t)=>Number(e)-Number(t));if(0===n.length)return null;let a=[];for(let e of n){let n=r.get(e),i=Array.from(n.keys()).sort((e,t)=>e-t);for(let e of i){let r=n.get(e);if(r.sort((e,t)=>e.triggerTime-t.triggerTime),void 0===t)t=r.length;else if(r.length!==t)return null}a.push({stackId:e,positions:i,framesByPosition:n})}if(!t)return null;let i=[];for(let e=0;e<t;e++){let t=[];for(let r of a)for(let n of r.positions){let a=r.framesByPosition.get(n);t.push(a[e].imageId)}i.push(t)}return{imageIdGroups:i,splittingTag:"CardiacTriggerTime"}}(e);if(r)return r;let n=function(e){let t,r=e.map(e=>{let{imagePositionPatient:t}=Vk("imagePlaneModule",e)||{};return{imageId:e,imagePositionPatient:t}});if(!r.every(e=>e.imagePositionPatient))return null;let n=(t="imagePositionPatient",r.reduce((e,r)=>((e[r[t]]=e[r[t]]||[]).push(r),e),{})),a=Object.keys(n),i=n[a[0]].length;return 1!==i&&a.every(e=>n[e].length===i)?n:null}(e);if(!n)return{imageIdGroups:[e],splittingTag:null};let a=["TemporalPositionIdentifier","DiffusionBValue","TriggerTime","EchoTime","EchoNumber","PhilipsPrivateBValue","SiemensPrivateBValue","GEPrivateBValue","PetFrameReferenceTime"],i=[e=>V3(e,a[0]),e=>V3(e,a[1]),e=>V3(e,a[2]),e=>V3(e,a[3]),e=>V3(e,a[4]),V8,V6,V9,V7];for(let e=0;e<i.length;e++){let t=function(e,t){let r={},n=[],a=Object.keys(e);for(let i=0;i<a.length;i++){let o=new Set,s=e[a[i]];for(let e=0;e<s.length;e++){let n=t(s[e].imageId)||0;if(r[n]=r[n]||[],r[n].push({imageId:s[e].imageId}),o.add(n),o.size-1<e)return}if(0==i)n=Array.from(o);else if(!function(e,t){if(e.length!=t.size)return!1;for(let r=0;r<e.length;r++)if(!t.has(e[r]))return!1;return!0}(n,o))return}return r}(n,i[e]);if(t)return{imageIdGroups:Object.keys(t).map(Number.parseFloat).sort((e,t)=>e-t).map(e=>t[e].map(e=>e.imageId)),splittingTag:a[e]}}return{imageIdGroups:[e],splittingTag:null}},Ft=[[Vd.TRANSFER_SYNTAX,["TransferSyntaxUID","AvailableTransferSyntaxUID"]],[Vd.CINE,["FrameTime","RecommendedDisplayFrameRate"]],[Vd.PET_ISOTOPE,[["RadiopharmaceuticalInfo","00540016"]]],["RadiopharmaceuticalInfo",["RadiopharmaceuticalStartTime","RadiopharmaceuticalStopTime","RadionuclideTotalDose","RadionuclideHalfLife"]],[Vd.PET_IMAGE,["FrameReferenceTime","ActualFrameDuration"]],[Vd.PET_SERIES,["CorrectedImage","Units","DecayCorrection"]],[Vd.PATIENT,["PatientID","PatientName","PatientBirthDate","PatientBirthTime"]],[Vd.PATIENT_STUDY,["PatientAge","PatientSize","PatientSex","PatientWeight"]],[Vd.GENERAL_STUDY,["StudyInstanceUID","StudyDescription","StudyDate","StudyTime","AccessionNumber"]],[Vd.GENERAL_SERIES,["StudyInstanceUID","SeriesInstanceUID","Modality","SeriesDescription","SeriesNumber","SeriesDate","SeriesTime","AcquisitionDate","AcquisitionTime"]],["clinicalTrialModule",["ClinicalTrialSponsorName","ClinicalTrialSiteID","ClinicalTrialSiteName","ClinicalTrialSubjectID"]],[Vd.SOP_COMMON,["SOPInstanceUID","SOPClassUID"]],[Vd.ECG,["StudyInstanceUID","SeriesInstanceUID","SeriesDescription","SeriesNumber","SeriesDate","SeriesTime","Modality","SOPInstanceUID","SOPClassUID"]],[Vd.GENERAL_IMAGE,["SOPInstanceUID","SOPClassUID","InstanceNumber","InstanceCreationDate","InstanceCreationTime","ContentTime","LossyImageCompression","LossyImageCompressionRatio","LossyImageCompressionMethod","FrameOfReferenceUID","NumberOfFrames","PixelSpacing"]],[Vd.IMAGE_PLANE,["ImagerPixelSpacing","ImageOrientationPatient","ImagePositionPatient","SpacingBetweenSlices","SliceThickness","SliceLocation"]],[Vd.IMAGE_PIXEL,["SamplesPerPixel","PhotometricInterpretation","PlanarConfiguration","Rows","Columns","BitsAllocated","BitsStored","HighBit","PixelRepresentation",["SmallestPixelValue","00280106"],["LargestPixelValue","00280107"],"PixelPaddingValue","PixelPaddingRangeLimit","RedPaletteColorLookupTableDescriptor","GreenPaletteColorLookupTableDescriptor","BluePaletteColorLookupTableDescriptor","AlphaPaletteColorLookupTableDescriptor","RedPaletteColorLookupTableData","GreenPaletteColorLookupTableData","BluePaletteColorLookupTableData","AlphaPaletteColorLookupTableData","PaletteColorLookupTableUID","DistanceSourceToDetector","DistanceSourceToPatient","EstimatedRadiographicMagnificationFactor","DistanceSourceToEntrance","PixelSpacingCalibrationType","PixelSpacingCalibrationDescription","SequenceOfUltrasoundRegions"]],[Vd.VOI_LUT,["WindowCenter","WindowWidth","VOILUTFunction","WindowCenterWidthExplanation"]],[Vd.MODALITY_LUT,["RescaleIntercept","RescaleSlope","RescaleType"]],[Vd.ULTRASOUND_ENHANCED_REGION,["SequenceOfUltrasoundRegions"]],["usRegionChild",["PhysicalDeltaX","PhysicalDeltaY","PhysicalUnitsXDirection","PhysicalUnitsYDirection","RegionLocationMinY0","RegionLocationMaxY1","RegionLocationMinX0","RegionLocationMaxX1","ReferencePixelX0","ReferencePixelY0",["ReferencePhysicalPixelValueY","0018602A"],["ReferencePhysicalPixelValueX","00186028"],"RegionSpatialFormat","RegionDataType","RegionFlags","TransducerFrequency"]],[null,["ReferencedImageSequence","ReferencedSOPClassUID","ReferencedSOPInstanceUID","ReferencedFrameNumber","SharedFunctionalGroupsSequence","PerFrameFunctionalGroupsSequence","PlanePositionSequence","AnatomicRegionSequence","PlaneOrientationSequence","PixelMeasuresSequence","PixelValueTransformationSequence","ParametricMapFrameTypeSequence","RealWorldValueMappingSequence"]]],Fr=Ns().data.DicomMetaDictionary.dictionary,Fn=Ns().data.DicomMetaDictionary.nameMap,Fa=new Map,Fi=new Map,Fo={},Fs=new Map;for(let[e,t]of Ft)for(let r of t){let t="string"==typeof r?r:r[0],n="string"==typeof r?void 0:r[1],a=Fs.get(t);a||(a={hex:n??function(e){let t=Fn[e];if(t)return t.tag.substring(1,5)+t.tag.substring(6,10)}(t),groups:[]},Fs.set(t,a)),null!==e&&a.groups.push(e)}for(let[e,{hex:t,groups:r}]of Fs){if(!t){console.warn(`Tags: keyword "${e}" not found in dcmjs nameMap`);continue}!function(e,t){if(e&&t.name&&e!==t.name)throw Error(`Tag name provided and value don't match: ${e} !== ${t.name}`);t.name||=e,t.lowerName||=VE(e),Fo[e]=t;let{tag:r}=t;t.primaryGroup||=t.groups?.[0];let{groups:n}=t;if(Fi.set(e,t),r&&(t.xTag=`x${r.toLowerCase()}`,t.tag=r.toUpperCase(),Fi.set(t.xTag,t),Fi.set(t.tag,t),!t.vr)){let e=Fr[t.tag];e&&(t.vr=e.vr,t.vm=function(e){if(null==e)return null;if("number"==typeof e)return e;let t=parseInt(e,10);return String(t)===e?t:0}(e.vm))}if(n?.length)for(let r of n){let n=Fa.get(r);if(!n){n=[t],Fa.set(r,n);return}let a=n.findIndex(t=>t.name===e);-1===a?n.push(t):n[a]=t}}(e,function(e,...t){return{tag:e,groups:t,xTag:null,primaryGroup:null,name:null,lowerName:null,vr:null,vm:null}}(t,...r))}let{DicomMetadataListener:Fl}=Ns().utilities,{pp:Fu,tZ:Fc,gE:Fd,Um:Fh,uu:Fp,UA:Ff,_E:Fm,RZ:Fg,UX:Fy,bM:Fv,HL:Fb,U5:Fw,Rm:Fx}=B,FC=Vd.FRAME_IMAGE_IDS,Fk=Vd.BASE_IMAGE_ID;class FM{static setCacheDataInternal(e,t,r){let n=this.mapCacheData.get(e);n||(n=new Map,this.mapCacheData.set(e,n)),n.set(t,r),this.clearRelatedDerivedCache(e,t)}static clearRelatedDerivedCache(e,t){let r=this.secondaryTypesByBaseType.get(e);if(r?.size)for(let e of Vb(FC,t)??new Set([t]))for(let t of r){let r=this.mapCacheData.get(t);r?.delete(e)}}static registerSecondaryTypes(e,t){if(t)for(let r of Array.isArray(t)?t:[t]){let t=this.secondaryTypesByBaseType.get(r);t||(t=new Set,this.secondaryTypesByBaseType.set(r,t)),t.add(e)}}static getCacheData(e,t){return this.mapCacheData.get(e)?.get(t)}static hasCacheData(e,t){return this.mapCacheData.get(e)?.has(t)===!0}static clearCacheData(){this.mapCacheData.clear(),this.secondaryTypesByBaseType.clear(),VC(FC),VC(Fk)}static clearTypedCacheData(e,t){let r=this.secondaryTypesByBaseType.get(e),n=this.mapCacheData.get(e);if(t){if(n?.delete(t),r?.size)for(let e of r)this.mapCacheData.get(e)?.delete(t);(e===Vd.NATURALIZED||r?.size)&&(Vx(FC,t),Vx(Fk,t));return}if(n?.clear(),r?.size)for(let e of r)this.mapCacheData.get(e)?.clear();(e===Vd.NATURALIZED||r?.size)&&(VC(FC),VC(Fk))}static fromAsyncLookup(e,t,r,n){if(n?.noCache!==!0&&n?.reCache!==!0){let r=this.getCacheData(e,t);if(void 0!==r)return r}let a=r();if(void 0!==a)return a instanceof Promise?a.then(r=>(void 0===r||n?.noCache||this.setCacheDataInternal(e,t,r),r)):(n?.noCache||this.setCacheDataInternal(e,t,a),a)}createTypeCacheProvider(e){var t;return t=e,(e,r,n,a)=>FM.fromAsyncLookup(t,r,()=>e(r,n,a),a)}clearCacheData(){FM.clearCacheData()}clearTypedCacheData(e,t){FM.clearTypedCacheData(e,t)}getCacheData(e,t){return FM.getCacheData(e,t)}hasCacheData(e,t){return FM.hasCacheData(e,t)}fromAsyncLookup(e,t,r,n){return FM.fromAsyncLookup(e,t,r,n)}}function FS(e){return(t,r,n,a)=>(n||=Vg(e,r,a?.[e]),t(r,n,a))}FM.mapCacheData=new Map,FM.secondaryTypesByBaseType=new Map,new class e extends FM{static setCacheData(e,t,r){this.setCacheDataInternal(e,t,r)}setCacheData(t,r,n){e.setCacheData(t,r,n)}},FS(Vd.INSTANCE),FS(Vd.NATURALIZED);let{AsyncDicomReader:FE}=Ns().async;Fh.getLogger("tagModules"),u(3916),Vd.COMPRESSED_FRAME_DATA;let{C:FP}=F;(ef7=emV||(emV={})).NO_DATA="noData",ef7.LOADING="loading",ef7.PRE_RENDER="preRender",ef7.NEEDS_RENDER="needsRender",ef7.RESIZE="resize",ef7.RENDERED="rendered";let FI=emV;(eme=emF||(emF={}))[eme.FAR_REPLICATE=1]="FAR_REPLICATE",eme[eme.ADJACENT_REPLICATE=3]="ADJACENT_REPLICATE",eme[eme.SUBRESOLUTION=6]="SUBRESOLUTION",eme[eme.LOSSY=7]="LOSSY",eme[eme.FULL_RESOLUTION=8]="FULL_RESOLUTION";let FT=emF;(emt=emj||(emj={})).FRAME="f",emt.SECOND="s";let F_=Vd;(emr=emB||(emB={})).SUM="SUM",emr.SUBTRACT="SUBTRACT",emr.AVERAGE="AVERAGE",(emn=emW||(emW={})).RLE="RLE",emn.Volume="Volume",(ema=emU||(emU={})).Tiled="tiled",ema.ContextPool="contextPool";let FD=emU,FA={hotIron:{name:"Hot Iron",numOfColors:256,colors:[[0,0,0,255],[2,0,0,255],[4,0,0,255],[6,0,0,255],[8,0,0,255],[10,0,0,255],[12,0,0,255],[14,0,0,255],[16,0,0,255],[18,0,0,255],[20,0,0,255],[22,0,0,255],[24,0,0,255],[26,0,0,255],[28,0,0,255],[30,0,0,255],[32,0,0,255],[34,0,0,255],[36,0,0,255],[38,0,0,255],[40,0,0,255],[42,0,0,255],[44,0,0,255],[46,0,0,255],[48,0,0,255],[50,0,0,255],[52,0,0,255],[54,0,0,255],[56,0,0,255],[58,0,0,255],[60,0,0,255],[62,0,0,255],[64,0,0,255],[66,0,0,255],[68,0,0,255],[70,0,0,255],[72,0,0,255],[74,0,0,255],[76,0,0,255],[78,0,0,255],[80,0,0,255],[82,0,0,255],[84,0,0,255],[86,0,0,255],[88,0,0,255],[90,0,0,255],[92,0,0,255],[94,0,0,255],[96,0,0,255],[98,0,0,255],[100,0,0,255],[102,0,0,255],[104,0,0,255],[106,0,0,255],[108,0,0,255],[110,0,0,255],[112,0,0,255],[114,0,0,255],[116,0,0,255],[118,0,0,255],[120,0,0,255],[122,0,0,255],[124,0,0,255],[126,0,0,255],[128,0,0,255],[130,0,0,255],[132,0,0,255],[134,0,0,255],[136,0,0,255],[138,0,0,255],[140,0,0,255],[142,0,0,255],[144,0,0,255],[146,0,0,255],[148,0,0,255],[150,0,0,255],[152,0,0,255],[154,0,0,255],[156,0,0,255],[158,0,0,255],[160,0,0,255],[162,0,0,255],[164,0,0,255],[166,0,0,255],[168,0,0,255],[170,0,0,255],[172,0,0,255],[174,0,0,255],[176,0,0,255],[178,0,0,255],[180,0,0,255],[182,0,0,255],[184,0,0,255],[186,0,0,255],[188,0,0,255],[190,0,0,255],[192,0,0,255],[194,0,0,255],[196,0,0,255],[198,0,0,255],[200,0,0,255],[202,0,0,255],[204,0,0,255],[206,0,0,255],[208,0,0,255],[210,0,0,255],[212,0,0,255],[214,0,0,255],[216,0,0,255],[218,0,0,255],[220,0,0,255],[222,0,0,255],[224,0,0,255],[226,0,0,255],[228,0,0,255],[230,0,0,255],[232,0,0,255],[234,0,0,255],[236,0,0,255],[238,0,0,255],[240,0,0,255],[242,0,0,255],[244,0,0,255],[246,0,0,255],[248,0,0,255],[250,0,0,255],[252,0,0,255],[254,0,0,255],[255,0,0,255],[255,2,0,255],[255,4,0,255],[255,6,0,255],[255,8,0,255],[255,10,0,255],[255,12,0,255],[255,14,0,255],[255,16,0,255],[255,18,0,255],[255,20,0,255],[255,22,0,255],[255,24,0,255],[255,26,0,255],[255,28,0,255],[255,30,0,255],[255,32,0,255],[255,34,0,255],[255,36,0,255],[255,38,0,255],[255,40,0,255],[255,42,0,255],[255,44,0,255],[255,46,0,255],[255,48,0,255],[255,50,0,255],[255,52,0,255],[255,54,0,255],[255,56,0,255],[255,58,0,255],[255,60,0,255],[255,62,0,255],[255,64,0,255],[255,66,0,255],[255,68,0,255],[255,70,0,255],[255,72,0,255],[255,74,0,255],[255,76,0,255],[255,78,0,255],[255,80,0,255],[255,82,0,255],[255,84,0,255],[255,86,0,255],[255,88,0,255],[255,90,0,255],[255,92,0,255],[255,94,0,255],[255,96,0,255],[255,98,0,255],[255,100,0,255],[255,102,0,255],[255,104,0,255],[255,106,0,255],[255,108,0,255],[255,110,0,255],[255,112,0,255],[255,114,0,255],[255,116,0,255],[255,118,0,255],[255,120,0,255],[255,122,0,255],[255,124,0,255],[255,126,0,255],[255,128,4,255],[255,130,8,255],[255,132,12,255],[255,134,16,255],[255,136,20,255],[255,138,24,255],[255,140,28,255],[255,142,32,255],[255,144,36,255],[255,146,40,255],[255,148,44,255],[255,150,48,255],[255,152,52,255],[255,154,56,255],[255,156,60,255],[255,158,64,255],[255,160,68,255],[255,162,72,255],[255,164,76,255],[255,166,80,255],[255,168,84,255],[255,170,88,255],[255,172,92,255],[255,174,96,255],[255,176,100,255],[255,178,104,255],[255,180,108,255],[255,182,112,255],[255,184,116,255],[255,186,120,255],[255,188,124,255],[255,190,128,255],[255,192,132,255],[255,194,136,255],[255,196,140,255],[255,198,144,255],[255,200,148,255],[255,202,152,255],[255,204,156,255],[255,206,160,255],[255,208,164,255],[255,210,168,255],[255,212,172,255],[255,214,176,255],[255,216,180,255],[255,218,184,255],[255,220,188,255],[255,222,192,255],[255,224,196,255],[255,226,200,255],[255,228,204,255],[255,230,208,255],[255,232,212,255],[255,234,216,255],[255,236,220,255],[255,238,224,255],[255,240,228,255],[255,242,232,255],[255,244,236,255],[255,246,240,255],[255,248,244,255],[255,250,248,255],[255,252,252,255],[255,255,255,255]]},pet:{name:"PET",numColors:256,colors:[[0,0,0,255],[0,2,1,255],[0,4,3,255],[0,6,5,255],[0,8,7,255],[0,10,9,255],[0,12,11,255],[0,14,13,255],[0,16,15,255],[0,18,17,255],[0,20,19,255],[0,22,21,255],[0,24,23,255],[0,26,25,255],[0,28,27,255],[0,30,29,255],[0,32,31,255],[0,34,33,255],[0,36,35,255],[0,38,37,255],[0,40,39,255],[0,42,41,255],[0,44,43,255],[0,46,45,255],[0,48,47,255],[0,50,49,255],[0,52,51,255],[0,54,53,255],[0,56,55,255],[0,58,57,255],[0,60,59,255],[0,62,61,255],[0,65,63,255],[0,67,65,255],[0,69,67,255],[0,71,69,255],[0,73,71,255],[0,75,73,255],[0,77,75,255],[0,79,77,255],[0,81,79,255],[0,83,81,255],[0,85,83,255],[0,87,85,255],[0,89,87,255],[0,91,89,255],[0,93,91,255],[0,95,93,255],[0,97,95,255],[0,99,97,255],[0,101,99,255],[0,103,101,255],[0,105,103,255],[0,107,105,255],[0,109,107,255],[0,111,109,255],[0,113,111,255],[0,115,113,255],[0,117,115,255],[0,119,117,255],[0,121,119,255],[0,123,121,255],[0,125,123,255],[0,128,125,255],[1,126,127,255],[3,124,129,255],[5,122,131,255],[7,120,133,255],[9,118,135,255],[11,116,137,255],[13,114,139,255],[15,112,141,255],[17,110,143,255],[19,108,145,255],[21,106,147,255],[23,104,149,255],[25,102,151,255],[27,100,153,255],[29,98,155,255],[31,96,157,255],[33,94,159,255],[35,92,161,255],[37,90,163,255],[39,88,165,255],[41,86,167,255],[43,84,169,255],[45,82,171,255],[47,80,173,255],[49,78,175,255],[51,76,177,255],[53,74,179,255],[55,72,181,255],[57,70,183,255],[59,68,185,255],[61,66,187,255],[63,64,189,255],[65,63,191,255],[67,61,193,255],[69,59,195,255],[71,57,197,255],[73,55,199,255],[75,53,201,255],[77,51,203,255],[79,49,205,255],[81,47,207,255],[83,45,209,255],[85,43,211,255],[86,41,213,255],[88,39,215,255],[90,37,217,255],[92,35,219,255],[94,33,221,255],[96,31,223,255],[98,29,225,255],[100,27,227,255],[102,25,229,255],[104,23,231,255],[106,21,233,255],[108,19,235,255],[110,17,237,255],[112,15,239,255],[114,13,241,255],[116,11,243,255],[118,9,245,255],[120,7,247,255],[122,5,249,255],[124,3,251,255],[126,1,253,255],[128,0,255,255],[130,2,252,255],[132,4,248,255],[134,6,244,255],[136,8,240,255],[138,10,236,255],[140,12,232,255],[142,14,228,255],[144,16,224,255],[146,18,220,255],[148,20,216,255],[150,22,212,255],[152,24,208,255],[154,26,204,255],[156,28,200,255],[158,30,196,255],[160,32,192,255],[162,34,188,255],[164,36,184,255],[166,38,180,255],[168,40,176,255],[170,42,172,255],[171,44,168,255],[173,46,164,255],[175,48,160,255],[177,50,156,255],[179,52,152,255],[181,54,148,255],[183,56,144,255],[185,58,140,255],[187,60,136,255],[189,62,132,255],[191,64,128,255],[193,66,124,255],[195,68,120,255],[197,70,116,255],[199,72,112,255],[201,74,108,255],[203,76,104,255],[205,78,100,255],[207,80,96,255],[209,82,92,255],[211,84,88,255],[213,86,84,255],[215,88,80,255],[217,90,76,255],[219,92,72,255],[221,94,68,255],[223,96,64,255],[225,98,60,255],[227,100,56,255],[229,102,52,255],[231,104,48,255],[233,106,44,255],[235,108,40,255],[237,110,36,255],[239,112,32,255],[241,114,28,255],[243,116,24,255],[245,118,20,255],[247,120,16,255],[249,122,12,255],[251,124,8,255],[253,126,4,255],[255,128,0,255],[255,130,4,255],[255,132,8,255],[255,134,12,255],[255,136,16,255],[255,138,20,255],[255,140,24,255],[255,142,28,255],[255,144,32,255],[255,146,36,255],[255,148,40,255],[255,150,44,255],[255,152,48,255],[255,154,52,255],[255,156,56,255],[255,158,60,255],[255,160,64,255],[255,162,68,255],[255,164,72,255],[255,166,76,255],[255,168,80,255],[255,170,85,255],[255,172,89,255],[255,174,93,255],[255,176,97,255],[255,178,101,255],[255,180,105,255],[255,182,109,255],[255,184,113,255],[255,186,117,255],[255,188,121,255],[255,190,125,255],[255,192,129,255],[255,194,133,255],[255,196,137,255],[255,198,141,255],[255,200,145,255],[255,202,149,255],[255,204,153,255],[255,206,157,255],[255,208,161,255],[255,210,165,255],[255,212,170,255],[255,214,174,255],[255,216,178,255],[255,218,182,255],[255,220,186,255],[255,222,190,255],[255,224,194,255],[255,226,198,255],[255,228,202,255],[255,230,206,255],[255,232,210,255],[255,234,214,255],[255,236,218,255],[255,238,222,255],[255,240,226,255],[255,242,230,255],[255,244,234,255],[255,246,238,255],[255,248,242,255],[255,250,246,255],[255,252,250,255],[255,255,255,255]]},hotMetalBlue:{name:"Hot Metal Blue",numColors:256,colors:[[0,0,0,255],[0,0,2,255],[0,0,4,255],[0,0,6,255],[0,0,8,255],[0,0,10,255],[0,0,12,255],[0,0,14,255],[0,0,16,255],[0,0,17,255],[0,0,19,255],[0,0,21,255],[0,0,23,255],[0,0,25,255],[0,0,27,255],[0,0,29,255],[0,0,31,255],[0,0,33,255],[0,0,35,255],[0,0,37,255],[0,0,39,255],[0,0,41,255],[0,0,43,255],[0,0,45,255],[0,0,47,255],[0,0,49,255],[0,0,51,255],[0,0,53,255],[0,0,55,255],[0,0,57,255],[0,0,59,255],[0,0,61,255],[0,0,63,255],[0,0,65,255],[0,0,67,255],[0,0,69,255],[0,0,71,255],[0,0,73,255],[0,0,75,255],[0,0,77,255],[0,0,79,255],[0,0,81,255],[0,0,83,255],[0,0,84,255],[0,0,86,255],[0,0,88,255],[0,0,90,255],[0,0,92,255],[0,0,94,255],[0,0,96,255],[0,0,98,255],[0,0,100,255],[0,0,102,255],[0,0,104,255],[0,0,106,255],[0,0,108,255],[0,0,110,255],[0,0,112,255],[0,0,114,255],[0,0,116,255],[0,0,117,255],[0,0,119,255],[0,0,121,255],[0,0,123,255],[0,0,125,255],[0,0,127,255],[0,0,129,255],[0,0,131,255],[0,0,133,255],[0,0,135,255],[0,0,137,255],[0,0,139,255],[0,0,141,255],[0,0,143,255],[0,0,145,255],[0,0,147,255],[0,0,149,255],[0,0,151,255],[0,0,153,255],[0,0,155,255],[0,0,157,255],[0,0,159,255],[0,0,161,255],[0,0,163,255],[0,0,165,255],[0,0,167,255],[3,0,169,255],[6,0,171,255],[9,0,173,255],[12,0,175,255],[15,0,177,255],[18,0,179,255],[21,0,181,255],[24,0,183,255],[26,0,184,255],[29,0,186,255],[32,0,188,255],[35,0,190,255],[38,0,192,255],[41,0,194,255],[44,0,196,255],[47,0,198,255],[50,0,200,255],[52,0,197,255],[55,0,194,255],[57,0,191,255],[59,0,188,255],[62,0,185,255],[64,0,182,255],[66,0,179,255],[69,0,176,255],[71,0,174,255],[74,0,171,255],[76,0,168,255],[78,0,165,255],[81,0,162,255],[83,0,159,255],[85,0,156,255],[88,0,153,255],[90,0,150,255],[93,2,144,255],[96,4,138,255],[99,6,132,255],[102,8,126,255],[105,9,121,255],[108,11,115,255],[111,13,109,255],[114,15,103,255],[116,17,97,255],[119,19,91,255],[122,21,85,255],[125,23,79,255],[128,24,74,255],[131,26,68,255],[134,28,62,255],[137,30,56,255],[140,32,50,255],[143,34,47,255],[146,36,44,255],[149,38,41,255],[152,40,38,255],[155,41,35,255],[158,43,32,255],[161,45,29,255],[164,47,26,255],[166,49,24,255],[169,51,21,255],[172,53,18,255],[175,55,15,255],[178,56,12,255],[181,58,9,255],[184,60,6,255],[187,62,3,255],[190,64,0,255],[194,66,0,255],[198,68,0,255],[201,70,0,255],[205,72,0,255],[209,73,0,255],[213,75,0,255],[217,77,0,255],[221,79,0,255],[224,81,0,255],[228,83,0,255],[232,85,0,255],[236,87,0,255],[240,88,0,255],[244,90,0,255],[247,92,0,255],[251,94,0,255],[255,96,0,255],[255,98,3,255],[255,100,6,255],[255,102,9,255],[255,104,12,255],[255,105,15,255],[255,107,18,255],[255,109,21,255],[255,111,24,255],[255,113,26,255],[255,115,29,255],[255,117,32,255],[255,119,35,255],[255,120,38,255],[255,122,41,255],[255,124,44,255],[255,126,47,255],[255,128,50,255],[255,130,53,255],[255,132,56,255],[255,134,59,255],[255,136,62,255],[255,137,65,255],[255,139,68,255],[255,141,71,255],[255,143,74,255],[255,145,76,255],[255,147,79,255],[255,149,82,255],[255,151,85,255],[255,152,88,255],[255,154,91,255],[255,156,94,255],[255,158,97,255],[255,160,100,255],[255,162,103,255],[255,164,106,255],[255,166,109,255],[255,168,112,255],[255,169,115,255],[255,171,118,255],[255,173,121,255],[255,175,124,255],[255,177,126,255],[255,179,129,255],[255,181,132,255],[255,183,135,255],[255,184,138,255],[255,186,141,255],[255,188,144,255],[255,190,147,255],[255,192,150,255],[255,194,153,255],[255,196,156,255],[255,198,159,255],[255,200,162,255],[255,201,165,255],[255,203,168,255],[255,205,171,255],[255,207,174,255],[255,209,176,255],[255,211,179,255],[255,213,182,255],[255,215,185,255],[255,216,188,255],[255,218,191,255],[255,220,194,255],[255,222,197,255],[255,224,200,255],[255,226,203,255],[255,228,206,255],[255,229,210,255],[255,231,213,255],[255,233,216,255],[255,235,219,255],[255,237,223,255],[255,239,226,255],[255,240,229,255],[255,242,232,255],[255,244,236,255],[255,246,239,255],[255,248,242,255],[255,250,245,255],[255,251,249,255],[255,253,252,255],[255,255,255,255]]},pet20Step:{name:"PET 20 Step",numColors:256,colors:[[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255]]},gray:{name:"Gray",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[1,1,1]],green:[[0,0,0],[1,1,1]],blue:[[0,0,0],[1,1,1]]}},jet:{name:"Jet",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[.35,0,0],[.66,1,1],[.89,1,1],[1,.5,.5]],green:[[0,0,0],[.125,0,0],[.375,1,1],[.64,1,1],[.91,0,0],[1,0,0]],blue:[[0,.5,.5],[.11,1,1],[.34,1,1],[.65,0,0],[1,0,0]]}},hsv:{name:"HSV",numColors:256,gamma:1,segmentedData:{red:[[0,1,1],[.15873,1,1],[.174603,.96875,.96875],[.333333,.03125,.03125],[.349206,0,0],[.666667,0,0],[.68254,.03125,.03125],[.84127,.96875,.96875],[.857143,1,1],[1,1,1]],green:[[0,0,0],[.15873,.9375,.9375],[.174603,1,1],[.507937,1,1],[.666667,.0625,.0625],[.68254,0,0],[1,0,0]],blue:[[0,0,0],[.333333,0,0],[.349206,.0625,.0625],[.507937,1,1],[.84127,1,1],[.857143,.9375,.9375],[1,.09375,.09375]]}},hot:{name:"Hot",numColors:256,gamma:1,segmentedData:{red:[[0,.0416,.0416],[.365079,1,1],[1,1,1]],green:[[0,0,0],[.365079,0,0],[.746032,1,1],[1,1,1]],blue:[[0,0,0],[.746032,0,0],[1,1,1]]}},cool:{name:"Cool",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[1,1,1]],green:[[0,1,1],[1,0,0]],blue:[[0,1,1],[1,1,1]]}},spring:{name:"Spring",numColors:256,gamma:1,segmentedData:{red:[[0,1,1],[1,1,1]],green:[[0,0,0],[1,1,1]],blue:[[0,1,1],[1,0,0]]}},summer:{name:"Summer",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[1,1,1]],green:[[0,.5,.5],[1,1,1]],blue:[[0,.4,.4],[1,.4,.4]]}},autumn:{name:"Autumn",numColors:256,gamma:1,segmentedData:{red:[[0,1,1],[1,1,1]],green:[[0,0,0],[1,1,1]],blue:[[0,0,0],[1,0,0]]}},winter:{name:"Winter",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[1,0,0]],green:[[0,0,0],[1,1,1]],blue:[[0,1,1],[1,.5,.5]]}},bone:{name:"Bone",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[.746032,.652778,.652778],[1,1,1]],green:[[0,0,0],[.365079,.319444,.319444],[.746032,.777778,.777778],[1,1,1]],blue:[[0,0,0],[.365079,.444444,.444444],[1,1,1]]}},copper:{name:"Copper",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[.809524,1,1],[1,1,1]],green:[[0,0,0],[1,.7812,.7812]],blue:[[0,0,0],[1,.4975,.4975]]}},spectral:{name:"Spectral",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[.05,.4667,.4667],[.1,.5333,.5333],[.15,0,0],[.2,0,0],[.25,0,0],[.3,0,0],[.35,0,0],[.4,0,0],[.45,0,0],[.5,0,0],[.55,0,0],[.6,0,0],[.65,.7333,.7333],[.7,.9333,.9333],[.75,1,1],[.8,1,1],[.85,1,1],[.9,.8667,.8667],[.95,.8,.8],[1,.8,.8]],green:[[0,0,0],[.05,0,0],[.1,0,0],[.15,0,0],[.2,0,0],[.25,.4667,.4667],[.3,.6,.6],[.35,.6667,.6667],[.4,.6667,.6667],[.45,.6,.6],[.5,.7333,.7333],[.55,.8667,.8667],[.6,1,1],[.65,1,1],[.7,.9333,.9333],[.75,.8,.8],[.8,.6,.6],[.85,0,0],[.9,0,0],[.95,0,0],[1,.8,.8]],blue:[[0,0,0],[.05,.5333,.5333],[.1,.6,.6],[.15,.6667,.6667],[.2,.8667,.8667],[.25,.8667,.8667],[.3,.8667,.8667],[.35,.6667,.6667],[.4,.5333,.5333],[.45,0,0],[.5,0,0],[.55,0,0],[.6,0,0],[.65,0,0],[.7,0,0],[.75,0,0],[.8,0,0],[.85,0,0],[.9,0,0],[.95,0,0],[1,.8,.8]]}},coolwarm:{name:"CoolWarm",numColors:256,gamma:1,segmentedData:{red:[[0,.2298057,.2298057],[.03125,.26623388,.26623388],[.0625,.30386891,.30386891],[.09375,.342804478,.342804478],[.125,.38301334,.38301334],[.15625,.424369608,.424369608],[.1875,.46666708,.46666708],[.21875,.509635204,.509635204],[.25,.552953156,.552953156],[.28125,.596262162,.596262162],[.3125,.639176211,.639176211],[.34375,.681291281,.681291281],[.375,.722193294,.722193294],[.40625,.761464949,.761464949],[.4375,.798691636,.798691636],[.46875,.833466556,.833466556],[.5,.865395197,.865395197],[.53125,.897787179,.897787179],[.5625,.924127593,.924127593],[.59375,.944468518,.944468518],[.625,.958852946,.958852946],[.65625,.96732803,.96732803],[.6875,.969954137,.969954137],[.71875,.966811177,.966811177],[.75,.958003065,.958003065],[.78125,.943660866,.943660866],[.8125,.923944917,.923944917],[.84375,.89904617,.89904617],[.875,.869186849,.869186849],[.90625,.834620542,.834620542],[.9375,.795631745,.795631745],[.96875,.752534934,.752534934],[1,.705673158,.705673158]],green:[[0,.298717966,.298717966],[.03125,.353094838,.353094838],[.0625,.406535296,.406535296],[.09375,.458757618,.458757618],[.125,.50941904,.50941904],[.15625,.558148092,.558148092],[.1875,.604562568,.604562568],[.21875,.648280772,.648280772],[.25,.688929332,.688929332],[.28125,.726149107,.726149107],[.3125,.759599947,.759599947],[.34375,.788964712,.788964712],[.375,.813952739,.813952739],[.40625,.834302879,.834302879],[.4375,.849786142,.849786142],[.46875,.860207984,.860207984],[.5,.86541021,.86541021],[.53125,.848937047,.848937047],[.5625,.827384882,.827384882],[.59375,.800927443,.800927443],[.625,.769767752,.769767752],[.65625,.734132809,.734132809],[.6875,.694266682,.694266682],[.71875,.650421156,.650421156],[.75,.602842431,.602842431],[.78125,.551750968,.551750968],[.8125,.49730856,.49730856],[.84375,.439559467,.439559467],[.875,.378313092,.378313092],[.90625,.312874446,.312874446],[.9375,.24128379,.24128379],[.96875,.157246067,.157246067],[1,.01555616,.01555616]],blue:[[0,.753683153,.753683153],[.03125,.801466763,.801466763],[.0625,.84495867,.84495867],[.09375,.883725899,.883725899],[.125,.917387822,.917387822],[.15625,.945619588,.945619588],[.1875,.968154911,.968154911],[.21875,.98478814,.98478814],[.25,.995375608,.995375608],[.28125,.999836203,.999836203],[.3125,.998151185,.998151185],[.34375,.990363227,.990363227],[.375,.976574709,.976574709],[.40625,.956945269,.956945269],[.4375,.931688648,.931688648],[.46875,.901068838,.901068838],[.5,.865395561,.865395561],[.53125,.820880546,.820880546],[.5625,.774508472,.774508472],[.59375,.726736146,.726736146],[.625,.678007945,.678007945],[.65625,.628751763,.628751763],[.6875,.579375448,.579375448],[.71875,.530263762,.530263762],[.75,.481775914,.481775914],[.78125,.434243684,.434243684],[.8125,.387970225,.387970225],[.84375,.343229596,.343229596],[.875,.300267182,.300267182],[.90625,.259301199,.259301199],[.9375,.220525627,.220525627],[.96875,.184115123,.184115123],[1,.150232812,.150232812]]}},blues:{name:"Blues",numColors:256,gamma:1,segmentedData:{red:[[0,.9686274528503418,.9686274528503418],[.125,.8705882430076599,.8705882430076599],[.25,.7764706015586853,.7764706015586853],[.375,.6196078658103943,.6196078658103943],[.5,.41960784792900085,.41960784792900085],[.625,.25882354378700256,.25882354378700256],[.75,.12941177189350128,.12941177189350128],[.875,.0313725508749485,.0313725508749485],[1,.0313725508749485,.0313725508749485]],green:[[0,.9843137264251709,.9843137264251709],[.125,.9215686321258545,.9215686321258545],[.25,.8588235378265381,.8588235378265381],[.375,.7921568751335144,.7921568751335144],[.5,.6823529601097107,.6823529601097107],[.625,.572549045085907,.572549045085907],[.75,.4431372582912445,.4431372582912445],[.875,.3176470696926117,.3176470696926117],[1,.1882352977991104,.1882352977991104]],blue:[[0,1,1],[.125,.9686274528503418,.9686274528503418],[.25,.9372549057006836,.9372549057006836],[.375,.8823529481887817,.8823529481887817],[.5,.8392156958580017,.8392156958580017],[.625,.7764706015586853,.7764706015586853],[.75,.7098039388656616,.7098039388656616],[.875,.6117647290229797,.6117647290229797],[1,.41960784792900085,.41960784792900085]]}}},FO={MINIMUM_SLAB_THICKNESS:.05,MAXIMUM_RAY_DISTANCE:1e6};Object.freeze(FO);let FR=FO,FN=.001,FL=function e(t){for(let r of Object.getOwnPropertyNames(t)){let n=t[r];n&&"object"==typeof n&&e(n)}return Object.freeze(t)}({axial:{viewPlaneNormal:[0,0,-1],viewUp:[0,-1,0],viewRight:[1,0,0]},sagittal:{viewPlaneNormal:[1,0,0],viewUp:[0,0,1],viewRight:[0,1,0]},coronal:{viewPlaneNormal:[0,-1,0],viewUp:[0,0,1],viewRight:[1,0,0]}}),FV=[{name:"CT-AAA",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"12 -3024 0 143.556 0 166.222 0.686275 214.389 0.696078 419.736 0.833333 3071 0.803922",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"24 -3024 0 0 0 143.556 0.615686 0.356863 0.184314 166.222 0.882353 0.603922 0.290196 214.389 1 1 1 419.736 1 0.937033 0.954531 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-AAA2",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"16 -3024 0 129.542 0 145.244 0.166667 157.02 0.5 169.918 0.627451 395.575 0.8125 1578.73 0.8125 3071 0.8125",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"32 -3024 0 0 0 129.542 0.54902 0.25098 0.14902 145.244 0.6 0.627451 0.843137 157.02 0.890196 0.47451 0.6 169.918 0.992157 0.870588 0.392157 395.575 1 0.886275 0.658824 1578.73 1 0.829256 0.957922 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Bone",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"8 -3024 0 -16.4458 0 641.385 0.715686 3071 0.705882",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"16 -3024 0 0 0 -16.4458 0.729412 0.254902 0.301961 641.385 0.905882 0.815686 0.552941 3071 1 1 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Bones",gradientOpacity:"4 0 1 985.12 1",specularPower:"1",scalarOpacity:"8 -1000 0 152.19 0 278.93 0.190476 952 0.2",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"20 -1000 0.3 0.3 1 -488 0.3 1 0.3 463.28 1 0 0 659.15 1 0.912535 0.0374849 953 1 0.3 0.3",diffuse:"1",interpolation:"1"},{name:"CT-Cardiac",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"12 -3024 0 -77.6875 0 94.9518 0.285714 179.052 0.553571 260.439 0.848214 3071 0.875",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"24 -3024 0 0 0 -77.6875 0.54902 0.25098 0.14902 94.9518 0.882353 0.603922 0.290196 179.052 1 0.937033 0.954531 260.439 0.615686 0 0 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Cardiac2",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"12 -3024 0 42.8964 0 163.488 0.428571 277.642 0.776786 1587 0.754902 3071 0.754902",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"24 -3024 0 0 0 42.8964 0.54902 0.25098 0.14902 163.488 0.917647 0.639216 0.0588235 277.642 1 0.878431 0.623529 1587 1 1 1 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Cardiac3",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"14 -3024 0 -86.9767 0 45.3791 0.169643 139.919 0.589286 347.907 0.607143 1224.16 0.607143 3071 0.616071",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"28 -3024 0 0 0 -86.9767 0 0.25098 1 45.3791 1 0 0 139.919 1 0.894893 0.894893 347.907 1 1 0.25098 1224.16 1 1 1 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Chest-Contrast-Enhanced",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"10 -3024 0 67.0106 0 251.105 0.446429 439.291 0.625 3071 0.616071",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"20 -3024 0 0 0 67.0106 0.54902 0.25098 0.14902 251.105 0.882353 0.603922 0.290196 439.291 1 0.937033 0.954531 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Chest-Vessels",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"10 -3024 0 -1278.35 0 22.8277 0.428571 439.291 0.625 3071 0.616071",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"20 -3024 0 0 0 -1278.35 0.54902 0.25098 0.14902 22.8277 0.882353 0.603922 0.290196 439.291 1 0.937033 0.954531 3071 0.827451 0.658824 1",diffuse:"1",interpolation:"1"},{name:"CT-Coronary-Arteries",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"12 -2048 0 136.47 0 159.215 0.258929 318.43 0.571429 478.693 0.776786 3661 1",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"24 -2048 0 0 0 136.47 0 0 0 159.215 0.159804 0.159804 0.159804 318.43 0.764706 0.764706 0.764706 478.693 1 1 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Coronary-Arteries-2",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"14 -2048 0 142.677 0 145.016 0.116071 192.174 0.5625 217.24 0.776786 384.347 0.830357 3661 0.830357",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"28 -2048 0 0 0 142.677 0 0 0 145.016 0.615686 0 0.0156863 192.174 0.909804 0.454902 0 217.24 0.972549 0.807843 0.611765 384.347 0.909804 0.909804 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Coronary-Arteries-3",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"14 -2048 0 128.643 0 129.982 0.0982143 173.636 0.669643 255.884 0.857143 584.878 0.866071 3661 1",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"28 -2048 0 0 0 128.643 0 0 0 129.982 0.615686 0 0.0156863 173.636 0.909804 0.454902 0 255.884 0.886275 0.886275 0.886275 584.878 0.968627 0.968627 0.968627 3661 1 1 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Cropped-Volume-Bone",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"10 -2048 0 -451 0 -450 1 1050 1 3661 1",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"20 -2048 0 0 0 -451 0 0 0 -450 0.0556356 0.0556356 0.0556356 1050 1 1 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Fat",gradientOpacity:"6 0 1 985.12 1 988 1",specularPower:"1",scalarOpacity:"14 -1000 0 -100 0 -99 0.15 -60 0.15 -59 0 101.2 0 952 0",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"36 -1000 0.3 0.3 1 -497.5 0.3 1 0.3 -99 0 0 1 -76.946 0 1 0 -65.481 0.835431 0.888889 0.0165387 83.89 1 0 0 463.28 1 0 0 659.15 1 0.912535 0.0374849 2952 1 0.300267 0.299886",diffuse:"1",interpolation:"1"},{name:"CT-Liver-Vasculature",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"14 -2048 0 149.113 0 157.884 0.482143 339.96 0.660714 388.526 0.830357 1197.95 0.839286 3661 0.848214",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"28 -2048 0 0 0 149.113 0 0 0 157.884 0.501961 0.25098 0 339.96 0.695386 0.59603 0.36886 388.526 0.854902 0.85098 0.827451 1197.95 1 1 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Lung",gradientOpacity:"6 0 1 985.12 1 988 1",specularPower:"1",scalarOpacity:"12 -1000 0 -600 0 -599 0.15 -400 0.15 -399 0 2952 0",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"24 -1000 0.3 0.3 1 -600 0 0 1 -530 0.134704 0.781726 0.0724558 -460 0.929244 1 0.109473 -400 0.888889 0.254949 0.0240258 2952 1 0.3 0.3",diffuse:"1",interpolation:"1"},{name:"CT-MIP",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"8 -3024 0 -637.62 0 700 1 3071 1",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"16 -3024 0 0 0 -637.62 1 1 1 700 1 1 1 3071 1 1 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Muscle",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"10 -3024 0 -155.407 0 217.641 0.676471 419.736 0.833333 3071 0.803922",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"20 -3024 0 0 0 -155.407 0.54902 0.25098 0.14902 217.641 0.882353 0.603922 0.290196 419.736 1 0.937033 0.954531 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Pulmonary-Arteries",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"14 -2048 0 -568.625 0 -364.081 0.0714286 -244.813 0.401786 18.2775 0.607143 447.798 0.830357 3592.73 0.839286",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"28 -2048 0 0 0 -568.625 0 0 0 -364.081 0.396078 0.301961 0.180392 -244.813 0.611765 0.352941 0.0705882 18.2775 0.843137 0.0156863 0.156863 447.798 0.752941 0.752941 0.752941 3592.73 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Soft-Tissue",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"10 -2048 0 -167.01 0 -160 1 240 1 3661 1",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"20 -2048 0 0 0 -167.01 0 0 0 -160 0.0556356 0.0556356 0.0556356 240 1 1 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Air",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"8 -3024 0.705882 -900.0 0.715686 -500.0 0 3071 0",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"16 -3024 1 1 1 -900.0 0.2 1.0 1.0 -500.0 0.3 0.3 1.0 3071 0 0 0 ",diffuse:"0.9",interpolation:"1"},{name:"MR-Angio",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"12 -2048 0 151.354 0 158.279 0.4375 190.112 0.580357 200.873 0.732143 3661 0.741071",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"24 -2048 0 0 0 151.354 0 0 0 158.279 0.74902 0.376471 0 190.112 1 0.866667 0.733333 200.873 0.937255 0.937255 0.937255 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"MR-Default",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"12 0 0 20 0 40 0.15 120 0.3 220 0.375 1024 0.5",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"24 0 0 0 0 20 0.168627 0 0 40 0.403922 0.145098 0.0784314 120 0.780392 0.607843 0.380392 220 0.847059 0.835294 0.788235 1024 1 1 1",diffuse:"1",interpolation:"1"},{name:"MR-MIP",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"8 0 0 98.3725 0 416.637 1 2800 1",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"16 0 1 1 1 98.3725 1 1 1 416.637 1 1 1 2800 1 1 1",diffuse:"1",interpolation:"1"},{name:"MR-T2-Brain",gradientOpacity:"4 0 1 160.25 1",specularPower:"40",scalarOpacity:"10 0 0 36.05 0 218.302 0.171429 412.406 1 641 1",specular:"0.5",shade:"1",ambient:"0.3",colorTransfer:"16 0 0 0 0 98.7223 0.956863 0.839216 0.192157 412.406 0 0.592157 0.807843 641 1 1 1",diffuse:"0.6",interpolation:"1"},{name:"DTI-FA-Brain",gradientOpacity:"4 0 1 0.9950 1",specularPower:"40",scalarOpacity:"16 0 0 0 0 0.3501 0.0158 0.49379 0.7619 0.6419 1 0.9920 1 0.9950 0 0.9950 0",specular:"0.5",shade:"1",ambient:"0.3",colorTransfer:"28 0 1 0 0 0 1 0 0 0.24974 0.4941 1 0 0.49949 0 0.9882 1 0.7492 0.51764 0 1 0.9950 1 0 0 0.9950 1 0 0",diffuse:"0.9",interpolation:"1"}],FF={},Fj=e=>FF[e],FB=()=>{let e=Object.keys(FF).map(e=>FF[e]);return e.sort((e,t)=>"_"===e.id[0]&&"_"!==t.id[0]?1:"_"!==e.id[0]&&"_"===t.id[0]?-1:0),e},FW=e=>e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e),FU=(e,t)=>t&&!0===t.clone&&FW(e)?FH(Array.isArray(e)?[]:{},e,t):e,Fz=(e,t,r)=>{let n=e.slice();return t.forEach(function(t,a){void 0===n[a]?n[a]=FU(t,r):FW(t)?n[a]=FH(e[a],t,r):-1===e.indexOf(t)&&(n[a]=FU(t,r))}),n},FH=(e={},t={},r)=>{let n,a=Array.isArray(t),i=(r||{arrayMerge:Fz}).arrayMerge||Fz;return a?Array.isArray(e)?i(e,t,r):FU(t,r):(n={},FW(e)&&Object.keys(e).forEach(function(t){n[t]=FU(e[t],r)}),Object.keys(t).forEach(function(a){FW(t[a])&&e[a]?n[a]=FH(e[a],t[a],r):n[a]=FU(t[a],r)}),n)},FG=Symbol("Comlink.proxy"),Fq=Symbol("Comlink.endpoint"),F$=Symbol("Comlink.releaseProxy"),FK=Symbol("Comlink.finalizer"),FY=Symbol("Comlink.thrown"),FX=e=>"object"==typeof e&&null!==e||"function"==typeof e,FZ=new Map([["proxy",{canHandle:e=>FX(e)&&e[FG],serialize(e){let{port1:t,port2:r}=new MessageChannel;return function e(t,r=globalThis,n=["*"]){r.addEventListener("message",function a(i){let o;if(!i||!i.data)return;if(!function(e,t){for(let r of e)if(t===r||"*"===r||r instanceof RegExp&&r.test(t))return!0;return!1}(n,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);let{id:s,type:l,path:u}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(F8);try{var d,h,p;let r=u.slice(0,-1).reduce((e,t)=>e[t],t),n=u.reduce((e,t)=>e[t],t);switch(l){case"GET":o=n;break;case"SET":r[u.slice(-1)[0]]=F8(i.data.value),o=!0;break;case"APPLY":o=n.apply(r,c);break;case"CONSTRUCT":d=new n(...c),o=Object.assign(d,{[FG]:!0});break;case"ENDPOINT":{let{port1:r,port2:n}=new MessageChannel;e(t,n),h=r,p=[r],F3.set(h,p),o=h}break;case"RELEASE":o=void 0;break;default:return}}catch(e){o={value:e,[FY]:0}}Promise.resolve(o).catch(e=>({value:e,[FY]:0})).then(e=>{let[n,i]=F4(e);r.postMessage(Object.assign(Object.assign({},n),{id:s}),i),"RELEASE"===l&&(r.removeEventListener("message",a),FJ(r),FK in t&&"function"==typeof t[FK]&&t[FK]())}).catch(e=>{let[t,n]=F4({value:TypeError("Unserializable return value"),[FY]:0});r.postMessage(Object.assign(Object.assign({},t),{id:s}),n)})}),r.start&&r.start()}(e,t),[r,[r]]},deserialize:e=>{var t;let r;return e.start(),t=e,r=new Map,t.addEventListener("message",function(e){let{data:t}=e;if(!t||!t.id)return;let n=r.get(t.id);if(n)try{n(t)}finally{r.delete(t.id)}}),function e(t,r,n=[],a=function(){}){let i,o=!1,s=new Proxy(a,{get(a,i){if(FQ(o),i===F$)return()=>{F2&&F2.unregister(s),F1(t),r.clear(),o=!0};if("then"===i){if(0===n.length)return{then:()=>s};let e=F6(t,r,{type:"GET",path:n.map(e=>e.toString())}).then(F8);return e.then.bind(e)}return e(t,r,[...n,i])},set(e,a,i){FQ(o);let[s,l]=F4(i);return F6(t,r,{type:"SET",path:[...n,a].map(e=>e.toString()),value:s},l).then(F8)},apply(a,i,s){FQ(o);let l=n[n.length-1];if(l===Fq)return F6(t,r,{type:"ENDPOINT"}).then(F8);if("bind"===l)return e(t,r,n.slice(0,-1));let[u,c]=F5(s);return F6(t,r,{type:"APPLY",path:n.map(e=>e.toString()),argumentList:u},c).then(F8)},construct(e,a){FQ(o);let[i,s]=F5(a);return F6(t,r,{type:"CONSTRUCT",path:n.map(e=>e.toString()),argumentList:i},s).then(F8)}});return i=(F0.get(t)||0)+1,F0.set(t,i),F2&&F2.register(s,t,s),s}(t,r,[],void 0)}}],["throw",{canHandle:e=>FX(e)&&FY in e,serialize:({value:e})=>[e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[]],deserialize(e){if(e.isError)throw Object.assign(Error(e.value.message),e.value);throw e.value}}]]);function FJ(e){"MessagePort"===e.constructor.name&&e.close()}function FQ(e){if(e)throw Error("Proxy has been released and is not useable")}function F1(e){return F6(e,new Map,{type:"RELEASE"}).then(()=>{FJ(e)})}let F0=new WeakMap,F2="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(F0.get(e)||0)-1;F0.set(e,t),0===t&&F1(e)});function F5(e){var t;let r=e.map(F4);return[r.map(e=>e[0]),(t=r.map(e=>e[1]),Array.prototype.concat.apply([],t))]}let F3=new WeakMap;function F4(e){for(let[t,r]of FZ)if(r.canHandle(e)){let[n,a]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},a]}return[{type:"RAW",value:e},F3.get(e)||[]]}function F8(e){switch(e.type){case"HANDLER":return FZ.get(e.name).deserialize(e.value);case"RAW":return e.value}}function F6(e,t,r,n){return new Promise(a=>{let i=[,,,,].fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.set(i,a),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),n)})}function F9(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}class F7{constructor(e){this.numRequests={[L2.Interaction]:0,[L2.Thumbnail]:0,[L2.Prefetch]:0,[L2.Compute]:0},this.id=e||F9(),this.requestPool={[L2.Interaction]:{0:[]},[L2.Thumbnail]:{0:[]},[L2.Prefetch]:{0:[]},[L2.Compute]:{0:[]}},this.grabDelay=5,this.awake=!1,this.numRequests={[L2.Interaction]:0,[L2.Thumbnail]:0,[L2.Prefetch]:0,[L2.Compute]:0},this.maxNumRequests={[L2.Interaction]:6,[L2.Thumbnail]:6,[L2.Prefetch]:5,[L2.Compute]:1e3}}setMaxSimultaneousRequests(e,t){this.maxNumRequests[e]=t}getMaxSimultaneousRequests(e){return this.maxNumRequests[e]}destroy(){this.timeoutHandle&&window.clearTimeout(this.timeoutHandle)}addRequest(e,t,r,n=0){void 0===this.requestPool[t][n]&&(this.requestPool[t][n]=[]),this.requestPool[t][n].push({requestFn:e,type:t,additionalDetails:r}),this.startGrabbing()}filterRequests(e){Object.keys(this.requestPool).forEach(t=>{let r=this.requestPool[t];Object.keys(r).forEach(t=>{r[t]=r[t].filter(t=>e(t))})})}clearRequestStack(e){if(!this.requestPool[e])throw Error(`No category for the type ${e} found`);this.requestPool[e]={0:[]}}sendRequests(e){let t=this.maxNumRequests[e]-this.numRequests[e],r=0;for(let n=0;n<t;n++){let t=this.getNextRequest(e);if(null===t)return!1;if(t){let n;this.numRequests[e]++,this.awake=!0;try{n=t.requestFn()}catch(e){console.warn("sendRequest failed",e)}n?.finally?n.finally(()=>{this.numRequests[e]--,this.startAgain()}):(this.numRequests[e]--,r++)}}return r&&this.startAgain(),!0}getNextRequest(e){for(let t of this.getSortedPriorityGroups(e))if(this.requestPool[e][t].length)return this.requestPool[e][t].shift();return null}startGrabbing(){let e=this.sendRequests(L2.Interaction),t=this.sendRequests(L2.Thumbnail),r=this.sendRequests(L2.Prefetch),n=this.sendRequests(L2.Compute);e||t||r||n||(this.awake=!1)}startAgain(){this.awake&&(void 0!==this.grabDelay?this.timeoutHandle||(this.timeoutHandle=window.setTimeout(()=>{this.timeoutHandle=null,this.startGrabbing()},this.grabDelay)):this.startGrabbing())}getSortedPriorityGroups(e){return Object.keys(this.requestPool[e]).map(Number).filter(t=>this.requestPool[e][t].length).sort((e,t)=>e-t)}getRequestPool(){return this.requestPool}}let{pp:je,tZ:jt,gE:jr,bM:jn,uu:ja,UA:ji,_E:jo,RZ:js,UX:jl,HL:ju,U5:jc}=B;jn.getLogger("registration");let jd={gpuTier:{tier:2},isMobile:!1,rendering:{useCPURendering:!1,preferSizeOverAccuracy:!1,useLegacyCameraFOV:!1,strictZSpacingForVolumeViewport:!0,renderingEngineMode:FD.ContextPool,webGlContextCount:7,planar:{cpuThresholds:{image:0x4000000,volume:0x4000000},cpuVolume:{useViewportSamplingForLinear:!0,volumeModifiedThrottleMs:5e3}},volumeRendering:{sampleDistanceMultiplier:1}},debug:{statsOverlay:!1},peerImport:e=>null},jh={...jd,rendering:{...jd.rendering}};function jp(){return!(/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&navigator.platform.includes("MacIntel"))}function jf(){return jh.rendering.useCPURendering}function jm(){return!0===jh.rendering.useGenericViewport}async function jg(e){return jh.peerImport(e)}let jy=new class{constructor(){this.listeners={},this.debouncedListeners={}}reset(){this.listeners={},this.debouncedListeners={}}addEventListenerOnce(e,t){let r=n=>{this.removeEventListener(e,r),t.call(this,n)};this.addEventListener(e,r)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)}addEventListenerDebounced(e,t,r){this.debouncedListeners[e]=this.debouncedListeners[e]||{};let n=this.debouncedListeners[e];if(!n[t]){let a=e=>{n[t]&&clearTimeout(n[t].timeoutId),n[t].timeoutId=setTimeout(()=>{t.call(this,e)},r)};n[t]={original:t,handle:a,timeoutId:null},this.addEventListener(e,a)}}removeEventListenerDebounced(e,t){if(this.debouncedListeners[e]?.[t]){let r=this.debouncedListeners[e][t];this.removeEventListener(e,r.handle),clearTimeout(r.timeoutId),delete this.debouncedListeners[e][t]}}removeEventListener(e,t){if(!this.listeners[e])return;let r=this.listeners[e],n=r.length;for(let e=0;e<n;e++)if(r[e]===t)return void r.splice(e,1)}dispatchEvent(e){if(!this.listeners[e.type])return!e.defaultPrevented;let t=this.listeners[e.type].slice(),r=t.length;for(let n=0;n<r;n++)try{t[n].call(this,e)}catch(t){console.error(`error in event listener of type: ${e.type}`,t)}return!e.defaultPrevented}};function jv(e=jy,t,r=null){if(!t)throw Error("Event type was not defined");let n=new CustomEvent(t,{detail:r,cancelable:!0});return e?.dispatchEvent(n)}let jb=u(5744)(),jw={vtkObject:()=>null};function jx(e){if(null==e||e.isA)return e;if(!e.vtkClass)return jb.console&&jb.console.error&&jb.console.error("Invalid VTK object"),null;let t=jw[e.vtkClass];if(!t)return jb.console&&jb.console.error&&jb.console.error(`No vtk class found for Object of type ${e.vtkClass}`),null;let r={...e};Object.keys(r).forEach(e=>{r[e]&&"object"==typeof r[e]&&r[e].vtkClass&&(r[e]=jx(r[e]))});let n=t(r);return n&&n.modified&&n.modified(),n}jx.register=function(e,t){jw[e]=t};class jC extends Array{push(){for(let e=0;e<arguments.length;e++)this.includes(arguments[e])||super.push(arguments[e]);return this.length}}let jk=0,jM=e=>{throw Error(`Named parameter '${e}' is missing`)},jS=Symbol("void"),jE={};function jP(){}["log","debug","info","warn","error","time","timeEnd","group","groupEnd"].forEach(e=>{jE[e]=jP}),jb.console=console.hasOwnProperty("log")?console:jE;let jI={debug:jP,error:jb.console.error||jP,info:jb.console.info||jP,log:jb.console.log||jP,warn:jb.console.warn||jP};function jT(e,t){jI[e]&&(jI[e]=t||jP)}function j_(...e){jI.log(...e)}function jD(...e){jI.info(...e)}function jA(...e){jI.debug(...e)}function jO(...e){jI.error(...e)}function jR(...e){jI.warn(...e)}let jN={};function jL(e){jN[e]||(jI.error(e),jN[e]=!0)}let jV=Object.create(null);jV.Float32Array=Float32Array,jV.Float64Array=Float64Array,jV.Uint8Array=Uint8Array,jV.Int8Array=Int8Array,jV.Uint16Array=Uint16Array,jV.Int16Array=Int16Array,jV.Uint32Array=Uint32Array,jV.Int32Array=Int32Array,jV.Uint8ClampedArray=Uint8ClampedArray;try{jV.BigInt64Array=BigInt64Array,jV.BigUint64Array=BigUint64Array}catch{}function jF(e,...t){return new(jV[e]||Float64Array)(...t)}function jj(e,...t){return(jV[e]||Float64Array).from(...t)}function jB(e){return e.charAt(0).toUpperCase()+e.slice(1)}function jW(e){return jB("_"===e[0]?e.slice(1):e)}function jU(e){return e.charAt(0).toLowerCase()+e.slice(1)}function jz(e,t=2,r=1e3){let n=["TB","GB","MB","KB"],a=Number(e),i="B";for(;a>r;)a/=r,i=n.pop();return`${a.toFixed(t)} ${i}`}function jH(e,t=" "){let r=[],n=e;for(;n>1e3;)r.push(`000${n%1e3}`.slice(-3)),n=Math.floor(n/1e3);return n>0&&r.push(n),r.reverse(),r.join(t)}function jG(e){Object.keys(e).forEach(t=>{Array.isArray(e[t])&&(e[t]=[].concat(e[t]))})}function jq(e){return e&&e.isA?e.getState():e}function j$(e){setTimeout(e,0)}function jK(e,t){let r=performance.now();e.finally(()=>{t(performance.now()-r)})}function jY(e={},t={}){jG(t);let r=[];if(Number.isInteger(t.mtime)||(t.mtime=++jk),"classHierarchy"in t){if(!(t.classHierarchy instanceof jC)){let e=new jC;for(let r=0;r<t.classHierarchy.length;r++)e.push(t.classHierarchy[r]);t.classHierarchy=e}}else t.classHierarchy=new jC("vtkObject");return e.isDeleted=()=>!!t.deleted,e.modified=n=>{t.deleted?jO("instance deleted - cannot call any method"):n&&n<e.getMTime()||(t.mtime=++jk,r.forEach(t=>t&&t(e)))},e.onModified=e=>{if(t.deleted)return jO("instance deleted - cannot call any method"),null;let n=r.length;return r.push(e),Object.freeze({unsubscribe:function(){r[n]=null}})},e.getMTime=()=>t.mtime,e.isA=e=>{let r=t.classHierarchy.length;for(;r--;)if(t.classHierarchy[r]===e)return!0;return!1},e.getClassName=(e=0)=>t.classHierarchy[t.classHierarchy.length-1-e],e.set=(r={},n=!1,a=!1)=>{let i=!1;return Object.keys(r).forEach(o=>{let s=a?null:e[`set${jB(o)}`];s&&Array.isArray(r[o])&&s.length>1?i=s(...r[o])||i:s?i=s(r[o])||i:(-1!==["mtime"].indexOf(o)||n||jR(`Warning: Set value to model directly ${o}, ${r[o]}`),i=t[o]!==r[o]||i,t[o]=r[o])}),i},e.get=(...e)=>{if(!e.length)return t;let r={};return e.forEach(e=>{r[e]=t[e]}),r},e.getReferenceByName=e=>t[e],e.delete=()=>{Object.keys(t).forEach(e=>delete t[e]),r.forEach((e,t)=>{r[t]=null}),t.deleted=!0},e.getState=()=>{if(t.deleted)return null;let r={...t,vtkClass:e.getClassName()};Object.keys(r).forEach(e=>{if(null===r[e]||void 0===r[e]||"_"===e[0])delete r[e];else if(r[e].isA)r[e]=r[e].getState();else if(Array.isArray(r[e]))r[e]=r[e].map(jq);else{var t;t=r[e],Object.values(jV).some(e=>t instanceof e)&&(r[e]=Array.from(r[e]))}});let n={};return Object.keys(r).sort().forEach(e=>{n[e]=r[e]}),n.mtime&&delete n.mtime,n},e.shallowCopy=(r,n=!1)=>{if(r.getClassName()!==e.getClassName())throw Error(`Cannot ShallowCopy ${r.getClassName()} into ${e.getClassName()}`);let a=r.get(),i=Object.keys(t).sort();Object.keys(a).sort().forEach(e=>{let r=i.indexOf(e);-1===r?n&&jA(`add ${e} in shallowCopy`):i.splice(r,1),t[e]=a[e]}),i.length&&n&&jA(`Untouched keys: ${i.join(", ")}`),e.modified()},e.toJSON=function(){return e.getState()},e}let jX={object:(e,t,r)=>function(){return{...t[r.name]}}};function jZ(e,t,r){r.forEach(r=>{if("object"==typeof r){let n=jX[r.type];n?e[`get${jW(r.name)}`]=n(e,t,r):e[`get${jW(r.name)}`]=()=>t[r.name]}else e[`get${jW(r)}`]=()=>t[r]})}let jJ={enum(e,t,r){let n=`_on${jW(r.name)}Changed`;return a=>{if("string"==typeof a){if(void 0!==r.enum[a])return t[r.name]!==r.enum[a]&&(t[r.name]=r.enum[a],e.modified(),!0);throw jO(`Set Enum with invalid argument ${r}, ${a}`),RangeError("Set Enum with invalid string argument")}if("number"==typeof a){if(t[r.name]!==a){if(-1!==Object.keys(r.enum).map(e=>r.enum[e]).indexOf(a)){let i=t[r.name];return t[r.name]=a,t[n]?.(e,t,a,i),e.modified(),!0}throw jO(`Set Enum outside numeric range ${r}, ${a}`),RangeError("Set Enum outside numeric range")}return!1}throw jO(`Set Enum with invalid argument (String/Number) ${r}, ${a}`),TypeError("Set Enum with invalid argument (String/Number)")}},object(e,t,r){r.params?.length===1&&jR('Setter of type "object" with a single "param" field is not supported');let n=`_on${jW(r.name)}Changed`;return(...a)=>{let i;if(i=a.length>1&&r.params?.length?r.params.reduce((e,t,r)=>Object.assign(e,{[t]:a[r]}),{}):a[0],!TD(t[r.name],i)){let a=t[r.name];return t[r.name]=i,t[n]?.(e,t,i,a),e.modified(),!0}return!1}}};function jQ(e){if("object"==typeof e){let t=jJ[e.type];if(t)return(r,n)=>t(r,n,e);throw jO(`No setter for field ${e}`),TypeError("No setter for field")}return function(t,r){let n=`_on${jW(e)}Changed`;return function(a){if(r.deleted)return jO("instance deleted - cannot call any method"),!1;if(r[e]!==a){let i=r[e.name];return r[e]=a,r[n]?.(t,r,a,i),t.modified(),!0}return!1}}}function j1(e,t,r){r.forEach(r=>{"object"==typeof r?e[`set${jW(r.name)}`]=jQ(r)(e,t):e[`set${jW(r)}`]=jQ(r)(e,t)})}function j0(e,t,r){jZ(e,t,r),j1(e,t,r)}function j2(e,t,r){r.forEach(r=>{e[`get${jW(r)}`]=()=>t[r]?Array.from(t[r]):t[r],e[`get${jW(r)}ByReference`]=()=>t[r]})}function j5(e,t,r,n,a){r.forEach(r=>{if(t[r]&&n&&t[r].length!==n)throw RangeError(`Invalid initial number of values for array (${r})`);let i=`_on${jW(r)}Changed`;e[`set${jW(r)}`]=(...o)=>{let s;if(t.deleted)return jO("instance deleted - cannot call any method"),!1;let l=o,u=!1;if(1===l.length&&(null==l[0]||l[0].length>=0)&&(l=l[0],u=!0),null==l)s=t[r]!==l;else{if(n&&l.length!==n)if(l.length<n&&void 0!==a)for(l=Array.from(l),u=!1;l.length<n;)l.push(a);else throw RangeError(`Invalid number of values for array setter (${r})`);s=null==t[r]||t[r].length!==l.length;for(let e=0;!s&&e<l.length;++e)s=t[r][e]!==l[e];s&&u&&(l=Array.from(l))}if(s){let n=t[r.name];t[r]=l,t[i]?.(e,t,l,n),e.modified()}return s},e[`set${jW(r)}From`]=e=>{let n=t[r];e.forEach((e,t)=>{n[t]=e})}})}function j3(e,t,r,n,a){j2(e,t,r),j5(e,t,r,n,a)}function j4(e,t,r){for(let e=0;e<r.length;e++){let n=r[e];void 0!==t[n]&&(t[`_${n}`]=t[n],delete t[n])}}function j8(e,t,r,n){function a(r,n=0){t.deleted?jO("instance deleted - cannot call any method"):n>=t.numberOfInputs?jO(`algorithm ${e.getClassName()} only has ${t.numberOfInputs} input ports. To add more input ports, use addInputData()`):(t.inputData[n]!==r||t.inputConnection[n])&&(t.inputData[n]=r,t.inputConnection[n]=null,e.modified&&e.modified())}function i(r,n=0){if(t.deleted)return void jO("instance deleted - cannot call any method");if(n>=t.numberOfInputs){let r=`algorithm ${e.getClassName()} only has `;jO(r+=`${t.numberOfInputs} input ports. To add more input ports, use addInputConnection()`);return}t.inputData[n]=null,t.inputConnection[n]=r}function o(){let e=t.numberOfInputs;for(;e&&!t.inputData[e-1]&&!t.inputConnection[e-1];)e--;return e===t.numberOfInputs&&t.numberOfInputs++,e}function s(r=0){return t.deleted?(jO("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[r])}if(t.inputData?t.inputData=t.inputData.map(jx):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(jx):t.inputConnection=[],t.output?t.output=t.output.map(jx):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(jx):t.inputArrayToProcess=[],t.numberOfInputs=r,e.shouldUpdate=()=>{let r=e.getMTime(),a=1/0,i=n;for(;i--;){if(!t.output[i]||t.output[i].isDeleted())return!0;let e=t.output[i].getMTime();if(e<r)return!0;e<a&&(a=e)}for(i=t.numberOfInputs;i--;)if(t.inputConnection[i]?.filter.shouldUpdate()||e.getInputData(i)?.getMTime()>a)return!0;return!1},t.numberOfInputs){let r=t.numberOfInputs;for(;r--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=a,e.setInputConnection=i,e.addInputData=function(e){t.deleted?jO("instance deleted - cannot call any method"):a(e,o())},e.addInputConnection=function(e){t.deleted?jO("instance deleted - cannot call any method"):i(e,o())},e.getInputData=function(e=0){return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(e=0){return t.inputConnection[e]}}n&&(e.getOutputData=s,e.getOutputPort=function(t=0){let r=()=>s(t);return r.filter=e,r}),e.update=()=>{let r=[];if(t.numberOfInputs){let n=0;for(;n<t.numberOfInputs;)r[n]=e.getInputData(n),n++}e.requestData&&!e.isDeleted()&&e.shouldUpdate()&&e.requestData(r,t.output)},e.getNumberOfInputPorts=()=>t.numberOfInputs,e.getNumberOfOutputPorts=()=>n||t.output.length,e.getInputArrayToProcess=e=>{let r=t.inputArrayToProcess[e],n=t.inputData[e];return r&&n?n[`get${r.fieldAssociation}`]().getArray(r.arrayName):null},e.setInputArrayToProcess=(e,r,n,a="Scalars")=>{for(;t.inputArrayToProcess.length<e;)t.inputArrayToProcess.push(null);t.inputArrayToProcess[e]={arrayName:r,fieldAssociation:n,attributeType:a}}}let j6=Symbol("Event abort");function j9(e,t,r){let n=[],a=e.delete,i=1;function o(e){for(let t=0;t<n.length;++t){let[r]=n[t];if(r===e)return void n.splice(t,1)}}e[`invoke${jW(r)}`]=function(){if(t.deleted)return void jO("instance deleted - cannot call any method");let r=n.slice();for(let t=0;t<r.length;++t){let[,n,a]=r[t];if(n)if(a<0)setTimeout(()=>n.apply(e,arguments),1-a);else{let t=n.apply(e,arguments);if(t===j6)break}}},e[`on${jW(r)}`]=(e,a=0)=>{if(!e.apply)return console.error(`Invalid callback for event ${r}`),null;if(t.deleted)return jO("instance deleted - cannot call any method"),null;let s=i++;return n.push([s,e,a]),n.sort((e,t)=>t[2]-e[2]),Object.freeze({unsubscribe:function(){o(s)}})},e.delete=()=>{a(),n.forEach(([e])=>o(e))}}function j7(e,t){let r=(t={})=>{let r={};return e(r,{},t),Object.freeze(r)};return t&&jx.register(t,r),r}function Be(...e){return(...t)=>e.filter(e=>!!e).map(e=>e(...t))}function Bt(e){return e&&e.isA&&e.isA("vtkObject")}function Br(e,t,r=[],n=[]){if(Bt(e)){if(n.indexOf(e)>=0)return r;n.push(e);let a=t(e);void 0!==a&&r.push(a);let i=e.get();Object.keys(i).forEach(e=>{let a=i[e];Array.isArray(a)?a.forEach(e=>{Br(e,t,r,n)}):Br(a,t,r,n)})}return r}function Bn(e,t,r){let n,a=(...a)=>{let i=this,o=r&&!n;clearTimeout(n),n=setTimeout(()=>{n=null,r||e.apply(i,a)},t),o&&e.apply(i,a)};return a.cancel=()=>clearTimeout(n),a}function Ba(e,t){let r=!1,n=null;function a(){r=!1,null!==n&&(i(...n),n=null)}function i(...o){if(r){n=o;return}r=!0,e(...o),setTimeout(a,t)}return i}function Bi(e,t,r={}){t.keystore=Object.assign(t.keystore||{},r),e.setKey=(e,r)=>{t.keystore[e]=r},e.getKey=e=>t.keystore[e],e.getAllKeys=()=>Object.keys(t.keystore),e.deleteKey=e=>delete t.keystore[e],e.clearKeystore=()=>e.getAllKeys().forEach(e=>delete t.keystore[e])}let Bo=1,Bs="__root__";function Bl(e,t){Bi(e,t);let r=e.delete;t.proxyId=`${Bo++}`,t.ui=JSON.parse(JSON.stringify(t.ui||[])),jZ(e,t,["proxyId","proxyGroup","proxyName"]),j0(e,t,["proxyManager"]);let n={},a={};function i(e,t){a[t]||(a[t]=[]);let r=a[t];for(let t=0;t<e.length;t++)r.push(e[t].name),n[e[t].name]=e[t],e[t].children&&e[t].children.length&&i(e[t].children,e[t].name)}function o(r=Bs){let n=[],i=t.proxyId,s=function(e=Bs){return a[e]}(r)||[];for(let t=0;t<s.length;t++){let r=s[t],a=e[`get${jW(r)}`],l={id:i,name:r,value:a?a():void 0},u=o(r);u.length&&(l.children=u),n.push(l)}return n}i(t.ui,Bs),e.updateUI=r=>{t.ui=JSON.parse(JSON.stringify(r||[])),Object.keys(n).forEach(e=>delete n[e]),Object.keys(a).forEach(e=>delete a[e]),i(t.ui,Bs),e.modified()},e.updateProxyProperty=(e,t)=>{let r=n[e];r?Object.assign(r,t):n[e]={...t}},e.activate=()=>{if(t.proxyManager){let r=`setActive${jW(e.getProxyGroup().slice(0,-1))}`;t.proxyManager[r]&&t.proxyManager[r](e)}},t.propertyLinkSubscribers={},e.registerPropertyLinkForGC=(e,r)=>{r in t.propertyLinkSubscribers||(t.propertyLinkSubscribers[r]=[]),t.propertyLinkSubscribers[r].push(e)},e.gcPropertyLinks=r=>{let n=t.propertyLinkSubscribers[r]||[];for(;n.length;)n.pop().unbind(e)},t.propertyLinkMap={},e.getPropertyLink=(e,r=!1)=>{if(t.propertyLinkMap[e])return t.propertyLinkMap[e];let n=null,a=[],i=0,o=!1;function s(r,l=!1){if(o)return null;let u=[],c=null;for(i=a.length;i--;){let e=a[i];e.instance===r?c=e:u.push(e)}if(!c)return null;let d=c.instance[`get${jW(c.propertyName)}`]();if(!function(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}(d,n)||l){for(n=d,o=!0;u.length;){let e=u.pop();e.instance.set({[e.propertyName]:n})}o=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function l(e,t){let r=[];for(i=a.length;i--;){let n=a[i];n.instance===e&&(n.propertyName===t||void 0===t)&&(n.subscription.unsubscribe(),r.push(i))}for(;r.length;)a.splice(r.pop(),1)}let u={bind:function(r,n,i=!1){let o=r.onModified(s),u=a[0];return a.push({instance:r,propertyName:n,subscription:o}),i&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?r.set({[n]:t.propertyLinkMap[e].value}):u&&s(u.instance,!0)),{unsubscribe:()=>l(r,n)}},unbind:l,unsubscribe:function(){for(;a.length;)a.pop().subscription.unsubscribe()},persistent:r};return t.propertyLinkMap[e]=u,u},e.listPropertyNames=()=>o().map(e=>e.name),e.getPropertyByName=e=>o().find(t=>t.name===e),e.getPropertyDomainByName=e=>(n[e]||{}).domain,e.getProxySection=()=>({id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:o()}),e.delete=()=>{let n=Object.keys(t.propertyLinkMap),a=n.length;for(;a--;)t.propertyLinkMap[n[a]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),r()},e.getState=()=>null,j$(function(){if(t.links)for(let r=0;r<t.links.length;r++){let{link:n,property:a,persistent:i,updateOnBind:o,type:s}=t.links[r];if("application"===s){let r=t.proxyManager.getPropertyLink(n,i);e.registerPropertyLinkForGC(r,"application"),r.bind(e,a,o)}}})}function Bu(e,t,r){let n=e.delete,a=[],i=Object.keys(r),o=i.length;for(;o--;){let n=i[o],{modelKey:s,property:l,modified:u=!0}=r[n],c=jW(l),d=jW(n);e[`get${d}`]=t[s][`get${c}`],e[`set${d}`]=t[s][`set${c}`],u&&a.push(t[s].onModified(e.modified))}e.delete=()=>{for(;a.length;)a.pop().unsubscribe();n()}}function Bc(e,t,r={},n={}){t.this=e;let a=Object.keys(n),i=a.length;for(;i--;){let o=a[i];t[o]=n[o];let s=r[o];e[`set${jW(o)}`]=r=>{r!==t[o]&&(t[o]=r,function(e){let r=Object.keys(e),n=r.length;for(;n--;){let a=r[n];t[a].set(e[a])}}(s[r]),e.modified())}}a.length&&jZ(e,t,a)}function Bd(e){let t=0,r=0,n=0,a=0;return"detail"in e&&(r=e.detail),"wheelDelta"in e&&(r=-e.wheelDelta/120),"wheelDeltaY"in e&&(r=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=r,r=0),n=10*t,a=10*r,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||a)&&e.deltaMode&&(1===e.deltaMode?(n*=40,a*=40):(n*=800,a*=800)),n&&!t&&(t=n<1?-1:1),a&&!r&&(r=a<1?-1:1),{spinX:t,spinY:r||t,pixelX:n,pixelY:a||n}}var Bh={algo:j8,capitalize:jB,chain:Be,debounce:Bn,enumToString:function(e,t){return Object.keys(e).find(r=>e[r]===t)},event:j9,EVENT_ABORT:j6,formatBytesToProperUnit:jz,formatNumbersWithThousandSeparator:jH,get:jZ,getArray:j2,getCurrentGlobalMTime:function(){return jk},getStateArrayMapFunc:jq,isVtkObject:Bt,keystore:Bi,measurePromiseExecution:jK,moveToProtected:j4,newInstance:j7,newTypedArray:jF,newTypedArrayFrom:jj,normalizeWheel:Bd,obj:jY,proxy:Bl,proxyPropertyMapping:Bu,proxyPropertyState:Bc,safeArrays:jG,set:j1,setArray:j5,setGet:j0,setGetArray:j3,setImmediate:j$,setLoggerFunction:jT,throttle:Ba,traverseInstanceTree:Br,TYPED_ARRAYS:jV,uncapitalize:jU,VOID:jS,vtkDebugMacro:jA,vtkErrorMacro:jO,vtkInfoMacro:jD,vtkLogMacro:j_,vtkOnceErrorMacro:jL,vtkWarningMacro:jR,objectSetterMap:jJ,requiredParam:jM},Bp=Object.freeze({__proto__:null,requiredParam:jM,VOID:jS,setLoggerFunction:jT,vtkLogMacro:j_,vtkInfoMacro:jD,vtkDebugMacro:jA,vtkErrorMacro:jO,vtkWarningMacro:jR,vtkOnceErrorMacro:jL,TYPED_ARRAYS:jV,newTypedArray:jF,newTypedArrayFrom:jj,capitalize:jB,_capitalize:jW,uncapitalize:jU,formatBytesToProperUnit:jz,formatNumbersWithThousandSeparator:jH,setImmediateVTK:j$,measurePromiseExecution:jK,obj:jY,get:jZ,set:j1,setGet:j0,getArray:j2,setArray:j5,setGetArray:j3,moveToProtected:j4,algo:j8,EVENT_ABORT:j6,event:j9,newInstance:j7,chain:Be,isVtkObject:Bt,traverseInstanceTree:Br,debounce:Bn,throttle:Ba,keystore:Bi,proxy:Bl,proxyPropertyMapping:Bu,proxyPropertyState:Bc,normalizeWheel:Bd,default:Bh}),Bf=u(6037);let Bm=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],Bg=[1,0,0,0,1,0,0,0,1],{vtkErrorMacro:By,vtkWarningMacro:Bv}=Bh,Bb=0;function Bw(e){return()=>By(`vtkMath::${e} - NOT IMPLEMENTED`)}function Bx(e,t,r,n){let a;for(let i=0;i<t;i++)a=e[r*t+i],e[r*t+i]=e[n*t+i],e[n*t+i]=a}function BC(e,t,r,n){let a;for(let i=0;i<t;i++)a=e[i*t+r],e[i*t+r]=e[i*t+n],e[i*t+n]=a}function Bk(e=3){let t=Array(e);for(let r=0;r<e;++r)t[r]=0;return t}function BM(e){return e/180*Math.PI}function BS(e){return 180*e/Math.PI}let{round:BE,floor:BP,ceil:BI,min:BT,max:B_}=Math,BD=Bw("ceilLog2"),BA=Bw("factorial");function BO(e){let t=1;for(;t<e;)t*=2;return t}function BR(e){return e===BO(e)}let BN=Bw("gaussian");function BL(e,t,r){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r[2]=e[2]+t[2],r}function BV(e,t,r){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r[2]=e[2]-t[2],r}function BF(e,t){return e[0]*=t,e[1]*=t,e[2]*=t,e}function Bj(e,t){return e[0]*=t,e[1]*=t,e}function BB(e,t,r,n){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n[2]=e[2]+t[2]*r,n}function BW(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function BU(e,t,r){let n=e[1]*t[2]-e[2]*t[1],a=e[2]*t[0]-e[0]*t[2],i=e[0]*t[1]-e[1]*t[0];return r[0]=n,r[1]=a,r[2]=i,r}function Bz(e,t=3){switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:{let r=0;for(let n=0;n<t;n++)r+=e[n]*e[n];return Math.sqrt(r)}}}function BH(e){let t=Bz(e);return 0!==t&&(e[0]/=t,e[1]/=t,e[2]/=t),t}function BG(e,t){return e[0]*t[0]+e[1]*t[1]}function Bq(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])+(e[2]-t[2])*(e[2]-t[2])}function B$(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function BK(e){let t=B$(e);return 0!==t&&(e[0]/=t,e[1]/=t),t}function BY(...e){return 2===e.length?e[0][0]*e[1][1]-e[1][0]*e[0][1]:4===e.length?e[0]*e[3]-e[1]*e[2]:NaN}function BX(e,t,r){let n=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],a=e[3]*t[0]+e[4]*t[1]+e[5]*t[2],i=e[6]*t[0]+e[7]*t[1]+e[8]*t[2];r[0]=n,r[1]=a,r[2]=i}function BZ(e,t,r){let n=[...e],a=[...t];for(let e=0;e<3;e++)r[e]=n[0]*a[e]+n[1]*a[e+3]+n[2]*a[e+6],r[e+3]=n[3]*a[e]+n[4]*a[e+3]+n[5]*a[e+6],r[e+6]=n[6]*a[e]+n[7]*a[e+3]+n[8]*a[e+6]}function BJ(e,t){let r;r=e[3],t[3]=e[1],t[1]=r,r=e[6],t[6]=e[2],t[2]=r,r=e[7],t[7]=e[5],t[5]=r,t[0]=e[0],t[4]=e[4],t[8]=e[8]}function BQ(e){return e[0]*e[4]*e[8]+e[3]*e[7]*e[2]+e[6]*e[1]*e[5]-e[0]*e[7]*e[5]-e[3]*e[1]*e[8]-e[6]*e[4]*e[2]}function B1(e,t,r=1e-6){return e.length===t.length&&e.every(function(e,n){return Math.abs(e-t[n])<=r})}function B0(e){for(let t=0;t<3;t++)e[3*t]=e[3*t+1]=e[3*t+2]=0,e[3*t+t]=1}function B2(e,t){for(let r=0;r<e;r++){for(let n=0;n<e;n++)t[r*e+n]=0;t[r*e+r]=1}return t}function B5(e,t){let r=e[0]*e[0],n=e[0]*e[1],a=e[0]*e[2],i=e[0]*e[3],o=e[1]*e[1],s=e[2]*e[2],l=e[3]*e[3],u=e[1]*e[2],c=e[1]*e[3],d=e[2]*e[3],h=o+s+l,p=1/(r+h),f=(r-h)*p;p*=2,t[0]=o*p+f,t[3]=(u+i)*p,t[6]=(c-a)*p,t[1]=(u-i)*p,t[4]=s*p+f,t[7]=(d+n)*p,t[2]=(c+a)*p,t[5]=(d-n)*p,t[8]=l*p+f}function B3(e,t=0){if(!`${e}`.includes("e"))return+`${Math.round(`${e}e+${t}`)}e-${t}`;let r=`${e}`.split("e"),n="";return+r[1]+t>0&&(n="+"),+`${Math.round(`${+r[0]}e${n}${+r[1]+t}`)}e-${t}`}function B4(e,t=[0,0,0],r=0){return t[0]=B3(e[0],r),t[1]=B3(e[1],r),t[2]=B3(e[2],r),t}function B8(e,t,r,n){let a,i,o,s,l,u,c,d,h,p,f,m,g,y,v,b,w=Bk(t),x=Bk(t),C=(e,t,r)=>{y=e[t],g=e[r],e[t]=y-m*(g+y*p),e[r]=g+m*(y-g*p)};for(B2(t,n),l=0;l<t;l++)w[l]=r[l]=e[l+l*t],x[l]=0;for(a=0;a<20;a++){for(l=0,f=0;l<t-1;l++)for(s=l+1;s<t;s++)f+=Math.abs(e[l*t+s]);if(0===f)break;for(c=a<3?.2*f/(t*t):0,l=0;l<t-1;l++)for(s=l+1;s<t;s++)if(y=100*Math.abs(e[l*t+s]),a>3&&Math.abs(r[l])+y===Math.abs(r[l])&&Math.abs(r[s])+y===Math.abs(r[s]))e[l*t+s]=0;else if(Math.abs(e[l*t+s])>c){for(Math.abs(g=r[s]-r[l])+y===Math.abs(g)?h=e[l*t+s]/g:(h=1/(Math.abs(d=.5*g/e[l*t+s])+Math.sqrt(1+d*d)),d<0&&(h=-h)),v=1/Math.sqrt(1+h*h),p=(m=h*v)/(1+v),g=h*e[l*t+s],x[l]-=g,x[s]+=g,r[l]-=g,r[s]+=g,e[l*t+s]=0,i=0;i<=l-1;i++)C(e,i*t+l,i*t+s);for(i=l+1;i<=s-1;i++)C(e,l*t+i,i*t+s);for(i=s+1;i<t;i++)C(e,l*t+i,s*t+i);for(i=0;i<t;i++)C(n,i*t+l,i*t+s)}for(l=0;l<t;l++)w[l]+=x[l],r[l]=w[l],x[l]=0}if(a>=20)return Bv("vtkMath::Jacobi: Error extracting eigenfunctions"),0;for(i=0;i<t-1;i++){for(b=r[o=i],a=i+1;a<t;a++)(r[a]>=b||1e-12>Math.abs(r[a]-b))&&(b=r[o=a]);o!==i&&(r[o]=r[i],r[i]=b,BC(n,t,i,o))}let k=(t>>1)+(1&t);for(u=0,a=0;a<t*t;a++)n[a]>=0&&u++;if(u<k)for(a=0;a<t;a++)n[a*t+i]*=-1;return 1}function B6(e,t){let r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];r[0]=e[0]+e[4]+e[8],r[5]=e[0]-e[4]-e[8],r[10]=-e[0]+e[4]-e[8],r[15]=-e[0]-e[4]+e[8],r[1]=r[4]=e[7]-e[5],r[2]=r[8]=e[2]-e[6],r[3]=r[12]=e[3]-e[1],r[6]=r[9]=e[3]+e[1],r[7]=r[13]=e[2]+e[6],r[11]=r[14]=e[7]+e[5];let n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];B8([...r],4,[0,0,0,0],n),t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12]}function B9(e,t){let r;for(let r=0;r<9;r++)t[r]=e[r];let n=Bk(3),a=Bk(3);for(let e=0;e<3;e++){let a=Math.abs(t[3*e]),i=Math.abs(t[3*e+1]),o=Math.abs(t[3*e+2]);r=o>(r=i>a?i:a)?o:r,n[e]=1,0!==r&&(n[e]/=r)}let i=Math.abs(t[0])*n[0],o=Math.abs(t[3])*n[1],s=Math.abs(t[6])*n[2];a[0]=0,o>=(r=i)&&(r=o,a[0]=1),s>=r&&(a[0]=2),0!==a[0]&&(BC(t,3,a[0],0),n[a[0]]=n[0]);let l=Math.abs(t[4])*n[1],u=Math.abs(t[7])*n[2];a[1]=1,u>=(r=l)&&(a[1]=2,BC(t,3,1,2)),a[2]=2;let c=0;if(0>BQ(t)){c=1;for(let e=0;e<9;e++)t[e]=-t[e]}let d=Bk(4);if(B6(t,d),B5(d,t),c)for(let e=0;e<9;e++)t[e]=-t[e];1!==a[1]&&BC(t,3,a[1],1),0!==a[0]&&BC(t,3,a[0],0)}function B7(e,t,r){let n,a,i,o,s,l;if(B8([...e],3,t,r),t[0]===t[1]&&t[0]===t[2])return void B0(r);for(BJ(r,r),n=0;n<3;n++)if(t[(n+1)%3]===t[(n+2)%3]){for(l=Math.abs(r[3*n]),o=0,a=1;a<3;a++)l<(s=Math.abs(r[3*n+a]))&&(l=s,o=a);o!==n&&(s=t[o],t[o]=t[n],t[n]=s,Bx(r,3,n,o)),r[3*o+o]<0&&(r[3*o]=-r[3*o],r[3*o+1]=-r[3*o+1],r[3*o+2]=-r[3*o+2]),a=(o+1)%3,i=(o+2)%3,r[3*a]=0,r[3*a+1]=0,r[3*a+2]=0,r[3*a+a]=1;let e=BU([r[3*o],r[3*o+1],r[3*o+2]],[r[3*a],r[3*a+1],r[3*a+2]],[]);BH(e);let u=BU(e,[r[3*o],r[3*o+1],r[3*o+2]],[]);for(let t=0;t<3;t++)r[3*i+t]=e[t],r[3*a+t]=u[t];BJ(r,r);return}for(l=Math.abs(r[0]),o=0,n=1;n<3;n++)l<(s=Math.abs(r[3*n]))&&(l=s,o=n);if(0!==o){let e=t[o];t[o]=t[0],t[0]=e,Bx(r,3,o,0)}if(Math.abs(r[4])<Math.abs(r[7])){let e=t[2];t[2]=t[1],t[1]=e,Bx(r,3,1,2)}for(n=0;n<2;n++)r[3*n+n]<0&&(r[3*n]=-r[3*n],r[3*n+1]=-r[3*n+1],r[3*n+2]=-r[3*n+2]);0>BQ(r)&&(r[6]=-r[6],r[7]=-r[7],r[8]=-r[8]),BJ(r,r)}function We(e,t,r){let n,a,i,o,s,l,u,c=0,d=Bk(r);for(n=0;n<r;n++){for(o=0,a=0;a<r;a++)(u=Math.abs(e[n*r+a]))>o&&(o=u);if(0===o)return Bv("Unable to factor linear system"),0;d[n]=1/o}for(a=0;a<r;a++){for(n=0;n<a;n++){for(s=e[n*r+a],i=0;i<n;i++)s-=e[n*r+i]*e[i*r+a];e[n*r+a]=s}for(o=0,n=a;n<r;n++){for(s=e[n*r+a],i=0;i<a;i++)s-=e[n*r+i]*e[i*r+a];e[n*r+a]=s,(l=d[n]*Math.abs(s))>=o&&(o=l,c=n)}if(a!==c){for(i=0;i<r;i++)l=e[c*r+i],e[c*r+i]=e[a*r+i],e[a*r+i]=l;d[c]=d[a]}if(t[a]=c,1e-12>=Math.abs(e[a*r+a]))return Bv("Unable to factor linear system"),0;if(a!==r-1)for(l=1/e[a*r+a],n=a+1;n<r;n++)e[n*r+a]*=l}return 1}function Wt(e,t,r,n){let a,i,o,s,l;for(o=-1,a=0;a<n;a++){if(l=r[s=t[a]],r[s]=r[a],o>=0)for(i=o;i<=a-1;i++)l-=e[a*n+i]*r[i];else 0!==l&&(o=a);r[a]=l}for(a=n-1;a>=0;a--){for(l=r[a],i=a+1;i<n;i++)l-=e[a*n+i]*r[i];r[a]=l/e[a*n+a]}}function Wr(e,t,r){if(2===r){let r=Bk(2),n=BY(e[0],e[1],e[2],e[3]);return 0===n?0:(r[0]=(e[3]*t[0]-e[1]*t[1])/n,r[1]=(-(e[2]*t[0])+e[0]*t[1])/n,t[0]=r[0],t[1]=r[1],1)}if(1===r)return 0===e[0]?0:(t[0]/=e[0],1);let n=Bk(r);return 0===We(e,n,r)?0:(Wt(e,n,t,r),1)}function Wn(e,t,r,n=null,a=null){let i=n||Bk(r),o=a||Bk(r);if(0===We(e,i,r))return null;for(let n=0;n<r;n++){for(let e=0;e<r;e++)o[e]=0;o[n]=1,Wt(e,i,o,r);for(let e=0;e<r;e++)t[e*r+n]=o[e]}return t}function Wa(e,t,r,n){let a,i,o;if(e<r)return Bv("Insufficient number of samples. Underdetermined."),0;let s=Bk(r*r),l=Bk(r),u=Bk(r*r);for(o=0;o<e;o++)for(a=0;a<r;a++)for(i=a;i<r;i++)s[a*r+i]+=t[o*r+a]*t[o*r+i];for(a=0;a<r;a++)for(i=0;i<a;i++)s[a*r+i]=s[i*r+a];for(B8(s,r,l,u),a=0;a<r;a++)n[a]=u[a*r+r-1];return 1}function Wi(e,t){let r,n,[a,i,o]=e,s=1/6,l=a,u=a;i>l?l=i:i<u&&(u=i),o>l?l=o:o<u&&(u=o);let c=l;(n=c>0?(l-u)/l:0)>0?(r=a===l?s*(i-o)/(l-u):i===l?1/3+s*(o-a)/(l-u):2/3+s*(a-i)/(l-u))<0&&(r+=1):r=0,t[0]=r,t[1]=n,t[2]=c}function Wo(e,t){let r,n,a,[i,o,s]=e,l=1/3,u=1/6,c=2/3,d=5/6;i>1/6&&i<=l?(n=1,r=(l-i)/u,a=0):i>l&&i<=.5?(n=1,a=(i-l)/u,r=0):i>.5&&i<=c?(a=1,n=(c-i)/u,r=0):i>c&&i<=d?(a=1,r=(i-c)/u,n=0):i>d&&i<=1?(r=1,a=(1-i)/u,n=0):(r=1,n=i/u,a=0),r=o*r+(1-o),n=o*n+(1-o),a=o*a+(1-o),r*=s,n*=s,a*=s,t[0]=r,t[1]=n,t[2]=a}function Ws(e,t){let[r,n,a]=e,i=(r+16)/116,o=n/500+i,s=i-a/200;i**3>.008856?i**=3:i=(i-16/116)/7.787,o**3>.008856?o**=3:o=(o-16/116)/7.787,s**3>.008856?s**=3:s=(s-16/116)/7.787,t[0]=.9505*o,t[1]=+i,t[2]=1.089*s}function Wl(e,t){let[r,n,a]=e,i=r/.9505,o=n/1,s=a/1.089;i>.008856?i**=1/3:i=7.787*i+16/116,o>.008856?o**=1/3:o=7.787*o+16/116,s>.008856?s**=1/3:s=7.787*s+16/116,t[0]=116*o-16,t[1]=500*(i-o),t[2]=200*(o-s)}function Wu(e,t){let[r,n,a]=e,i=3.2406*r+-1.5372*n+-.4986*a,o=-.9689*r+1.8758*n+.0415*a,s=.0557*r+-.204*n+1.057*a;i>.0031308?i=1.055*i**(1/2.4)-.055:i*=12.92,o>.0031308?o=1.055*o**(1/2.4)-.055:o*=12.92,s>.0031308?s=1.055*s**(1/2.4)-.055:s*=12.92;let l=i;l<o&&(l=o),l<s&&(l=s),l>1&&(i/=l,o/=l,s/=l),i<0&&(i=0),o<0&&(o=0),s<0&&(s=0),t[0]=i,t[1]=o,t[2]=s}function Wc(e,t){let[r,n,a]=e;r>.04045?r=((r+.055)/1.055)**2.4:r/=12.92,n>.04045?n=((n+.055)/1.055)**2.4:n/=12.92,a>.04045?a=((a+.055)/1.055)**2.4:a/=12.92,t[0]=.4124*r+.3576*n+.1805*a,t[1]=.2126*r+.7152*n+.0722*a,t[2]=.0193*r+.1192*n+.9505*a}function Wd(e,t){let r=[0,0,0];Wc(e,r),Wl(r,t)}function Wh(e,t){let r=[0,0,0];Ws(e,r),Wu(r,t)}function Wp(e){return e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1,e}function Wf(e){return!(e[1]-e[0]<0)}function Wm(e,t,r){return e<t?t:e>r?r:e}function Wg(e,t,r,n=[0,0,0]){return n[0]=Wm(e[0],t[0],r[0]),n[1]=Wm(e[1],t[1],r[1]),n[2]=Wm(e[2],t[2],r[2]),n}let Wy=Bw("GetScalarTypeFittingRange"),Wv=Bw("GetAdjustedScalarRange"),Wb=e=>!Number.isFinite(e),{isFinite:Ww,isNaN:Wx}=Number;function WC(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}function Wk(e,t=3){let r=Array(t),n=Array(t);for(let e=0;e<t;++e)r[e]=e,n[e]=e;for(let a=t-1;a>0;a--){let i=-1/0,o=0,s=0;for(let l=0;l<=a;++l){let u=r[l];for(let r=0;r<=a;++r){let a=Math.abs(e[u+t*n[r]]);a>i&&(i=a,o=l,s=r)}}[r[a],r[o]]=[r[o],r[a]],[n[a],n[s]]=[n[s],n[a]]}let a=Array(t*t).fill(0);for(let i=0;i<t;++i){let o=r[i]+t*n[i];a[o]=e[o]<0?-1:1}return a}function WM(e){let t=Math.floor(255*e);return t>15?t.toString(16):`0${t.toString(16)}`}function WS(e){return Math.round(255*e)}var WE={Pi:()=>Math.PI,ldexp:function(e,t){return t>1023?898846567431158e293*e*2**(t-1023):t<-1074?5e-324*e*2**(t+1074):e*2**t},radiansFromDegrees:BM,degreesFromRadians:BS,round:BE,floor:BP,ceil:BI,ceilLog2:BD,min:BT,max:B_,arrayMin:function(e,t=0,r=1){let n=1/0;for(let a=t,i=e.length;a<i;a+=r)e[a]<n&&(n=e[a]);return n},arrayMax:function(e,t=0,r=1){let n=-1/0;for(let a=t,i=e.length;a<i;a+=r)n<e[a]&&(n=e[a]);return n},arrayRange:function(e,t=0,r=1){let n=1/0,a=-1/0;for(let i=t,o=e.length;i<o;i+=r)e[i]<n&&(n=e[i]),a<e[i]&&(a=e[i]);return[n,a]},isPowerOfTwo:BR,nearestPowerOfTwo:BO,factorial:BA,binomial:function(e,t){let r=1;for(let n=1;n<=t;++n)r*=(e-n+1)/n;return Math.floor(r)},beginCombination:function(e,t){if(e<t)return 0;let r=Bk(t);for(let e=0;e<t;++e)r[e]=e;return r},nextCombination:function(e,t,r){let n=0;for(let a=t-1;a>=0;--a)if(r[a]<e-t+a){let e=r[a]+1;for(;a<t;)r[a++]=e++;n=1;break}return n},randomSeed:function(e){Bf(`${e}`,{global:!0}),Bb=e},getSeed:function(){return Bb},random:function(e=0,t=1){return e+(t-e)*Math.random()},gaussian:BN,add:BL,subtract:BV,multiplyScalar:BF,multiplyScalar2D:Bj,multiplyAccumulate:BB,multiplyAccumulate2D:function(e,t,r,n){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n},dot:BW,outer:function(e,t,r){r[0]=e[0]*t[0],r[1]=e[0]*t[1],r[2]=e[0]*t[2],r[3]=e[1]*t[0],r[4]=e[1]*t[1],r[5]=e[1]*t[2],r[6]=e[2]*t[0],r[7]=e[2]*t[1],r[8]=e[2]*t[2]},cross:BU,norm:Bz,normalize:BH,perpendiculars:function(e,t,r,n){let a,i,o,s=e[0]*e[0],l=e[1]*e[1],u=e[2]*e[2],c=Math.sqrt(s+l+u);s>l&&s>u?(a=0,i=1,o=2):l>u?(a=1,i=2,o=0):(a=2,i=0,o=1);let d=e[a]/c,h=e[i]/c,p=e[o]/c,f=Math.sqrt(d*d+p*p);if(0!==n){let e=Math.sin(n),s=Math.cos(n);t&&(t[a]=(p*s-d*h*e)/f,t[i]=e*f,t[o]=(-(d*s)-h*p*e)/f),r&&(r[a]=(-(p*e)-d*h*s)/f,r[i]=s*f,r[o]=(d*e-h*p*s)/f)}else t&&(t[a]=p/f,t[i]=0,t[o]=-d/f),r&&(r[a]=-d*h/f,r[i]=f,r[o]=-h*p/f)},projectVector:function(e,t,r){let n=BW(t,t);if(0===n)return r[0]=0,r[1]=0,r[2]=0,!1;let a=BW(e,t)/n;for(let e=0;e<3;e++)r[e]=t[e];return BF(r,a),!0},projectVector2D:function(e,t,r){let n=BG(t,t);if(0===n)return r[0]=0,r[1]=0,!1;let a=BG(e,t)/n;for(let e=0;e<2;e++)r[e]=t[e];return Bj(r,a),!0},distance2BetweenPoints:Bq,angleBetweenVectors:function(e,t){let r=[0,0,0];return BU(e,t,r),Math.atan2(Bz(r),BW(e,t))},gaussianAmplitude:function(e,t,r){return 1/Math.sqrt(2*Math.PI*t)*Math.exp(-(Math.abs(e-r)**2)/(2*t))},gaussianWeight:function(e,t,r){return Math.exp(-(Math.abs(e-r)**2)/(2*t))},dot2D:BG,outer2D:function(e,t,r){r[0]=e[0]*t[0],r[1]=e[0]*t[1],r[2]=e[1]*t[0],r[3]=e[1]*t[1]},norm2D:B$,normalize2D:BK,determinant2x2:BY,LUFactor3x3:function(e,t){let r,n,a,i=[0,0,0];for(let t=0;t<3;t++)a=Math.abs(e[3*t]),(n=Math.abs(e[3*t+1]))>a&&(a=n),(n=Math.abs(e[3*t+2]))>a&&(a=n),i[t]=1/a;a=i[0]*Math.abs(e[0]),r=0,(n=i[1]*Math.abs(e[3]))>=a&&(a=n,r=1),(n=i[2]*Math.abs(e[6]))>=a&&(r=2),0!==r&&(Bx(e,3,r,0),i[r]=i[0]),t[0]=r,e[3]/=e[0],e[6]/=e[0],e[4]-=e[3]*e[1],e[7]-=e[6]*e[1],a=i[1]*Math.abs(e[4]),r=1,(n=i[2]*Math.abs(e[7]))>=a&&(r=2,Bx(e,3,1,2),i[2]=i[1]),t[1]=r,e[7]/=e[4],e[5]-=e[3]*e[2],e[8]-=e[6]*e[2]+e[7]*e[5],t[2]=2},LUSolve3x3:function(e,t,r){let n=r[t[0]];r[t[0]]=r[0],r[0]=n,n=r[t[1]],r[t[1]]=r[1],r[1]=n-e[3]*r[0],n=r[t[2]],r[t[2]]=r[2],r[2]=n-e[6]*r[0]-e[7]*r[1],r[2]/=e[8],r[1]=(r[1]-e[5]*r[2])/e[4],r[0]=(r[0]-e[1]*r[1]-e[2]*r[2])/e[0]},linearSolve3x3:function(e,t,r){let n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=+BY(s,c,l,d),p=-BY(o,u,l,d),f=+BY(o,u,s,c),m=-BY(a,c,i,d),g=+BY(n,u,i,d),y=-BY(n,u,a,c),v=+BY(a,s,i,l),b=-BY(n,o,i,l),w=+BY(n,o,a,s),x=n*h+a*p+i*f,C=h*t[0]+m*t[1]+v*t[2],k=p*t[0]+g*t[1]+b*t[2],M=f*t[0]+y*t[1]+w*t[2];r[0]=C/x,r[1]=k/x,r[2]=M/x},multiply3x3_vect3:BX,multiply3x3_mat3:BZ,multiplyMatrix:function(e,t,r,n,a,i,o){n!==a&&By("Number of columns of A must match number of rows of B.");let s=[...e],l=[...t];for(let e=0;e<r;e++)for(let t=0;t<i;t++){o[e*i+t]=0;for(let r=0;r<n;r++)o[e*i+t]+=s[e*n+r]*l[t+i*r]}},transpose3x3:BJ,invert3x3:function(e,t){let r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=+BY(o,u,s,c),h=-BY(i,l,s,c),p=+BY(i,l,o,u),f=-BY(n,u,a,c),m=+BY(r,l,a,c),g=-BY(r,l,n,u),y=+BY(n,o,a,s),v=-BY(r,i,a,s),b=+BY(r,i,n,o),w=r*d+n*h+a*p;0===w&&Bv("Matrix has 0 determinant"),t[0]=d/w,t[3]=h/w,t[6]=p/w,t[1]=f/w,t[4]=m/w,t[7]=g/w,t[2]=y/w,t[5]=v/w,t[8]=b/w},identity3x3:B0,identity:B2,isIdentity:function(e,t=1e-6){return B1(e,Bm,t)},isIdentity3x3:function(e,t=1e-6){return B1(e,Bg,t)},determinant3x3:BQ,quaternionToMatrix3x3:B5,areEquals:B1,areMatricesEqual:B1,roundNumber:B3,roundVector:B4,matrix3x3ToQuaternion:B6,multiplyQuaternion:function(e,t,r){let n=e[0]*t[0],a=e[0]*t[1],i=e[0]*t[2],o=e[0]*t[3],s=e[1]*t[0],l=e[1]*t[1],u=e[1]*t[2],c=e[1]*t[3],d=e[2]*t[0],h=e[2]*t[1],p=e[2]*t[2],f=e[2]*t[3],m=e[3]*t[0],g=e[3]*t[1],y=e[3]*t[2],v=e[3]*t[3];r[0]=n-l-p-v,r[1]=a+s+f-y,r[2]=i-c+d+g,r[3]=o+u-h+m},orthogonalize3x3:B9,diagonalize3x3:B7,singularValueDecomposition3x3:function(e,t,r,n){let a,i=[...e],o=BQ(i);if(o<0)for(a=0;a<9;a++)i[a]=-i[a];B9(i,t),BJ(i,i),BZ(i,t,n),B7(n,r,n),BZ(t,n,t),BJ(n,n),o<0&&(r[0]=-r[0],r[1]=-r[1],r[2]=-r[2])},solveLinearSystem:Wr,invertMatrix:Wn,luFactorLinearSystem:We,luSolveLinearSystem:Wt,estimateMatrixCondition:function(e,t){let r=+Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let r=0;r<t;r++)for(let a=r;a<t;a++)Math.abs(e[r*t+a])>n&&(n=Math.abs(e[r*t+a]));for(let n=0;n<t;n++)Math.abs(e[n*t+n])<r&&(r=Math.abs(e[n*t+n]));return 0===r?Number.MAX_VALUE:n/r},jacobi:function(e,t,r){return B8(e,3,t,r)},jacobiN:B8,solveHomogeneousLeastSquares:Wa,solveLeastSquares:function(e,t,r,n,a,i,o=!0){let s,l,u,c;if(e<r||e<a)return Bv("Insufficient number of samples. Underdetermined."),0;let d=Bk(a),h=1,p=0,f=0;if(o){for(u=0;u<a;u++)d[u]=1;for(l=0;l<e;l++)for(u=0;u<a;u++)Math.abs(n[l*a+u])>1e-12&&(h=0,d[u]=0);if(h&&1===a)return Bv("Detected homogeneous system (Y=0), calling SolveHomogeneousLeastSquares()"),Wa(e,t,r,i);if(h)f=1;else for(u=0;u<a;u++)d[u]&&(f=1)}f&&(s=Bk(r),p=Wa(e,t,r,s));let m=Bk(r*r),g=Bk(r*r),y=Bk(r*a);for(c=0;c<e;c++)for(l=0;l<r;l++){for(u=l;u<r;u++)m[l*r+u]+=t[c*r+l]*t[c*r+u];for(u=0;u<a;u++)y[l*a+u]+=t[c*r+l]*n[c*a+u]}for(l=0;l<r;l++)for(u=0;u<l;u++)m[l*r+u]=m[u*r+l];let v=Wn(m,g,r);if(v)for(l=0;l<r;l++)for(u=0;u<a;u++)for(i[l*a+u]=0,c=0;c<r;c++)i[l*a+u]+=g[l*r+c]*y[c*a+u];if(f){for(u=0;u<a;u++)if(d[u])for(l=0;l<r;l++)i[l*a+u]=s[l*a]}return f?p&&v:v},hex2float:function(e,t=[0,.5,1]){switch(e.length){case 3:return t[0]=17*parseInt(e[0],16)/255,t[1]=17*parseInt(e[1],16)/255,t[2]=17*parseInt(e[2],16)/255,t;case 4:return t[0]=17*parseInt(e[1],16)/255,t[1]=17*parseInt(e[2],16)/255,t[2]=17*parseInt(e[3],16)/255,t;case 6:return t[0]=parseInt(e.substr(0,2),16)/255,t[1]=parseInt(e.substr(2,2),16)/255,t[2]=parseInt(e.substr(4,2),16)/255,t;case 7:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t;case 9:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t[3]=parseInt(e.substr(7,2),16)/255,t;default:return t}},rgb2hsv:Wi,hsv2rgb:Wo,lab2xyz:Ws,xyz2lab:Wl,xyz2rgb:Wu,rgb2xyz:Wc,rgb2lab:Wd,lab2rgb:Wh,uninitializeBounds:Wp,areBoundsInitialized:Wf,computeBoundsFromPoints:function(e,t,r){return r[0]=Math.min(e[0],t[0]),r[1]=Math.max(e[0],t[0]),r[2]=Math.min(e[1],t[1]),r[3]=Math.max(e[1],t[1]),r[4]=Math.min(e[2],t[2]),r[5]=Math.max(e[2],t[2]),r},clampValue:Wm,clampVector:Wg,clampAndNormalizeValue:function(e,t){let r=0;return t[0]!==t[1]&&(r=((r=e<t[0]?t[0]:e>t[1]?t[1]:e)-t[0])/(t[1]-t[0])),r},getScalarTypeFittingRange:Wy,getAdjustedScalarRange:Wv,extentIsWithinOtherExtent:function(e,t){if(!e||!t)return 0;for(let r=0;r<6;r+=2)if(e[r]<t[r]||e[r]>t[r+1]||e[r+1]<t[r]||e[r+1]>t[r+1])return 0;return 1},boundsIsWithinOtherBounds:function(e,t,r){if(!e||!t)return 0;for(let n=0;n<6;n+=2)if(e[n]+r[n/2]<t[n]||e[n]-r[n/2]>t[n+1]||e[n+1]+r[n/2]<t[n]||e[n+1]-r[n/2]>t[n+1])return 0;return 1},pointIsWithinBounds:function(e,t,r){if(!e||!t||!r)return 0;for(let n=0;n<3;n++)if(e[n]+r[n]<t[2*n]||e[n]-r[n]>t[2*n+1])return 0;return 1},solve3PointCircle:function(e,t,r,n){let a=Bk(3),i=Bk(3),o=Bk(3),s=Bk(3),l=Bk(3),u=Bk(3);for(let n=0;n<3;++n)a[n]=e[n]-t[n],i[n]=t[n]-r[n],o[n]=r[n]-e[n],s[n]=-a[n],l[n]=-i[n],u[n]=-o[n];let c=Bz(s),d=Bz(l),h=Bz(o),p=Bk(3);BU(a,i,p);let f=Bz(p),m=2*f*f,g=d*d*BW(a,u)/m,y=h*h*BW(s,i)/m,v=c*c*BW(o,l)/m;for(let a=0;a<3;++a)n[a]=g*e[a]+y*t[a]+v*r[a];return c*d*h/(2*f)},inf:1/0,negInf:-1/0,isInf:Wb,isNan:Wx,isNaN:Wx,isFinite:Ww,createUninitializedBounds:WC,getMajorAxisIndex:function(e){let t=-1,r=-1;for(let n=0;n<e.length;n++){let a=Math.abs(e[n]);a>t&&(r=n,t=a)}return r},getMinorAxisIndex:function(e){let t=1/0,r=-1;for(let n=0;n<e.length;n++){let a=Math.abs(e[n]);a<t&&(r=n,t=a)}return r},getSparseOrthogonalMatrix:Wk,floatToHex2:WM,floatRGB2HexCode:function(e,t="#"){return`${t}${e.map(WM).join("")}`},float2CssRGBA:function(e){return 3===e.length?`rgb(${e.map(WS).join(", ")})`:`rgba(${WS(e[0]||0)}, ${WS(e[1]||0)}, ${WS(e[2]||0)}, ${e[3]||0})`}};let WP={};function WI(e,t,r={}){Object.assign(t,WP,r),Bh.obj(e,t),Bh.setGet(e,t,["transform"]),t.classHierarchy.push("vtkImplicitFunction"),e.functionValue=r=>{if(!t.transform)return e.evaluateFunction(r);let n=[];return t.transform.transformPoint(r,n),e.evaluateFunction(n)},e.evaluateFunction=e=>{Bh.vtkErrorMacro("not implemented")}}Bh.newInstance(WI,"vtkImplicitFunction");let WT="coincide",W_="disjoint";function WD(e,t,r){return Math.abs(r[0]*(e[0]-t[0])+r[1]*(e[1]-t[1])+r[2]*(e[2]-t[2]))}function WA(e,t,r,n){let a=[];BV(e,t,a);let i=BW(r,a);n[0]=e[0]-i*r[0],n[1]=e[1]-i*r[1],n[2]=e[2]-i*r[2]}function WO(e,t,r){let n=BW(e,t),a=BW(t,t);return 0===a&&(a=1),r[0]=e[0]-n*t[0]/a,r[1]=e[1]-n*t[1]/a,r[2]=e[2]-n*t[2]/a,r}function WR(e,t,r,n){let a=[];BV(e,t,a);let i=BW(r,a),o=BW(r,r);0!==o?(n[0]=e[0]-i*r[0]/o,n[1]=e[1]-i*r[1]/o,n[2]=e[2]-i*r[2]/o):(n[0]=e[0],n[1]=e[1],n[2]=e[2])}function WN(e,t,r,n){let a={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},i=[],o=[];BV(t,e,i),BV(r,e,o);let s=BW(n,o),l=BW(n,i);return(l<0?-l:l)<=(s<0?-(1e-6*s):1e-6*s)||(a.t=s/l,a.x[0]=e[0]+a.t*i[0],a.x[1]=e[1]+a.t*i[1],a.x[2]=e[2]+a.t*i[2],a.intersection=!0,a.betweenPoints=a.t>=0&&a.t<=1),a}function WL(e,t,r,n){let a,i={intersection:!1,l0:[],l1:[],error:null},o=[];BU(t,n,o);let s=o.map(e=>Math.abs(e));if(s[0]+s[1]+s[2]<1e-6){let n=[];return BV(e,r,n),0===BW(t,n)?i.error=WT:i.error=W_,i}a=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";let l=[],u=-BW(t,e),c=-BW(n,r);switch(a){case"x":l[0]=0,l[1]=(c*t[2]-u*n[2])/o[0],l[2]=(u*n[1]-c*t[1])/o[0];break;case"y":l[0]=(u*n[2]-c*t[2])/o[1],l[1]=0,l[2]=(c*t[0]-u*n[0])/o[1];break;case"z":l[0]=(c*t[1]-u*n[1])/o[2],l[1]=(u*n[0]-c*t[0])/o[2],l[2]=0}return i.l0=l,BL(l,o,i.l1),i.intersection=!0,i}let WV={normal:[0,0,1],origin:[0,0,0]};function WF(e,t,r={}){Object.assign(t,WV,r),WI(e,t,r),Bh.setGetArray(e,t,["normal","origin"],3),t.classHierarchy.push("vtkPlane"),e.distanceToPlane=e=>WD(e,t.origin,t.normal),e.projectPoint=(e,r)=>{WA(e,t.origin,t.normal,r)},e.projectVector=(e,r)=>WO(e,t.normal,r),e.push=e=>{if(0!==e)for(let r=0;r<3;r++)t.origin[r]+=e*t.normal[r]},e.generalizedProjectPoint=(e,r)=>{WR(e,t.origin,t.normal,r)},e.evaluateFunction=(e,r,n)=>Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(r-t.origin[1])+t.normal[2]*(n-t.origin[2]),e.evaluateGradient=e=>[t.normal[0],t.normal[1],t.normal[2]],e.intersectWithLine=(e,r)=>WN(e,r,t.origin,t.normal),e.intersectWithPlane=(e,r)=>WL(e,r,t.origin,t.normal)}var Wj={newInstance:Bh.newInstance(WF,"vtkPlane"),extend:WF,...{evaluate:function(e,t,r){return e[0]*(r[0]-t[0])+e[1]*(r[1]-t[1])+e[2]*(r[2]-t[2])},distanceToPlane:WD,projectPoint:WA,projectVector:WO,generalizedProjectPoint:WR,intersectWithLine:WN,intersectWithPlane:WL,DISJOINT:W_,COINCIDE:WT}};let WB=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];function WW(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function WU(e){return e?.length>=6&&e[0]<=e[1]&&e[2]<=e[3]&&e[4]<=e[5]}function Wz(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function WH(e){return Wz(e,WB)}function WG(e,t,r,n){let[a,i,o,s,l,u]=e;return"number"==typeof t?(e[0]=a<t?a:t,e[1]=i>t?i:t,e[2]=o<r?o:r,e[3]=s>r?s:r,e[4]=l<n?l:n,e[5]=u>n?u:n):(e[0]=a<t[0]?a:t[0],e[1]=i>t[0]?i:t[0],e[2]=o<t[1]?o:t[1],e[3]=s>t[1]?s:t[1],e[4]=l<t[2]?l:t[2],e[5]=u>t[2]?u:t[2]),e}function Wq(e,t){if(0===t.length)return e;if(Array.isArray(t[0]))for(let r=0;r<t.length;++r)WG(e,...t[r]);else for(let r=0;r<t.length;r+=3)WG(e,...t.slice(r,r+3));return e}function W$(e,t,r,n,a,i,o){let[s,l,u,c,d,h]=e;return void 0===o?(e[0]=Math.min(t[0],s),e[1]=Math.max(t[1],l),e[2]=Math.min(t[2],u),e[3]=Math.max(t[3],c),e[4]=Math.min(t[4],d),e[5]=Math.max(t[5],h)):(e[0]=Math.min(t,s),e[1]=Math.max(r,l),e[2]=Math.min(n,u),e[3]=Math.max(a,c),e[4]=Math.min(i,d),e[5]=Math.max(o,h)),e}function WK(e,t,r,n){let[a,i,o,s,l,u]=e;return e[0]=t,e[1]=t>i?t:i,e[2]=r,e[3]=r>s?r:s,e[4]=n,e[5]=n>u?n:u,a!==t||o!==r||l!==n}function WY(e,t,r,n){let[a,i,o,s,l,u]=e;return e[0]=t<a?t:a,e[1]=t,e[2]=r<o?r:o,e[3]=r,e[4]=n<l?n:l,e[5]=n,i!==t||s!==r||u!==n}function WX(e,t){return null==t?function(e){let t=[0,0,0],r=-1,n=0,a=0;for(let i=0;i<3;++i)(a=e[2*i+1]-e[2*i])>n&&(n=a,r=i),t[i]=+(a>0);if(r<0)return WX(e,.5);for(let r=0;r<3;++r)if(!t[r]){let t=.005*n;e[2*r]-=t,e[2*r+1]+=t}return e}(e):(e[0]-=t,e[1]+=t,e[2]-=t,e[3]+=t,e[4]-=t,e[5]+=t,e)}function WZ(e,t,r,n){return!!WU(e)&&(t>=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),r>=0?(e[2]*=r,e[3]*=r):(e[2]=r*e[3],e[3]=r*e[2]),n>=0?(e[4]*=n,e[5]*=n):(e[4]=n*e[5],e[5]=n*e[4]),!0)}function WJ(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function WQ(e,t){return e[2*t+1]-e[2*t]}function W1(e){return[WQ(e,0),WQ(e,1),WQ(e,2)]}function W0(e){return e.slice(0,2)}function W2(e){return e.slice(2,4)}function W5(e){return e.slice(4,6)}function W3(e){let t=W1(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function W4(e){if(WU(e)){let t=W1(e);return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}return null}function W8(e){let t=W4(e);return null!==t?Math.sqrt(t):null}function W6(e){return[e[0],e[2],e[4]]}function W9(e){return[e[1],e[3],e[5]]}function W7(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Ue(e,t){return t[0]=[e[0],e[2],e[4]],t[1]=[e[0],e[2],e[5]],t[2]=[e[0],e[3],e[4]],t[3]=[e[0],e[3],e[5]],t[4]=[e[1],e[2],e[4]],t[5]=[e[1],e[2],e[5]],t[6]=[e[1],e[3],e[4]],t[7]=[e[1],e[3],e[5]],t}function Ut(e,t,r){return t[0]=e[0],t[1]=e[2],t[2]=e[4],r[0]=e[1],r[1]=e[3],r[2]=e[5],t}function Ur(e,t,r=[]){let n=Ue(e,[]);for(let e=0;e<n.length;++e)N7.vec3.transformMat4(n[e],n[e],t);return WH(r),Wq(r,n)}function Un(e,t=[]){return t[0]=.5*(e[1]-e[0]),t[1]=.5*(e[3]-e[2]),t[2]=.5*(e[5]-e[4]),t}function Ua(e,t,r,n){let a=[].concat(WB),i=e.getData();for(let e=0;e<i.length;e+=3){let o=[i[e],i[e+1],i[e+2]],s=BW(o,t);a[0]=Math.min(s,a[0]),a[1]=Math.max(s,a[1]);let l=BW(o,r);a[2]=Math.min(l,a[2]),a[3]=Math.max(l,a[3]);let u=BW(o,n);a[4]=Math.min(u,a[4]),a[5]=Math.max(u,a[5])}return a}function Ui(e,t,r,n,a){let i=!0,o=[],s=0,l=[],u=[0,0,0];for(let r=0;r<3;r++)t[r]<e[2*r]?(o[r]=1,u[r]=e[2*r],i=!1):t[r]>e[2*r+1]?(o[r]=0,u[r]=e[2*r+1],i=!1):o[r]=2;if(i)return n[0]=t[0],n[1]=t[1],n[2]=t[2],a[0]=0,1;for(let e=0;e<3;e++)2!==o[e]&&0!==r[e]?l[e]=(u[e]-t[e])/r[e]:l[e]=-1;for(let e=0;e<3;e++)l[s]<l[e]&&(s=e);if(l[s]>1||l[s]<0)return 0;a[0]=l[s];for(let a=0;a<3;a++)if(s!==a){if(n[a]=t[a]+l[s]*r[a],n[a]<e[2*a]||n[a]>e[2*a+1])return 0}else n[a]=u[a];return 1}function Uo(e,t,r){let n=[],a=0,i=1,o=1;for(let s=4;s<=5;++s){n[2]=e[s];for(let s=2;s<=3;++s){n[1]=e[s];for(let s=0;s<=1;++s)if(n[0]=e[s],a=Wj.evaluate(r,t,n),o&&(i=a>=0?1:-1,o=0),0===a||i>0&&a<0||i<0&&a>0)return 1}}return 0}function Us(e,t){let r;if(!(WU(e)&&WU(t)))return!1;let n=[0,0,0,0,0,0];for(let a=0;a<3;a++)if(r=!1,t[2*a]>=e[2*a]&&t[2*a]<=e[2*a+1]?(r=!0,n[2*a]=t[2*a]):e[2*a]>=t[2*a]&&e[2*a]<=t[2*a+1]&&(r=!0,n[2*a]=e[2*a]),t[2*a+1]>=e[2*a]&&t[2*a+1]<=e[2*a+1]?(r=!0,n[2*a+1]=t[2*a+1]):e[2*a+1]>=t[2*a]&&e[2*a+1]<=t[2*a+1]&&(r=!0,n[2*a+1]=e[2*a+1]),!r)return!1;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],!0}function Ul(e,t){if(!(WU(e)&&WU(t)))return!1;for(let r=0;r<3;r++){if((!(t[2*r]>=e[2*r])||!(t[2*r]<=e[2*r+1]))&&(!(e[2*r]>=t[2*r])||!(e[2*r]<=t[2*r+1]))&&(!(t[2*r+1]>=e[2*r])||!(t[2*r+1]<=e[2*r+1]))){if(!(e[2*r+1]>=t[2*r])||!(e[2*r+1]<=t[2*r+1]))return!1}}return!0}function Uu(e,t,r,n){return!(t<e[0])&&!(t>e[1])&&!(r<e[2])&&!(r>e[3])&&!(n<e[4])&&!(n>e[5])}function Uc(e,t,r){let n=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],a=[0,0,0,0,0,0,0,0],i=0;for(let n=0;n<2;n++)for(let o=2;o<4;o++)for(let s=4;s<6;s++){let l=[e[n],e[o],e[s]];a[i++]=Wj.evaluate(r,t,l)}let o=2;for(;o--&&!(W7(a[n[o][0]],a[n[o][4]])&&W7(a[n[o][1]],a[n[o][5]])&&W7(a[n[o][2]],a[n[o][6]])&&W7(a[n[o][3]],a[n[o][7]])););if(o<0)return!1;let s=Math.sign(r[o]),l=Math.abs((e[2*o+1]-e[2*o])*r[o]),u=+(s>0);for(let e=0;e<4;e++){if(0===l)continue;let t=Math.abs(a[n[o][e]])/l;s>0&&t<u&&(u=t),s<0&&t>u&&(u=t)}let c=(1-u)*e[2*o]+u*e[2*o+1];return s>0?e[2*o]=c:e[2*o+1]=c,!0}function Ud(e,t){for(let e=0;e<3;++e)t[e]=t[e]<1?1:t[e];let r=t[0]*t[1]*t[2];for(;r>e;){for(let e=0;e<3;++e)t[e]=t[e]>1?t[e]-1:1;r=t[0]*t[1]*t[2]}}function Uh(e,t,r,n=[]){t=t<=0?1:t;let a=0,i=[0,0,0],o=-1,s=0,l=W1(e),u=l[0]+l[1]+l[2],c=.001/3*u;for(let e=0;e<3;++e)l[e]>s&&(o=e,s=l[e]),l[e]>c?(i[e]=1,a++):i[e]=0;let d=W6(e),h=W9(e);if(a<1)return r[0]=1,r[1]=1,r[2]=1,n[0]=d[0]-.5,n[1]=h[0]+.5,n[2]=d[1]-.5,n[3]=h[1]+.5,n[4]=d[2]-.5,n[5]=h[2]+.5,1;let p=t;p/=i[0]?l[0]/u:1,p/=i[1]?l[1]/u:1,p/=i[2]?l[2]/u:1,p**=1/a;for(let e=0;e<3;++e)r[e]=i[e]?Math.floor(p*l[e]/u):1,r[e]=r[e]<1?1:r[e];Ud(t,r);let f=.5*l[o]/r[o];for(let e=0;e<3;++e)i[e]?(n[2*e]=d[e],n[2*e+1]=h[e]):(n[2*e]=d[e]-f,n[2*e+1]=h[e]+f);return r[0]*r[1]*r[2]}function Up(e,t){if(e[0]>=t[0]&&e[0]<=t[1]&&e[1]>=t[2]&&e[1]<=t[3]&&e[2]>=t[4]&&e[2]<=t[5])return 0;let r=[0,0,0];return e[0]<t[0]?r[0]=t[0]-e[0]:e[0]>t[1]&&(r[0]=e[0]-t[1]),e[1]<t[2]?r[1]=t[2]-e[1]:e[1]>t[3]&&(r[1]=e[1]-t[3]),e[2]<t[4]?r[2]=t[4]-e[2]:e[2]>t[5]&&(r[2]=e[2]-t[5]),BW(r,r)}class Uf{constructor(e){this.bounds=e,this.bounds||(this.bounds=new Float64Array(WB))}getBounds(){return this.bounds}equals(e){return WW(this.bounds,e)}isValid(){return WU(this.bounds)}setBounds(e){return Wz(this.bounds,e)}reset(){return WH(this.bounds)}addPoint(...e){return WG(this.bounds,...e)}addPoints(e){return Wq(this.bounds,e)}addBounds(e,t,r,n,a,i){return W$(this.bounds,e,t,r,n,a,i)}setMinPoint(e,t,r){return WK(this.bounds,e,t,r)}setMaxPoint(e,t,r){return WY(this.bounds,e,t,r)}inflate(e){return WX(this.bounds,e)}scale(e,t,r){return WZ(this.bounds,e,t,r)}getCenter(){return WJ(this.bounds)}getLength(e){return WQ(this.bounds,e)}getLengths(){return W1(this.bounds)}getMaxLength(){return W3(this.bounds)}getDiagonalLength(){return W8(this.bounds)}getDiagonalLength2(){return W4(this.bounds)}getMinPoint(){return W6(this.bounds)}getMaxPoint(){return W9(this.bounds)}getXRange(){return W0(this.bounds)}getYRange(){return W2(this.bounds)}getZRange(){return W5(this.bounds)}getCorners(e){return Ue(this.bounds,e)}computeCornerPoints(e,t){return Ut(this.bounds,e,t)}computeLocalBounds(e,t,r){return Ua(this.bounds,e,t,r)}transformBounds(e,t=[]){return Ur(this.bounds,e,t)}computeScale3(e){return Un(this.bounds,e)}cutWithPlane(e,t){return Uc(this.bounds,e,t)}intersectBox(e,t,r,n){return Ui(this.bounds,e,t,r,n)}intersectPlane(e,t){return Uo(this.bounds,e,t)}intersect(e){return Us(this.bounds,e)}intersects(e){return Ul(this.bounds,e)}containsPoint(e,t,r){return Uu(this.bounds,e,t,r)}contains(e){return Ul(this.bounds,e)}computeDivisions(e,t,r=[]){return Uh(this.bounds,e,t,r)}distance2ToBounds(e){return Up(e,this.bounds)}}var Um=function(e){return new Uf(e&&e.bounds)},Ug=WU,Uy=Wz,Uv=WH,Ub=WG,Uw=Wq,Ux=WX,UC=function(e,t,r,n){if(!WU(e))return!1;let a=WJ(e);return e[0]-=a[0],e[1]-=a[0],e[2]-=a[1],e[3]-=a[1],e[4]-=a[2],e[5]-=a[2],WZ(e,t,r,n),e[0]+=a[0],e[1]+=a[0],e[2]+=a[1],e[3]+=a[1],e[4]+=a[2],e[5]+=a[2],!0},Uk=WJ,UM=WQ,US=W1,UE=W8,UP=W4,UI=W0,UT=W2,U_=W5,UD=Ue,UA=Ut,UO=Ur,UR=Uc,UN=Up,UL=WB;let UV={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},UF={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",UNSIGNED_CHAR_CLAMPED:"Uint8ClampedArray",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"};var Uj={DefaultDataType:UF.FLOAT,DataTypeByteSize:UV,VtkDataTypes:UF};let{vtkErrorMacro:UB}=Bp,{DefaultDataType:UW}=Uj,UU=1e-6;function Uz(e,t,r){let n,a,i=e.length,o=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(a=t;a<i;a+=r)if(!Number.isNaN(e[a])){s=o=e[a];break}for(;a<i;a+=r)(n=e[a])<o?o=n:n>s&&(s=n);return{min:o,max:s}}function UH(e,t=0,r=1){if(t<0&&r>1){let t=e.length/r,n=new Float64Array(t);for(let a=0,i=0;a<t;++a){for(let t=i+r;i<t;++i)n[a]+=e[i]*e[i];n[a]**=.5}return Uz(n,0,1)}return Uz(e,t<0?0:t,r)}function UG(e,t=0){let r=e||[];for(;r.length<=t;)r.push(null);return r}function Uq(e){return Object.prototype.toString.call(e).slice(8,-1)}let U$={name:"",numberOfComponents:1,dataType:UW,rangeTuple:[0,0]};function UK(e,t,r={}){if(Object.assign(t,U$,r),Array.isArray(r.values)&&void 0===r.dataType&&console.warn("vtkDataArray.newInstance: no dataType provided, converting to Float32Array"),!t.empty&&!t.values&&!t.size)throw TypeError("Cannot create vtkDataArray object without: size > 0, values");if(t.values?Array.isArray(t.values)&&(t.values=jj(t.dataType,t.values)):t.values=jF(t.dataType,t.size),t.values&&(t.size=t.size??t.values.length,t.dataType=Uq(t.values)),jY(e,t),j1(e,t,["name","numberOfComponents"]),t.size%t.numberOfComponents!=0)throw RangeError("model.size is not a multiple of model.numberOfComponents");function n(r){if(r<0)return!1;let n=e.getNumberOfComponents(),a=t.values.length/(n>0?n:1);if(r===a)return!0;if(r>a){let e=t.values;return t.values=jF(t.dataType,(r+a)*n),t.values.set(e),!0}return t.size>r*n&&(t.size=r*n,e.dataChange()),!0}t.classHierarchy.push("vtkDataArray"),e.dataChange=()=>{t.ranges=null,e.modified()},e.allocate=t=>{n(e.getNumberOfTuples()+t)},e.resize=r=>{n(r);let a=r*e.getNumberOfComponents();return t.size!==a&&(t.size=a,e.dataChange(),!0)},e.initialize=()=>(e.resize(0),e),e.getElementComponentSize=()=>t.values.BYTES_PER_ELEMENT,e.getComponent=(e,r=0)=>t.values[e*t.numberOfComponents+r],e.setComponent=(r,n,a)=>{a!==t.values[r*t.numberOfComponents+n]&&(t.values[r*t.numberOfComponents+n]=a,e.dataChange())},e.getValue=r=>{let n=r/t.numberOfComponents,a=r%t.numberOfComponents;return e.getComponent(n,a)},e.setValue=(r,n)=>{let a=r/t.numberOfComponents,i=r%t.numberOfComponents;e.setComponent(a,i,n)},e.getData=()=>t.size===t.values.length?t.values:t.values.subarray(0,t.size),e.getRange=(r=-1)=>{let n=r;n<0&&(n=1===t.numberOfComponents?0:t.numberOfComponents);let a=null;return t.ranges||(t.ranges=UG(t.ranges,t.numberOfComponents)),(a=t.ranges[n])||(a=UH(e.getData(),r,t.numberOfComponents),t.ranges[n]=a),t.rangeTuple[0]=a.min,t.rangeTuple[1]=a.max,t.rangeTuple},e.setRange=(e,r)=>{t.ranges||(t.ranges=UG(t.ranges,t.numberOfComponents));let n={min:e.min,max:e.max};return t.ranges[r]=n,t.rangeTuple[0]=n.min,t.rangeTuple[1]=n.max,t.rangeTuple},e.getRanges=(r=!0)=>{if(!r)return structuredClone(t.ranges);let n=[];for(let r=0;r<t.numberOfComponents;r++){let[t,a]=e.getRange(r),i={min:t,max:a};n.push(i)}if(t.numberOfComponents>1){let[t,r]=e.getRange(-1);n.push({min:t,max:r})}return n},e.setTuple=(e,r)=>{let n=e*t.numberOfComponents;for(let e=0;e<t.numberOfComponents;e++)t.values[n+e]=r[e]},e.setTuples=(e,r)=>{let n=e*t.numberOfComponents,a=Math.min(r.length,t.size-n);for(let e=0;e<a;)t.values[n++]=r[e++]},e.insertTuple=(r,a)=>(t.size<=r*t.numberOfComponents&&(t.size=(r+1)*t.numberOfComponents,n(r+1)),e.setTuple(r,a),r),e.insertTuples=(r,a)=>{let i=r+a.length/t.numberOfComponents;return t.size<i*t.numberOfComponents&&(t.size=i*t.numberOfComponents,n(i)),e.setTuples(r,a),i},e.insertNextTuple=r=>{let n=t.size/t.numberOfComponents;return e.insertTuple(n,r)},e.insertNextTuples=r=>{let n=t.size/t.numberOfComponents;return e.insertTuples(n,r)},e.findTuple=(e,r=UU)=>{for(let n=0;n<t.size;n+=t.numberOfComponents)if(Math.abs(e[0]-t.values[n])<=r){let a=!0;for(let i=1;i<t.numberOfComponents;++i)if(Math.abs(e[i]-t.values[n+i])>r){a=!1;break}if(a)return n/t.numberOfComponents}return -1},e.getTuple=(e,r=[])=>{let n=t.numberOfComponents||1,a=e*n;switch(n){case 4:r[3]=t.values[a+3];case 3:r[2]=t.values[a+2];case 2:r[1]=t.values[a+1];case 1:r[0]=t.values[a];break;default:for(let e=n-1;e>=0;--e)r[e]=t.values[a+e]}return r},e.getTuples=(r,n)=>{let a=(r??0)*t.numberOfComponents,i=(n??e.getNumberOfTuples())*t.numberOfComponents,o=e.getData().subarray(a,i);return o.length>0?o:null},e.getTupleLocation=(e=1)=>e*t.numberOfComponents,e.getNumberOfComponents=()=>t.numberOfComponents,e.getNumberOfValues=()=>t.size,e.getNumberOfTuples=()=>t.size/t.numberOfComponents,e.getDataType=()=>t.dataType,e.newClone=()=>UY({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents}),e.getName=()=>(t.name||(e.modified(),t.name=`vtkDataArray${e.getMTime()}`),t.name),e.setData=(r,n)=>{t.values=r,t.size=r.length,t.dataType=Uq(r),n&&(t.numberOfComponents=n),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),e.dataChange()},e.getState=()=>{if(t.deleted)return null;let r={...t,vtkClass:e.getClassName()};r.values=Array.from(r.values),delete r.buffer,Object.keys(r).forEach(e=>{r[e]||delete r[e]});let n={};return Object.keys(r).sort().forEach(e=>{n[e]=r[e]}),n.mtime&&delete n.mtime,n},e.deepCopy=r=>{let n=e.getDataType(),a=t.values;e.shallowCopy(r),t.ranges=structuredClone(r.getRanges()),a?.length>=r.getNumberOfValues()&&n===r.getDataType()?(a.set(r.getData()),t.values=a,e.dataChange()):e.setData(r.getData().slice())},e.interpolateTuple=(r,n,a,i,o,s)=>{let l=t.numberOfComponents||1;(l!==n.getNumberOfComponents()||l!==i.getNumberOfComponents())&&UB("numberOfComponents must match");let u=n.getTuple(a),c=i.getTuple(o),d=[];switch(d.length=l,l){case 4:d[3]=u[3]+(c[3]-u[3])*s;case 3:d[2]=u[2]+(c[2]-u[2])*s;case 2:d[1]=u[1]+(c[1]-u[1])*s;case 1:d[0]=u[0]+(c[0]-u[0])*s;break;default:for(let e=0;e<l;e++)d[e]=u[e]+(c[e]-u[e])*s}return e.insertTuple(r,d)}}let UY=j7(UK,"vtkDataArray");var UX={newInstance:UY,extend:UK,computeRange:UH,createRangeHelper:function(){let e=Number.MAX_VALUE,t=-Number.MAX_VALUE,r=0,n=0;return{add(a){e>a&&(e=a),t<a&&(t=a),r++,n+=a},get:()=>({min:e,max:t,count:r,sum:n,mean:n/r}),getRange:()=>({min:e,max:t})}},fastComputeRange:Uz,getDataType:Uq,getMaxNorm:function(e){let t=e.getNumberOfComponents(),r=0,n=Array(t);for(let a=0;a<e.getNumberOfTuples();++a){e.getTuple(a,n);let i=Bz(n,t);i>r&&(r=i)}return r},...Uj};let{vtkErrorMacro:UZ,vtkWarningMacro:UJ}=Bh,UQ={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function U1(e,t,r={}){let n;Object.assign(t,UQ,r),Bh.obj(e,t),t.classHierarchy.push("vtkFieldData"),n=e.getState,t.arrays&&(t.arrays=t.arrays.map(e=>({data:jx(e.data)}))),e.initialize=()=>{e.initializeFields(),e.copyAllOn(),e.clearFieldFlags()},e.initializeFields=()=>{t.arrays=[],t.copyFieldFlags={},e.modified()},e.copyStructure=r=>{e.initializeFields(),t.copyFieldFlags=r.getCopyFieldFlags().map(e=>e),t.arrays=r.getArrays().map(e=>({data:e}))},e.getNumberOfArrays=()=>t.arrays.length,e.getNumberOfActiveArrays=()=>t.arrays.length,e.addArray=r=>{let n=r.getName(),{array:a,index:i}=e.getArrayWithIndex(n);return null!=a?(t.arrays[i]={data:r},i):(t.arrays=[].concat(t.arrays,{data:r}),t.arrays.length-1)},e.removeAllArrays=()=>{t.arrays=[]},e.removeArray=r=>{let n=t.arrays.findIndex(e=>e.data.getName()===r);return e.removeArrayByIndex(n)},e.removeArrayByIndex=e=>-1!==e&&e<t.arrays.length&&(t.arrays.splice(e,1),!0),e.getArrays=()=>t.arrays.map(e=>e.data),e.getArray=t=>"number"==typeof t?e.getArrayByIndex(t):e.getArrayByName(t),e.getArrayByName=e=>t.arrays.reduce((t,r,n)=>r.data.getName()===e?r.data:t,null),e.getArrayWithIndex=e=>{let r=t.arrays.findIndex(t=>t.data.getName()===e);return{array:-1!==r?t.arrays[r].data:null,index:r}},e.getArrayByIndex=e=>e>=0&&e<t.arrays.length?t.arrays[e].data:null,e.hasArray=t=>e.getArrayWithIndex(t).index>=0,e.getArrayName=e=>{let r=t.arrays[e];return r?r.data.getName():""},e.getCopyFieldFlags=()=>t.copyFieldFlags,e.getFlag=e=>t.copyFieldFlags[e],e.passData=(r,n=-1,a=-1)=>{r.getArrays().forEach(i=>{let o=e.getFlag(i.getName());if(!1!==o&&!(t.doCopyAllOff&&!0!==o)&&i){let t=e.getArrayByName(i.getName());if(t)if(i.getNumberOfComponents()===t.getNumberOfComponents())if(n>-1&&n<i.getNumberOfTuples()){let e=a>-1?a:n;t.insertTuple(e,i.getTuple(n))}else t.insertTuples(0,i.getTuples());else UZ("Unhandled case in passData");else if(n<0||n>i.getNumberOfTuples())e.addArray(i),r.getAttributes(i).forEach(t=>{e.setAttribute(i,t)});else{let o=i.getNumberOfComponents(),s=i.getNumberOfValues(),l=a>-1?a:n;s<=l*o&&(s=(l+1)*o),(t=UX.newInstance({name:i.getName(),dataType:i.getDataType(),numberOfComponents:o,values:Bh.newTypedArray(i.getDataType(),s),size:0})).insertTuple(l,i.getTuple(n)),e.addArray(t),r.getAttributes(i).forEach(r=>{e.setAttribute(t,r)})}}})},e.interpolateData=(r,n=-1,a=-1,i=-1,o=.5)=>{r.getArrays().forEach(s=>{let l=e.getFlag(s.getName());if(!1!==l&&!(t.doCopyAllOff&&!0!==l)&&s){let t=e.getArrayByName(s.getName());if(t)if(s.getNumberOfComponents()===t.getNumberOfComponents())if(n>-1&&n<s.getNumberOfTuples()){let e=i>-1?i:n;t.interpolateTuple(e,s,n,s,a,o),UJ("Unexpected case in interpolateData")}else t.insertTuples(s.getTuples());else UZ("Unhandled case in interpolateData");else if(n<0||a<0||n>s.getNumberOfTuples())e.addArray(s),r.getAttributes(s).forEach(t=>{e.setAttribute(s,t)});else{let l=s.getNumberOfComponents(),u=s.getNumberOfValues(),c=i>-1?i:n;u<=c*l&&(u=(c+1)*l),(t=UX.newInstance({name:s.getName(),dataType:s.getDataType(),numberOfComponents:l,values:Bh.newTypedArray(s.getDataType(),u),size:0})).interpolateTuple(c,s,n,s,a,o),e.addArray(t),r.getAttributes(s).forEach(r=>{e.setAttribute(t,r)})}}})},e.copyFieldOn=e=>{t.copyFieldFlags[e]=!0},e.copyFieldOff=e=>{t.copyFieldFlags[e]=!1},e.copyAllOn=()=>{(!t.doCopyAllOn||t.doCopyAllOff)&&(t.doCopyAllOn=!0,t.doCopyAllOff=!1,e.modified())},e.copyAllOff=()=>{(t.doCopyAllOn||!t.doCopyAllOff)&&(t.doCopyAllOn=!1,t.doCopyAllOff=!0,e.modified())},e.clearFieldFlags=()=>{t.copyFieldFlags={}},e.deepCopy=e=>{t.arrays=e.getArrays().map(e=>{let t=e.newClone();return t.deepCopy(e),{data:t}})},e.copyFlags=e=>e.getCopyFieldFlags().map(e=>e),e.reset=()=>t.arrays.forEach(e=>e.data.reset()),e.getMTime=()=>t.arrays.reduce((e,t)=>t.data.getMTime()>e?t.data.getMTime():e,t.mtime),e.getNumberOfComponents=()=>t.arrays.reduce((e,t)=>e+t.data.getNumberOfComponents(),0),e.getNumberOfTuples=()=>t.arrays.length>0?t.arrays[0].getNumberOfTuples():0,e.getState=()=>{let e=n();return e&&(e.arrays=t.arrays.map(e=>({data:e.data.getState()}))),e}}Bh.newInstance(U1,"vtkFieldData");var U0={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:{SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:{DEFAULT:0,SINGLE:1,DOUBLE:2},PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};let{AttributeTypes:U2,AttributeCopyOperations:U5}=U0,{vtkWarningMacro:U3}=Bh,U4={activeScalars:-1,activeVectors:-1,activeTensors:-1,activeNormals:-1,activeTCoords:-1,activeGlobalIds:-1,activePedigreeIds:-1};function U8(e,t,r={}){Object.assign(t,U4,r),U1(e,t,r),Bh.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={});let n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function a(e){let t=n.find(t=>U2[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase());return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes");let i={...e};e.checkNumberOfComponents=e=>!0,e.setAttribute=(r,n)=>{let i=a(n);if(r&&"PEDIGREEIDS"===i.toUpperCase()&&!r.isA("vtkDataArray"))return U3(`Cannot set attribute ${i}. The attribute must be a vtkDataArray.`),-1;if(r&&!e.checkNumberOfComponents(r,i))return U3(`Cannot set attribute ${i}. Incorrect number of components.`),-1;if(r){let n=e.addArray(r);t[`active${i}`]=n}else t[`active${i}`]=-1;return e.modified(),t[`active${i}`]},e.getAttributes=t=>n.filter(r=>e[`get${r}`]()===t),e.setActiveAttributeByName=(t,r)=>e.setActiveAttributeByIndex(e.getArrayWithIndex(t).index,r),e.setActiveAttributeByIndex=(r,n)=>{let i=a(n);if(r>=0&&r<t.arrays.length){if("PEDIGREEIDS"!==i.toUpperCase()){let t=e.getArrayByIndex(r);if(!t.isA("vtkDataArray"))return U3(`Cannot set attribute ${i}. Only vtkDataArray subclasses can be set as active attributes.`),-1;if(!e.checkNumberOfComponents(t,i))return U3(`Cannot set attribute ${i}. Incorrect number of components.`),-1}return t[`active${i}`]=r,e.modified(),r}return -1===r&&(t[`active${i}`]=r,e.modified()),-1},e.getActiveAttribute=t=>{let r=a(t);return e[`get${r}`]()},e.removeAllArrays=()=>{n.forEach(e=>{t[`active${e}`]=-1}),i.removeAllArrays()},e.removeArrayByIndex=e=>(-1!==e&&n.forEach(r=>{e===t[`active${r}`]?t[`active${r}`]=-1:e<t[`active${r}`]&&(t[`active${r}`]-=1)}),i.removeArrayByIndex(e)),n.forEach(r=>{let n=`active${r}`;e[`get${r}`]=()=>e.getArrayByIndex(t[n]),e[`set${r}`]=t=>e.setAttribute(t,r),e[`setActive${r}`]=t=>e.setActiveAttributeByIndex(e.getArrayWithIndex(t).index,r),e[`copy${r}Off`]=()=>{let e=r.toUpperCase();t.copyAttributeFlags[U5.PASSDATA][U2[e]]=!1},e[`copy${r}On`]=()=>{let e=r.toUpperCase();t.copyAttributeFlags[U5.PASSDATA][U2[e]]=!0}}),e.initializeAttributeCopyFlags=()=>{t.copyAttributeFlags=[],Object.keys(U5).filter(e=>"ALLCOPY"!==e).forEach(e=>{t.copyAttributeFlags[U5[e]]=Object.keys(U2).filter(e=>"NUM_ATTRIBUTES"!==e).reduce((e,t)=>(e[U2[t]]=!0,e),[])}),t.copyAttributeFlags[U5.COPYTUPLE][U2.GLOBALIDS]=!1,t.copyAttributeFlags[U5.INTERPOLATE][U2.GLOBALIDS]=!1,t.copyAttributeFlags[U5.COPYTUPLE][U2.PEDIGREEIDS]=!1},e.initialize=Bh.chain(e.initialize,e.initializeAttributeCopyFlags),t.dataArrays&&Object.keys(t.dataArrays).length&&Object.keys(t.dataArrays).forEach(r=>{t.dataArrays[r].ref||"vtkDataArray"!==t.dataArrays[r].type||e.addArray(UX.newInstance(t.dataArrays[r]))});let o=e.shallowCopy;e.shallowCopy=(e,r)=>{o(e,r),t.arrays=e.getArrays().map(e=>{let t=e.newClone();return t.shallowCopy(e,r),{data:t}})},e.initializeAttributeCopyFlags()}var U6={newInstance:Bh.newInstance(U8,"vtkDataSetAttributes"),extend:U8,...U0};let U9=["pointData","cellData","fieldData"],U7={};function ze(e,t,r={}){let n,a;Object.assign(t,U7,r),Bh.obj(e,t),Bh.setGet(e,t,U9),Bh.getArray(e,t,["bounds"],6),t.classHierarchy.push("vtkDataSet"),U9.forEach(e=>{t[e]?t[e]=jx(t[e]):t[e]=U6.newInstance()}),e.computeBounds=()=>{if(t.modifiedTime&&t.computeTime&&t.modifiedTime>t.computeTime||!t.computeTime){let r=e.getPoints();r?.getNumberOfPoints()?Uy(t.bounds,r.getBoundsByReference()):t.bounds=WE.createUninitializedBounds(),t.computeTime=Bh.getCurrentGlobalMTime()}},e.getLength2=()=>{let t=e.getBoundsByReference();return t&&6===t.length?UP(t):0},e.getLength=()=>Math.sqrt(e.getLength2()),e.getCenter=()=>{let t=e.getBoundsByReference();return t&&6===t.length?Uk(t):[0,0,0]},e.getCellBounds=t=>{let r=e.getCell(t);return r?r.getBounds():WE.createUninitializedBounds()},e.getBounds=Bh.chain(()=>e.computeBounds,e.getBounds),e.getBoundsByReference=Bh.chain(()=>e.computeBounds,e.getBoundsByReference),n=e.shallowCopy,e.shallowCopy=(e,r=!1)=>{n(e,r),U9.forEach(r=>{t[r]=U6.newInstance(),t[r].shallowCopy(e.getReferenceByName(r))})},a=e.getMTime,e.getMTime=()=>U9.reduce((e,r)=>Math.max(e,t[r]?.getMTime()??e),a()),e.initialize=()=>(U9.forEach(e=>t[e]?.initialize()),e)}var zt={newInstance:Bh.newInstance(ze,"vtkDataSet"),extend:ze,...{FieldDataTypes:{UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},FieldAssociations:{FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7}}};let zr={UNCHANGED:0,SINGLE_POINT:1,X_LINE:2,Y_LINE:3,Z_LINE:4,XY_PLANE:5,YZ_PLANE:6,XZ_PLANE:7,XYZ_GRID:8,EMPTY:9};var zn={StructuredType:zr};let{StructuredType:za}=zn;var zi={getDataDescriptionFromExtent:function(e){let t=0;for(let r=0;r<3;++r)e[2*r]<e[2*r+1]&&t++;return e[0]>e[1]||e[2]>e[3]||e[4]>e[5]?za.EMPTY:3===t?za.XYZ_GRID:2===t?e[0]===e[1]?za.YZ_PLANE:e[2]===e[3]?za.XZ_PLANE:za.XY_PLANE:1===t?e[0]<e[1]?za.X_LINE:e[2]<e[3]?za.Y_LINE:za.Z_LINE:za.SINGLE_POINT},...zn};let{vtkErrorMacro:zo}=Bh,zs={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:zr.EMPTY};var zl=Bh.newInstance(function(e,t,r={}){let n;Object.assign(t,zs,r),zt.extend(e,t,r),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=N7.mat3.identity(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),Bh.get(e,t,["indexToWorld","worldToIndex"]),Bh.setGetArray(e,t,["origin","spacing"],3),Bh.setGetArray(e,t,["direction"],9),Bh.getArray(e,t,["extent"],6),t.classHierarchy.push("vtkImageData"),e.setExtent=(...r)=>{if(t.deleted)return zo("instance deleted - cannot call any method"),!1;let n=1===r.length?r[0]:r;if(6!==n.length)return!1;let a=t.extent.some((e,t)=>e!==n[t]);return a&&(t.extent=n.slice(),t.dataDescription=zi.getDataDescriptionFromExtent(t.extent),e.modified()),a},e.setDimensions=(...r)=>{let n,a,i;if(t.deleted)return void zo("instance deleted - cannot call any method");if(1===r.length){let e=r[0];n=e[0],a=e[1],i=e[2]}else{if(3!==r.length)return void zo("Bad dimension specification");n=r[0],a=r[1],i=r[2]}e.setExtent(0,n-1,0,a-1,0,i-1)},e.getDimensions=()=>[t.extent[1]-t.extent[0]+1,t.extent[3]-t.extent[2]+1,t.extent[5]-t.extent[4]+1],e.getNumberOfCells=()=>{let t=e.getDimensions(),r=1;for(let e=0;e<3;e++){if(0===t[e])return 0;t[e]>1&&(r*=t[e]-1)}return r},e.getNumberOfPoints=()=>{let t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=r=>{let n=e.getDimensions();if(0===n[0]||0===n[1]||0===n[2])return zo("Requesting a point from an empty image."),null;let a=new Float64Array(3);switch(t.dataDescription){case zr.EMPTY:return null;case zr.SINGLE_POINT:break;case zr.X_LINE:a[0]=r;break;case zr.Y_LINE:a[1]=r;break;case zr.Z_LINE:a[2]=r;break;case zr.XY_PLANE:a[0]=r%n[0],a[1]=r/n[0];break;case zr.YZ_PLANE:a[1]=r%n[1],a[2]=r/n[1];break;case zr.XZ_PLANE:a[0]=r%n[0],a[2]=r/n[0];break;case zr.XYZ_GRID:a[0]=r%n[0],a[1]=r/n[0]%n[1],a[2]=r/(n[0]*n[1]);break;default:zo("Invalid dataDescription")}let i=[0,0,0];return e.indexToWorld(a,i),i},e.getBounds=()=>e.extentToBounds(e.getSpatialExtent()),e.extentToBounds=e=>UO(e,t.indexToWorld),e.getSpatialExtent=()=>Ux([...t.extent],.5),e.computeTransforms=()=>{N7.mat4.fromTranslation(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],N7.mat4.scale(t.indexToWorld,t.indexToWorld,t.spacing),N7.mat4.invert(t.worldToIndex,t.indexToWorld)},e.indexToWorld=(e,r=[])=>(N7.vec3.transformMat4(r,e,t.indexToWorld),r),e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=(e,r=[])=>(N7.vec3.transformMat4(r,e,t.worldToIndex),r),e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=(e,r=[])=>UO(e,t.indexToWorld,r),e.worldToIndexBounds=(e,r=[])=>UO(e,t.worldToIndex,r),t._onOriginChanged=e.computeTransforms,t._onDirectionChanged=e.computeTransforms,t._onSpacingChanged=e.computeTransforms,e.computeTransforms(),e.getCenter=()=>Uk(e.getBounds()),e.computeHistogram=(t,r=null)=>{let n=[0,0,0,0,0,0];e.worldToIndexBounds(t,n);let a=[0,0,0],i=[0,0,0];UA(n,a,i),B4(a,a),B4(i,i);let o=e.getDimensions();Wg(a,[0,0,0],[o[0]-1,o[1]-1,o[2]-1],a),Wg(i,[0,0,0],[o[0]-1,o[1]-1,o[2]-1],i);let s=o[0],l=o[0]*o[1],u=e.getPointData().getScalars().getData(),c=-1/0,d=1/0,h=0,p=0,f=0;for(let e=a[2];e<=i[2];e++)for(let t=a[1];t<=i[1];t++){let o=a[0]+t*s+e*l;for(let s=a[0];s<=i[0];s++){if(!r||r([s,t,e],n)){let e=u[o];e>c&&(c=e),e<d&&(d=e),h+=e*e,p+=e,f+=1}++o}}let m=f>0?p/f:0,g=f?Math.abs(h/f-m*m):0,y=Math.sqrt(g);return{minimum:d,maximum:c,average:m,variance:g,sigma:y,count:f}},e.computeIncrements=(e,t=1)=>{let r=[],n=t;for(let t=0;t<3;++t)r[t]=n,n*=e[2*t+1]-e[2*t]+1;return r},e.computeOffsetIndex=([t,r,n])=>{let a=e.getExtent(),i=e.getPointData().getScalars().getNumberOfComponents(),o=e.computeIncrements(a,i);return Math.floor((Math.round(t)-a[0])*o[0]+(Math.round(r)-a[2])*o[1]+(Math.round(n)-a[4])*o[2])},e.getOffsetIndexFromWorld=t=>{let r=e.getExtent(),n=e.worldToIndex(t);for(let e=0;e<3;++e)if(n[e]<r[2*e]||n[e]>r[2*e+1])return zo(`GetScalarPointer: Pixel ${n} is not in memory. Current extent = ${r}`),NaN;return e.computeOffsetIndex(n)},e.getScalarValueFromWorld=(t,r=0)=>{let n=e.getPointData().getScalars().getNumberOfComponents();if(r<0||r>=n)return zo(`GetScalarPointer: Scalar Component ${r} is not within bounds. Current Scalar numberOfComponents: ${n}`),NaN;let a=e.getOffsetIndexFromWorld(t);return Number.isNaN(a)?a:e.getPointData().getScalars().getComponent(a,r)},n=e.initialize,e.initialize=()=>(e.set({direction:N7.mat3.identity(t.direction),spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:zr.EMPTY}),n())},"vtkImageData");let{vtkDebugMacro:zu}=Bh,zc={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,modelTransformMatrix:null,cameraLightTransform:N7.mat4.create(),physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function zd(e,t,r={}){Object.assign(t,zc,r),Bh.obj(e,t),Bh.get(e,t,["distance"]),Bh.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),Bh.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),Bh.setGetArray(e,t,["clippingRange","windowCenter"],2),Bh.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),function(e,t){t.classHierarchy.push("vtkCamera");let r=new Float64Array(3),n=new Float64Array([0,0,-1]),a=new Float64Array([0,1,0]),i=N7.mat4.identity(new Float64Array(16)),o=N7.mat4.identity(new Float64Array(16)),s=new Float64Array(3),l=new Float64Array(3),u=new Float64Array(3),c=N7.mat4.identity(new Float64Array(16)),d=N7.mat4.identity(new Float64Array(16)),h=new Float64Array(3),p=new Float64Array(3);function f(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=()=>{let r=e.getViewMatrix();t.viewUp[0]=r[4],t.viewUp[1]=r[5],t.viewUp[2]=r[6],e.modified()},e.setPosition=(r,n,a)=>{(r!==t.position[0]||n!==t.position[1]||a!==t.position[2])&&(t.position[0]=r,t.position[1]=n,t.position[2]=a,e.computeDistance(),e.modified())},e.setFocalPoint=(r,n,a)=>{(r!==t.focalPoint[0]||n!==t.focalPoint[1]||a!==t.focalPoint[2])&&(t.focalPoint[0]=r,t.focalPoint[1]=n,t.focalPoint[2]=a,e.computeDistance(),e.modified())},e.setDistance=r=>{if(t.distance===r)return;t.distance=r,t.distance<1e-20&&(t.distance=1e-20,zu("Distance is set to minimum."));let n=t.directionOfProjection;t.focalPoint[0]=t.position[0]+n[0]*t.distance,t.focalPoint[1]=t.position[1]+n[1]*t.distance,t.focalPoint[2]=t.position[2]+n[2]*t.distance,e.modified()},e.computeDistance=()=>{let e=t.focalPoint[0]-t.position[0],r=t.focalPoint[1]-t.position[1],n=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+r*r+n*n),t.distance<1e-20){t.distance=1e-20,zu("Distance is set to minimum.");let e=t.directionOfProjection;t.focalPoint[0]=t.position[0]+e[0]*t.distance,t.focalPoint[1]=t.position[1]+e[1]*t.distance,t.focalPoint[2]=t.position[2]+e[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=r/t.distance,t.directionOfProjection[2]=n/t.distance,f()},e.dolly=r=>{if(r<=0)return;let n=t.distance/r;e.setPosition(t.focalPoint[0]-n*t.directionOfProjection[0],t.focalPoint[1]-n*t.directionOfProjection[1],t.focalPoint[2]-n*t.directionOfProjection[2])},e.roll=r=>{let n=t.position,a=t.focalPoint,i=t.viewUp,o=new Float64Array([i[0],i[1],i[2],0]);N7.mat4.identity(c);let s=new Float64Array([a[0]-n[0],a[1]-n[1],a[2]-n[2]]);N7.mat4.rotate(c,c,BM(r),s),N7.vec4.transformMat4(o,o,c),t.viewUp[0]=o[0],t.viewUp[1]=o[1],t.viewUp[2]=o[2],e.modified()},e.azimuth=r=>{let n=t.focalPoint;N7.mat4.identity(d),N7.mat4.translate(d,d,n),N7.mat4.rotate(d,d,BM(r),t.viewUp),N7.mat4.translate(d,d,[-n[0],-n[1],-n[2]]),N7.vec3.transformMat4(h,t.position,d),e.setPosition(h[0],h[1],h[2])},e.yaw=r=>{let n=t.position;N7.mat4.identity(d),N7.mat4.translate(d,d,n),N7.mat4.rotate(d,d,BM(r),t.viewUp),N7.mat4.translate(d,d,[-n[0],-n[1],-n[2]]),N7.vec3.transformMat4(p,t.focalPoint,d),e.setFocalPoint(p[0],p[1],p[2])},e.elevation=r=>{let n=t.focalPoint,a=e.getViewMatrix(),i=[-a[0],-a[1],-a[2]];N7.mat4.identity(d),N7.mat4.translate(d,d,n),N7.mat4.rotate(d,d,BM(r),i),N7.mat4.translate(d,d,[-n[0],-n[1],-n[2]]),N7.vec3.transformMat4(h,t.position,d),e.setPosition(h[0],h[1],h[2])},e.pitch=r=>{let n=t.position,a=e.getViewMatrix(),i=[a[0],a[1],a[2]];N7.mat4.identity(d),N7.mat4.translate(d,d,n),N7.mat4.rotate(d,d,BM(r),i),N7.mat4.translate(d,d,[-n[0],-n[1],-n[2]]),N7.vec3.transformMat4(p,t.focalPoint,d),e.setFocalPoint(...p)},e.zoom=r=>{r<=0||(t.parallelProjection?t.parallelScale/=r:t.viewAngle/=r,e.modified())},e.translate=(r,n,a)=>{let i=[r,n,a];BL(t.position,i,t.position),BL(t.focalPoint,i,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=r=>{let n=[...t.viewUp,1],a=[],i=[],o=[];n[0]+=t.position[0],n[1]+=t.position[1],n[2]+=t.position[2],N7.vec4.transformMat4(a,[...t.position,1],r),N7.vec4.transformMat4(i,[...t.focalPoint,1],r),N7.vec4.transformMat4(o,n,r),o[0]-=a[0],o[1]-=a[1],o[2]-=a[2],e.setPosition(...a.slice(0,3)),e.setFocalPoint(...i.slice(0,3)),e.setViewUp(...o.slice(0,3))},e.getThickness=()=>t.clippingRange[1]-t.clippingRange[0],e.setThickness=r=>{let n=r;n<1e-20&&(n=1e-20,zu("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+n)},e.setThicknessFromFocalPoint=r=>{let n=r;n<1e-20&&(n=1e-20,zu("Thickness is set to minimum.")),e.setClippingRange(t.distance-n/2,t.distance+n/2)},e.setRoll=e=>{},e.getRoll=()=>{},e.setObliqueAngles=(e,t)=>{},e.getOrientation=()=>{},e.getOrientationWXYZ=()=>{},e.getFrustumPlanes=(t=1,r=new Float64Array(24))=>{let n=[[1,0,0,1],[-1,0,0,1],[0,1,0,1],[0,-1,0,1],[0,0,1,1],[0,0,-1,1]],a=e.getCompositeProjectionMatrix(t,-1,1);for(let e=0;e<6;e++)N7.vec4.transformMat4(n[e],n[e],a),function(e){let t=Bz(e,3);0!==t&&(e[0]/=t,e[1]/=t,e[2]/=t,e[3]/=t)}(n[e]),r[4*e+0]=n[e][0],r[4*e+1]=n[e][1],r[4*e+2]=n[e][2],r[4*e+3]=n[e][3];return r},e.getCameraLightTransformMatrix=e=>(N7.mat4.copy(e,t.cameraLightTransform),e),e.computeCameraLightTransform=()=>{N7.mat4.copy(i,e.getViewMatrix()),N7.mat4.invert(i,i),N7.mat4.fromScaling(o,[t.distance,t.distance,t.distance]),N7.mat4.multiply(i,i,o),N7.mat4.identity(t.cameraLightTransform),N7.mat4.translate(t.cameraLightTransform,i,[0,0,-1])},e.deepCopy=e=>{},e.physicalOrientationToWorldDirection=e=>{let t=N7.quat.fromValues(e[0],e[1],e[2],e[3]),r=N7.quat.create(),n=N7.quat.fromValues(0,0,1,0);return N7.quat.conjugate(r,t),N7.quat.multiply(n,t,n),N7.quat.multiply(n,n,r),[n[0],n[1],n[2]]},e.getPhysicalToWorldMatrix=t=>{e.getWorldToPhysicalMatrix(t),N7.mat4.invert(t,t)},e.getWorldToPhysicalMatrix=e=>{N7.mat4.identity(e);let r=[3];BU(t.physicalViewNorth,t.physicalViewUp,r),e[0]=r[0],e[1]=r[1],e[2]=r[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],N7.mat4.transpose(e,e),N7.vec3.set(s,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),N7.mat4.scale(e,e,s),N7.mat4.translate(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=o=>{N7.mat4.invert(i,o),N7.vec3.transformMat4(s,r,i),e.computeDistance();let c=t.distance;e.setPosition(s[0],s[1],s[2]),N7.vec3.transformMat4(l,n,i),N7.vec3.subtract(l,l,s),N7.vec3.normalize(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),N7.vec3.transformMat4(u,a,i),N7.vec3.subtract(u,u,s),N7.vec3.normalize(u,u),e.setViewUp(u[0],u[1],u[2]),e.setDistance(c)},e.computeViewParametersFromPhysicalMatrix=t=>{e.getWorldToPhysicalMatrix(i),N7.mat4.multiply(i,t,i),e.computeViewParametersFromViewMatrix(i)},e.setModelTransformMatrix=e=>{t.modelTransformMatrix=e},e.getModelTransformMatrix=()=>t.modelTransformMatrix,e.setViewMatrix=r=>{t.viewMatrix=r,t.viewMatrix&&(N7.mat4.copy(i,t.viewMatrix),e.computeViewParametersFromViewMatrix(i),N7.mat4.transpose(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=()=>{if(t.viewMatrix)return t.modelTransformMatrix?(N7.mat4.multiply(i,t.viewMatrix,t.modelTransformMatrix),i):t.viewMatrix;N7.mat4.lookAt(i,t.position,t.focalPoint,t.viewUp),N7.mat4.transpose(i,i);let e=new Float64Array(16);return t.modelTransformMatrix?N7.mat4.multiply(e,i,t.modelTransformMatrix):N7.mat4.copy(e,i),e},e.setProjectionMatrix=e=>{t.projectionMatrix=e},e.getProjectionMatrix=(e,r,n)=>{let a=new Float64Array(16);if(N7.mat4.identity(a),t.projectionMatrix){let e=1/t.physicalScale;return N7.vec3.set(s,e,e,e),N7.mat4.copy(a,t.projectionMatrix),N7.mat4.scale(a,a,s),N7.mat4.transpose(a,a),a}N7.mat4.identity(i);let o=t.clippingRange[1]-t.clippingRange[0],l=[t.clippingRange[0]+(r+1)*o/2,t.clippingRange[0]+(n+1)*o/2];if(t.parallelProjection){let r=t.parallelScale*e,n=t.parallelScale,a=(t.windowCenter[0]-1)*r,o=(t.windowCenter[0]+1)*r,s=(t.windowCenter[1]-1)*n,u=(t.windowCenter[1]+1)*n;N7.mat4.ortho(i,a,o,s,u,l[0],l[1]),N7.mat4.transpose(i,i)}else if(t.useOffAxisProjection)throw Error("Off-Axis projection is not supported at this time");else{let r,n,a=Math.tan(BM(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(r=t.clippingRange[0]*a,n=t.clippingRange[0]*a/e):(r=t.clippingRange[0]*a*e,n=t.clippingRange[0]*a);let o=(t.windowCenter[0]-1)*r,s=(t.windowCenter[0]+1)*r,u=(t.windowCenter[1]-1)*n,c=(t.windowCenter[1]+1)*n,d=l[0],h=l[1];i[0]=2*d/(s-o),i[5]=2*d/(c-u),i[2]=(o+s)/(s-o),i[6]=(u+c)/(c-u),i[10]=-(d+h)/(h-d),i[14]=-1,i[11]=-2*d*h/(h-d),i[15]=0}return N7.mat4.copy(a,i),a},e.getCompositeProjectionMatrix=(t,r,n)=>{let a=e.getViewMatrix(),i=e.getProjectionMatrix(t,r,n);return N7.mat4.multiply(i,a,i),i},e.setDirectionOfProjection=(e,r,n)=>{if(t.directionOfProjection[0]===e&&t.directionOfProjection[1]===r&&t.directionOfProjection[2]===n)return;t.directionOfProjection[0]=e,t.directionOfProjection[1]=r,t.directionOfProjection[2]=n;let a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance,f()},e.setDeviceAngles=(r,n,a,i)=>{let o=[3];BU(t.physicalViewNorth,t.physicalViewUp,o);let s=N7.mat4.identity(new Float64Array(16));N7.mat4.rotate(s,s,BM(r),t.physicalViewUp),N7.mat4.rotate(s,s,BM(n),o),N7.mat4.rotate(s,s,BM(a),t.physicalViewNorth),N7.mat4.rotate(s,s,BM(-i),t.physicalViewUp);let l=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),u=new Float64Array(t.physicalViewNorth);N7.vec3.transformMat4(l,l,s),N7.vec3.transformMat4(u,u,s),e.setDirectionOfProjection(l[0],l[1],l[2]),e.setViewUp(u[0],u[1],u[2]),e.modified()},e.setOrientationWXYZ=(t,r,n,a)=>{let i=N7.mat4.identity(new Float64Array(16));if(0!==t&&(0!==r||0!==n||0!==a)){let e=BM(t),o=N7.quat.create();N7.quat.setAxisAngle(o,[r,n,a],e),N7.mat4.fromQuat(i,o)}let o=new Float64Array(3);N7.vec3.transformMat4(o,[0,0,-1],i);let s=new Float64Array(3);N7.vec3.transformMat4(s,[0,1,0],i),e.setDirectionOfProjection(...o),e.setViewUp(...s),e.modified()},e.computeClippingRange=e=>{let r=null,n=null;r=t.viewPlaneNormal,n=t.position;let a=-r[0],i=-r[1],o=-r[2],s=-(a*n[0]+i*n[1]+o*n[2]),l=[a*e[0]+i*e[2]+o*e[4]+s,1e-18];for(let t=0;t<2;t++)for(let r=0;r<2;r++)for(let n=0;n<2;n++){let u=a*e[n]+i*e[2+r]+o*e[4+t]+s;l[0]=u<l[0]?u:l[0],l[1]=u>l[1]?u:l[1]}return l}}(e,t)}var zh=Bh.newInstance(zd,"vtkCamera");function zp(e){let[t,r]=e;return N7.mat4.fromScaling(N7.mat4.create(),[t,r,1])}let zf=e=>{let[t,r]=e;if(V_(t,r))return[1,1];let n=Math.min(t,r);return[Math.round(t/n*1e10)/1e10,Math.round(r/n*1e10)/1e10]},zm={aspectRatio:[1,1]};function zg(e,t,r={}){let n;Object.assign(t,zm,r),zd(e,t,r),Bh.setGet(e,t,["aspectRatio"]),t.classHierarchy.push("extendedVtkCamera"),n=e.getProjectionMatrix,e.getProjectionMatrix=(e,r,a)=>{let i=n(e,r,a),[o,s]=zf(t.aspectRatio);if(1!==o||1!==s){let e=zp([o,s]);N7.mat4.multiply(i,e,i)}return i},e.getAspectRatio=()=>t.aspectRatio,e.setAspectRatio=e=>{t.aspectRatio=e}}let zy=Bh.newInstance(zg,"extendedVtkCamera"),zv={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4};var zb={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:zv,Scale:{LINEAR:0,LOG10:1}},zw={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:{DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5}};let{ScalarMappingTarget:zx,Scale:zC,VectorMode:zk}=zb,{VtkDataTypes:zM}=UX,{ColorMode:zS}=zw,{vtkErrorMacro:zE}=Bh;function zP(e){return e}function zI(e){return Math.floor(255*e+.5)}let zT={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:zk.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1,scale:zC.LINEAR};function z_(e,t,r={}){Object.assign(t,zT,r),Bh.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],Bh.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),Bh.setArray(e,t,["mappingRange"],2),Bh.getArray(e,t,["mappingRange"]),t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=()=>e.setVectorMode(zk.MAGNITUDE),e.setVectorModeToComponent=()=>e.setVectorMode(zk.COMPONENT),e.setVectorModeToRGBColors=()=>e.setVectorMode(zk.RGBCOLORS),e.build=()=>{},e.isOpaque=()=>!0,e.setAnnotations=(r,n)=>{if((!r||n)&&(r||!n)){if(r&&n&&r.length!==n.length)return void zE("Values and annotations do not have the same number of tuples so ignoring");if(t.annotationArray=[],n&&r){let e=n.length;for(let a=0;a<e;a++)t.annotationArray.push({value:r[a],annotation:String(n[a])})}e.updateAnnotatedValueMap(),e.modified()}},e.setAnnotation=(r,n)=>{let a=e.checkForAnnotatedValue(r),i=!1;return a>=0?t.annotationArray[a].annotation!==n&&(t.annotationArray[a].annotation=n,i=!0):(t.annotationArray.push({value:r,annotation:n}),a=t.annotationArray.length-1,i=!0),i&&(e.updateAnnotatedValueMap(),e.modified()),a},e.getNumberOfAnnotatedValues=()=>t.annotationArray.length,e.getAnnotatedValue=e=>e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value,e.getAnnotation=e=>void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation,e.getAnnotatedValueIndex=r=>t.annotationArray.length?e.checkForAnnotatedValue(r):-1,e.removeAnnotation=r=>{let n=e.checkForAnnotatedValue(r),a=n>=0;return a&&(t.annotationArray.splice(n,1),e.updateAnnotatedValueMap(),e.modified()),a},e.resetAnnotations=()=>{t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=(r,n)=>{if(t.indexedLookup){let t=e.getAnnotatedValueIndex(r);e.getIndexedColor(t,n)}else e.getColor(parseFloat(r),n),n[3]=1},e.checkForAnnotatedValue=t=>e.getAnnotatedValueIndexInternal(t),e.getAnnotatedValueIndexInternal=e=>{if(void 0!==t.annotatedValueMap[e]){let r=t.annotationArray.length;return t.annotatedValueMap[e]%r}return -1},e.getIndexedColor=(e,t)=>{t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=()=>{t.annotatedValueMap=[];let e=t.annotationArray.length;for(let r=0;r<e;r++)t.annotatedValueMap[t.annotationArray[r].value]=r},e.mapScalars=(t,r,n)=>{let a=t.getNumberOfComponents(),i=null;if(r===zS.DEFAULT&&(t.getDataType()===zM.UNSIGNED_CHAR||t.getDataType()===zM.UNSIGNED_CHAR_CLAMPED)||r===zS.DIRECT_SCALARS&&t)i=e.convertToRGBA(t,a,t.getNumberOfTuples());else{let r={type:"vtkDataArray",name:"temp",numberOfComponents:4,dataType:zM.UNSIGNED_CHAR},o=Bh.newTypedArray(r.dataType,4*t.getNumberOfTuples());r.values=o,r.size=o.length,i=UX.newInstance(r);let s=n;s<0&&a>1?e.mapVectorsThroughTable(t,i,zx.RGBA,-1,-1):(s<0&&(s=0),s>=a&&(s=a-1),e.mapScalarsThroughTable(t,i,zx.RGBA,s))}return i},e.mapVectorsToMagnitude=(e,t,r)=>{let n=e.getNumberOfTuples(),a=e.getNumberOfComponents(),i=t.getData(),o=e.getData();for(let e=0;e<n;e++){let t=0;for(let n=0;n<r;n++)t+=o[e*a+n]*o[e*a+n];i[e]=Math.sqrt(t)}},e.mapVectorsThroughTable=(t,r,n,a,i)=>{let o=e.getVectorMode(),s=i,l=a,u=t.getNumberOfComponents();o===zk.COMPONENT?(-1===l&&(l=e.getVectorComponent()),l<0&&(l=0),l>=u&&(l=u-1)):(-1===s&&(s=e.getVectorSize()),s<=0?(l=0,s=u):(l<0&&(l=0),l>=u&&(l=u-1),l+s>u&&(s=u-l)),o===zk.MAGNITUDE&&(1===u||1===s)&&(o=zk.COMPONENT));let c=0;switch(l>0&&(c=l),o){case zk.COMPONENT:e.mapScalarsThroughTable(t,r,n,c);break;case zk.RGBCOLORS:break;case zk.MAGNITUDE:default:{let a=UX.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,a,s),e.mapScalarsThroughTable(a,r,n,0)}}},e.luminanceToRGBA=(e,t,r,n)=>{let a=n(r),i=t.getData(),o=e.getData(),s=i.length,l=0;for(let e=0;e<s;e+=1){let t=n(i[e]);o[4*l]=t,o[4*l+1]=t,o[4*l+2]=t,o[4*l+3]=a,l++}},e.luminanceAlphaToRGBA=(e,t,r,n)=>{let a=t.getData(),i=e.getData(),o=a.length,s=0;for(let e=0;e<o;e+=2){let t=n(a[e]);i[s]=t,i[s+1]=t,i[s+2]=t,i[s+3]=n(a[e+1])*r,s+=4}},e.rGBToRGBA=(e,t,r,n)=>{let a=zI(r),i=t.getData(),o=e.getData(),s=i.length,l=0;for(let e=0;e<s;e+=3)o[4*l]=n(i[e]),o[4*l+1]=n(i[e+1]),o[4*l+2]=n(i[e+2]),o[4*l+3]=a,l++},e.rGBAToRGBA=(e,t,r,n)=>{let a=t.getData(),i=e.getData(),o=a.length,s=0;for(let e=0;e<o;e+=4)i[4*s]=n(a[e]),i[4*s+1]=n(a[e+1]),i[4*s+2]=n(a[e+2]),i[4*s+3]=n(a[e+3])*r,s++},e.convertToRGBA=(r,n,a)=>{let{alpha:i}=t;if(4===n&&i>=1&&r.getDataType()===zM.UNSIGNED_CHAR)return r;let o=UX.newInstance({numberOfComponents:4,empty:!0,size:4*a,dataType:zM.UNSIGNED_CHAR});if(a<=0)return o;i=(i=i>0?i:0)<1?i:1;let s=zP;switch((r.getDataType()===zM.FLOAT||r.getDataType()===zM.DOUBLE)&&(s=zI),n){case 1:e.luminanceToRGBA(o,r,i,s);break;case 2:e.luminanceAlphaToRGBA(o,r,s);break;case 3:e.rGBToRGBA(o,r,i,s);break;case 4:e.rGBAToRGBA(o,r,i,s);break;default:return zE("Cannot convert colors"),null}return o},e.usingLogScale=()=>!1,e.getNumberOfAvailableColors=()=>0x1000000,e.setRange=(t,r)=>e.setMappingRange(t,r),e.getRange=()=>e.getMappingRange(),e.areScalarsOpaque=(r,n,a)=>{if(!r)return e.isOpaque();let i=r.getNumberOfComponents();return(n!==zS.DEFAULT||r.getDataType()!==zM.UNSIGNED_CHAR)&&n!==zS.DIRECT_SCALARS||(3===i||1===i?t.alpha>=1:255===r.getRange(i-1)[0])}}var zD={newInstance:Bh.newInstance(z_,"vtkScalarsToColors"),extend:z_,...zb},zA={ColorSpace:{RGB:0,HSV:1,LAB:2,DIVERGING:3},Scale:{LINEAR:0,LOG10:1}};let{ColorSpace:zO,Scale:zR}=zA,{ScalarMappingTarget:zN}=zD,{vtkDebugMacro:zL,vtkErrorMacro:zV,vtkWarningMacro:zF}=Bh;function zj(e,t){let r=e[0],n=e[1],a=e[2],i=Math.sqrt(r*r+n*n+a*a),o=i>.001?Math.acos(r/i):0,s=o>.001?Math.atan2(a,n):0;t[0]=i,t[1]=o,t[2]=s}function zB(e,t){if(e[0]>=t-.1)return e[2];let r=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+r:e[2]-r}function zW(e,t,r,n){let a,i,o,s=[],l=[];Wd(t,s),Wd(r,l);let u=[],c=[];zj(s,u),zj(l,c);let d=e;if(u[1]>.05&&c[1]>.05&&function(e,t){let r=e-t;for(r<0&&(r=-r);r>=2*Math.PI;)r-=2*Math.PI;return r>Math.PI&&(r=2*Math.PI-r),r}(u[2],c[2])>.33*Math.PI){let t=Math.max(u[0],c[0]);t=Math.max(88,t),e<.5?(c[0]=t,c[1]=0,c[2]=0,d*=2):(u[0]=t,u[1]=0,u[2]=0,d=2*d-1)}u[1]<.05&&c[1]>.05?u[2]=zB(c,u[0]):c[1]<.05&&u[1]>.05&&(c[2]=zB(u,c[0]));let h=[];h[0]=(1-d)*u[0]+d*c[0],h[1]=(1-d)*u[1]+d*c[1],h[2]=(1-d)*u[2]+d*c[2];let p=[];a=h[0],i=h[1],o=h[2],p[0]=a*Math.cos(i),p[1]=a*Math.sin(i)*Math.cos(o),p[2]=a*Math.sin(i)*Math.sin(o),Wh(p,n)}let zU={clamping:!0,colorSpace:zO.RGB,hSVWrap:!0,scale:zR.LINEAR,nanColor:null,belowRangeColor:null,aboveRangeColor:null,useAboveRangeColor:!1,useBelowRangeColor:!1,allowDuplicateScalars:!1,table:null,tableSize:0,buildTime:null,nodes:null,discretize:!1,numberOfValues:256};function zz(e,t,r={}){Object.assign(t,zU,r),zD.extend(e,t,r),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},Bh.obj(t.buildTime),Bh.get(e,t,["buildTime","mappingRange"]),Bh.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","discretize","numberOfValues",{type:"enum",name:"colorSpace",enum:zO},{type:"enum",name:"scale",enum:zR}]),Bh.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),Bh.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=()=>t.nodes.length,e.addRGBPoint=(t,r,n,a)=>e.addRGBPointLong(t,r,n,a,.5,0),e.addRGBPointLong=(r,n,a,i,o=.5,s=0)=>{if(o<0||o>1)return zV("Midpoint outside range [0.0, 1.0]"),-1;if(s<0||s>1)return zV("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(r),t.nodes.push({x:r,r:n,g:a,b:i,midpoint:o,sharpness:s}),e.sortAndUpdateRange();let l=0;for(;l<t.nodes.length&&t.nodes[l].x!==r;l++);return l<t.nodes.length?l:-1},e.addHSVPoint=(t,r,n,a)=>e.addHSVPointLong(t,r,n,a,.5,0),e.addHSVPointLong=(t,r,n,a,i=.5,o=0)=>{let s=[];return Wo([r,n,a],s),e.addRGBPoint(t,s[0],s[1],s[2],i,o)},e.setNodes=r=>{if(t.nodes!==r){let n=JSON.stringify(t.nodes);t.nodes=r;let a=JSON.stringify(t.nodes);if(e.sortAndUpdateRange()||n!==a)return e.modified(),!0}return!1},e.sortAndUpdateRange=()=>{let r=JSON.stringify(t.nodes);t.nodes.sort((e,t)=>e.x-t.x);let n=JSON.stringify(t.nodes),a=e.updateRange();return a||r===n?a:(e.modified(),!0)},e.updateRange=()=>{let r=[2];r[0]=t.mappingRange[0],r[1]=t.mappingRange[1];let n=t.nodes.length;return n?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[n-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(r[0]!==t.mappingRange[0]||r[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=r=>{let n=0;for(;n<t.nodes.length&&t.nodes[n].x!==r;n++);let a=n;if(n>=t.nodes.length)return -1;let i=!1;return t.nodes.splice(n,1),(0===n||n===t.nodes.length)&&(i=e.updateRange()),i||e.modified(),a},e.movePoint=(r,n)=>{if(r!==n){e.removePoint(n);for(let a=0;a<t.nodes.length;a++)if(t.nodes[a].x===r){t.nodes[a].x=n,e.sortAndUpdateRange();break}}},e.removeAllPoints=()=>{t.nodes=[],e.sortAndUpdateRange()},e.addRGBSegment=(r,n,a,i,o,s,l,u)=>{e.sortAndUpdateRange();for(let e=0;e<t.nodes.length;)t.nodes[e].x>=r&&t.nodes[e].x<=o?t.nodes.splice(e,1):e++;e.addRGBPointLong(r,n,a,i,.5,0),e.addRGBPointLong(o,s,l,u,.5,0),e.modified()},e.addHSVSegment=(t,r,n,a,i,o,s,l)=>{let u=[],c=[];Wo([r,n,a],u),Wo([o,s,l],c),e.addRGBSegment(t,u[0],u[1],u[2],i,c[0],c[1],c[2])},e.mapValue=t=>{let r=[];return e.getColor(t,r),[Math.floor(255*r[0]+.5),Math.floor(255*r[1]+.5),Math.floor(255*r[2]+.5),255]},e.getColor=(r,n)=>{if(t.indexedLookup){let t=e.getSize(),a=e.getAnnotatedValueIndexInternal(r);if(a<0||0===t){let t=e.getNanColorByReference();n[0]=t[0],n[1]=t[1],n[2]=t[2]}else{let r=[];e.getNodeValue(a%t,r),n[0]=r[1],n[1]=r[2],n[2]=r[3]}return}e.getTable(r,r,1,n)},e.getRedValue=t=>{let r=[];return e.getColor(t,r),r[0]},e.getGreenValue=t=>{let r=[];return e.getColor(t,r),r[1]},e.getBlueValue=t=>{let r=[];return e.getColor(t,r),r[2]},e.logScaleEnabled=()=>t.scale===zR.LOG10,e.usingLogScale=()=>e.logScaleEnabled()&&t.mappingRange[0]>0,e.getTable=(r,n,a,i)=>{let o=e.usingLogScale(),s=o?Math.log10(Number(r)):Number(r),l=o?Math.log10(Number(n)):Number(n);if(Wx(s)||Wx(l)){for(let e=0;e<a;e++)i[3*e+0]=t.nanColor[0],i[3*e+1]=t.nanColor[1],i[3*e+2]=t.nanColor[2];return}let u=0,c=t.nodes.length,d=0,h=0,p=0;0!==c&&(d=t.nodes[c-1].r,h=t.nodes[c-1].g,p=t.nodes[c-1].b);let f=0,m=0,g=0,y=[0,0,0],v=[0,0,0],b=0,w=0,x=[],C=t.mappingRange;o&&(C=[Math.log10(t.mappingRange[0]),Math.log10(t.mappingRange[1])]);for(let r=0;r<a;r++){let n=3*r;if(f=a>1?s+r/(a-1)*(l-s):.5*(s+l),t.discretize){let e=C;if(f>=e[0]&&f<=e[1]){let r=t.numberOfValues,n=e[1]-e[0];if(r<=1)f=e[0]+n/2;else{let t=BP(r*((f-e[0])/n));f=e[0]+t/(r-1)*n}}}for(;u<c&&f>t.nodes[u].x;)++u<c&&(m=t.nodes[u-1].x,g=t.nodes[u].x,y[0]=t.nodes[u-1].r,v[0]=t.nodes[u].r,y[1]=t.nodes[u-1].g,v[1]=t.nodes[u].g,y[2]=t.nodes[u-1].b,v[2]=t.nodes[u].b,b=t.nodes[u-1].midpoint,w=t.nodes[u-1].sharpness,b<1e-5&&(b=1e-5),b>.99999&&(b=.99999));if(f>C[1])i[n]=0,i[n+1]=0,i[n+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(i[n]=t.aboveRangeColor[0],i[n+1]=t.aboveRangeColor[1],i[n+2]=t.aboveRangeColor[2]):(i[n]=d,i[n+1]=h,i[n+2]=p));else if(f<C[0]||Wb(f)&&f<0)i[n]=0,i[n+1]=0,i[n+2]=0,t.clamping&&(e.getUseBelowRangeColor()?(i[n]=t.belowRangeColor[0],i[n+1]=t.belowRangeColor[1],i[n+2]=t.belowRangeColor[2]):c>0&&(i[n]=t.nodes[0].r,i[n+1]=t.nodes[0].g,i[n+2]=t.nodes[0].b));else if(0===u&&(1e-6>Math.abs(f-s)||t.discretize))c>0?(i[n]=t.nodes[0].r,i[n+1]=t.nodes[0].g,i[n+2]=t.nodes[0].b):(i[n]=0,i[n+1]=0,i[n+2]=0);else{let e,r=0;if(r=(r=(f-m)/(g-m))<b?.5*r/b:.5+.5*(r-b)/(1-b),w>.99)if(r<.5){i[n]=y[0],i[n+1]=y[1],i[n+2]=y[2];continue}else{i[n]=v[0],i[n+1]=v[1],i[n+2]=v[2];continue}if(w<.01){if(t.colorSpace===zO.RGB)i[n]=(1-r)*y[0]+r*v[0],i[n+1]=(1-r)*y[1]+r*v[1],i[n+2]=(1-r)*y[2]+r*v[2];else if(t.colorSpace===zO.HSV){let e=[],a=[];Wi(y,e),Wi(v,a),t.hSVWrap&&(e[0]-a[0]>.5||a[0]-e[0]>.5)&&(e[0]>a[0]?e[0]-=1:a[0]-=1);let o=[];o[0]=(1-r)*e[0]+r*a[0],o[0]<0&&(o[0]+=1),o[1]=(1-r)*e[1]+r*a[1],o[2]=(1-r)*e[2]+r*a[2],Wo(o,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]}else if(t.colorSpace===zO.LAB){let e=[],t=[];Wd(y,e),Wd(v,t);let a=[];a[0]=(1-r)*e[0]+r*t[0],a[1]=(1-r)*e[1]+r*t[1],a[2]=(1-r)*e[2]+r*t[2],Wh(a,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]}else t.colorSpace===zO.DIVERGING?(zW(r,y,v,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]):zV("ColorSpace set to invalid value.",t.colorSpace);continue}r<.5?r=.5*(2*r)**(1+10*w):r>.5&&(r=1-.5*((1-r)*2)**(1+10*w));let a=r*r,o=a*r,s=2*o-3*a+1,l=-2*o+3*a,u=o-2*a+r,c=o-a;if(t.colorSpace===zO.RGB)for(let t=0;t<3;t++)e=(1-w)*(v[t]-y[t]),i[n+t]=s*y[t]+l*v[t]+u*e+c*e;else if(t.colorSpace===zO.HSV){let r=[],a=[];Wi(y,r),Wi(v,a),t.hSVWrap&&(r[0]-a[0]>.5||a[0]-r[0]>.5)&&(r[0]>a[0]?r[0]-=1:a[0]-=1);let o=[];for(let t=0;t<3;t++)e=(1-w)*(a[t]-r[t]),o[t]=s*r[t]+l*a[t]+u*e+c*e,0===t&&o[t]<0&&(o[t]+=1);Wo(o,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]}else if(t.colorSpace===zO.LAB){let t=[],r=[];Wd(y,t),Wd(v,r);let a=[];for(let n=0;n<3;n++)e=(1-w)*(r[n]-t[n]),a[n]=s*t[n]+l*r[n]+u*e+c*e;Wh(a,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]}else t.colorSpace===zO.DIVERGING?(zW(r,y,v,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]):zV("ColorSpace set to invalid value.");for(let e=0;e<3;e++)i[n+e]=i[n+e]<0?0:i[n+e],i[n+e]=i[n+e]>1?1:i[n+e]}}},e.getUint8Table=(r,n,a,i=!1)=>{if(e.getMTime()<=t.buildTime&&t.tableSize===a&&t.tableWithAlpha!==i)return t.table;if(0===t.nodes.length)return zV("Attempting to lookup a value with no points in the function"),t.table;let o=i?4:3;(t.tableSize!==a||t.tableWithAlpha!==i)&&(t.table=new Uint8Array(a*o),t.tableSize=a,t.tableWithAlpha=i);let s=[];e.getTable(r,n,a,s);for(let e=0;e<a;e++)t.table[e*o+0]=Math.floor(255*s[3*e+0]+.5),t.table[e*o+1]=Math.floor(255*s[3*e+1]+.5),t.table[e*o+2]=Math.floor(255*s[3*e+2]+.5),i&&(t.table[e*o+3]=255);return t.buildTime.modified(),t.table},e.buildFunctionFromArray=r=>{e.removeAllPoints();let n=r.getNumberOfComponents();for(let e=0;e<r.getNumberOfTuples();e++)switch(n){case 3:t.nodes.push({x:e,r:r.getComponent(e,0),g:r.getComponent(e,1),b:r.getComponent(e,2),midpoint:.5,sharpness:0});break;case 4:t.nodes.push({x:r.getComponent(e,0),r:r.getComponent(e,1),g:r.getComponent(e,2),b:r.getComponent(e,3),midpoint:.5,sharpness:0});break;case 5:t.nodes.push({x:e,r:r.getComponent(e,0),g:r.getComponent(e,1),b:r.getComponent(e,2),midpoint:r.getComponent(e,4),sharpness:r.getComponent(e,5)});break;case 6:t.nodes.push({x:r.getComponent(e,0),r:r.getComponent(e,1),g:r.getComponent(e,2),b:r.getComponent(e,3),midpoint:r.getComponent(e,4),sharpness:r.getComponent(e,5)})}e.sortAndUpdateRange()},e.buildFunctionFromTable=(r,n,a,i)=>{let o=0;e.removeAllPoints(),a>1&&(o=(n-r)/(a-1));for(let e=0;e<a;e++){let n={x:r+o*e,r:i[3*e],g:i[3*e+1],b:i[3*e+2],sharpness:0,midpoint:.5};t.nodes.push(n)}e.sortAndUpdateRange()},e.getNodeValue=(e,r)=>e<0||e>=t.nodes.length?(zV("Index out of range!"),-1):(r[0]=t.nodes[e].x,r[1]=t.nodes[e].r,r[2]=t.nodes[e].g,r[3]=t.nodes[e].b,r[4]=t.nodes[e].midpoint,r[5]=t.nodes[e].sharpness,1),e.setNodeValue=(r,n)=>{if(r<0||r>=t.nodes.length)return zV("Index out of range!"),-1;let a=t.nodes[r].x;return t.nodes[r].x=n[0],t.nodes[r].r=n[1],t.nodes[r].g=n[2],t.nodes[r].b=n[3],t.nodes[r].midpoint=n[4],t.nodes[r].sharpness=n[5],a!==n[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=()=>t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:Math.max(4094,t.nodes?.length??0),e.getIndexedColor=(t,r)=>{let n=e.getSize();if(n>0&&t>=0){let a=[];e.getNodeValue(t%n,a);for(let e=0;e<3;++e)r[e]=a[e+1];r[3]=1;return}let a=e.getNanColorByReference();r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=1},e.fillFromDataPointer=(t,r)=>{if(!(t<=0)&&r){e.removeAllPoints();for(let n=0;n<t;n++)e.addRGBPoint(r[4*n],r[4*n+1],r[4*n+2],r[4*n+3])}},e.setMappingRange=(r,n)=>{let a=[r,n],i=[r,n],o=e.getRange(),s=e.logScaleEnabled();if(o[1]===a[1]&&o[0]===a[0])return;if(a[1]===a[0])return void zV("attempt to set zero width color range");s&&(a[0]<=0?console.warn("attempt to set log scale color range with non-positive minimum"):(i[0]=Math.log10(a[0]),i[1]=Math.log10(a[1])));let l=(i[1]-i[0])/(o[1]-o[0]),u=i[0]-o[0]*l;for(let e=0;e<t.nodes.length;++e)t.nodes[e].x=t.nodes[e].x*l+u;t.mappingRange[0]=a[0],t.mappingRange[1]=a[1],e.modified()},e.adjustRange=r=>{let n=e.getRange(),a=[];n[0]<r[0]?e.getColor(r[0],a):e.getColor(n[0],a),e.addRGBPoint(r[0],a[0],a[1],a[2]),n[1]>r[1]?e.getColor(r[1],a):e.getColor(n[1],a),e.addRGBPoint(r[1],a[0],a[1],a[2]),e.sortAndUpdateRange();for(let e=0;e<t.nodes.length;)t.nodes[e].x>=r[0]&&t.nodes[e].x<=r[1]?t.nodes.splice(e,1):++e;return 1},e.estimateMinNumberOfSamples=(t,r)=>Math.ceil((r-t)/e.findMinimumXDistance()),e.findMinimumXDistance=()=>{if(t.nodes.length<2)return -1;let e=Number.MAX_VALUE;for(let r=0;r<t.nodes.length-1;r++){let n=t.nodes[r+1].x-t.nodes[r].x;n<e&&(e=n)}return e},e.mapScalarsThroughTable=(r,n,a,i)=>{0===e.getSize()?zL("Transfer Function Has No Points!"):t.indexedLookup?e.mapDataIndexed(r,n,a,i):e.mapData(r,n,a,i)},e.mapData=(t,r,n,a)=>{if(0===e.getSize())return void zF("Transfer Function Has No Points!");let i=Math.floor(255*e.getAlpha()+.5),o=t.getNumberOfTuples(),s=t.getNumberOfComponents(),l=r.getData(),u=t.getData(),c=[];if(n===zN.RGBA)for(let t=0;t<o;t++){let r=u[t*s+a];e.getColor(r,c),l[4*t]=Math.floor(255*c[0]+.5),l[4*t+1]=Math.floor(255*c[1]+.5),l[4*t+2]=Math.floor(255*c[2]+.5),l[4*t+3]=i}if(n===zN.RGB)for(let t=0;t<o;t++){let r=u[t*s+a];e.getColor(r,c),l[3*t]=Math.floor(255*c[0]+.5),l[3*t+1]=Math.floor(255*c[1]+.5),l[3*t+2]=Math.floor(255*c[2]+.5)}if(n===zN.LUMINANCE)for(let t=0;t<o;t++){let r=u[t*s+a];e.getColor(r,c),l[t]=Math.floor(76.5*c[0]+150.45*c[1]+28.05*c[2]+.5)}if(n===zN.LUMINANCE_ALPHA)for(let t=0;t<o;t++){let r=u[t*s+a];e.getColor(r,c),l[2*t]=Math.floor(76.5*c[0]+150.45*c[1]+28.05*c[2]+.5),l[2*t+1]=i}},e.applyColorMap=r=>{let n=JSON.stringify(t.colorSpace);r.ColorSpace&&(t.colorSpace=zO[r.ColorSpace.toUpperCase()],void 0===t.colorSpace&&(zV(`ColorSpace ${r.ColorSpace} not supported, using RGB instead`),t.colorSpace=zO.RGB));let a=n!==JSON.stringify(t.colorSpace),i=a||JSON.stringify(t.nanColor);if(r.NanColor)for(t.nanColor=[].concat(r.NanColor);t.nanColor.length<4;)t.nanColor.push(1);let o=(a=a||i!==JSON.stringify(t.nanColor))||JSON.stringify(t.nodes);if(r.RGBPoints){let e=r.RGBPoints.length;t.nodes=[];for(let n=0;n<e;n+=4)t.nodes.push({x:r.RGBPoints[n],r:r.RGBPoints[n+1],g:r.RGBPoints[n+2],b:r.RGBPoints[n+3],midpoint:.5,sharpness:0})}let s=e.sortAndUpdateRange(),l=!s&&(a||o!==JSON.stringify(t.nodes));return l&&e.modified(),s||l}}var zH={newInstance:Bh.newInstance(zz,"vtkColorTransferFunction"),extend:zz,...zA},zG={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}};let zq={clippingPlanes:[]};var z$=function(e,t,r={}){Object.assign(t,zq,r),Bh.obj(e,t),Bh.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),t.classHierarchy.push("vtkAbstractMapper"),e.update=()=>{e.getInputData()},e.addClippingPlane=r=>!!r.isA("vtkPlane")&&!t.clippingPlanes.includes(r)&&(t.clippingPlanes.push(r),e.modified(),!0),e.getNumberOfClippingPlanes=()=>t.clippingPlanes.length,e.removeAllClippingPlanes=()=>0!==t.clippingPlanes.length&&(t.clippingPlanes.length=0,e.modified(),!0),e.removeClippingPlane=r=>{let n=t.clippingPlanes.indexOf(r);return -1!==n&&(t.clippingPlanes.splice(n,1),e.modified(),!0)},e.getClippingPlanes=()=>t.clippingPlanes,e.setClippingPlanes=t=>{if(t)if(Array.isArray(t)){let r=t.length;for(let n=0;n<r&&n<6;n++)e.addClippingPlane(t[n])}else e.addClippingPlane(t)},e.getClippingPlaneInDataCoords=(e,r,n)=>{let a=t.clippingPlanes;if(a){let t=a.length;if(r>=0&&r<t){let t=a[r],i=t.getNormal(),o=t.getOrigin(),s=i[0],l=i[1],u=i[2],c=-(s*o[0]+l*o[1]+u*o[2]);n[0]=s*e[0]+l*e[4]+u*e[8]+c*e[12],n[1]=s*e[1]+l*e[5]+u*e[9]+c*e[13],n[2]=s*e[2]+l*e[6]+u*e[10]+c*e[14],n[3]=s*e[3]+l*e[7]+u*e[11]+c*e[15];return}}Bh.vtkErrorMacro(`Clipping plane index ${r} is out of range.`)}},zK=function(e,t,r={}){let n,a;Object.assign(t,{bounds:[...UL],center:[0,0,0],viewSpecificProperties:{},...r}),z$(e,t,r),Bh.setGet(e,t,["viewSpecificProperties"]),Bh.getArray(e,t,["bounds"],6),e.computeBounds=()=>{Bh.vtkErrorMacro("vtkAbstractMapper3D.computeBounds - NOT IMPLEMENTED")},n=e.getBounds,e.getBounds=()=>(e.computeBounds(),n()),a=e.getBoundsByReference,e.getBoundsByReference=()=>(e.computeBounds(),a()),e.getCenter=()=>{let r=e.getBoundsByReference();return t.center=Ug(r)?Uk(r):null,t.center?.slice()},e.getLength=()=>{let t=e.getBoundsByReference();return UE(t)}};let zY={slice:0,customDisplayExtent:[0,0,0,0,0,0],useCustomExtents:!1,backgroundColor:[0,0,0,1],colorTextureWidth:1024,opacityTextureWidth:1024,labelOutlineTextureWidth:1024};var zX=function(e,t,r={}){Object.assign(t,zY,r),zK(e,t,r),Bh.setGet(e,t,["slice","useCustomExtents","colorTextureWidth","opacityTextureWidth","labelOutlineTextureWidth"]),Bh.setGetArray(e,t,["customDisplayExtent"],6),Bh.setGetArray(e,t,["backgroundColor"],4),t.classHierarchy.push("vtkAbstractImageMapper"),e.getIsOpaque=()=>!0,e.getCurrentImage=()=>null,e.getBoundsForSlice=()=>(Bh.vtkErrorMacro("vtkAbstractImageMapper.getBoundsForSlice - NOT IMPLEMENTED"),WC())};function zZ(e,t,r){let n=r.getCurrentImage(),a=n.getExtent(),i=[a[0],a[2],a[4]],{ijkMode:o}=r.getClosestIJKAxis(),s=r.isA("vtkImageArrayMapper")?r.getSubSlice():r.getSlice();o!==r.getSlicingMode()&&(s=r.getSliceAtPosition(s)),i[o]+=s;let l=[0,0,0];n.indexToWorld(i,l),i[o]+=1;let u=[0,0,0];n.indexToWorld(i,u),u[0]-=l[0],u[1]-=l[1],u[2]-=l[2],N7.vec3.normalize(u,u);let c=Wj.intersectWithLine(e,t,l,u);if(c.intersection){let e=c.x,t=[0,0,0];return n.worldToIndex(e,t),{t:c.t,absoluteIJK:t}}return null}let zJ={Off:0,PolygonOffset:1},zQ=zJ.PolygonOffset,z1=zJ.Off,z0=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function z2(e=0){let t=z1===e;return z1=e,t}var z5={Resolve:zJ,getResolveCoincidentTopologyAsString:function(){return z0[z1]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return zQ},getResolveCoincidentTopology:function(){return z1},setResolveCoincidentTopology:z2,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){let t=zQ===e;return zQ=e,t},setResolveCoincidentTopologyToDefault:function(){return z2(zJ.Off)},setResolveCoincidentTopologyToOff:function(){return z2(zJ.Off)},setResolveCoincidentTopologyToPolygonOffset:function(){return z2(zJ.PolygonOffset)}};function z3(e,t,r){r.forEach(r=>{e[`get${r.method}`]=()=>t[r.key],e[`set${r.method}`]=Bh.objectSetterMap.object(e,t,{name:r.key,params:["factor","offset"]})})}let z4=["Polygon","Line","Point"],z8={modified:()=>void 0};z3(z8,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},z4.map(e=>({key:e,method:`ResolveCoincidentTopology${e}OffsetParameters`})));var z6={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),Bh.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(z5).forEach(t=>{e[t]=z5[t]}),Object.keys(z8).filter(e=>"modified"!==e).forEach(t=>{e[t]=z8[t]}),z3(e,t.topologyOffset,z4.map(e=>({key:e,method:`RelativeCoincidentTopology${e}OffsetParameters`}))),e.getCoincidentTopologyPolygonOffsetParameters=()=>{let t=z8.getResolveCoincidentTopologyPolygonOffsetParameters(),r=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+r.factor,offset:t.offset+r.offset}},e.getCoincidentTopologyLineOffsetParameters=()=>{let t=z8.getResolveCoincidentTopologyLineOffsetParameters(),r=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+r.factor,offset:t.offset+r.offset}},e.getCoincidentTopologyPointOffsetParameter=()=>{let t=z8.getResolveCoincidentTopologyPointOffsetParameters(),r=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+r.factor,offset:t.offset+r.offset}}},staticOffsetAPI:z8,otherStaticMethods:z5,CATEGORIES:z4,Resolve:zJ};let{staticOffsetAPI:z9,otherStaticMethods:z7}=z6,{SlicingMode:He}=zG,Ht={slicingMode:He.NONE,closestIJKAxis:{ijkMode:He.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1,preferSizeOverAccuracy:!1};function Hr(e,t,r={}){Object.assign(t,Ht,r),zX(e,t,r),Bh.get(e,t,["slicingMode"]),Bh.setGet(e,t,["closestIJKAxis","renderToRectangle","sliceAtFocalPoint","preferSizeOverAccuracy"]),z6.implementCoincidentTopologyMethods(e,t);var n=t;function a(){let t;switch(n.slicingMode){case He.X:t=0;break;case He.Y:t=1;break;case He.Z:t=2;break;default:n.closestIJKAxis={ijkMode:n.slicingMode,flip:!1};return}let r=Wk(e.getCurrentImage().getDirection()),a=0;for(;a<3&&0===r[t+3*a];++a);let i=r[t+3*a]<0;n.closestIJKAxis={ijkMode:a,flip:i}}n.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=t=>{let r,a=e.getCurrentImage();if(3===t.length)r=t;else if(Number.isFinite(t)){let e=a.getBounds();switch(n.slicingMode){case He.X:r=[t,(e[3]+e[2])/2,(e[5]+e[4])/2];break;case He.Y:r=[(e[1]+e[0])/2,t,(e[5]+e[4])/2];break;case He.Z:r=[(e[1]+e[0])/2,(e[3]+e[2])/2,t]}}let i=[0,0,0];a.worldToIndex(r,i);let o=a.getExtent(),{ijkMode:s}=e.getClosestIJKAxis(),l=0;switch(s){case He.I:l=Wm(i[0],o[0],o[1]);break;case He.J:l=Wm(i[1],o[2],o[3]);break;case He.K:l=Wm(i[2],o[4],o[5]);break;default:return 0}return l},e.setSliceFromCamera=t=>{let r=t.getFocalPoint();switch(n.slicingMode){case He.I:case He.J:case He.K:{let t=e.getSliceAtPosition(r);e.setSlice(t)}break;case He.X:e.setSlice(r[0]);break;case He.Y:e.setSlice(r[1]);break;case He.Z:e.setSlice(r[2])}},e.setXSlice=t=>{e.setSlicingMode(He.X),e.setSlice(t)},e.setYSlice=t=>{e.setSlicingMode(He.Y),e.setSlice(t)},e.setZSlice=t=>{e.setSlicingMode(He.Z),e.setSlice(t)},e.setISlice=t=>{e.setSlicingMode(He.I),e.setSlice(t)},e.setJSlice=t=>{e.setSlicingMode(He.J),e.setSlice(t)},e.setKSlice=t=>{e.setSlicingMode(He.K),e.setSlice(t)},e.getSlicingModeNormal=()=>{let t=[0,0,0],r=e.getCurrentImage().getDirection();switch(n.slicingMode){case He.X:t[0]=1;break;case He.Y:t[1]=1;break;case He.Z:t[2]=1;break;case He.I:BX(r,[1,0,0],t);break;case He.J:BX(r,[0,1,0],t);break;case He.K:BX(r,[0,0,1],t)}return t},e.setSlicingMode=t=>{n.slicingMode!==t&&(n.slicingMode=t,e.getCurrentImage()&&a(),e.modified())},e.getClosestIJKAxis=()=>((void 0===n.closestIJKAxis||n.closestIJKAxis.ijkMode===He.NONE)&&e.getCurrentImage()&&a(),n.closestIJKAxis),e.computeBounds=()=>{let t=e.getCurrentImage();if(!t)return void Uv(n.bounds);if(!n.useCustomExtents)return void Uy(n.bounds,t.getBounds());let r=n.customDisplayExtent.slice(),{ijkMode:a}=e.getClosestIJKAxis(),i=n.slice;switch(a!==n.slicingMode&&(i=e.getSliceAtPosition(n.slice)),a){case He.I:r[0]=i,r[1]=i;break;case He.J:r[2]=i,r[3]=i;break;case He.K:r[4]=i,r[5]=i}Uy(n.bounds,t.extentToBounds(r))},e.getBoundsForSlice=(t=n.slice,r=0)=>{let a=e.getCurrentImage();if(!a)return WC();let i=a.getSpatialExtent(),{ijkMode:o}=e.getClosestIJKAxis(),s=t;switch(o!==n.slicingMode&&(s=e.getSliceAtPosition(t)),o){case He.I:i[0]=s-r,i[1]=s+r;break;case He.J:i[2]=s-r,i[3]=s+r;break;case He.K:i[4]=s-r,i[5]=s+r}return a.extentToBounds(i)},e.intersectWithLineForPointPicking=(t,r)=>(function(e,t,r){let n=zZ(e,t,r);if(n){let e=r.getCurrentImage().getExtent(),t=[Math.round(n.absoluteIJK[0]),Math.round(n.absoluteIJK[1]),Math.round(n.absoluteIJK[2])];return t[0]<e[0]||t[0]>e[1]||t[1]<e[2]||t[1]>e[3]||t[2]<e[4]||t[2]>e[5]?null:{t:n.t,ijk:t}}return null})(t,r,e),e.intersectWithLineForCellPicking=(t,r)=>(function(e,t,r){let n=zZ(e,t,r);if(n){let e=r.getCurrentImage().getExtent(),t=n.absoluteIJK,a=[Math.floor(t[0]),Math.floor(t[1]),Math.floor(t[2])];if(a[0]<e[0]||a[0]>e[1]-1||a[1]<e[2]||a[1]>e[3]-1||a[2]<e[4]||a[2]>(e[5]?e[5]-1:e[5]))return null;let i=[t[0]-a[0],t[1]-a[1],t[2]-a[2]];return{t:n.t,ijk:a,pCoords:i}}return null})(t,r,e),e.getCurrentImage=()=>e.getInputData()}var Hn={newInstance:Bh.newInstance(Hr,"vtkImageMapper"),extend:Hr,...z9,...z7,...zG},Ha={CoordinateSystem:{DISPLAY:0,WORLD:1}};let{CoordinateSystem:Hi}=Ha;function Ho(e){return()=>Bh.vtkErrorMacro(`vtkProp::${e} - NOT IMPLEMENTED`)}let Hs={allocatedRenderTime:10,coordinateSystem:Hi.WORLD,dragable:!0,estimatedRenderTime:0,paths:null,pickable:!0,renderTimeMultiplier:1,savedEstimatedRenderTime:0,textures:[],useBounds:!0,visibility:!0};function Hl(e,t,r={}){Object.assign(t,Hs,r),Bh.obj(e,t),Bh.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),Bh.setGet(e,t,["_parentProp","coordinateSystem","dragable","pickable","renderTimeMultiplier","useBounds","visibility"]),Bh.moveToProtected(e,t,["parentProp"]),t.classHierarchy.push("vtkProp"),e.getMTime=()=>{let e=t.mtime;for(let r=0;r<t.textures.length;++r){let n=t.textures[r].getMTime();n>e&&(e=n)}return e},e.processSelectorPixelBuffers=(e,t)=>{},e.getNestedProps=()=>null,e.getActors=()=>[],e.getActors2D=()=>[],e.getVolumes=()=>[],e.pick=Ho("pick"),e.hasKey=Ho("hasKey"),e.getNestedVisibility=()=>t.visibility&&(!t._parentProp||t._parentProp.getNestedVisibility()),e.getNestedPickable=()=>t.pickable&&(!t._parentProp||t._parentProp.getNestedPickable()),e.getNestedDragable=()=>t.dragable&&(!t._parentProp||t._parentProp.getNestedDragable()),e.getRedrawMTime=()=>t.mtime,e.setEstimatedRenderTime=e=>{t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=()=>{t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=e=>{t.estimatedRenderTime+=e},e.setAllocatedRenderTime=e=>{t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=()=>!1,e.getTextures=()=>t.textures,e.hasTexture=e=>-1!==t.textures.indexOf(e),e.addTexture=r=>{r&&!e.hasTexture(r)&&(t.textures=t.textures.concat(r),e.modified())},e.removeTexture=r=>{let n=t.textures.filter(e=>e!==r);t.textures.length!==n.length&&(t.textures=n,e.modified())},e.removeAllTextures=()=>{t.textures=[],e.modified()},e.setCoordinateSystemToWorld=()=>e.setCoordinateSystem(Hi.WORLD),e.setCoordinateSystemToDisplay=()=>e.setCoordinateSystem(Hi.DISPLAY)}var Hu={newInstance:Bh.newInstance(Hl,"vtkProp"),extend:Hl,...Ha};let Hc={bounds:[...UL],origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],properties:[],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function Hd(e,t,r={}){let n,a;Object.assign(t,Hc,r),Hu.extend(e,t,r),t.matrixMTime={},Bh.obj(t.matrixMTime),Bh.get(e,t,["isIdentity"]),Bh.getArray(e,t,["orientation"]),Bh.setGetArray(e,t,["origin","position","scale"],3),Bh.setGet(e,t,["properties"]),Bh.getArray(e,t,["bounds"],6),t.matrix=N7.mat4.identity(new Float64Array(16)),t.rotation=N7.mat4.identity(new Float64Array(16)),t.userMatrix=N7.mat4.identity(new Float64Array(16)),t.transform=null,t.classHierarchy.push("vtkProp3D"),e.addPosition=r=>{t.position=t.position.map((e,t)=>e+r[t]),e.modified()},e.getOrientationWXYZ=()=>{let e=N7.quat.create();N7.mat4.getRotation(e,t.rotation);let r=new Float64Array(3);return[BS(N7.quat.getAxisAngle(r,e)),r[0],r[1],r[2]]},e.getOrientationQuaternion=(e=[])=>N7.mat4.getRotation(e,t.rotation),e.rotateX=r=>{0!==r&&(N7.mat4.rotateX(t.rotation,t.rotation,BM(r)),e.modified())},e.rotateY=r=>{0!==r&&(N7.mat4.rotateY(t.rotation,t.rotation,BM(r)),e.modified())},e.rotateZ=r=>{0!==r&&(N7.mat4.rotateZ(t.rotation,t.rotation,BM(r)),e.modified())},e.rotateWXYZ=(r,n,a,i)=>{if(0===r||0===n&&0===a&&0===i)return;let o=BM(r),s=N7.quat.create();N7.quat.setAxisAngle(s,[n,a,i],o);let l=new Float64Array(16);N7.mat4.fromQuat(l,s),N7.mat4.multiply(t.rotation,t.rotation,l),e.modified()},e.rotateQuaternion=r=>{if(Math.abs(r[3])>=.999999)return;let n=N7.mat4.fromQuat(new Float64Array(16),r);N7.mat4.multiply(t.rotation,t.rotation,n),e.modified()},e.setOrientation=(r,n,a)=>(r!==t.orientation[0]||n!==t.orientation[1]||a!==t.orientation[2])&&(t.orientation=[r,n,a],N7.mat4.identity(t.rotation),e.rotateZ(a),e.rotateX(r),e.rotateY(n),e.modified(),!0),e.setOrientationFromQuaternion=r=>{let n=N7.mat4.create();return N7.mat4.fromQuat(n,r),!B1(n,t.rotation)&&(t.rotation=n,e.modified(),!0)},e.setUserMatrix=r=>!B1(t.userMatrix,r)&&(N7.mat4.copy(t.userMatrix,r),e.modified(),!0),e.getMatrix=()=>(e.computeMatrix(),t.matrix),e.computeMatrix=()=>{if(e.getMTime()>t.matrixMTime.getMTime()){N7.mat4.identity(t.matrix),t.userMatrix&&N7.mat4.multiply(t.matrix,t.matrix,t.userMatrix),N7.mat4.translate(t.matrix,t.matrix,t.origin),N7.mat4.translate(t.matrix,t.matrix,t.position),N7.mat4.multiply(t.matrix,t.matrix,t.rotation),N7.mat4.scale(t.matrix,t.matrix,t.scale),N7.mat4.translate(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),N7.mat4.transpose(t.matrix,t.matrix),t.isIdentity=!0;for(let e=0;e<4;++e)for(let r=0;r<4;++r)+(e===r)!==t.matrix[e+4*r]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.computeBounds=()=>{if(null===t.mapper)return void Uv(t.bounds);let r=t.mapper.getBounds();if(!r||6!==r.length||!Ug(r)){t.mapperBounds=r,Uv(t.bounds),t.boundsMTime.modified();return}if(!t.mapperBounds||!r.every((e,n)=>r[n]===t.mapperBounds[n])||e.getMTime()>t.boundsMTime.getMTime()){Bh.vtkDebugMacro("Recomputing bounds..."),t.mapperBounds=r,e.computeMatrix();let n=new Float64Array(16);N7.mat4.transpose(n,t.matrix),UO(r,n,t.bounds),t.boundsMTime.modified()}},n=e.getBounds,e.getBounds=()=>(e.computeBounds(),n()),a=e.getBoundsByReference,e.getBoundsByReference=()=>(e.computeBounds(),a()),e.getCenter=()=>Uk(e.getBoundsByReference()),e.getLength=()=>UM(e.getBoundsByReference()),e.getXRange=()=>UI(e.getBoundsByReference()),e.getYRange=()=>UT(e.getBoundsByReference()),e.getZRange=()=>U_(e.getBoundsByReference()),e.getUserMatrix=()=>t.userMatrix,e.onModified(function(){e.computeMatrix()}),e.getProperty=(r=0)=>(null==t.properties[r]&&(t.properties[r]=e.makeProperty?.()),t.properties[r]),e.getProperties=()=>(0===t.properties.length&&(t.properties[0]=e.makeProperty?.()),t.properties),e.setProperty=(e,r)=>{let[n,a]=Number.isInteger(e)?[e,r]:[0,e];return t.properties[n]!==a&&(t.properties[n]=a,!0)},e.getMTime=()=>{let e=t.mtime;return t.properties.forEach(t=>{if(null!==t){let r=t.getMTime();e=r>e?r:e}}),e}}Bh.newInstance(Hd,"vtkProp3D");let Hh={NEAREST:0,LINEAR:1},{InterpolationType:Hp}={InterpolationType:Hh},{vtkErrorMacro:Hf}=Bh;var Hm=Bh.newInstance(function(e,t,r={}){if(Object.assign(t,{independentComponents:!1,interpolationType:Hp.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1,useLookupTableScalarRange:!1,useLabelOutline:!1,labelOutlineThickness:[1],labelOutlineOpacity:1,updatedExtents:[],...r}),Bh.obj(e,t),!t.componentData){t.componentData=[];for(let e=0;e<4;e++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}Bh.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity","useLookupTableScalarRange","useLabelOutline","labelOutlineOpacity","updatedExtents"]),Bh.setGetArray(e,t,["labelOutlineThickness"]),t.classHierarchy.push("vtkImageProperty"),e.getMTime=()=>{let e,r=t.mtime;for(let n=0;n<4;n++)t.componentData[n].rGBTransferFunction&&(r=r>(e=t.componentData[n].rGBTransferFunction.getMTime())?r:e),t.componentData[n].piecewiseFunction&&(r=r>(e=t.componentData[n].piecewiseFunction.getMTime())?r:e);return r},e.setRGBTransferFunction=(r=0,n=null)=>{let a=r,i=n;return Number.isInteger(r)||(i=r,a=0),t.componentData[a].rGBTransferFunction!==i&&(t.componentData[a].rGBTransferFunction=i,e.modified(),!0)},e.getRGBTransferFunction=(e=0)=>t.componentData[e].rGBTransferFunction,e.setPiecewiseFunction=(r=0,n=null)=>{let a=r,i=n;return Number.isInteger(r)||(i=r,a=0),t.componentData[a].piecewiseFunction!==i&&(t.componentData[a].piecewiseFunction=i,e.modified(),!0)},e.getPiecewiseFunction=(e=0)=>t.componentData[e].piecewiseFunction,e.setScalarOpacity=(t=0,r=null)=>{let n=t,a=r;return Number.isInteger(t)||(a=t,n=0),e.setPiecewiseFunction(n,a)},e.getScalarOpacity=(t=0)=>e.getPiecewiseFunction(t),e.setComponentWeight=(r=0,n=1)=>{if(r<0||r>=4)return Hf("Invalid index"),!1;let a=Math.min(1,Math.max(0,n));return t.componentData[r].componentWeight!==a&&(t.componentData[r].componentWeight=a,e.modified(),!0)},e.getComponentWeight=(e=0)=>e<0||e>=4?(Hf("Invalid index"),0):t.componentData[e].componentWeight,e.setInterpolationTypeToNearest=()=>e.setInterpolationType(Hp.NEAREST),e.setInterpolationTypeToLinear=()=>e.setInterpolationType(Hp.LINEAR),e.getInterpolationTypeAsString=()=>Bh.enumToString(Hp,t.interpolationType)},"vtkImageProperty");let Hg={mapper:null,forceOpaque:!1,forceTranslucent:!1};var Hy=Bh.newInstance(function(e,t,r={}){Object.assign(t,Hg,r),Hd(e,t,r),t.boundsMTime={},Bh.obj(t.boundsMTime),Bh.setGet(e,t,["mapper","forceOpaque","forceTranslucent"]),t.classHierarchy.push("vtkImageSlice"),e.getActors=()=>e,e.getImages=()=>e,e.getIsOpaque=()=>{if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.properties[0]||e.getProperty();let r=t.properties[0].getOpacity()>=1;return r&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=()=>!1,e.makeProperty=Hm,e.getBoundsForSlice=(r,n)=>{let a=t.mapper.getBoundsForSlice(r,n);if(!Ug(a))return a;e.computeMatrix();let i=new Float64Array(16);return N7.mat4.transpose(i,t.matrix),UO(a,i)},e.getMinXBound=()=>e.getBoundsByReference()[0],e.getMaxXBound=()=>e.getBoundsByReference()[1],e.getMinYBound=()=>e.getBoundsByReference()[2],e.getMaxYBound=()=>e.getBoundsByReference()[3],e.getMinZBound=()=>e.getBoundsByReference()[4],e.getMaxZBound=()=>e.getBoundsByReference()[5],e.getRedrawMTime=()=>{let e=t.mtime;if(null!==t.mapper){let r=t.mapper.getMTime();e=r>e?r:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(r=t.mapper.getInput().getMTime())>e?r:e)}return t.properties.forEach(t=>{e=Math.max(e,t.getMTime());let r=t.getRGBTransferFunction();null!==r&&(e=Math.max(e,r.getMTime()))}),e},e.getSupportsSelection=()=>!!t.mapper&&t.mapper.getSupportsSelection()},"vtkImageSlice");let{Zi:Hv,iw:Hb,SD:Hw,YA:Hx,FE:HC,Jt:Hk,Y2:HM,Qy:HS,Hw:HE}=j;function HP(e){let t=Hk(F_.IMAGE_PLANE,e);if(void 0!==t.usingDefaultValues||t.columnPixelSpacing&&t.rowPixelSpacing&&t.columnCosines&&t.rowCosines&&t.imagePositionPatient&&t.imageOrientationPatient)return t;let r={...t,usingDefaultValues:!0};return r.columnPixelSpacing||=1,r.rowPixelSpacing||=1,r.columnCosines||=[0,1,0],r.rowCosines||=[1,0,0],r.imagePositionPatient||=[0,0,0],r.imageOrientationPatient||=new Float32Array([1,0,0,0,1,0]),r}function HI(e){var t;let r,{imagePlaneModule:n,imagePixelModule:a,voiLUTFunction:i,modality:o,scalingFactor:s,calibration:l}=function(e){let t=e.imageId,{pixelRepresentation:r,bitsAllocated:n,bitsStored:a,highBit:i,photometricInterpretation:o,samplesPerPixel:s}=Hk(F_.IMAGE_PIXEL,t),{windowWidth:l,windowCenter:u,voiLUTFunction:c}=e,{modality:d}=Hk(F_.GENERAL_SERIES,t),h=Hk(F_.SCALING,t),p=Hk(F_.CALIBRATION,t),f=Object.values(Vn).includes(c)?c:Vn.LINEAR;return{calibration:p,scalingFactor:h,voiLUTFunction:f,modality:d,imagePlaneModule:HP(t),imagePixelModule:{bitsAllocated:n,bitsStored:a,samplesPerPixel:s,highBit:i,photometricInterpretation:o,pixelRepresentation:r,windowWidth:l,windowCenter:u,modality:d,voiLUTFunction:f}}}(e),{rowCosines:u,columnCosines:c}=n;(null==u||null==c)&&(u=[1,0,0],c=[0,1,0]);let d=N7.vec3.fromValues(u[0],u[1],u[2]),h=N7.vec3.fromValues(c[0],c[1],c[2]),p=N7.vec3.create();N7.vec3.cross(p,d,h);let f=n.imagePositionPatient;null==f&&(f=[0,0,0]);let m=n.columnPixelSpacing||e.columnPixelSpacing,g=n.rowPixelSpacing||e.rowPixelSpacing,y=e.columns,v=e.rows;return a.photometricInterpretation||e.sizeInBytes!==3*e.width*e.height||(e.numberOfComponents=3),{numberOfComponents:e.numberOfComponents||(t=a.photometricInterpretation,r=1,("RGB"===t||t?.includes("YBR")||"PALETTE COLOR"===t)&&(r=3),r),origin:f,direction:[...d,...h,...p],dimensions:[y,v,1],spacing:[m,g,FN],numVoxels:y*v*1,imagePlaneModule:n,imagePixelModule:a,bitsAllocated:a.bitsAllocated,voiLUTFunction:i,modality:o,scalingFactor:s,calibration:l,scanAxisNormal:p}}function HT(e){return H_(e,"vtkVolume")||H_(e,"vtkImageSlice")}function H_(e,t){let r="isA"in e?e:e.actor;return!!r&&!!r.isA(t)}let HD=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"Grayscale-DICOM-sigmoid",Notes:"This is a 16 point sample of a sigmoid grayscale colormap described in the DICOM standard. See equation C.11-1 in section C.11.2",NanColor:[1,0,0],BelowRangeColor:[0,0,0],AboveRangeColor:[1,1,1],RGBPoints:[-1,.01798620996209156,.01798620996209156,.01798620996209156,-.8666666666666667,.030275691986950463,.030275691986950463,.030275691986950463,-.7333333333333334,.05053016223541345,.05053016223541345,.05053016223541345,-.6,.08317269649392238,.08317269649392238,.08317269649392238,-.4666666666666667,.13392788832407365,.13392788832407365,.13392788832407365,-.33333333333333337,.2086085273260449,.2086085273260449,.2086085273260449,-.19999999999999996,.31002551887238755,.31002551887238755,.31002551887238755,-.06666666666666665,.4337256058045608,.4337256058045608,.4337256058045608,.06666666666666665,.5662743941954392,.5662743941954392,.5662743941954392,.19999999999999996,.6899744811276125,.6899744811276125,.6899744811276125,.33333333333333326,.791391472673955,.791391472673955,.791391472673955,.46666666666666656,.8660721116759263,.8660721116759263,.8660721116759263,.6000000000000001,.9168273035060777,.9168273035060777,.9168273035060777,.7333333333333334,.9494698377645865,.9494698377645865,.9494698377645865,.8666666666666667,.9697243080130495,.9697243080130495,.9697243080130495,1,.9820137900379085,.9820137900379085,.9820137900379085]},{ColorSpace:"RGB",Name:"Inverted-Grayscale",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Inverted-Grayscale-DICOM-sigmoid",Notes:"This is a 16 point sample of a sigmoid inverted-grayscale colormap described in the DICOM standard. See equation C.11-1 in section C.11.2",BelowRangeColor:[1,1,1],AboveRangeColor:[0,0,0],NanColor:[1,0,0],RGBPoints:[-1,.9820137900379085,.9820137900379085,.9820137900379085,-.8666666666666667,.9697243080130495,.9697243080130495,.9697243080130495,-.7333333333333334,.9494698377645866,.9494698377645866,.9494698377645866,-.6,.9168273035060777,.9168273035060777,.9168273035060777,-.4666666666666667,.8660721116759263,.8660721116759263,.8660721116759263,-.33333333333333337,.791391472673955,.791391472673955,.791391472673955,-.19999999999999996,.6899744811276125,.6899744811276125,.6899744811276125,-.06666666666666665,.5662743941954391,.5662743941954391,.5662743941954391,.06666666666666665,.43372560580456077,.43372560580456077,.43372560580456077,.19999999999999996,.3100255188723875,.3100255188723875,.3100255188723875,.33333333333333326,.20860852732604496,.20860852732604496,.20860852732604496,.46666666666666656,.13392788832407365,.13392788832407365,.13392788832407365,.6000000000000001,.08317269649392234,.08317269649392234,.08317269649392234,.7333333333333334,.05053016223541351,.05053016223541351,.05053016223541351,.8666666666666667,.03027569198695046,.03027569198695046,.03027569198695046,1,.01798620996209155,.01798620996209155,.01798620996209155]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,754296e-12,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,111641e-12,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,363578e-12,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,405298e-12,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4264e-11,0,620844e-12,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,33216e-11,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,405432e-12,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,455569e-13]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,455569e-13,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter(e=>e.RGBPoints).filter(e=>"CIELAB"!==e.ColorSpace).forEach(e=>{HD[e.Name]=e});let HA=Object.keys(HD);HA.sort();var HO=function(e){return HD[e]};let{vtkErrorMacro:HR}=Bh,HN={range:[0,0],clamping:!0,allowDuplicateScalars:!1};var HL=Bh.newInstance(function(e,t,r={}){Object.assign(t,HN,r),Bh.obj(e,t),t.nodes=[],Bh.setGet(e,t,["allowDuplicateScalars","clamping"]),Bh.setArray(e,t,["range"],2),Bh.getArray(e,t,["range"]),t.classHierarchy.push("vtkPiecewiseFunction"),e.getSize=()=>t.nodes.length,e.getType=()=>{let e,r=0,n=0;t.nodes.length>0&&(r=t.nodes[0].y);for(let a=1;a<t.nodes.length;a++){if((e=t.nodes[a].y)!==r)if(e>r)switch(n){case 0:case 1:n=1;break;default:n=3}else switch(n){case 0:case 2:n=2;break;default:n=3}if(r=e,3===n)break}switch(n){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:return"Varied"}},e.getDataPointer=()=>{let e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(let r=0;r<e;r++)t.function[2*r]=t.nodes[r].x,t.function[2*r+1]=t.nodes[r].y}return t.function},e.getFirstNonZeroValue=()=>{if(0===t.nodes.length)return 0;let e=1,r=0;for(;r<t.nodes.length;r++)if(0!==t.nodes[r].y){e=0;break}return e?Number.MAX_VALUE:r>0?t.nodes[r-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x},e.getNodeValue=(e,r)=>{let n=t.nodes.length;return e<0||e>=n?(HR("Index out of range!"),-1):(r[0]=t.nodes[e].x,r[1]=t.nodes[e].y,r[2]=t.nodes[e].midpoint,r[3]=t.nodes[e].sharpness,1)},e.setNodeValue=(r,n)=>{let a=t.nodes.length;if(r<0||r>=a)return HR("Index out of range!"),-1;let i=t.nodes[r].x;return t.nodes[r].x=n[0],t.nodes[r].y=n[1],t.nodes[r].midpoint=n[2],t.nodes[r].sharpness=n[3],i!==n[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=(t,r)=>e.addPointLong(t,r,.5,0),e.addPointLong=(r,n,a,i)=>{let o;if(a<0||a>1)return HR("Midpoint outside range [0.0, 1.0]"),-1;if(i<0||i>1)return HR("Sharpness outside range [0.0, 1.0]"),-1;for(t.allowDuplicateScalars||e.removePoint(r),t.nodes.push({x:r,y:n,midpoint:a,sharpness:i}),e.sortAndUpdateRange(),o=0;o<t.nodes.length&&t.nodes[o].x!==r;o++);return o<t.nodes.length?o:-1},e.setNodes=r=>{t.nodes!==r&&(t.nodes=r,e.sortAndUpdateRange())},e.sortAndUpdateRange=()=>{t.nodes.sort((e,t)=>e.x-t.x),e.updateRange()||e.modified()},e.updateRange=()=>{let r=t.range.slice(),n=t.nodes.length;return n?(t.range[0]=t.nodes[0].x,t.range[1]=t.nodes[n-1].x):(t.range[0]=0,t.range[1]=0),(r[0]!==t.range[0]||r[1]!==t.range[1])&&(e.modified(),!0)},e.removePoint=r=>{let n;for(n=0;n<t.nodes.length&&t.nodes[n].x!==r;n++);if(n>=t.nodes.length)return -1;let a=n,i=!1;return t.nodes.splice(n,1),(0===n||n===t.nodes.length)&&(i=e.updateRange()),i||e.modified(),a},e.removeAllPoints=()=>{t.nodes=[],e.sortAndUpdateRange()},e.addSegment=(r,n,a,i)=>{e.sortAndUpdateRange();for(let e=0;e<t.nodes.length;)t.nodes[e].x>=r&&t.nodes[e].x<=a?t.nodes.splice(e,1):e++;e.addPoint(r,n,.5,0),e.addPoint(a,i,.5,0)},e.getValue=t=>{let r=[];return e.getTable(t,t,1,r),r[0]},e.adjustRange=r=>{if(r.length<2)return 0;let n=e.getRange();n[0]<r[0]?e.addPoint(r[0],e.getValue(r[0])):e.addPoint(r[0],e.getValue(n[0])),n[1]>r[1]?e.addPoint(r[1],e.getValue(r[1])):e.addPoint(r[1],e.getValue(n[1])),e.sortAndUpdateRange();for(let e=0;e<t.nodes.length;)t.nodes[e].x>=r[0]&&t.nodes[e].x<=r[1]?t.nodes.splice(e,1):++e;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=(t,r)=>Math.ceil((r-t)/e.findMinimumXDistance()),e.findMinimumXDistance=()=>{let e=t.nodes.length;if(e<2)return -1;let r=t.nodes[1].x-t.nodes[0].x;for(let n=0;n<e-1;n++){let e=t.nodes[n+1].x-t.nodes[n].x;e<r&&(r=e)}return r},e.getTable=(e,r,n,a,i=1)=>{let o,s=0,l=t.nodes.length,u=0;0!==l&&(u=t.nodes[l-1].y);let c=0,d=0,h=0,p=0,f=0,m=0,g=0;for(o=0;o<n;o++){let y=i*o;for(c=n>1?e+o/(n-1)*(r-e):.5*(e+r);s<l&&c>t.nodes[s].x;)++s<l&&(d=t.nodes[s-1].x,h=t.nodes[s].x,p=t.nodes[s-1].y,f=t.nodes[s].y,m=t.nodes[s-1].midpoint,g=t.nodes[s-1].sharpness,m<1e-5&&(m=1e-5),m>.99999&&(m=.99999));if(s>=l)a[y]=t.clamping?u:0;else if(0===s)a[y]=t.clamping?t.nodes[0].y:0;else{let e=(c-d)/(h-d);if(e=e<m?.5*e/m:.5+.5*(e-m)/(1-m),g>.99)if(e<.5){a[y]=p;continue}else{a[y]=f;continue}if(g<.01){a[y]=(1-e)*p+e*f;continue}e<.5?e=.5*(2*e)**(1+10*g):e>.5&&(e=1-.5*((1-e)*2)**(1+10*g));let t=e*e,r=t*e,n=2*r-3*t+1,i=-2*r+3*t,o=r-2*t+e,s=r-t,l=(1-g)*(f-p);a[y]=n*p+i*f+o*l+s*l;let u=p<f?p:f,v=p>f?p:f;a[y]=a[y]<u?u:a[y],a[y]=a[y]>v?v:a[y]}}}},"vtkPiecewiseFunction");let HV=new Map;function HF(e){return e?.trim().toLowerCase()}function Hj(e){if(e?.trim())return function(e){let t=HV.get(e);if(t)return t;let r=HF(e);if(r){for(let[e,t]of HV.entries())if(HF(e)===r||HF(t.Name)===r)return t}}(e)||function(e){let t=HO(e);if(t)return t;let r=HF(e);if(!r)return;let n=HA.find(e=>HF(e)===r);return n?HO(n):void 0}(e)}function HB(e,t){let r=HA.map(e=>HO(e)),n=Array.from(HV.keys()).map(e=>HV.get(e)),a=r.concat(n).find(t=>{let{RGBPoints:r}=t;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t+=4)if(!V_(r.slice(t+1,t+4),e.slice(t+1,t+4)))return!1;return!0});if(!a)return null;let i=[];if(H_(t,"vtkVolume")||H_(t,"vtkImageSlice")){let e=t.getProperty()?.getScalarOpacity?.(0)?.getDataPointer?.();if(!e)return{name:a.Name};for(let t=0;t<e.length;t+=2)i.push({value:e[t],opacity:e[t+1]})}return{name:a.Name,...Array.isArray(i)&&i.length>0&&{opacity:i},...!1}}function HW(e,t){let r=Hz(e);HU(e,t,r)}function HU(e,t,r){let n=e.getMapper().getInputData().get("voxelManager");if(!n?.voxelManager)throw Error("No voxel manager was found for the volume actor, or you cannot yet update opacity with a threshold using stacked images");let a=n.voxelManager.getRange(),i=HL();if(null!==r){let e=.001*Math.abs(a[1]-a[0]),n=Math.max(a[0],Math.min(a[1],r));i.addPoint(a[0],0),i.addPoint(n-e,0),i.addPoint(n,t),i.addPoint(a[1],t)}else i.addPoint(a[0],t),i.addPoint(a[1],t);e.getProperty().setScalarOpacity(0,i)}function Hz(e){let t=e.getProperty().getScalarOpacity(0);if(!t)return null;let r=t.getDataPointer();if(!r||r.length<=4)return null;for(let e=0;e<r.length-2;e+=2){r[e];let t=r[e+1],n=r[e+2],a=r[e+3];if(0===t&&a>0)return n}return null}function HH(e){let t=e.getProperty().getScalarOpacity(0);if(!t)return 1;let r=t.getDataPointer();if(!r||0===r.length)return 1;let n=0;for(let e=1;e<r.length;e+=2)r[e]>n&&(n=r[e]);return n}function HG(e){let t=e.getSize(),r=[];for(let n=0;n<t;n++){let t=[];e.getNodeValue(n,t),r.push(t)}return r}function Hq(e,t){t?.length&&(e.removeAllPoints(),t.forEach(t=>{e.addRGBPoint(...t)}))}function H$(e,t){return{windowWidth:Math.abs(t-e)+1,windowCenter:(e+t+1)/2}}function HK(e,t,r=Vn.LINEAR){if(r===Vn.LINEAR||r===Vn.SAMPLED_SIGMOID)return{lower:t-.5-(e-1)/2,upper:t-.5+(e-1)/2};if(r===Vn.LINEAR_EXACT)return{lower:t-e/2,upper:t+e/2};throw Error("Invalid VOI LUT function")}function HY(e){let t=zH.newInstance(),r=0,n=1024;return void 0!==e.lower&&void 0!==e.upper&&(r=e.lower,n=e.upper),t.addRGBPoint(r,0,0,0),t.addRGBPoint(n,1,1,1),t}function HX(e,t=1024){let{windowWidth:r,windowCenter:n}=H$(e.lower,e.upper),a=Array.from({length:t},(e,r)=>(r+1)/(t+2)).flatMap(e=>[n-r/4*Math.log((1-e)/e),e,e,e,.5,0]),i=zH.newInstance();return i.buildFunctionFromArray(UX.newInstance({values:a,numberOfComponents:6})),i}function HZ(e,t){let r=t.voxelManager.getScalarData();if(!e.getPointData)return;let n=e.getPointData().getScalars().getData();if(t.color&&t.rgba){let e=new Uint8Array(t.columns*t.rows*3);for(let n=0;n<t.columns*t.rows;n++)e[3*n]=r[4*n],e[3*n+1]=r[4*n+1],e[3*n+2]=r[4*n+2];t.rgba=!1,t.getPixelData=()=>e,n.set(e)}else n.set(r);e.modified()}function HJ(e){if(!e)return;let t=e.getSize();for(let r=0;r<t;r++){let t=[];e.getNodeValue(r,t),t[1]=1-t[1],t[2]=1-t[2],t[3]=1-t[3],e.setNodeValue(r,t)}}let HQ=new Map,H1="imageRetrieveConfiguration",H0={IMAGE_RETRIEVE_CONFIGURATION:H1,clear:()=>{HQ.clear()},add:(e,t)=>{HQ.set(e,t)},clone:()=>new Map(HQ),restore:e=>{HQ.clear(),e.forEach((e,t)=>{HQ.set(t,e)})},get:(e,...t)=>{if(e===H1)return t.map(e=>HQ.get(e)).find(e=>void 0!==e)}};Hv(H0.get.bind(H0));let H2=VY;function H5(e,t,r=Vn.LINEAR){let n,a;if("number"==typeof t&&"number"==typeof e?(n=t,a=e):Array.isArray(t)&&Array.isArray(e)&&(n=t[0],a=e[0]),void 0!==n&&void 0!==a)return HK(a,n,r)}let H3=e=>e;class H4{constructor(e=!1){this.matrix=N7.mat4.identity(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=e?N7.glMatrix.toRadian:H3}rotateFromDirections(e,t){let r=new Float64Array(3),n=new Float64Array(3),a=new Float64Array(16);N7.vec3.set(r,e[0],e[1],e[2]),N7.vec3.set(n,t[0],t[1],t[2]),N7.vec3.normalize(r,r),N7.vec3.normalize(n,n);let i=N7.vec3.dot(r,n);return i>=1||(N7.vec3.cross(this.tmp,r,n),1e-6>N7.vec3.length(this.tmp)&&(N7.vec3.cross(this.tmp,[1,0,0],e),1e-6>N7.vec3.length(this.tmp)&&N7.vec3.cross(this.tmp,[0,1,0],e)),N7.mat4.fromRotation(a,Math.acos(i),this.tmp),N7.mat4.multiply(this.matrix,this.matrix,a)),this}rotate(e,t){return N7.vec3.set(this.tmp,...t),N7.vec3.normalize(this.tmp,this.tmp),N7.mat4.rotate(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}rotateX(e){return N7.mat4.rotateX(this.matrix,this.matrix,this.angleConv(e)),this}rotateY(e){return N7.mat4.rotateY(this.matrix,this.matrix,this.angleConv(e)),this}rotateZ(e){return N7.mat4.rotateZ(this.matrix,this.matrix,this.angleConv(e)),this}translate(e,t,r){return N7.vec3.set(this.tmp,e,t,r),N7.mat4.translate(this.matrix,this.matrix,this.tmp),this}scale(e,t,r){return N7.vec3.set(this.tmp,e,t,r),N7.mat4.scale(this.matrix,this.matrix,this.tmp),this}multiply(e){return N7.mat4.multiply(this.matrix,this.matrix,e),this}multiply3x3(e){return N7.mat4.multiply(this.matrix,this.matrix,[e[0],e[1],e[2],0,e[3],e[4],e[5],0,e[6],e[7],e[8],0,0,0,0,1]),this}invert(){return N7.mat4.invert(this.matrix,this.matrix),this}identity(){return N7.mat4.identity(this.matrix),this}apply(e,t=0,r=-1){if(B1(Bm,this.matrix))return this;let n=-1===r?e.length:t+3*r;for(let r=t;r<n;r+=3)N7.vec3.set(this.tmp,e[r],e[r+1],e[r+2]),N7.vec3.transformMat4(this.tmp,this.tmp,this.matrix),e[r]=this.tmp[0],e[r+1]=this.tmp[1],e[r+2]=this.tmp[2];return this}getMatrix(){return this.matrix}setMatrix(e){return e&&16===e.length&&N7.mat4.copy(this.matrix,e),this}}var H8=function(){return new H4(!0)},H6=function(){return new H4(!1)};function H9(e){return Array.isArray(e)?e.some(e=>Number.isNaN(e)):Number.isNaN(e)}function H7(e){if("function"==typeof structuredClone)try{return structuredClone(e)}catch{}return function e(t,r){if(null===t||"object"!=typeof t)return t;let n=r.get(t);if(n)return n;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Map){let n=new Map;return r.set(t,n),t.forEach((t,a)=>{n.set(e(a,r),e(t,r))}),n}if(t instanceof Set){let n=new Set;return r.set(t,n),t.forEach(t=>{n.add(e(t,r))}),n}if(Array.isArray(t)){let n=[];return r.set(t,n),t.forEach((t,a)=>{n[a]=e(t,r)}),n}let a={};return r.set(t,a),Reflect.ownKeys(t).forEach(n=>{a[n]=e(t[n],r)}),a}(e,new WeakMap)}function Ge(e,t){if(!e?.length||!t.FrameOfReferenceUID)return;t.planeRestriction||={FrameOfReferenceUID:t.FrameOfReferenceUID,point:e[0],inPlaneVector1:null,inPlaneVector2:null};let{planeRestriction:r}=t;if(1===e.length)return r.inPlaneVector1=null,r.inPlaneVector2=null,r;let n=N7.vec3.sub(N7.vec3.create(),e[0],e[Math.floor(e.length/2)]);N7.vec3.normalize(n,n),r.inPlaneVector1=n,r.inPlaneVector2=null;let a=e.length;if(a>2)for(let t=Math.floor(a/3);t<a;t++){let n=N7.vec3.sub(N7.vec3.create(),e[t],e[0]),a=N7.vec3.length(n);if(!V_(a,0)&&N7.vec3.dot(n,r.inPlaneVector1)<.95*a){N7.vec3.normalize(n,n),r.inPlaneVector2=n;break}}return r}function Gt(e,t){let r=function(e,t){let r=0,n=e[0][t];for(let a=1;a<e.length;a++)e[a][t]<n&&(n=e[a][t],r=a);return r}(e,t);return e[7^r][t]-e[r][t]}function Gr(e,t,r){let n,a,i,o,s,l,u,c,d=(n=N7.vec3.cross(N7.vec3.create(),t,r),N7.vec3.normalize(n,n),i=(a=e.getSpatialExtent())[0],o=a[1],s=a[2],l=a[3],u=a[4],[[i,s,u],[o,s,u],[i,l,u],[o,l,u],[i,s,c=a[5]],[o,s,c],[i,l,c],[o,l,c]].map(a=>{let i=[0,0,0];return e.indexToWorld(a,i),[N7.vec3.dot(i,n),N7.vec3.dot(i,r),N7.vec3.dot(i,t)]}));return{widthWorld:Gt(d,0),heightWorld:Gt(d,1),depthWorld:Gt(d,2)}}class Gn{constructor(e){this.insetImageMultiplier=jh.rendering?.useLegacyCameraFOV?1.1:1,this.flipHorizontal=!1,this.flipVertical=!1,this.viewportStatus=FI.NO_DATA,this._suppressCameraModifiedEvents=!1,this.hasPixelSpacing=!0,this.getProperties=()=>({}),this.setRotation=e=>{},this.viewportWidgets=new Map,this.addWidget=(e,t)=>{this.viewportWidgets.set(e,t)},this.getWidget=e=>this.viewportWidgets.get(e),this.getWidgets=()=>Array.from(this.viewportWidgets.values()),this.getRenderPasses=()=>null,this.removeWidgets=()=>{this.getWidgets().forEach(e=>{if(e.getEnabled()&&e.setEnabled(!1),e.getActor&&e.getRenderer){let t=e.getActor(),r=e.getRenderer();r&&t&&r.removeActor(t)}})},this.id=e.id,this.renderingEngineId=e.renderingEngineId,this.type=e.type,this.element=e.element,this.canvas=e.canvas,this.sx=e.sx,this.sy=e.sy,this.sWidth=e.sWidth,this.sHeight=e.sHeight,this._actors=new Map,this.element.setAttribute("data-viewport-uid",this.id),this.element.setAttribute("data-rendering-engine-uid",this.renderingEngineId),this.defaultOptions=H7(e.defaultOptions),this.suppressEvents=!!e.defaultOptions.suppressEvents&&e.defaultOptions.suppressEvents,this.options=H7(e.defaultOptions),this.isDisabled=!1}static get useCustomRenderingPipeline(){return!1}getUseCustomRenderingPipeline(){return this.constructor.useCustomRenderingPipeline}resizeForRenderingEngine({keepCamera:e=!0}={}){"function"==typeof this.resize&&this.resize();let t=e?this.getCamera():void 0;this.resetCamera(),t&&this.setCamera(t)}isOrientationChangeable(){return!1}dispose(){}destroy(){this.dispose()}setRendered(){this.viewportStatus!==FI.NO_DATA&&this.viewportStatus!==FI.LOADING&&(this.viewportStatus=FI.RENDERED)}setNeedsRender(){this.viewportStatus=FI.NEEDS_RENDER}setColorTransform(e,t){if(!e&&!t)return;let r=t||[255,255,255],n=Math.max(...r),a=r.map(e=>n/e),{lower:i=0,upper:o=255}=e||{},s=(o-i+1)/255,l=i/255;return`url('data:image/svg+xml,\
|
|
9
|
+
`)}),{viewportOptions:o,displaySetsInfo:s}}_validateViewportSpecificMatch(e,t,r){let{displaySetService:n}=this._servicesManager.services,a=t.displaySets,i=e.displaySetInstanceUIDs.length;if(a.length>0&&i!==a.length)throw Error(`The number of displaySets to set ${i} does not match the number of displaySets in the protocol ${a} - not currently implemented`);e.displaySetInstanceUIDs.forEach(e=>{let a=n.getDisplaySetByUID(e),{displaySets:i}=t;for(let e of i){let t=r[e.id];t&&this._validateRequiredSelectors(t,a)}})}areRequiredSelectorsValid(e,t){let r=!0;for(let n of e)try{this._validateRequiredSelectors(n,t)}catch(e){r=!1;break}return r}_validateRequiredSelectors(e,t){let{seriesMatchingRules:r}=e,n=r.filter(e=>e.required);if(n.length){let e=this.protocolEngine.findMatch(t,n);if(!e||0===e.score)throw Error(`The displaySetInstanceUID ${t.displaySetInstanceUID} does not satisfy the required seriesMatching criteria for the protocol`)}}_validateOptions(e){let{displaySetService:t}=this._servicesManager.services,{displaySetSelectorMap:r}=e;r&&Object.entries(r).forEach(([e,r])=>{r.forEach(e=>{if(!t.getDisplaySetByUID(e))throw Error(`The displaySetInstanceUID ${e} is not found in the displaySetService`)})})}_matchImages(e){let{id:t,studyMatchingRules:r=[],seriesMatchingRules:n}=e,a=[],i=0;console.log("ProtocolEngine::matchImages",r,n);let o=-1===this.protocol.numberOfPriorsReferenced;this.studies.forEach((e,t)=>{if(o&&this.activeStudy!==e)return;let s=this.displaySets.filter(t=>t.StudyInstanceUID===e.StudyInstanceUID&&!t?.unsupported),l=this.protocolEngine.findMatch(e,r,{studies:this.studies,displaySets:s,allDisplaySets:this.displaySets,displaySetMatchDetails:this.displaySetMatchDetails,studyInstanceUIDsIndex:t});!0!==l.requiredFailed&&(this.debug("study",e.StudyInstanceUID,"display sets #",s.length),s.forEach(t=>{let{StudyInstanceUID:r,SeriesInstanceUID:o,displaySetInstanceUID:u}=t,c=this.protocolEngine.findMatch(t,n,{studies:this.studies,instance:t.images?.[0],displaySetMatchDetails:this.displaySetMatchDetails,displaySets:s});if(!0===c.requiredFailed)return void this.debug("Display set required failed",t,n);this.debug("Found displaySet for rules",t),i=Math.max(c.score,i);let d={passed:[],failed:[]};d.passed=d.passed.concat(c.details.passed),d.passed=d.passed.concat(l.details.passed),d.failed=d.failed.concat(c.details.failed),d.failed=d.failed.concat(l.details.failed);let h=c.score+l.score,p={StudyInstanceUID:r,SeriesInstanceUID:o,displaySetInstanceUID:u,matchingScore:h,matchDetails:d,sortingInfo:{score:h,study:e.StudyInstanceUID,...this._getSeriesSortInfoForDisplaySetSort(t)}};this.debug("Adding display set",t,p),a.push(p)}))}),0===a.length&&console.log("No match found",t);let s=Nq({name:"score",reverse:!0},{name:"study",reverse:!0},this._getSeriesFieldForDisplaySetSort());a.sort((e,t)=>s(e.sortingInfo,t.sortingInfo));let l=a[0];return console.log("ProtocolEngine::matchImages bestMatch",l,a),{bestMatch:l,matchingScores:a}}_getSeriesSortInfoForDisplaySetSort(e){return{[this._getSeriesFieldForDisplaySetSort().name]:null!=e.SeriesNumber?parseInt(e.SeriesNumber):parseInt(e.seriesNumber)}}_getSeriesFieldForDisplaySetSort(){return{name:"series"}}_isNextStageAvailable(){let e=this._getNumProtocolStages();return this.stageIndex+1<e}_isPreviousStageAvailable(){return this.stageIndex-1>=0}_setCurrentProtocolStage(e,t){let r;for(r=this.stageIndex+e;r>=0&&r<this.protocol.stages.length&&"disabled"===this.protocol.stages[r].status;r+=e);return!(r<0)&&!(r>=this.protocol.stages.length)&&(this.stageIndex=r,this.debug(`ProtocolEngine::setCurrentProtocolStage stage = ${this.stageIndex}`),this._updateViewports(t),this._broadcastEvent(this.EVENTS.PROTOCOL_CHANGED,{viewportMatchDetails:this.viewportMatchDetails,displaySetMatchDetails:this.displaySetMatchDetails,protocol:this.protocol,stageIdx:this.stageIndex,stage:this.protocol.stages[this.stageIndex]}),!0)}debug(...e){this.debugLogging&&console.log(...e)}_copyProtocol(e){return NG()(e)}}LT.EVENTS={PROTOCOL_CHANGED:"event::hanging_protocol_changed",PROTOCOL_RESTORED:"event::hanging_protocol_restore",NEW_LAYOUT:"event::hanging_protocol_new_layout",STAGE_ACTIVATION:"event::hanging_protocol_stage_activation",CUSTOM_IMAGE_LOAD_PERFORMED:"event::hanging_protocol_custom_image_load_performed"},LT.REGISTRATION={name:"hangingProtocolService",altName:"HangingProtocolService",create:({configuration:e={},commandsManager:t,servicesManager:r})=>new LT(t,r)};class L_ extends Ni{constructor(){super(L_.EVENTS),this.serviceImplementation={_getState:()=>console.warn("getState() NOT IMPLEMENTED"),_setUser:()=>console.warn("_setUser() NOT IMPLEMENTED"),_getUser:()=>console.warn("_getUser() NOT IMPLEMENTED"),_getAuthorizationHeader:()=>{},_handleUnauthenticated:()=>console.warn("_handleUnauthenticated() NOT IMPLEMENTED"),_reset:()=>console.warn("reset() NOT IMPLEMENTED"),_set:()=>console.warn("set() NOT IMPLEMENTED")},this.serviceImplementation={...this.serviceImplementation}}getState(){return this.serviceImplementation._getState()}setUser(e){return this.serviceImplementation._setUser(e)}getUser(){return this.serviceImplementation._getUser()}getAuthorizationHeader(){return this.serviceImplementation._getAuthorizationHeader()}handleUnauthenticated(){return this.serviceImplementation._handleUnauthenticated()}reset(){return this.serviceImplementation._reset()}set(e){return this.serviceImplementation._set(e)}setServiceImplementation({getState:e,setUser:t,getUser:r,getAuthorizationHeader:n,handleUnauthenticated:a,reset:i,set:o}){e&&(this.serviceImplementation._getState=e),t&&(this.serviceImplementation._setUser=t),r&&(this.serviceImplementation._getUser=r),n&&(this.serviceImplementation._getAuthorizationHeader=n),a&&(this.serviceImplementation._handleUnauthenticated=a),i&&(this.serviceImplementation._reset=i),o&&(this.serviceImplementation._set=o)}}L_.EVENTS={},L_.REGISTRATION={name:"userAuthenticationService",altName:"UserAuthenticationService",create:({configuration:e={}})=>new L_};var LD=u(1752),LA=u.n(LD);let LO={MODE_CUSTOMIZATION_MODIFIED:"event::CustomizationService:modeModified",GLOBAL_CUSTOMIZATION_MODIFIED:"event::CustomizationService:globalModified",DEFAULT_CUSTOMIZATION_MODIFIED:"event::CustomizationService:defaultModified"},LR=((efq={}).Global="global",efq.Mode="mode",efq.Default="default",efq);class LN extends Ni{constructor({configuration:e,commandsManager:t}){super(LO),this.Scope=LR,this.commandsManager=void 0,this.extensionManager=void 0,this.globalCustomizations=new Map,this.modeCustomizations=new Map,this.defaultCustomizations=new Map,this.transformedCustomizations=new Map,this.configuration=void 0,this.configuration=e,this.commandsManager=t}init(e){this.extensionManager=e,this.defaultCustomizations.clear(),this.modeCustomizations.clear(),this.extensionManager.getRegisteredExtensionIds().forEach(e=>{let t=`${e}.customizationModule.default`,r=this._findExtensionValue(t);if(r){let{value:e}=r;this._addReference(e,LR.Default)}let n=`${e}.customizationModule.global`,a=this._findExtensionValue(n);if(a){let{value:e}=a;this._addReference(e,LR.Global)}}),this.configuration?._hasBeenAdded||(this.addReferences(this.configuration),Object.defineProperty(this.configuration,"_hasBeenAdded",{value:!0,writable:!1}))}onModeEnter(){this.clearTransformedCustomizations(),this.init(this.extensionManager)}onModeExit(){this.clearTransformedCustomizations()}clearTransformedCustomizations(){for(let e of(super.reset(),Array.from(this.modeCustomizations.keys())))this.transformedCustomizations.delete(e);this.modeCustomizations.clear()}getCustomization(e){let t=this.transformedCustomizations.get(e);if(t)return t;let r=this.globalCustomizations.get(e)??this.modeCustomizations.get(e)??this.defaultCustomizations.get(e),n=this.transform(r);return void 0!==n&&this.transformedCustomizations.set(e,n),n}setCustomizations(e,t=LR.Mode){Array.isArray(e)?e.forEach(e=>{this._addReference(e,t)}):Object.entries(e).forEach(([e,r])=>{this._setCustomization(e,r,t)})}setCustomization(e,t,r=LR.Mode){console.warn("setCustomization is deprecated. Please use setCustomizations with an object instead."),this._setCustomization(e,t,r)}_setCustomization(e,t,r=LR.Mode){switch(r){case LR.Global:this.setGlobalCustomization(e,t);break;case LR.Mode:this.setModeCustomization(e,t);break;case LR.Default:this.setDefaultCustomization(e,t);break;default:throw Error(`Invalid customization scope: ${r}`)}}getCustomizations(e){return e===LR.Global?this.globalCustomizations:e===LR.Mode?this.modeCustomizations:this.defaultCustomizations}hasCustomization(e){return this.globalCustomizations.has(e)||this.modeCustomizations.has(e)}transform(e){if(!e)return e;let{inheritsFrom:t}=e;if(!t)return e;let r=this.getCustomization(t),n=r?Object.assign({},r,e):e;return n.$transform?.(this)||n}setModeCustomization(e,t){let r=this.defaultCustomizations.get(e),n=this.modeCustomizations.get(e),a=this.globalCustomizations.get(e),i=n||this._cloneIfNeeded(a)||r,o=this._update(i,t);this.modeCustomizations.set(e,o),this.transformedCustomizations.clear(),this._broadcastEvent(this.EVENTS.MODE_CUSTOMIZATION_MODIFIED,{buttons:this.modeCustomizations,button:this.modeCustomizations.get(e)})}setGlobalCustomization(e,t){let r=this.defaultCustomizations.get(e),n=this.globalCustomizations.get(e),a=this._cloneIfNeeded(n)||r;this.globalCustomizations.set(e,this._update(a,t)),this.transformedCustomizations.clear(),this._broadcastEvent(this.EVENTS.GLOBAL_CUSTOMIZATION_MODIFIED,{buttons:this.defaultCustomizations,button:this.defaultCustomizations.get(e)})}setDefaultCustomization(e,t){this.defaultCustomizations.has(e)&&console.warn(`Trying to update existing default for customization ${e}`),this.transformedCustomizations.clear();let r=this.defaultCustomizations.get(e);this.defaultCustomizations.set(e,this._update(r,t)),this._broadcastEvent(this.EVENTS.DEFAULT_CUSTOMIZATION_MODIFIED,{buttons:this.defaultCustomizations,button:this.defaultCustomizations.get(e)})}_findExtensionValue(e){return this.extensionManager.getModuleEntry(e)}registerCustomUpdateCommand(e,t){e.startsWith("$")||(e="$"+e),(0,LD.extend)(e,t)}_update(e,t){return(e||(e=void 0),!function e(t){if(Array.isArray(t)){for(let r of t)if(e(r))return!0}else if(t&&"object"==typeof t){if(t.$$typeof)return!1;for(let r of Object.keys(t))if(r.startsWith("$")&&"$transform"!==r||e(t[r]))return!0}return!1}(t))?t:LA()(e,t)}_cloneIfNeeded(e){return e&&"object"==typeof e?Array.isArray(e)?[...e]:{...e}:e}_addReference(e,t=LR.Global){e&&("string"==typeof e&&(e=this._findExtensionValue(e).value),Object.entries(e).forEach(([e,r])=>{this[t===LR.Global&&"setGlobalCustomization"||t===LR.Default&&"setDefaultCustomization"||"setModeCustomization"](e,r)}))}addReferences(e,t=LR.Global){e&&(Array.isArray(e)?e.forEach(e=>{this._addReference(e,t)}):this._addReference(e,t))}}function LL(){return(LL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}LN.EVENTS=LO,LN.REGISTRATION={name:"customizationService",create:({configuration:e,commandsManager:t})=>new LN({configuration:e,commandsManager:t})},(0,LD.extend)("$filter",(e,t)=>(function e(t,r){if(Array.isArray(t))return"function"==typeof r?t.filter(r):"string"==typeof r?t.filter(e=>e.id!==r):"object"==typeof r&&r.match&&r.$merge?t.map(t=>e(t,r)).map(e=>{var t;return(t=r.match,e&&"object"==typeof e&&Object.entries(t).every(([t,r])=>e[t]===r))?{...e,...r.$merge}:e}):"object"==typeof r&&r.id&&r.$merge?t.map(t=>e(t,r)).map(e=>e.id===r.id?{...e,...r.$merge}:e):t.map(t=>e(t,r));if(t&&"object"==typeof t){let n={...t};for(let[t,a]of Object.entries(n))n[t]=e(a,r);return n}return t})(t,e));let LV={PANELS_CHANGED:"event::panelService:panelsChanged",ACTIVATE_PANEL:"event::panelService:activatePanel"},LF=((ef$={}).Left="left",ef$.Right="right",ef$.Bottom="bottom",ef$);class Lj extends Ni{constructor(e){super(LV),this._extensionManager=void 0,this._panelsGroups=new Map,this._extensionManager=e}get PanelPosition(){return LF}_getPanelComponent(e){let t=this._extensionManager.getModuleEntry(e);if(!t){let t=this._getSimilarPanels(e);if(t.length>0){let r=`Did you mean: ${t.join(", ")}?`;throw Error(`${e} is not a valid entry for an extension module. ${r} Please check your configuration or make sure the extension is registered.`)}throw Error(`${e} is not a valid entry for an extension module, please check your configuration or make sure the extension is registered.`)}if(!t?.component)throw Error(`No component found from extension ${e}. Check the reference string to the extension in your Mode configuration`);let r=t.component;return{entry:t,content:r}}_getSimilarPanels(e,t=.8){return Object.keys(this._extensionManager.modulesMap).filter(e=>e.includes("panelModule")).filter(r=>this._calculateSimilarity(e,r)>=t)}_calculateSimilarity(e,t){let r=new Set(e.toLowerCase().split("")),n=new Set(t.toLowerCase().split("")),a=new Set([...r].filter(e=>n.has(e))),i=new Set([...r,...n]);return a.size/i.size}getPanelData(e){let t,r;if(Array.isArray(e)){let n=e.map(e=>this._getPanelComponent(e));r=n[0].entry,t=e=>er().createElement(er().Fragment,null,n.map(({content:t},r)=>er().createElement(t,LL({key:r},e))))}else({content:t,entry:r}=this._getPanelComponent(e));return{id:r.id,iconName:r.iconName,iconLabel:r.iconLabel,label:r.label,name:r.name,content:t}}addPanel(e,t,r){let n=this._panelsGroups.get(e);n||(n=[],this._panelsGroups.set(e,n));let a=this.getPanelData(t);n.push(a),this._broadcastEvent(LV.PANELS_CHANGED,{position:e,options:r})}addPanels(e,t,r){if(!Array.isArray(t))throw Error('Invalid "panelsIds" array');t.forEach(t=>this.addPanel(e,t,r))}setPanels(e,t){this.reset(),Object.keys(e).forEach(r=>{this.addPanels(r,e[r],t)})}getPanels(e){return[...this._panelsGroups.get(e)??[]]}reset(){let e=Array.from(this._panelsGroups.keys());this._panelsGroups.clear(),e.forEach(e=>this._broadcastEvent(LV.PANELS_CHANGED,{position:e}))}onModeExit(){this.reset()}activatePanel(e,t=!1){this._broadcastEvent(LV.ACTIVATE_PANEL,{panelId:e,forceActive:t})}addActivatePanelTriggers(e,t,r=!1){return t.map(t=>t.sourceEvents.map(n=>t.sourcePubSubService.subscribe(n,()=>this.activatePanel(e,r)))).flat()}}Lj.REGISTRATION={name:"panelService",create:({extensionManager:e})=>new Lj(e)};let LB={ACTIVE_STEP_CHANGED:"event::workflowStepsService:activateStepChanged",STEPS_CHANGED:"event::workflowStepsService:stepsChanged"};class LW extends Ni{constructor(e,t,r){super(LB),this._extensionManager=void 0,this._servicesManager=void 0,this._commandsManager=void 0,this._workflowSteps=void 0,this._activeWorkflowStep=void 0,this._workflowSteps=[],this._activeWorkflowStep=null,this._extensionManager=e,this._commandsManager=t,this._servicesManager=r}get workflowSteps(){return[...this._workflowSteps]}get activeWorkflowStep(){return this._activeWorkflowStep}addWorkflowSteps(e){let t=!1;e.forEach(e=>{if(this._workflowSteps.some(t=>t.id===e.id))throw Error(`Duplicated workflow step id (${e.id})`);this._workflowSteps.push(e),t=!0}),t&&this._broadcastEvent(LB.STEPS_CHANGED,{})}_updateToolBar(e){let{toolbarService:t}=this._servicesManager.services,{toolbarButtons:r}=e;(Array.isArray(r)?r:[r]).forEach(({buttonSection:e,buttons:r})=>{t.clearButtonSection(e),t.updateSection(e,r)})}_updatePanels(e){let{panelService:t}=this._servicesManager.services,r=e?.layout?.panels;r&&t.setPanels(r,e?.layout?.options)}_updateHangingProtocol(e){let{hangingProtocol:t}=e;t&&this._commandsManager.runCommand("setHangingProtocol",{protocolId:t.protocolId,stageId:t.stageId,stageIndex:t.stageIndex})}_invokeCallbacks(e){if(!e)return;let t=this._commandsManager;Array.isArray(e)||(e=[e]),e.forEach(e=>{let r=e;if(e?.commandName){let{commandName:n,options:a}=e;r=()=>t.runCommand(n,a)}r()})}setActiveWorkflowStep(e){let t=this._activeWorkflowStep;if(e===t?.id)return;let r=this._workflowSteps.find(t=>t.id===e);if(!r)throw Error(`Invalid workflowStepId (${e})`);this._activeWorkflowStep&&this._invokeCallbacks(t.onExit),this._invokeCallbacks(r.onEnter),this._activeWorkflowStep=r,this._updateToolBar(r),this._updatePanels(r),this._updateHangingProtocol(r),this._broadcastEvent(LB.ACTIVE_STEP_CHANGED,{activeWorkflowStep:r})}reset(){this._activeWorkflowStep=null,this._workflowSteps=[]}onModeEnter(){this.reset()}}LW.REGISTRATION={name:"workflowStepsService",create:({extensionManager:e,commandsManager:t,servicesManager:r})=>new LW(e,t,r)};var LU=((efK=LU||{}).Interaction="interaction",efK.Thumbnail="thumbnail",efK.Prefetch="prefetch",efK.Compute="compute",efK);let Lz={SERVICE_STARTED:"event::studyPrefetcherService:started",SERVICE_STOPPED:"event::studyPrefetcherService:stopped",DISPLAYSET_LOAD_PROGRESS:"event::studyPrefetcherService:displaySetLoadProgress",DISPLAYSET_LOAD_COMPLETE:"event::studyPrefetcherService:displaySetLoadComplete"};var LH=((efY=LH||{}).closest="closest",efY.downward="downward",efY.upward="upward",efY);class LG extends Ni{constructor({servicesManager:e,extensionManager:t,configuration:r}){super(Lz),this._extensionManager=void 0,this._servicesManager=void 0,this._subscriptions=void 0,this._activeDisplaySetsInstanceUIDs=[],this._pendingRequests=[],this._inflightRequests=new Map,this._isRunning=!1,this._displaySetLoadingStates=new Map,this._imageIdsToDisplaySetsMap=new Map,this.config={enabled:!1,displaySetsCount:1,maxNumPrefetchRequests:10,order:LH.downward},this.requestType=LU.Prefetch,this.cache=void 0,this.imageLoadPoolManager=void 0,this.imageLoader=void 0,this.imageLoadEventsManager=void 0,this._servicesManager=e,this._extensionManager=t,this._subscriptions=[],Object.assign(this.config,r)}onModeEnter(){this._addEventListeners()}onModeExit(){this._removeEventListeners(),this._stopPrefetching()}_addImageLoadingEventsListeners(){let e=e=>{this._inflightRequests.get(e)||this._sendNextRequests()},t=t=>{let{image:r}=t.detail,{imageId:n}=r;this._moveImageIdToLoadedSet(n),e(n)},r=t=>{let{imageId:r}=t.detail;this._moveImageIdToFailedSet(r),e(r)};return this.imageLoadEventsManager.addEventListeners(t,r)}_addServicesListeners(){let{displaySetService:e,viewportGridService:t}=this._servicesManager.services;return[e.subscribe(e.EVENTS.DISPLAY_SETS_CHANGED,()=>this._syncWithActiveViewport({forceRestart:!0})),t.subscribe(NU.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED,({viewportId:e})=>this._syncWithActiveViewport({activeViewportId:e})),t.subscribe(NU.EVENTS.LAYOUT_CHANGED,()=>this._syncWithActiveViewport()),t.subscribe(NU.EVENTS.GRID_STATE_CHANGED,()=>this._syncWithActiveViewport()),t.subscribe(NU.EVENTS.VIEWPORTS_READY,()=>{this._syncWithActiveViewport(),this._startPrefetching()})]}_addEventListeners(){let e=this._addImageLoadingEventsListeners(),t=this._addServicesListeners();this._subscriptions.push(...e),this._subscriptions.push(...t)}_removeEventListeners(){this._subscriptions.forEach(e=>e.unsubscribe()),this._subscriptions=[]}_syncWithActiveViewport({activeViewportId:e,forceRestart:t}={}){let{viewportGridService:r}=this._servicesManager.services,n=r.getState(),{viewports:a}=n;if(!(e=e??n.activeViewportId))return;let i=a.get(e);if(!i)return;let o=this._setActiveDisplaySetsUIDs(i.displaySetInstanceUIDs);(t||o)&&this._restartPrefetching()}_setActiveDisplaySetsUIDs(e){return!(e.length===this._activeDisplaySetsInstanceUIDs.length&&e.every(e=>this._activeDisplaySetsInstanceUIDs.includes(e)))&&(this._activeDisplaySetsInstanceUIDs=[...e],this._restartPrefetching(),!0)}_areActiveDisplaySetsLoaded(){let{_activeDisplaySetsInstanceUIDs:e}=this;return e.length&&e.every(e=>this._displaySetLoadingStates.get(e).loadingProgress>=1)}_getClosestDisplaySets(e,t){let r=[],n=t-1,a=t+1;for(;n>=0||a<e.length;)n>=0&&(r.push(e[n]),n--),a<e.length&&(r.push(e[a]),a++);return r}_getDownwardDisplaySets(e,t){let r=[];for(let n=t+1;n<e.length;n++)r.push(e[n]);return r}_getUpwardDisplaySets(e,t){let r=[];for(let n=t-1;n>=0&&n!==t;n--)r.push(e[n]);return r}_getSortedDisplaySetsToPrefetch(e){if(!this._activeDisplaySetsInstanceUIDs?.length)return[];let{displaySetsCount:t}=this.config,r=this._activeDisplaySetsInstanceUIDs,[n]=r,a=e.findIndex(e=>e.displaySetInstanceUID===n),i={[LH.closest]:this._getClosestDisplaySets,[LH.downward]:this._getDownwardDisplaySets,[LH.upward]:this._getUpwardDisplaySets},{order:o}=this.config,s=i[o];if(!s)throw Error(`Invalid order (${o})`);let l=new Set(r);return s.call(this,e,a).filter(e=>!l.has(e.displaySetInstanceUID)).slice(0,t)}_getDisplaySets(){let{displaySetService:e}=this._servicesManager.services,t=[...e.getActiveDisplaySets()],r=this._getSortedDisplaySetsToPrefetch(t);return{displaySets:t,displaySetsToPrefetch:r}}_updateImageIdsDisplaySetMap(e,t){for(let r of t){let t=this._imageIdsToDisplaySetsMap.get(r);t||(t=new Set,this._imageIdsToDisplaySetsMap.set(r,t)),t.add(e)}}_getImageIdsForDisplaySet(e){return this._extensionManager.getActiveDataSource()[0].getImageIdsForDisplaySet(e)}_updateDisplaySetLoadingProgress(e){let{numInstances:t,loadedImageIds:r,failedImageIds:n}=e;e.loadingProgress=(r.size+n.size)/t}_addDisplaySetLoadingState(e){let{displaySetInstanceUID:t}=e,r=this._getImageIdsForDisplaySet(e),n=this._displaySetLoadingStates.get(t);if(n)return;let a=new Set(r),i=new Set;for(let e of r)this.cache.isImageCached(e)?i.add(e):a.add(e);n={displaySetInstanceUID:t,numInstances:r.length,pendingImageIds:a,loadedImageIds:i,failedImageIds:new Set,loadingProgress:0},this._updateDisplaySetLoadingProgress(n),this._displaySetLoadingStates.set(t,n),this._updateImageIdsDisplaySetMap(t,r),i.size&&this._triggerDisplaySetEvents(t)}_loadDisplaySets(){let{displaySets:e,displaySetsToPrefetch:t}=this._getDisplaySets();e.forEach(e=>this._addDisplaySetLoadingState(e)),t.forEach(e=>this._enqueueDisplaySetImagesRequests(e))}_moveImageIdToLoadedSet(e){let t=this._imageIdsToDisplaySetsMap.get(e);if(t){for(let r of Array.from(t.values())){let t=this._displaySetLoadingStates.get(r),{pendingImageIds:n,loadedImageIds:a}=t;n.delete(e),a.add(e),this._updateDisplaySetLoadingProgress(t),this._triggerDisplaySetEvents(r)}return!0}}_moveImageIdToFailedSet(e){let t=this._imageIdsToDisplaySetsMap.get(e);if(t){for(let r of Array.from(t.values())){let t=this._displaySetLoadingStates.get(r),{pendingImageIds:n,failedImageIds:a}=t;n.delete(e),a.add(e),this._updateDisplaySetLoadingProgress(t),this._triggerDisplaySetEvents(r)}return!0}}_triggerDisplaySetEvents(e){let{loadingProgress:t,numInstances:r}=this._displaySetLoadingStates.get(e);this._broadcastEvent(this.EVENTS.DISPLAYSET_LOAD_PROGRESS,{displaySetInstanceUID:e,numInstances:r,loadingProgress:t}),t>=1&&this._broadcastEvent(this.EVENTS.DISPLAYSET_LOAD_COMPLETE,{displaySetInstanceUID:e})}_onImagePrefetchSuccess(e){if(e.aborted)return;let{imageId:t}=e;this._inflightRequests.delete(t),this._moveImageIdToLoadedSet(t),this._sendNextRequests()}_onImagePrefetchFailed(e,t){if(e.aborted)return;console.warn(`An error ocurred when trying to load "${e.imageId}"`,t);let{imageId:r}=e;this._inflightRequests.delete(r),this._moveImageIdToFailedSet(r),this._sendNextRequests()}async _sendNextRequests(){if(!this._isRunning||!this._areActiveDisplaySetsLoaded())return;let{_pendingRequests:e,_inflightRequests:t}=this,{maxNumPrefetchRequests:r}=this.config;if(!e.length||t.size>=r)return;let n=Math.min(e.length,r-t.size);this._pendingRequests.splice(0,n).forEach(e=>{let{imageId:r}=e,n={priority:-5,requestType:this.requestType,additionalDetails:{imageId:r},preScale:{enabled:!0}};this.imageLoadPoolManager.addRequest(async()=>this.imageLoader.loadAndCacheImage(r,n).then(t=>this._onImagePrefetchSuccess(e),t=>this._onImagePrefetchFailed(e,t)),this.requestType,{imageId:r}),t.set(r,e)})}_enqueueDisplaySetImagesRequests(e){let{displaySetInstanceUID:t}=e;this._getImageIdsForDisplaySet(e).forEach(e=>{this.cache.isImageCached(e)?this._moveImageIdToLoadedSet(e):this._pendingRequests.push({displaySetInstanceUID:t,imageId:e,aborted:!1})})}_startPrefetching(){if(!this._isRunning){if(!this.config.enabled)return void console.log("StudyPrefetcher is not enabled");this._isRunning=!0,this._loadDisplaySets(),this._sendNextRequests(),this._broadcastEvent(this.EVENTS.SERVICE_STARTED,{})}}_stopPrefetching(){this._isRunning&&(this._isRunning=!1,this._inflightRequests.forEach(e=>e.aborted=!0),this._pendingRequests=[],this._displaySetLoadingStates.clear(),this._imageIdsToDisplaySetsMap.clear(),this._inflightRequests.clear(),this.imageLoadPoolManager.clearRequestStack(this.requestType),this._broadcastEvent(this.EVENTS.SERVICE_STOPPED,{}))}_restartPrefetching(){this._isRunning&&(this._stopPrefetching(),this._startPrefetching())}}LG.REGISTRATION={name:"studyPrefetcherService",altName:"StudyPrefetcherService",create:({configuration:e,servicesManager:t,extensionManager:r})=>new LG({servicesManager:t,extensionManager:r,configuration:e})};class Lq{constructor(e,t){this.numberOfScreens=void 0,this.windowsConfig=void 0,this.screenConfig=void 0,this.launchWindows=[],this.basePath=void 0,this.screenNumber=void 0,this.isMultimonitor=void 0,this.setLaunchWindows=e=>{this.launchWindows=e,window.multimonitor.launchWindows=e};const r=new URLSearchParams(window.location.search),n=r.get("screenNumber"),a=r.get("multimonitor"),i={params:r,screenNumber:n,multimonitor:a};this.screenNumber=n?Number(n):-1,this.commandsManager=t;const o=window;for(const r of(o.multimonitor||={setLaunchWindows:this.setLaunchWindows,launchWindows:this.launchWindows,commandsManager:t},o.multimonitor.commandsManager=t,this.launchWindows=window.multimonitor?.launchWindows||this.launchWindows,-1!==this.screenNumber&&(this.launchWindows[this.screenNumber]=window),o.commandsManager=(...t)=>e.commandsManager,Array.isArray(e)?e:[])){if(r.test(i)){if(this.isMultimonitor=!0,this.numberOfScreens=r.screens.length,this.windowsConfig=r,-1===this.screenNumber||null===this.screenNumber)this.screenConfig=Lq.SOURCE_SCREEN;else{if(this.screenConfig=r.screens[this.screenNumber],!this.screenConfig)throw Error(`Screen ${n} not configured in ${this.windowsConfig}`);window.name=this.screenConfig.id}return}this.numberOfScreens=1,this.isMultimonitor=!1}}async run(e=1,t,r){let n=(this.screenNumber+(e??1))%this.numberOfScreens,a=await this.getWindow(n);a?a.multimonitor?.commandsManager?a.multimonitor.commandsManager.runAsync(t,r):console.warn("Didn't find a commands manager to run in the other window",a):console.warn("No multimonitor found for screen",n,t)}async launchWindow(e,t=1,r=""){let n=(this.screenNumber+t)%this.numberOfScreens;return this.getWindow(n,e?`StudyInstanceUIDs=${e}${r}`:"")}async getWindow(e,t){return e===this.screenNumber?window:this.launchWindows[e]&&!this.launchWindows[e].closed?this.launchWindows[e]:await this.createWindow(e,t)}async createWindow(e,t){if(e===this.screenNumber)return window;let r=this.windowsConfig.screens[e],n=await window.getScreenDetails?.(),{width:a=1024,height:i=1024,availLeft:o=0,availTop:s=0}=r.screen>=0&&n.screens[r.screen]||n.currentScreen||window.screen||{},l=this.windowsConfig.screens[e],{width:u=1,height:c=1,top:d=0,left:h=0}=l.location||{},p=Math.round(o+h*a),f=Math.round(s+d*i),m=Math.round(a*u),g=Math.round(i*c),y=`${this.basePath}&screenNumber=${e}`,v=t?`${y}#${t}`:y,b=l.id,w=l.options||"",x=`screenX=${p},screenY=${f},width=${m},height=${g},${w}`,C=window.open("",b,x);return(C?.location.href.startsWith(y)||(C=window.open(v,b,x)),C)?(await new Promise(e=>{"complete"===C.document.readyState?e():C.addEventListener("load",()=>e())}),this.launchWindows[e]=C,C):void console.warn("Unable to launch window",v,"called",b,"at",x)}launchAll(){for(let e=0;e<this.numberOfScreens;e++)this.createWindow(e)}setBasePath(){let e=new URL(window.location.href);e.searchParams.delete("screenNumber"),e.searchParams.delete("protocolId"),e.searchParams.delete("launchAll"),e.searchParams.set("multimonitor",e.searchParams.get("multimonitor")||"split"),e.hash="",this.basePath=e.toString()}async onModeEnter(){this.setBasePath(),(this.isMultimonitor&&-1===this.screenNumber||-1!==window.location.href.toLowerCase().indexOf("launchall"))&&this.launchAll()}}Lq.SOURCE_SCREEN={id:"source",launch:"source",screen:null,location:{screen:null,width:1,height:1,left:0,top:0}},Lq.REGISTRATION={name:"multiMonitorService",create:({configuration:e,commandsManager:t})=>new Lq(e,t)};class L$ extends Ni{constructor({commandsManager:e,servicesManager:t,serviceProvidersManager:r,hotkeysManager:n,appConfig:a={}}){super(L$.EVENTS),this._commandsManager=void 0,this._servicesManager=void 0,this._hotkeysManager=void 0,this._serviceProvidersManager=void 0,this.modulesMap=void 0,this.modules=void 0,this.registeredExtensionIds=void 0,this.moduleTypeNames=void 0,this._appConfig=void 0,this._extensionLifeCycleHooks=void 0,this.dataSourceMap=void 0,this.dataSourceDefs=void 0,this._activeDataSourceName=void 0,this.registerExtensions=async(e,t=[])=>{for(let r=0;r<e.length;r++){let n=e[r],a=Array.isArray(n);try{if(a){let e=n[0],r=n[1];await this.registerExtension(e,r,t)}else await this.registerExtension(n,{},t)}catch(e){console.error(e)}}},this.registerExtension=async(e,t={},r=[])=>{if(!e)throw Error("Attempting to register a null/undefined extension.");let n=e.id;if(!n)throw R6.warn(e),Error("Extension ID not set");this.registeredExtensionIds.includes(n)?R6.warn(`Extension ID ${n} has already been registered. Exiting before duplicating modules.`):(e.preRegistration&&await e.preRegistration({servicesManager:this._servicesManager,serviceProvidersManager:this._serviceProvidersManager,commandsManager:this._commandsManager,hotkeysManager:this._hotkeysManager,extensionManager:this,appConfig:this._appConfig,configuration:t}),e.onModeEnter&&(this._extensionLifeCycleHooks.onModeEnter[n]=e.onModeEnter),e.onModeExit&&(this._extensionLifeCycleHooks.onModeExit[n]=e.onModeExit),this.moduleTypeNames.forEach(a=>{let i=this._getExtensionModule(a,e,n,t);if(i){switch(a){case R8.COMMANDS:this._initCommandsModule(i);break;case R8.DATA_SOURCE:this._initDataSourcesModule(i,n,r);break;case R8.HANGING_PROTOCOL:this._initHangingProtocolsModule(i,n);break;case R8.PANEL:this._initPanelModule(i,n);break;case R8.TOOLBAR:this._initToolbarModule(i,n);break;case R8.VIEWPORT:case R8.SOP_CLASS_HANDLER:case R8.CONTEXT:case R8.LAYOUT_TEMPLATE:case R8.CUSTOMIZATION:case R8.STATE_SYNC:case R8.UTILITY:this.processExtensionModule(i,n,a);break;default:throw Error(`Module type invalid: ${a}`)}this.modules[a].push({extensionId:n,module:i})}}),this.registeredExtensionIds.push(n))},this.getModuleEntry=e=>this.modulesMap[e],this.getModulesByType=e=>this.modules[e],this.getDataSources=e=>(e||(e=this._activeDataSourceName),this.dataSourceMap[e]),this.getDataSourceInstance=e=>this.dataSourceMap[e][0],this.getActiveDataSource=()=>this.dataSourceMap[this._activeDataSourceName],this.getActiveDataSourceOrNull=()=>this.dataSourceMap[this._activeDataSourceName]?.[0]??null,this.getDataSourceDefinition=e=>(void 0===e&&(e=this._activeDataSourceName),this.dataSourceDefs[e]),this.getActiveDataSourceDefinition=()=>this.getDataSourceDefinition(this._activeDataSourceName),this.getDataSourcesForUI=()=>{if(this._appConfig?.allowMultiSelectExport===!1)return[];let e=Object.keys(this.dataSourceMap).filter(e=>{let t=this.dataSourceDefs[e]?.configuration,r=this.dataSourceDefs[e].sourceName!==this._activeDataSourceName;return(t?.supportsStow??t?.wadoRoot)&&r});return[this._activeDataSourceName,...e].map(e=>({value:e,label:e,placeHolder:e}))},this._getExtensionModule=(e,t,r,n)=>{var a;let i="get"+((a=e).charAt(0).toUpperCase()+a.substring(1));if(t[i])try{let e=t[i]({appConfig:this._appConfig,commandsManager:this._commandsManager,servicesManager:this._servicesManager,hotkeysManager:this._hotkeysManager,extensionManager:this,configuration:n});return e||R6.warn(`Null or undefined returned when registering the ${i} module for the ${r} extension`),e}catch(e){throw console.error(e),Error(`Exception thrown while trying to call ${i} for the ${r} extension`)}},this._initHangingProtocolsModule=(e,t)=>{let{hangingProtocolService:r}=this._servicesManager.services;e.forEach(({name:e,protocol:t})=>{t&&r.addProtocol(e,t)})},this._initPanelModule=(e,t)=>{this.processExtensionModule(e,t,R8.PANEL)},this._initToolbarModule=(e,t)=>{let{toolbarService:r}=this._servicesManager.services;e.forEach(e=>{e.evaluate&&r.registerEvaluateFunction(e.name,e.evaluate)})},this._initCommandsModule=e=>{let{definitions:t,defaultContext:r}=e;t&&0!==Object.keys(t).length?(r=r||"VIEWER",this._commandsManager.getContext(r)||this._commandsManager.createContext(r),Object.keys(t).forEach(e=>{let n=t[e];"function"==typeof n&&(n={commandFn:n}),n.context&&!this._commandsManager.getContext(n.context)&&this._commandsManager.createContext(n.context),this._commandsManager.registerCommand(n.context||r,e,n)})):R6.warn("Commands Module contains no command definitions")},this.modules={},this.registeredExtensionIds=[],this.moduleTypeNames=Object.values(R8),this._commandsManager=e,this._servicesManager=t,this._serviceProvidersManager=r,this._hotkeysManager=n,this._appConfig=a,this.modulesMap={},this.moduleTypeNames.forEach(e=>{this.modules[e]=[]}),this._extensionLifeCycleHooks={onModeEnter:{},onModeExit:{}},this.dataSourceMap={},this.dataSourceDefs={},this.defaultDataSourceName=a.defaultDataSourceName,this._activeDataSourceName=a.defaultDataSourceName,this.peerImport=a.peerImport}setActiveDataSource(e){this._activeDataSourceName!==e&&(this._activeDataSourceName=e,this._broadcastEvent(L$.EVENTS.ACTIVE_DATA_SOURCE_CHANGED,this.dataSourceDefs[this._activeDataSourceName]))}getRegisteredExtensionIds(){return[...this.registeredExtensionIds]}getUniqueServicesList(e){return Array.from(new Set(Object.values(e.services)))}onModeEnter(){let{registeredExtensionIds:e,_servicesManager:t,_commandsManager:r,_hotkeysManager:n,_extensionLifeCycleHooks:a}=this;for(let e of this.getUniqueServicesList(t))e?.onModeEnter?.();e.forEach(e=>{let i=a.onModeEnter[e];"function"==typeof i&&i({servicesManager:t,commandsManager:r,hotkeysManager:n,extensionManager:this})})}onModeExit(){let{registeredExtensionIds:e,_servicesManager:t,_commandsManager:r,_extensionLifeCycleHooks:n}=this,a=this.getUniqueServicesList(t);for(let i of(e.forEach(e=>{let a=n.onModeExit[e];"function"==typeof a&&a({servicesManager:t,commandsManager:r})}),a))try{i?.onModeExit?.()}catch(e){console.warn("onModeExit caught",e)}}processExtensionModule(e,t,r){e.forEach(e=>{if(!e.name)throw Error(`Extension ID ${t} module ${r} element has no name`);let n=`${t}.${r}.${e.name}`;e.id=n,this.modulesMap[n]=e})}addDataSource(e,t={activate:!1}){let r=this.getDataSources(e.sourceName);!r?.[0]&&(this._createDataSourceInstance(e),t.activate&&this.setActiveDataSource(e.sourceName))}updateDataSourceConfiguration(e,t){let r=this.getDataSources(e);if(!r?.[0])return;let n=this.dataSourceDefs[e];n.configuration=t,this._createDataSourceInstance(n),this._activeDataSourceName===e&&this._broadcastEvent(L$.EVENTS.ACTIVE_DATA_SOURCE_CHANGED,n)}_createDataSourceInstance(e){let t=this.getModuleEntry(e.namespace);if(!t)return;this.dataSourceDefs[e.sourceName]=e;let r=t.createDataSource(e.configuration,this._servicesManager,this);this.dataSourceMap[e.sourceName]=[r]}_initDataSourcesModule(e,t,r=[]){e.forEach(e=>{this.modulesMap[`${t}.${R8.DATA_SOURCE}.${e.name}`]=e}),e.forEach(e=>{let n=`${t}.${R8.DATA_SOURCE}.${e.name}`;r.forEach(e=>{e.namespace===n&&this.addDataSource(e)})})}get appConfig(){return this._appConfig}get activeDataSourceName(){return this._activeDataSourceName}}L$.EVENTS={ACTIVE_DATA_SOURCE_CHANGED:"event::activedatasourcechanged"},L$.MODULE_TYPES=R8;var LK=u(2203),LY=u.n(LK);let LX=[{commandName:"setToolActive",commandOptions:{toolName:"Zoom"},label:"Zoom",keys:["z"],isEditable:!0},{commandName:"scaleUpViewport",label:"Zoom In",keys:["+"],isEditable:!0},{commandName:"scaleDownViewport",label:"Zoom Out",keys:["-"],isEditable:!0},{commandName:"fitViewportToWindow",label:"Zoom to Fit",keys:["="],isEditable:!0},{commandName:"rotateViewportCW",label:"Rotate Right",keys:["r"],isEditable:!0},{commandName:"rotateViewportCCW",label:"Rotate Left",keys:["l"],isEditable:!0},{commandName:"flipViewportHorizontal",label:"Flip Horizontally",keys:["h"],isEditable:!0},{commandName:"flipViewportVertical",label:"Flip Vertically",keys:["v"],isEditable:!0},{commandName:"toggleCine",label:"Cine",keys:["c"]},{commandName:"invertViewport",label:"Invert",keys:["i"],isEditable:!0},{commandName:"incrementActiveViewport",label:"Next Image Viewport",keys:["right"],isEditable:!0},{commandName:"decrementActiveViewport",label:"Previous Image Viewport",keys:["left"],isEditable:!0},{commandName:"updateViewportDisplaySet",commandOptions:{direction:-1},label:"Previous Series",keys:["pageup"],isEditable:!0},{commandName:"updateViewportDisplaySet",commandOptions:{direction:1},label:"Next Series",keys:["pagedown"],isEditable:!0},{commandName:"nextStage",context:"DEFAULT",label:"Next Stage",keys:["."],isEditable:!0},{commandName:"previousStage",context:"DEFAULT",label:"Previous Stage",keys:[","],isEditable:!0},{commandName:"nextImage",label:"Next Image",keys:["down"],isEditable:!0},{commandName:"previousImage",label:"Previous Image",keys:["up"],isEditable:!0},{commandName:"firstImage",label:"First Image",keys:["home"],isEditable:!0},{commandName:"lastImage",label:"Last Image",keys:["end"],isEditable:!0},{commandName:"resetViewport",label:"Reset",keys:["space"],isEditable:!0},{commandName:"cancelActiveOperation",label:"Cancel",keys:["esc"]},{commandName:"setWindowLevelPreset",commandOptions:{presetName:"ct-soft-tissue",presetIndex:0},label:"W/L Preset 1",keys:["1"]},{commandName:"setWindowLevelPreset",commandOptions:{presetName:"ct-lung",presetIndex:1},label:"W/L Preset 2",keys:["2"]},{commandName:"setWindowLevelPreset",commandOptions:{presetName:"ct-bone",presetIndex:2},label:"W/L Preset 3",keys:["3"]},{commandName:"setWindowLevelPreset",commandOptions:{presetName:"ct-brain",presetIndex:3},label:"W/L Preset 4",keys:["4"]},{commandName:"deleteActiveAnnotation",label:"Delete Annotation",keys:["backspace"]},{commandName:"acceptPreview",label:"Accept Preview",keys:["enter"]},{commandName:"undo",label:"Undo",keys:["ctrl+z"],isEditable:!0},{commandName:"redo",label:"Redo",keys:["ctrl+y"],isEditable:!0},{commandName:"interpolateScrollForMarkerLabelmap",label:"Interpolate Scroll",keys:["n"],isEditable:!0},{commandName:"increaseBrushSize",label:"Increase Brush Size",keys:["]"],isEditable:!0},{commandName:"decreaseBrushSize",label:"Decrease Brush Size",keys:["["],isEditable:!0},{commandName:"setToolActive",commandOptions:{toolName:"CircularEraser"},label:"Eraser",keys:["e"],isEditable:!0},{commandName:"setToolActive",commandOptions:{toolName:"CircularBrush"},label:"Brush",keys:["b"],isEditable:!0},{commandName:"addNewSegment",label:"Add New Segment",keys:["a"],isEditable:!0}],LZ=function({generateHash:e}){try{let t=localStorage.getItem("hotkey-definitions"),r=localStorage.getItem("hotkeys-migrated");if(!t||"true"===r)return;let n=JSON.parse(t);if(!Array.isArray(n)||0===n.length)return;let a=LX||[],i=JSON.parse(localStorage.getItem("user-preferred-keys")||"{}");n.forEach(t=>{if(!t.commandName||!t.keys)return;let r=a.find(e=>{let r=e.commandName===t.commandName,n=t.commandOptions||{},a=e.commandOptions||{},i=JSON.stringify(n)===JSON.stringify(a);return r&&i});r&&JSON.stringify(r.keys)===JSON.stringify(t.keys)||(i[e({commandName:t.commandName,commandOptions:t.commandOptions||{}})]=t.keys,console.debug(`HotkeysManager: Migrated custom hotkey for ${t.commandName}`))}),localStorage.setItem("user-preferred-keys",JSON.stringify(i)),localStorage.setItem("hotkeys-migrated","true"),localStorage.removeItem("hotkey-definitions"),console.debug("HotkeysManager: Successfully migrated hotkey definitions to new format")}catch(e){console.error("HotkeysManager: Error migrating hotkey definitions",e),localStorage.setItem("hotkeys-migrated","false")}};class LJ{constructor(e,t){this._servicesManager=void 0,this._commandsManager=void 0,this.isEnabled=!0,this.hotkeyDefinitions={},this.hotkeyDefaults=[],this.EVENTS=void 0,this.listeners={},this.subscribe=void 0,this._broadcastEvent=void 0,this._unsubscribe=void 0,this._isValidEvent=void 0,this._servicesManager=t,this._commandsManager=e,this.EVENTS=LJ.EVENTS,this.subscribe=Ne.subscribe.bind(this),this._broadcastEvent=Ne._broadcastEvent.bind(this),this._unsubscribe=Ne._unsubscribe.bind(this),this._isValidEvent=Ne._isValidEvent.bind(this),LZ({generateHash:this.generateHash})}record(e){return N5.record(e)}cancel(){N5.stopRecord(),N5.unpause()}disable(){this.isEnabled=!1,N5.pause()}enable(){this.isEnabled=!0,N5.unpause()}restoreDefaultBindings(){this.setHotkeys(this.hotkeyDefaults)}destroy(){this.hotkeyDefaults=[],this.hotkeyDefinitions={},N5.reset()}setHotkeys(e=[]){try{this.getValidDefinitions(e).forEach(e=>this.registerHotkeys(e))}catch(t){let{uiNotificationService:e}=this._servicesManager.services;e.show({title:"Hotkeys Manager",message:"Error while setting hotkeys",type:"error"})}}generateHash(e){return LY()({commandName:e.commandName,commandOptions:e.commandOptions||{}})}setDefaultHotKeys(e=[]){let t=this.getValidDefinitions(e);this.hotkeyDefaults=t;let r=JSON.parse(localStorage.getItem("user-preferred-keys")||"{}"),n=t.map(e=>{let t=this.generateHash(e);return r[t]?{...e,keys:r[t]}:e});this.setHotkeys(n)}getValidDefinitions(e){let t=Array.isArray(e)?[...e]:this._parseToArrayLike(e);return t.forEach(e=>{void 0===e.isEditable&&(e.isEditable=!0)}),t}getValidHotkeyDefinitions(e){let t=this.getValidDefinitions(e),r={};return t.forEach(e=>{let{commandName:t,commandOptions:n}=e;r[LY()({commandName:t,commandOptions:n})]=e}),r}_parseToArrayLike(e={}){return Object.entries({...e}).map(e=>this._parseToHotKeyObj(e[0],e[1]))}_parseToHotKeyObj(e,t){return{commandName:e,...t}}registerHotkeys({commandName:e,commandOptions:t={},context:r,keys:n,label:a,isEditable:i}){if(!e)throw Error(`No command was defined for hotkey "${n}"`);let o=this.generateHash({commandName:e,commandOptions:t}),s=this.hotkeyDefinitions[o];if(s&&s.keys===n)return void console.debug("HotkeysManager: Identical hotkey registration skipped.");let l=JSON.parse(localStorage.getItem("user-preferred-keys")||"{}");s&&(l[o]=n,localStorage.setItem("user-preferred-keys",JSON.stringify(l)),this._unbindHotkeys(e,s.keys)),this.hotkeyDefinitions[o]={commandName:e,commandOptions:t,keys:n,label:a,isEditable:i},this._bindHotkeys(e,t,r,n)}_bindHotkeys(e,t={},r,n){if(""===n||void 0===n)return;let a=n instanceof Array?n.join("+"):n;N5.bind(a,n=>{n.preventDefault(),n.stopPropagation(),this._commandsManager.runCommand(e,{evt:n,...t},r),this._broadcastEvent(LJ.EVENTS.HOTKEY_PRESSED,{commandName:e,commandOptions:t,keys:a,context:r,evt:n})})}_unbindHotkeys(e,t){if(""!==t&&void 0!==t){if(t instanceof Array){let r=t.join("+");this._unbindHotkeys(e,r);return}N5.unbind(t)}}}LJ.EVENTS={HOTKEY_PRESSED:"event::hotkeysManager:hotkeyPressed"};var LQ=u(313),L1=u.n(LQ);(efX=emM||(emM={})).ERROR_EVENT="CORNERSTONE_ERROR",efX.CACHE_SIZE_EXCEEDED="CACHE_SIZE_EXCEEDED",efX.IMAGE_LOAD_ERROR="IMAGE_LOAD_ERROR",efX.CAMERA_MODIFIED="CORNERSTONE_CAMERA_MODIFIED",efX.CAMERA_RESET="CORNERSTONE_CAMERA_RESET",efX.VOI_MODIFIED="CORNERSTONE_VOI_MODIFIED",efX.PRESET_MODIFIED="CORNERSTONE_VIEWPORT_RENDERING_PRESET_MODIFIED",efX.DISPLAY_AREA_MODIFIED="CORNERSTONE_DISPLAY_AREA_MODIFIED",efX.ELEMENT_DISABLED="CORNERSTONE_ELEMENT_DISABLED",efX.ELEMENT_ENABLED="CORNERSTONE_ELEMENT_ENABLED",efX.IMAGE_RENDERED="CORNERSTONE_IMAGE_RENDERED",efX.IMAGE_VOLUME_MODIFIED="CORNERSTONE_IMAGE_VOLUME_MODIFIED",efX.IMAGE_VOLUME_LOADING_COMPLETED="CORNERSTONE_IMAGE_VOLUME_LOADING_COMPLETED",efX.IMAGE_LOADED="CORNERSTONE_IMAGE_LOADED",efX.IMAGE_RETRIEVAL_STAGE="CORNERSTONE_IMAGE_RETRIEVAL_STAGE",efX.IMAGE_LOAD_FAILED="CORNERSTONE_IMAGE_LOAD_FAILED",efX.VOLUME_VIEWPORT_NEW_VOLUME="CORNERSTONE_VOLUME_VIEWPORT_NEW_VOLUME",efX.VOLUME_LOADED="CORNERSTONE_VOLUME_LOADED",efX.VOLUME_LOADED_FAILED="CORNERSTONE_VOLUME_LOADED_FAILED",efX.IMAGE_CACHE_IMAGE_ADDED="CORNERSTONE_IMAGE_CACHE_IMAGE_ADDED",efX.IMAGE_CACHE_IMAGE_REMOVED="CORNERSTONE_IMAGE_CACHE_IMAGE_REMOVED",efX.VOLUME_CACHE_VOLUME_ADDED="CORNERSTONE_VOLUME_CACHE_VOLUME_ADDED",efX.VOLUME_CACHE_VOLUME_REMOVED="CORNERSTONE_VOLUME_CACHE_VOLUME_REMOVED",efX.STACK_NEW_IMAGE="CORNERSTONE_STACK_NEW_IMAGE",efX.VOLUME_NEW_IMAGE="CORNERSTONE_VOLUME_NEW_IMAGE",efX.PRE_STACK_NEW_IMAGE="CORNERSTONE_PRE_STACK_NEW_IMAGE",efX.IMAGE_SPACING_CALIBRATED="CORNERSTONE_IMAGE_SPACING_CALIBRATED",efX.VIEWPORT_NEW_IMAGE_SET="CORNERSTONE_VIEWPORT_NEW_IMAGE_SET",efX.STACK_VIEWPORT_SCROLL="CORNERSTONE_STACK_VIEWPORT_SCROLL",efX.STACK_SCROLL_OUT_OF_BOUNDS="STACK_SCROLL_OUT_OF_BOUNDS",efX.GEOMETRY_CACHE_GEOMETRY_ADDED="CORNERSTONE_GEOMETRY_CACHE_GEOMETRY_ADDED",efX.GEOMETRY_CACHE_GEOMETRY_REMOVED="CORNERSTONE_GEOMETRY_CACHE_GEOMETRY_REMOVED",efX.VOLUME_VIEWPORT_SCROLL_OUT_OF_BOUNDS="VOLUME_VIEWPORT_SCROLL_OUT_OF_BOUNDS",efX.VOLUME_VIEWPORT_SCROLL="VOLUME_VIEWPORT_SCROLL",efX.CLIPPING_PLANES_UPDATED="CORNERSTONE_CLIPPING_PLANES_UPDATED",efX.WEB_WORKER_PROGRESS="CORNERSTONE_WEB_WORKER_PROGRESS",efX.COLORMAP_MODIFIED="CORNERSTONE_COLORMAP_MODIFIED",efX.DYNAMIC_VOLUME_DIMENSION_GROUP_CHANGED="DYNAMIC_VOLUME_DIMENSION_GROUP_CHANGED",efX.DYNAMIC_VOLUME_TIME_POINT_INDEX_CHANGED="DYNAMIC_VOLUME_TIME_POINT_INDEX_CHANGED",efX.DYNAMIC_VOLUME_DIMENSION_GROUP_LOADED="DYNAMIC_VOLUME_DIMENSION_GROUP_LOADED",efX.DYNAMIC_VOLUME_TIME_POINT_LOADED="DYNAMIC_VOLUME_TIME_POINT_LOADED",efX.GEOMETRY_LOADED="GEOMETRY_LOADED",efX.GEOMETRY_LOAD_PROGRESS="GEOMETRY_LOAD_PROGRESS",efX.GEOMETRY_LOADED_FAILED="GEOMETRY_LOADED_FAILED",efX.ACTORS_CHANGED="CORNERSTONE_ACTORS_CHANGED";let L0=emM;(efZ=emS||(emS={})).Interaction="interaction",efZ.Thumbnail="thumbnail",efZ.Prefetch="prefetch",efZ.Compute="compute";let L2=emS;(efJ=emE||(emE={})).STACK="stack",efJ.ORTHOGRAPHIC="orthographic",efJ.PERSPECTIVE="perspective",efJ.VOLUME_3D="volume3d",efJ.VOLUME_3D_NEXT="volume3dNext",efJ.PLANAR_NEXT="planarNext",efJ.VIDEO="video",efJ.VIDEO_NEXT="videoNext",efJ.WHOLE_SLIDE="wholeSlide",efJ.WHOLE_SLIDE_NEXT="wholeSlideNext",efJ.ECG="ecg",efJ.ECG_NEXT="ecgNext";let L5=emE,L3={STACK:L5.STACK,ORTHOGRAPHIC:L5.ORTHOGRAPHIC,PERSPECTIVE:L5.PERSPECTIVE,VOLUME_3D:L5.VOLUME_3D,VOLUME_3D_NEXT:L5.VOLUME_3D_NEXT,PLANAR_NEXT:L5.PLANAR_NEXT,VIDEO:L5.VIDEO,VIDEO_NEXT:L5.VIDEO_NEXT,WHOLE_SLIDE:L5.WHOLE_SLIDE,WHOLE_SLIDE_NEXT:L5.WHOLE_SLIDE_NEXT,ECG:L5.ECG,ECG_NEXT:L5.ECG_NEXT};(efQ=emP||(emP={}))[efQ.NEAREST=0]="NEAREST",efQ[efQ.LINEAR=1]="LINEAR",efQ[efQ.FAST_LINEAR=2]="FAST_LINEAR";let L4=emP,L8={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3,ADDITIVE_INTENSITY_BLEND:4,RADON_TRANSFORM_BLEND:5,LABELMAP_EDGE_PROJECTION_BLEND:6};var L6={BlendMode:L8};let{BlendMode:L9}=L6;(ef1=emI||(emI={}))[ef1.COMPOSITE=L9.COMPOSITE_BLEND]="COMPOSITE",ef1[ef1.MAXIMUM_INTENSITY_BLEND=L9.MAXIMUM_INTENSITY_BLEND]="MAXIMUM_INTENSITY_BLEND",ef1[ef1.MINIMUM_INTENSITY_BLEND=L9.MINIMUM_INTENSITY_BLEND]="MINIMUM_INTENSITY_BLEND",ef1[ef1.AVERAGE_INTENSITY_BLEND=L9.AVERAGE_INTENSITY_BLEND]="AVERAGE_INTENSITY_BLEND",ef1[ef1.LABELMAP_EDGE_PROJECTION_BLEND=L9.LABELMAP_EDGE_PROJECTION_BLEND]="LABELMAP_EDGE_PROJECTION_BLEND";let L7=emI;(ef0=emT||(emT={})).AXIAL="axial",ef0.CORONAL="coronal",ef0.SAGITTAL="sagittal",ef0.ACQUISITION="acquisition",ef0.AXIAL_REFORMAT="axial_reformat",ef0.CORONAL_REFORMAT="coronal_reformat",ef0.SAGITTAL_REFORMAT="sagittal_reformat",ef0.REFORMAT="reformat";let Ve=emT;(ef2=em_||(em_={})).CONTOUR="CONTOUR",ef2.SURFACE="SURFACE",ef2.MESH="MESH";let Vt=em_;(ef5=emD||(emD={})).CLOSED_PLANAR="CLOSED_PLANAR",ef5.OPEN_PLANAR="OPEN_PLANAR",(ef3=emA||(emA={})).PLY="PLY",ef3.STL="STL",ef3.OBJ="OBJ",ef3.VTP="VTP";let Vr=emA;(ef4=emO||(emO={})).LINEAR="LINEAR",ef4.SAMPLED_SIGMOID="SIGMOID",ef4.LINEAR_EXACT="LINEAR_EXACT";let Vn=emO;(ef8=emR||(emR={})).SUM="SUM",ef8.AVERAGE="AVERAGE",ef8.SUBTRACT="SUBTRACT";class Va{constructor(e){this.fullDate=e}getTimeInSec(){let e=this.fullDate.substring(0,10),t=this.fullDate.substring(11,28),r=parseInt(e.substring(0,4),10),n=e.length>=7?parseInt(e.substring(5,7),10):void 0,a=e.length>=10?parseInt(e.substring(8,10),10):void 0;if(isNaN(r)||void 0!==n&&isNaN(n)||void 0!==a&&isNaN(a)||r>3e3||n&&(n<1||n>12)||a&&(a<1||a>31))throw Error(`invalid date '${e}'`);let i=new Date(`${e}T00:00:00.000000Z`),o=parseInt(t.substring(0,2),10),s=t.length>=5?parseInt(t.substring(3,5),10):void 0,l=t.length>=8?parseInt(t.substring(6,8),10):void 0,u=t.substring(9,15),c=u?parseInt(u,10)*Math.pow(10,-u.length):void 0;if(isNaN(o)||void 0!==s&&isNaN(s)||void 0!==l&&isNaN(l)||void 0!==c&&isNaN(c)||o<0||o>23||s&&(s<0||s>59)||l&&(l<0||l>59)||c&&(c<0||c>999999))throw Error(`invalid time '${t}'`);let d=i.getTime()/1e3;return d+=3600*o,void 0!==s&&(d+=60*s),void 0!==l&&(d+=l),void 0!==c&&(d+=c),d}getTimeInMicroSec(){return 1e6*this.getTimeInSec()}}function Vi(e,t){let r=`${t.hours||"00"}`.padStart(2,"0"),n=`${t.minutes||"00"}`.padStart(2,"0"),a=`${t.seconds||"00"}`.padStart(2,"0"),i=`${e.month}`.padStart(2,"0"),o=`${e.day}`.padStart(2,"0"),s=`${t.fractionalSeconds||"000000"}`.padEnd(6,"0"),l=`${e.year}-${i}-${o}`,u=`T${r}:${n}:${a}.${s}Z`;return new Va(`${l}${u}`)}function Vo(e){if(null==e||8!==e.length||"string"!=typeof e)throw Error(`invalid DA '${e}'`);let t=parseInt(e.substring(0,4),10),r=parseInt(e.substring(4,6),10),n=parseInt(e.substring(6,8),10);if(!0!=(!isNaN(t)&&r>0&&r<=12&&n>0&&n<=function(e,t){switch(e){case 2:return t%4==0&&t%100||t%400==0?29:28;case 9:case 4:case 6:case 11:return 30;default:return 31}}(r,t)))throw Error(`invalid DA '${e}'`);return{year:t,month:r,day:n}}function Vs(e){if(null==e||e.length<2||"string"!=typeof e)throw Error(`invalid TM '${e}'`);let t=parseInt(e.substring(0,2),10),r=e.length>=4?parseInt(e.substring(2,4),10):void 0,n=e.length>=6?parseInt(e.substring(4,6),10):void 0,a=e.length>=8?e.substring(7,13):void 0,i=a?parseInt(a,10)*Math.pow(10,6-a.length):void 0;if(isNaN(t)||void 0!==r&&isNaN(r)||void 0!==n&&isNaN(n)||void 0!==i&&isNaN(i)||t<0||t>23||r&&(r<0||r>59)||n&&(n<0||n>59)||i&&(i<0||i>999999))throw Error(`invalid TM '${e}'`);return{hours:t,minutes:r,seconds:n,fractionalSeconds:i}}function Vl(e){if(null==e)throw Error("dateTimeToFullDateInterface : dateTime not defined.");return Vi(Vo(e.substring(0,8)),Vs(e.substring(8)))}function Vu(e){let t,r,{CorrectedImage:n,Units:a,PhilipsPETPrivateGroup:i,PatientWeight:o,PatientSex:s,PatientSize:l}=e[0];if(!n.includes("ATTN")||!n.includes("DECY"))throw Error(`CorrectedImage must contain "ATTN" and "DECY": ${n}`);if(!e.every(t=>{let r;return t.Units===a&&((r=t.CorrectedImage)===n||Array.isArray(r)&&Array.isArray(n)&&r.length===n.length&&r.every((e,t)=>e===n[t]))&&t.PatientWeight===o&&t.PatientSex===s&&t.PatientSize===l&&t.RadionuclideHalfLife===e[0].RadionuclideHalfLife&&t.RadionuclideTotalDose===e[0].RadionuclideTotalDose&&t.DecayCorrection===e[0].DecayCorrection&&t.SeriesDate===e[0].SeriesDate&&t.SeriesTime===e[0].SeriesTime}))throw Error("The set of instances does not appear to come from one Series. Every instance must have identical values for series-level metadata properties");if(null==o)throw Error("PatientWeight value is missing. It is not possible to calculate the SUV factors");let u=Array(e.length);u=function(e){let{RadionuclideTotalDose:t,RadionuclideHalfLife:r,RadiopharmaceuticalStartDateTime:n,RadiopharmaceuticalStartTime:a,SeriesDate:i}=e[0];if(null==t)throw Error("calculateDecayCorrection : RadionuclideTotalDose value not found.");if(null==r)throw Error("calculateDecayCorrection : RadionuclideHalfLife value not found.");let o=function(e){let{SeriesDate:t,SeriesTime:r,GEPrivatePostInjectionDateTime:n}=e[0],a=Array(e.length),i=Vi(Vo(t),Vs(r)),o=new Va("3000-01-01T00:00:00.000000Z"),s=o.getTimeInSec();if(e.forEach(e=>{let{AcquisitionDate:t,AcquisitionTime:r}=e,n=Vi(Vo(t),Vs(r));o=o.getTimeInSec()>=s||n.getTimeInSec()<o.getTimeInSec()?n:o}),o.getTimeInSec()>=s)throw Error("Earliest acquisition time or date could not be parsed.");return i.getTimeInSec()<=o.getTimeInSec()?a.fill(i):n?a.fill(Vl(n)):a.fill(o)}(e),s=function(e){let t,{RadiopharmaceuticalStartDateTime:r,RadiopharmaceuticalStartTime:n,SeriesDate:a}=e;if(r)return Vl(r);if(n&&a)return t=Vs(n),Vi(Vo(a),t);throw Error(`Invalid input: ${e}`)}({RadiopharmaceuticalStartDateTime:n,RadiopharmaceuticalStartTime:a,SeriesDate:i});return e.map((e,n)=>{let a=o[n].getTimeInSec()-s.getTimeInSec();if(a<0)throw Error("Decay time cannot be less than zero");return 1/(t*Math.pow(2,-a/r))})}(e);let c=Array(e.length),d=1e3*o;if("BQML"===a)c=u.map(function(e){return e*d});else if("CNTS"===a){let t=e.every(e=>{var t,r,n;return e.PhilipsPETPrivateGroup&&(null==(t=e.PhilipsPETPrivateGroup)?void 0:t.SUVScaleFactor)!==null&&(null==(r=e.PhilipsPETPrivateGroup)?void 0:r.SUVScaleFactor)!==void 0&&(null==(n=e.PhilipsPETPrivateGroup)?void 0:n.SUVScaleFactor)!==0}),r=e.every(e=>{var t,r,n;return e.PhilipsPETPrivateGroup&&!(null!=(t=e.PhilipsPETPrivateGroup)&&t.SUVScaleFactor)&&(null==(r=e.PhilipsPETPrivateGroup)?void 0:r.ActivityConcentrationScaleFactor)!==void 0&&(null==(n=e.PhilipsPETPrivateGroup)?void 0:n.ActivityConcentrationScaleFactor)!==0});if(t)c=e.map(e=>e.PhilipsPETPrivateGroup.SUVScaleFactor);else if(r)c=e.map((e,t)=>e.PhilipsPETPrivateGroup.ActivityConcentrationScaleFactor*u[t]*d);else throw Error(`Units are in CNTS, but PhilipsPETPrivateGroup has invalid values: ${JSON.stringify(i)}`)}else if("GML"===a)c.fill(1);else throw Error(`Units has an invalid value: ${a}`);return null==l?console.warn("PatientSize value is missing. It is not possible to calculate the SUV bsa factors"):t=function(e){let{PatientWeight:t,PatientSize:r}=e;return Math.pow(t,.425)*Math.pow(100*r,.725)*71.84}({PatientWeight:o,PatientSize:l}),null==l?console.warn("PatientSize value is missing. It is not possible to calculate the SUV lbm factors"):null==s?console.warn("PatientSex value is missing. It is not possible to calculate the SUV lbm factors"):r=function(e){let t,{PatientSex:r,PatientWeight:n,PatientSize:a}=e,i=n*n/(a*a*1e4);if("F"===r)t=1.07*n-148*i;else if("M"===r)t=1.1*n-120*i;else throw Error(`PatientSex is an invalid value: ${r}`);return 1e3*t}({PatientWeight:o,PatientSex:s,PatientSize:l}),c.map(function(e,n){let a={suvbw:e};return t&&(a.suvbsa=u[n]*t),r&&(a.suvlbm=u[n]*r),a})}(ef6=emN||(emN={})).NOT_APPLICABLE="",ef6.ERMF="ERMF",ef6.USER="User",ef6.PROJECTION="Proj",ef6.REGION="Region",ef6.ERROR="Error",ef6.UNCALIBRATED="Uncalibrated",ef6.CALIBRATED="Calibrated",ef6.UNKNOWN="Unknown";let Vc=emN;(ef9=emL||(emL={})).CALIBRATION="calibrationModule",ef9.CINE="cineModule",ef9.FRAME_OF_REFERENCE="frameOfReferenceModule",ef9.GENERAL_IMAGE="generalImageModule",ef9.GENERAL_SERIES="generalSeriesModule",ef9.GENERAL_STUDY="generalStudyModule",ef9.IMAGE_PIXEL="imagePixelModule",ef9.IMAGE_PLANE="imagePlaneModule",ef9.IMAGE_URL="imageUrlModule",ef9.MODALITY_LUT="modalityLutModule",ef9.MULTIFRAME="multiframeModule",ef9.NM_MULTIFRAME_GEOMETRY="nmMultiframeGeometryModule",ef9.OVERLAY_PLANE="overlayPlaneModule",ef9.PATIENT="patientModule",ef9.PATIENT_DEMOGRAPHIC="patientDemographicModule",ef9.PATIENT_STUDY="patientStudyModule",ef9.PET_IMAGE="petImageModule",ef9.PET_ISOTOPE="petIsotopeModule",ef9.PET_SERIES="petSeriesModule",ef9.SCALING="scalingModule",ef9.SOP_COMMON="sopCommonModule",ef9.ULTRASOUND_ENHANCED_REGION="ultrasoundEnhancedRegionModule",ef9.ECG="ecgModule",ef9.VOI_LUT="voiLutModule",ef9.TRANSFER_SYNTAX="transferSyntax",ef9.PLANE_ORIENTATION="PlaneOrientation",ef9.PLANE_POSITION="PlanePosition",ef9.PIXEL_MEASURES="PixelMeasures",ef9.XRAY_GEOMETRY="XrayGeometry",ef9.FRAME_PIXEL_DATA="FramePixelData",ef9.FRAME_MODULE="frameModule",ef9.URI_MODULE="uriModule",ef9.WADO_WEB_CLIENT="wadoWebClient",ef9.INSTANCE="instance",ef9.IMAGE_SOP_INSTANCE_REFERENCE="ImageSopInstanceReference",ef9.REFERENCED_SERIES_REFERENCE="ReferencedSeriesReference",ef9.PREDECESSOR_SEQUENCE="PredecessorSequence",ef9.STUDY_DATA="StudyData",ef9.SERIES_DATA="SeriesData",ef9.IMAGE_DATA="ImageData",ef9.RTSS_INSTANCE_DATA="RtssInstanceData",ef9.NEW_INSTANCE_DATA="NewInstanceData",ef9.RTSS_CONTOUR="metaRTSSContour",ef9.SEG_BIT="metaSegBitmap",ef9.SR_ANNOTATION="metaSrAnnotation",ef9.COMPRESSED_FRAME_DATA="compressedFrameData",ef9.BASE_IMAGE_ID="baseImageId",ef9.FRAME_IMAGE_IDS="frameImageIds",ef9.NATURALIZED="naturalized";let Vd=emL,Vh=[],Vp=new Map,Vf=new Map;function Vm(e,t=0){let r;if(!Vh.some(t=>t.provider===e)){for(r=0;r<Vh.length&&!(Vh[r].priority<=t);r++);Vh.splice(r,0,{priority:t,provider:e})}}function Vg(e,t,r){let n=Vf.get(e);if(n)return n(t,null,r)}function Vy(e){for(let t=0;t<Vh.length;t++)if(Vh[t].provider===e){Vh.splice(t,1);break}}function Vv(){for(;Vh.length>0;)Vh.pop();Vp.clear(),Vf.clear()}function Vb(e,t,r){if(void 0!==t)for(let n=0;n<Vh.length;n++){let a=Vh[n].provider(e,t,r);if(void 0!==a)return a}}function Vw(e,t,r){return Vb(e,t,r)}let Vx=(e,t)=>{var r;for(let n of[e,(r=e,`${r}Add`)]){let e=Vp.get(n);if(e)for(let r of e)r?.clearQuery?.(t)}},VC=e=>{var t;for(let r of Array.from(new Set([e,(t=e,`${t}Add`)]))){let e=Vp.get(r);if(e)for(let t of e)t?.clear?.()}},Vk=(e,...t)=>1===t.length?Vb(e,t[0]):t.map(t=>t&&Vb(e,t)).find(e=>void 0!==e);function VM(e,t,r=Vb){let n={};for(let a of t)try{let t=r(a,e);if(t){let e={};for(let r in t)r in t&&(e[VS(r)]=t[r]);Object.assign(n,e)}}catch(e){console.error(`Error retrieving ${a} data:`,e)}return n}let VS=e=>e.startsWith("sop")?`SOP${e.substring(3)}`:e.startsWith("voi")?`VOI${e.substring(3)}`:(e.endsWith("Id")&&(e=`${e.substring(0,e.length-2)}ID`),e.charAt(0).toUpperCase()+e.slice(1)),VE=e=>e.startsWith("SOP")?`sop${e.substring(3)}`:e.startsWith("VOI")?`voi${e.substring(3)}`:(e.endsWith("ID")&&!e.endsWith("UID")&&(e=`${e.substring(0,e.length-2)}Id`),e.charAt(0).toLowerCase()+e.slice(1));function VP(e,t,r){return Math.abs(e-t)<=r}function VI(e){return"number"==typeof e}function VT(e){return e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>0&&"number"==typeof e[0]}function V_(e,t,r=1e-5){return typeof e==typeof t&&null!==e&&null!==t&&(VI(e)&&VI(t)?VP(e,t,r):!!(VT(e)&&VT(t))&&function(e,t,r=1e-5){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!VP(e[n],t[n],r))return!1;return!0}(e,t,r))}let VD=e=>"number"==typeof e?-e:e?.map?e.map(VD):!e,VA=e=>"number"==typeof e?Math.abs(e):e?.map?e.map(VA):e,VO=(e,t,r)=>V_(VA(e),VA(t),r),VR=VH("cs3d"),VN=VR.getLogger("metadata"),VL=VR.getLogger("core"),VV=VR.getLogger("tools"),VF=VR.getLogger("dicomImageLoader"),Vj=VR.getLogger("ai"),VB=VR.getLogger("examples"),VW=VR.getLogger("worker"),VU=No.log.getLogger("consistency.dicom"),Vz=No.log.getLogger("consistency.image");function VH(e){let t=No.log.getLogger(e);return t.getLogger=(...t)=>VH(`${e}.${t.join(".")}`),t}function VG(...e){return VH(e.join("."))}let Vq=new Set(["1.2.840.10008.1.2.4.100","1.2.840.10008.1.2.4.100.1","1.2.840.10008.1.2.4.101","1.2.840.10008.1.2.4.101.1","1.2.840.10008.1.2.4.102","1.2.840.10008.1.2.4.102.1","1.2.840.10008.1.2.4.103","1.2.840.10008.1.2.4.103.1","1.2.840.10008.1.2.4.104","1.2.840.10008.1.2.4.104.1","1.2.840.10008.1.2.4.105","1.2.840.10008.1.2.4.105.1","1.2.840.10008.1.2.4.106","1.2.840.10008.1.2.4.106.1","1.2.840.10008.1.2.4.107","1.2.840.10008.1.2.4.108"]);function V$(e){return!!e&&(Array.isArray(e)?e:[e]).find(e=>Vq.has(e))}let VK=/^[a-zA-Z]+:/;function VY(e){if(!e)return"";let t=e.match(VK);if(!t)return e;let r=e.substring(t[0].length);return VK.test(r)?r:e}let VX=new Set(["1.2.840.10008.5.1.4.1.1.1","1.2.840.10008.5.1.4.1.1.1.1","1.2.840.10008.5.1.4.1.1.1.1.1","1.2.840.10008.5.1.4.1.1.1.2","1.2.840.10008.5.1.4.1.1.1.2.1","1.2.840.10008.5.1.4.1.1.1.3","1.2.840.10008.5.1.4.1.1.1.3.1","1.2.840.10008.5.1.4.1.1.12.1","1.2.840.10008.5.1.4.1.1.12.1.1","1.2.840.10008.5.1.4.1.1.12.2","1.2.840.10008.5.1.4.1.1.12.2.1","1.2.840.10008.5.1.4.1.1.12.3"]);function VZ(e){let{PixelSpacing:t,ImagerPixelSpacing:r,EstimatedRadiographicMagnificationFactor:n,DistanceSourceToDetector:a,DistanceSourceToEntrance:i,DistanceSourceToPatient:o=i}=e;return n>1?n:o<a?a/o:r?.[0]>t?.[0]||void 0}function VJ(e){let{PixelSpacing:t,ImagerPixelSpacing:r,PixelSpacingCalibrationType:n}=e;if(t&&"GEOMETRY"===n)return V_(t,r)&&console.warn("Calibration type is geometry, but pixel spacing and imager pixel spacing identical",t,r),{PixelSpacing:t,type:Vc.ERMF,isProjection:!0};if(t&&"FIDUCIAL"===n)return{PixelSpacing:t,type:Vc.CALIBRATED,isProjection:!0};if(r){let n=VZ(e);return n>1?{PixelSpacing:r.map(e=>e/n),type:Vc.ERMF,isProjection:!0}:!0===n?{PixelSpacing:t,type:Vc.ERMF,isProjection:!0}:(n&&console.error("Illegal ERMF value:",n),{PixelSpacing:t||r,type:Vc.PROJECTION,isProjection:!0})}return{PixelSpacing:t,type:Vc.UNKNOWN,isProjection:!0}}function VQ(e){let{PixelSpacing:t,SOPClassUID:r}=e;return VX.has(r)?VJ(e):{PixelSpacing:t,type:Vc.NOT_APPLICABLE,isProjection:!1}}let V1=new Map,V0={add:(e,t)=>{let r=VY(e);V1.set(r,t),Vx(Vd.IMAGE_PLANE,e)},get:(e,t)=>{if("calibratedPixelSpacing"===e){let e=VY(t);return V1.get(e)}},clear:()=>{V1.clear()}};function V2(e,t){let r=/\/frames\/\d+/;if(!r.test(e))throw Error(`generateFrameImageId: baseImageId must contain a "/frames/" pattern followed by a digit. Expected format: e.g., "wadouri:http://example.com/image/frames/1" or "wadors:/path/to/image.dcm/frames/1". Received: ${e}`);return e.replace(r,`/frames/${t}`)}function V5(e){if(!e||0===e.length)return null;let t=e[0],r=Vk("instance",t);if(!r)return null;let n=r.NumberOfFrames;if(!n||n<=1)return null;let a=r.TimeSlotVector;if(!a||!Array.isArray(a))return null;let i=r.SliceVector,o=r.NumberOfSlices;if(a.length!==n)return console.warn("TimeSlotVector length does not match NumberOfFrames:",a.length,"vs",n),null;if(i){if(!Array.isArray(i))return console.warn("SliceVector exists but is not an array. Expected length:",n),null;if(i.length!==n||i.some(e=>void 0===e))return console.warn("SliceVector exists but has invalid length or undefined entries. Expected length:",n,"Actual length:",i.length),null}let s=new Map;for(let e=0;e<n;e++){let t=a[e],r=i?.[e]??e;s.has(t)||s.set(t,[]),s.get(t).push({frameIndex:e,sliceIndex:r})}let l=Array.from(s.keys()).sort((e,t)=>e-t).map(e=>{let r=s.get(e);return r.sort((e,t)=>e.sliceIndex-t.sliceIndex),r.map(e=>V2(t,e.frameIndex+1))}),u=o||l[0]?.length;return l.every(e=>e.length===u)||console.warn("Multiframe 4D split resulted in uneven time slot groups. Expected",u,"slices per time slot."),{imageIdGroups:l,splittingTag:"TimeSlotVector"}}function V3(e,t){let r=Vk(t,e);try{return parseFloat(r)}catch{return}}function V4(e,t){var r=V3(e,t);if(void 0!==r){if("string"==typeof r||"number"==typeof r||r instanceof String||r instanceof Number){let e=Number(r);return Number.isFinite(e)?e:void 0}return Array.from(r,e=>{let t=Number(e);return Number.isFinite(t)?t:void 0})}}function V8(e){let t=Vk("20011003",e);try{let{InlineBinary:e}=t;if(e){let t=atob(e),r=new ArrayBuffer(t.length),n=new DataView(r);for(let e=0;e<t.length;e++)n.setUint8(e,t.charCodeAt(e));return new Float32Array(r)[0]}return parseFloat(t)}catch{return}}function V6(e){let t=Vk("0019100c",e)||Vk("0019100C",e);try{let{InlineBinary:e}=t;return e&&(t=atob(e)),parseFloat(t)}catch{return}}function V9(e){let t=Vk("00431039",e);try{let{InlineBinary:e}=t;return e&&(t=atob(e).split("//")),parseFloat(t[0])%1e5}catch{return}}function V7(e){let t=Vk("petImageModule",e);return t?t.frameReferenceTime:0}let Fe=function(e){let t=V5(e);if(t)return t;let r=function(e){let t;if(!e||0===e.length||void 0===V4(e[0],"CardiacNumberOfImages"))return null;let r=new Map;for(let t of e){let e=Vk("StackID",t),n=V4(t,"InStackPositionNumber"),a=V4(t,"TriggerTime");if(void 0===e||void 0===n||void 0===a)return null;let i=String(e);r.has(i)||r.set(i,new Map);let o=r.get(i);o.has(n)||o.set(n,[]),o.get(n).push({imageId:t,triggerTime:a})}let n=Array.from(r.keys()).sort((e,t)=>Number(e)-Number(t));if(0===n.length)return null;let a=[];for(let e of n){let n=r.get(e),i=Array.from(n.keys()).sort((e,t)=>e-t);for(let e of i){let r=n.get(e);if(r.sort((e,t)=>e.triggerTime-t.triggerTime),void 0===t)t=r.length;else if(r.length!==t)return null}a.push({stackId:e,positions:i,framesByPosition:n})}if(!t)return null;let i=[];for(let e=0;e<t;e++){let t=[];for(let r of a)for(let n of r.positions){let a=r.framesByPosition.get(n);t.push(a[e].imageId)}i.push(t)}return{imageIdGroups:i,splittingTag:"CardiacTriggerTime"}}(e);if(r)return r;let n=function(e){let t,r=e.map(e=>{let{imagePositionPatient:t}=Vk("imagePlaneModule",e)||{};return{imageId:e,imagePositionPatient:t}});if(!r.every(e=>e.imagePositionPatient))return null;let n=(t="imagePositionPatient",r.reduce((e,r)=>((e[r[t]]=e[r[t]]||[]).push(r),e),{})),a=Object.keys(n),i=n[a[0]].length;return 1!==i&&a.every(e=>n[e].length===i)?n:null}(e);if(!n)return{imageIdGroups:[e],splittingTag:null};let a=["TemporalPositionIdentifier","DiffusionBValue","TriggerTime","EchoTime","EchoNumber","PhilipsPrivateBValue","SiemensPrivateBValue","GEPrivateBValue","PetFrameReferenceTime"],i=[e=>V3(e,a[0]),e=>V3(e,a[1]),e=>V3(e,a[2]),e=>V3(e,a[3]),e=>V3(e,a[4]),V8,V6,V9,V7];for(let e=0;e<i.length;e++){let t=function(e,t){let r={},n=[],a=Object.keys(e);for(let i=0;i<a.length;i++){let o=new Set,s=e[a[i]];for(let e=0;e<s.length;e++){let n=t(s[e].imageId)||0;if(r[n]=r[n]||[],r[n].push({imageId:s[e].imageId}),o.add(n),o.size-1<e)return}if(0==i)n=Array.from(o);else if(!function(e,t){if(e.length!=t.size)return!1;for(let r=0;r<e.length;r++)if(!t.has(e[r]))return!1;return!0}(n,o))return}return r}(n,i[e]);if(t)return{imageIdGroups:Object.keys(t).map(Number.parseFloat).sort((e,t)=>e-t).map(e=>t[e].map(e=>e.imageId)),splittingTag:a[e]}}return{imageIdGroups:[e],splittingTag:null}},Ft=[[Vd.TRANSFER_SYNTAX,["TransferSyntaxUID","AvailableTransferSyntaxUID"]],[Vd.CINE,["FrameTime","RecommendedDisplayFrameRate"]],[Vd.PET_ISOTOPE,[["RadiopharmaceuticalInfo","00540016"]]],["RadiopharmaceuticalInfo",["RadiopharmaceuticalStartTime","RadiopharmaceuticalStopTime","RadionuclideTotalDose","RadionuclideHalfLife"]],[Vd.PET_IMAGE,["FrameReferenceTime","ActualFrameDuration"]],[Vd.PET_SERIES,["CorrectedImage","Units","DecayCorrection"]],[Vd.PATIENT,["PatientID","PatientName","PatientBirthDate","PatientBirthTime"]],[Vd.PATIENT_STUDY,["PatientAge","PatientSize","PatientSex","PatientWeight"]],[Vd.GENERAL_STUDY,["StudyInstanceUID","StudyDescription","StudyDate","StudyTime","AccessionNumber"]],[Vd.GENERAL_SERIES,["StudyInstanceUID","SeriesInstanceUID","Modality","SeriesDescription","SeriesNumber","SeriesDate","SeriesTime","AcquisitionDate","AcquisitionTime"]],["clinicalTrialModule",["ClinicalTrialSponsorName","ClinicalTrialSiteID","ClinicalTrialSiteName","ClinicalTrialSubjectID"]],[Vd.SOP_COMMON,["SOPInstanceUID","SOPClassUID"]],[Vd.ECG,["StudyInstanceUID","SeriesInstanceUID","SeriesDescription","SeriesNumber","SeriesDate","SeriesTime","Modality","SOPInstanceUID","SOPClassUID"]],[Vd.GENERAL_IMAGE,["SOPInstanceUID","SOPClassUID","InstanceNumber","InstanceCreationDate","InstanceCreationTime","ContentTime","LossyImageCompression","LossyImageCompressionRatio","LossyImageCompressionMethod","FrameOfReferenceUID","NumberOfFrames","PixelSpacing"]],[Vd.IMAGE_PLANE,["ImagerPixelSpacing","ImageOrientationPatient","ImagePositionPatient","SpacingBetweenSlices","SliceThickness","SliceLocation"]],[Vd.IMAGE_PIXEL,["SamplesPerPixel","PhotometricInterpretation","PlanarConfiguration","Rows","Columns","BitsAllocated","BitsStored","HighBit","PixelRepresentation",["SmallestPixelValue","00280106"],["LargestPixelValue","00280107"],"PixelPaddingValue","PixelPaddingRangeLimit","RedPaletteColorLookupTableDescriptor","GreenPaletteColorLookupTableDescriptor","BluePaletteColorLookupTableDescriptor","AlphaPaletteColorLookupTableDescriptor","RedPaletteColorLookupTableData","GreenPaletteColorLookupTableData","BluePaletteColorLookupTableData","AlphaPaletteColorLookupTableData","PaletteColorLookupTableUID","DistanceSourceToDetector","DistanceSourceToPatient","EstimatedRadiographicMagnificationFactor","DistanceSourceToEntrance","PixelSpacingCalibrationType","PixelSpacingCalibrationDescription","SequenceOfUltrasoundRegions"]],[Vd.VOI_LUT,["WindowCenter","WindowWidth","VOILUTFunction","WindowCenterWidthExplanation"]],[Vd.MODALITY_LUT,["RescaleIntercept","RescaleSlope","RescaleType"]],[Vd.ULTRASOUND_ENHANCED_REGION,["SequenceOfUltrasoundRegions"]],["usRegionChild",["PhysicalDeltaX","PhysicalDeltaY","PhysicalUnitsXDirection","PhysicalUnitsYDirection","RegionLocationMinY0","RegionLocationMaxY1","RegionLocationMinX0","RegionLocationMaxX1","ReferencePixelX0","ReferencePixelY0",["ReferencePhysicalPixelValueY","0018602A"],["ReferencePhysicalPixelValueX","00186028"],"RegionSpatialFormat","RegionDataType","RegionFlags","TransducerFrequency"]],[null,["ReferencedImageSequence","ReferencedSOPClassUID","ReferencedSOPInstanceUID","ReferencedFrameNumber","SharedFunctionalGroupsSequence","PerFrameFunctionalGroupsSequence","PlanePositionSequence","AnatomicRegionSequence","PlaneOrientationSequence","PixelMeasuresSequence","PixelValueTransformationSequence","ParametricMapFrameTypeSequence","RealWorldValueMappingSequence"]]],Fr=Ns().data.DicomMetaDictionary.dictionary,Fn=Ns().data.DicomMetaDictionary.nameMap,Fa=new Map,Fi=new Map,Fo={},Fs=new Map;for(let[e,t]of Ft)for(let r of t){let t="string"==typeof r?r:r[0],n="string"==typeof r?void 0:r[1],a=Fs.get(t);a||(a={hex:n??function(e){let t=Fn[e];if(t)return t.tag.substring(1,5)+t.tag.substring(6,10)}(t),groups:[]},Fs.set(t,a)),null!==e&&a.groups.push(e)}for(let[e,{hex:t,groups:r}]of Fs){if(!t){console.warn(`Tags: keyword "${e}" not found in dcmjs nameMap`);continue}!function(e,t){if(e&&t.name&&e!==t.name)throw Error(`Tag name provided and value don't match: ${e} !== ${t.name}`);t.name||=e,t.lowerName||=VE(e),Fo[e]=t;let{tag:r}=t;t.primaryGroup||=t.groups?.[0];let{groups:n}=t;if(Fi.set(e,t),r&&(t.xTag=`x${r.toLowerCase()}`,t.tag=r.toUpperCase(),Fi.set(t.xTag,t),Fi.set(t.tag,t),!t.vr)){let e=Fr[t.tag];e&&(t.vr=e.vr,t.vm=function(e){if(null==e)return null;if("number"==typeof e)return e;let t=parseInt(e,10);return String(t)===e?t:0}(e.vm))}if(n?.length)for(let r of n){let n=Fa.get(r);if(!n){n=[t],Fa.set(r,n);return}let a=n.findIndex(t=>t.name===e);-1===a?n.push(t):n[a]=t}}(e,function(e,...t){return{tag:e,groups:t,xTag:null,primaryGroup:null,name:null,lowerName:null,vr:null,vm:null}}(t,...r))}let{DicomMetadataListener:Fl}=Ns().utilities,{pp:Fu,tZ:Fc,gE:Fd,Um:Fh,uu:Fp,UA:Ff,_E:Fm,RZ:Fg,UX:Fy,bM:Fv,HL:Fb,U5:Fw,Rm:Fx}=B,FC=Vd.FRAME_IMAGE_IDS,Fk=Vd.BASE_IMAGE_ID;class FM{static setCacheDataInternal(e,t,r){let n=this.mapCacheData.get(e);n||(n=new Map,this.mapCacheData.set(e,n)),n.set(t,r),this.clearRelatedDerivedCache(e,t)}static clearRelatedDerivedCache(e,t){let r=this.secondaryTypesByBaseType.get(e);if(r?.size)for(let e of Vb(FC,t)??new Set([t]))for(let t of r){let r=this.mapCacheData.get(t);r?.delete(e)}}static registerSecondaryTypes(e,t){if(t)for(let r of Array.isArray(t)?t:[t]){let t=this.secondaryTypesByBaseType.get(r);t||(t=new Set,this.secondaryTypesByBaseType.set(r,t)),t.add(e)}}static getCacheData(e,t){return this.mapCacheData.get(e)?.get(t)}static hasCacheData(e,t){return this.mapCacheData.get(e)?.has(t)===!0}static clearCacheData(){this.mapCacheData.clear(),this.secondaryTypesByBaseType.clear(),VC(FC),VC(Fk)}static clearTypedCacheData(e,t){let r=this.secondaryTypesByBaseType.get(e),n=this.mapCacheData.get(e);if(t){if(n?.delete(t),r?.size)for(let e of r)this.mapCacheData.get(e)?.delete(t);(e===Vd.NATURALIZED||r?.size)&&(Vx(FC,t),Vx(Fk,t));return}if(n?.clear(),r?.size)for(let e of r)this.mapCacheData.get(e)?.clear();(e===Vd.NATURALIZED||r?.size)&&(VC(FC),VC(Fk))}static fromAsyncLookup(e,t,r,n){if(n?.noCache!==!0&&n?.reCache!==!0){let r=this.getCacheData(e,t);if(void 0!==r)return r}let a=r();if(void 0!==a)return a instanceof Promise?a.then(r=>(void 0===r||n?.noCache||this.setCacheDataInternal(e,t,r),r)):(n?.noCache||this.setCacheDataInternal(e,t,a),a)}createTypeCacheProvider(e){var t;return t=e,(e,r,n,a)=>FM.fromAsyncLookup(t,r,()=>e(r,n,a),a)}clearCacheData(){FM.clearCacheData()}clearTypedCacheData(e,t){FM.clearTypedCacheData(e,t)}getCacheData(e,t){return FM.getCacheData(e,t)}hasCacheData(e,t){return FM.hasCacheData(e,t)}fromAsyncLookup(e,t,r,n){return FM.fromAsyncLookup(e,t,r,n)}}function FS(e){return(t,r,n,a)=>(n||=Vg(e,r,a?.[e]),t(r,n,a))}FM.mapCacheData=new Map,FM.secondaryTypesByBaseType=new Map,new class e extends FM{static setCacheData(e,t,r){this.setCacheDataInternal(e,t,r)}setCacheData(t,r,n){e.setCacheData(t,r,n)}},FS(Vd.INSTANCE),FS(Vd.NATURALIZED);let{AsyncDicomReader:FE}=Ns().async;Fh.getLogger("tagModules"),u(3916),Vd.COMPRESSED_FRAME_DATA;let{C:FP}=F;(ef7=emV||(emV={})).NO_DATA="noData",ef7.LOADING="loading",ef7.PRE_RENDER="preRender",ef7.NEEDS_RENDER="needsRender",ef7.RESIZE="resize",ef7.RENDERED="rendered";let FI=emV;(eme=emF||(emF={}))[eme.FAR_REPLICATE=1]="FAR_REPLICATE",eme[eme.ADJACENT_REPLICATE=3]="ADJACENT_REPLICATE",eme[eme.SUBRESOLUTION=6]="SUBRESOLUTION",eme[eme.LOSSY=7]="LOSSY",eme[eme.FULL_RESOLUTION=8]="FULL_RESOLUTION";let FT=emF;(emt=emj||(emj={})).FRAME="f",emt.SECOND="s";let F_=Vd;(emr=emB||(emB={})).SUM="SUM",emr.SUBTRACT="SUBTRACT",emr.AVERAGE="AVERAGE",(emn=emW||(emW={})).RLE="RLE",emn.Volume="Volume",(ema=emU||(emU={})).Tiled="tiled",ema.ContextPool="contextPool";let FD=emU,FA={hotIron:{name:"Hot Iron",numOfColors:256,colors:[[0,0,0,255],[2,0,0,255],[4,0,0,255],[6,0,0,255],[8,0,0,255],[10,0,0,255],[12,0,0,255],[14,0,0,255],[16,0,0,255],[18,0,0,255],[20,0,0,255],[22,0,0,255],[24,0,0,255],[26,0,0,255],[28,0,0,255],[30,0,0,255],[32,0,0,255],[34,0,0,255],[36,0,0,255],[38,0,0,255],[40,0,0,255],[42,0,0,255],[44,0,0,255],[46,0,0,255],[48,0,0,255],[50,0,0,255],[52,0,0,255],[54,0,0,255],[56,0,0,255],[58,0,0,255],[60,0,0,255],[62,0,0,255],[64,0,0,255],[66,0,0,255],[68,0,0,255],[70,0,0,255],[72,0,0,255],[74,0,0,255],[76,0,0,255],[78,0,0,255],[80,0,0,255],[82,0,0,255],[84,0,0,255],[86,0,0,255],[88,0,0,255],[90,0,0,255],[92,0,0,255],[94,0,0,255],[96,0,0,255],[98,0,0,255],[100,0,0,255],[102,0,0,255],[104,0,0,255],[106,0,0,255],[108,0,0,255],[110,0,0,255],[112,0,0,255],[114,0,0,255],[116,0,0,255],[118,0,0,255],[120,0,0,255],[122,0,0,255],[124,0,0,255],[126,0,0,255],[128,0,0,255],[130,0,0,255],[132,0,0,255],[134,0,0,255],[136,0,0,255],[138,0,0,255],[140,0,0,255],[142,0,0,255],[144,0,0,255],[146,0,0,255],[148,0,0,255],[150,0,0,255],[152,0,0,255],[154,0,0,255],[156,0,0,255],[158,0,0,255],[160,0,0,255],[162,0,0,255],[164,0,0,255],[166,0,0,255],[168,0,0,255],[170,0,0,255],[172,0,0,255],[174,0,0,255],[176,0,0,255],[178,0,0,255],[180,0,0,255],[182,0,0,255],[184,0,0,255],[186,0,0,255],[188,0,0,255],[190,0,0,255],[192,0,0,255],[194,0,0,255],[196,0,0,255],[198,0,0,255],[200,0,0,255],[202,0,0,255],[204,0,0,255],[206,0,0,255],[208,0,0,255],[210,0,0,255],[212,0,0,255],[214,0,0,255],[216,0,0,255],[218,0,0,255],[220,0,0,255],[222,0,0,255],[224,0,0,255],[226,0,0,255],[228,0,0,255],[230,0,0,255],[232,0,0,255],[234,0,0,255],[236,0,0,255],[238,0,0,255],[240,0,0,255],[242,0,0,255],[244,0,0,255],[246,0,0,255],[248,0,0,255],[250,0,0,255],[252,0,0,255],[254,0,0,255],[255,0,0,255],[255,2,0,255],[255,4,0,255],[255,6,0,255],[255,8,0,255],[255,10,0,255],[255,12,0,255],[255,14,0,255],[255,16,0,255],[255,18,0,255],[255,20,0,255],[255,22,0,255],[255,24,0,255],[255,26,0,255],[255,28,0,255],[255,30,0,255],[255,32,0,255],[255,34,0,255],[255,36,0,255],[255,38,0,255],[255,40,0,255],[255,42,0,255],[255,44,0,255],[255,46,0,255],[255,48,0,255],[255,50,0,255],[255,52,0,255],[255,54,0,255],[255,56,0,255],[255,58,0,255],[255,60,0,255],[255,62,0,255],[255,64,0,255],[255,66,0,255],[255,68,0,255],[255,70,0,255],[255,72,0,255],[255,74,0,255],[255,76,0,255],[255,78,0,255],[255,80,0,255],[255,82,0,255],[255,84,0,255],[255,86,0,255],[255,88,0,255],[255,90,0,255],[255,92,0,255],[255,94,0,255],[255,96,0,255],[255,98,0,255],[255,100,0,255],[255,102,0,255],[255,104,0,255],[255,106,0,255],[255,108,0,255],[255,110,0,255],[255,112,0,255],[255,114,0,255],[255,116,0,255],[255,118,0,255],[255,120,0,255],[255,122,0,255],[255,124,0,255],[255,126,0,255],[255,128,4,255],[255,130,8,255],[255,132,12,255],[255,134,16,255],[255,136,20,255],[255,138,24,255],[255,140,28,255],[255,142,32,255],[255,144,36,255],[255,146,40,255],[255,148,44,255],[255,150,48,255],[255,152,52,255],[255,154,56,255],[255,156,60,255],[255,158,64,255],[255,160,68,255],[255,162,72,255],[255,164,76,255],[255,166,80,255],[255,168,84,255],[255,170,88,255],[255,172,92,255],[255,174,96,255],[255,176,100,255],[255,178,104,255],[255,180,108,255],[255,182,112,255],[255,184,116,255],[255,186,120,255],[255,188,124,255],[255,190,128,255],[255,192,132,255],[255,194,136,255],[255,196,140,255],[255,198,144,255],[255,200,148,255],[255,202,152,255],[255,204,156,255],[255,206,160,255],[255,208,164,255],[255,210,168,255],[255,212,172,255],[255,214,176,255],[255,216,180,255],[255,218,184,255],[255,220,188,255],[255,222,192,255],[255,224,196,255],[255,226,200,255],[255,228,204,255],[255,230,208,255],[255,232,212,255],[255,234,216,255],[255,236,220,255],[255,238,224,255],[255,240,228,255],[255,242,232,255],[255,244,236,255],[255,246,240,255],[255,248,244,255],[255,250,248,255],[255,252,252,255],[255,255,255,255]]},pet:{name:"PET",numColors:256,colors:[[0,0,0,255],[0,2,1,255],[0,4,3,255],[0,6,5,255],[0,8,7,255],[0,10,9,255],[0,12,11,255],[0,14,13,255],[0,16,15,255],[0,18,17,255],[0,20,19,255],[0,22,21,255],[0,24,23,255],[0,26,25,255],[0,28,27,255],[0,30,29,255],[0,32,31,255],[0,34,33,255],[0,36,35,255],[0,38,37,255],[0,40,39,255],[0,42,41,255],[0,44,43,255],[0,46,45,255],[0,48,47,255],[0,50,49,255],[0,52,51,255],[0,54,53,255],[0,56,55,255],[0,58,57,255],[0,60,59,255],[0,62,61,255],[0,65,63,255],[0,67,65,255],[0,69,67,255],[0,71,69,255],[0,73,71,255],[0,75,73,255],[0,77,75,255],[0,79,77,255],[0,81,79,255],[0,83,81,255],[0,85,83,255],[0,87,85,255],[0,89,87,255],[0,91,89,255],[0,93,91,255],[0,95,93,255],[0,97,95,255],[0,99,97,255],[0,101,99,255],[0,103,101,255],[0,105,103,255],[0,107,105,255],[0,109,107,255],[0,111,109,255],[0,113,111,255],[0,115,113,255],[0,117,115,255],[0,119,117,255],[0,121,119,255],[0,123,121,255],[0,125,123,255],[0,128,125,255],[1,126,127,255],[3,124,129,255],[5,122,131,255],[7,120,133,255],[9,118,135,255],[11,116,137,255],[13,114,139,255],[15,112,141,255],[17,110,143,255],[19,108,145,255],[21,106,147,255],[23,104,149,255],[25,102,151,255],[27,100,153,255],[29,98,155,255],[31,96,157,255],[33,94,159,255],[35,92,161,255],[37,90,163,255],[39,88,165,255],[41,86,167,255],[43,84,169,255],[45,82,171,255],[47,80,173,255],[49,78,175,255],[51,76,177,255],[53,74,179,255],[55,72,181,255],[57,70,183,255],[59,68,185,255],[61,66,187,255],[63,64,189,255],[65,63,191,255],[67,61,193,255],[69,59,195,255],[71,57,197,255],[73,55,199,255],[75,53,201,255],[77,51,203,255],[79,49,205,255],[81,47,207,255],[83,45,209,255],[85,43,211,255],[86,41,213,255],[88,39,215,255],[90,37,217,255],[92,35,219,255],[94,33,221,255],[96,31,223,255],[98,29,225,255],[100,27,227,255],[102,25,229,255],[104,23,231,255],[106,21,233,255],[108,19,235,255],[110,17,237,255],[112,15,239,255],[114,13,241,255],[116,11,243,255],[118,9,245,255],[120,7,247,255],[122,5,249,255],[124,3,251,255],[126,1,253,255],[128,0,255,255],[130,2,252,255],[132,4,248,255],[134,6,244,255],[136,8,240,255],[138,10,236,255],[140,12,232,255],[142,14,228,255],[144,16,224,255],[146,18,220,255],[148,20,216,255],[150,22,212,255],[152,24,208,255],[154,26,204,255],[156,28,200,255],[158,30,196,255],[160,32,192,255],[162,34,188,255],[164,36,184,255],[166,38,180,255],[168,40,176,255],[170,42,172,255],[171,44,168,255],[173,46,164,255],[175,48,160,255],[177,50,156,255],[179,52,152,255],[181,54,148,255],[183,56,144,255],[185,58,140,255],[187,60,136,255],[189,62,132,255],[191,64,128,255],[193,66,124,255],[195,68,120,255],[197,70,116,255],[199,72,112,255],[201,74,108,255],[203,76,104,255],[205,78,100,255],[207,80,96,255],[209,82,92,255],[211,84,88,255],[213,86,84,255],[215,88,80,255],[217,90,76,255],[219,92,72,255],[221,94,68,255],[223,96,64,255],[225,98,60,255],[227,100,56,255],[229,102,52,255],[231,104,48,255],[233,106,44,255],[235,108,40,255],[237,110,36,255],[239,112,32,255],[241,114,28,255],[243,116,24,255],[245,118,20,255],[247,120,16,255],[249,122,12,255],[251,124,8,255],[253,126,4,255],[255,128,0,255],[255,130,4,255],[255,132,8,255],[255,134,12,255],[255,136,16,255],[255,138,20,255],[255,140,24,255],[255,142,28,255],[255,144,32,255],[255,146,36,255],[255,148,40,255],[255,150,44,255],[255,152,48,255],[255,154,52,255],[255,156,56,255],[255,158,60,255],[255,160,64,255],[255,162,68,255],[255,164,72,255],[255,166,76,255],[255,168,80,255],[255,170,85,255],[255,172,89,255],[255,174,93,255],[255,176,97,255],[255,178,101,255],[255,180,105,255],[255,182,109,255],[255,184,113,255],[255,186,117,255],[255,188,121,255],[255,190,125,255],[255,192,129,255],[255,194,133,255],[255,196,137,255],[255,198,141,255],[255,200,145,255],[255,202,149,255],[255,204,153,255],[255,206,157,255],[255,208,161,255],[255,210,165,255],[255,212,170,255],[255,214,174,255],[255,216,178,255],[255,218,182,255],[255,220,186,255],[255,222,190,255],[255,224,194,255],[255,226,198,255],[255,228,202,255],[255,230,206,255],[255,232,210,255],[255,234,214,255],[255,236,218,255],[255,238,222,255],[255,240,226,255],[255,242,230,255],[255,244,234,255],[255,246,238,255],[255,248,242,255],[255,250,246,255],[255,252,250,255],[255,255,255,255]]},hotMetalBlue:{name:"Hot Metal Blue",numColors:256,colors:[[0,0,0,255],[0,0,2,255],[0,0,4,255],[0,0,6,255],[0,0,8,255],[0,0,10,255],[0,0,12,255],[0,0,14,255],[0,0,16,255],[0,0,17,255],[0,0,19,255],[0,0,21,255],[0,0,23,255],[0,0,25,255],[0,0,27,255],[0,0,29,255],[0,0,31,255],[0,0,33,255],[0,0,35,255],[0,0,37,255],[0,0,39,255],[0,0,41,255],[0,0,43,255],[0,0,45,255],[0,0,47,255],[0,0,49,255],[0,0,51,255],[0,0,53,255],[0,0,55,255],[0,0,57,255],[0,0,59,255],[0,0,61,255],[0,0,63,255],[0,0,65,255],[0,0,67,255],[0,0,69,255],[0,0,71,255],[0,0,73,255],[0,0,75,255],[0,0,77,255],[0,0,79,255],[0,0,81,255],[0,0,83,255],[0,0,84,255],[0,0,86,255],[0,0,88,255],[0,0,90,255],[0,0,92,255],[0,0,94,255],[0,0,96,255],[0,0,98,255],[0,0,100,255],[0,0,102,255],[0,0,104,255],[0,0,106,255],[0,0,108,255],[0,0,110,255],[0,0,112,255],[0,0,114,255],[0,0,116,255],[0,0,117,255],[0,0,119,255],[0,0,121,255],[0,0,123,255],[0,0,125,255],[0,0,127,255],[0,0,129,255],[0,0,131,255],[0,0,133,255],[0,0,135,255],[0,0,137,255],[0,0,139,255],[0,0,141,255],[0,0,143,255],[0,0,145,255],[0,0,147,255],[0,0,149,255],[0,0,151,255],[0,0,153,255],[0,0,155,255],[0,0,157,255],[0,0,159,255],[0,0,161,255],[0,0,163,255],[0,0,165,255],[0,0,167,255],[3,0,169,255],[6,0,171,255],[9,0,173,255],[12,0,175,255],[15,0,177,255],[18,0,179,255],[21,0,181,255],[24,0,183,255],[26,0,184,255],[29,0,186,255],[32,0,188,255],[35,0,190,255],[38,0,192,255],[41,0,194,255],[44,0,196,255],[47,0,198,255],[50,0,200,255],[52,0,197,255],[55,0,194,255],[57,0,191,255],[59,0,188,255],[62,0,185,255],[64,0,182,255],[66,0,179,255],[69,0,176,255],[71,0,174,255],[74,0,171,255],[76,0,168,255],[78,0,165,255],[81,0,162,255],[83,0,159,255],[85,0,156,255],[88,0,153,255],[90,0,150,255],[93,2,144,255],[96,4,138,255],[99,6,132,255],[102,8,126,255],[105,9,121,255],[108,11,115,255],[111,13,109,255],[114,15,103,255],[116,17,97,255],[119,19,91,255],[122,21,85,255],[125,23,79,255],[128,24,74,255],[131,26,68,255],[134,28,62,255],[137,30,56,255],[140,32,50,255],[143,34,47,255],[146,36,44,255],[149,38,41,255],[152,40,38,255],[155,41,35,255],[158,43,32,255],[161,45,29,255],[164,47,26,255],[166,49,24,255],[169,51,21,255],[172,53,18,255],[175,55,15,255],[178,56,12,255],[181,58,9,255],[184,60,6,255],[187,62,3,255],[190,64,0,255],[194,66,0,255],[198,68,0,255],[201,70,0,255],[205,72,0,255],[209,73,0,255],[213,75,0,255],[217,77,0,255],[221,79,0,255],[224,81,0,255],[228,83,0,255],[232,85,0,255],[236,87,0,255],[240,88,0,255],[244,90,0,255],[247,92,0,255],[251,94,0,255],[255,96,0,255],[255,98,3,255],[255,100,6,255],[255,102,9,255],[255,104,12,255],[255,105,15,255],[255,107,18,255],[255,109,21,255],[255,111,24,255],[255,113,26,255],[255,115,29,255],[255,117,32,255],[255,119,35,255],[255,120,38,255],[255,122,41,255],[255,124,44,255],[255,126,47,255],[255,128,50,255],[255,130,53,255],[255,132,56,255],[255,134,59,255],[255,136,62,255],[255,137,65,255],[255,139,68,255],[255,141,71,255],[255,143,74,255],[255,145,76,255],[255,147,79,255],[255,149,82,255],[255,151,85,255],[255,152,88,255],[255,154,91,255],[255,156,94,255],[255,158,97,255],[255,160,100,255],[255,162,103,255],[255,164,106,255],[255,166,109,255],[255,168,112,255],[255,169,115,255],[255,171,118,255],[255,173,121,255],[255,175,124,255],[255,177,126,255],[255,179,129,255],[255,181,132,255],[255,183,135,255],[255,184,138,255],[255,186,141,255],[255,188,144,255],[255,190,147,255],[255,192,150,255],[255,194,153,255],[255,196,156,255],[255,198,159,255],[255,200,162,255],[255,201,165,255],[255,203,168,255],[255,205,171,255],[255,207,174,255],[255,209,176,255],[255,211,179,255],[255,213,182,255],[255,215,185,255],[255,216,188,255],[255,218,191,255],[255,220,194,255],[255,222,197,255],[255,224,200,255],[255,226,203,255],[255,228,206,255],[255,229,210,255],[255,231,213,255],[255,233,216,255],[255,235,219,255],[255,237,223,255],[255,239,226,255],[255,240,229,255],[255,242,232,255],[255,244,236,255],[255,246,239,255],[255,248,242,255],[255,250,245,255],[255,251,249,255],[255,253,252,255],[255,255,255,255]]},pet20Step:{name:"PET 20 Step",numColors:256,colors:[[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[0,0,0,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[96,0,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,80,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[48,48,112,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[80,80,128,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[96,96,176,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[112,112,192,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[128,128,224,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,96,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[48,144,48,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[80,192,80,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[64,224,64,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[224,224,80,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,208,96,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,176,64,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[208,144,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[192,96,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[176,48,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,0,0,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255],[255,255,255,255]]},gray:{name:"Gray",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[1,1,1]],green:[[0,0,0],[1,1,1]],blue:[[0,0,0],[1,1,1]]}},jet:{name:"Jet",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[.35,0,0],[.66,1,1],[.89,1,1],[1,.5,.5]],green:[[0,0,0],[.125,0,0],[.375,1,1],[.64,1,1],[.91,0,0],[1,0,0]],blue:[[0,.5,.5],[.11,1,1],[.34,1,1],[.65,0,0],[1,0,0]]}},hsv:{name:"HSV",numColors:256,gamma:1,segmentedData:{red:[[0,1,1],[.15873,1,1],[.174603,.96875,.96875],[.333333,.03125,.03125],[.349206,0,0],[.666667,0,0],[.68254,.03125,.03125],[.84127,.96875,.96875],[.857143,1,1],[1,1,1]],green:[[0,0,0],[.15873,.9375,.9375],[.174603,1,1],[.507937,1,1],[.666667,.0625,.0625],[.68254,0,0],[1,0,0]],blue:[[0,0,0],[.333333,0,0],[.349206,.0625,.0625],[.507937,1,1],[.84127,1,1],[.857143,.9375,.9375],[1,.09375,.09375]]}},hot:{name:"Hot",numColors:256,gamma:1,segmentedData:{red:[[0,.0416,.0416],[.365079,1,1],[1,1,1]],green:[[0,0,0],[.365079,0,0],[.746032,1,1],[1,1,1]],blue:[[0,0,0],[.746032,0,0],[1,1,1]]}},cool:{name:"Cool",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[1,1,1]],green:[[0,1,1],[1,0,0]],blue:[[0,1,1],[1,1,1]]}},spring:{name:"Spring",numColors:256,gamma:1,segmentedData:{red:[[0,1,1],[1,1,1]],green:[[0,0,0],[1,1,1]],blue:[[0,1,1],[1,0,0]]}},summer:{name:"Summer",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[1,1,1]],green:[[0,.5,.5],[1,1,1]],blue:[[0,.4,.4],[1,.4,.4]]}},autumn:{name:"Autumn",numColors:256,gamma:1,segmentedData:{red:[[0,1,1],[1,1,1]],green:[[0,0,0],[1,1,1]],blue:[[0,0,0],[1,0,0]]}},winter:{name:"Winter",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[1,0,0]],green:[[0,0,0],[1,1,1]],blue:[[0,1,1],[1,.5,.5]]}},bone:{name:"Bone",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[.746032,.652778,.652778],[1,1,1]],green:[[0,0,0],[.365079,.319444,.319444],[.746032,.777778,.777778],[1,1,1]],blue:[[0,0,0],[.365079,.444444,.444444],[1,1,1]]}},copper:{name:"Copper",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[.809524,1,1],[1,1,1]],green:[[0,0,0],[1,.7812,.7812]],blue:[[0,0,0],[1,.4975,.4975]]}},spectral:{name:"Spectral",numColors:256,gamma:1,segmentedData:{red:[[0,0,0],[.05,.4667,.4667],[.1,.5333,.5333],[.15,0,0],[.2,0,0],[.25,0,0],[.3,0,0],[.35,0,0],[.4,0,0],[.45,0,0],[.5,0,0],[.55,0,0],[.6,0,0],[.65,.7333,.7333],[.7,.9333,.9333],[.75,1,1],[.8,1,1],[.85,1,1],[.9,.8667,.8667],[.95,.8,.8],[1,.8,.8]],green:[[0,0,0],[.05,0,0],[.1,0,0],[.15,0,0],[.2,0,0],[.25,.4667,.4667],[.3,.6,.6],[.35,.6667,.6667],[.4,.6667,.6667],[.45,.6,.6],[.5,.7333,.7333],[.55,.8667,.8667],[.6,1,1],[.65,1,1],[.7,.9333,.9333],[.75,.8,.8],[.8,.6,.6],[.85,0,0],[.9,0,0],[.95,0,0],[1,.8,.8]],blue:[[0,0,0],[.05,.5333,.5333],[.1,.6,.6],[.15,.6667,.6667],[.2,.8667,.8667],[.25,.8667,.8667],[.3,.8667,.8667],[.35,.6667,.6667],[.4,.5333,.5333],[.45,0,0],[.5,0,0],[.55,0,0],[.6,0,0],[.65,0,0],[.7,0,0],[.75,0,0],[.8,0,0],[.85,0,0],[.9,0,0],[.95,0,0],[1,.8,.8]]}},coolwarm:{name:"CoolWarm",numColors:256,gamma:1,segmentedData:{red:[[0,.2298057,.2298057],[.03125,.26623388,.26623388],[.0625,.30386891,.30386891],[.09375,.342804478,.342804478],[.125,.38301334,.38301334],[.15625,.424369608,.424369608],[.1875,.46666708,.46666708],[.21875,.509635204,.509635204],[.25,.552953156,.552953156],[.28125,.596262162,.596262162],[.3125,.639176211,.639176211],[.34375,.681291281,.681291281],[.375,.722193294,.722193294],[.40625,.761464949,.761464949],[.4375,.798691636,.798691636],[.46875,.833466556,.833466556],[.5,.865395197,.865395197],[.53125,.897787179,.897787179],[.5625,.924127593,.924127593],[.59375,.944468518,.944468518],[.625,.958852946,.958852946],[.65625,.96732803,.96732803],[.6875,.969954137,.969954137],[.71875,.966811177,.966811177],[.75,.958003065,.958003065],[.78125,.943660866,.943660866],[.8125,.923944917,.923944917],[.84375,.89904617,.89904617],[.875,.869186849,.869186849],[.90625,.834620542,.834620542],[.9375,.795631745,.795631745],[.96875,.752534934,.752534934],[1,.705673158,.705673158]],green:[[0,.298717966,.298717966],[.03125,.353094838,.353094838],[.0625,.406535296,.406535296],[.09375,.458757618,.458757618],[.125,.50941904,.50941904],[.15625,.558148092,.558148092],[.1875,.604562568,.604562568],[.21875,.648280772,.648280772],[.25,.688929332,.688929332],[.28125,.726149107,.726149107],[.3125,.759599947,.759599947],[.34375,.788964712,.788964712],[.375,.813952739,.813952739],[.40625,.834302879,.834302879],[.4375,.849786142,.849786142],[.46875,.860207984,.860207984],[.5,.86541021,.86541021],[.53125,.848937047,.848937047],[.5625,.827384882,.827384882],[.59375,.800927443,.800927443],[.625,.769767752,.769767752],[.65625,.734132809,.734132809],[.6875,.694266682,.694266682],[.71875,.650421156,.650421156],[.75,.602842431,.602842431],[.78125,.551750968,.551750968],[.8125,.49730856,.49730856],[.84375,.439559467,.439559467],[.875,.378313092,.378313092],[.90625,.312874446,.312874446],[.9375,.24128379,.24128379],[.96875,.157246067,.157246067],[1,.01555616,.01555616]],blue:[[0,.753683153,.753683153],[.03125,.801466763,.801466763],[.0625,.84495867,.84495867],[.09375,.883725899,.883725899],[.125,.917387822,.917387822],[.15625,.945619588,.945619588],[.1875,.968154911,.968154911],[.21875,.98478814,.98478814],[.25,.995375608,.995375608],[.28125,.999836203,.999836203],[.3125,.998151185,.998151185],[.34375,.990363227,.990363227],[.375,.976574709,.976574709],[.40625,.956945269,.956945269],[.4375,.931688648,.931688648],[.46875,.901068838,.901068838],[.5,.865395561,.865395561],[.53125,.820880546,.820880546],[.5625,.774508472,.774508472],[.59375,.726736146,.726736146],[.625,.678007945,.678007945],[.65625,.628751763,.628751763],[.6875,.579375448,.579375448],[.71875,.530263762,.530263762],[.75,.481775914,.481775914],[.78125,.434243684,.434243684],[.8125,.387970225,.387970225],[.84375,.343229596,.343229596],[.875,.300267182,.300267182],[.90625,.259301199,.259301199],[.9375,.220525627,.220525627],[.96875,.184115123,.184115123],[1,.150232812,.150232812]]}},blues:{name:"Blues",numColors:256,gamma:1,segmentedData:{red:[[0,.9686274528503418,.9686274528503418],[.125,.8705882430076599,.8705882430076599],[.25,.7764706015586853,.7764706015586853],[.375,.6196078658103943,.6196078658103943],[.5,.41960784792900085,.41960784792900085],[.625,.25882354378700256,.25882354378700256],[.75,.12941177189350128,.12941177189350128],[.875,.0313725508749485,.0313725508749485],[1,.0313725508749485,.0313725508749485]],green:[[0,.9843137264251709,.9843137264251709],[.125,.9215686321258545,.9215686321258545],[.25,.8588235378265381,.8588235378265381],[.375,.7921568751335144,.7921568751335144],[.5,.6823529601097107,.6823529601097107],[.625,.572549045085907,.572549045085907],[.75,.4431372582912445,.4431372582912445],[.875,.3176470696926117,.3176470696926117],[1,.1882352977991104,.1882352977991104]],blue:[[0,1,1],[.125,.9686274528503418,.9686274528503418],[.25,.9372549057006836,.9372549057006836],[.375,.8823529481887817,.8823529481887817],[.5,.8392156958580017,.8392156958580017],[.625,.7764706015586853,.7764706015586853],[.75,.7098039388656616,.7098039388656616],[.875,.6117647290229797,.6117647290229797],[1,.41960784792900085,.41960784792900085]]}}},FO={MINIMUM_SLAB_THICKNESS:.05,MAXIMUM_RAY_DISTANCE:1e6};Object.freeze(FO);let FR=FO,FN=.001,FL=function e(t){for(let r of Object.getOwnPropertyNames(t)){let n=t[r];n&&"object"==typeof n&&e(n)}return Object.freeze(t)}({axial:{viewPlaneNormal:[0,0,-1],viewUp:[0,-1,0],viewRight:[1,0,0]},sagittal:{viewPlaneNormal:[1,0,0],viewUp:[0,0,1],viewRight:[0,1,0]},coronal:{viewPlaneNormal:[0,-1,0],viewUp:[0,0,1],viewRight:[1,0,0]}}),FV=[{name:"CT-AAA",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"12 -3024 0 143.556 0 166.222 0.686275 214.389 0.696078 419.736 0.833333 3071 0.803922",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"24 -3024 0 0 0 143.556 0.615686 0.356863 0.184314 166.222 0.882353 0.603922 0.290196 214.389 1 1 1 419.736 1 0.937033 0.954531 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-AAA2",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"16 -3024 0 129.542 0 145.244 0.166667 157.02 0.5 169.918 0.627451 395.575 0.8125 1578.73 0.8125 3071 0.8125",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"32 -3024 0 0 0 129.542 0.54902 0.25098 0.14902 145.244 0.6 0.627451 0.843137 157.02 0.890196 0.47451 0.6 169.918 0.992157 0.870588 0.392157 395.575 1 0.886275 0.658824 1578.73 1 0.829256 0.957922 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Bone",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"8 -3024 0 -16.4458 0 641.385 0.715686 3071 0.705882",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"16 -3024 0 0 0 -16.4458 0.729412 0.254902 0.301961 641.385 0.905882 0.815686 0.552941 3071 1 1 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Bones",gradientOpacity:"4 0 1 985.12 1",specularPower:"1",scalarOpacity:"8 -1000 0 152.19 0 278.93 0.190476 952 0.2",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"20 -1000 0.3 0.3 1 -488 0.3 1 0.3 463.28 1 0 0 659.15 1 0.912535 0.0374849 953 1 0.3 0.3",diffuse:"1",interpolation:"1"},{name:"CT-Cardiac",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"12 -3024 0 -77.6875 0 94.9518 0.285714 179.052 0.553571 260.439 0.848214 3071 0.875",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"24 -3024 0 0 0 -77.6875 0.54902 0.25098 0.14902 94.9518 0.882353 0.603922 0.290196 179.052 1 0.937033 0.954531 260.439 0.615686 0 0 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Cardiac2",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"12 -3024 0 42.8964 0 163.488 0.428571 277.642 0.776786 1587 0.754902 3071 0.754902",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"24 -3024 0 0 0 42.8964 0.54902 0.25098 0.14902 163.488 0.917647 0.639216 0.0588235 277.642 1 0.878431 0.623529 1587 1 1 1 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Cardiac3",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"14 -3024 0 -86.9767 0 45.3791 0.169643 139.919 0.589286 347.907 0.607143 1224.16 0.607143 3071 0.616071",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"28 -3024 0 0 0 -86.9767 0 0.25098 1 45.3791 1 0 0 139.919 1 0.894893 0.894893 347.907 1 1 0.25098 1224.16 1 1 1 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Chest-Contrast-Enhanced",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"10 -3024 0 67.0106 0 251.105 0.446429 439.291 0.625 3071 0.616071",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"20 -3024 0 0 0 67.0106 0.54902 0.25098 0.14902 251.105 0.882353 0.603922 0.290196 439.291 1 0.937033 0.954531 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Chest-Vessels",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"10 -3024 0 -1278.35 0 22.8277 0.428571 439.291 0.625 3071 0.616071",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"20 -3024 0 0 0 -1278.35 0.54902 0.25098 0.14902 22.8277 0.882353 0.603922 0.290196 439.291 1 0.937033 0.954531 3071 0.827451 0.658824 1",diffuse:"1",interpolation:"1"},{name:"CT-Coronary-Arteries",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"12 -2048 0 136.47 0 159.215 0.258929 318.43 0.571429 478.693 0.776786 3661 1",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"24 -2048 0 0 0 136.47 0 0 0 159.215 0.159804 0.159804 0.159804 318.43 0.764706 0.764706 0.764706 478.693 1 1 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Coronary-Arteries-2",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"14 -2048 0 142.677 0 145.016 0.116071 192.174 0.5625 217.24 0.776786 384.347 0.830357 3661 0.830357",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"28 -2048 0 0 0 142.677 0 0 0 145.016 0.615686 0 0.0156863 192.174 0.909804 0.454902 0 217.24 0.972549 0.807843 0.611765 384.347 0.909804 0.909804 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Coronary-Arteries-3",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"14 -2048 0 128.643 0 129.982 0.0982143 173.636 0.669643 255.884 0.857143 584.878 0.866071 3661 1",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"28 -2048 0 0 0 128.643 0 0 0 129.982 0.615686 0 0.0156863 173.636 0.909804 0.454902 0 255.884 0.886275 0.886275 0.886275 584.878 0.968627 0.968627 0.968627 3661 1 1 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Cropped-Volume-Bone",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"10 -2048 0 -451 0 -450 1 1050 1 3661 1",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"20 -2048 0 0 0 -451 0 0 0 -450 0.0556356 0.0556356 0.0556356 1050 1 1 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Fat",gradientOpacity:"6 0 1 985.12 1 988 1",specularPower:"1",scalarOpacity:"14 -1000 0 -100 0 -99 0.15 -60 0.15 -59 0 101.2 0 952 0",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"36 -1000 0.3 0.3 1 -497.5 0.3 1 0.3 -99 0 0 1 -76.946 0 1 0 -65.481 0.835431 0.888889 0.0165387 83.89 1 0 0 463.28 1 0 0 659.15 1 0.912535 0.0374849 2952 1 0.300267 0.299886",diffuse:"1",interpolation:"1"},{name:"CT-Liver-Vasculature",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"14 -2048 0 149.113 0 157.884 0.482143 339.96 0.660714 388.526 0.830357 1197.95 0.839286 3661 0.848214",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"28 -2048 0 0 0 149.113 0 0 0 157.884 0.501961 0.25098 0 339.96 0.695386 0.59603 0.36886 388.526 0.854902 0.85098 0.827451 1197.95 1 1 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Lung",gradientOpacity:"6 0 1 985.12 1 988 1",specularPower:"1",scalarOpacity:"12 -1000 0 -600 0 -599 0.15 -400 0.15 -399 0 2952 0",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"24 -1000 0.3 0.3 1 -600 0 0 1 -530 0.134704 0.781726 0.0724558 -460 0.929244 1 0.109473 -400 0.888889 0.254949 0.0240258 2952 1 0.3 0.3",diffuse:"1",interpolation:"1"},{name:"CT-MIP",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"8 -3024 0 -637.62 0 700 1 3071 1",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"16 -3024 0 0 0 -637.62 1 1 1 700 1 1 1 3071 1 1 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Muscle",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"10 -3024 0 -155.407 0 217.641 0.676471 419.736 0.833333 3071 0.803922",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"20 -3024 0 0 0 -155.407 0.54902 0.25098 0.14902 217.641 0.882353 0.603922 0.290196 419.736 1 0.937033 0.954531 3071 0.827451 0.658824 1",diffuse:"0.9",interpolation:"1"},{name:"CT-Pulmonary-Arteries",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"14 -2048 0 -568.625 0 -364.081 0.0714286 -244.813 0.401786 18.2775 0.607143 447.798 0.830357 3592.73 0.839286",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"28 -2048 0 0 0 -568.625 0 0 0 -364.081 0.396078 0.301961 0.180392 -244.813 0.611765 0.352941 0.0705882 18.2775 0.843137 0.0156863 0.156863 447.798 0.752941 0.752941 0.752941 3592.73 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Soft-Tissue",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"10 -2048 0 -167.01 0 -160 1 240 1 3661 1",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"20 -2048 0 0 0 -167.01 0 0 0 -160 0.0556356 0.0556356 0.0556356 240 1 1 1 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"CT-Air",gradientOpacity:"4 0 1 255 1",specularPower:"10",scalarOpacity:"8 -3024 0.705882 -900.0 0.715686 -500.0 0 3071 0",specular:"0.2",shade:"1",ambient:"0.1",colorTransfer:"16 -3024 1 1 1 -900.0 0.2 1.0 1.0 -500.0 0.3 0.3 1.0 3071 0 0 0 ",diffuse:"0.9",interpolation:"1"},{name:"MR-Angio",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"12 -2048 0 151.354 0 158.279 0.4375 190.112 0.580357 200.873 0.732143 3661 0.741071",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"24 -2048 0 0 0 151.354 0 0 0 158.279 0.74902 0.376471 0 190.112 1 0.866667 0.733333 200.873 0.937255 0.937255 0.937255 3661 1 1 1",diffuse:"1",interpolation:"1"},{name:"MR-Default",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"12 0 0 20 0 40 0.15 120 0.3 220 0.375 1024 0.5",specular:"0",shade:"1",ambient:"0.2",colorTransfer:"24 0 0 0 0 20 0.168627 0 0 40 0.403922 0.145098 0.0784314 120 0.780392 0.607843 0.380392 220 0.847059 0.835294 0.788235 1024 1 1 1",diffuse:"1",interpolation:"1"},{name:"MR-MIP",gradientOpacity:"4 0 1 255 1",specularPower:"1",scalarOpacity:"8 0 0 98.3725 0 416.637 1 2800 1",specular:"0",shade:"0",ambient:"0.2",colorTransfer:"16 0 1 1 1 98.3725 1 1 1 416.637 1 1 1 2800 1 1 1",diffuse:"1",interpolation:"1"},{name:"MR-T2-Brain",gradientOpacity:"4 0 1 160.25 1",specularPower:"40",scalarOpacity:"10 0 0 36.05 0 218.302 0.171429 412.406 1 641 1",specular:"0.5",shade:"1",ambient:"0.3",colorTransfer:"16 0 0 0 0 98.7223 0.956863 0.839216 0.192157 412.406 0 0.592157 0.807843 641 1 1 1",diffuse:"0.6",interpolation:"1"},{name:"DTI-FA-Brain",gradientOpacity:"4 0 1 0.9950 1",specularPower:"40",scalarOpacity:"16 0 0 0 0 0.3501 0.0158 0.49379 0.7619 0.6419 1 0.9920 1 0.9950 0 0.9950 0",specular:"0.5",shade:"1",ambient:"0.3",colorTransfer:"28 0 1 0 0 0 1 0 0 0.24974 0.4941 1 0 0.49949 0 0.9882 1 0.7492 0.51764 0 1 0.9950 1 0 0 0.9950 1 0 0",diffuse:"0.9",interpolation:"1"}],FF={},Fj=e=>FF[e],FB=()=>{let e=Object.keys(FF).map(e=>FF[e]);return e.sort((e,t)=>"_"===e.id[0]&&"_"!==t.id[0]?1:"_"!==e.id[0]&&"_"===t.id[0]?-1:0),e},FW=e=>e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e),FU=(e,t)=>t&&!0===t.clone&&FW(e)?FH(Array.isArray(e)?[]:{},e,t):e,Fz=(e,t,r)=>{let n=e.slice();return t.forEach(function(t,a){void 0===n[a]?n[a]=FU(t,r):FW(t)?n[a]=FH(e[a],t,r):-1===e.indexOf(t)&&(n[a]=FU(t,r))}),n},FH=(e={},t={},r)=>{let n,a=Array.isArray(t),i=(r||{arrayMerge:Fz}).arrayMerge||Fz;return a?Array.isArray(e)?i(e,t,r):FU(t,r):(n={},FW(e)&&Object.keys(e).forEach(function(t){n[t]=FU(e[t],r)}),Object.keys(t).forEach(function(a){FW(t[a])&&e[a]?n[a]=FH(e[a],t[a],r):n[a]=FU(t[a],r)}),n)},FG=Symbol("Comlink.proxy"),Fq=Symbol("Comlink.endpoint"),F$=Symbol("Comlink.releaseProxy"),FK=Symbol("Comlink.finalizer"),FY=Symbol("Comlink.thrown"),FX=e=>"object"==typeof e&&null!==e||"function"==typeof e,FZ=new Map([["proxy",{canHandle:e=>FX(e)&&e[FG],serialize(e){let{port1:t,port2:r}=new MessageChannel;return function e(t,r=globalThis,n=["*"]){r.addEventListener("message",function a(i){let o;if(!i||!i.data)return;if(!function(e,t){for(let r of e)if(t===r||"*"===r||r instanceof RegExp&&r.test(t))return!0;return!1}(n,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);let{id:s,type:l,path:u}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(F8);try{var d,h,p;let r=u.slice(0,-1).reduce((e,t)=>e[t],t),n=u.reduce((e,t)=>e[t],t);switch(l){case"GET":o=n;break;case"SET":r[u.slice(-1)[0]]=F8(i.data.value),o=!0;break;case"APPLY":o=n.apply(r,c);break;case"CONSTRUCT":d=new n(...c),o=Object.assign(d,{[FG]:!0});break;case"ENDPOINT":{let{port1:r,port2:n}=new MessageChannel;e(t,n),h=r,p=[r],F3.set(h,p),o=h}break;case"RELEASE":o=void 0;break;default:return}}catch(e){o={value:e,[FY]:0}}Promise.resolve(o).catch(e=>({value:e,[FY]:0})).then(e=>{let[n,i]=F4(e);r.postMessage(Object.assign(Object.assign({},n),{id:s}),i),"RELEASE"===l&&(r.removeEventListener("message",a),FJ(r),FK in t&&"function"==typeof t[FK]&&t[FK]())}).catch(e=>{let[t,n]=F4({value:TypeError("Unserializable return value"),[FY]:0});r.postMessage(Object.assign(Object.assign({},t),{id:s}),n)})}),r.start&&r.start()}(e,t),[r,[r]]},deserialize:e=>{var t;let r;return e.start(),t=e,r=new Map,t.addEventListener("message",function(e){let{data:t}=e;if(!t||!t.id)return;let n=r.get(t.id);if(n)try{n(t)}finally{r.delete(t.id)}}),function e(t,r,n=[],a=function(){}){let i,o=!1,s=new Proxy(a,{get(a,i){if(FQ(o),i===F$)return()=>{F2&&F2.unregister(s),F1(t),r.clear(),o=!0};if("then"===i){if(0===n.length)return{then:()=>s};let e=F6(t,r,{type:"GET",path:n.map(e=>e.toString())}).then(F8);return e.then.bind(e)}return e(t,r,[...n,i])},set(e,a,i){FQ(o);let[s,l]=F4(i);return F6(t,r,{type:"SET",path:[...n,a].map(e=>e.toString()),value:s},l).then(F8)},apply(a,i,s){FQ(o);let l=n[n.length-1];if(l===Fq)return F6(t,r,{type:"ENDPOINT"}).then(F8);if("bind"===l)return e(t,r,n.slice(0,-1));let[u,c]=F5(s);return F6(t,r,{type:"APPLY",path:n.map(e=>e.toString()),argumentList:u},c).then(F8)},construct(e,a){FQ(o);let[i,s]=F5(a);return F6(t,r,{type:"CONSTRUCT",path:n.map(e=>e.toString()),argumentList:i},s).then(F8)}});return i=(F0.get(t)||0)+1,F0.set(t,i),F2&&F2.register(s,t,s),s}(t,r,[],void 0)}}],["throw",{canHandle:e=>FX(e)&&FY in e,serialize:({value:e})=>[e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[]],deserialize(e){if(e.isError)throw Object.assign(Error(e.value.message),e.value);throw e.value}}]]);function FJ(e){"MessagePort"===e.constructor.name&&e.close()}function FQ(e){if(e)throw Error("Proxy has been released and is not useable")}function F1(e){return F6(e,new Map,{type:"RELEASE"}).then(()=>{FJ(e)})}let F0=new WeakMap,F2="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(F0.get(e)||0)-1;F0.set(e,t),0===t&&F1(e)});function F5(e){var t;let r=e.map(F4);return[r.map(e=>e[0]),(t=r.map(e=>e[1]),Array.prototype.concat.apply([],t))]}let F3=new WeakMap;function F4(e){for(let[t,r]of FZ)if(r.canHandle(e)){let[n,a]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},a]}return[{type:"RAW",value:e},F3.get(e)||[]]}function F8(e){switch(e.type){case"HANDLER":return FZ.get(e.name).deserialize(e.value);case"RAW":return e.value}}function F6(e,t,r,n){return new Promise(a=>{let i=[,,,,].fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.set(i,a),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),n)})}function F9(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}class F7{constructor(e){this.numRequests={[L2.Interaction]:0,[L2.Thumbnail]:0,[L2.Prefetch]:0,[L2.Compute]:0},this.id=e||F9(),this.requestPool={[L2.Interaction]:{0:[]},[L2.Thumbnail]:{0:[]},[L2.Prefetch]:{0:[]},[L2.Compute]:{0:[]}},this.grabDelay=5,this.awake=!1,this.numRequests={[L2.Interaction]:0,[L2.Thumbnail]:0,[L2.Prefetch]:0,[L2.Compute]:0},this.maxNumRequests={[L2.Interaction]:6,[L2.Thumbnail]:6,[L2.Prefetch]:5,[L2.Compute]:1e3}}setMaxSimultaneousRequests(e,t){this.maxNumRequests[e]=t}getMaxSimultaneousRequests(e){return this.maxNumRequests[e]}destroy(){this.timeoutHandle&&window.clearTimeout(this.timeoutHandle)}addRequest(e,t,r,n=0){void 0===this.requestPool[t][n]&&(this.requestPool[t][n]=[]),this.requestPool[t][n].push({requestFn:e,type:t,additionalDetails:r}),this.startGrabbing()}filterRequests(e){Object.keys(this.requestPool).forEach(t=>{let r=this.requestPool[t];Object.keys(r).forEach(t=>{r[t]=r[t].filter(t=>e(t))})})}clearRequestStack(e){if(!this.requestPool[e])throw Error(`No category for the type ${e} found`);this.requestPool[e]={0:[]}}sendRequests(e){let t=this.maxNumRequests[e]-this.numRequests[e],r=0;for(let n=0;n<t;n++){let t=this.getNextRequest(e);if(null===t)return!1;if(t){let n;this.numRequests[e]++,this.awake=!0;try{n=t.requestFn()}catch(e){console.warn("sendRequest failed",e)}n?.finally?n.finally(()=>{this.numRequests[e]--,this.startAgain()}):(this.numRequests[e]--,r++)}}return r&&this.startAgain(),!0}getNextRequest(e){for(let t of this.getSortedPriorityGroups(e))if(this.requestPool[e][t].length)return this.requestPool[e][t].shift();return null}startGrabbing(){let e=this.sendRequests(L2.Interaction),t=this.sendRequests(L2.Thumbnail),r=this.sendRequests(L2.Prefetch),n=this.sendRequests(L2.Compute);e||t||r||n||(this.awake=!1)}startAgain(){this.awake&&(void 0!==this.grabDelay?this.timeoutHandle||(this.timeoutHandle=window.setTimeout(()=>{this.timeoutHandle=null,this.startGrabbing()},this.grabDelay)):this.startGrabbing())}getSortedPriorityGroups(e){return Object.keys(this.requestPool[e]).map(Number).filter(t=>this.requestPool[e][t].length).sort((e,t)=>e-t)}getRequestPool(){return this.requestPool}}let{pp:je,tZ:jt,gE:jr,bM:jn,uu:ja,UA:ji,_E:jo,RZ:js,UX:jl,HL:ju,U5:jc}=B;jn.getLogger("registration");let jd={gpuTier:{tier:2},isMobile:!1,rendering:{useCPURendering:!1,preferSizeOverAccuracy:!1,useLegacyCameraFOV:!1,strictZSpacingForVolumeViewport:!0,renderingEngineMode:FD.ContextPool,webGlContextCount:7,planar:{cpuThresholds:{image:0x4000000,volume:0x4000000},cpuVolume:{useViewportSamplingForLinear:!0,volumeModifiedThrottleMs:5e3}},volumeRendering:{sampleDistanceMultiplier:1}},debug:{statsOverlay:!1},peerImport:e=>null},jh={...jd,rendering:{...jd.rendering}};function jp(){return!(/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&navigator.platform.includes("MacIntel"))}function jf(){return jh.rendering.useCPURendering}function jm(){return!0===jh.rendering.useGenericViewport}async function jg(e){return jh.peerImport(e)}let jy=new class{constructor(){this.listeners={},this.debouncedListeners={}}reset(){this.listeners={},this.debouncedListeners={}}addEventListenerOnce(e,t){let r=n=>{this.removeEventListener(e,r),t.call(this,n)};this.addEventListener(e,r)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)}addEventListenerDebounced(e,t,r){this.debouncedListeners[e]=this.debouncedListeners[e]||{};let n=this.debouncedListeners[e];if(!n[t]){let a=e=>{n[t]&&clearTimeout(n[t].timeoutId),n[t].timeoutId=setTimeout(()=>{t.call(this,e)},r)};n[t]={original:t,handle:a,timeoutId:null},this.addEventListener(e,a)}}removeEventListenerDebounced(e,t){if(this.debouncedListeners[e]?.[t]){let r=this.debouncedListeners[e][t];this.removeEventListener(e,r.handle),clearTimeout(r.timeoutId),delete this.debouncedListeners[e][t]}}removeEventListener(e,t){if(!this.listeners[e])return;let r=this.listeners[e],n=r.length;for(let e=0;e<n;e++)if(r[e]===t)return void r.splice(e,1)}dispatchEvent(e){if(!this.listeners[e.type])return!e.defaultPrevented;let t=this.listeners[e.type].slice(),r=t.length;for(let n=0;n<r;n++)try{t[n].call(this,e)}catch(t){console.error(`error in event listener of type: ${e.type}`,t)}return!e.defaultPrevented}};function jv(e=jy,t,r=null){if(!t)throw Error("Event type was not defined");let n=new CustomEvent(t,{detail:r,cancelable:!0});return e?.dispatchEvent(n)}let jb=u(5744)(),jw={vtkObject:()=>null};function jx(e){if(null==e||e.isA)return e;if(!e.vtkClass)return jb.console&&jb.console.error&&jb.console.error("Invalid VTK object"),null;let t=jw[e.vtkClass];if(!t)return jb.console&&jb.console.error&&jb.console.error(`No vtk class found for Object of type ${e.vtkClass}`),null;let r={...e};Object.keys(r).forEach(e=>{r[e]&&"object"==typeof r[e]&&r[e].vtkClass&&(r[e]=jx(r[e]))});let n=t(r);return n&&n.modified&&n.modified(),n}jx.register=function(e,t){jw[e]=t};class jC extends Array{push(){for(let e=0;e<arguments.length;e++)this.includes(arguments[e])||super.push(arguments[e]);return this.length}}let jk=0,jM=e=>{throw Error(`Named parameter '${e}' is missing`)},jS=Symbol("void"),jE={};function jP(){}["log","debug","info","warn","error","time","timeEnd","group","groupEnd"].forEach(e=>{jE[e]=jP}),jb.console=console.hasOwnProperty("log")?console:jE;let jI={debug:jP,error:jb.console.error||jP,info:jb.console.info||jP,log:jb.console.log||jP,warn:jb.console.warn||jP};function jT(e,t){jI[e]&&(jI[e]=t||jP)}function j_(...e){jI.log(...e)}function jD(...e){jI.info(...e)}function jA(...e){jI.debug(...e)}function jO(...e){jI.error(...e)}function jR(...e){jI.warn(...e)}let jN={};function jL(e){jN[e]||(jI.error(e),jN[e]=!0)}let jV=Object.create(null);jV.Float32Array=Float32Array,jV.Float64Array=Float64Array,jV.Uint8Array=Uint8Array,jV.Int8Array=Int8Array,jV.Uint16Array=Uint16Array,jV.Int16Array=Int16Array,jV.Uint32Array=Uint32Array,jV.Int32Array=Int32Array,jV.Uint8ClampedArray=Uint8ClampedArray;try{jV.BigInt64Array=BigInt64Array,jV.BigUint64Array=BigUint64Array}catch{}function jF(e,...t){return new(jV[e]||Float64Array)(...t)}function jj(e,...t){return(jV[e]||Float64Array).from(...t)}function jB(e){return e.charAt(0).toUpperCase()+e.slice(1)}function jW(e){return jB("_"===e[0]?e.slice(1):e)}function jU(e){return e.charAt(0).toLowerCase()+e.slice(1)}function jz(e,t=2,r=1e3){let n=["TB","GB","MB","KB"],a=Number(e),i="B";for(;a>r;)a/=r,i=n.pop();return`${a.toFixed(t)} ${i}`}function jH(e,t=" "){let r=[],n=e;for(;n>1e3;)r.push(`000${n%1e3}`.slice(-3)),n=Math.floor(n/1e3);return n>0&&r.push(n),r.reverse(),r.join(t)}function jG(e){Object.keys(e).forEach(t=>{Array.isArray(e[t])&&(e[t]=[].concat(e[t]))})}function jq(e){return e&&e.isA?e.getState():e}function j$(e){setTimeout(e,0)}function jK(e,t){let r=performance.now();e.finally(()=>{t(performance.now()-r)})}function jY(e={},t={}){jG(t);let r=[];if(Number.isInteger(t.mtime)||(t.mtime=++jk),"classHierarchy"in t){if(!(t.classHierarchy instanceof jC)){let e=new jC;for(let r=0;r<t.classHierarchy.length;r++)e.push(t.classHierarchy[r]);t.classHierarchy=e}}else t.classHierarchy=new jC("vtkObject");return e.isDeleted=()=>!!t.deleted,e.modified=n=>{t.deleted?jO("instance deleted - cannot call any method"):n&&n<e.getMTime()||(t.mtime=++jk,r.forEach(t=>t&&t(e)))},e.onModified=e=>{if(t.deleted)return jO("instance deleted - cannot call any method"),null;let n=r.length;return r.push(e),Object.freeze({unsubscribe:function(){r[n]=null}})},e.getMTime=()=>t.mtime,e.isA=e=>{let r=t.classHierarchy.length;for(;r--;)if(t.classHierarchy[r]===e)return!0;return!1},e.getClassName=(e=0)=>t.classHierarchy[t.classHierarchy.length-1-e],e.set=(r={},n=!1,a=!1)=>{let i=!1;return Object.keys(r).forEach(o=>{let s=a?null:e[`set${jB(o)}`];s&&Array.isArray(r[o])&&s.length>1?i=s(...r[o])||i:s?i=s(r[o])||i:(-1!==["mtime"].indexOf(o)||n||jR(`Warning: Set value to model directly ${o}, ${r[o]}`),i=t[o]!==r[o]||i,t[o]=r[o])}),i},e.get=(...e)=>{if(!e.length)return t;let r={};return e.forEach(e=>{r[e]=t[e]}),r},e.getReferenceByName=e=>t[e],e.delete=()=>{Object.keys(t).forEach(e=>delete t[e]),r.forEach((e,t)=>{r[t]=null}),t.deleted=!0},e.getState=()=>{if(t.deleted)return null;let r={...t,vtkClass:e.getClassName()};Object.keys(r).forEach(e=>{if(null===r[e]||void 0===r[e]||"_"===e[0])delete r[e];else if(r[e].isA)r[e]=r[e].getState();else if(Array.isArray(r[e]))r[e]=r[e].map(jq);else{var t;t=r[e],Object.values(jV).some(e=>t instanceof e)&&(r[e]=Array.from(r[e]))}});let n={};return Object.keys(r).sort().forEach(e=>{n[e]=r[e]}),n.mtime&&delete n.mtime,n},e.shallowCopy=(r,n=!1)=>{if(r.getClassName()!==e.getClassName())throw Error(`Cannot ShallowCopy ${r.getClassName()} into ${e.getClassName()}`);let a=r.get(),i=Object.keys(t).sort();Object.keys(a).sort().forEach(e=>{let r=i.indexOf(e);-1===r?n&&jA(`add ${e} in shallowCopy`):i.splice(r,1),t[e]=a[e]}),i.length&&n&&jA(`Untouched keys: ${i.join(", ")}`),e.modified()},e.toJSON=function(){return e.getState()},e}let jX={object:(e,t,r)=>function(){return{...t[r.name]}}};function jZ(e,t,r){r.forEach(r=>{if("object"==typeof r){let n=jX[r.type];n?e[`get${jW(r.name)}`]=n(e,t,r):e[`get${jW(r.name)}`]=()=>t[r.name]}else e[`get${jW(r)}`]=()=>t[r]})}let jJ={enum(e,t,r){let n=`_on${jW(r.name)}Changed`;return a=>{if("string"==typeof a){if(void 0!==r.enum[a])return t[r.name]!==r.enum[a]&&(t[r.name]=r.enum[a],e.modified(),!0);throw jO(`Set Enum with invalid argument ${r}, ${a}`),RangeError("Set Enum with invalid string argument")}if("number"==typeof a){if(t[r.name]!==a){if(-1!==Object.keys(r.enum).map(e=>r.enum[e]).indexOf(a)){let i=t[r.name];return t[r.name]=a,t[n]?.(e,t,a,i),e.modified(),!0}throw jO(`Set Enum outside numeric range ${r}, ${a}`),RangeError("Set Enum outside numeric range")}return!1}throw jO(`Set Enum with invalid argument (String/Number) ${r}, ${a}`),TypeError("Set Enum with invalid argument (String/Number)")}},object(e,t,r){r.params?.length===1&&jR('Setter of type "object" with a single "param" field is not supported');let n=`_on${jW(r.name)}Changed`;return(...a)=>{let i;if(i=a.length>1&&r.params?.length?r.params.reduce((e,t,r)=>Object.assign(e,{[t]:a[r]}),{}):a[0],!TD(t[r.name],i)){let a=t[r.name];return t[r.name]=i,t[n]?.(e,t,i,a),e.modified(),!0}return!1}}};function jQ(e){if("object"==typeof e){let t=jJ[e.type];if(t)return(r,n)=>t(r,n,e);throw jO(`No setter for field ${e}`),TypeError("No setter for field")}return function(t,r){let n=`_on${jW(e)}Changed`;return function(a){if(r.deleted)return jO("instance deleted - cannot call any method"),!1;if(r[e]!==a){let i=r[e.name];return r[e]=a,r[n]?.(t,r,a,i),t.modified(),!0}return!1}}}function j1(e,t,r){r.forEach(r=>{"object"==typeof r?e[`set${jW(r.name)}`]=jQ(r)(e,t):e[`set${jW(r)}`]=jQ(r)(e,t)})}function j0(e,t,r){jZ(e,t,r),j1(e,t,r)}function j2(e,t,r){r.forEach(r=>{e[`get${jW(r)}`]=()=>t[r]?Array.from(t[r]):t[r],e[`get${jW(r)}ByReference`]=()=>t[r]})}function j5(e,t,r,n,a){r.forEach(r=>{if(t[r]&&n&&t[r].length!==n)throw RangeError(`Invalid initial number of values for array (${r})`);let i=`_on${jW(r)}Changed`;e[`set${jW(r)}`]=(...o)=>{let s;if(t.deleted)return jO("instance deleted - cannot call any method"),!1;let l=o,u=!1;if(1===l.length&&(null==l[0]||l[0].length>=0)&&(l=l[0],u=!0),null==l)s=t[r]!==l;else{if(n&&l.length!==n)if(l.length<n&&void 0!==a)for(l=Array.from(l),u=!1;l.length<n;)l.push(a);else throw RangeError(`Invalid number of values for array setter (${r})`);s=null==t[r]||t[r].length!==l.length;for(let e=0;!s&&e<l.length;++e)s=t[r][e]!==l[e];s&&u&&(l=Array.from(l))}if(s){let n=t[r.name];t[r]=l,t[i]?.(e,t,l,n),e.modified()}return s},e[`set${jW(r)}From`]=e=>{let n=t[r];e.forEach((e,t)=>{n[t]=e})}})}function j3(e,t,r,n,a){j2(e,t,r),j5(e,t,r,n,a)}function j4(e,t,r){for(let e=0;e<r.length;e++){let n=r[e];void 0!==t[n]&&(t[`_${n}`]=t[n],delete t[n])}}function j8(e,t,r,n){function a(r,n=0){t.deleted?jO("instance deleted - cannot call any method"):n>=t.numberOfInputs?jO(`algorithm ${e.getClassName()} only has ${t.numberOfInputs} input ports. To add more input ports, use addInputData()`):(t.inputData[n]!==r||t.inputConnection[n])&&(t.inputData[n]=r,t.inputConnection[n]=null,e.modified&&e.modified())}function i(r,n=0){if(t.deleted)return void jO("instance deleted - cannot call any method");if(n>=t.numberOfInputs){let r=`algorithm ${e.getClassName()} only has `;jO(r+=`${t.numberOfInputs} input ports. To add more input ports, use addInputConnection()`);return}t.inputData[n]=null,t.inputConnection[n]=r}function o(){let e=t.numberOfInputs;for(;e&&!t.inputData[e-1]&&!t.inputConnection[e-1];)e--;return e===t.numberOfInputs&&t.numberOfInputs++,e}function s(r=0){return t.deleted?(jO("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[r])}if(t.inputData?t.inputData=t.inputData.map(jx):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(jx):t.inputConnection=[],t.output?t.output=t.output.map(jx):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(jx):t.inputArrayToProcess=[],t.numberOfInputs=r,e.shouldUpdate=()=>{let r=e.getMTime(),a=1/0,i=n;for(;i--;){if(!t.output[i]||t.output[i].isDeleted())return!0;let e=t.output[i].getMTime();if(e<r)return!0;e<a&&(a=e)}for(i=t.numberOfInputs;i--;)if(t.inputConnection[i]?.filter.shouldUpdate()||e.getInputData(i)?.getMTime()>a)return!0;return!1},t.numberOfInputs){let r=t.numberOfInputs;for(;r--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=a,e.setInputConnection=i,e.addInputData=function(e){t.deleted?jO("instance deleted - cannot call any method"):a(e,o())},e.addInputConnection=function(e){t.deleted?jO("instance deleted - cannot call any method"):i(e,o())},e.getInputData=function(e=0){return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(e=0){return t.inputConnection[e]}}n&&(e.getOutputData=s,e.getOutputPort=function(t=0){let r=()=>s(t);return r.filter=e,r}),e.update=()=>{let r=[];if(t.numberOfInputs){let n=0;for(;n<t.numberOfInputs;)r[n]=e.getInputData(n),n++}e.requestData&&!e.isDeleted()&&e.shouldUpdate()&&e.requestData(r,t.output)},e.getNumberOfInputPorts=()=>t.numberOfInputs,e.getNumberOfOutputPorts=()=>n||t.output.length,e.getInputArrayToProcess=e=>{let r=t.inputArrayToProcess[e],n=t.inputData[e];return r&&n?n[`get${r.fieldAssociation}`]().getArray(r.arrayName):null},e.setInputArrayToProcess=(e,r,n,a="Scalars")=>{for(;t.inputArrayToProcess.length<e;)t.inputArrayToProcess.push(null);t.inputArrayToProcess[e]={arrayName:r,fieldAssociation:n,attributeType:a}}}let j6=Symbol("Event abort");function j9(e,t,r){let n=[],a=e.delete,i=1;function o(e){for(let t=0;t<n.length;++t){let[r]=n[t];if(r===e)return void n.splice(t,1)}}e[`invoke${jW(r)}`]=function(){if(t.deleted)return void jO("instance deleted - cannot call any method");let r=n.slice();for(let t=0;t<r.length;++t){let[,n,a]=r[t];if(n)if(a<0)setTimeout(()=>n.apply(e,arguments),1-a);else{let t=n.apply(e,arguments);if(t===j6)break}}},e[`on${jW(r)}`]=(e,a=0)=>{if(!e.apply)return console.error(`Invalid callback for event ${r}`),null;if(t.deleted)return jO("instance deleted - cannot call any method"),null;let s=i++;return n.push([s,e,a]),n.sort((e,t)=>t[2]-e[2]),Object.freeze({unsubscribe:function(){o(s)}})},e.delete=()=>{a(),n.forEach(([e])=>o(e))}}function j7(e,t){let r=(t={})=>{let r={};return e(r,{},t),Object.freeze(r)};return t&&jx.register(t,r),r}function Be(...e){return(...t)=>e.filter(e=>!!e).map(e=>e(...t))}function Bt(e){return e&&e.isA&&e.isA("vtkObject")}function Br(e,t,r=[],n=[]){if(Bt(e)){if(n.indexOf(e)>=0)return r;n.push(e);let a=t(e);void 0!==a&&r.push(a);let i=e.get();Object.keys(i).forEach(e=>{let a=i[e];Array.isArray(a)?a.forEach(e=>{Br(e,t,r,n)}):Br(a,t,r,n)})}return r}function Bn(e,t,r){let n,a=(...a)=>{let i=this,o=r&&!n;clearTimeout(n),n=setTimeout(()=>{n=null,r||e.apply(i,a)},t),o&&e.apply(i,a)};return a.cancel=()=>clearTimeout(n),a}function Ba(e,t){let r=!1,n=null;function a(){r=!1,null!==n&&(i(...n),n=null)}function i(...o){if(r){n=o;return}r=!0,e(...o),setTimeout(a,t)}return i}function Bi(e,t,r={}){t.keystore=Object.assign(t.keystore||{},r),e.setKey=(e,r)=>{t.keystore[e]=r},e.getKey=e=>t.keystore[e],e.getAllKeys=()=>Object.keys(t.keystore),e.deleteKey=e=>delete t.keystore[e],e.clearKeystore=()=>e.getAllKeys().forEach(e=>delete t.keystore[e])}let Bo=1,Bs="__root__";function Bl(e,t){Bi(e,t);let r=e.delete;t.proxyId=`${Bo++}`,t.ui=JSON.parse(JSON.stringify(t.ui||[])),jZ(e,t,["proxyId","proxyGroup","proxyName"]),j0(e,t,["proxyManager"]);let n={},a={};function i(e,t){a[t]||(a[t]=[]);let r=a[t];for(let t=0;t<e.length;t++)r.push(e[t].name),n[e[t].name]=e[t],e[t].children&&e[t].children.length&&i(e[t].children,e[t].name)}function o(r=Bs){let n=[],i=t.proxyId,s=function(e=Bs){return a[e]}(r)||[];for(let t=0;t<s.length;t++){let r=s[t],a=e[`get${jW(r)}`],l={id:i,name:r,value:a?a():void 0},u=o(r);u.length&&(l.children=u),n.push(l)}return n}i(t.ui,Bs),e.updateUI=r=>{t.ui=JSON.parse(JSON.stringify(r||[])),Object.keys(n).forEach(e=>delete n[e]),Object.keys(a).forEach(e=>delete a[e]),i(t.ui,Bs),e.modified()},e.updateProxyProperty=(e,t)=>{let r=n[e];r?Object.assign(r,t):n[e]={...t}},e.activate=()=>{if(t.proxyManager){let r=`setActive${jW(e.getProxyGroup().slice(0,-1))}`;t.proxyManager[r]&&t.proxyManager[r](e)}},t.propertyLinkSubscribers={},e.registerPropertyLinkForGC=(e,r)=>{r in t.propertyLinkSubscribers||(t.propertyLinkSubscribers[r]=[]),t.propertyLinkSubscribers[r].push(e)},e.gcPropertyLinks=r=>{let n=t.propertyLinkSubscribers[r]||[];for(;n.length;)n.pop().unbind(e)},t.propertyLinkMap={},e.getPropertyLink=(e,r=!1)=>{if(t.propertyLinkMap[e])return t.propertyLinkMap[e];let n=null,a=[],i=0,o=!1;function s(r,l=!1){if(o)return null;let u=[],c=null;for(i=a.length;i--;){let e=a[i];e.instance===r?c=e:u.push(e)}if(!c)return null;let d=c.instance[`get${jW(c.propertyName)}`]();if(!function(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}(d,n)||l){for(n=d,o=!0;u.length;){let e=u.pop();e.instance.set({[e.propertyName]:n})}o=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function l(e,t){let r=[];for(i=a.length;i--;){let n=a[i];n.instance===e&&(n.propertyName===t||void 0===t)&&(n.subscription.unsubscribe(),r.push(i))}for(;r.length;)a.splice(r.pop(),1)}let u={bind:function(r,n,i=!1){let o=r.onModified(s),u=a[0];return a.push({instance:r,propertyName:n,subscription:o}),i&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?r.set({[n]:t.propertyLinkMap[e].value}):u&&s(u.instance,!0)),{unsubscribe:()=>l(r,n)}},unbind:l,unsubscribe:function(){for(;a.length;)a.pop().subscription.unsubscribe()},persistent:r};return t.propertyLinkMap[e]=u,u},e.listPropertyNames=()=>o().map(e=>e.name),e.getPropertyByName=e=>o().find(t=>t.name===e),e.getPropertyDomainByName=e=>(n[e]||{}).domain,e.getProxySection=()=>({id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:o()}),e.delete=()=>{let n=Object.keys(t.propertyLinkMap),a=n.length;for(;a--;)t.propertyLinkMap[n[a]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),r()},e.getState=()=>null,j$(function(){if(t.links)for(let r=0;r<t.links.length;r++){let{link:n,property:a,persistent:i,updateOnBind:o,type:s}=t.links[r];if("application"===s){let r=t.proxyManager.getPropertyLink(n,i);e.registerPropertyLinkForGC(r,"application"),r.bind(e,a,o)}}})}function Bu(e,t,r){let n=e.delete,a=[],i=Object.keys(r),o=i.length;for(;o--;){let n=i[o],{modelKey:s,property:l,modified:u=!0}=r[n],c=jW(l),d=jW(n);e[`get${d}`]=t[s][`get${c}`],e[`set${d}`]=t[s][`set${c}`],u&&a.push(t[s].onModified(e.modified))}e.delete=()=>{for(;a.length;)a.pop().unsubscribe();n()}}function Bc(e,t,r={},n={}){t.this=e;let a=Object.keys(n),i=a.length;for(;i--;){let o=a[i];t[o]=n[o];let s=r[o];e[`set${jW(o)}`]=r=>{r!==t[o]&&(t[o]=r,function(e){let r=Object.keys(e),n=r.length;for(;n--;){let a=r[n];t[a].set(e[a])}}(s[r]),e.modified())}}a.length&&jZ(e,t,a)}function Bd(e){let t=0,r=0,n=0,a=0;return"detail"in e&&(r=e.detail),"wheelDelta"in e&&(r=-e.wheelDelta/120),"wheelDeltaY"in e&&(r=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=r,r=0),n=10*t,a=10*r,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||a)&&e.deltaMode&&(1===e.deltaMode?(n*=40,a*=40):(n*=800,a*=800)),n&&!t&&(t=n<1?-1:1),a&&!r&&(r=a<1?-1:1),{spinX:t,spinY:r||t,pixelX:n,pixelY:a||n}}var Bh={algo:j8,capitalize:jB,chain:Be,debounce:Bn,enumToString:function(e,t){return Object.keys(e).find(r=>e[r]===t)},event:j9,EVENT_ABORT:j6,formatBytesToProperUnit:jz,formatNumbersWithThousandSeparator:jH,get:jZ,getArray:j2,getCurrentGlobalMTime:function(){return jk},getStateArrayMapFunc:jq,isVtkObject:Bt,keystore:Bi,measurePromiseExecution:jK,moveToProtected:j4,newInstance:j7,newTypedArray:jF,newTypedArrayFrom:jj,normalizeWheel:Bd,obj:jY,proxy:Bl,proxyPropertyMapping:Bu,proxyPropertyState:Bc,safeArrays:jG,set:j1,setArray:j5,setGet:j0,setGetArray:j3,setImmediate:j$,setLoggerFunction:jT,throttle:Ba,traverseInstanceTree:Br,TYPED_ARRAYS:jV,uncapitalize:jU,VOID:jS,vtkDebugMacro:jA,vtkErrorMacro:jO,vtkInfoMacro:jD,vtkLogMacro:j_,vtkOnceErrorMacro:jL,vtkWarningMacro:jR,objectSetterMap:jJ,requiredParam:jM},Bp=Object.freeze({__proto__:null,requiredParam:jM,VOID:jS,setLoggerFunction:jT,vtkLogMacro:j_,vtkInfoMacro:jD,vtkDebugMacro:jA,vtkErrorMacro:jO,vtkWarningMacro:jR,vtkOnceErrorMacro:jL,TYPED_ARRAYS:jV,newTypedArray:jF,newTypedArrayFrom:jj,capitalize:jB,_capitalize:jW,uncapitalize:jU,formatBytesToProperUnit:jz,formatNumbersWithThousandSeparator:jH,setImmediateVTK:j$,measurePromiseExecution:jK,obj:jY,get:jZ,set:j1,setGet:j0,getArray:j2,setArray:j5,setGetArray:j3,moveToProtected:j4,algo:j8,EVENT_ABORT:j6,event:j9,newInstance:j7,chain:Be,isVtkObject:Bt,traverseInstanceTree:Br,debounce:Bn,throttle:Ba,keystore:Bi,proxy:Bl,proxyPropertyMapping:Bu,proxyPropertyState:Bc,normalizeWheel:Bd,default:Bh}),Bf=u(6037);let Bm=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],Bg=[1,0,0,0,1,0,0,0,1],{vtkErrorMacro:By,vtkWarningMacro:Bv}=Bh,Bb=0;function Bw(e){return()=>By(`vtkMath::${e} - NOT IMPLEMENTED`)}function Bx(e,t,r,n){let a;for(let i=0;i<t;i++)a=e[r*t+i],e[r*t+i]=e[n*t+i],e[n*t+i]=a}function BC(e,t,r,n){let a;for(let i=0;i<t;i++)a=e[i*t+r],e[i*t+r]=e[i*t+n],e[i*t+n]=a}function Bk(e=3){let t=Array(e);for(let r=0;r<e;++r)t[r]=0;return t}function BM(e){return e/180*Math.PI}function BS(e){return 180*e/Math.PI}let{round:BE,floor:BP,ceil:BI,min:BT,max:B_}=Math,BD=Bw("ceilLog2"),BA=Bw("factorial");function BO(e){let t=1;for(;t<e;)t*=2;return t}function BR(e){return e===BO(e)}let BN=Bw("gaussian");function BL(e,t,r){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r[2]=e[2]+t[2],r}function BV(e,t,r){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r[2]=e[2]-t[2],r}function BF(e,t){return e[0]*=t,e[1]*=t,e[2]*=t,e}function Bj(e,t){return e[0]*=t,e[1]*=t,e}function BB(e,t,r,n){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n[2]=e[2]+t[2]*r,n}function BW(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function BU(e,t,r){let n=e[1]*t[2]-e[2]*t[1],a=e[2]*t[0]-e[0]*t[2],i=e[0]*t[1]-e[1]*t[0];return r[0]=n,r[1]=a,r[2]=i,r}function Bz(e,t=3){switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:{let r=0;for(let n=0;n<t;n++)r+=e[n]*e[n];return Math.sqrt(r)}}}function BH(e){let t=Bz(e);return 0!==t&&(e[0]/=t,e[1]/=t,e[2]/=t),t}function BG(e,t){return e[0]*t[0]+e[1]*t[1]}function Bq(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])+(e[2]-t[2])*(e[2]-t[2])}function B$(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function BK(e){let t=B$(e);return 0!==t&&(e[0]/=t,e[1]/=t),t}function BY(...e){return 2===e.length?e[0][0]*e[1][1]-e[1][0]*e[0][1]:4===e.length?e[0]*e[3]-e[1]*e[2]:NaN}function BX(e,t,r){let n=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],a=e[3]*t[0]+e[4]*t[1]+e[5]*t[2],i=e[6]*t[0]+e[7]*t[1]+e[8]*t[2];r[0]=n,r[1]=a,r[2]=i}function BZ(e,t,r){let n=[...e],a=[...t];for(let e=0;e<3;e++)r[e]=n[0]*a[e]+n[1]*a[e+3]+n[2]*a[e+6],r[e+3]=n[3]*a[e]+n[4]*a[e+3]+n[5]*a[e+6],r[e+6]=n[6]*a[e]+n[7]*a[e+3]+n[8]*a[e+6]}function BJ(e,t){let r;r=e[3],t[3]=e[1],t[1]=r,r=e[6],t[6]=e[2],t[2]=r,r=e[7],t[7]=e[5],t[5]=r,t[0]=e[0],t[4]=e[4],t[8]=e[8]}function BQ(e){return e[0]*e[4]*e[8]+e[3]*e[7]*e[2]+e[6]*e[1]*e[5]-e[0]*e[7]*e[5]-e[3]*e[1]*e[8]-e[6]*e[4]*e[2]}function B1(e,t,r=1e-6){return e.length===t.length&&e.every(function(e,n){return Math.abs(e-t[n])<=r})}function B0(e){for(let t=0;t<3;t++)e[3*t]=e[3*t+1]=e[3*t+2]=0,e[3*t+t]=1}function B2(e,t){for(let r=0;r<e;r++){for(let n=0;n<e;n++)t[r*e+n]=0;t[r*e+r]=1}return t}function B5(e,t){let r=e[0]*e[0],n=e[0]*e[1],a=e[0]*e[2],i=e[0]*e[3],o=e[1]*e[1],s=e[2]*e[2],l=e[3]*e[3],u=e[1]*e[2],c=e[1]*e[3],d=e[2]*e[3],h=o+s+l,p=1/(r+h),f=(r-h)*p;p*=2,t[0]=o*p+f,t[3]=(u+i)*p,t[6]=(c-a)*p,t[1]=(u-i)*p,t[4]=s*p+f,t[7]=(d+n)*p,t[2]=(c+a)*p,t[5]=(d-n)*p,t[8]=l*p+f}function B3(e,t=0){if(!`${e}`.includes("e"))return+`${Math.round(`${e}e+${t}`)}e-${t}`;let r=`${e}`.split("e"),n="";return+r[1]+t>0&&(n="+"),+`${Math.round(`${+r[0]}e${n}${+r[1]+t}`)}e-${t}`}function B4(e,t=[0,0,0],r=0){return t[0]=B3(e[0],r),t[1]=B3(e[1],r),t[2]=B3(e[2],r),t}function B8(e,t,r,n){let a,i,o,s,l,u,c,d,h,p,f,m,g,y,v,b,w=Bk(t),x=Bk(t),C=(e,t,r)=>{y=e[t],g=e[r],e[t]=y-m*(g+y*p),e[r]=g+m*(y-g*p)};for(B2(t,n),l=0;l<t;l++)w[l]=r[l]=e[l+l*t],x[l]=0;for(a=0;a<20;a++){for(l=0,f=0;l<t-1;l++)for(s=l+1;s<t;s++)f+=Math.abs(e[l*t+s]);if(0===f)break;for(c=a<3?.2*f/(t*t):0,l=0;l<t-1;l++)for(s=l+1;s<t;s++)if(y=100*Math.abs(e[l*t+s]),a>3&&Math.abs(r[l])+y===Math.abs(r[l])&&Math.abs(r[s])+y===Math.abs(r[s]))e[l*t+s]=0;else if(Math.abs(e[l*t+s])>c){for(Math.abs(g=r[s]-r[l])+y===Math.abs(g)?h=e[l*t+s]/g:(h=1/(Math.abs(d=.5*g/e[l*t+s])+Math.sqrt(1+d*d)),d<0&&(h=-h)),v=1/Math.sqrt(1+h*h),p=(m=h*v)/(1+v),g=h*e[l*t+s],x[l]-=g,x[s]+=g,r[l]-=g,r[s]+=g,e[l*t+s]=0,i=0;i<=l-1;i++)C(e,i*t+l,i*t+s);for(i=l+1;i<=s-1;i++)C(e,l*t+i,i*t+s);for(i=s+1;i<t;i++)C(e,l*t+i,s*t+i);for(i=0;i<t;i++)C(n,i*t+l,i*t+s)}for(l=0;l<t;l++)w[l]+=x[l],r[l]=w[l],x[l]=0}if(a>=20)return Bv("vtkMath::Jacobi: Error extracting eigenfunctions"),0;for(i=0;i<t-1;i++){for(b=r[o=i],a=i+1;a<t;a++)(r[a]>=b||1e-12>Math.abs(r[a]-b))&&(b=r[o=a]);o!==i&&(r[o]=r[i],r[i]=b,BC(n,t,i,o))}let k=(t>>1)+(1&t);for(u=0,a=0;a<t*t;a++)n[a]>=0&&u++;if(u<k)for(a=0;a<t;a++)n[a*t+i]*=-1;return 1}function B6(e,t){let r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];r[0]=e[0]+e[4]+e[8],r[5]=e[0]-e[4]-e[8],r[10]=-e[0]+e[4]-e[8],r[15]=-e[0]-e[4]+e[8],r[1]=r[4]=e[7]-e[5],r[2]=r[8]=e[2]-e[6],r[3]=r[12]=e[3]-e[1],r[6]=r[9]=e[3]+e[1],r[7]=r[13]=e[2]+e[6],r[11]=r[14]=e[7]+e[5];let n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];B8([...r],4,[0,0,0,0],n),t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12]}function B9(e,t){let r;for(let r=0;r<9;r++)t[r]=e[r];let n=Bk(3),a=Bk(3);for(let e=0;e<3;e++){let a=Math.abs(t[3*e]),i=Math.abs(t[3*e+1]),o=Math.abs(t[3*e+2]);r=o>(r=i>a?i:a)?o:r,n[e]=1,0!==r&&(n[e]/=r)}let i=Math.abs(t[0])*n[0],o=Math.abs(t[3])*n[1],s=Math.abs(t[6])*n[2];a[0]=0,o>=(r=i)&&(r=o,a[0]=1),s>=r&&(a[0]=2),0!==a[0]&&(BC(t,3,a[0],0),n[a[0]]=n[0]);let l=Math.abs(t[4])*n[1],u=Math.abs(t[7])*n[2];a[1]=1,u>=(r=l)&&(a[1]=2,BC(t,3,1,2)),a[2]=2;let c=0;if(0>BQ(t)){c=1;for(let e=0;e<9;e++)t[e]=-t[e]}let d=Bk(4);if(B6(t,d),B5(d,t),c)for(let e=0;e<9;e++)t[e]=-t[e];1!==a[1]&&BC(t,3,a[1],1),0!==a[0]&&BC(t,3,a[0],0)}function B7(e,t,r){let n,a,i,o,s,l;if(B8([...e],3,t,r),t[0]===t[1]&&t[0]===t[2])return void B0(r);for(BJ(r,r),n=0;n<3;n++)if(t[(n+1)%3]===t[(n+2)%3]){for(l=Math.abs(r[3*n]),o=0,a=1;a<3;a++)l<(s=Math.abs(r[3*n+a]))&&(l=s,o=a);o!==n&&(s=t[o],t[o]=t[n],t[n]=s,Bx(r,3,n,o)),r[3*o+o]<0&&(r[3*o]=-r[3*o],r[3*o+1]=-r[3*o+1],r[3*o+2]=-r[3*o+2]),a=(o+1)%3,i=(o+2)%3,r[3*a]=0,r[3*a+1]=0,r[3*a+2]=0,r[3*a+a]=1;let e=BU([r[3*o],r[3*o+1],r[3*o+2]],[r[3*a],r[3*a+1],r[3*a+2]],[]);BH(e);let u=BU(e,[r[3*o],r[3*o+1],r[3*o+2]],[]);for(let t=0;t<3;t++)r[3*i+t]=e[t],r[3*a+t]=u[t];BJ(r,r);return}for(l=Math.abs(r[0]),o=0,n=1;n<3;n++)l<(s=Math.abs(r[3*n]))&&(l=s,o=n);if(0!==o){let e=t[o];t[o]=t[0],t[0]=e,Bx(r,3,o,0)}if(Math.abs(r[4])<Math.abs(r[7])){let e=t[2];t[2]=t[1],t[1]=e,Bx(r,3,1,2)}for(n=0;n<2;n++)r[3*n+n]<0&&(r[3*n]=-r[3*n],r[3*n+1]=-r[3*n+1],r[3*n+2]=-r[3*n+2]);0>BQ(r)&&(r[6]=-r[6],r[7]=-r[7],r[8]=-r[8]),BJ(r,r)}function We(e,t,r){let n,a,i,o,s,l,u,c=0,d=Bk(r);for(n=0;n<r;n++){for(o=0,a=0;a<r;a++)(u=Math.abs(e[n*r+a]))>o&&(o=u);if(0===o)return Bv("Unable to factor linear system"),0;d[n]=1/o}for(a=0;a<r;a++){for(n=0;n<a;n++){for(s=e[n*r+a],i=0;i<n;i++)s-=e[n*r+i]*e[i*r+a];e[n*r+a]=s}for(o=0,n=a;n<r;n++){for(s=e[n*r+a],i=0;i<a;i++)s-=e[n*r+i]*e[i*r+a];e[n*r+a]=s,(l=d[n]*Math.abs(s))>=o&&(o=l,c=n)}if(a!==c){for(i=0;i<r;i++)l=e[c*r+i],e[c*r+i]=e[a*r+i],e[a*r+i]=l;d[c]=d[a]}if(t[a]=c,1e-12>=Math.abs(e[a*r+a]))return Bv("Unable to factor linear system"),0;if(a!==r-1)for(l=1/e[a*r+a],n=a+1;n<r;n++)e[n*r+a]*=l}return 1}function Wt(e,t,r,n){let a,i,o,s,l;for(o=-1,a=0;a<n;a++){if(l=r[s=t[a]],r[s]=r[a],o>=0)for(i=o;i<=a-1;i++)l-=e[a*n+i]*r[i];else 0!==l&&(o=a);r[a]=l}for(a=n-1;a>=0;a--){for(l=r[a],i=a+1;i<n;i++)l-=e[a*n+i]*r[i];r[a]=l/e[a*n+a]}}function Wr(e,t,r){if(2===r){let r=Bk(2),n=BY(e[0],e[1],e[2],e[3]);return 0===n?0:(r[0]=(e[3]*t[0]-e[1]*t[1])/n,r[1]=(-(e[2]*t[0])+e[0]*t[1])/n,t[0]=r[0],t[1]=r[1],1)}if(1===r)return 0===e[0]?0:(t[0]/=e[0],1);let n=Bk(r);return 0===We(e,n,r)?0:(Wt(e,n,t,r),1)}function Wn(e,t,r,n=null,a=null){let i=n||Bk(r),o=a||Bk(r);if(0===We(e,i,r))return null;for(let n=0;n<r;n++){for(let e=0;e<r;e++)o[e]=0;o[n]=1,Wt(e,i,o,r);for(let e=0;e<r;e++)t[e*r+n]=o[e]}return t}function Wa(e,t,r,n){let a,i,o;if(e<r)return Bv("Insufficient number of samples. Underdetermined."),0;let s=Bk(r*r),l=Bk(r),u=Bk(r*r);for(o=0;o<e;o++)for(a=0;a<r;a++)for(i=a;i<r;i++)s[a*r+i]+=t[o*r+a]*t[o*r+i];for(a=0;a<r;a++)for(i=0;i<a;i++)s[a*r+i]=s[i*r+a];for(B8(s,r,l,u),a=0;a<r;a++)n[a]=u[a*r+r-1];return 1}function Wi(e,t){let r,n,[a,i,o]=e,s=1/6,l=a,u=a;i>l?l=i:i<u&&(u=i),o>l?l=o:o<u&&(u=o);let c=l;(n=c>0?(l-u)/l:0)>0?(r=a===l?s*(i-o)/(l-u):i===l?1/3+s*(o-a)/(l-u):2/3+s*(a-i)/(l-u))<0&&(r+=1):r=0,t[0]=r,t[1]=n,t[2]=c}function Wo(e,t){let r,n,a,[i,o,s]=e,l=1/3,u=1/6,c=2/3,d=5/6;i>1/6&&i<=l?(n=1,r=(l-i)/u,a=0):i>l&&i<=.5?(n=1,a=(i-l)/u,r=0):i>.5&&i<=c?(a=1,n=(c-i)/u,r=0):i>c&&i<=d?(a=1,r=(i-c)/u,n=0):i>d&&i<=1?(r=1,a=(1-i)/u,n=0):(r=1,n=i/u,a=0),r=o*r+(1-o),n=o*n+(1-o),a=o*a+(1-o),r*=s,n*=s,a*=s,t[0]=r,t[1]=n,t[2]=a}function Ws(e,t){let[r,n,a]=e,i=(r+16)/116,o=n/500+i,s=i-a/200;i**3>.008856?i**=3:i=(i-16/116)/7.787,o**3>.008856?o**=3:o=(o-16/116)/7.787,s**3>.008856?s**=3:s=(s-16/116)/7.787,t[0]=.9505*o,t[1]=+i,t[2]=1.089*s}function Wl(e,t){let[r,n,a]=e,i=r/.9505,o=n/1,s=a/1.089;i>.008856?i**=1/3:i=7.787*i+16/116,o>.008856?o**=1/3:o=7.787*o+16/116,s>.008856?s**=1/3:s=7.787*s+16/116,t[0]=116*o-16,t[1]=500*(i-o),t[2]=200*(o-s)}function Wu(e,t){let[r,n,a]=e,i=3.2406*r+-1.5372*n+-.4986*a,o=-.9689*r+1.8758*n+.0415*a,s=.0557*r+-.204*n+1.057*a;i>.0031308?i=1.055*i**(1/2.4)-.055:i*=12.92,o>.0031308?o=1.055*o**(1/2.4)-.055:o*=12.92,s>.0031308?s=1.055*s**(1/2.4)-.055:s*=12.92;let l=i;l<o&&(l=o),l<s&&(l=s),l>1&&(i/=l,o/=l,s/=l),i<0&&(i=0),o<0&&(o=0),s<0&&(s=0),t[0]=i,t[1]=o,t[2]=s}function Wc(e,t){let[r,n,a]=e;r>.04045?r=((r+.055)/1.055)**2.4:r/=12.92,n>.04045?n=((n+.055)/1.055)**2.4:n/=12.92,a>.04045?a=((a+.055)/1.055)**2.4:a/=12.92,t[0]=.4124*r+.3576*n+.1805*a,t[1]=.2126*r+.7152*n+.0722*a,t[2]=.0193*r+.1192*n+.9505*a}function Wd(e,t){let r=[0,0,0];Wc(e,r),Wl(r,t)}function Wh(e,t){let r=[0,0,0];Ws(e,r),Wu(r,t)}function Wp(e){return e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1,e}function Wf(e){return!(e[1]-e[0]<0)}function Wm(e,t,r){return e<t?t:e>r?r:e}function Wg(e,t,r,n=[0,0,0]){return n[0]=Wm(e[0],t[0],r[0]),n[1]=Wm(e[1],t[1],r[1]),n[2]=Wm(e[2],t[2],r[2]),n}let Wy=Bw("GetScalarTypeFittingRange"),Wv=Bw("GetAdjustedScalarRange"),Wb=e=>!Number.isFinite(e),{isFinite:Ww,isNaN:Wx}=Number;function WC(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}function Wk(e,t=3){let r=Array(t),n=Array(t);for(let e=0;e<t;++e)r[e]=e,n[e]=e;for(let a=t-1;a>0;a--){let i=-1/0,o=0,s=0;for(let l=0;l<=a;++l){let u=r[l];for(let r=0;r<=a;++r){let a=Math.abs(e[u+t*n[r]]);a>i&&(i=a,o=l,s=r)}}[r[a],r[o]]=[r[o],r[a]],[n[a],n[s]]=[n[s],n[a]]}let a=Array(t*t).fill(0);for(let i=0;i<t;++i){let o=r[i]+t*n[i];a[o]=e[o]<0?-1:1}return a}function WM(e){let t=Math.floor(255*e);return t>15?t.toString(16):`0${t.toString(16)}`}function WS(e){return Math.round(255*e)}var WE={Pi:()=>Math.PI,ldexp:function(e,t){return t>1023?898846567431158e293*e*2**(t-1023):t<-1074?5e-324*e*2**(t+1074):e*2**t},radiansFromDegrees:BM,degreesFromRadians:BS,round:BE,floor:BP,ceil:BI,ceilLog2:BD,min:BT,max:B_,arrayMin:function(e,t=0,r=1){let n=1/0;for(let a=t,i=e.length;a<i;a+=r)e[a]<n&&(n=e[a]);return n},arrayMax:function(e,t=0,r=1){let n=-1/0;for(let a=t,i=e.length;a<i;a+=r)n<e[a]&&(n=e[a]);return n},arrayRange:function(e,t=0,r=1){let n=1/0,a=-1/0;for(let i=t,o=e.length;i<o;i+=r)e[i]<n&&(n=e[i]),a<e[i]&&(a=e[i]);return[n,a]},isPowerOfTwo:BR,nearestPowerOfTwo:BO,factorial:BA,binomial:function(e,t){let r=1;for(let n=1;n<=t;++n)r*=(e-n+1)/n;return Math.floor(r)},beginCombination:function(e,t){if(e<t)return 0;let r=Bk(t);for(let e=0;e<t;++e)r[e]=e;return r},nextCombination:function(e,t,r){let n=0;for(let a=t-1;a>=0;--a)if(r[a]<e-t+a){let e=r[a]+1;for(;a<t;)r[a++]=e++;n=1;break}return n},randomSeed:function(e){Bf(`${e}`,{global:!0}),Bb=e},getSeed:function(){return Bb},random:function(e=0,t=1){return e+(t-e)*Math.random()},gaussian:BN,add:BL,subtract:BV,multiplyScalar:BF,multiplyScalar2D:Bj,multiplyAccumulate:BB,multiplyAccumulate2D:function(e,t,r,n){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n},dot:BW,outer:function(e,t,r){r[0]=e[0]*t[0],r[1]=e[0]*t[1],r[2]=e[0]*t[2],r[3]=e[1]*t[0],r[4]=e[1]*t[1],r[5]=e[1]*t[2],r[6]=e[2]*t[0],r[7]=e[2]*t[1],r[8]=e[2]*t[2]},cross:BU,norm:Bz,normalize:BH,perpendiculars:function(e,t,r,n){let a,i,o,s=e[0]*e[0],l=e[1]*e[1],u=e[2]*e[2],c=Math.sqrt(s+l+u);s>l&&s>u?(a=0,i=1,o=2):l>u?(a=1,i=2,o=0):(a=2,i=0,o=1);let d=e[a]/c,h=e[i]/c,p=e[o]/c,f=Math.sqrt(d*d+p*p);if(0!==n){let e=Math.sin(n),s=Math.cos(n);t&&(t[a]=(p*s-d*h*e)/f,t[i]=e*f,t[o]=(-(d*s)-h*p*e)/f),r&&(r[a]=(-(p*e)-d*h*s)/f,r[i]=s*f,r[o]=(d*e-h*p*s)/f)}else t&&(t[a]=p/f,t[i]=0,t[o]=-d/f),r&&(r[a]=-d*h/f,r[i]=f,r[o]=-h*p/f)},projectVector:function(e,t,r){let n=BW(t,t);if(0===n)return r[0]=0,r[1]=0,r[2]=0,!1;let a=BW(e,t)/n;for(let e=0;e<3;e++)r[e]=t[e];return BF(r,a),!0},projectVector2D:function(e,t,r){let n=BG(t,t);if(0===n)return r[0]=0,r[1]=0,!1;let a=BG(e,t)/n;for(let e=0;e<2;e++)r[e]=t[e];return Bj(r,a),!0},distance2BetweenPoints:Bq,angleBetweenVectors:function(e,t){let r=[0,0,0];return BU(e,t,r),Math.atan2(Bz(r),BW(e,t))},gaussianAmplitude:function(e,t,r){return 1/Math.sqrt(2*Math.PI*t)*Math.exp(-(Math.abs(e-r)**2)/(2*t))},gaussianWeight:function(e,t,r){return Math.exp(-(Math.abs(e-r)**2)/(2*t))},dot2D:BG,outer2D:function(e,t,r){r[0]=e[0]*t[0],r[1]=e[0]*t[1],r[2]=e[1]*t[0],r[3]=e[1]*t[1]},norm2D:B$,normalize2D:BK,determinant2x2:BY,LUFactor3x3:function(e,t){let r,n,a,i=[0,0,0];for(let t=0;t<3;t++)a=Math.abs(e[3*t]),(n=Math.abs(e[3*t+1]))>a&&(a=n),(n=Math.abs(e[3*t+2]))>a&&(a=n),i[t]=1/a;a=i[0]*Math.abs(e[0]),r=0,(n=i[1]*Math.abs(e[3]))>=a&&(a=n,r=1),(n=i[2]*Math.abs(e[6]))>=a&&(r=2),0!==r&&(Bx(e,3,r,0),i[r]=i[0]),t[0]=r,e[3]/=e[0],e[6]/=e[0],e[4]-=e[3]*e[1],e[7]-=e[6]*e[1],a=i[1]*Math.abs(e[4]),r=1,(n=i[2]*Math.abs(e[7]))>=a&&(r=2,Bx(e,3,1,2),i[2]=i[1]),t[1]=r,e[7]/=e[4],e[5]-=e[3]*e[2],e[8]-=e[6]*e[2]+e[7]*e[5],t[2]=2},LUSolve3x3:function(e,t,r){let n=r[t[0]];r[t[0]]=r[0],r[0]=n,n=r[t[1]],r[t[1]]=r[1],r[1]=n-e[3]*r[0],n=r[t[2]],r[t[2]]=r[2],r[2]=n-e[6]*r[0]-e[7]*r[1],r[2]/=e[8],r[1]=(r[1]-e[5]*r[2])/e[4],r[0]=(r[0]-e[1]*r[1]-e[2]*r[2])/e[0]},linearSolve3x3:function(e,t,r){let n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=+BY(s,c,l,d),p=-BY(o,u,l,d),f=+BY(o,u,s,c),m=-BY(a,c,i,d),g=+BY(n,u,i,d),y=-BY(n,u,a,c),v=+BY(a,s,i,l),b=-BY(n,o,i,l),w=+BY(n,o,a,s),x=n*h+a*p+i*f,C=h*t[0]+m*t[1]+v*t[2],k=p*t[0]+g*t[1]+b*t[2],M=f*t[0]+y*t[1]+w*t[2];r[0]=C/x,r[1]=k/x,r[2]=M/x},multiply3x3_vect3:BX,multiply3x3_mat3:BZ,multiplyMatrix:function(e,t,r,n,a,i,o){n!==a&&By("Number of columns of A must match number of rows of B.");let s=[...e],l=[...t];for(let e=0;e<r;e++)for(let t=0;t<i;t++){o[e*i+t]=0;for(let r=0;r<n;r++)o[e*i+t]+=s[e*n+r]*l[t+i*r]}},transpose3x3:BJ,invert3x3:function(e,t){let r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=+BY(o,u,s,c),h=-BY(i,l,s,c),p=+BY(i,l,o,u),f=-BY(n,u,a,c),m=+BY(r,l,a,c),g=-BY(r,l,n,u),y=+BY(n,o,a,s),v=-BY(r,i,a,s),b=+BY(r,i,n,o),w=r*d+n*h+a*p;0===w&&Bv("Matrix has 0 determinant"),t[0]=d/w,t[3]=h/w,t[6]=p/w,t[1]=f/w,t[4]=m/w,t[7]=g/w,t[2]=y/w,t[5]=v/w,t[8]=b/w},identity3x3:B0,identity:B2,isIdentity:function(e,t=1e-6){return B1(e,Bm,t)},isIdentity3x3:function(e,t=1e-6){return B1(e,Bg,t)},determinant3x3:BQ,quaternionToMatrix3x3:B5,areEquals:B1,areMatricesEqual:B1,roundNumber:B3,roundVector:B4,matrix3x3ToQuaternion:B6,multiplyQuaternion:function(e,t,r){let n=e[0]*t[0],a=e[0]*t[1],i=e[0]*t[2],o=e[0]*t[3],s=e[1]*t[0],l=e[1]*t[1],u=e[1]*t[2],c=e[1]*t[3],d=e[2]*t[0],h=e[2]*t[1],p=e[2]*t[2],f=e[2]*t[3],m=e[3]*t[0],g=e[3]*t[1],y=e[3]*t[2],v=e[3]*t[3];r[0]=n-l-p-v,r[1]=a+s+f-y,r[2]=i-c+d+g,r[3]=o+u-h+m},orthogonalize3x3:B9,diagonalize3x3:B7,singularValueDecomposition3x3:function(e,t,r,n){let a,i=[...e],o=BQ(i);if(o<0)for(a=0;a<9;a++)i[a]=-i[a];B9(i,t),BJ(i,i),BZ(i,t,n),B7(n,r,n),BZ(t,n,t),BJ(n,n),o<0&&(r[0]=-r[0],r[1]=-r[1],r[2]=-r[2])},solveLinearSystem:Wr,invertMatrix:Wn,luFactorLinearSystem:We,luSolveLinearSystem:Wt,estimateMatrixCondition:function(e,t){let r=+Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let r=0;r<t;r++)for(let a=r;a<t;a++)Math.abs(e[r*t+a])>n&&(n=Math.abs(e[r*t+a]));for(let n=0;n<t;n++)Math.abs(e[n*t+n])<r&&(r=Math.abs(e[n*t+n]));return 0===r?Number.MAX_VALUE:n/r},jacobi:function(e,t,r){return B8(e,3,t,r)},jacobiN:B8,solveHomogeneousLeastSquares:Wa,solveLeastSquares:function(e,t,r,n,a,i,o=!0){let s,l,u,c;if(e<r||e<a)return Bv("Insufficient number of samples. Underdetermined."),0;let d=Bk(a),h=1,p=0,f=0;if(o){for(u=0;u<a;u++)d[u]=1;for(l=0;l<e;l++)for(u=0;u<a;u++)Math.abs(n[l*a+u])>1e-12&&(h=0,d[u]=0);if(h&&1===a)return Bv("Detected homogeneous system (Y=0), calling SolveHomogeneousLeastSquares()"),Wa(e,t,r,i);if(h)f=1;else for(u=0;u<a;u++)d[u]&&(f=1)}f&&(s=Bk(r),p=Wa(e,t,r,s));let m=Bk(r*r),g=Bk(r*r),y=Bk(r*a);for(c=0;c<e;c++)for(l=0;l<r;l++){for(u=l;u<r;u++)m[l*r+u]+=t[c*r+l]*t[c*r+u];for(u=0;u<a;u++)y[l*a+u]+=t[c*r+l]*n[c*a+u]}for(l=0;l<r;l++)for(u=0;u<l;u++)m[l*r+u]=m[u*r+l];let v=Wn(m,g,r);if(v)for(l=0;l<r;l++)for(u=0;u<a;u++)for(i[l*a+u]=0,c=0;c<r;c++)i[l*a+u]+=g[l*r+c]*y[c*a+u];if(f){for(u=0;u<a;u++)if(d[u])for(l=0;l<r;l++)i[l*a+u]=s[l*a]}return f?p&&v:v},hex2float:function(e,t=[0,.5,1]){switch(e.length){case 3:return t[0]=17*parseInt(e[0],16)/255,t[1]=17*parseInt(e[1],16)/255,t[2]=17*parseInt(e[2],16)/255,t;case 4:return t[0]=17*parseInt(e[1],16)/255,t[1]=17*parseInt(e[2],16)/255,t[2]=17*parseInt(e[3],16)/255,t;case 6:return t[0]=parseInt(e.substr(0,2),16)/255,t[1]=parseInt(e.substr(2,2),16)/255,t[2]=parseInt(e.substr(4,2),16)/255,t;case 7:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t;case 9:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t[3]=parseInt(e.substr(7,2),16)/255,t;default:return t}},rgb2hsv:Wi,hsv2rgb:Wo,lab2xyz:Ws,xyz2lab:Wl,xyz2rgb:Wu,rgb2xyz:Wc,rgb2lab:Wd,lab2rgb:Wh,uninitializeBounds:Wp,areBoundsInitialized:Wf,computeBoundsFromPoints:function(e,t,r){return r[0]=Math.min(e[0],t[0]),r[1]=Math.max(e[0],t[0]),r[2]=Math.min(e[1],t[1]),r[3]=Math.max(e[1],t[1]),r[4]=Math.min(e[2],t[2]),r[5]=Math.max(e[2],t[2]),r},clampValue:Wm,clampVector:Wg,clampAndNormalizeValue:function(e,t){let r=0;return t[0]!==t[1]&&(r=((r=e<t[0]?t[0]:e>t[1]?t[1]:e)-t[0])/(t[1]-t[0])),r},getScalarTypeFittingRange:Wy,getAdjustedScalarRange:Wv,extentIsWithinOtherExtent:function(e,t){if(!e||!t)return 0;for(let r=0;r<6;r+=2)if(e[r]<t[r]||e[r]>t[r+1]||e[r+1]<t[r]||e[r+1]>t[r+1])return 0;return 1},boundsIsWithinOtherBounds:function(e,t,r){if(!e||!t)return 0;for(let n=0;n<6;n+=2)if(e[n]+r[n/2]<t[n]||e[n]-r[n/2]>t[n+1]||e[n+1]+r[n/2]<t[n]||e[n+1]-r[n/2]>t[n+1])return 0;return 1},pointIsWithinBounds:function(e,t,r){if(!e||!t||!r)return 0;for(let n=0;n<3;n++)if(e[n]+r[n]<t[2*n]||e[n]-r[n]>t[2*n+1])return 0;return 1},solve3PointCircle:function(e,t,r,n){let a=Bk(3),i=Bk(3),o=Bk(3),s=Bk(3),l=Bk(3),u=Bk(3);for(let n=0;n<3;++n)a[n]=e[n]-t[n],i[n]=t[n]-r[n],o[n]=r[n]-e[n],s[n]=-a[n],l[n]=-i[n],u[n]=-o[n];let c=Bz(s),d=Bz(l),h=Bz(o),p=Bk(3);BU(a,i,p);let f=Bz(p),m=2*f*f,g=d*d*BW(a,u)/m,y=h*h*BW(s,i)/m,v=c*c*BW(o,l)/m;for(let a=0;a<3;++a)n[a]=g*e[a]+y*t[a]+v*r[a];return c*d*h/(2*f)},inf:1/0,negInf:-1/0,isInf:Wb,isNan:Wx,isNaN:Wx,isFinite:Ww,createUninitializedBounds:WC,getMajorAxisIndex:function(e){let t=-1,r=-1;for(let n=0;n<e.length;n++){let a=Math.abs(e[n]);a>t&&(r=n,t=a)}return r},getMinorAxisIndex:function(e){let t=1/0,r=-1;for(let n=0;n<e.length;n++){let a=Math.abs(e[n]);a<t&&(r=n,t=a)}return r},getSparseOrthogonalMatrix:Wk,floatToHex2:WM,floatRGB2HexCode:function(e,t="#"){return`${t}${e.map(WM).join("")}`},float2CssRGBA:function(e){return 3===e.length?`rgb(${e.map(WS).join(", ")})`:`rgba(${WS(e[0]||0)}, ${WS(e[1]||0)}, ${WS(e[2]||0)}, ${e[3]||0})`}};let WP={};function WI(e,t,r={}){Object.assign(t,WP,r),Bh.obj(e,t),Bh.setGet(e,t,["transform"]),t.classHierarchy.push("vtkImplicitFunction"),e.functionValue=r=>{if(!t.transform)return e.evaluateFunction(r);let n=[];return t.transform.transformPoint(r,n),e.evaluateFunction(n)},e.evaluateFunction=e=>{Bh.vtkErrorMacro("not implemented")}}Bh.newInstance(WI,"vtkImplicitFunction");let WT="coincide",W_="disjoint";function WD(e,t,r){return Math.abs(r[0]*(e[0]-t[0])+r[1]*(e[1]-t[1])+r[2]*(e[2]-t[2]))}function WA(e,t,r,n){let a=[];BV(e,t,a);let i=BW(r,a);n[0]=e[0]-i*r[0],n[1]=e[1]-i*r[1],n[2]=e[2]-i*r[2]}function WO(e,t,r){let n=BW(e,t),a=BW(t,t);return 0===a&&(a=1),r[0]=e[0]-n*t[0]/a,r[1]=e[1]-n*t[1]/a,r[2]=e[2]-n*t[2]/a,r}function WR(e,t,r,n){let a=[];BV(e,t,a);let i=BW(r,a),o=BW(r,r);0!==o?(n[0]=e[0]-i*r[0]/o,n[1]=e[1]-i*r[1]/o,n[2]=e[2]-i*r[2]/o):(n[0]=e[0],n[1]=e[1],n[2]=e[2])}function WN(e,t,r,n){let a={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},i=[],o=[];BV(t,e,i),BV(r,e,o);let s=BW(n,o),l=BW(n,i);return(l<0?-l:l)<=(s<0?-(1e-6*s):1e-6*s)||(a.t=s/l,a.x[0]=e[0]+a.t*i[0],a.x[1]=e[1]+a.t*i[1],a.x[2]=e[2]+a.t*i[2],a.intersection=!0,a.betweenPoints=a.t>=0&&a.t<=1),a}function WL(e,t,r,n){let a,i={intersection:!1,l0:[],l1:[],error:null},o=[];BU(t,n,o);let s=o.map(e=>Math.abs(e));if(s[0]+s[1]+s[2]<1e-6){let n=[];return BV(e,r,n),0===BW(t,n)?i.error=WT:i.error=W_,i}a=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";let l=[],u=-BW(t,e),c=-BW(n,r);switch(a){case"x":l[0]=0,l[1]=(c*t[2]-u*n[2])/o[0],l[2]=(u*n[1]-c*t[1])/o[0];break;case"y":l[0]=(u*n[2]-c*t[2])/o[1],l[1]=0,l[2]=(c*t[0]-u*n[0])/o[1];break;case"z":l[0]=(c*t[1]-u*n[1])/o[2],l[1]=(u*n[0]-c*t[0])/o[2],l[2]=0}return i.l0=l,BL(l,o,i.l1),i.intersection=!0,i}let WV={normal:[0,0,1],origin:[0,0,0]};function WF(e,t,r={}){Object.assign(t,WV,r),WI(e,t,r),Bh.setGetArray(e,t,["normal","origin"],3),t.classHierarchy.push("vtkPlane"),e.distanceToPlane=e=>WD(e,t.origin,t.normal),e.projectPoint=(e,r)=>{WA(e,t.origin,t.normal,r)},e.projectVector=(e,r)=>WO(e,t.normal,r),e.push=e=>{if(0!==e)for(let r=0;r<3;r++)t.origin[r]+=e*t.normal[r]},e.generalizedProjectPoint=(e,r)=>{WR(e,t.origin,t.normal,r)},e.evaluateFunction=(e,r,n)=>Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(r-t.origin[1])+t.normal[2]*(n-t.origin[2]),e.evaluateGradient=e=>[t.normal[0],t.normal[1],t.normal[2]],e.intersectWithLine=(e,r)=>WN(e,r,t.origin,t.normal),e.intersectWithPlane=(e,r)=>WL(e,r,t.origin,t.normal)}var Wj={newInstance:Bh.newInstance(WF,"vtkPlane"),extend:WF,...{evaluate:function(e,t,r){return e[0]*(r[0]-t[0])+e[1]*(r[1]-t[1])+e[2]*(r[2]-t[2])},distanceToPlane:WD,projectPoint:WA,projectVector:WO,generalizedProjectPoint:WR,intersectWithLine:WN,intersectWithPlane:WL,DISJOINT:W_,COINCIDE:WT}};let WB=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];function WW(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function WU(e){return e?.length>=6&&e[0]<=e[1]&&e[2]<=e[3]&&e[4]<=e[5]}function Wz(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function WH(e){return Wz(e,WB)}function WG(e,t,r,n){let[a,i,o,s,l,u]=e;return"number"==typeof t?(e[0]=a<t?a:t,e[1]=i>t?i:t,e[2]=o<r?o:r,e[3]=s>r?s:r,e[4]=l<n?l:n,e[5]=u>n?u:n):(e[0]=a<t[0]?a:t[0],e[1]=i>t[0]?i:t[0],e[2]=o<t[1]?o:t[1],e[3]=s>t[1]?s:t[1],e[4]=l<t[2]?l:t[2],e[5]=u>t[2]?u:t[2]),e}function Wq(e,t){if(0===t.length)return e;if(Array.isArray(t[0]))for(let r=0;r<t.length;++r)WG(e,...t[r]);else for(let r=0;r<t.length;r+=3)WG(e,...t.slice(r,r+3));return e}function W$(e,t,r,n,a,i,o){let[s,l,u,c,d,h]=e;return void 0===o?(e[0]=Math.min(t[0],s),e[1]=Math.max(t[1],l),e[2]=Math.min(t[2],u),e[3]=Math.max(t[3],c),e[4]=Math.min(t[4],d),e[5]=Math.max(t[5],h)):(e[0]=Math.min(t,s),e[1]=Math.max(r,l),e[2]=Math.min(n,u),e[3]=Math.max(a,c),e[4]=Math.min(i,d),e[5]=Math.max(o,h)),e}function WK(e,t,r,n){let[a,i,o,s,l,u]=e;return e[0]=t,e[1]=t>i?t:i,e[2]=r,e[3]=r>s?r:s,e[4]=n,e[5]=n>u?n:u,a!==t||o!==r||l!==n}function WY(e,t,r,n){let[a,i,o,s,l,u]=e;return e[0]=t<a?t:a,e[1]=t,e[2]=r<o?r:o,e[3]=r,e[4]=n<l?n:l,e[5]=n,i!==t||s!==r||u!==n}function WX(e,t){return null==t?function(e){let t=[0,0,0],r=-1,n=0,a=0;for(let i=0;i<3;++i)(a=e[2*i+1]-e[2*i])>n&&(n=a,r=i),t[i]=+(a>0);if(r<0)return WX(e,.5);for(let r=0;r<3;++r)if(!t[r]){let t=.005*n;e[2*r]-=t,e[2*r+1]+=t}return e}(e):(e[0]-=t,e[1]+=t,e[2]-=t,e[3]+=t,e[4]-=t,e[5]+=t,e)}function WZ(e,t,r,n){return!!WU(e)&&(t>=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),r>=0?(e[2]*=r,e[3]*=r):(e[2]=r*e[3],e[3]=r*e[2]),n>=0?(e[4]*=n,e[5]*=n):(e[4]=n*e[5],e[5]=n*e[4]),!0)}function WJ(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function WQ(e,t){return e[2*t+1]-e[2*t]}function W1(e){return[WQ(e,0),WQ(e,1),WQ(e,2)]}function W0(e){return e.slice(0,2)}function W2(e){return e.slice(2,4)}function W5(e){return e.slice(4,6)}function W3(e){let t=W1(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function W4(e){if(WU(e)){let t=W1(e);return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}return null}function W8(e){let t=W4(e);return null!==t?Math.sqrt(t):null}function W6(e){return[e[0],e[2],e[4]]}function W9(e){return[e[1],e[3],e[5]]}function W7(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Ue(e,t){return t[0]=[e[0],e[2],e[4]],t[1]=[e[0],e[2],e[5]],t[2]=[e[0],e[3],e[4]],t[3]=[e[0],e[3],e[5]],t[4]=[e[1],e[2],e[4]],t[5]=[e[1],e[2],e[5]],t[6]=[e[1],e[3],e[4]],t[7]=[e[1],e[3],e[5]],t}function Ut(e,t,r){return t[0]=e[0],t[1]=e[2],t[2]=e[4],r[0]=e[1],r[1]=e[3],r[2]=e[5],t}function Ur(e,t,r=[]){let n=Ue(e,[]);for(let e=0;e<n.length;++e)N7.vec3.transformMat4(n[e],n[e],t);return WH(r),Wq(r,n)}function Un(e,t=[]){return t[0]=.5*(e[1]-e[0]),t[1]=.5*(e[3]-e[2]),t[2]=.5*(e[5]-e[4]),t}function Ua(e,t,r,n){let a=[].concat(WB),i=e.getData();for(let e=0;e<i.length;e+=3){let o=[i[e],i[e+1],i[e+2]],s=BW(o,t);a[0]=Math.min(s,a[0]),a[1]=Math.max(s,a[1]);let l=BW(o,r);a[2]=Math.min(l,a[2]),a[3]=Math.max(l,a[3]);let u=BW(o,n);a[4]=Math.min(u,a[4]),a[5]=Math.max(u,a[5])}return a}function Ui(e,t,r,n,a){let i=!0,o=[],s=0,l=[],u=[0,0,0];for(let r=0;r<3;r++)t[r]<e[2*r]?(o[r]=1,u[r]=e[2*r],i=!1):t[r]>e[2*r+1]?(o[r]=0,u[r]=e[2*r+1],i=!1):o[r]=2;if(i)return n[0]=t[0],n[1]=t[1],n[2]=t[2],a[0]=0,1;for(let e=0;e<3;e++)2!==o[e]&&0!==r[e]?l[e]=(u[e]-t[e])/r[e]:l[e]=-1;for(let e=0;e<3;e++)l[s]<l[e]&&(s=e);if(l[s]>1||l[s]<0)return 0;a[0]=l[s];for(let a=0;a<3;a++)if(s!==a){if(n[a]=t[a]+l[s]*r[a],n[a]<e[2*a]||n[a]>e[2*a+1])return 0}else n[a]=u[a];return 1}function Uo(e,t,r){let n=[],a=0,i=1,o=1;for(let s=4;s<=5;++s){n[2]=e[s];for(let s=2;s<=3;++s){n[1]=e[s];for(let s=0;s<=1;++s)if(n[0]=e[s],a=Wj.evaluate(r,t,n),o&&(i=a>=0?1:-1,o=0),0===a||i>0&&a<0||i<0&&a>0)return 1}}return 0}function Us(e,t){let r;if(!(WU(e)&&WU(t)))return!1;let n=[0,0,0,0,0,0];for(let a=0;a<3;a++)if(r=!1,t[2*a]>=e[2*a]&&t[2*a]<=e[2*a+1]?(r=!0,n[2*a]=t[2*a]):e[2*a]>=t[2*a]&&e[2*a]<=t[2*a+1]&&(r=!0,n[2*a]=e[2*a]),t[2*a+1]>=e[2*a]&&t[2*a+1]<=e[2*a+1]?(r=!0,n[2*a+1]=t[2*a+1]):e[2*a+1]>=t[2*a]&&e[2*a+1]<=t[2*a+1]&&(r=!0,n[2*a+1]=e[2*a+1]),!r)return!1;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],!0}function Ul(e,t){if(!(WU(e)&&WU(t)))return!1;for(let r=0;r<3;r++){if((!(t[2*r]>=e[2*r])||!(t[2*r]<=e[2*r+1]))&&(!(e[2*r]>=t[2*r])||!(e[2*r]<=t[2*r+1]))&&(!(t[2*r+1]>=e[2*r])||!(t[2*r+1]<=e[2*r+1]))){if(!(e[2*r+1]>=t[2*r])||!(e[2*r+1]<=t[2*r+1]))return!1}}return!0}function Uu(e,t,r,n){return!(t<e[0])&&!(t>e[1])&&!(r<e[2])&&!(r>e[3])&&!(n<e[4])&&!(n>e[5])}function Uc(e,t,r){let n=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],a=[0,0,0,0,0,0,0,0],i=0;for(let n=0;n<2;n++)for(let o=2;o<4;o++)for(let s=4;s<6;s++){let l=[e[n],e[o],e[s]];a[i++]=Wj.evaluate(r,t,l)}let o=2;for(;o--&&!(W7(a[n[o][0]],a[n[o][4]])&&W7(a[n[o][1]],a[n[o][5]])&&W7(a[n[o][2]],a[n[o][6]])&&W7(a[n[o][3]],a[n[o][7]])););if(o<0)return!1;let s=Math.sign(r[o]),l=Math.abs((e[2*o+1]-e[2*o])*r[o]),u=+(s>0);for(let e=0;e<4;e++){if(0===l)continue;let t=Math.abs(a[n[o][e]])/l;s>0&&t<u&&(u=t),s<0&&t>u&&(u=t)}let c=(1-u)*e[2*o]+u*e[2*o+1];return s>0?e[2*o]=c:e[2*o+1]=c,!0}function Ud(e,t){for(let e=0;e<3;++e)t[e]=t[e]<1?1:t[e];let r=t[0]*t[1]*t[2];for(;r>e;){for(let e=0;e<3;++e)t[e]=t[e]>1?t[e]-1:1;r=t[0]*t[1]*t[2]}}function Uh(e,t,r,n=[]){t=t<=0?1:t;let a=0,i=[0,0,0],o=-1,s=0,l=W1(e),u=l[0]+l[1]+l[2],c=.001/3*u;for(let e=0;e<3;++e)l[e]>s&&(o=e,s=l[e]),l[e]>c?(i[e]=1,a++):i[e]=0;let d=W6(e),h=W9(e);if(a<1)return r[0]=1,r[1]=1,r[2]=1,n[0]=d[0]-.5,n[1]=h[0]+.5,n[2]=d[1]-.5,n[3]=h[1]+.5,n[4]=d[2]-.5,n[5]=h[2]+.5,1;let p=t;p/=i[0]?l[0]/u:1,p/=i[1]?l[1]/u:1,p/=i[2]?l[2]/u:1,p**=1/a;for(let e=0;e<3;++e)r[e]=i[e]?Math.floor(p*l[e]/u):1,r[e]=r[e]<1?1:r[e];Ud(t,r);let f=.5*l[o]/r[o];for(let e=0;e<3;++e)i[e]?(n[2*e]=d[e],n[2*e+1]=h[e]):(n[2*e]=d[e]-f,n[2*e+1]=h[e]+f);return r[0]*r[1]*r[2]}function Up(e,t){if(e[0]>=t[0]&&e[0]<=t[1]&&e[1]>=t[2]&&e[1]<=t[3]&&e[2]>=t[4]&&e[2]<=t[5])return 0;let r=[0,0,0];return e[0]<t[0]?r[0]=t[0]-e[0]:e[0]>t[1]&&(r[0]=e[0]-t[1]),e[1]<t[2]?r[1]=t[2]-e[1]:e[1]>t[3]&&(r[1]=e[1]-t[3]),e[2]<t[4]?r[2]=t[4]-e[2]:e[2]>t[5]&&(r[2]=e[2]-t[5]),BW(r,r)}class Uf{constructor(e){this.bounds=e,this.bounds||(this.bounds=new Float64Array(WB))}getBounds(){return this.bounds}equals(e){return WW(this.bounds,e)}isValid(){return WU(this.bounds)}setBounds(e){return Wz(this.bounds,e)}reset(){return WH(this.bounds)}addPoint(...e){return WG(this.bounds,...e)}addPoints(e){return Wq(this.bounds,e)}addBounds(e,t,r,n,a,i){return W$(this.bounds,e,t,r,n,a,i)}setMinPoint(e,t,r){return WK(this.bounds,e,t,r)}setMaxPoint(e,t,r){return WY(this.bounds,e,t,r)}inflate(e){return WX(this.bounds,e)}scale(e,t,r){return WZ(this.bounds,e,t,r)}getCenter(){return WJ(this.bounds)}getLength(e){return WQ(this.bounds,e)}getLengths(){return W1(this.bounds)}getMaxLength(){return W3(this.bounds)}getDiagonalLength(){return W8(this.bounds)}getDiagonalLength2(){return W4(this.bounds)}getMinPoint(){return W6(this.bounds)}getMaxPoint(){return W9(this.bounds)}getXRange(){return W0(this.bounds)}getYRange(){return W2(this.bounds)}getZRange(){return W5(this.bounds)}getCorners(e){return Ue(this.bounds,e)}computeCornerPoints(e,t){return Ut(this.bounds,e,t)}computeLocalBounds(e,t,r){return Ua(this.bounds,e,t,r)}transformBounds(e,t=[]){return Ur(this.bounds,e,t)}computeScale3(e){return Un(this.bounds,e)}cutWithPlane(e,t){return Uc(this.bounds,e,t)}intersectBox(e,t,r,n){return Ui(this.bounds,e,t,r,n)}intersectPlane(e,t){return Uo(this.bounds,e,t)}intersect(e){return Us(this.bounds,e)}intersects(e){return Ul(this.bounds,e)}containsPoint(e,t,r){return Uu(this.bounds,e,t,r)}contains(e){return Ul(this.bounds,e)}computeDivisions(e,t,r=[]){return Uh(this.bounds,e,t,r)}distance2ToBounds(e){return Up(e,this.bounds)}}var Um=function(e){return new Uf(e&&e.bounds)},Ug=WU,Uy=Wz,Uv=WH,Ub=WG,Uw=Wq,Ux=WX,UC=function(e,t,r,n){if(!WU(e))return!1;let a=WJ(e);return e[0]-=a[0],e[1]-=a[0],e[2]-=a[1],e[3]-=a[1],e[4]-=a[2],e[5]-=a[2],WZ(e,t,r,n),e[0]+=a[0],e[1]+=a[0],e[2]+=a[1],e[3]+=a[1],e[4]+=a[2],e[5]+=a[2],!0},Uk=WJ,UM=WQ,US=W1,UE=W8,UP=W4,UI=W0,UT=W2,U_=W5,UD=Ue,UA=Ut,UO=Ur,UR=Uc,UN=Up,UL=WB;let UV={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},UF={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",UNSIGNED_CHAR_CLAMPED:"Uint8ClampedArray",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"};var Uj={DefaultDataType:UF.FLOAT,DataTypeByteSize:UV,VtkDataTypes:UF};let{vtkErrorMacro:UB}=Bp,{DefaultDataType:UW}=Uj,UU=1e-6;function Uz(e,t,r){let n,a,i=e.length,o=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(a=t;a<i;a+=r)if(!Number.isNaN(e[a])){s=o=e[a];break}for(;a<i;a+=r)(n=e[a])<o?o=n:n>s&&(s=n);return{min:o,max:s}}function UH(e,t=0,r=1){if(t<0&&r>1){let t=e.length/r,n=new Float64Array(t);for(let a=0,i=0;a<t;++a){for(let t=i+r;i<t;++i)n[a]+=e[i]*e[i];n[a]**=.5}return Uz(n,0,1)}return Uz(e,t<0?0:t,r)}function UG(e,t=0){let r=e||[];for(;r.length<=t;)r.push(null);return r}function Uq(e){return Object.prototype.toString.call(e).slice(8,-1)}let U$={name:"",numberOfComponents:1,dataType:UW,rangeTuple:[0,0]};function UK(e,t,r={}){if(Object.assign(t,U$,r),Array.isArray(r.values)&&void 0===r.dataType&&console.warn("vtkDataArray.newInstance: no dataType provided, converting to Float32Array"),!t.empty&&!t.values&&!t.size)throw TypeError("Cannot create vtkDataArray object without: size > 0, values");if(t.values?Array.isArray(t.values)&&(t.values=jj(t.dataType,t.values)):t.values=jF(t.dataType,t.size),t.values&&(t.size=t.size??t.values.length,t.dataType=Uq(t.values)),jY(e,t),j1(e,t,["name","numberOfComponents"]),t.size%t.numberOfComponents!=0)throw RangeError("model.size is not a multiple of model.numberOfComponents");function n(r){if(r<0)return!1;let n=e.getNumberOfComponents(),a=t.values.length/(n>0?n:1);if(r===a)return!0;if(r>a){let e=t.values;return t.values=jF(t.dataType,(r+a)*n),t.values.set(e),!0}return t.size>r*n&&(t.size=r*n,e.dataChange()),!0}t.classHierarchy.push("vtkDataArray"),e.dataChange=()=>{t.ranges=null,e.modified()},e.allocate=t=>{n(e.getNumberOfTuples()+t)},e.resize=r=>{n(r);let a=r*e.getNumberOfComponents();return t.size!==a&&(t.size=a,e.dataChange(),!0)},e.initialize=()=>(e.resize(0),e),e.getElementComponentSize=()=>t.values.BYTES_PER_ELEMENT,e.getComponent=(e,r=0)=>t.values[e*t.numberOfComponents+r],e.setComponent=(r,n,a)=>{a!==t.values[r*t.numberOfComponents+n]&&(t.values[r*t.numberOfComponents+n]=a,e.dataChange())},e.getValue=r=>{let n=r/t.numberOfComponents,a=r%t.numberOfComponents;return e.getComponent(n,a)},e.setValue=(r,n)=>{let a=r/t.numberOfComponents,i=r%t.numberOfComponents;e.setComponent(a,i,n)},e.getData=()=>t.size===t.values.length?t.values:t.values.subarray(0,t.size),e.getRange=(r=-1)=>{let n=r;n<0&&(n=1===t.numberOfComponents?0:t.numberOfComponents);let a=null;return t.ranges||(t.ranges=UG(t.ranges,t.numberOfComponents)),(a=t.ranges[n])||(a=UH(e.getData(),r,t.numberOfComponents),t.ranges[n]=a),t.rangeTuple[0]=a.min,t.rangeTuple[1]=a.max,t.rangeTuple},e.setRange=(e,r)=>{t.ranges||(t.ranges=UG(t.ranges,t.numberOfComponents));let n={min:e.min,max:e.max};return t.ranges[r]=n,t.rangeTuple[0]=n.min,t.rangeTuple[1]=n.max,t.rangeTuple},e.getRanges=(r=!0)=>{if(!r)return structuredClone(t.ranges);let n=[];for(let r=0;r<t.numberOfComponents;r++){let[t,a]=e.getRange(r),i={min:t,max:a};n.push(i)}if(t.numberOfComponents>1){let[t,r]=e.getRange(-1);n.push({min:t,max:r})}return n},e.setTuple=(e,r)=>{let n=e*t.numberOfComponents;for(let e=0;e<t.numberOfComponents;e++)t.values[n+e]=r[e]},e.setTuples=(e,r)=>{let n=e*t.numberOfComponents,a=Math.min(r.length,t.size-n);for(let e=0;e<a;)t.values[n++]=r[e++]},e.insertTuple=(r,a)=>(t.size<=r*t.numberOfComponents&&(t.size=(r+1)*t.numberOfComponents,n(r+1)),e.setTuple(r,a),r),e.insertTuples=(r,a)=>{let i=r+a.length/t.numberOfComponents;return t.size<i*t.numberOfComponents&&(t.size=i*t.numberOfComponents,n(i)),e.setTuples(r,a),i},e.insertNextTuple=r=>{let n=t.size/t.numberOfComponents;return e.insertTuple(n,r)},e.insertNextTuples=r=>{let n=t.size/t.numberOfComponents;return e.insertTuples(n,r)},e.findTuple=(e,r=UU)=>{for(let n=0;n<t.size;n+=t.numberOfComponents)if(Math.abs(e[0]-t.values[n])<=r){let a=!0;for(let i=1;i<t.numberOfComponents;++i)if(Math.abs(e[i]-t.values[n+i])>r){a=!1;break}if(a)return n/t.numberOfComponents}return -1},e.getTuple=(e,r=[])=>{let n=t.numberOfComponents||1,a=e*n;switch(n){case 4:r[3]=t.values[a+3];case 3:r[2]=t.values[a+2];case 2:r[1]=t.values[a+1];case 1:r[0]=t.values[a];break;default:for(let e=n-1;e>=0;--e)r[e]=t.values[a+e]}return r},e.getTuples=(r,n)=>{let a=(r??0)*t.numberOfComponents,i=(n??e.getNumberOfTuples())*t.numberOfComponents,o=e.getData().subarray(a,i);return o.length>0?o:null},e.getTupleLocation=(e=1)=>e*t.numberOfComponents,e.getNumberOfComponents=()=>t.numberOfComponents,e.getNumberOfValues=()=>t.size,e.getNumberOfTuples=()=>t.size/t.numberOfComponents,e.getDataType=()=>t.dataType,e.newClone=()=>UY({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents}),e.getName=()=>(t.name||(e.modified(),t.name=`vtkDataArray${e.getMTime()}`),t.name),e.setData=(r,n)=>{t.values=r,t.size=r.length,t.dataType=Uq(r),n&&(t.numberOfComponents=n),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),e.dataChange()},e.getState=()=>{if(t.deleted)return null;let r={...t,vtkClass:e.getClassName()};r.values=Array.from(r.values),delete r.buffer,Object.keys(r).forEach(e=>{r[e]||delete r[e]});let n={};return Object.keys(r).sort().forEach(e=>{n[e]=r[e]}),n.mtime&&delete n.mtime,n},e.deepCopy=r=>{let n=e.getDataType(),a=t.values;e.shallowCopy(r),t.ranges=structuredClone(r.getRanges()),a?.length>=r.getNumberOfValues()&&n===r.getDataType()?(a.set(r.getData()),t.values=a,e.dataChange()):e.setData(r.getData().slice())},e.interpolateTuple=(r,n,a,i,o,s)=>{let l=t.numberOfComponents||1;(l!==n.getNumberOfComponents()||l!==i.getNumberOfComponents())&&UB("numberOfComponents must match");let u=n.getTuple(a),c=i.getTuple(o),d=[];switch(d.length=l,l){case 4:d[3]=u[3]+(c[3]-u[3])*s;case 3:d[2]=u[2]+(c[2]-u[2])*s;case 2:d[1]=u[1]+(c[1]-u[1])*s;case 1:d[0]=u[0]+(c[0]-u[0])*s;break;default:for(let e=0;e<l;e++)d[e]=u[e]+(c[e]-u[e])*s}return e.insertTuple(r,d)}}let UY=j7(UK,"vtkDataArray");var UX={newInstance:UY,extend:UK,computeRange:UH,createRangeHelper:function(){let e=Number.MAX_VALUE,t=-Number.MAX_VALUE,r=0,n=0;return{add(a){e>a&&(e=a),t<a&&(t=a),r++,n+=a},get:()=>({min:e,max:t,count:r,sum:n,mean:n/r}),getRange:()=>({min:e,max:t})}},fastComputeRange:Uz,getDataType:Uq,getMaxNorm:function(e){let t=e.getNumberOfComponents(),r=0,n=Array(t);for(let a=0;a<e.getNumberOfTuples();++a){e.getTuple(a,n);let i=Bz(n,t);i>r&&(r=i)}return r},...Uj};let{vtkErrorMacro:UZ,vtkWarningMacro:UJ}=Bh,UQ={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function U1(e,t,r={}){let n;Object.assign(t,UQ,r),Bh.obj(e,t),t.classHierarchy.push("vtkFieldData"),n=e.getState,t.arrays&&(t.arrays=t.arrays.map(e=>({data:jx(e.data)}))),e.initialize=()=>{e.initializeFields(),e.copyAllOn(),e.clearFieldFlags()},e.initializeFields=()=>{t.arrays=[],t.copyFieldFlags={},e.modified()},e.copyStructure=r=>{e.initializeFields(),t.copyFieldFlags=r.getCopyFieldFlags().map(e=>e),t.arrays=r.getArrays().map(e=>({data:e}))},e.getNumberOfArrays=()=>t.arrays.length,e.getNumberOfActiveArrays=()=>t.arrays.length,e.addArray=r=>{let n=r.getName(),{array:a,index:i}=e.getArrayWithIndex(n);return null!=a?(t.arrays[i]={data:r},i):(t.arrays=[].concat(t.arrays,{data:r}),t.arrays.length-1)},e.removeAllArrays=()=>{t.arrays=[]},e.removeArray=r=>{let n=t.arrays.findIndex(e=>e.data.getName()===r);return e.removeArrayByIndex(n)},e.removeArrayByIndex=e=>-1!==e&&e<t.arrays.length&&(t.arrays.splice(e,1),!0),e.getArrays=()=>t.arrays.map(e=>e.data),e.getArray=t=>"number"==typeof t?e.getArrayByIndex(t):e.getArrayByName(t),e.getArrayByName=e=>t.arrays.reduce((t,r,n)=>r.data.getName()===e?r.data:t,null),e.getArrayWithIndex=e=>{let r=t.arrays.findIndex(t=>t.data.getName()===e);return{array:-1!==r?t.arrays[r].data:null,index:r}},e.getArrayByIndex=e=>e>=0&&e<t.arrays.length?t.arrays[e].data:null,e.hasArray=t=>e.getArrayWithIndex(t).index>=0,e.getArrayName=e=>{let r=t.arrays[e];return r?r.data.getName():""},e.getCopyFieldFlags=()=>t.copyFieldFlags,e.getFlag=e=>t.copyFieldFlags[e],e.passData=(r,n=-1,a=-1)=>{r.getArrays().forEach(i=>{let o=e.getFlag(i.getName());if(!1!==o&&!(t.doCopyAllOff&&!0!==o)&&i){let t=e.getArrayByName(i.getName());if(t)if(i.getNumberOfComponents()===t.getNumberOfComponents())if(n>-1&&n<i.getNumberOfTuples()){let e=a>-1?a:n;t.insertTuple(e,i.getTuple(n))}else t.insertTuples(0,i.getTuples());else UZ("Unhandled case in passData");else if(n<0||n>i.getNumberOfTuples())e.addArray(i),r.getAttributes(i).forEach(t=>{e.setAttribute(i,t)});else{let o=i.getNumberOfComponents(),s=i.getNumberOfValues(),l=a>-1?a:n;s<=l*o&&(s=(l+1)*o),(t=UX.newInstance({name:i.getName(),dataType:i.getDataType(),numberOfComponents:o,values:Bh.newTypedArray(i.getDataType(),s),size:0})).insertTuple(l,i.getTuple(n)),e.addArray(t),r.getAttributes(i).forEach(r=>{e.setAttribute(t,r)})}}})},e.interpolateData=(r,n=-1,a=-1,i=-1,o=.5)=>{r.getArrays().forEach(s=>{let l=e.getFlag(s.getName());if(!1!==l&&!(t.doCopyAllOff&&!0!==l)&&s){let t=e.getArrayByName(s.getName());if(t)if(s.getNumberOfComponents()===t.getNumberOfComponents())if(n>-1&&n<s.getNumberOfTuples()){let e=i>-1?i:n;t.interpolateTuple(e,s,n,s,a,o),UJ("Unexpected case in interpolateData")}else t.insertTuples(s.getTuples());else UZ("Unhandled case in interpolateData");else if(n<0||a<0||n>s.getNumberOfTuples())e.addArray(s),r.getAttributes(s).forEach(t=>{e.setAttribute(s,t)});else{let l=s.getNumberOfComponents(),u=s.getNumberOfValues(),c=i>-1?i:n;u<=c*l&&(u=(c+1)*l),(t=UX.newInstance({name:s.getName(),dataType:s.getDataType(),numberOfComponents:l,values:Bh.newTypedArray(s.getDataType(),u),size:0})).interpolateTuple(c,s,n,s,a,o),e.addArray(t),r.getAttributes(s).forEach(r=>{e.setAttribute(t,r)})}}})},e.copyFieldOn=e=>{t.copyFieldFlags[e]=!0},e.copyFieldOff=e=>{t.copyFieldFlags[e]=!1},e.copyAllOn=()=>{(!t.doCopyAllOn||t.doCopyAllOff)&&(t.doCopyAllOn=!0,t.doCopyAllOff=!1,e.modified())},e.copyAllOff=()=>{(t.doCopyAllOn||!t.doCopyAllOff)&&(t.doCopyAllOn=!1,t.doCopyAllOff=!0,e.modified())},e.clearFieldFlags=()=>{t.copyFieldFlags={}},e.deepCopy=e=>{t.arrays=e.getArrays().map(e=>{let t=e.newClone();return t.deepCopy(e),{data:t}})},e.copyFlags=e=>e.getCopyFieldFlags().map(e=>e),e.reset=()=>t.arrays.forEach(e=>e.data.reset()),e.getMTime=()=>t.arrays.reduce((e,t)=>t.data.getMTime()>e?t.data.getMTime():e,t.mtime),e.getNumberOfComponents=()=>t.arrays.reduce((e,t)=>e+t.data.getNumberOfComponents(),0),e.getNumberOfTuples=()=>t.arrays.length>0?t.arrays[0].getNumberOfTuples():0,e.getState=()=>{let e=n();return e&&(e.arrays=t.arrays.map(e=>({data:e.data.getState()}))),e}}Bh.newInstance(U1,"vtkFieldData");var U0={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:{SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:{DEFAULT:0,SINGLE:1,DOUBLE:2},PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};let{AttributeTypes:U2,AttributeCopyOperations:U5}=U0,{vtkWarningMacro:U3}=Bh,U4={activeScalars:-1,activeVectors:-1,activeTensors:-1,activeNormals:-1,activeTCoords:-1,activeGlobalIds:-1,activePedigreeIds:-1};function U8(e,t,r={}){Object.assign(t,U4,r),U1(e,t,r),Bh.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={});let n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function a(e){let t=n.find(t=>U2[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase());return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes");let i={...e};e.checkNumberOfComponents=e=>!0,e.setAttribute=(r,n)=>{let i=a(n);if(r&&"PEDIGREEIDS"===i.toUpperCase()&&!r.isA("vtkDataArray"))return U3(`Cannot set attribute ${i}. The attribute must be a vtkDataArray.`),-1;if(r&&!e.checkNumberOfComponents(r,i))return U3(`Cannot set attribute ${i}. Incorrect number of components.`),-1;if(r){let n=e.addArray(r);t[`active${i}`]=n}else t[`active${i}`]=-1;return e.modified(),t[`active${i}`]},e.getAttributes=t=>n.filter(r=>e[`get${r}`]()===t),e.setActiveAttributeByName=(t,r)=>e.setActiveAttributeByIndex(e.getArrayWithIndex(t).index,r),e.setActiveAttributeByIndex=(r,n)=>{let i=a(n);if(r>=0&&r<t.arrays.length){if("PEDIGREEIDS"!==i.toUpperCase()){let t=e.getArrayByIndex(r);if(!t.isA("vtkDataArray"))return U3(`Cannot set attribute ${i}. Only vtkDataArray subclasses can be set as active attributes.`),-1;if(!e.checkNumberOfComponents(t,i))return U3(`Cannot set attribute ${i}. Incorrect number of components.`),-1}return t[`active${i}`]=r,e.modified(),r}return -1===r&&(t[`active${i}`]=r,e.modified()),-1},e.getActiveAttribute=t=>{let r=a(t);return e[`get${r}`]()},e.removeAllArrays=()=>{n.forEach(e=>{t[`active${e}`]=-1}),i.removeAllArrays()},e.removeArrayByIndex=e=>(-1!==e&&n.forEach(r=>{e===t[`active${r}`]?t[`active${r}`]=-1:e<t[`active${r}`]&&(t[`active${r}`]-=1)}),i.removeArrayByIndex(e)),n.forEach(r=>{let n=`active${r}`;e[`get${r}`]=()=>e.getArrayByIndex(t[n]),e[`set${r}`]=t=>e.setAttribute(t,r),e[`setActive${r}`]=t=>e.setActiveAttributeByIndex(e.getArrayWithIndex(t).index,r),e[`copy${r}Off`]=()=>{let e=r.toUpperCase();t.copyAttributeFlags[U5.PASSDATA][U2[e]]=!1},e[`copy${r}On`]=()=>{let e=r.toUpperCase();t.copyAttributeFlags[U5.PASSDATA][U2[e]]=!0}}),e.initializeAttributeCopyFlags=()=>{t.copyAttributeFlags=[],Object.keys(U5).filter(e=>"ALLCOPY"!==e).forEach(e=>{t.copyAttributeFlags[U5[e]]=Object.keys(U2).filter(e=>"NUM_ATTRIBUTES"!==e).reduce((e,t)=>(e[U2[t]]=!0,e),[])}),t.copyAttributeFlags[U5.COPYTUPLE][U2.GLOBALIDS]=!1,t.copyAttributeFlags[U5.INTERPOLATE][U2.GLOBALIDS]=!1,t.copyAttributeFlags[U5.COPYTUPLE][U2.PEDIGREEIDS]=!1},e.initialize=Bh.chain(e.initialize,e.initializeAttributeCopyFlags),t.dataArrays&&Object.keys(t.dataArrays).length&&Object.keys(t.dataArrays).forEach(r=>{t.dataArrays[r].ref||"vtkDataArray"!==t.dataArrays[r].type||e.addArray(UX.newInstance(t.dataArrays[r]))});let o=e.shallowCopy;e.shallowCopy=(e,r)=>{o(e,r),t.arrays=e.getArrays().map(e=>{let t=e.newClone();return t.shallowCopy(e,r),{data:t}})},e.initializeAttributeCopyFlags()}var U6={newInstance:Bh.newInstance(U8,"vtkDataSetAttributes"),extend:U8,...U0};let U9=["pointData","cellData","fieldData"],U7={};function ze(e,t,r={}){let n,a;Object.assign(t,U7,r),Bh.obj(e,t),Bh.setGet(e,t,U9),Bh.getArray(e,t,["bounds"],6),t.classHierarchy.push("vtkDataSet"),U9.forEach(e=>{t[e]?t[e]=jx(t[e]):t[e]=U6.newInstance()}),e.computeBounds=()=>{if(t.modifiedTime&&t.computeTime&&t.modifiedTime>t.computeTime||!t.computeTime){let r=e.getPoints();r?.getNumberOfPoints()?Uy(t.bounds,r.getBoundsByReference()):t.bounds=WE.createUninitializedBounds(),t.computeTime=Bh.getCurrentGlobalMTime()}},e.getLength2=()=>{let t=e.getBoundsByReference();return t&&6===t.length?UP(t):0},e.getLength=()=>Math.sqrt(e.getLength2()),e.getCenter=()=>{let t=e.getBoundsByReference();return t&&6===t.length?Uk(t):[0,0,0]},e.getCellBounds=t=>{let r=e.getCell(t);return r?r.getBounds():WE.createUninitializedBounds()},e.getBounds=Bh.chain(()=>e.computeBounds,e.getBounds),e.getBoundsByReference=Bh.chain(()=>e.computeBounds,e.getBoundsByReference),n=e.shallowCopy,e.shallowCopy=(e,r=!1)=>{n(e,r),U9.forEach(r=>{t[r]=U6.newInstance(),t[r].shallowCopy(e.getReferenceByName(r))})},a=e.getMTime,e.getMTime=()=>U9.reduce((e,r)=>Math.max(e,t[r]?.getMTime()??e),a()),e.initialize=()=>(U9.forEach(e=>t[e]?.initialize()),e)}var zt={newInstance:Bh.newInstance(ze,"vtkDataSet"),extend:ze,...{FieldDataTypes:{UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},FieldAssociations:{FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7}}};let zr={UNCHANGED:0,SINGLE_POINT:1,X_LINE:2,Y_LINE:3,Z_LINE:4,XY_PLANE:5,YZ_PLANE:6,XZ_PLANE:7,XYZ_GRID:8,EMPTY:9};var zn={StructuredType:zr};let{StructuredType:za}=zn;var zi={getDataDescriptionFromExtent:function(e){let t=0;for(let r=0;r<3;++r)e[2*r]<e[2*r+1]&&t++;return e[0]>e[1]||e[2]>e[3]||e[4]>e[5]?za.EMPTY:3===t?za.XYZ_GRID:2===t?e[0]===e[1]?za.YZ_PLANE:e[2]===e[3]?za.XZ_PLANE:za.XY_PLANE:1===t?e[0]<e[1]?za.X_LINE:e[2]<e[3]?za.Y_LINE:za.Z_LINE:za.SINGLE_POINT},...zn};let{vtkErrorMacro:zo}=Bh,zs={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:zr.EMPTY};var zl=Bh.newInstance(function(e,t,r={}){let n;Object.assign(t,zs,r),zt.extend(e,t,r),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=N7.mat3.identity(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),Bh.get(e,t,["indexToWorld","worldToIndex"]),Bh.setGetArray(e,t,["origin","spacing"],3),Bh.setGetArray(e,t,["direction"],9),Bh.getArray(e,t,["extent"],6),t.classHierarchy.push("vtkImageData"),e.setExtent=(...r)=>{if(t.deleted)return zo("instance deleted - cannot call any method"),!1;let n=1===r.length?r[0]:r;if(6!==n.length)return!1;let a=t.extent.some((e,t)=>e!==n[t]);return a&&(t.extent=n.slice(),t.dataDescription=zi.getDataDescriptionFromExtent(t.extent),e.modified()),a},e.setDimensions=(...r)=>{let n,a,i;if(t.deleted)return void zo("instance deleted - cannot call any method");if(1===r.length){let e=r[0];n=e[0],a=e[1],i=e[2]}else{if(3!==r.length)return void zo("Bad dimension specification");n=r[0],a=r[1],i=r[2]}e.setExtent(0,n-1,0,a-1,0,i-1)},e.getDimensions=()=>[t.extent[1]-t.extent[0]+1,t.extent[3]-t.extent[2]+1,t.extent[5]-t.extent[4]+1],e.getNumberOfCells=()=>{let t=e.getDimensions(),r=1;for(let e=0;e<3;e++){if(0===t[e])return 0;t[e]>1&&(r*=t[e]-1)}return r},e.getNumberOfPoints=()=>{let t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=r=>{let n=e.getDimensions();if(0===n[0]||0===n[1]||0===n[2])return zo("Requesting a point from an empty image."),null;let a=new Float64Array(3);switch(t.dataDescription){case zr.EMPTY:return null;case zr.SINGLE_POINT:break;case zr.X_LINE:a[0]=r;break;case zr.Y_LINE:a[1]=r;break;case zr.Z_LINE:a[2]=r;break;case zr.XY_PLANE:a[0]=r%n[0],a[1]=r/n[0];break;case zr.YZ_PLANE:a[1]=r%n[1],a[2]=r/n[1];break;case zr.XZ_PLANE:a[0]=r%n[0],a[2]=r/n[0];break;case zr.XYZ_GRID:a[0]=r%n[0],a[1]=r/n[0]%n[1],a[2]=r/(n[0]*n[1]);break;default:zo("Invalid dataDescription")}let i=[0,0,0];return e.indexToWorld(a,i),i},e.getBounds=()=>e.extentToBounds(e.getSpatialExtent()),e.extentToBounds=e=>UO(e,t.indexToWorld),e.getSpatialExtent=()=>Ux([...t.extent],.5),e.computeTransforms=()=>{N7.mat4.fromTranslation(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],N7.mat4.scale(t.indexToWorld,t.indexToWorld,t.spacing),N7.mat4.invert(t.worldToIndex,t.indexToWorld)},e.indexToWorld=(e,r=[])=>(N7.vec3.transformMat4(r,e,t.indexToWorld),r),e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=(e,r=[])=>(N7.vec3.transformMat4(r,e,t.worldToIndex),r),e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=(e,r=[])=>UO(e,t.indexToWorld,r),e.worldToIndexBounds=(e,r=[])=>UO(e,t.worldToIndex,r),t._onOriginChanged=e.computeTransforms,t._onDirectionChanged=e.computeTransforms,t._onSpacingChanged=e.computeTransforms,e.computeTransforms(),e.getCenter=()=>Uk(e.getBounds()),e.computeHistogram=(t,r=null)=>{let n=[0,0,0,0,0,0];e.worldToIndexBounds(t,n);let a=[0,0,0],i=[0,0,0];UA(n,a,i),B4(a,a),B4(i,i);let o=e.getDimensions();Wg(a,[0,0,0],[o[0]-1,o[1]-1,o[2]-1],a),Wg(i,[0,0,0],[o[0]-1,o[1]-1,o[2]-1],i);let s=o[0],l=o[0]*o[1],u=e.getPointData().getScalars().getData(),c=-1/0,d=1/0,h=0,p=0,f=0;for(let e=a[2];e<=i[2];e++)for(let t=a[1];t<=i[1];t++){let o=a[0]+t*s+e*l;for(let s=a[0];s<=i[0];s++){if(!r||r([s,t,e],n)){let e=u[o];e>c&&(c=e),e<d&&(d=e),h+=e*e,p+=e,f+=1}++o}}let m=f>0?p/f:0,g=f?Math.abs(h/f-m*m):0,y=Math.sqrt(g);return{minimum:d,maximum:c,average:m,variance:g,sigma:y,count:f}},e.computeIncrements=(e,t=1)=>{let r=[],n=t;for(let t=0;t<3;++t)r[t]=n,n*=e[2*t+1]-e[2*t]+1;return r},e.computeOffsetIndex=([t,r,n])=>{let a=e.getExtent(),i=e.getPointData().getScalars().getNumberOfComponents(),o=e.computeIncrements(a,i);return Math.floor((Math.round(t)-a[0])*o[0]+(Math.round(r)-a[2])*o[1]+(Math.round(n)-a[4])*o[2])},e.getOffsetIndexFromWorld=t=>{let r=e.getExtent(),n=e.worldToIndex(t);for(let e=0;e<3;++e)if(n[e]<r[2*e]||n[e]>r[2*e+1])return zo(`GetScalarPointer: Pixel ${n} is not in memory. Current extent = ${r}`),NaN;return e.computeOffsetIndex(n)},e.getScalarValueFromWorld=(t,r=0)=>{let n=e.getPointData().getScalars().getNumberOfComponents();if(r<0||r>=n)return zo(`GetScalarPointer: Scalar Component ${r} is not within bounds. Current Scalar numberOfComponents: ${n}`),NaN;let a=e.getOffsetIndexFromWorld(t);return Number.isNaN(a)?a:e.getPointData().getScalars().getComponent(a,r)},n=e.initialize,e.initialize=()=>(e.set({direction:N7.mat3.identity(t.direction),spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:zr.EMPTY}),n())},"vtkImageData");let{vtkDebugMacro:zu}=Bh,zc={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,modelTransformMatrix:null,cameraLightTransform:N7.mat4.create(),physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function zd(e,t,r={}){Object.assign(t,zc,r),Bh.obj(e,t),Bh.get(e,t,["distance"]),Bh.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),Bh.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),Bh.setGetArray(e,t,["clippingRange","windowCenter"],2),Bh.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),function(e,t){t.classHierarchy.push("vtkCamera");let r=new Float64Array(3),n=new Float64Array([0,0,-1]),a=new Float64Array([0,1,0]),i=N7.mat4.identity(new Float64Array(16)),o=N7.mat4.identity(new Float64Array(16)),s=new Float64Array(3),l=new Float64Array(3),u=new Float64Array(3),c=N7.mat4.identity(new Float64Array(16)),d=N7.mat4.identity(new Float64Array(16)),h=new Float64Array(3),p=new Float64Array(3);function f(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=()=>{let r=e.getViewMatrix();t.viewUp[0]=r[4],t.viewUp[1]=r[5],t.viewUp[2]=r[6],e.modified()},e.setPosition=(r,n,a)=>{(r!==t.position[0]||n!==t.position[1]||a!==t.position[2])&&(t.position[0]=r,t.position[1]=n,t.position[2]=a,e.computeDistance(),e.modified())},e.setFocalPoint=(r,n,a)=>{(r!==t.focalPoint[0]||n!==t.focalPoint[1]||a!==t.focalPoint[2])&&(t.focalPoint[0]=r,t.focalPoint[1]=n,t.focalPoint[2]=a,e.computeDistance(),e.modified())},e.setDistance=r=>{if(t.distance===r)return;t.distance=r,t.distance<1e-20&&(t.distance=1e-20,zu("Distance is set to minimum."));let n=t.directionOfProjection;t.focalPoint[0]=t.position[0]+n[0]*t.distance,t.focalPoint[1]=t.position[1]+n[1]*t.distance,t.focalPoint[2]=t.position[2]+n[2]*t.distance,e.modified()},e.computeDistance=()=>{let e=t.focalPoint[0]-t.position[0],r=t.focalPoint[1]-t.position[1],n=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+r*r+n*n),t.distance<1e-20){t.distance=1e-20,zu("Distance is set to minimum.");let e=t.directionOfProjection;t.focalPoint[0]=t.position[0]+e[0]*t.distance,t.focalPoint[1]=t.position[1]+e[1]*t.distance,t.focalPoint[2]=t.position[2]+e[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=r/t.distance,t.directionOfProjection[2]=n/t.distance,f()},e.dolly=r=>{if(r<=0)return;let n=t.distance/r;e.setPosition(t.focalPoint[0]-n*t.directionOfProjection[0],t.focalPoint[1]-n*t.directionOfProjection[1],t.focalPoint[2]-n*t.directionOfProjection[2])},e.roll=r=>{let n=t.position,a=t.focalPoint,i=t.viewUp,o=new Float64Array([i[0],i[1],i[2],0]);N7.mat4.identity(c);let s=new Float64Array([a[0]-n[0],a[1]-n[1],a[2]-n[2]]);N7.mat4.rotate(c,c,BM(r),s),N7.vec4.transformMat4(o,o,c),t.viewUp[0]=o[0],t.viewUp[1]=o[1],t.viewUp[2]=o[2],e.modified()},e.azimuth=r=>{let n=t.focalPoint;N7.mat4.identity(d),N7.mat4.translate(d,d,n),N7.mat4.rotate(d,d,BM(r),t.viewUp),N7.mat4.translate(d,d,[-n[0],-n[1],-n[2]]),N7.vec3.transformMat4(h,t.position,d),e.setPosition(h[0],h[1],h[2])},e.yaw=r=>{let n=t.position;N7.mat4.identity(d),N7.mat4.translate(d,d,n),N7.mat4.rotate(d,d,BM(r),t.viewUp),N7.mat4.translate(d,d,[-n[0],-n[1],-n[2]]),N7.vec3.transformMat4(p,t.focalPoint,d),e.setFocalPoint(p[0],p[1],p[2])},e.elevation=r=>{let n=t.focalPoint,a=e.getViewMatrix(),i=[-a[0],-a[1],-a[2]];N7.mat4.identity(d),N7.mat4.translate(d,d,n),N7.mat4.rotate(d,d,BM(r),i),N7.mat4.translate(d,d,[-n[0],-n[1],-n[2]]),N7.vec3.transformMat4(h,t.position,d),e.setPosition(h[0],h[1],h[2])},e.pitch=r=>{let n=t.position,a=e.getViewMatrix(),i=[a[0],a[1],a[2]];N7.mat4.identity(d),N7.mat4.translate(d,d,n),N7.mat4.rotate(d,d,BM(r),i),N7.mat4.translate(d,d,[-n[0],-n[1],-n[2]]),N7.vec3.transformMat4(p,t.focalPoint,d),e.setFocalPoint(...p)},e.zoom=r=>{r<=0||(t.parallelProjection?t.parallelScale/=r:t.viewAngle/=r,e.modified())},e.translate=(r,n,a)=>{let i=[r,n,a];BL(t.position,i,t.position),BL(t.focalPoint,i,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=r=>{let n=[...t.viewUp,1],a=[],i=[],o=[];n[0]+=t.position[0],n[1]+=t.position[1],n[2]+=t.position[2],N7.vec4.transformMat4(a,[...t.position,1],r),N7.vec4.transformMat4(i,[...t.focalPoint,1],r),N7.vec4.transformMat4(o,n,r),o[0]-=a[0],o[1]-=a[1],o[2]-=a[2],e.setPosition(...a.slice(0,3)),e.setFocalPoint(...i.slice(0,3)),e.setViewUp(...o.slice(0,3))},e.getThickness=()=>t.clippingRange[1]-t.clippingRange[0],e.setThickness=r=>{let n=r;n<1e-20&&(n=1e-20,zu("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+n)},e.setThicknessFromFocalPoint=r=>{let n=r;n<1e-20&&(n=1e-20,zu("Thickness is set to minimum.")),e.setClippingRange(t.distance-n/2,t.distance+n/2)},e.setRoll=e=>{},e.getRoll=()=>{},e.setObliqueAngles=(e,t)=>{},e.getOrientation=()=>{},e.getOrientationWXYZ=()=>{},e.getFrustumPlanes=(t=1,r=new Float64Array(24))=>{let n=[[1,0,0,1],[-1,0,0,1],[0,1,0,1],[0,-1,0,1],[0,0,1,1],[0,0,-1,1]],a=e.getCompositeProjectionMatrix(t,-1,1);for(let e=0;e<6;e++)N7.vec4.transformMat4(n[e],n[e],a),function(e){let t=Bz(e,3);0!==t&&(e[0]/=t,e[1]/=t,e[2]/=t,e[3]/=t)}(n[e]),r[4*e+0]=n[e][0],r[4*e+1]=n[e][1],r[4*e+2]=n[e][2],r[4*e+3]=n[e][3];return r},e.getCameraLightTransformMatrix=e=>(N7.mat4.copy(e,t.cameraLightTransform),e),e.computeCameraLightTransform=()=>{N7.mat4.copy(i,e.getViewMatrix()),N7.mat4.invert(i,i),N7.mat4.fromScaling(o,[t.distance,t.distance,t.distance]),N7.mat4.multiply(i,i,o),N7.mat4.identity(t.cameraLightTransform),N7.mat4.translate(t.cameraLightTransform,i,[0,0,-1])},e.deepCopy=e=>{},e.physicalOrientationToWorldDirection=e=>{let t=N7.quat.fromValues(e[0],e[1],e[2],e[3]),r=N7.quat.create(),n=N7.quat.fromValues(0,0,1,0);return N7.quat.conjugate(r,t),N7.quat.multiply(n,t,n),N7.quat.multiply(n,n,r),[n[0],n[1],n[2]]},e.getPhysicalToWorldMatrix=t=>{e.getWorldToPhysicalMatrix(t),N7.mat4.invert(t,t)},e.getWorldToPhysicalMatrix=e=>{N7.mat4.identity(e);let r=[3];BU(t.physicalViewNorth,t.physicalViewUp,r),e[0]=r[0],e[1]=r[1],e[2]=r[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],N7.mat4.transpose(e,e),N7.vec3.set(s,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),N7.mat4.scale(e,e,s),N7.mat4.translate(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=o=>{N7.mat4.invert(i,o),N7.vec3.transformMat4(s,r,i),e.computeDistance();let c=t.distance;e.setPosition(s[0],s[1],s[2]),N7.vec3.transformMat4(l,n,i),N7.vec3.subtract(l,l,s),N7.vec3.normalize(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),N7.vec3.transformMat4(u,a,i),N7.vec3.subtract(u,u,s),N7.vec3.normalize(u,u),e.setViewUp(u[0],u[1],u[2]),e.setDistance(c)},e.computeViewParametersFromPhysicalMatrix=t=>{e.getWorldToPhysicalMatrix(i),N7.mat4.multiply(i,t,i),e.computeViewParametersFromViewMatrix(i)},e.setModelTransformMatrix=e=>{t.modelTransformMatrix=e},e.getModelTransformMatrix=()=>t.modelTransformMatrix,e.setViewMatrix=r=>{t.viewMatrix=r,t.viewMatrix&&(N7.mat4.copy(i,t.viewMatrix),e.computeViewParametersFromViewMatrix(i),N7.mat4.transpose(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=()=>{if(t.viewMatrix)return t.modelTransformMatrix?(N7.mat4.multiply(i,t.viewMatrix,t.modelTransformMatrix),i):t.viewMatrix;N7.mat4.lookAt(i,t.position,t.focalPoint,t.viewUp),N7.mat4.transpose(i,i);let e=new Float64Array(16);return t.modelTransformMatrix?N7.mat4.multiply(e,i,t.modelTransformMatrix):N7.mat4.copy(e,i),e},e.setProjectionMatrix=e=>{t.projectionMatrix=e},e.getProjectionMatrix=(e,r,n)=>{let a=new Float64Array(16);if(N7.mat4.identity(a),t.projectionMatrix){let e=1/t.physicalScale;return N7.vec3.set(s,e,e,e),N7.mat4.copy(a,t.projectionMatrix),N7.mat4.scale(a,a,s),N7.mat4.transpose(a,a),a}N7.mat4.identity(i);let o=t.clippingRange[1]-t.clippingRange[0],l=[t.clippingRange[0]+(r+1)*o/2,t.clippingRange[0]+(n+1)*o/2];if(t.parallelProjection){let r=t.parallelScale*e,n=t.parallelScale,a=(t.windowCenter[0]-1)*r,o=(t.windowCenter[0]+1)*r,s=(t.windowCenter[1]-1)*n,u=(t.windowCenter[1]+1)*n;N7.mat4.ortho(i,a,o,s,u,l[0],l[1]),N7.mat4.transpose(i,i)}else if(t.useOffAxisProjection)throw Error("Off-Axis projection is not supported at this time");else{let r,n,a=Math.tan(BM(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(r=t.clippingRange[0]*a,n=t.clippingRange[0]*a/e):(r=t.clippingRange[0]*a*e,n=t.clippingRange[0]*a);let o=(t.windowCenter[0]-1)*r,s=(t.windowCenter[0]+1)*r,u=(t.windowCenter[1]-1)*n,c=(t.windowCenter[1]+1)*n,d=l[0],h=l[1];i[0]=2*d/(s-o),i[5]=2*d/(c-u),i[2]=(o+s)/(s-o),i[6]=(u+c)/(c-u),i[10]=-(d+h)/(h-d),i[14]=-1,i[11]=-2*d*h/(h-d),i[15]=0}return N7.mat4.copy(a,i),a},e.getCompositeProjectionMatrix=(t,r,n)=>{let a=e.getViewMatrix(),i=e.getProjectionMatrix(t,r,n);return N7.mat4.multiply(i,a,i),i},e.setDirectionOfProjection=(e,r,n)=>{if(t.directionOfProjection[0]===e&&t.directionOfProjection[1]===r&&t.directionOfProjection[2]===n)return;t.directionOfProjection[0]=e,t.directionOfProjection[1]=r,t.directionOfProjection[2]=n;let a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance,f()},e.setDeviceAngles=(r,n,a,i)=>{let o=[3];BU(t.physicalViewNorth,t.physicalViewUp,o);let s=N7.mat4.identity(new Float64Array(16));N7.mat4.rotate(s,s,BM(r),t.physicalViewUp),N7.mat4.rotate(s,s,BM(n),o),N7.mat4.rotate(s,s,BM(a),t.physicalViewNorth),N7.mat4.rotate(s,s,BM(-i),t.physicalViewUp);let l=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),u=new Float64Array(t.physicalViewNorth);N7.vec3.transformMat4(l,l,s),N7.vec3.transformMat4(u,u,s),e.setDirectionOfProjection(l[0],l[1],l[2]),e.setViewUp(u[0],u[1],u[2]),e.modified()},e.setOrientationWXYZ=(t,r,n,a)=>{let i=N7.mat4.identity(new Float64Array(16));if(0!==t&&(0!==r||0!==n||0!==a)){let e=BM(t),o=N7.quat.create();N7.quat.setAxisAngle(o,[r,n,a],e),N7.mat4.fromQuat(i,o)}let o=new Float64Array(3);N7.vec3.transformMat4(o,[0,0,-1],i);let s=new Float64Array(3);N7.vec3.transformMat4(s,[0,1,0],i),e.setDirectionOfProjection(...o),e.setViewUp(...s),e.modified()},e.computeClippingRange=e=>{let r=null,n=null;r=t.viewPlaneNormal,n=t.position;let a=-r[0],i=-r[1],o=-r[2],s=-(a*n[0]+i*n[1]+o*n[2]),l=[a*e[0]+i*e[2]+o*e[4]+s,1e-18];for(let t=0;t<2;t++)for(let r=0;r<2;r++)for(let n=0;n<2;n++){let u=a*e[n]+i*e[2+r]+o*e[4+t]+s;l[0]=u<l[0]?u:l[0],l[1]=u>l[1]?u:l[1]}return l}}(e,t)}var zh=Bh.newInstance(zd,"vtkCamera");function zp(e){let[t,r]=e;return N7.mat4.fromScaling(N7.mat4.create(),[t,r,1])}let zf=e=>{let[t,r]=e;if(V_(t,r))return[1,1];let n=Math.min(t,r);return[Math.round(t/n*1e10)/1e10,Math.round(r/n*1e10)/1e10]},zm={aspectRatio:[1,1]};function zg(e,t,r={}){let n;Object.assign(t,zm,r),zd(e,t,r),Bh.setGet(e,t,["aspectRatio"]),t.classHierarchy.push("extendedVtkCamera"),n=e.getProjectionMatrix,e.getProjectionMatrix=(e,r,a)=>{let i=n(e,r,a),[o,s]=zf(t.aspectRatio);if(1!==o||1!==s){let e=zp([o,s]);N7.mat4.multiply(i,e,i)}return i},e.getAspectRatio=()=>t.aspectRatio,e.setAspectRatio=e=>{t.aspectRatio=e}}let zy=Bh.newInstance(zg,"extendedVtkCamera"),zv={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4};var zb={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:zv,Scale:{LINEAR:0,LOG10:1}},zw={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:{DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5}};let{ScalarMappingTarget:zx,Scale:zC,VectorMode:zk}=zb,{VtkDataTypes:zM}=UX,{ColorMode:zS}=zw,{vtkErrorMacro:zE}=Bh;function zP(e){return e}function zI(e){return Math.floor(255*e+.5)}let zT={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:zk.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1,scale:zC.LINEAR};function z_(e,t,r={}){Object.assign(t,zT,r),Bh.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],Bh.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),Bh.setArray(e,t,["mappingRange"],2),Bh.getArray(e,t,["mappingRange"]),t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=()=>e.setVectorMode(zk.MAGNITUDE),e.setVectorModeToComponent=()=>e.setVectorMode(zk.COMPONENT),e.setVectorModeToRGBColors=()=>e.setVectorMode(zk.RGBCOLORS),e.build=()=>{},e.isOpaque=()=>!0,e.setAnnotations=(r,n)=>{if((!r||n)&&(r||!n)){if(r&&n&&r.length!==n.length)return void zE("Values and annotations do not have the same number of tuples so ignoring");if(t.annotationArray=[],n&&r){let e=n.length;for(let a=0;a<e;a++)t.annotationArray.push({value:r[a],annotation:String(n[a])})}e.updateAnnotatedValueMap(),e.modified()}},e.setAnnotation=(r,n)=>{let a=e.checkForAnnotatedValue(r),i=!1;return a>=0?t.annotationArray[a].annotation!==n&&(t.annotationArray[a].annotation=n,i=!0):(t.annotationArray.push({value:r,annotation:n}),a=t.annotationArray.length-1,i=!0),i&&(e.updateAnnotatedValueMap(),e.modified()),a},e.getNumberOfAnnotatedValues=()=>t.annotationArray.length,e.getAnnotatedValue=e=>e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value,e.getAnnotation=e=>void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation,e.getAnnotatedValueIndex=r=>t.annotationArray.length?e.checkForAnnotatedValue(r):-1,e.removeAnnotation=r=>{let n=e.checkForAnnotatedValue(r),a=n>=0;return a&&(t.annotationArray.splice(n,1),e.updateAnnotatedValueMap(),e.modified()),a},e.resetAnnotations=()=>{t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=(r,n)=>{if(t.indexedLookup){let t=e.getAnnotatedValueIndex(r);e.getIndexedColor(t,n)}else e.getColor(parseFloat(r),n),n[3]=1},e.checkForAnnotatedValue=t=>e.getAnnotatedValueIndexInternal(t),e.getAnnotatedValueIndexInternal=e=>{if(void 0!==t.annotatedValueMap[e]){let r=t.annotationArray.length;return t.annotatedValueMap[e]%r}return -1},e.getIndexedColor=(e,t)=>{t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=()=>{t.annotatedValueMap=[];let e=t.annotationArray.length;for(let r=0;r<e;r++)t.annotatedValueMap[t.annotationArray[r].value]=r},e.mapScalars=(t,r,n)=>{let a=t.getNumberOfComponents(),i=null;if(r===zS.DEFAULT&&(t.getDataType()===zM.UNSIGNED_CHAR||t.getDataType()===zM.UNSIGNED_CHAR_CLAMPED)||r===zS.DIRECT_SCALARS&&t)i=e.convertToRGBA(t,a,t.getNumberOfTuples());else{let r={type:"vtkDataArray",name:"temp",numberOfComponents:4,dataType:zM.UNSIGNED_CHAR},o=Bh.newTypedArray(r.dataType,4*t.getNumberOfTuples());r.values=o,r.size=o.length,i=UX.newInstance(r);let s=n;s<0&&a>1?e.mapVectorsThroughTable(t,i,zx.RGBA,-1,-1):(s<0&&(s=0),s>=a&&(s=a-1),e.mapScalarsThroughTable(t,i,zx.RGBA,s))}return i},e.mapVectorsToMagnitude=(e,t,r)=>{let n=e.getNumberOfTuples(),a=e.getNumberOfComponents(),i=t.getData(),o=e.getData();for(let e=0;e<n;e++){let t=0;for(let n=0;n<r;n++)t+=o[e*a+n]*o[e*a+n];i[e]=Math.sqrt(t)}},e.mapVectorsThroughTable=(t,r,n,a,i)=>{let o=e.getVectorMode(),s=i,l=a,u=t.getNumberOfComponents();o===zk.COMPONENT?(-1===l&&(l=e.getVectorComponent()),l<0&&(l=0),l>=u&&(l=u-1)):(-1===s&&(s=e.getVectorSize()),s<=0?(l=0,s=u):(l<0&&(l=0),l>=u&&(l=u-1),l+s>u&&(s=u-l)),o===zk.MAGNITUDE&&(1===u||1===s)&&(o=zk.COMPONENT));let c=0;switch(l>0&&(c=l),o){case zk.COMPONENT:e.mapScalarsThroughTable(t,r,n,c);break;case zk.RGBCOLORS:break;case zk.MAGNITUDE:default:{let a=UX.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,a,s),e.mapScalarsThroughTable(a,r,n,0)}}},e.luminanceToRGBA=(e,t,r,n)=>{let a=n(r),i=t.getData(),o=e.getData(),s=i.length,l=0;for(let e=0;e<s;e+=1){let t=n(i[e]);o[4*l]=t,o[4*l+1]=t,o[4*l+2]=t,o[4*l+3]=a,l++}},e.luminanceAlphaToRGBA=(e,t,r,n)=>{let a=t.getData(),i=e.getData(),o=a.length,s=0;for(let e=0;e<o;e+=2){let t=n(a[e]);i[s]=t,i[s+1]=t,i[s+2]=t,i[s+3]=n(a[e+1])*r,s+=4}},e.rGBToRGBA=(e,t,r,n)=>{let a=zI(r),i=t.getData(),o=e.getData(),s=i.length,l=0;for(let e=0;e<s;e+=3)o[4*l]=n(i[e]),o[4*l+1]=n(i[e+1]),o[4*l+2]=n(i[e+2]),o[4*l+3]=a,l++},e.rGBAToRGBA=(e,t,r,n)=>{let a=t.getData(),i=e.getData(),o=a.length,s=0;for(let e=0;e<o;e+=4)i[4*s]=n(a[e]),i[4*s+1]=n(a[e+1]),i[4*s+2]=n(a[e+2]),i[4*s+3]=n(a[e+3])*r,s++},e.convertToRGBA=(r,n,a)=>{let{alpha:i}=t;if(4===n&&i>=1&&r.getDataType()===zM.UNSIGNED_CHAR)return r;let o=UX.newInstance({numberOfComponents:4,empty:!0,size:4*a,dataType:zM.UNSIGNED_CHAR});if(a<=0)return o;i=(i=i>0?i:0)<1?i:1;let s=zP;switch((r.getDataType()===zM.FLOAT||r.getDataType()===zM.DOUBLE)&&(s=zI),n){case 1:e.luminanceToRGBA(o,r,i,s);break;case 2:e.luminanceAlphaToRGBA(o,r,s);break;case 3:e.rGBToRGBA(o,r,i,s);break;case 4:e.rGBAToRGBA(o,r,i,s);break;default:return zE("Cannot convert colors"),null}return o},e.usingLogScale=()=>!1,e.getNumberOfAvailableColors=()=>0x1000000,e.setRange=(t,r)=>e.setMappingRange(t,r),e.getRange=()=>e.getMappingRange(),e.areScalarsOpaque=(r,n,a)=>{if(!r)return e.isOpaque();let i=r.getNumberOfComponents();return(n!==zS.DEFAULT||r.getDataType()!==zM.UNSIGNED_CHAR)&&n!==zS.DIRECT_SCALARS||(3===i||1===i?t.alpha>=1:255===r.getRange(i-1)[0])}}var zD={newInstance:Bh.newInstance(z_,"vtkScalarsToColors"),extend:z_,...zb},zA={ColorSpace:{RGB:0,HSV:1,LAB:2,DIVERGING:3},Scale:{LINEAR:0,LOG10:1}};let{ColorSpace:zO,Scale:zR}=zA,{ScalarMappingTarget:zN}=zD,{vtkDebugMacro:zL,vtkErrorMacro:zV,vtkWarningMacro:zF}=Bh;function zj(e,t){let r=e[0],n=e[1],a=e[2],i=Math.sqrt(r*r+n*n+a*a),o=i>.001?Math.acos(r/i):0,s=o>.001?Math.atan2(a,n):0;t[0]=i,t[1]=o,t[2]=s}function zB(e,t){if(e[0]>=t-.1)return e[2];let r=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+r:e[2]-r}function zW(e,t,r,n){let a,i,o,s=[],l=[];Wd(t,s),Wd(r,l);let u=[],c=[];zj(s,u),zj(l,c);let d=e;if(u[1]>.05&&c[1]>.05&&function(e,t){let r=e-t;for(r<0&&(r=-r);r>=2*Math.PI;)r-=2*Math.PI;return r>Math.PI&&(r=2*Math.PI-r),r}(u[2],c[2])>.33*Math.PI){let t=Math.max(u[0],c[0]);t=Math.max(88,t),e<.5?(c[0]=t,c[1]=0,c[2]=0,d*=2):(u[0]=t,u[1]=0,u[2]=0,d=2*d-1)}u[1]<.05&&c[1]>.05?u[2]=zB(c,u[0]):c[1]<.05&&u[1]>.05&&(c[2]=zB(u,c[0]));let h=[];h[0]=(1-d)*u[0]+d*c[0],h[1]=(1-d)*u[1]+d*c[1],h[2]=(1-d)*u[2]+d*c[2];let p=[];a=h[0],i=h[1],o=h[2],p[0]=a*Math.cos(i),p[1]=a*Math.sin(i)*Math.cos(o),p[2]=a*Math.sin(i)*Math.sin(o),Wh(p,n)}let zU={clamping:!0,colorSpace:zO.RGB,hSVWrap:!0,scale:zR.LINEAR,nanColor:null,belowRangeColor:null,aboveRangeColor:null,useAboveRangeColor:!1,useBelowRangeColor:!1,allowDuplicateScalars:!1,table:null,tableSize:0,buildTime:null,nodes:null,discretize:!1,numberOfValues:256};function zz(e,t,r={}){Object.assign(t,zU,r),zD.extend(e,t,r),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},Bh.obj(t.buildTime),Bh.get(e,t,["buildTime","mappingRange"]),Bh.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","discretize","numberOfValues",{type:"enum",name:"colorSpace",enum:zO},{type:"enum",name:"scale",enum:zR}]),Bh.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),Bh.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=()=>t.nodes.length,e.addRGBPoint=(t,r,n,a)=>e.addRGBPointLong(t,r,n,a,.5,0),e.addRGBPointLong=(r,n,a,i,o=.5,s=0)=>{if(o<0||o>1)return zV("Midpoint outside range [0.0, 1.0]"),-1;if(s<0||s>1)return zV("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(r),t.nodes.push({x:r,r:n,g:a,b:i,midpoint:o,sharpness:s}),e.sortAndUpdateRange();let l=0;for(;l<t.nodes.length&&t.nodes[l].x!==r;l++);return l<t.nodes.length?l:-1},e.addHSVPoint=(t,r,n,a)=>e.addHSVPointLong(t,r,n,a,.5,0),e.addHSVPointLong=(t,r,n,a,i=.5,o=0)=>{let s=[];return Wo([r,n,a],s),e.addRGBPoint(t,s[0],s[1],s[2],i,o)},e.setNodes=r=>{if(t.nodes!==r){let n=JSON.stringify(t.nodes);t.nodes=r;let a=JSON.stringify(t.nodes);if(e.sortAndUpdateRange()||n!==a)return e.modified(),!0}return!1},e.sortAndUpdateRange=()=>{let r=JSON.stringify(t.nodes);t.nodes.sort((e,t)=>e.x-t.x);let n=JSON.stringify(t.nodes),a=e.updateRange();return a||r===n?a:(e.modified(),!0)},e.updateRange=()=>{let r=[2];r[0]=t.mappingRange[0],r[1]=t.mappingRange[1];let n=t.nodes.length;return n?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[n-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(r[0]!==t.mappingRange[0]||r[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=r=>{let n=0;for(;n<t.nodes.length&&t.nodes[n].x!==r;n++);let a=n;if(n>=t.nodes.length)return -1;let i=!1;return t.nodes.splice(n,1),(0===n||n===t.nodes.length)&&(i=e.updateRange()),i||e.modified(),a},e.movePoint=(r,n)=>{if(r!==n){e.removePoint(n);for(let a=0;a<t.nodes.length;a++)if(t.nodes[a].x===r){t.nodes[a].x=n,e.sortAndUpdateRange();break}}},e.removeAllPoints=()=>{t.nodes=[],e.sortAndUpdateRange()},e.addRGBSegment=(r,n,a,i,o,s,l,u)=>{e.sortAndUpdateRange();for(let e=0;e<t.nodes.length;)t.nodes[e].x>=r&&t.nodes[e].x<=o?t.nodes.splice(e,1):e++;e.addRGBPointLong(r,n,a,i,.5,0),e.addRGBPointLong(o,s,l,u,.5,0),e.modified()},e.addHSVSegment=(t,r,n,a,i,o,s,l)=>{let u=[],c=[];Wo([r,n,a],u),Wo([o,s,l],c),e.addRGBSegment(t,u[0],u[1],u[2],i,c[0],c[1],c[2])},e.mapValue=t=>{let r=[];return e.getColor(t,r),[Math.floor(255*r[0]+.5),Math.floor(255*r[1]+.5),Math.floor(255*r[2]+.5),255]},e.getColor=(r,n)=>{if(t.indexedLookup){let t=e.getSize(),a=e.getAnnotatedValueIndexInternal(r);if(a<0||0===t){let t=e.getNanColorByReference();n[0]=t[0],n[1]=t[1],n[2]=t[2]}else{let r=[];e.getNodeValue(a%t,r),n[0]=r[1],n[1]=r[2],n[2]=r[3]}return}e.getTable(r,r,1,n)},e.getRedValue=t=>{let r=[];return e.getColor(t,r),r[0]},e.getGreenValue=t=>{let r=[];return e.getColor(t,r),r[1]},e.getBlueValue=t=>{let r=[];return e.getColor(t,r),r[2]},e.logScaleEnabled=()=>t.scale===zR.LOG10,e.usingLogScale=()=>e.logScaleEnabled()&&t.mappingRange[0]>0,e.getTable=(r,n,a,i)=>{let o=e.usingLogScale(),s=o?Math.log10(Number(r)):Number(r),l=o?Math.log10(Number(n)):Number(n);if(Wx(s)||Wx(l)){for(let e=0;e<a;e++)i[3*e+0]=t.nanColor[0],i[3*e+1]=t.nanColor[1],i[3*e+2]=t.nanColor[2];return}let u=0,c=t.nodes.length,d=0,h=0,p=0;0!==c&&(d=t.nodes[c-1].r,h=t.nodes[c-1].g,p=t.nodes[c-1].b);let f=0,m=0,g=0,y=[0,0,0],v=[0,0,0],b=0,w=0,x=[],C=t.mappingRange;o&&(C=[Math.log10(t.mappingRange[0]),Math.log10(t.mappingRange[1])]);for(let r=0;r<a;r++){let n=3*r;if(f=a>1?s+r/(a-1)*(l-s):.5*(s+l),t.discretize){let e=C;if(f>=e[0]&&f<=e[1]){let r=t.numberOfValues,n=e[1]-e[0];if(r<=1)f=e[0]+n/2;else{let t=BP(r*((f-e[0])/n));f=e[0]+t/(r-1)*n}}}for(;u<c&&f>t.nodes[u].x;)++u<c&&(m=t.nodes[u-1].x,g=t.nodes[u].x,y[0]=t.nodes[u-1].r,v[0]=t.nodes[u].r,y[1]=t.nodes[u-1].g,v[1]=t.nodes[u].g,y[2]=t.nodes[u-1].b,v[2]=t.nodes[u].b,b=t.nodes[u-1].midpoint,w=t.nodes[u-1].sharpness,b<1e-5&&(b=1e-5),b>.99999&&(b=.99999));if(f>C[1])i[n]=0,i[n+1]=0,i[n+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(i[n]=t.aboveRangeColor[0],i[n+1]=t.aboveRangeColor[1],i[n+2]=t.aboveRangeColor[2]):(i[n]=d,i[n+1]=h,i[n+2]=p));else if(f<C[0]||Wb(f)&&f<0)i[n]=0,i[n+1]=0,i[n+2]=0,t.clamping&&(e.getUseBelowRangeColor()?(i[n]=t.belowRangeColor[0],i[n+1]=t.belowRangeColor[1],i[n+2]=t.belowRangeColor[2]):c>0&&(i[n]=t.nodes[0].r,i[n+1]=t.nodes[0].g,i[n+2]=t.nodes[0].b));else if(0===u&&(1e-6>Math.abs(f-s)||t.discretize))c>0?(i[n]=t.nodes[0].r,i[n+1]=t.nodes[0].g,i[n+2]=t.nodes[0].b):(i[n]=0,i[n+1]=0,i[n+2]=0);else{let e,r=0;if(r=(r=(f-m)/(g-m))<b?.5*r/b:.5+.5*(r-b)/(1-b),w>.99)if(r<.5){i[n]=y[0],i[n+1]=y[1],i[n+2]=y[2];continue}else{i[n]=v[0],i[n+1]=v[1],i[n+2]=v[2];continue}if(w<.01){if(t.colorSpace===zO.RGB)i[n]=(1-r)*y[0]+r*v[0],i[n+1]=(1-r)*y[1]+r*v[1],i[n+2]=(1-r)*y[2]+r*v[2];else if(t.colorSpace===zO.HSV){let e=[],a=[];Wi(y,e),Wi(v,a),t.hSVWrap&&(e[0]-a[0]>.5||a[0]-e[0]>.5)&&(e[0]>a[0]?e[0]-=1:a[0]-=1);let o=[];o[0]=(1-r)*e[0]+r*a[0],o[0]<0&&(o[0]+=1),o[1]=(1-r)*e[1]+r*a[1],o[2]=(1-r)*e[2]+r*a[2],Wo(o,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]}else if(t.colorSpace===zO.LAB){let e=[],t=[];Wd(y,e),Wd(v,t);let a=[];a[0]=(1-r)*e[0]+r*t[0],a[1]=(1-r)*e[1]+r*t[1],a[2]=(1-r)*e[2]+r*t[2],Wh(a,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]}else t.colorSpace===zO.DIVERGING?(zW(r,y,v,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]):zV("ColorSpace set to invalid value.",t.colorSpace);continue}r<.5?r=.5*(2*r)**(1+10*w):r>.5&&(r=1-.5*((1-r)*2)**(1+10*w));let a=r*r,o=a*r,s=2*o-3*a+1,l=-2*o+3*a,u=o-2*a+r,c=o-a;if(t.colorSpace===zO.RGB)for(let t=0;t<3;t++)e=(1-w)*(v[t]-y[t]),i[n+t]=s*y[t]+l*v[t]+u*e+c*e;else if(t.colorSpace===zO.HSV){let r=[],a=[];Wi(y,r),Wi(v,a),t.hSVWrap&&(r[0]-a[0]>.5||a[0]-r[0]>.5)&&(r[0]>a[0]?r[0]-=1:a[0]-=1);let o=[];for(let t=0;t<3;t++)e=(1-w)*(a[t]-r[t]),o[t]=s*r[t]+l*a[t]+u*e+c*e,0===t&&o[t]<0&&(o[t]+=1);Wo(o,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]}else if(t.colorSpace===zO.LAB){let t=[],r=[];Wd(y,t),Wd(v,r);let a=[];for(let n=0;n<3;n++)e=(1-w)*(r[n]-t[n]),a[n]=s*t[n]+l*r[n]+u*e+c*e;Wh(a,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]}else t.colorSpace===zO.DIVERGING?(zW(r,y,v,x),i[n]=x[0],i[n+1]=x[1],i[n+2]=x[2]):zV("ColorSpace set to invalid value.");for(let e=0;e<3;e++)i[n+e]=i[n+e]<0?0:i[n+e],i[n+e]=i[n+e]>1?1:i[n+e]}}},e.getUint8Table=(r,n,a,i=!1)=>{if(e.getMTime()<=t.buildTime&&t.tableSize===a&&t.tableWithAlpha!==i)return t.table;if(0===t.nodes.length)return zV("Attempting to lookup a value with no points in the function"),t.table;let o=i?4:3;(t.tableSize!==a||t.tableWithAlpha!==i)&&(t.table=new Uint8Array(a*o),t.tableSize=a,t.tableWithAlpha=i);let s=[];e.getTable(r,n,a,s);for(let e=0;e<a;e++)t.table[e*o+0]=Math.floor(255*s[3*e+0]+.5),t.table[e*o+1]=Math.floor(255*s[3*e+1]+.5),t.table[e*o+2]=Math.floor(255*s[3*e+2]+.5),i&&(t.table[e*o+3]=255);return t.buildTime.modified(),t.table},e.buildFunctionFromArray=r=>{e.removeAllPoints();let n=r.getNumberOfComponents();for(let e=0;e<r.getNumberOfTuples();e++)switch(n){case 3:t.nodes.push({x:e,r:r.getComponent(e,0),g:r.getComponent(e,1),b:r.getComponent(e,2),midpoint:.5,sharpness:0});break;case 4:t.nodes.push({x:r.getComponent(e,0),r:r.getComponent(e,1),g:r.getComponent(e,2),b:r.getComponent(e,3),midpoint:.5,sharpness:0});break;case 5:t.nodes.push({x:e,r:r.getComponent(e,0),g:r.getComponent(e,1),b:r.getComponent(e,2),midpoint:r.getComponent(e,4),sharpness:r.getComponent(e,5)});break;case 6:t.nodes.push({x:r.getComponent(e,0),r:r.getComponent(e,1),g:r.getComponent(e,2),b:r.getComponent(e,3),midpoint:r.getComponent(e,4),sharpness:r.getComponent(e,5)})}e.sortAndUpdateRange()},e.buildFunctionFromTable=(r,n,a,i)=>{let o=0;e.removeAllPoints(),a>1&&(o=(n-r)/(a-1));for(let e=0;e<a;e++){let n={x:r+o*e,r:i[3*e],g:i[3*e+1],b:i[3*e+2],sharpness:0,midpoint:.5};t.nodes.push(n)}e.sortAndUpdateRange()},e.getNodeValue=(e,r)=>e<0||e>=t.nodes.length?(zV("Index out of range!"),-1):(r[0]=t.nodes[e].x,r[1]=t.nodes[e].r,r[2]=t.nodes[e].g,r[3]=t.nodes[e].b,r[4]=t.nodes[e].midpoint,r[5]=t.nodes[e].sharpness,1),e.setNodeValue=(r,n)=>{if(r<0||r>=t.nodes.length)return zV("Index out of range!"),-1;let a=t.nodes[r].x;return t.nodes[r].x=n[0],t.nodes[r].r=n[1],t.nodes[r].g=n[2],t.nodes[r].b=n[3],t.nodes[r].midpoint=n[4],t.nodes[r].sharpness=n[5],a!==n[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=()=>t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:Math.max(4094,t.nodes?.length??0),e.getIndexedColor=(t,r)=>{let n=e.getSize();if(n>0&&t>=0){let a=[];e.getNodeValue(t%n,a);for(let e=0;e<3;++e)r[e]=a[e+1];r[3]=1;return}let a=e.getNanColorByReference();r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=1},e.fillFromDataPointer=(t,r)=>{if(!(t<=0)&&r){e.removeAllPoints();for(let n=0;n<t;n++)e.addRGBPoint(r[4*n],r[4*n+1],r[4*n+2],r[4*n+3])}},e.setMappingRange=(r,n)=>{let a=[r,n],i=[r,n],o=e.getRange(),s=e.logScaleEnabled();if(o[1]===a[1]&&o[0]===a[0])return;if(a[1]===a[0])return void zV("attempt to set zero width color range");s&&(a[0]<=0?console.warn("attempt to set log scale color range with non-positive minimum"):(i[0]=Math.log10(a[0]),i[1]=Math.log10(a[1])));let l=(i[1]-i[0])/(o[1]-o[0]),u=i[0]-o[0]*l;for(let e=0;e<t.nodes.length;++e)t.nodes[e].x=t.nodes[e].x*l+u;t.mappingRange[0]=a[0],t.mappingRange[1]=a[1],e.modified()},e.adjustRange=r=>{let n=e.getRange(),a=[];n[0]<r[0]?e.getColor(r[0],a):e.getColor(n[0],a),e.addRGBPoint(r[0],a[0],a[1],a[2]),n[1]>r[1]?e.getColor(r[1],a):e.getColor(n[1],a),e.addRGBPoint(r[1],a[0],a[1],a[2]),e.sortAndUpdateRange();for(let e=0;e<t.nodes.length;)t.nodes[e].x>=r[0]&&t.nodes[e].x<=r[1]?t.nodes.splice(e,1):++e;return 1},e.estimateMinNumberOfSamples=(t,r)=>Math.ceil((r-t)/e.findMinimumXDistance()),e.findMinimumXDistance=()=>{if(t.nodes.length<2)return -1;let e=Number.MAX_VALUE;for(let r=0;r<t.nodes.length-1;r++){let n=t.nodes[r+1].x-t.nodes[r].x;n<e&&(e=n)}return e},e.mapScalarsThroughTable=(r,n,a,i)=>{0===e.getSize()?zL("Transfer Function Has No Points!"):t.indexedLookup?e.mapDataIndexed(r,n,a,i):e.mapData(r,n,a,i)},e.mapData=(t,r,n,a)=>{if(0===e.getSize())return void zF("Transfer Function Has No Points!");let i=Math.floor(255*e.getAlpha()+.5),o=t.getNumberOfTuples(),s=t.getNumberOfComponents(),l=r.getData(),u=t.getData(),c=[];if(n===zN.RGBA)for(let t=0;t<o;t++){let r=u[t*s+a];e.getColor(r,c),l[4*t]=Math.floor(255*c[0]+.5),l[4*t+1]=Math.floor(255*c[1]+.5),l[4*t+2]=Math.floor(255*c[2]+.5),l[4*t+3]=i}if(n===zN.RGB)for(let t=0;t<o;t++){let r=u[t*s+a];e.getColor(r,c),l[3*t]=Math.floor(255*c[0]+.5),l[3*t+1]=Math.floor(255*c[1]+.5),l[3*t+2]=Math.floor(255*c[2]+.5)}if(n===zN.LUMINANCE)for(let t=0;t<o;t++){let r=u[t*s+a];e.getColor(r,c),l[t]=Math.floor(76.5*c[0]+150.45*c[1]+28.05*c[2]+.5)}if(n===zN.LUMINANCE_ALPHA)for(let t=0;t<o;t++){let r=u[t*s+a];e.getColor(r,c),l[2*t]=Math.floor(76.5*c[0]+150.45*c[1]+28.05*c[2]+.5),l[2*t+1]=i}},e.applyColorMap=r=>{let n=JSON.stringify(t.colorSpace);r.ColorSpace&&(t.colorSpace=zO[r.ColorSpace.toUpperCase()],void 0===t.colorSpace&&(zV(`ColorSpace ${r.ColorSpace} not supported, using RGB instead`),t.colorSpace=zO.RGB));let a=n!==JSON.stringify(t.colorSpace),i=a||JSON.stringify(t.nanColor);if(r.NanColor)for(t.nanColor=[].concat(r.NanColor);t.nanColor.length<4;)t.nanColor.push(1);let o=(a=a||i!==JSON.stringify(t.nanColor))||JSON.stringify(t.nodes);if(r.RGBPoints){let e=r.RGBPoints.length;t.nodes=[];for(let n=0;n<e;n+=4)t.nodes.push({x:r.RGBPoints[n],r:r.RGBPoints[n+1],g:r.RGBPoints[n+2],b:r.RGBPoints[n+3],midpoint:.5,sharpness:0})}let s=e.sortAndUpdateRange(),l=!s&&(a||o!==JSON.stringify(t.nodes));return l&&e.modified(),s||l}}var zH={newInstance:Bh.newInstance(zz,"vtkColorTransferFunction"),extend:zz,...zA},zG={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}};let zq={clippingPlanes:[]};var z$=function(e,t,r={}){Object.assign(t,zq,r),Bh.obj(e,t),Bh.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),t.classHierarchy.push("vtkAbstractMapper"),e.update=()=>{e.getInputData()},e.addClippingPlane=r=>!!r.isA("vtkPlane")&&!t.clippingPlanes.includes(r)&&(t.clippingPlanes.push(r),e.modified(),!0),e.getNumberOfClippingPlanes=()=>t.clippingPlanes.length,e.removeAllClippingPlanes=()=>0!==t.clippingPlanes.length&&(t.clippingPlanes.length=0,e.modified(),!0),e.removeClippingPlane=r=>{let n=t.clippingPlanes.indexOf(r);return -1!==n&&(t.clippingPlanes.splice(n,1),e.modified(),!0)},e.getClippingPlanes=()=>t.clippingPlanes,e.setClippingPlanes=t=>{if(t)if(Array.isArray(t)){let r=t.length;for(let n=0;n<r&&n<6;n++)e.addClippingPlane(t[n])}else e.addClippingPlane(t)},e.getClippingPlaneInDataCoords=(e,r,n)=>{let a=t.clippingPlanes;if(a){let t=a.length;if(r>=0&&r<t){let t=a[r],i=t.getNormal(),o=t.getOrigin(),s=i[0],l=i[1],u=i[2],c=-(s*o[0]+l*o[1]+u*o[2]);n[0]=s*e[0]+l*e[4]+u*e[8]+c*e[12],n[1]=s*e[1]+l*e[5]+u*e[9]+c*e[13],n[2]=s*e[2]+l*e[6]+u*e[10]+c*e[14],n[3]=s*e[3]+l*e[7]+u*e[11]+c*e[15];return}}Bh.vtkErrorMacro(`Clipping plane index ${r} is out of range.`)}},zK=function(e,t,r={}){let n,a;Object.assign(t,{bounds:[...UL],center:[0,0,0],viewSpecificProperties:{},...r}),z$(e,t,r),Bh.setGet(e,t,["viewSpecificProperties"]),Bh.getArray(e,t,["bounds"],6),e.computeBounds=()=>{Bh.vtkErrorMacro("vtkAbstractMapper3D.computeBounds - NOT IMPLEMENTED")},n=e.getBounds,e.getBounds=()=>(e.computeBounds(),n()),a=e.getBoundsByReference,e.getBoundsByReference=()=>(e.computeBounds(),a()),e.getCenter=()=>{let r=e.getBoundsByReference();return t.center=Ug(r)?Uk(r):null,t.center?.slice()},e.getLength=()=>{let t=e.getBoundsByReference();return UE(t)}};let zY={slice:0,customDisplayExtent:[0,0,0,0,0,0],useCustomExtents:!1,backgroundColor:[0,0,0,1],colorTextureWidth:1024,opacityTextureWidth:1024,labelOutlineTextureWidth:1024};var zX=function(e,t,r={}){Object.assign(t,zY,r),zK(e,t,r),Bh.setGet(e,t,["slice","useCustomExtents","colorTextureWidth","opacityTextureWidth","labelOutlineTextureWidth"]),Bh.setGetArray(e,t,["customDisplayExtent"],6),Bh.setGetArray(e,t,["backgroundColor"],4),t.classHierarchy.push("vtkAbstractImageMapper"),e.getIsOpaque=()=>!0,e.getCurrentImage=()=>null,e.getBoundsForSlice=()=>(Bh.vtkErrorMacro("vtkAbstractImageMapper.getBoundsForSlice - NOT IMPLEMENTED"),WC())};function zZ(e,t,r){let n=r.getCurrentImage(),a=n.getExtent(),i=[a[0],a[2],a[4]],{ijkMode:o}=r.getClosestIJKAxis(),s=r.isA("vtkImageArrayMapper")?r.getSubSlice():r.getSlice();o!==r.getSlicingMode()&&(s=r.getSliceAtPosition(s)),i[o]+=s;let l=[0,0,0];n.indexToWorld(i,l),i[o]+=1;let u=[0,0,0];n.indexToWorld(i,u),u[0]-=l[0],u[1]-=l[1],u[2]-=l[2],N7.vec3.normalize(u,u);let c=Wj.intersectWithLine(e,t,l,u);if(c.intersection){let e=c.x,t=[0,0,0];return n.worldToIndex(e,t),{t:c.t,absoluteIJK:t}}return null}let zJ={Off:0,PolygonOffset:1},zQ=zJ.PolygonOffset,z1=zJ.Off,z0=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function z2(e=0){let t=z1===e;return z1=e,t}var z5={Resolve:zJ,getResolveCoincidentTopologyAsString:function(){return z0[z1]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return zQ},getResolveCoincidentTopology:function(){return z1},setResolveCoincidentTopology:z2,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){let t=zQ===e;return zQ=e,t},setResolveCoincidentTopologyToDefault:function(){return z2(zJ.Off)},setResolveCoincidentTopologyToOff:function(){return z2(zJ.Off)},setResolveCoincidentTopologyToPolygonOffset:function(){return z2(zJ.PolygonOffset)}};function z3(e,t,r){r.forEach(r=>{e[`get${r.method}`]=()=>t[r.key],e[`set${r.method}`]=Bh.objectSetterMap.object(e,t,{name:r.key,params:["factor","offset"]})})}let z4=["Polygon","Line","Point"],z8={modified:()=>void 0};z3(z8,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},z4.map(e=>({key:e,method:`ResolveCoincidentTopology${e}OffsetParameters`})));var z6={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),Bh.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(z5).forEach(t=>{e[t]=z5[t]}),Object.keys(z8).filter(e=>"modified"!==e).forEach(t=>{e[t]=z8[t]}),z3(e,t.topologyOffset,z4.map(e=>({key:e,method:`RelativeCoincidentTopology${e}OffsetParameters`}))),e.getCoincidentTopologyPolygonOffsetParameters=()=>{let t=z8.getResolveCoincidentTopologyPolygonOffsetParameters(),r=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+r.factor,offset:t.offset+r.offset}},e.getCoincidentTopologyLineOffsetParameters=()=>{let t=z8.getResolveCoincidentTopologyLineOffsetParameters(),r=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+r.factor,offset:t.offset+r.offset}},e.getCoincidentTopologyPointOffsetParameter=()=>{let t=z8.getResolveCoincidentTopologyPointOffsetParameters(),r=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+r.factor,offset:t.offset+r.offset}}},staticOffsetAPI:z8,otherStaticMethods:z5,CATEGORIES:z4,Resolve:zJ};let{staticOffsetAPI:z9,otherStaticMethods:z7}=z6,{SlicingMode:He}=zG,Ht={slicingMode:He.NONE,closestIJKAxis:{ijkMode:He.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1,preferSizeOverAccuracy:!1};function Hr(e,t,r={}){Object.assign(t,Ht,r),zX(e,t,r),Bh.get(e,t,["slicingMode"]),Bh.setGet(e,t,["closestIJKAxis","renderToRectangle","sliceAtFocalPoint","preferSizeOverAccuracy"]),z6.implementCoincidentTopologyMethods(e,t);var n=t;function a(){let t;switch(n.slicingMode){case He.X:t=0;break;case He.Y:t=1;break;case He.Z:t=2;break;default:n.closestIJKAxis={ijkMode:n.slicingMode,flip:!1};return}let r=Wk(e.getCurrentImage().getDirection()),a=0;for(;a<3&&0===r[t+3*a];++a);let i=r[t+3*a]<0;n.closestIJKAxis={ijkMode:a,flip:i}}n.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=t=>{let r,a=e.getCurrentImage();if(3===t.length)r=t;else if(Number.isFinite(t)){let e=a.getBounds();switch(n.slicingMode){case He.X:r=[t,(e[3]+e[2])/2,(e[5]+e[4])/2];break;case He.Y:r=[(e[1]+e[0])/2,t,(e[5]+e[4])/2];break;case He.Z:r=[(e[1]+e[0])/2,(e[3]+e[2])/2,t]}}let i=[0,0,0];a.worldToIndex(r,i);let o=a.getExtent(),{ijkMode:s}=e.getClosestIJKAxis(),l=0;switch(s){case He.I:l=Wm(i[0],o[0],o[1]);break;case He.J:l=Wm(i[1],o[2],o[3]);break;case He.K:l=Wm(i[2],o[4],o[5]);break;default:return 0}return l},e.setSliceFromCamera=t=>{let r=t.getFocalPoint();switch(n.slicingMode){case He.I:case He.J:case He.K:{let t=e.getSliceAtPosition(r);e.setSlice(t)}break;case He.X:e.setSlice(r[0]);break;case He.Y:e.setSlice(r[1]);break;case He.Z:e.setSlice(r[2])}},e.setXSlice=t=>{e.setSlicingMode(He.X),e.setSlice(t)},e.setYSlice=t=>{e.setSlicingMode(He.Y),e.setSlice(t)},e.setZSlice=t=>{e.setSlicingMode(He.Z),e.setSlice(t)},e.setISlice=t=>{e.setSlicingMode(He.I),e.setSlice(t)},e.setJSlice=t=>{e.setSlicingMode(He.J),e.setSlice(t)},e.setKSlice=t=>{e.setSlicingMode(He.K),e.setSlice(t)},e.getSlicingModeNormal=()=>{let t=[0,0,0],r=e.getCurrentImage().getDirection();switch(n.slicingMode){case He.X:t[0]=1;break;case He.Y:t[1]=1;break;case He.Z:t[2]=1;break;case He.I:BX(r,[1,0,0],t);break;case He.J:BX(r,[0,1,0],t);break;case He.K:BX(r,[0,0,1],t)}return t},e.setSlicingMode=t=>{n.slicingMode!==t&&(n.slicingMode=t,e.getCurrentImage()&&a(),e.modified())},e.getClosestIJKAxis=()=>((void 0===n.closestIJKAxis||n.closestIJKAxis.ijkMode===He.NONE)&&e.getCurrentImage()&&a(),n.closestIJKAxis),e.computeBounds=()=>{let t=e.getCurrentImage();if(!t)return void Uv(n.bounds);if(!n.useCustomExtents)return void Uy(n.bounds,t.getBounds());let r=n.customDisplayExtent.slice(),{ijkMode:a}=e.getClosestIJKAxis(),i=n.slice;switch(a!==n.slicingMode&&(i=e.getSliceAtPosition(n.slice)),a){case He.I:r[0]=i,r[1]=i;break;case He.J:r[2]=i,r[3]=i;break;case He.K:r[4]=i,r[5]=i}Uy(n.bounds,t.extentToBounds(r))},e.getBoundsForSlice=(t=n.slice,r=0)=>{let a=e.getCurrentImage();if(!a)return WC();let i=a.getSpatialExtent(),{ijkMode:o}=e.getClosestIJKAxis(),s=t;switch(o!==n.slicingMode&&(s=e.getSliceAtPosition(t)),o){case He.I:i[0]=s-r,i[1]=s+r;break;case He.J:i[2]=s-r,i[3]=s+r;break;case He.K:i[4]=s-r,i[5]=s+r}return a.extentToBounds(i)},e.intersectWithLineForPointPicking=(t,r)=>(function(e,t,r){let n=zZ(e,t,r);if(n){let e=r.getCurrentImage().getExtent(),t=[Math.round(n.absoluteIJK[0]),Math.round(n.absoluteIJK[1]),Math.round(n.absoluteIJK[2])];return t[0]<e[0]||t[0]>e[1]||t[1]<e[2]||t[1]>e[3]||t[2]<e[4]||t[2]>e[5]?null:{t:n.t,ijk:t}}return null})(t,r,e),e.intersectWithLineForCellPicking=(t,r)=>(function(e,t,r){let n=zZ(e,t,r);if(n){let e=r.getCurrentImage().getExtent(),t=n.absoluteIJK,a=[Math.floor(t[0]),Math.floor(t[1]),Math.floor(t[2])];if(a[0]<e[0]||a[0]>e[1]-1||a[1]<e[2]||a[1]>e[3]-1||a[2]<e[4]||a[2]>(e[5]?e[5]-1:e[5]))return null;let i=[t[0]-a[0],t[1]-a[1],t[2]-a[2]];return{t:n.t,ijk:a,pCoords:i}}return null})(t,r,e),e.getCurrentImage=()=>e.getInputData()}var Hn={newInstance:Bh.newInstance(Hr,"vtkImageMapper"),extend:Hr,...z9,...z7,...zG},Ha={CoordinateSystem:{DISPLAY:0,WORLD:1}};let{CoordinateSystem:Hi}=Ha;function Ho(e){return()=>Bh.vtkErrorMacro(`vtkProp::${e} - NOT IMPLEMENTED`)}let Hs={allocatedRenderTime:10,coordinateSystem:Hi.WORLD,dragable:!0,estimatedRenderTime:0,paths:null,pickable:!0,renderTimeMultiplier:1,savedEstimatedRenderTime:0,textures:[],useBounds:!0,visibility:!0};function Hl(e,t,r={}){Object.assign(t,Hs,r),Bh.obj(e,t),Bh.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),Bh.setGet(e,t,["_parentProp","coordinateSystem","dragable","pickable","renderTimeMultiplier","useBounds","visibility"]),Bh.moveToProtected(e,t,["parentProp"]),t.classHierarchy.push("vtkProp"),e.getMTime=()=>{let e=t.mtime;for(let r=0;r<t.textures.length;++r){let n=t.textures[r].getMTime();n>e&&(e=n)}return e},e.processSelectorPixelBuffers=(e,t)=>{},e.getNestedProps=()=>null,e.getActors=()=>[],e.getActors2D=()=>[],e.getVolumes=()=>[],e.pick=Ho("pick"),e.hasKey=Ho("hasKey"),e.getNestedVisibility=()=>t.visibility&&(!t._parentProp||t._parentProp.getNestedVisibility()),e.getNestedPickable=()=>t.pickable&&(!t._parentProp||t._parentProp.getNestedPickable()),e.getNestedDragable=()=>t.dragable&&(!t._parentProp||t._parentProp.getNestedDragable()),e.getRedrawMTime=()=>t.mtime,e.setEstimatedRenderTime=e=>{t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=()=>{t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=e=>{t.estimatedRenderTime+=e},e.setAllocatedRenderTime=e=>{t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=()=>!1,e.getTextures=()=>t.textures,e.hasTexture=e=>-1!==t.textures.indexOf(e),e.addTexture=r=>{r&&!e.hasTexture(r)&&(t.textures=t.textures.concat(r),e.modified())},e.removeTexture=r=>{let n=t.textures.filter(e=>e!==r);t.textures.length!==n.length&&(t.textures=n,e.modified())},e.removeAllTextures=()=>{t.textures=[],e.modified()},e.setCoordinateSystemToWorld=()=>e.setCoordinateSystem(Hi.WORLD),e.setCoordinateSystemToDisplay=()=>e.setCoordinateSystem(Hi.DISPLAY)}var Hu={newInstance:Bh.newInstance(Hl,"vtkProp"),extend:Hl,...Ha};let Hc={bounds:[...UL],origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],properties:[],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function Hd(e,t,r={}){let n,a;Object.assign(t,Hc,r),Hu.extend(e,t,r),t.matrixMTime={},Bh.obj(t.matrixMTime),Bh.get(e,t,["isIdentity"]),Bh.getArray(e,t,["orientation"]),Bh.setGetArray(e,t,["origin","position","scale"],3),Bh.setGet(e,t,["properties"]),Bh.getArray(e,t,["bounds"],6),t.matrix=N7.mat4.identity(new Float64Array(16)),t.rotation=N7.mat4.identity(new Float64Array(16)),t.userMatrix=N7.mat4.identity(new Float64Array(16)),t.transform=null,t.classHierarchy.push("vtkProp3D"),e.addPosition=r=>{t.position=t.position.map((e,t)=>e+r[t]),e.modified()},e.getOrientationWXYZ=()=>{let e=N7.quat.create();N7.mat4.getRotation(e,t.rotation);let r=new Float64Array(3);return[BS(N7.quat.getAxisAngle(r,e)),r[0],r[1],r[2]]},e.getOrientationQuaternion=(e=[])=>N7.mat4.getRotation(e,t.rotation),e.rotateX=r=>{0!==r&&(N7.mat4.rotateX(t.rotation,t.rotation,BM(r)),e.modified())},e.rotateY=r=>{0!==r&&(N7.mat4.rotateY(t.rotation,t.rotation,BM(r)),e.modified())},e.rotateZ=r=>{0!==r&&(N7.mat4.rotateZ(t.rotation,t.rotation,BM(r)),e.modified())},e.rotateWXYZ=(r,n,a,i)=>{if(0===r||0===n&&0===a&&0===i)return;let o=BM(r),s=N7.quat.create();N7.quat.setAxisAngle(s,[n,a,i],o);let l=new Float64Array(16);N7.mat4.fromQuat(l,s),N7.mat4.multiply(t.rotation,t.rotation,l),e.modified()},e.rotateQuaternion=r=>{if(Math.abs(r[3])>=.999999)return;let n=N7.mat4.fromQuat(new Float64Array(16),r);N7.mat4.multiply(t.rotation,t.rotation,n),e.modified()},e.setOrientation=(r,n,a)=>(r!==t.orientation[0]||n!==t.orientation[1]||a!==t.orientation[2])&&(t.orientation=[r,n,a],N7.mat4.identity(t.rotation),e.rotateZ(a),e.rotateX(r),e.rotateY(n),e.modified(),!0),e.setOrientationFromQuaternion=r=>{let n=N7.mat4.create();return N7.mat4.fromQuat(n,r),!B1(n,t.rotation)&&(t.rotation=n,e.modified(),!0)},e.setUserMatrix=r=>!B1(t.userMatrix,r)&&(N7.mat4.copy(t.userMatrix,r),e.modified(),!0),e.getMatrix=()=>(e.computeMatrix(),t.matrix),e.computeMatrix=()=>{if(e.getMTime()>t.matrixMTime.getMTime()){N7.mat4.identity(t.matrix),t.userMatrix&&N7.mat4.multiply(t.matrix,t.matrix,t.userMatrix),N7.mat4.translate(t.matrix,t.matrix,t.origin),N7.mat4.translate(t.matrix,t.matrix,t.position),N7.mat4.multiply(t.matrix,t.matrix,t.rotation),N7.mat4.scale(t.matrix,t.matrix,t.scale),N7.mat4.translate(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),N7.mat4.transpose(t.matrix,t.matrix),t.isIdentity=!0;for(let e=0;e<4;++e)for(let r=0;r<4;++r)+(e===r)!==t.matrix[e+4*r]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.computeBounds=()=>{if(null===t.mapper)return void Uv(t.bounds);let r=t.mapper.getBounds();if(!r||6!==r.length||!Ug(r)){t.mapperBounds=r,Uv(t.bounds),t.boundsMTime.modified();return}if(!t.mapperBounds||!r.every((e,n)=>r[n]===t.mapperBounds[n])||e.getMTime()>t.boundsMTime.getMTime()){Bh.vtkDebugMacro("Recomputing bounds..."),t.mapperBounds=r,e.computeMatrix();let n=new Float64Array(16);N7.mat4.transpose(n,t.matrix),UO(r,n,t.bounds),t.boundsMTime.modified()}},n=e.getBounds,e.getBounds=()=>(e.computeBounds(),n()),a=e.getBoundsByReference,e.getBoundsByReference=()=>(e.computeBounds(),a()),e.getCenter=()=>Uk(e.getBoundsByReference()),e.getLength=()=>UM(e.getBoundsByReference()),e.getXRange=()=>UI(e.getBoundsByReference()),e.getYRange=()=>UT(e.getBoundsByReference()),e.getZRange=()=>U_(e.getBoundsByReference()),e.getUserMatrix=()=>t.userMatrix,e.onModified(function(){e.computeMatrix()}),e.getProperty=(r=0)=>(null==t.properties[r]&&(t.properties[r]=e.makeProperty?.()),t.properties[r]),e.getProperties=()=>(0===t.properties.length&&(t.properties[0]=e.makeProperty?.()),t.properties),e.setProperty=(e,r)=>{let[n,a]=Number.isInteger(e)?[e,r]:[0,e];return t.properties[n]!==a&&(t.properties[n]=a,!0)},e.getMTime=()=>{let e=t.mtime;return t.properties.forEach(t=>{if(null!==t){let r=t.getMTime();e=r>e?r:e}}),e}}Bh.newInstance(Hd,"vtkProp3D");let Hh={NEAREST:0,LINEAR:1},{InterpolationType:Hp}={InterpolationType:Hh},{vtkErrorMacro:Hf}=Bh;var Hm=Bh.newInstance(function(e,t,r={}){if(Object.assign(t,{independentComponents:!1,interpolationType:Hp.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1,useLookupTableScalarRange:!1,useLabelOutline:!1,labelOutlineThickness:[1],labelOutlineOpacity:1,updatedExtents:[],...r}),Bh.obj(e,t),!t.componentData){t.componentData=[];for(let e=0;e<4;e++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}Bh.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity","useLookupTableScalarRange","useLabelOutline","labelOutlineOpacity","updatedExtents"]),Bh.setGetArray(e,t,["labelOutlineThickness"]),t.classHierarchy.push("vtkImageProperty"),e.getMTime=()=>{let e,r=t.mtime;for(let n=0;n<4;n++)t.componentData[n].rGBTransferFunction&&(r=r>(e=t.componentData[n].rGBTransferFunction.getMTime())?r:e),t.componentData[n].piecewiseFunction&&(r=r>(e=t.componentData[n].piecewiseFunction.getMTime())?r:e);return r},e.setRGBTransferFunction=(r=0,n=null)=>{let a=r,i=n;return Number.isInteger(r)||(i=r,a=0),t.componentData[a].rGBTransferFunction!==i&&(t.componentData[a].rGBTransferFunction=i,e.modified(),!0)},e.getRGBTransferFunction=(e=0)=>t.componentData[e].rGBTransferFunction,e.setPiecewiseFunction=(r=0,n=null)=>{let a=r,i=n;return Number.isInteger(r)||(i=r,a=0),t.componentData[a].piecewiseFunction!==i&&(t.componentData[a].piecewiseFunction=i,e.modified(),!0)},e.getPiecewiseFunction=(e=0)=>t.componentData[e].piecewiseFunction,e.setScalarOpacity=(t=0,r=null)=>{let n=t,a=r;return Number.isInteger(t)||(a=t,n=0),e.setPiecewiseFunction(n,a)},e.getScalarOpacity=(t=0)=>e.getPiecewiseFunction(t),e.setComponentWeight=(r=0,n=1)=>{if(r<0||r>=4)return Hf("Invalid index"),!1;let a=Math.min(1,Math.max(0,n));return t.componentData[r].componentWeight!==a&&(t.componentData[r].componentWeight=a,e.modified(),!0)},e.getComponentWeight=(e=0)=>e<0||e>=4?(Hf("Invalid index"),0):t.componentData[e].componentWeight,e.setInterpolationTypeToNearest=()=>e.setInterpolationType(Hp.NEAREST),e.setInterpolationTypeToLinear=()=>e.setInterpolationType(Hp.LINEAR),e.getInterpolationTypeAsString=()=>Bh.enumToString(Hp,t.interpolationType)},"vtkImageProperty");let Hg={mapper:null,forceOpaque:!1,forceTranslucent:!1};var Hy=Bh.newInstance(function(e,t,r={}){Object.assign(t,Hg,r),Hd(e,t,r),t.boundsMTime={},Bh.obj(t.boundsMTime),Bh.setGet(e,t,["mapper","forceOpaque","forceTranslucent"]),t.classHierarchy.push("vtkImageSlice"),e.getActors=()=>e,e.getImages=()=>e,e.getIsOpaque=()=>{if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.properties[0]||e.getProperty();let r=t.properties[0].getOpacity()>=1;return r&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=()=>!1,e.makeProperty=Hm,e.getBoundsForSlice=(r,n)=>{let a=t.mapper.getBoundsForSlice(r,n);if(!Ug(a))return a;e.computeMatrix();let i=new Float64Array(16);return N7.mat4.transpose(i,t.matrix),UO(a,i)},e.getMinXBound=()=>e.getBoundsByReference()[0],e.getMaxXBound=()=>e.getBoundsByReference()[1],e.getMinYBound=()=>e.getBoundsByReference()[2],e.getMaxYBound=()=>e.getBoundsByReference()[3],e.getMinZBound=()=>e.getBoundsByReference()[4],e.getMaxZBound=()=>e.getBoundsByReference()[5],e.getRedrawMTime=()=>{let e=t.mtime;if(null!==t.mapper){let r=t.mapper.getMTime();e=r>e?r:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(r=t.mapper.getInput().getMTime())>e?r:e)}return t.properties.forEach(t=>{e=Math.max(e,t.getMTime());let r=t.getRGBTransferFunction();null!==r&&(e=Math.max(e,r.getMTime()))}),e},e.getSupportsSelection=()=>!!t.mapper&&t.mapper.getSupportsSelection()},"vtkImageSlice");let{Zi:Hv,iw:Hb,SD:Hw,YA:Hx,FE:HC,Jt:Hk,Y2:HM,Qy:HS,Hw:HE}=j;function HP(e){let t=Hk(F_.IMAGE_PLANE,e);if(void 0!==t.usingDefaultValues||t.columnPixelSpacing&&t.rowPixelSpacing&&t.columnCosines&&t.rowCosines&&t.imagePositionPatient&&t.imageOrientationPatient)return t;let r={...t,usingDefaultValues:!0};return r.columnPixelSpacing||=1,r.rowPixelSpacing||=1,r.columnCosines||=[0,1,0],r.rowCosines||=[1,0,0],r.imagePositionPatient||=[0,0,0],r.imageOrientationPatient||=new Float32Array([1,0,0,0,1,0]),r}function HI(e){var t;let r,{imagePlaneModule:n,imagePixelModule:a,voiLUTFunction:i,modality:o,scalingFactor:s,calibration:l}=function(e){let t=e.imageId,{pixelRepresentation:r,bitsAllocated:n,bitsStored:a,highBit:i,photometricInterpretation:o,samplesPerPixel:s}=Hk(F_.IMAGE_PIXEL,t),{windowWidth:l,windowCenter:u,voiLUTFunction:c}=e,{modality:d}=Hk(F_.GENERAL_SERIES,t),h=Hk(F_.SCALING,t),p=Hk(F_.CALIBRATION,t),f=Object.values(Vn).includes(c)?c:Vn.LINEAR;return{calibration:p,scalingFactor:h,voiLUTFunction:f,modality:d,imagePlaneModule:HP(t),imagePixelModule:{bitsAllocated:n,bitsStored:a,samplesPerPixel:s,highBit:i,photometricInterpretation:o,pixelRepresentation:r,windowWidth:l,windowCenter:u,modality:d,voiLUTFunction:f}}}(e),{rowCosines:u,columnCosines:c}=n;(null==u||null==c)&&(u=[1,0,0],c=[0,1,0]);let d=N7.vec3.fromValues(u[0],u[1],u[2]),h=N7.vec3.fromValues(c[0],c[1],c[2]),p=N7.vec3.create();N7.vec3.cross(p,d,h);let f=n.imagePositionPatient;null==f&&(f=[0,0,0]);let m=n.columnPixelSpacing||e.columnPixelSpacing,g=n.rowPixelSpacing||e.rowPixelSpacing,y=e.columns,v=e.rows;return a.photometricInterpretation||e.sizeInBytes!==3*e.width*e.height||(e.numberOfComponents=3),{numberOfComponents:e.numberOfComponents||(t=a.photometricInterpretation,r=1,("RGB"===t||t?.includes("YBR")||"PALETTE COLOR"===t)&&(r=3),r),origin:f,direction:[...d,...h,...p],dimensions:[y,v,1],spacing:[m,g,FN],numVoxels:y*v*1,imagePlaneModule:n,imagePixelModule:a,bitsAllocated:a.bitsAllocated,voiLUTFunction:i,modality:o,scalingFactor:s,calibration:l,scanAxisNormal:p}}function HT(e){return H_(e,"vtkVolume")||H_(e,"vtkImageSlice")}function H_(e,t){let r="isA"in e?e:e.actor;return!!r&&!!r.isA(t)}let HD=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"Grayscale-DICOM-sigmoid",Notes:"This is a 16 point sample of a sigmoid grayscale colormap described in the DICOM standard. See equation C.11-1 in section C.11.2",NanColor:[1,0,0],BelowRangeColor:[0,0,0],AboveRangeColor:[1,1,1],RGBPoints:[-1,.01798620996209156,.01798620996209156,.01798620996209156,-.8666666666666667,.030275691986950463,.030275691986950463,.030275691986950463,-.7333333333333334,.05053016223541345,.05053016223541345,.05053016223541345,-.6,.08317269649392238,.08317269649392238,.08317269649392238,-.4666666666666667,.13392788832407365,.13392788832407365,.13392788832407365,-.33333333333333337,.2086085273260449,.2086085273260449,.2086085273260449,-.19999999999999996,.31002551887238755,.31002551887238755,.31002551887238755,-.06666666666666665,.4337256058045608,.4337256058045608,.4337256058045608,.06666666666666665,.5662743941954392,.5662743941954392,.5662743941954392,.19999999999999996,.6899744811276125,.6899744811276125,.6899744811276125,.33333333333333326,.791391472673955,.791391472673955,.791391472673955,.46666666666666656,.8660721116759263,.8660721116759263,.8660721116759263,.6000000000000001,.9168273035060777,.9168273035060777,.9168273035060777,.7333333333333334,.9494698377645865,.9494698377645865,.9494698377645865,.8666666666666667,.9697243080130495,.9697243080130495,.9697243080130495,1,.9820137900379085,.9820137900379085,.9820137900379085]},{ColorSpace:"RGB",Name:"Inverted-Grayscale",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Inverted-Grayscale-DICOM-sigmoid",Notes:"This is a 16 point sample of a sigmoid inverted-grayscale colormap described in the DICOM standard. See equation C.11-1 in section C.11.2",BelowRangeColor:[1,1,1],AboveRangeColor:[0,0,0],NanColor:[1,0,0],RGBPoints:[-1,.9820137900379085,.9820137900379085,.9820137900379085,-.8666666666666667,.9697243080130495,.9697243080130495,.9697243080130495,-.7333333333333334,.9494698377645866,.9494698377645866,.9494698377645866,-.6,.9168273035060777,.9168273035060777,.9168273035060777,-.4666666666666667,.8660721116759263,.8660721116759263,.8660721116759263,-.33333333333333337,.791391472673955,.791391472673955,.791391472673955,-.19999999999999996,.6899744811276125,.6899744811276125,.6899744811276125,-.06666666666666665,.5662743941954391,.5662743941954391,.5662743941954391,.06666666666666665,.43372560580456077,.43372560580456077,.43372560580456077,.19999999999999996,.3100255188723875,.3100255188723875,.3100255188723875,.33333333333333326,.20860852732604496,.20860852732604496,.20860852732604496,.46666666666666656,.13392788832407365,.13392788832407365,.13392788832407365,.6000000000000001,.08317269649392234,.08317269649392234,.08317269649392234,.7333333333333334,.05053016223541351,.05053016223541351,.05053016223541351,.8666666666666667,.03027569198695046,.03027569198695046,.03027569198695046,1,.01798620996209155,.01798620996209155,.01798620996209155]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,754296e-12,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,111641e-12,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,363578e-12,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,405298e-12,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4264e-11,0,620844e-12,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,33216e-11,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,405432e-12,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,455569e-13]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,455569e-13,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter(e=>e.RGBPoints).filter(e=>"CIELAB"!==e.ColorSpace).forEach(e=>{HD[e.Name]=e});let HA=Object.keys(HD);HA.sort();var HO=function(e){return HD[e]};let{vtkErrorMacro:HR}=Bh,HN={range:[0,0],clamping:!0,allowDuplicateScalars:!1};var HL=Bh.newInstance(function(e,t,r={}){Object.assign(t,HN,r),Bh.obj(e,t),t.nodes=[],Bh.setGet(e,t,["allowDuplicateScalars","clamping"]),Bh.setArray(e,t,["range"],2),Bh.getArray(e,t,["range"]),t.classHierarchy.push("vtkPiecewiseFunction"),e.getSize=()=>t.nodes.length,e.getType=()=>{let e,r=0,n=0;t.nodes.length>0&&(r=t.nodes[0].y);for(let a=1;a<t.nodes.length;a++){if((e=t.nodes[a].y)!==r)if(e>r)switch(n){case 0:case 1:n=1;break;default:n=3}else switch(n){case 0:case 2:n=2;break;default:n=3}if(r=e,3===n)break}switch(n){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:return"Varied"}},e.getDataPointer=()=>{let e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(let r=0;r<e;r++)t.function[2*r]=t.nodes[r].x,t.function[2*r+1]=t.nodes[r].y}return t.function},e.getFirstNonZeroValue=()=>{if(0===t.nodes.length)return 0;let e=1,r=0;for(;r<t.nodes.length;r++)if(0!==t.nodes[r].y){e=0;break}return e?Number.MAX_VALUE:r>0?t.nodes[r-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x},e.getNodeValue=(e,r)=>{let n=t.nodes.length;return e<0||e>=n?(HR("Index out of range!"),-1):(r[0]=t.nodes[e].x,r[1]=t.nodes[e].y,r[2]=t.nodes[e].midpoint,r[3]=t.nodes[e].sharpness,1)},e.setNodeValue=(r,n)=>{let a=t.nodes.length;if(r<0||r>=a)return HR("Index out of range!"),-1;let i=t.nodes[r].x;return t.nodes[r].x=n[0],t.nodes[r].y=n[1],t.nodes[r].midpoint=n[2],t.nodes[r].sharpness=n[3],i!==n[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=(t,r)=>e.addPointLong(t,r,.5,0),e.addPointLong=(r,n,a,i)=>{let o;if(a<0||a>1)return HR("Midpoint outside range [0.0, 1.0]"),-1;if(i<0||i>1)return HR("Sharpness outside range [0.0, 1.0]"),-1;for(t.allowDuplicateScalars||e.removePoint(r),t.nodes.push({x:r,y:n,midpoint:a,sharpness:i}),e.sortAndUpdateRange(),o=0;o<t.nodes.length&&t.nodes[o].x!==r;o++);return o<t.nodes.length?o:-1},e.setNodes=r=>{t.nodes!==r&&(t.nodes=r,e.sortAndUpdateRange())},e.sortAndUpdateRange=()=>{t.nodes.sort((e,t)=>e.x-t.x),e.updateRange()||e.modified()},e.updateRange=()=>{let r=t.range.slice(),n=t.nodes.length;return n?(t.range[0]=t.nodes[0].x,t.range[1]=t.nodes[n-1].x):(t.range[0]=0,t.range[1]=0),(r[0]!==t.range[0]||r[1]!==t.range[1])&&(e.modified(),!0)},e.removePoint=r=>{let n;for(n=0;n<t.nodes.length&&t.nodes[n].x!==r;n++);if(n>=t.nodes.length)return -1;let a=n,i=!1;return t.nodes.splice(n,1),(0===n||n===t.nodes.length)&&(i=e.updateRange()),i||e.modified(),a},e.removeAllPoints=()=>{t.nodes=[],e.sortAndUpdateRange()},e.addSegment=(r,n,a,i)=>{e.sortAndUpdateRange();for(let e=0;e<t.nodes.length;)t.nodes[e].x>=r&&t.nodes[e].x<=a?t.nodes.splice(e,1):e++;e.addPoint(r,n,.5,0),e.addPoint(a,i,.5,0)},e.getValue=t=>{let r=[];return e.getTable(t,t,1,r),r[0]},e.adjustRange=r=>{if(r.length<2)return 0;let n=e.getRange();n[0]<r[0]?e.addPoint(r[0],e.getValue(r[0])):e.addPoint(r[0],e.getValue(n[0])),n[1]>r[1]?e.addPoint(r[1],e.getValue(r[1])):e.addPoint(r[1],e.getValue(n[1])),e.sortAndUpdateRange();for(let e=0;e<t.nodes.length;)t.nodes[e].x>=r[0]&&t.nodes[e].x<=r[1]?t.nodes.splice(e,1):++e;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=(t,r)=>Math.ceil((r-t)/e.findMinimumXDistance()),e.findMinimumXDistance=()=>{let e=t.nodes.length;if(e<2)return -1;let r=t.nodes[1].x-t.nodes[0].x;for(let n=0;n<e-1;n++){let e=t.nodes[n+1].x-t.nodes[n].x;e<r&&(r=e)}return r},e.getTable=(e,r,n,a,i=1)=>{let o,s=0,l=t.nodes.length,u=0;0!==l&&(u=t.nodes[l-1].y);let c=0,d=0,h=0,p=0,f=0,m=0,g=0;for(o=0;o<n;o++){let y=i*o;for(c=n>1?e+o/(n-1)*(r-e):.5*(e+r);s<l&&c>t.nodes[s].x;)++s<l&&(d=t.nodes[s-1].x,h=t.nodes[s].x,p=t.nodes[s-1].y,f=t.nodes[s].y,m=t.nodes[s-1].midpoint,g=t.nodes[s-1].sharpness,m<1e-5&&(m=1e-5),m>.99999&&(m=.99999));if(s>=l)a[y]=t.clamping?u:0;else if(0===s)a[y]=t.clamping?t.nodes[0].y:0;else{let e=(c-d)/(h-d);if(e=e<m?.5*e/m:.5+.5*(e-m)/(1-m),g>.99)if(e<.5){a[y]=p;continue}else{a[y]=f;continue}if(g<.01){a[y]=(1-e)*p+e*f;continue}e<.5?e=.5*(2*e)**(1+10*g):e>.5&&(e=1-.5*((1-e)*2)**(1+10*g));let t=e*e,r=t*e,n=2*r-3*t+1,i=-2*r+3*t,o=r-2*t+e,s=r-t,l=(1-g)*(f-p);a[y]=n*p+i*f+o*l+s*l;let u=p<f?p:f,v=p>f?p:f;a[y]=a[y]<u?u:a[y],a[y]=a[y]>v?v:a[y]}}}},"vtkPiecewiseFunction");let HV=new Map;function HF(e){return e?.trim().toLowerCase()}function Hj(e){if(e?.trim())return function(e){let t=HV.get(e);if(t)return t;let r=HF(e);if(r){for(let[e,t]of HV.entries())if(HF(e)===r||HF(t.Name)===r)return t}}(e)||function(e){let t=HO(e);if(t)return t;let r=HF(e);if(!r)return;let n=HA.find(e=>HF(e)===r);return n?HO(n):void 0}(e)}function HB(e,t){let r=HA.map(e=>HO(e)),n=Array.from(HV.keys()).map(e=>HV.get(e)),a=r.concat(n).find(t=>{let{RGBPoints:r}=t;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t+=4)if(!V_(r.slice(t+1,t+4),e.slice(t+1,t+4)))return!1;return!0});if(!a)return null;let i=[];if(H_(t,"vtkVolume")||H_(t,"vtkImageSlice")){let e=t.getProperty()?.getScalarOpacity?.(0)?.getDataPointer?.();if(!e)return{name:a.Name};for(let t=0;t<e.length;t+=2)i.push({value:e[t],opacity:e[t+1]})}return{name:a.Name,...Array.isArray(i)&&i.length>0&&{opacity:i},...!1}}function HW(e,t){let r=Hz(e);HU(e,t,r)}function HU(e,t,r){let n=e.getMapper().getInputData().get("voxelManager");if(!n?.voxelManager)throw Error("No voxel manager was found for the volume actor, or you cannot yet update opacity with a threshold using stacked images");let a=n.voxelManager.getRange(),i=HL();if(null!==r){let e=.001*Math.abs(a[1]-a[0]),n=Math.max(a[0],Math.min(a[1],r));i.addPoint(a[0],0),i.addPoint(n-e,0),i.addPoint(n,t),i.addPoint(a[1],t)}else i.addPoint(a[0],t),i.addPoint(a[1],t);e.getProperty().setScalarOpacity(0,i)}function Hz(e){let t=e.getProperty().getScalarOpacity(0);if(!t)return null;let r=t.getDataPointer();if(!r||r.length<=4)return null;for(let e=0;e<r.length-2;e+=2){r[e];let t=r[e+1],n=r[e+2],a=r[e+3];if(0===t&&a>0)return n}return null}function HH(e){let t=e.getProperty().getScalarOpacity(0);if(!t)return 1;let r=t.getDataPointer();if(!r||0===r.length)return 1;let n=0;for(let e=1;e<r.length;e+=2)r[e]>n&&(n=r[e]);return n}function HG(e){let t=e.getSize(),r=[];for(let n=0;n<t;n++){let t=[];e.getNodeValue(n,t),r.push(t)}return r}function Hq(e,t){t?.length&&(e.removeAllPoints(),t.forEach(t=>{e.addRGBPoint(...t)}))}function H$(e,t){return{windowWidth:Math.abs(t-e)+1,windowCenter:(e+t+1)/2}}function HK(e,t,r=Vn.LINEAR){if(r===Vn.LINEAR||r===Vn.SAMPLED_SIGMOID)return{lower:t-.5-(e-1)/2,upper:t-.5+(e-1)/2};if(r===Vn.LINEAR_EXACT)return{lower:t-e/2,upper:t+e/2};throw Error("Invalid VOI LUT function")}function HY(e){let t=zH.newInstance(),r=0,n=1024;return void 0!==e.lower&&void 0!==e.upper&&(r=e.lower,n=e.upper),t.addRGBPoint(r,0,0,0),t.addRGBPoint(n,1,1,1),t}function HX(e,t=1024){let{windowWidth:r,windowCenter:n}=H$(e.lower,e.upper),a=Array.from({length:t},(e,r)=>(r+1)/(t+2)).flatMap(e=>[n-r/4*Math.log((1-e)/e),e,e,e,.5,0]),i=zH.newInstance();return i.buildFunctionFromArray(UX.newInstance({values:a,numberOfComponents:6})),i}function HZ(e,t){let r=t.voxelManager.getScalarData();if(!e.getPointData)return;let n=e.getPointData().getScalars().getData();if(t.color&&t.rgba){let e=new Uint8Array(t.columns*t.rows*3);for(let n=0;n<t.columns*t.rows;n++)e[3*n]=r[4*n],e[3*n+1]=r[4*n+1],e[3*n+2]=r[4*n+2];t.rgba=!1,t.getPixelData=()=>e,n.set(e)}else n.set(r);e.modified()}function HJ(e){if(!e)return;let t=e.getSize();for(let r=0;r<t;r++){let t=[];e.getNodeValue(r,t),t[1]=1-t[1],t[2]=1-t[2],t[3]=1-t[3],e.setNodeValue(r,t)}}let HQ=new Map,H1="imageRetrieveConfiguration",H0={IMAGE_RETRIEVE_CONFIGURATION:H1,clear:()=>{HQ.clear()},add:(e,t)=>{HQ.set(e,t)},clone:()=>new Map(HQ),restore:e=>{HQ.clear(),e.forEach((e,t)=>{HQ.set(t,e)})},get:(e,...t)=>{if(e===H1)return t.map(e=>HQ.get(e)).find(e=>void 0!==e)}};Hv(H0.get.bind(H0));let H2=VY;function H5(e,t,r=Vn.LINEAR){let n,a;if("number"==typeof t&&"number"==typeof e?(n=t,a=e):Array.isArray(t)&&Array.isArray(e)&&(n=t[0],a=e[0]),void 0!==n&&void 0!==a)return HK(a,n,r)}let H3=e=>e;class H4{constructor(e=!1){this.matrix=N7.mat4.identity(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=e?N7.glMatrix.toRadian:H3}rotateFromDirections(e,t){let r=new Float64Array(3),n=new Float64Array(3),a=new Float64Array(16);N7.vec3.set(r,e[0],e[1],e[2]),N7.vec3.set(n,t[0],t[1],t[2]),N7.vec3.normalize(r,r),N7.vec3.normalize(n,n);let i=N7.vec3.dot(r,n);return i>=1||(N7.vec3.cross(this.tmp,r,n),1e-6>N7.vec3.length(this.tmp)&&(N7.vec3.cross(this.tmp,[1,0,0],e),1e-6>N7.vec3.length(this.tmp)&&N7.vec3.cross(this.tmp,[0,1,0],e)),N7.mat4.fromRotation(a,Math.acos(i),this.tmp),N7.mat4.multiply(this.matrix,this.matrix,a)),this}rotate(e,t){return N7.vec3.set(this.tmp,...t),N7.vec3.normalize(this.tmp,this.tmp),N7.mat4.rotate(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}rotateX(e){return N7.mat4.rotateX(this.matrix,this.matrix,this.angleConv(e)),this}rotateY(e){return N7.mat4.rotateY(this.matrix,this.matrix,this.angleConv(e)),this}rotateZ(e){return N7.mat4.rotateZ(this.matrix,this.matrix,this.angleConv(e)),this}translate(e,t,r){return N7.vec3.set(this.tmp,e,t,r),N7.mat4.translate(this.matrix,this.matrix,this.tmp),this}scale(e,t,r){return N7.vec3.set(this.tmp,e,t,r),N7.mat4.scale(this.matrix,this.matrix,this.tmp),this}multiply(e){return N7.mat4.multiply(this.matrix,this.matrix,e),this}multiply3x3(e){return N7.mat4.multiply(this.matrix,this.matrix,[e[0],e[1],e[2],0,e[3],e[4],e[5],0,e[6],e[7],e[8],0,0,0,0,1]),this}invert(){return N7.mat4.invert(this.matrix,this.matrix),this}identity(){return N7.mat4.identity(this.matrix),this}apply(e,t=0,r=-1){if(B1(Bm,this.matrix))return this;let n=-1===r?e.length:t+3*r;for(let r=t;r<n;r+=3)N7.vec3.set(this.tmp,e[r],e[r+1],e[r+2]),N7.vec3.transformMat4(this.tmp,this.tmp,this.matrix),e[r]=this.tmp[0],e[r+1]=this.tmp[1],e[r+2]=this.tmp[2];return this}getMatrix(){return this.matrix}setMatrix(e){return e&&16===e.length&&N7.mat4.copy(this.matrix,e),this}}var H8=function(){return new H4(!0)},H6=function(){return new H4(!1)};function H9(e){return Array.isArray(e)?e.some(e=>Number.isNaN(e)):Number.isNaN(e)}function H7(e){if("function"==typeof structuredClone)try{return structuredClone(e)}catch{}return function e(t,r){if(null===t||"object"!=typeof t)return t;let n=r.get(t);if(n)return n;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Map){let n=new Map;return r.set(t,n),t.forEach((t,a)=>{n.set(e(a,r),e(t,r))}),n}if(t instanceof Set){let n=new Set;return r.set(t,n),t.forEach(t=>{n.add(e(t,r))}),n}if(Array.isArray(t)){let n=[];return r.set(t,n),t.forEach((t,a)=>{n[a]=e(t,r)}),n}let a={};return r.set(t,a),Reflect.ownKeys(t).forEach(n=>{a[n]=e(t[n],r)}),a}(e,new WeakMap)}function Ge(e,t){if(!e?.length||!t.FrameOfReferenceUID)return;t.planeRestriction||={FrameOfReferenceUID:t.FrameOfReferenceUID,point:e[0],inPlaneVector1:null,inPlaneVector2:null};let{planeRestriction:r}=t;if(1===e.length)return r.inPlaneVector1=null,r.inPlaneVector2=null,r;let n=N7.vec3.sub(N7.vec3.create(),e[0],e[Math.floor(e.length/2)]);N7.vec3.normalize(n,n),r.inPlaneVector1=n,r.inPlaneVector2=null;let a=e.length;if(a>2)for(let t=Math.floor(a/3);t<a;t++){let n=N7.vec3.sub(N7.vec3.create(),e[t],e[0]),a=N7.vec3.length(n);if(!V_(a,0)&&N7.vec3.dot(n,r.inPlaneVector1)<.95*a){N7.vec3.normalize(n,n),r.inPlaneVector2=n;break}}return r}function Gt(e,t){let r=function(e,t){let r=0,n=e[0][t];for(let a=1;a<e.length;a++)e[a][t]<n&&(n=e[a][t],r=a);return r}(e,t);return e[7^r][t]-e[r][t]}function Gr(e,t,r){let n,a,i,o,s,l,u,c,d=(n=N7.vec3.cross(N7.vec3.create(),t,r),N7.vec3.normalize(n,n),i=(a=e.getSpatialExtent())[0],o=a[1],s=a[2],l=a[3],u=a[4],[[i,s,u],[o,s,u],[i,l,u],[o,l,u],[i,s,c=a[5]],[o,s,c],[i,l,c],[o,l,c]].map(a=>{let i=[0,0,0];return e.indexToWorld(a,i),[N7.vec3.dot(i,n),N7.vec3.dot(i,r),N7.vec3.dot(i,t)]}));return{widthWorld:Gt(d,0),heightWorld:Gt(d,1),depthWorld:Gt(d,2)}}class Gn{constructor(e){this.insetImageMultiplier=jh.rendering?.useLegacyCameraFOV?1.1:1,this.flipHorizontal=!1,this.flipVertical=!1,this.viewportStatus=FI.NO_DATA,this._suppressCameraModifiedEvents=!1,this.hasPixelSpacing=!0,this.getProperties=()=>({}),this.setRotation=e=>{},this.viewportWidgets=new Map,this.addWidget=(e,t)=>{this.viewportWidgets.set(e,t)},this.getWidget=e=>this.viewportWidgets.get(e),this.getWidgets=()=>Array.from(this.viewportWidgets.values()),this.getRenderPasses=()=>null,this.removeWidgets=()=>{this.getWidgets().forEach(e=>{if(e.getEnabled()&&e.setEnabled(!1),e.getActor&&e.getRenderer){let t=e.getActor(),r=e.getRenderer();r&&t&&r.removeActor(t)}})},this.id=e.id,this.renderingEngineId=e.renderingEngineId,this.type=e.type,this.element=e.element,this.canvas=e.canvas,this.sx=e.sx,this.sy=e.sy,this.sWidth=e.sWidth,this.sHeight=e.sHeight,this._actors=new Map,this.element.setAttribute("data-viewport-uid",this.id),this.element.setAttribute("data-rendering-engine-uid",this.renderingEngineId),this.defaultOptions=H7(e.defaultOptions),this.suppressEvents=!!e.defaultOptions.suppressEvents&&e.defaultOptions.suppressEvents,this.options=H7(e.defaultOptions),this.isDisabled=!1}static get useCustomRenderingPipeline(){return!1}getUseCustomRenderingPipeline(){return this.constructor.useCustomRenderingPipeline}resizeForRenderingEngine({keepCamera:e=!0}={}){"function"==typeof this.resize&&this.resize();let t=e?this.getCamera():void 0;this.resetCamera(),t&&this.setCamera(t)}isOrientationChangeable(){return!1}dispose(){}destroy(){this.dispose()}setRendered(){this.viewportStatus!==FI.NO_DATA&&this.viewportStatus!==FI.LOADING&&(this.viewportStatus=FI.RENDERED)}setNeedsRender(){this.viewportStatus=FI.NEEDS_RENDER}setColorTransform(e,t){if(!e&&!t)return;let r=t||[255,255,255],n=Math.max(...r),a=r.map(e=>n/e),{lower:i=0,upper:o=255}=e||{},s=(o-i+1)/255,l=i/255;return`url('data:image/svg+xml,\
|
|
10
10
|
<svg xmlns="http://www.w3.org/2000/svg">\
|
|
11
11
|
<filter id="colour" color-interpolation-filters="linearRGB">\
|
|
12
12
|
<feColorMatrix type="matrix" \
|