@ohif/app 3.7.0-beta.2 → 3.7.0-beta.21
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/{192.bundle.16d0f44e62ff52432731.js → 192.bundle.c08c5ab814e2b37f7de8.js} +4 -4
- package/dist/{199.bundle.7bb7f07334adb5994b07.js → 199.bundle.fff9b2c82296ac60e336.js} +2 -7
- package/dist/{208.bundle.fc090e7d0989c68bd18e.js → 208.bundle.44dbeaafde7c957eb5ec.js} +4 -4
- package/dist/{270.bundle.4564621556b0f963a004.js → 270.bundle.cddac4adcfdf8d1082a3.js} +13 -7
- package/dist/{283.bundle.c467b98efe62399505f9.js → 283.bundle.e0463be176208a49ae07.js} +14 -21
- package/dist/{331.bundle.bd0c13931a21d53086c9.js → 331.bundle.af86275686a78739ec4c.js} +27 -13
- package/dist/{351.bundle.2d4bc19d8b493879dbbe.js → 351.bundle.bbd6e3b383ac731edc94.js} +5 -5
- package/dist/{404.bundle.4b84daa465888ef7fc56.js → 404.bundle.6ab9072b6ca4fdc8e5ad.js} +6 -5
- package/dist/{55.bundle.5f5e5ef9087b0beee35c.js → 55.bundle.e9bf24eb17d84049c640.js} +4 -4
- package/dist/{569.bundle.0ed8d8178ffd43fe1c34.js → 569.bundle.f71780087b8c9a75d44e.js} +23 -12
- package/dist/{581.bundle.360d26f97b37da8faec3.js → 581.bundle.0b1b8273eb694c11366d.js} +7 -6
- package/dist/{616.bundle.377b54c860b461f9f68e.js → 616.bundle.5b72d71408acf40a8372.js} +6 -6
- package/dist/{642.bundle.a9b710e5bf6294f74e9f.js → 642.bundle.81fd0ee19e55de71af16.js} +2 -2
- package/dist/{707.bundle.57d5f86eceb59d415c4e.js → 707.bundle.112a221af4d036185312.js} +54 -60
- package/dist/{744.bundle.bfb752eba913c0a86d0a.js → 744.bundle.480d918dc1d9eb8293da.js} +58 -52
- package/dist/{790.bundle.e28eaccb6818de78ae48.js → 790.bundle.981ed07d900d4a0a4b53.js} +4 -4
- package/dist/{799.bundle.ca18bdf4abe4d9abea26.js → 799.bundle.6fbb7a97bccfb55dc79f.js} +5 -5
- package/dist/{82.bundle.2b4c115ba19903aa6bba.js → 82.bundle.dbd076c633a0568628be.js} +45 -40
- package/dist/{917.bundle.ab1b2df827119f94a898.js → 917.bundle.3f61a417e9a607b190da.js} +2 -2
- package/dist/{953.bundle.9e3a7225f07336bfcb41.js → 953.bundle.bad442420f62f5ab0c4b.js} +2 -2
- package/dist/{973.bundle.50644c5c4630221c00ac.js → 973.bundle.b833bec4e621fe4283c4.js} +2 -2
- package/dist/{976.bundle.2ee705b3311b8db2de5f.js → 976.bundle.0ec9edf8d307c412df16.js} +6 -6
- package/dist/{984.bundle.894dafd69ff965b87709.js → 984.bundle.1a1fe6f2b122b329a61d.js} +4 -4
- package/dist/app-config.js +1 -2
- package/dist/{app.bundle.a8d0e8aa74cb37c1479a.js → app.bundle.7793ce08e52aee1382ca.js} +779 -245
- package/dist/app.bundle.css +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/google.js +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +19 -19
- /package/dist/{50.bundle.aef33d7bd8482846aa40.js → 50.bundle.f3f85e8e2fb4532bb16b.js} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/***/ 99605:
|
|
5
5
|
/***/ (function(module) {
|
|
6
6
|
|
|
7
|
-
!function(e,t){ true?module.exports=t():0}(this,(()=>(()=>{"use strict";var e={578:(e,t,r)=>{const n=r(823),o=r(187),a=r(592),i=r(604),s=r(249),l=r(968),c=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:d,Z_OK:f,Z_STREAM_END:m,Z_NEED_DICT:g,Z_STREAM_ERROR:h,Z_DATA_ERROR:p,Z_MEM_ERROR:x}=r(684);function w(e){this.options=o.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==f)throw new Error(i[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==f)))throw new Error(i[r])}function b(e,t){const r=new w(t);if(r.push(e),r.err)throw r.msg||i[r.err];return r.result}w.prototype.push=function(e,t){const r=this.strm,o=this.options.chunkSize,i=this.options.dictionary;let s,l,w;if(this.ended)return!1;for(l=t===~~t?t:!0===t?d:u,"[object ArrayBuffer]"===c.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),s=n.inflate(r,l),s===g&&i&&(s=n.inflateSetDictionary(r,i),s===f?s=n.inflate(r,l):s===p&&(s=g));r.avail_in>0&&s===m&&r.state.wrap>0&&0!==e[r.next_in];)n.inflateReset(r),s=n.inflate(r,l);switch(s){case h:case p:case g:case x:return this.onEnd(s),this.ended=!0,!1}if(w=r.avail_out,r.next_out&&(0===r.avail_out||s===m))if("string"===this.options.to){let e=a.utf8border(r.output,r.next_out),t=r.next_out-e,n=a.buf2string(r.output,e);r.next_out=t,r.avail_out=o-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(s!==f||0!==w){if(s===m)return s=n.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},w.prototype.onData=function(e){this.chunks.push(e)},w.prototype.onEnd=function(e){e===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Hq=function(e,t){return(t=t||{}).raw=!0,b(e,t)},r(684)},187:e=>{const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r<n;r++)t+=e[r].length;const r=new Uint8Array(t);for(let t=0,n=0,o=e.length;t<o;t++){let o=e[t];r.set(o,n),n+=o.length}return r}},592:e=>{let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)r=e.charCodeAt(o),55296==(64512&r)&&o+1<i&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(s),a=0,o=0;a<s;o++)r=e.charCodeAt(o),55296==(64512&r)&&o+1<i&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t};e.exports.buf2string=(e,n)=>{const o=n||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,n));let a,i;const s=new Array(2*o);for(i=0,a=0;a<o;){let t=e[a++];if(t<128){s[i++]=t;continue}let n=r[t];if(n>4)s[i++]=65533,a+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&a<o;)t=t<<6|63&e[a++],n--;n>1?s[i++]=65533:t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t<r;t++)n+=String.fromCharCode(e[t]);return n})(s,i)},e.exports.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},693:e=>{e.exports=(e,t,r,n)=>{let o=65535&e|0,a=e>>>16&65535|0,i=0;for(;0!==r;){i=r>2e3?2e3:r,r-=i;do{o=o+t[n++]|0,a=a+o|0}while(--i);o%=65521,a%=65521}return o|a<<16|0}},684:e=>{e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},464:e=>{const t=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());e.exports=(e,r,n,o)=>{const a=t,i=o+n;e^=-1;for(let t=o;t<i;t++)e=e>>>8^a[255&(e^r[t])];return-1^e}},968:e=>{e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},365:e=>{const t=16209;e.exports=function(e,r){let n,o,a,i,s,l,c,u,d,f,m,g,h,p,x,w,b,y,k,v,D,T,S,P;const I=e.state;n=e.next_in,S=e.input,o=n+(e.avail_in-5),a=e.next_out,P=e.output,i=a-(r-e.avail_out),s=a+(e.avail_out-257),l=I.dmax,c=I.wsize,u=I.whave,d=I.wnext,f=I.window,m=I.hold,g=I.bits,h=I.lencode,p=I.distcode,x=(1<<I.lenbits)-1,w=(1<<I.distbits)-1;e:do{g<15&&(m+=S[n++]<<g,g+=8,m+=S[n++]<<g,g+=8),b=h[m&x];t:for(;;){if(y=b>>>24,m>>>=y,g-=y,y=b>>>16&255,0===y)P[a++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=h[(65535&b)+(m&(1<<y)-1)];continue t}if(32&y){I.mode=16191;break e}e.msg="invalid literal/length code",I.mode=t;break e}k=65535&b,y&=15,y&&(g<y&&(m+=S[n++]<<g,g+=8),k+=m&(1<<y)-1,m>>>=y,g-=y),g<15&&(m+=S[n++]<<g,g+=8,m+=S[n++]<<g,g+=8),b=p[m&w];r:for(;;){if(y=b>>>24,m>>>=y,g-=y,y=b>>>16&255,!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<<y)-1)];continue r}e.msg="invalid distance code",I.mode=t;break e}if(v=65535&b,y&=15,g<y&&(m+=S[n++]<<g,g+=8,g<y&&(m+=S[n++]<<g,g+=8)),v+=m&(1<<y)-1,v>l){e.msg="invalid distance too far back",I.mode=t;break e}if(m>>>=y,g-=y,y=a-i,v>y){if(y=v-y,y>u&&I.sane){e.msg="invalid distance too far back",I.mode=t;break e}if(D=0,T=f,0===d){if(D+=c-y,y<k){k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}}else if(d<y){if(D+=c+d-y,y-=d,y<k){k-=y;do{P[a++]=f[D++]}while(--y);if(D=0,d<k){y=d,k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}}}else if(D+=d-y,y<k){k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}for(;k>2;)P[a++]=T[D++],P[a++]=T[D++],P[a++]=T[D++],k-=3;k&&(P[a++]=T[D++],k>1&&(P[a++]=T[D++]))}else{D=a-v;do{P[a++]=P[D++],P[a++]=P[D++],P[a++]=P[D++],k-=3}while(k>2);k&&(P[a++]=P[D++],k>1&&(P[a++]=P[D++]))}break}}break}}while(n<o&&a<s);k=g>>3,n-=k,g-=k<<3,m&=(1<<g)-1,e.next_in=n,e.next_out=a,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=a<s?s-a+257:257-(a-s),I.hold=m,I.bits=g}},823:(e,t,r)=>{const n=r(693),o=r(464),a=r(365),i=r(446),{Z_FINISH:s,Z_BLOCK:l,Z_TREES:c,Z_OK:u,Z_STREAM_END:d,Z_NEED_DICT:f,Z_STREAM_ERROR:m,Z_DATA_ERROR:g,Z_MEM_ERROR:h,Z_BUF_ERROR:p,Z_DEFLATED:x}=r(684),w=16180,b=16190,y=16191,k=16192,v=16194,D=16199,T=16200,S=16206,P=16209,I=16210,C=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function _(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const A=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<w||t.mode>16211?1:0},L=e=>{if(A(e))return m;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=w,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},E=e=>{if(A(e))return m;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,L(e)},M=(e,t)=>{let r;if(A(e))return m;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?m:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,E(e))},R=(e,t)=>{if(!e)return m;const r=new _;e.state=r,r.strm=e,r.window=null,r.mode=w;const n=M(e,t);return n!==u&&(e.state=null),n};let F,O,B=!0;const U=e=>{if(B){F=new Int32Array(512),O=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(i(1,e.lens,0,288,F,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;i(2,e.lens,0,32,O,0,e.work,{bits:5}),B=!1}e.lencode=F,e.lenbits=9,e.distcode=O,e.distbits=5},N=(e,t,r,n)=>{let o;const a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>n&&(o=n),a.window.set(t.subarray(r-n,r-n+o),a.wnext),(n-=o)?(a.window.set(t.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0};e.exports.inflateReset=E,e.exports.inflateReset2=M,e.exports.inflateResetKeep=L,e.exports.inflateInit=e=>R(e,15),e.exports.inflateInit2=R,e.exports.inflate=(e,t)=>{let r,_,L,E,M,R,F,O,B,j,W,Z,$,G,V,q,z,Y,H,K,J,X,Q=0;const ee=new Uint8Array(4);let te,re;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(A(e)||!e.output||!e.input&&0!==e.avail_in)return m;r=e.state,r.mode===y&&(r.mode=k),M=e.next_out,L=e.output,F=e.avail_out,E=e.next_in,_=e.input,R=e.avail_in,O=r.hold,B=r.bits,j=R,W=F,X=u;e:for(;;)switch(r.mode){case w:if(0===r.wrap){r.mode=k;break}for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(2&r.wrap&&35615===O){0===r.wbits&&(r.wbits=15),r.check=0,ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0),O=0,B=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&O)<<8)+(O>>8))%31){e.msg="incorrect header check",r.mode=P;break}if((15&O)!==x){e.msg="unknown compression method",r.mode=P;break}if(O>>>=4,B-=4,J=8+(15&O),0===r.wbits&&(r.wbits=J),J>15||J>r.wbits){e.msg="invalid window size",r.mode=P;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=512&O?16189:y,O=0,B=0;break;case 16181:for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(r.flags=O,(255&r.flags)!==x){e.msg="unknown compression method",r.mode=P;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=P;break}r.head&&(r.head.text=O>>8&1),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0,r.mode=16182;case 16182:for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.head&&(r.head.time=O),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,ee[2]=O>>>16&255,ee[3]=O>>>24&255,r.check=o(r.check,ee,4,0)),O=0,B=0,r.mode=16183;case 16183:for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.head&&(r.head.xflags=255&O,r.head.os=O>>8),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0,r.mode=16184;case 16184:if(1024&r.flags){for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.length=O,r.head&&(r.head.extra_len=O),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(Z=r.length,Z>R&&(Z=R),Z&&(r.head&&(J=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(_.subarray(E,E+Z),J)),512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,r.length-=Z),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===R)break e;Z=0;do{J=_[E+Z++],r.head&&J&&r.length<65536&&(r.head.name+=String.fromCharCode(J))}while(J&&Z<R);if(512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,J)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===R)break e;Z=0;do{J=_[E+Z++],r.head&&J&&r.length<65536&&(r.head.comment+=String.fromCharCode(J))}while(J&&Z<R);if(512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,J)break e}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(4&r.wrap&&O!==(65535&r.check)){e.msg="header crc mismatch",r.mode=P;break}O=0,B=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=y;break;case 16189:for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}e.adler=r.check=C(O),O=0,B=0,r.mode=b;case b:if(0===r.havedict)return e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,f;e.adler=r.check=1,r.mode=y;case y:if(t===l||t===c)break e;case k:if(r.last){O>>>=7&B,B-=7&B,r.mode=S;break}for(;B<3;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}switch(r.last=1&O,O>>>=1,B-=1,3&O){case 0:r.mode=16193;break;case 1:if(U(r),r.mode=D,t===c){O>>>=2,B-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=P}O>>>=2,B-=2;break;case 16193:for(O>>>=7&B,B-=7&B;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if((65535&O)!=(O>>>16^65535)){e.msg="invalid stored block lengths",r.mode=P;break}if(r.length=65535&O,O=0,B=0,r.mode=v,t===c)break e;case v:r.mode=16195;case 16195:if(Z=r.length,Z){if(Z>R&&(Z=R),Z>F&&(Z=F),0===Z)break e;L.set(_.subarray(E,E+Z),M),R-=Z,E+=Z,F-=Z,M+=Z,r.length-=Z;break}r.mode=y;break;case 16196:for(;B<14;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(r.nlen=257+(31&O),O>>>=5,B-=5,r.ndist=1+(31&O),O>>>=5,B-=5,r.ncode=4+(15&O),O>>>=4,B-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=P;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;B<3;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.lens[ne[r.have++]]=7&O,O>>>=3,B-=3}for(;r.have<19;)r.lens[ne[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,te={bits:r.lenbits},X=i(0,r.lens,0,19,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid code lengths set",r.mode=P;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;Q=r.lencode[O&(1<<r.lenbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(z<16)O>>>=V,B-=V,r.lens[r.have++]=z;else{if(16===z){for(re=V+2;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(O>>>=V,B-=V,0===r.have){e.msg="invalid bit length repeat",r.mode=P;break}J=r.lens[r.have-1],Z=3+(3&O),O>>>=2,B-=2}else if(17===z){for(re=V+3;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=V,B-=V,J=0,Z=3+(7&O),O>>>=3,B-=3}else{for(re=V+7;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=V,B-=V,J=0,Z=11+(127&O),O>>>=7,B-=7}if(r.have+Z>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=P;break}for(;Z--;)r.lens[r.have++]=J}}if(r.mode===P)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=P;break}if(r.lenbits=9,te={bits:r.lenbits},X=i(1,r.lens,0,r.nlen,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid literal/lengths set",r.mode=P;break}if(r.distbits=6,r.distcode=r.distdyn,te={bits:r.distbits},X=i(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,te),r.distbits=te.bits,X){e.msg="invalid distances set",r.mode=P;break}if(r.mode=D,t===c)break e;case D:r.mode=T;case T:if(R>=6&&F>=258){e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,a(e,W),M=e.next_out,L=e.output,F=e.avail_out,E=e.next_in,_=e.input,R=e.avail_in,O=r.hold,B=r.bits,r.mode===y&&(r.back=-1);break}for(r.back=0;Q=r.lencode[O&(1<<r.lenbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(q&&0==(240&q)){for(Y=V,H=q,K=z;Q=r.lencode[K+((O&(1<<Y+H)-1)>>Y)],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(Y+V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=Y,B-=Y,r.back+=Y}if(O>>>=V,B-=V,r.back+=V,r.length=z,0===q){r.mode=16205;break}if(32&q){r.back=-1,r.mode=y;break}if(64&q){e.msg="invalid literal/length code",r.mode=P;break}r.extra=15&q,r.mode=16201;case 16201:if(r.extra){for(re=r.extra;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.length+=O&(1<<r.extra)-1,O>>>=r.extra,B-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;Q=r.distcode[O&(1<<r.distbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(0==(240&q)){for(Y=V,H=q,K=z;Q=r.distcode[K+((O&(1<<Y+H)-1)>>Y)],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(Y+V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=Y,B-=Y,r.back+=Y}if(O>>>=V,B-=V,r.back+=V,64&q){e.msg="invalid distance code",r.mode=P;break}r.offset=z,r.extra=15&q,r.mode=16203;case 16203:if(r.extra){for(re=r.extra;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.offset+=O&(1<<r.extra)-1,O>>>=r.extra,B-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=P;break}r.mode=16204;case 16204:if(0===F)break e;if(Z=W-F,r.offset>Z){if(Z=r.offset-Z,Z>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=P;break}Z>r.wnext?(Z-=r.wnext,$=r.wsize-Z):$=r.wnext-Z,Z>r.length&&(Z=r.length),G=r.window}else G=L,$=M-r.offset,Z=r.length;Z>F&&(Z=F),F-=Z,r.length-=Z;do{L[M++]=G[$++]}while(--Z);0===r.length&&(r.mode=T);break;case 16205:if(0===F)break e;L[M++]=r.length,F--,r.mode=T;break;case S:if(r.wrap){for(;B<32;){if(0===R)break e;R--,O|=_[E++]<<B,B+=8}if(W-=F,e.total_out+=W,r.total+=W,4&r.wrap&&W&&(e.adler=r.check=r.flags?o(r.check,L,W,M-W):n(r.check,L,W,M-W)),W=F,4&r.wrap&&(r.flags?O:C(O))!==r.check){e.msg="incorrect data check",r.mode=P;break}O=0,B=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(4&r.wrap&&O!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=P;break}O=0,B=0}r.mode=16208;case 16208:X=d;break e;case P:X=g;break e;case I:return h;default:return m}return e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,(r.wsize||W!==e.avail_out&&r.mode<P&&(r.mode<S||t!==s))&&N(e,e.output,e.next_out,W-e.avail_out)?(r.mode=I,h):(j-=e.avail_in,W-=e.avail_out,e.total_in+=j,e.total_out+=W,r.total+=W,4&r.wrap&&W&&(e.adler=r.check=r.flags?o(r.check,L,W,e.next_out-W):n(r.check,L,W,e.next_out-W)),e.data_type=r.bits+(r.last?64:0)+(r.mode===y?128:0)+(r.mode===D||r.mode===v?256:0),(0===j&&0===W||t===s)&&X===u&&(X=p),X)},e.exports.inflateEnd=e=>{if(A(e))return m;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(A(e))return m;const r=e.state;return 0==(2&r.wrap)?m:(r.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const r=t.length;let o,a,i;return A(e)?m:(o=e.state,0!==o.wrap&&o.mode!==b?m:o.mode===b&&(a=1,a=n(a,t,r,0),a!==o.check)?g:(i=N(e,t,r,r),i?(o.mode=I,h):(o.havedict=1,u)))},e.exports.inflateInfo="pako inflate (from Nodeca project)"},446:e=>{const t=15,r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),o=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),a=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,i,s,l,c,u,d,f)=>{const m=f.bits;let g,h,p,x,w,b,y=0,k=0,v=0,D=0,T=0,S=0,P=0,I=0,C=0,_=0,A=null;const L=new Uint16Array(16),E=new Uint16Array(16);let M,R,F,O=null;for(y=0;y<=t;y++)L[y]=0;for(k=0;k<l;k++)L[i[s+k]]++;for(T=m,D=t;D>=1&&0===L[D];D--);if(T>D&&(T=D),0===D)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(v=1;v<D&&0===L[v];v++);for(T<v&&(T=v),I=1,y=1;y<=t;y++)if(I<<=1,I-=L[y],I<0)return-1;if(I>0&&(0===e||1!==D))return-1;for(E[1]=0,y=1;y<t;y++)E[y+1]=E[y]+L[y];for(k=0;k<l;k++)0!==i[s+k]&&(d[E[i[s+k]]++]=k);if(0===e?(A=O=d,b=20):1===e?(A=r,O=n,b=257):(A=o,O=a,b=0),_=0,k=0,y=v,w=u,S=T,P=0,p=-1,C=1<<T,x=C-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){M=y-P,d[k]+1<b?(R=0,F=d[k]):d[k]>=b?(R=O[d[k]-b],F=A[d[k]-b]):(R=96,F=0),g=1<<y-P,h=1<<S,v=h;do{h-=g,c[w+(_>>P)+h]=M<<24|R<<16|F|0}while(0!==h);for(g=1<<y-1;_&g;)g>>=1;if(0!==g?(_&=g-1,_+=g):_=0,k++,0==--L[y]){if(y===D)break;y=i[s+d[k]]}if(y>T&&(_&x)!==p){for(0===P&&(P=T),w+=v,S=y-P,I=1<<S;S+P<D&&(I-=L[S+P],!(I<=0));)S++,I<<=1;if(C+=1<<S,1===e&&C>852||2===e&&C>592)return 1;p=_&x,c[p]=T<<24|S<<16|w-u|0}}return 0!==_&&(c[w+_]=y-P<<24|64<<16|0),f.bits=T,0}},604:e=>{e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},249:e=>{e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var n={};return(()=>{function e(e,t,r){if(void 0===e)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");const n=e.length/3;let o=0,a=0;if(r)for(let r=0;r<n;r++)t[a++]=e[o++],t[a++]=e[o++],t[a++]=e[o++],t[a++]=255;else t.set(e)}function t(e,t,r){if(void 0===e)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");const n=e.length/3;let o=0,a=0,i=n,s=2*n;if(r)for(let r=0;r<n;r++)t[o++]=e[a++],t[o++]=e[i++],t[o++]=e[s++],t[o++]=255;else t.set(e)}function o(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/3;let o=0,a=0;if(r)for(let r=0;r<n;r++){const r=e[o++],n=e[o++],i=e[o++];t[a++]=r+1.402*(i-128),t[a++]=r-.34414*(n-128)-.71414*(i-128),t[a++]=r+1.772*(n-128),t[a++]=255}else for(let r=0;r<n;r++){const r=e[o++],n=e[o++],i=e[o++];t[a++]=r+1.402*(i-128),t[a++]=r-.34414*(n-128)-.71414*(i-128),t[a++]=r+1.772*(n-128)}}function a(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/3;let o=0,a=0,i=n,s=2*n;if(r)for(let r=0;r<n;r++){const r=e[a++],n=e[i++],l=e[s++];t[o++]=r+1.402*(l-128),t[o++]=r-.34414*(n-128)-.71414*(l-128),t[o++]=r+1.772*(n-128),t[o++]=255}else for(let r=0;r<n;r++){const r=e[a++],n=e[i++],l=e[s++];t[o++]=r+1.402*(l-128),t[o++]=r-.34414*(n-128)-.71414*(l-128),t[o++]=r+1.772*(n-128)}}r.r(n),r.d(n,{configure:()=>tt,convertColorSpace:()=>O,convertPALETTECOLOR:()=>et,convertRGBColorByPixel:()=>e,convertRGBColorByPlane:()=>t,convertYBRFullByPixel:()=>o,convertYBRFullByPlane:()=>a,createImage:()=>se,decodeImageFrame:()=>ee,decodeJPEGBaseline8BitColor:()=>U,default:()=>rt,external:()=>Xe,getImageFrame:()=>te,getMinMax:()=>R,getPixelData:()=>M,internal:()=>L,isColorImage:()=>re,isJPEGBaseline8BitColor:()=>ne,wadors:()=>ce,wadouri:()=>ze,webWorkerManager:()=>J});const i=function(e,t,r){return t=t||0,e&&e.Value?e.Value.length<=t?r:e.Value[t]:r};const s=function(e,t,r){const n=i(e,t,r);if(void 0!==n)return parseFloat(n)};const l=function(e,t){const r=i(e,t);if(void 0!==r)return parseFloat(r)};const c=function(e,t){if(!e)return;if(!e.Value)return;if(!Array.isArray(e.Value))return;if(t&&e.Value.length<t)return;const r=[];for(let t=0;t<e.Value.length;t++)r.push(parseFloat(e.Value[t]));return r};function u(e){const t=e.indexOf(":");return e.substring(t+1)}function d(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&e.Value?e.Value[0]&&t?e.Value[0]:e.Value:e}function f(e,t,r){return{shared:(t?Object.values(t[0]):[]).map((e=>e[0])).filter((e=>void 0!==e&&"object"==typeof e)),perFrame:(e?Object.values(e[r-1]):[]).map((e=>e.Value[0])).filter((e=>void 0!==e&&"object"==typeof e))}}function m(e){let{52009230:t,52009229:r,"00280008":n,...o}=e;return t=d(t,!1),r=d(r,!1),n=d(n),{PerFrameFunctionalGroupsSequence:t,SharedFunctionalGroupsSequence:r,NumberOfFrames:n,rest:o}}function g(e){const t=e.indexOf("/frames/")+8,r=e.slice(0,t),n=parseInt(e.slice(t),10);return{metadata:p[`${r}1`],frame:n}}const h={_retrieveMultiframeMetadata:g,retrieveMultiframeMetadata:function(e){return g(u(e))},isMultiframe:function(e){const t=i(e["00280008"]);return t&&t>1}};let p=[],x={};const w={add:function(e,t){const r=u(e);t.isMultiframe=h.isMultiframe(t),p[r]=t},get:function(e){const t=u(e),r=p[t];if(r&&!r?.isMultiframe)return r;const n=x[t];if(n)return n;const o=h._retrieveMultiframeMetadata(t);if(!o||!o.metadata)return;const{metadata:a,frame:i}=o;if(a){const e=function(e,t){const{PerFrameFunctionalGroupsSequence:r,SharedFunctionalGroupsSequence:n,NumberOfFrames:o,rest:a}=m(t);if(r||o>1){const{shared:i,perFrame:s}=f(r,n,e),l=Object.assign(t,{frameNumber:e});return[...i,...s].forEach((e=>{Object.entries(e).forEach((e=>{let[t,r]=e;l[t]=r}))})),Object.assign(a,{"00280008":o},l)}return t}(i,a);return x[t]=e,e}},remove:function(e){const t=u(e);p[t]=void 0,x[t]=void 0},purge:function(){p=[],x={}}};function b(e){return"RECON TOMO"===e||"RECON GATED TOMO"===e}function y(e){return i(e["00080060"]).includes("NM")}function k(e,t){const r=d(e["00080008"],!1);if(r)return r[t]}function v(e){let t=c(e["00200037"],6);return!t&&y(e)&&(t=function(e){let t;const r=k(e,2);if(r&&b(r)){const r=d(e["00540022"]);r&&(t=c(r["00200037"],6))}return t}(e)),t}function D(e){let t=c(e["00200032"],3);return!t&&y(e)&&(t=function(e){let t;const r=k(e,2);if(r&&b(r)){const r=d(e["00540022"]);r&&(t=c(r["00200032"],3))}return t}(e)),t}const T=function(e,t){if("multiframeModule"===e){const{metadata:e,frame:r}=h.retrieveMultiframeMetadata(t);if(!e)return;const{PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,NumberOfFrames:a}=m(e);if(n||a>1){const{shared:e,perFrame:t}=f(n,o,r);return{NumberOfFrames:a,PerFrameFunctionalInformation:t,SharedFunctionalInformation:e}}return{NumberOfFrames:a}}const{dicomParser:r}=Xe,n=w.get(t);if(n){if("generalSeriesModule"===e)return{modality:i(n["00080060"]),seriesInstanceUID:i(n["0020000E"]),seriesNumber:l(n["00200011"]),studyInstanceUID:i(n["0020000D"]),seriesDate:r.parseDA(i(n["00080021"])),seriesTime:r.parseTM(i(n["00080031"],0,"")),acquisitionDate:r.parseDA(i(n["00080022"]),""),acquisitionTime:r.parseTM(i(n["00080032"],0,""))};if("patientStudyModule"===e)return{patientAge:l(n["00101010"]),patientSize:l(n["00101020"]),patientSex:i(n["00100040"]),patientWeight:l(n["00101030"])};if("nmMultiframeGeometryModule"===e){const e=i(n["00080060"]),t=k(n,2);return{modality:e,imageType:i(n["00080008"]),imageSubType:t,imageOrientationPatient:v(n),imagePositionPatient:D(n),sliceThickness:l(n["00180050"]),pixelSpacing:c(n["00280030"],2),numberOfFrames:l(n["00280008"]),isNMReconstructable:b(t)&&e.includes("NM")}}if("imagePlaneModule"===e){const e=v(n),t=D(n),r=c(n["00280030"],2);let o=null,a=null;r&&(a=r[0],o=r[1]);let s=null,u=null;return e&&(s=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])],u=[parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])]),{frameOfReferenceUID:i(n["00200052"]),rows:l(n["00280010"]),columns:l(n["00280011"]),imageOrientationPatient:e,rowCosines:s,columnCosines:u,imagePositionPatient:t,sliceThickness:l(n["00180050"]),sliceLocation:l(n["00201041"]),pixelSpacing:r,rowPixelSpacing:a,columnPixelSpacing:o}}if("imagePixelModule"===e)return{samplesPerPixel:l(n["00280002"]),photometricInterpretation:i(n["00280004"]),rows:l(n["00280010"]),columns:l(n["00280011"]),bitsAllocated:l(n["00280100"]),bitsStored:l(n["00280101"]),highBit:i(n["00280102"]),pixelRepresentation:l(n["00280103"]),planarConfiguration:l(n["00280006"]),pixelAspectRatio:i(n["00280034"]),smallestPixelValue:l(n["00280106"]),largestPixelValue:l(n["00280107"]),redPaletteColorLookupTableDescriptor:c(n["00281101"]),greenPaletteColorLookupTableDescriptor:c(n["00281102"]),bluePaletteColorLookupTableDescriptor:c(n["00281103"]),redPaletteColorLookupTableData:c(n["00281201"]),greenPaletteColorLookupTableData:c(n["00281202"]),bluePaletteColorLookupTableData:c(n["00281203"])};if("voiLutModule"===e)return{windowCenter:c(n["00281050"],1),windowWidth:c(n["00281051"],1)};if("modalityLutModule"===e)return{rescaleIntercept:l(n["00281052"]),rescaleSlope:l(n["00281053"]),rescaleType:i(n["00281054"])};if("sopCommonModule"===e)return{sopClassUID:i(n["00080016"]),sopInstanceUID:i(n["00080018"])};if("petIsotopeModule"===e){const e=i(n["00540016"]);if(void 0===e)return;return{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:r.parseTM(i(e["00181072"],0,"")),radiopharmaceuticalStartDateTime:i(e["00181078"],0,""),radionuclideTotalDose:l(e["00181074"]),radionuclideHalfLife:l(e["00181075"])}}}return"overlayPlaneModule"===e?function(e){const t=[];for(let r=0;r<=30;r+=2){let n=`x60${r.toString(16)}`;4===n.length&&(n=`x600${r.toString(16)}`);const o=i(e[`${n}3000`]);if(!o)continue;const a=[];for(let t=0;t<o.length;t++)for(let r=0;r<8;r++){const n=e.Value[o.dataOffset+t];a[8*t+r]=n>>r&1}t.push({rows:l(e[`${n}0010`]),columns:l(e[`${n}0011`]),type:i(e[`${n}0040`]),x:l(e[`${n}0050`],1)-1,y:l(e[`${n}0050`],0)-1,pixelData:a,description:i(e[`${n}0022`]),label:i(e[`${n}1500`]),roiArea:i(e[`${n}1301`]),roiMean:i(e[`${n}1302`]),roiStandardDeviation:i(e[`${n}1303`])})}return{overlays:t}}(n):"transferSyntax"===e?{transferSyntaxUID:i(n["00020010"])}:"petSeriesModule"===e?{correctedImage:i(n["00280051"]),units:i(n["00541001"]),decayCorrection:i(n["00541102"])}:"petImageModule"===e?{frameReferenceTime:l(n["00541300"]),actualFrameDuration:l(n["00181242"])}:void 0}};function S(e,t,r){if(r+e.length>t.length)return!1;let n=r;for(let r=0;r<e.length;r++)if(e[r]!==t[n++])return!1;return!0}const P=function(e,t,r){r=r||0;const n=function(e){const t=new Uint8Array(e.length);for(let r=0,n=e.length;r<n;r++)t[r]=e.charCodeAt(r);return t}(t);for(let t=r;t<e.length;t++)if(n[0]===e[t]&&S(n,e,t))return t;return-1};let I={open(e,t){e.open("get",t,!0)},beforeSend(){},beforeProcessing:e=>Promise.resolve(e.response),imageCreated(){},strict:!1,decodeConfig:{convertFloatPixelDataToInt:!0,use16BitDataType:!1}};function C(e){I=Object.assign(I,e)}function _(){return I}const A=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{cornerstone:o}=Xe,a=_(),i=e=>{if("function"==typeof a.errorInterceptor){const t=new Error("request failed");t.request=e,t.response=e.response,t.status=e.status,a.errorInterceptor(t)}},s=new XMLHttpRequest,l=new Promise(((l,c)=>{a.open(s,e,r,n);const u=a.beforeSend(s,t,r,n);s.responseType="arraybuffer";const d=Object.assign({},r,u);Object.keys(d).forEach((function(t){null!==d[t]&&("Accept"===t&&-1!==e.indexOf("accept=")||s.setRequestHeader(t,d[t]))})),n.deferred={resolve:l,reject:c},n.url=e,n.imageId=t,s.onloadstart=function(r){a.onloadstart&&a.onloadstart(r,n);const i={url:e,imageId:t};o.triggerEvent(o.events,"cornerstoneimageloadstart",i)},s.onloadend=function(r){a.onloadend&&a.onloadend(r,n);const i={url:e,imageId:t};o.triggerEvent(o.events,"cornerstoneimageloadend",i)},s.onreadystatechange=function(e){a.onreadystatechange?a.onreadystatechange(e,n):4===s.readyState&&(200===s.status?a.beforeProcessing(s).then(l).catch((()=>{i(s),c(s)})):(i(s),c(s)))},s.onprogress=function(r){const i=r.loaded;let s,l;r.lengthComputable&&(s=r.total,l=Math.round(i/s*100)),a.onprogress&&a.onprogress(r,n);const c={url:e,imageId:t,loaded:i,total:s,percentComplete:l};o.triggerEvent(o.events,o.EVENTS.IMAGE_LOAD_PROGRESS,c)},s.onerror=function(){i(s),c(s)},s.onabort=function(){i(s),c(s)},s.send()}));return l.xhr=s,l},L={xhrRequest:A,setOptions:C,getOptions:_};function E(e){for(let t=0;t<e.length;t++)if("Content-Type:"===e[t].substr(0,13))return e[t].substr(13).trim()}const M=function(e,t){const r={Accept:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/octet-stream"};return new Promise(((n,o)=>{const a=A(e,t,r),{xhr:i}=a;a.then((function(e){const t=new Uint8Array(e),r=i.getResponseHeader("Content-Type")||"application/octet-stream";if(-1===r.indexOf("multipart"))return void n({contentType:r,imageFrame:{pixelData:t}});const a=P(t,"\r\n\r\n");-1===a&&o(new Error("invalid response - no multipart mime header"));const s=function(e,t,r){t=t||0,r=r||e.length-t;let n="";for(let o=t;o<t+r;o++)n+=String.fromCharCode(e[o]);return n}(t,0,a),l=s.split("\r\n"),c=function(e){for(let t=0;t<e.length;t++)if("--"===e[t].substr(0,2))return e[t]}(l);c||o(new Error("invalid response - no boundary marker"));const u=a+4,d=P(t,c,u);-1===d&&o(new Error("invalid response - terminating boundary not found"));const f=d-u-2;n({contentType:E(l),imageFrame:{pixelData:new Uint8Array(e,u,f)}})}),o)}))};const R=function(e){let t,r=e[0],n=e[0];const o=e.length;for(let a=1;a<o;a++)t=e[a],r=Math.min(r,t),n=Math.max(n,t);return{min:r,max:n}};function F(r,n,o){0===r.planarConfiguration?e(r.pixelData,n,o):t(r.pixelData,n,o)}function O(e,t,r){if("RGB"===e.photometricInterpretation)F(e,t,r);else if("YBR_RCT"===e.photometricInterpretation)F(e,t,r);else if("YBR_ICT"===e.photometricInterpretation)F(e,t,r);else if("PALETTE COLOR"===e.photometricInterpretation)et(e,t,r);else if("YBR_FULL_422"===e.photometricInterpretation)!function(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%2!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/2;let o=0,a=0;if(r)for(let r=0;r<n;r+=2){const r=e[o++],n=e[o++],i=e[o++],s=e[o++];t[a++]=r+1.402*(s-128),t[a++]=r-.34414*(i-128)-.71414*(s-128),t[a++]=r+1.772*(i-128),t[a++]=255,t[a++]=n+1.402*(s-128),t[a++]=n-.34414*(i-128)-.71414*(s-128),t[a++]=n+1.772*(i-128),t[a++]=255}else for(let r=0;r<n;r+=2){const r=e[o++],n=e[o++],i=e[o++],s=e[o++];t[a++]=r+1.402*(s-128),t[a++]=r-.34414*(i-128)-.71414*(s-128),t[a++]=r+1.772*(i-128),t[a++]=n+1.402*(s-128),t[a++]=n-.34414*(i-128)-.71414*(s-128),t[a++]=n+1.772*(i-128)}}(e.pixelData,t,r);else{if("YBR_FULL"!==e.photometricInterpretation)throw new Error(`No color space conversion for photometric interpretation ${e.photometricInterpretation}`);!function(e,t,r){0===e.planarConfiguration?o(e.pixelData,t,r):a(e.pixelData,t,r)}(e,t,r)}}function B(e){return function(e){let t;try{return decodeURIComponent(escape(e))}catch(r){if(t=r,t instanceof URIError)return e;throw t}}(String.fromCharCode.apply(null,Array.prototype.slice.apply(new Uint8Array(e))))}const U=function(e,t,r){const n=(new Date).getTime(),o=new Blob([t],{type:"image/jpeg"});return new Promise(((t,a)=>{const i=new FileReader;void 0===i.readAsBinaryString?i.readAsArrayBuffer(o):i.readAsBinaryString(o),i.onload=function(){const o=new Image;o.onload=function(){r.height=o.height,r.width=o.width,e.rows=o.height,e.columns=o.width;const a=r.getContext("2d");a.drawImage(this,0,0);const i=a.getImageData(0,0,o.width,o.height),s=(new Date).getTime();e.pixelData=new Uint8Array(i.data.buffer),e.imageData=i,e.decodeTimeInMS=s-n;const l=R(e.pixelData);e.smallestPixelValue=l.min,e.largestPixelValue=l.max,e.pixelDataLength=e.pixelData.length,t(e)},o.onerror=function(e){a(e)},void 0===i.readAsBinaryString?o.src=`data:image/jpeg;base64,${window.btoa(B(i.result))}`:o.src=`data:image/jpeg;base64,${window.btoa(i.result)}`},i.onerror=e=>{a(e)}}))};function N(){return new Worker(r.p+"index.worker.1c69152d710fa7b84bce.worker.js")}let j=0;const W=[],Z=[],$=_(),G={maxWebWorkers:navigator.hardwareConcurrency||1,startWebWorkersOnDemand:!0,webWorkerTaskPaths:[],taskConfiguration:{decodeTask:{initializeCodecsOnStartup:!1,strict:$.strict}}};let V;const q={maxWebWorkers:0,numWebWorkers:0,numTasksQueued:0,numTasksExecuting:0,numTasksCompleted:0,totalTaskTimeInMS:0,totalTimeDelayedInMS:0};function z(){if(W.length){for(let e=0;e<Z.length;e++)if("ready"===Z[e].status){Z[e].status="busy";const t=W.shift();t.start=(new Date).getTime();const r=(new Date).getTime();return q.totalTimeDelayedInMS+=r-t.added,Z[e].task=t,Z[e].worker.postMessage({taskType:t.taskType,workerIndex:e,data:t.data},t.transferList),void q.numTasksExecuting++}Z.length<V.maxWebWorkers&&H()}}function Y(e){if("initialize"===e.data.taskType)Z[e.data.workerIndex].status="ready",z();else{const t=Z[e.data.workerIndex].task.start,r="success"===e.data.status?"resolve":"reject";try{Z[e.data.workerIndex].task.deferred[r](e.data.result)}catch(e){console.warn("Caught error delivering response",e)}Z[e.data.workerIndex].task=void 0,q.numTasksExecuting--,Z[e.data.workerIndex].status="ready",q.numTasksCompleted++;const n=(new Date).getTime();q.totalTaskTimeInMS+=n-t,z()}}function H(){if(Z.length>=V.maxWebWorkers)return;const e=new N;Z.push({worker:e,status:"initializing"}),e.addEventListener("message",Y),e.postMessage({taskType:"initialize",workerIndex:Z.length-1,config:V})}function K(e){if(V=e=e||G,V.maxWebWorkers=V.maxWebWorkers||navigator.hardwareConcurrency||1,!V.startWebWorkersOnDemand)for(let e=0;e<V.maxWebWorkers;e++)H()}const J={initialize:K,loadWebWorkerTask:function(e,t){V.webWorkerTaskPaths.push(e),t&&(V.taskConfiguration=Object.assign(V.taskConfiguration,t));for(let t=0;t<Z.length;t++)Z[t].worker.postMessage({taskType:"loadWebWorkerTask",workerIndex:Z.length-1,sourcePath:e,config:V})},addTask:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;V||K();let o={resolve:void 0,reject:void 0};const a=new Promise(((e,t)=>{o={resolve:e,reject:t}}));let i;for(i=0;i<W.length&&!(W[i].priority<r);i++);const s=j++;return W.splice(i,0,{taskId:s,taskType:e,status:"ready",added:(new Date).getTime(),data:t,deferred:o,priority:r,transferList:n}),z(),{taskId:s,promise:a}},getStatistics:function(){return q.maxWebWorkers=V.maxWebWorkers,q.numWebWorkers=Z.length,q.numTasksQueued=W.length,q},setTaskPriority:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let r=0;r<W.length;r++)if(W[r].taskId===e){const e=W.splice(r,1)[0];for(e.priority=t,r=0;r<W.length&&!(W[r].priority<t);r++);return W.splice(r,0,e),!0}return!1},cancelTask:function(e,t){for(let r=0;r<W.length;r++)if(W[r].taskId===e){return W.splice(r,1).deferred.reject(t),!0}return!1},webWorkers:Z,terminate:function(){for(let e=0;e<Z.length;e++)Z[e].worker.terminate();Z.length=0,V=void 0}};var X=r(578);function Q(e,t,r,n,o){const a=n.priority||void 0,i=n.transferPixelData?[r.buffer]:void 0;return J.addTask("decodeTask",{imageFrame:e,transferSyntax:t,pixelData:r,options:n,decodeConfig:o},a,i).promise}window.pako={inflateRaw:X.Hq};const ee=function(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5?arguments[5]:void 0;switch(t){case"1.2.840.10008.1.2":case"1.2.840.10008.1.2.1":case"1.2.840.10008.1.2.2":case"1.2.840.10008.1.2.1.99":case"1.2.840.10008.1.2.5":case"1.2.840.10008.1.2.4.51":case"1.2.840.10008.1.2.4.57":case"1.2.840.10008.1.2.4.70":case"1.2.840.10008.1.2.4.80":case"1.2.840.10008.1.2.4.81":case"1.2.840.10008.1.2.4.90":case"1.2.840.10008.1.2.4.91":case"3.2.840.10008.1.2.4.96":return Q(e,t,r,o,a);case"1.2.840.10008.1.2.4.50":return 8!==e.bitsAllocated||3!==e.samplesPerPixel&&4!==e.samplesPerPixel?Q(e,t,r,o,a):U(e,r,n)}return Promise.reject(new Error(`No decoder for transfer syntax ${t}`))};const te=function(e){const{cornerstone:t}=Xe,r=t.metaData.get("imagePixelModule",e);return{samplesPerPixel:r.samplesPerPixel,photometricInterpretation:r.photometricInterpretation,planarConfiguration:r.planarConfiguration,rows:r.rows,columns:r.columns,bitsAllocated:r.bitsAllocated,bitsStored:r.bitsStored,pixelRepresentation:r.pixelRepresentation,smallestPixelValue:r.smallestPixelValue,largestPixelValue:r.largestPixelValue,redPaletteColorLookupTableDescriptor:r.redPaletteColorLookupTableDescriptor,greenPaletteColorLookupTableDescriptor:r.greenPaletteColorLookupTableDescriptor,bluePaletteColorLookupTableDescriptor:r.bluePaletteColorLookupTableDescriptor,redPaletteColorLookupTableData:r.redPaletteColorLookupTableData,greenPaletteColorLookupTableData:r.greenPaletteColorLookupTableData,bluePaletteColorLookupTableData:r.bluePaletteColorLookupTableData,pixelData:void 0,imageId:e}};function re(e){return"RGB"===e||"PALETTE COLOR"===e||"YBR_FULL"===e||"YBR_FULL_422"===e||"YBR_PARTIAL_422"===e||"YBR_PARTIAL_420"===e||"YBR_RCT"===e||"YBR_ICT"===e}const ne=function(e,t){if(t=t||e.transferSyntax,8===e.bitsAllocated&&"1.2.840.10008.1.2.4.50"===t&&(3===e.samplesPerPixel||4===e.samplesPerPixel))return!0};let oe="";function ae(e){const t=function(e,t){let r;return Number.isInteger(e)&&Number.isInteger(t)?e>=0?t<=255?r=Uint8Array:t<=65535&&(r=Uint16Array):e>=-128&&t<=127?r=Int8Array:e>=-32768&&t<=32767&&(r=Int16Array):r=Float32Array,r}(e.smallestPixelValue,e.largestPixelValue);if(!t)throw new Error("Could not apply a typed array to the pixel data");{const r=new t(e.pixelData);e.pixelData=r}}function ie(e,t){const r=e.length/4;let n=0,o=0;for(let a=0;a<r;a++)t[o++]=e[n++],t[o++]=e[n++],t[o++]=e[n++],n++;return t}const se=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=n.useRGBA;if(n.preScale={enabled:!(!n.preScale||void 0===n.preScale.enabled)&&n.preScale.enabled},!t||!t.length)return Promise.reject(new Error("The file does not contain image data."));const{cornerstone:a}=Xe,i=document.createElement("canvas"),s=te(e);if(n.preScale.enabled){const t=function(e,t){const r=e.get("modalityLutModule",t)||{},n=e.get("generalSeriesModule",t)||{},{modality:o}=n,a={rescaleSlope:r.rescaleSlope,rescaleIntercept:r.rescaleIntercept,modality:o},i=e.get("scalingModule",t)||{};return{...a,..."PT"===o&&{suvbw:i.suvbw}}}(a.metaData,e);t&&(n.preScale={...n.preScale,scalingParameters:t})}n.isSharedArrayBuffer=n.targetBuffer?.arrayBuffer&&n.targetBuffer.arrayBuffer instanceof SharedArrayBuffer;const{decodeConfig:l}=_(),c=ee(s,r,t,i,n,l),{use16BitDataType:u}=l,d=re(s.photometricInterpretation);return new Promise(((t,s)=>{c.then((function(s){if(n.skipCreateImage)return t(s);let l=!1;if(n.targetBuffer&&n.targetBuffer.type&&!d){const{arrayBuffer:e,type:t,offset:r=0,length:o}=n.targetBuffer,a=s.pixelDataLength,i=r,c=null!=o?o:a-i,d={Uint8Array,Uint16Array:u?Uint16Array:void 0,Int16Array:u?Int16Array:void 0,Float32Array};if(c!==s.pixelDataLength)throw new Error(`target array for image does not have the same length (${c}) as the decoded image length (${s.pixelDataLength}).`);const f=d[t],m=e?new f(e,i,c):new f(s.pixelData);if(c!==s.pixelDataLength)throw new Error("target array for image does not have the same length as the decoded image length.");s.pixelData=m,l=!0}l||ae(s);const c=a.metaData.get("imagePlaneModule",e)||{},f=a.metaData.get("voiLutModule",e)||{},m=a.metaData.get("modalityLutModule",e)||{},g=a.metaData.get("sopCommonModule",e)||{};if(d){if(o){if(!ne(s,r)&&"RGB"!==s.photometricInterpretation){i.height=s.rows,i.width=s.columns;const e=i.getContext("2d").createImageData(s.columns,s.rows);O(s,e.data,o),s.imageData=e,s.pixelData=e.data,s.pixelDataLength=e.data.length}}else if(ne(s,r)){const e=new Uint8Array(s.pixelData.length/4*3);s.pixelData=ie(s.pixelData,e),s.pixelDataLength=s.pixelData.length}else if("PALETTE COLOR"===s.photometricInterpretation){i.height=s.rows,i.width=s.columns;const e=i.getContext("2d").createImageData(s.columns,s.rows);O(s,e.data,!0);const t=new e.data.constructor(e.data.length/4*3);s.pixelData=new Uint8Array(ie(e.data,t)),s.pixelDataLength=s.pixelData.length}const e=R(s.pixelData);s.smallestPixelValue=e.min,s.largestPixelValue=e.max}const h={imageId:e,color:d,columnPixelSpacing:c.columnPixelSpacing,columns:s.columns,height:s.rows,preScale:s.preScale,intercept:m.rescaleIntercept?m.rescaleIntercept:0,slope:m.rescaleSlope?m.rescaleSlope:1,invert:"MONOCHROME1"===s.photometricInterpretation,minPixelValue:s.smallestPixelValue,maxPixelValue:s.largestPixelValue,rowPixelSpacing:c.rowPixelSpacing,rows:s.rows,sizeInBytes:s.pixelData.byteLength,width:s.columns,windowCenter:f.windowCenter?f.windowCenter[0]:void 0,windowWidth:f.windowWidth?f.windowWidth[0]:void 0,voiLUTFunction:f.voiLUTFunction?f.voiLUTFunction:void 0,decodeTimeInMS:s.decodeTimeInMS,floatPixelData:void 0,imageFrame:s,rgba:d&&o,getPixelData:()=>s.pixelData,getCanvas:void 0,numComps:void 0};var p;if(window.image=h,h.color&&(h.getCanvas=function(){if(oe===e)return i;const t=h.columns,r=h.rows;i.height=r,i.width=t;const n=i.getContext("2d"),o=n.createImageData(t,r),a=s.pixelData;if(a.length===t*r*4)for(let e=0;e<a.length;e++)o.data[e]=a[e];else if(a.length===t*r*3){let e=0;for(let t=0;t<a.length;t+=3)o.data[e++]=a[t],o.data[e++]=a[t+1],o.data[e++]=a[t+2],o.data[e++]=255}return s.pixelData=o.data,s.pixelDataLength=o.data.length,s.imageData=o,n.putImageData(s.imageData,0,0),oe=e,i}),m.modalityLUTSequence&&m.modalityLUTSequence.length>0&&("1.2.840.10008.5.1.4.1.1.12.1"!==(p=g.sopClassUID)&&"1.2.840.10008.5.1.4.1.1.12.2.1"!==p)&&(h.modalityLUT=m.modalityLUTSequence[0]),f.voiLUTSequence&&f.voiLUTSequence.length>0&&(h.voiLUT=f.voiLUTSequence[0]),h.color&&(h.windowWidth=255,h.windowCenter=127),void 0===h.windowCenter||void 0===h.windowWidth){const e=h.imageFrame.minAfterScale,t=h.imageFrame.maxAfterScale;h.windowWidth=t-e,h.windowCenter=(t+e)/2}t(h)}),s)}))};const le=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Xe.cornerstone.imageRetrievalPoolManager,n=(new Date).getTime();return{promise:new Promise(((o,a)=>{const i=t.requestType||"interaction",s=t.additionalDetails||{imageId:e},l=void 0===t.priority?5:t.priority,c=t.addToBeginning||!1,u=e.substring(7);r.addRequest(function(e,r,i){return M(e,r,i).then((e=>{const i=function(e){const t="1.2.840.10008.1.2";if(!e)return t;const r=e.split(";"),n={};r.forEach((e=>{const t=e.split("=");if(2!==t.length)return;const r=t[1].trim().replace(/"/g,"");n[t[0].trim()]=r}));const o={"image/jpeg":"1.2.840.10008.1.2.4.50","image/x-dicom-rle":"1.2.840.10008.1.2.5","image/x-jls":"1.2.840.10008.1.2.4.80","image/jls":"1.2.840.10008.1.2.4.80","image/jll":"1.2.840.10008.1.2.4.70","image/jp2":"1.2.840.10008.1.2.4.90","image/jpx":"1.2.840.10008.1.2.4.92","image/jphc":"3.2.840.10008.1.2.4.96","image/jxl":"1.2.840.10008.1.2.4.140"};return n["transfer-syntax"]?n["transfer-syntax"]:e&&!Object.keys(n).length&&o[e]?o[e]:n.type&&o[n.type]?o[n.type]:o[e]?o[e]:t}(e.contentType),s=e.imageFrame.pixelData;se(r,s,i,t).then((e=>{const t=(new Date).getTime();e.loadTimeInMS=t-n,o(e)}),a)}),a).catch((e=>{a(e)}))}.bind(this,u,e,"multipart/related; type=application/octet-stream; transfer-syntax=*"),i,s,l,c)})),cancelFn:void 0}};const ce={metaData:{getNumberString:s,getNumberValue:l,getNumberValues:c,getValue:i,metaDataProvider:T},findIndexOfString:P,getPixelData:M,loadImage:le,metaDataManager:w,register:function(e){e.registerImageLoader("wadors",le),e.metaData.addProvider(T)}};function ue(e,t){if(e.elements[t]&&6===e.elements[t].length)return[e.uint16(t,0),e.uint16(t,1),e.uint16(t,2)]}function de(e,t,r){const n=[],o=e.elements[t];for(let a=0;a<r[0];a++)16===r[2]?n[a]=e.uint16(t,a):n[a]=e.byteArray[a+o.dataOffset];return n}const fe=function(e){const t={samplesPerPixel:e.uint16("x00280002"),photometricInterpretation:e.string("x00280004"),rows:e.uint16("x00280010"),columns:e.uint16("x00280011"),bitsAllocated:e.uint16("x00280100"),bitsStored:e.uint16("x00280101"),highBit:e.uint16("x00280102"),pixelRepresentation:e.uint16("x00280103"),planarConfiguration:e.uint16("x00280006"),pixelAspectRatio:e.string("x00280034")};return function(e,t){0===e.uint16("x00280103")?(t.smallestPixelValue=e.uint16("x00280106"),t.largestPixelValue=e.uint16("x00280107")):(t.smallestPixelValue=e.int16("x00280106"),t.largestPixelValue=e.int16("x00280107"))}(e,t),"PALETTE COLOR"===t.photometricInterpretation&&e.elements.x00281101&&function(e,t){t.redPaletteColorLookupTableDescriptor=ue(e,"x00281101"),t.greenPaletteColorLookupTableDescriptor=ue(e,"x00281102"),t.bluePaletteColorLookupTableDescriptor=ue(e,"x00281103"),0===t.redPaletteColorLookupTableDescriptor[0]&&(t.redPaletteColorLookupTableDescriptor[0]=65536,t.greenPaletteColorLookupTableDescriptor[0]=65536,t.bluePaletteColorLookupTableDescriptor[0]=65536);const r=t.redPaletteColorLookupTableDescriptor[0],n=e.elements.x00281201.length===r?8:16;t.redPaletteColorLookupTableDescriptor[2]!==n&&(t.redPaletteColorLookupTableDescriptor[2]=n,t.greenPaletteColorLookupTableDescriptor[2]=n,t.bluePaletteColorLookupTableDescriptor[2]=n),t.redPaletteColorLookupTableData=de(e,"x00281201",t.redPaletteColorLookupTableDescriptor),t.greenPaletteColorLookupTableData=de(e,"x00281202",t.greenPaletteColorLookupTableDescriptor),t.bluePaletteColorLookupTableData=de(e,"x00281203",t.bluePaletteColorLookupTableDescriptor)}(e,t),t};function me(e,t){let r=t.uint16("x00283002",0);0===r&&(r=65535);let n=0;n=0===e?t.uint16("x00283002",1):t.int16("x00283002",1);const o={id:"1",firstValueMapped:n,numBitsPerEntry:t.uint16("x00283002",2),lut:[]};for(let n=0;n<r;n++)o.lut[n]=0===e?t.uint16("x00283006",n):t.int16("x00283006",n);return o}const ge=function(e,t){if(!t||!t.items||!t.items.length)return;const r=[];for(let n=0;n<t.items.length;n++){const o=me(e,t.items[n].dataSet);o&&r.push(o)}return r};const he=function(e){const t=e.string("x00080016");if("1.2.840.10008.5.1.4.1.1.2"===t||"1.2.840.10008.5.1.4.1.1.2.1"===t)return 1;const r=e.floatString("x00281052"),n=e.floatString("x00281053");if(void 0!==r&&void 0!==n){const t=function(e){const t=e.uint16("x00280103"),r=e.uint16("x00280101");return 0===t?0:-1<<r-1}(e);return t*n+r<0?1:0}return e.elements.x00283000&&e.elements.x00283000.length>0?0:e.uint16("x00280103")};const pe=function(e,t,r){const n=[],o=e.string(t);if(!o)return;const a=o.split("\\");if(!(r&&a.length<r)){for(let e=0;e<a.length;e++)n.push(parseFloat(a[e]));return n}};const xe=function(e){const t=e.indexOf(":");let r=e.substring(t+1);const n=r.indexOf("frame=");let o;if(-1!==n){const e=r.substring(n+6);o=parseInt(e,10),r=r.substring(0,n-1)}return{scheme:e.substring(0,t),url:r,frame:o,pixelDataFrame:void 0!==o?o-1:void 0}};function we(e){const{dicomParser:t}=Xe;let r,n=t.parseDicom(e,{untilTag:"x7fe00010"});n.elements.x7fe00010||console.warn("Pixel data not found!");try{r=t.parseDicom(e)}catch(e){console.error(e),console.log("pixel data dataset:",e.dataSet),r=e.dataSet}return n.elements.x7fe00010=r.elements.x7fe00010,n=function(e){const t=e.elements.x7fe00010.fragments,r=e.byteArray.length;for(const e of t){const{position:t,length:n}=e;n>r-t&&(console.log(`Truncated fragment, changing fragment length from ${e.length} to ${r-t}`),e.length=r-t)}return e}(n),n}async function be(e,t,r){const n=we(e),{uri:o,imageId:a,fileTotalLength:i}=r;return n.fetchMore=async function(s){const l=Object.assign({uri:o,imageId:a,fetchedLength:e.length,lengthToFetch:i-e.length},s),{fetchedLength:c,lengthToFetch:u}=l,{arrayBuffer:d}=await t(o,a,{byteRange:`${c}-${c+u}`}),f=new Uint8Array(d),m=new Uint8Array(n.byteArray.length+f.length);return m.set(n.byteArray),m.set(f,n.byteArray.length),be(m,t,r)},n}function ye(e,t,r){const n={};(t?Object.values(t.items[0].dataSet.elements):[]).map((e=>n[e.tag]=e));const o={};return(e?Object.values(e.items[r-1].dataSet.elements):[]).map((e=>o[e.tag]=e)),{shared:n,perFrame:o}}function ke(e){if(!e)return;const{elements:t,...r}=e,{x52009230:n,x52009229:o,...a}=t;return{NumberOfFrames:e.intString("x00280008"),PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,otherElements:a,otherAttributtes:r}}function ve(e){if(Pe[e])return Pe[e]}function De(e){if(!e)return!1;const t=e.intString("x00280008");return t&&t>1}const Te={_get:ve,generateMultiframeWADOURIs:function(e){const t=[],r=ve(e);if(De(r)){const n=r.intString("x00280008");for(let r=1;r<=n;r++)t.push(`${e}&frame=${r}`)}else t.push(e);return t},retrieveMultiframeDataset:function(e){const t=function(e){return e.indexOf("&frame=")}(e),r=-1===t?e:e.slice(0,t),n=parseInt(e.slice(t+7),10)||1;let o;return o=Pe[r]?Pe[r].dataSet:void 0,{dataSet:o,frame:n}},isMultiframeDataset:function(e){return De(ve(e))}};let Se=0,Pe={},Ie={};function Ce(){return{cacheSizeInBytes:Se,numberOfDataSetsCached:Object.keys(Pe).length}}const _e={isLoaded:function(e){return void 0!==Pe[e]},load:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A,r=arguments.length>2?arguments[2]:void 0;const{cornerstone:n,dicomParser:o}=Xe;if(Pe[e])return new Promise((t=>{Pe[e].cacheCount++,t(Pe[e].dataSet)}));if(Ie[e])return Ie[e].cacheCount++,Ie[e];const a=t(e,r),i=new Promise(((s,l)=>{a.then((async function(a){const c={isPartialContent:!1,fileTotalLength:null};if(!(a instanceof ArrayBuffer)){if(!a.arrayBuffer)return l(new Error("If not returning ArrayBuffer, must return object with `arrayBuffer` parameter"));c.isPartialContent=a.flags.isPartialContent,c.fileTotalLength=a.flags.fileTotalLength,a=a.arrayBuffer}const u=new Uint8Array(a);let d;try{d=c.isPartialContent?await be(u,t,{uri:e,imageId:r,fileTotalLength:c.fileTotalLength}):o.parseDicom(u)}catch(e){return l(e)}Pe[e]={dataSet:d,cacheCount:i.cacheCount},Se+=d.byteArray.length,s(d),n.triggerEvent(n.events,"datasetscachechanged",{uri:e,action:"loaded",cacheInfo:Ce()})}),l).then((()=>{delete Ie[e]}),(()=>{delete Ie[e]}))}));return i.cacheCount=1,Ie[e]=i,i},unload:function(e){const{cornerstone:t}=Xe;Pe[e]&&(Pe[e].cacheCount--,0===Pe[e].cacheCount&&(Se-=Pe[e].dataSet.byteArray.length,delete Pe[e],t.triggerEvent(t.events,"datasetscachechanged",{uri:e,action:"unloaded",cacheInfo:Ce()})))},getInfo:Ce,purge:function(){Pe={},Ie={},Se=0},get:function(e){let t;if(e.includes("&frame=")){const{frame:r,dataSet:n}=Te.retrieveMultiframeDataset(e);t=function(e,t){if(!t)return;const{NumberOfFrames:r,PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,otherElements:a}=ke(t);if(n||r>1){const{shared:r,perFrame:i}=ye(n,o,e),s={elements:{...a,...r,...i}},l=Object.create(t);return Object.assign(l,s)}return t}(r,n)}else Pe[e]&&(t=Pe[e].dataSet);return t},update:function(e,t){const r=Pe[e];r?(Se-=r.dataSet.byteArray.length,r.dataSet=t,Se+=t.byteArray.length,Xe.cornerstone.triggerEvent(Xe.cornerstone.events,"datasetscachechanged",{uri:e,action:"updated",cacheInfo:Ce()})):console.error(`No loaded dataSet for uri ${e}`)}};function Ae(e,t){const r=e.string("x00080008");if(r){const e=r.split("\\");if(e.length>t)return e[t]}}function Le(e){let t=pe(e,"x00200037",6);return!t&&e.elements.x00209116&&(t=pe(e.elements.x00209116.items[0].dataSet,"x00200037",6)),t||(t=function(e){let t;if(e.string("x00080060").includes("NM")){const r=Ae(e,2);r&&b(r)&&e.elements.x00540022&&(t=pe(e.elements.x00540022.items[0].dataSet,"x00200037",6))}return t}(e)),t}function Ee(e){let t=pe(e,"x00200032",3);return!t&&e.elements.x00209113&&(t=pe(e.elements.x00209113.items[0].dataSet,"x00200032",3)),t||(t=function(e){let t;if(e.string("x00080060").includes("NM")){const r=Ae(e,2);r&&b(r)&&e.elements.x00540022&&(t=pe(e.elements.x00540022.items[0].dataSet,"x00200032",3))}return t}(e)),t}function Me(e){let t=pe(e,"x00280030",2);return!t&&e.elements.x00289110&&(t=pe(e.elements.x00289110.items[0].dataSet,"x00280030",2)),t}function Re(e){let t;return e.elements.x00180050?t=e.floatString("x00180050"):e.elements.x00289110&&e.elements.x00289110.items.length&&e.elements.x00289110.items[0].dataSet.elements.x00180050&&(t=e.elements.x00289110.items[0].dataSet.floatString("x00180050")),t}const Fe=function(e,t){const{dicomParser:r}=Xe,n=xe(t);if("multiframeModule"===e){const e=Te.retrieveMultiframeDataset(n.url);if(!e.dataSet)return;const t=function(e,t){if(!e)return;const{NumberOfFrames:r,PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o}=ke(e);if(n||r>1){const{shared:e,perFrame:a}=ye(n,o,t);return{NumberOfFrames:r,PerFrameFunctionalInformation:a,SharedFunctionalInformation:e}}return{NumberOfFrames:r}}(e.dataSet,e.frame);return t}let o=n.url;n.frame&&(o=`${o}&frame=${n.frame}`);const a=_e.get(o);if(a){if("generalSeriesModule"===e)return{modality:a.string("x00080060"),seriesInstanceUID:a.string("x0020000e"),seriesNumber:a.intString("x00200011"),studyInstanceUID:a.string("x0020000d"),seriesDate:r.parseDA(a.string("x00080021")),seriesTime:r.parseTM(a.string("x00080031")||""),acquisitionDate:r.parseDA(a.string("x00080022")||""),acquisitionTime:r.parseTM(a.string("x00080032")||"")};if("patientStudyModule"===e)return{patientAge:a.intString("x00101010"),patientSize:a.floatString("x00101020"),patientWeight:a.floatString("x00101030")};if("imagePlaneModule"===e){const e=Le(a),t=Ee(a),r=Me(a);let n;a.elements.x00200052&&(n=a.string("x00200052"));const o=Re(a);let i;a.elements.x00201041&&(i=a.floatString("x00201041"));let s=null,l=null;r&&(l=r[0],s=r[1]);let c=null,u=null;return e&&(c=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])],u=[parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])]),{frameOfReferenceUID:n,rows:a.uint16("x00280010"),columns:a.uint16("x00280011"),imageOrientationPatient:e,rowCosines:c,columnCosines:u,imagePositionPatient:t,sliceThickness:o,sliceLocation:i,pixelSpacing:r,rowPixelSpacing:l,columnPixelSpacing:s}}if("nmMultiframeGeometryModule"===e){const e=a.string("x00080060"),t=Ae(a,2);return{modality:e,imageType:a.string("x00080008"),imageSubType:t,imageOrientationPatient:Le(a),imagePositionPatient:Ee(a),sliceThickness:Re(a),pixelSpacing:Me(a),numberOfFrames:a.uint16("x00280008"),isNMReconstructable:b(t)&&e.includes("NM")}}if("imagePixelModule"===e)return fe(a);if("modalityLutModule"===e)return{rescaleIntercept:a.floatString("x00281052"),rescaleSlope:a.floatString("x00281053"),rescaleType:a.string("x00281054"),modalityLUTSequence:ge(a.uint16("x00280103"),a.elements.x00283000)};if("voiLutModule"===e){const e=he(a);return{windowCenter:pe(a,"x00281050",1),windowWidth:pe(a,"x00281051",1),voiLUTSequence:ge(e,a.elements.x00283010)}}if("sopCommonModule"===e)return{sopClassUID:a.string("x00080016"),sopInstanceUID:a.string("x00080018")};if("petIsotopeModule"===e){const e=a.elements.x00540016;if(void 0===e)return;const t=e.items[0].dataSet;return{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:r.parseTM(t.string("x00181072")||""),radionuclideTotalDose:t.floatString("x00181074"),radionuclideHalfLife:t.floatString("x00181075")}}}return"overlayPlaneModule"===e?function(e){const t=[];for(let r=0;r<=30;r+=2){let n=`x60${r.toString(16)}`;4===n.length&&(n=`x600${r.toString(16)}`);const o=e.elements[`${n}3000`];if(!o)continue;const a=[];for(let t=0;t<o.length;t++)for(let r=0;r<8;r++){const n=e.byteArray[o.dataOffset+t];a[8*t+r]=n>>r&1}t.push({rows:e.uint16(`${n}0010`),columns:e.uint16(`${n}0011`),type:e.string(`${n}0040`),x:e.int16(`${n}0050`,1)-1,y:e.int16(`${n}0050`,0)-1,pixelData:a,description:e.string(`${n}0022`),label:e.string(`${n}1500`),roiArea:e.string(`${n}1301`),roiMean:e.string(`${n}1302`),roiStandardDeviation:e.string(`${n}1303`)})}return{overlays:t}}(a):"transferSyntax"===e?{transferSyntaxUID:a.string("x00020010")}:"petSeriesModule"===e?{correctedImage:a.string("x00280051"),units:a.string("x00541001"),decayCorrection:a.string("x00541102")}:"petImageModule"===e?{frameReferenceTime:r.floatString(a.string("x00541300")||""),actualFrameDuration:r.intString(a.string("x00181242"))}:void 0}};let Oe=[];const Be={add:function(e){return"dicomfile:"+(Oe.push(e)-1)},get:function(e){return Oe[e]},remove:function(e){Oe[e]=void 0},purge:function(){Oe=[]}};function Ue(e,t){const{dicomParser:r}=Xe;if(e.elements.x7fe00010&&e.elements.x7fe00010.basicOffsetTable.length)return r.readEncapsulatedImageFrame(e,e.elements.x7fe00010,t);if(function(e){return e.intString("x00280008")!==e.elements.x7fe00010.fragments.length}(e)){const n=r.createJPEGBasicOffsetTable(e,e.elements.x7fe00010);return r.readEncapsulatedImageFrame(e,e.elements.x7fe00010,t,n)}return r.readEncapsulatedPixelDataFromFragments(e,e.elements.x7fe00010,t)}function Ne(e,t){return e&1<<t}const je=function(e,t,r){const n=new Uint8Array(r);for(let o=0;o<r;o++){const r=e[Math.floor(o/8)+t],a=o%8;n[o]=Ne(r,a)?1:0}return n};const We=function(e,t){const r=e.elements.x7fe00010||e.elements.x7fe00008,n=e.uint16("x00280100"),o=e.uint16("x00280010"),a=e.uint16("x00280011");let i=e.uint16("x00280002");"YBR_FULL_422"===e.string("x00280004")&&(i=2,console.warn("Using SamplesPerPixel of 2 for YBR_FULL_422 photometric interpretation.\n See http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.3.html for more information."));const s=r.dataOffset,l=o*a*i;let c;if(8===n){if(c=s+t*l,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer,c,l)}if(16===n){if(c=s+t*l*2,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer,c,2*l)}if(1===n){if(c=s+t*l*.125,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return je(e.byteArray,c,l)}if(32===n){if(c=s+t*l*4,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer,c,4*l)}throw new Error("unsupported pixel format")};const Ze=function(e){const t=xe(e),r=parseInt(t.url,10),n=Be.get(r);return new Promise(((e,t)=>{const r=new FileReader;r.onload=t=>{const r=t.target.result;e(r)},r.onerror=t,r.readAsArrayBuffer(n)}))};const $e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=e.elements.x7fe00010||e.elements.x7fe00008;return r?r.encapsulatedPixelData?Ue(e,t):We(e,t):null};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;const i=(new Date).getTime(),s={cancelFn:void 0,promise:void 0};return s.promise=new Promise(((l,c)=>{e.then((e=>{const u=$e(e,r),d=e.string("x00020010"),f=(new Date).getTime(),m=se(t,u,d,o);!function(e,t){e.decache=function(){const e=xe(t);_e.unload(e.url)}}(s,t),m.then((t=>{t.data=e,t.sharedCacheKey=n;const r=(new Date).getTime();t.loadTimeInMS=f-i,t.totalTimeInMS=r-i,void 0!==a&&void 0!==a.imageDoneCallback&&a.imageDoneCallback(t),l(t)}),(function(t){c({error:t,dataSet:e})}))}),(function(e){c({error:e})}))})),s}function Ve(e){return"dicomweb"===e||"wadouri"===e?A:"dicomfile"===e?Ze:void 0}function qe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=xe(e);t=Object.assign({},t);let n=t.loader;if(void 0===n?n=Ve(r.scheme):delete t.loader,_e.isLoaded(r.url)){return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const a=(new Date).getTime();return{promise:new Promise(((i,s)=>{const l=(new Date).getTime();let c;try{const n=$e(e,r),a=e.string("x00020010");c=se(t,n,a,o)}catch(t){return void s({error:t,dataSet:e})}c.then((t=>{t.data=e,t.sharedCacheKey=n;const r=(new Date).getTime();t.loadTimeInMS=l-a,t.totalTimeInMS=r-a,i(t)}),s)})),cancelFn:void 0}}(_e.get(r.url,n,e),e,r.pixelDataFrame,r.url,t)}return Ge(_e.load(r.url,n,e),e,r.frame,r.url,t)}const ze={metaData:{getImagePixelModule:fe,getLUTs:ge,getModalityLUTOutputPixelRepresentation:he,getNumberValues:pe,metaDataProvider:Fe},dataSetCacheManager:_e,fileManager:Be,getEncapsulatedImageFrame:Ue,getUncompressedImageFrame:We,loadFileRequest:Ze,loadImageFromPromise:Ge,getLoaderForScheme:Ve,loadImage:qe,parseImageId:xe,unpackBinaryFrame:je,register:function(e){e.registerImageLoader("dicomweb",qe),e.registerImageLoader("wadouri",qe),e.registerImageLoader("dicomfile",qe),e.metaData.addProvider(Fe)}};const Ye=function(e){ce.register(e),ze.register(e)};let He,Ke;const Je={set cornerstone(e){He=e,Ye(He)},get cornerstone(){if(!He){if(He=window&&window.cornerstone,!He)throw new Error("cornerstoneDICOMImageLoader requires a copy of Cornerstone to work properly. Please add cornerstoneDICOMImageLoader.external.cornerstone = cornerstone; to your application.");Ye(He)}return He},set dicomParser(e){Ke=e},get dicomParser(){if(!Ke){if(!window||!window.dicomParser)throw new Error("cornerstoneDICOMImageLoader requires a copy of dicomParser to work properly. Please add cornerstoneDICOMImageLoader.external.dicomParser = dicomParser; to your application.");Ke=window.dicomParser}return Ke}},Xe=Je;function Qe(e,t){const r=e.length,n=new Uint8ClampedArray(r);for(let o=0;o<r;++o)n[o]=e[o]>>t;return n}function et(e,t,r){const n=e.columns*e.rows,o=e.pixelData;let a=e.redPaletteColorLookupTableData;a||(a=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.redPaletteColorLookupTableData);let i=e.greenPaletteColorLookupTableData;i||(i=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.greenPaletteColorLookupTableData);let s=e.bluePaletteColorLookupTableData;if(s||(s=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.bluePaletteColorLookupTableData),!a||!i||!s)throw new Error("The image does not have a complete color palette. R, G, and B palette data are required.");const l=e.redPaletteColorLookupTableData.length;let c=0,u=0;const d=e.redPaletteColorLookupTableDescriptor[1],f=8===e.redPaletteColorLookupTableDescriptor[2]?0:8,m=Qe(a,f),g=Qe(i,f),h=Qe(s,f);if(r)for(let e=0;e<n;++e){let e=o[c++];e<d?e=0:e>d+l-1?e=l-1:e-=d,t[u++]=m[e],t[u++]=g[e],t[u++]=h[e],t[u++]=255}else for(let e=0;e<n;++e){let e=o[c++];e<d?e=0:e>d+l-1?e=l-1:e-=d,t[u++]=m[e],t[u++]=g[e],t[u++]=h[e]}}const tt=function(e){C(e)},rt={convertRGBColorByPixel:e,convertRGBColorByPlane:t,convertYBRFullByPixel:o,convertYBRFullByPlane:a,convertPALETTECOLOR:et,wadouri:ze,wadors:ce,configure:tt,convertColorSpace:O,createImage:se,decodeImageFrame:ee,decodeJPEGBaseline8BitColor:U,getImageFrame:te,getPixelData:M,getMinMax:R,isColorImage:re,isJPEGBaseline8BitColor:ne,webWorkerManager:J,internal:L,external:Je}})(),n})()));
|
|
7
|
+
!function(e,t){ true?module.exports=t():0}(this,(()=>(()=>{"use strict";var e={578:(e,t,r)=>{const n=r(823),o=r(187),a=r(592),i=r(604),s=r(249),l=r(968),c=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:d,Z_OK:f,Z_STREAM_END:m,Z_NEED_DICT:g,Z_STREAM_ERROR:h,Z_DATA_ERROR:p,Z_MEM_ERROR:x}=r(684);function w(e){this.options=o.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==f)throw new Error(i[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==f)))throw new Error(i[r])}function b(e,t){const r=new w(t);if(r.push(e),r.err)throw r.msg||i[r.err];return r.result}w.prototype.push=function(e,t){const r=this.strm,o=this.options.chunkSize,i=this.options.dictionary;let s,l,w;if(this.ended)return!1;for(l=t===~~t?t:!0===t?d:u,"[object ArrayBuffer]"===c.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),s=n.inflate(r,l),s===g&&i&&(s=n.inflateSetDictionary(r,i),s===f?s=n.inflate(r,l):s===p&&(s=g));r.avail_in>0&&s===m&&r.state.wrap>0&&0!==e[r.next_in];)n.inflateReset(r),s=n.inflate(r,l);switch(s){case h:case p:case g:case x:return this.onEnd(s),this.ended=!0,!1}if(w=r.avail_out,r.next_out&&(0===r.avail_out||s===m))if("string"===this.options.to){let e=a.utf8border(r.output,r.next_out),t=r.next_out-e,n=a.buf2string(r.output,e);r.next_out=t,r.avail_out=o-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(s!==f||0!==w){if(s===m)return s=n.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},w.prototype.onData=function(e){this.chunks.push(e)},w.prototype.onEnd=function(e){e===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Hq=function(e,t){return(t=t||{}).raw=!0,b(e,t)},r(684)},187:e=>{const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r<n;r++)t+=e[r].length;const r=new Uint8Array(t);for(let t=0,n=0,o=e.length;t<o;t++){let o=e[t];r.set(o,n),n+=o.length}return r}},592:e=>{let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)r=e.charCodeAt(o),55296==(64512&r)&&o+1<i&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(s),a=0,o=0;a<s;o++)r=e.charCodeAt(o),55296==(64512&r)&&o+1<i&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t};e.exports.buf2string=(e,n)=>{const o=n||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,n));let a,i;const s=new Array(2*o);for(i=0,a=0;a<o;){let t=e[a++];if(t<128){s[i++]=t;continue}let n=r[t];if(n>4)s[i++]=65533,a+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&a<o;)t=t<<6|63&e[a++],n--;n>1?s[i++]=65533:t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t<r;t++)n+=String.fromCharCode(e[t]);return n})(s,i)},e.exports.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},693:e=>{e.exports=(e,t,r,n)=>{let o=65535&e|0,a=e>>>16&65535|0,i=0;for(;0!==r;){i=r>2e3?2e3:r,r-=i;do{o=o+t[n++]|0,a=a+o|0}while(--i);o%=65521,a%=65521}return o|a<<16|0}},684:e=>{e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},464:e=>{const t=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());e.exports=(e,r,n,o)=>{const a=t,i=o+n;e^=-1;for(let t=o;t<i;t++)e=e>>>8^a[255&(e^r[t])];return-1^e}},968:e=>{e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},365:e=>{const t=16209;e.exports=function(e,r){let n,o,a,i,s,l,c,u,d,f,m,g,h,p,x,w,b,y,k,v,D,T,S,P;const I=e.state;n=e.next_in,S=e.input,o=n+(e.avail_in-5),a=e.next_out,P=e.output,i=a-(r-e.avail_out),s=a+(e.avail_out-257),l=I.dmax,c=I.wsize,u=I.whave,d=I.wnext,f=I.window,m=I.hold,g=I.bits,h=I.lencode,p=I.distcode,x=(1<<I.lenbits)-1,w=(1<<I.distbits)-1;e:do{g<15&&(m+=S[n++]<<g,g+=8,m+=S[n++]<<g,g+=8),b=h[m&x];t:for(;;){if(y=b>>>24,m>>>=y,g-=y,y=b>>>16&255,0===y)P[a++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=h[(65535&b)+(m&(1<<y)-1)];continue t}if(32&y){I.mode=16191;break e}e.msg="invalid literal/length code",I.mode=t;break e}k=65535&b,y&=15,y&&(g<y&&(m+=S[n++]<<g,g+=8),k+=m&(1<<y)-1,m>>>=y,g-=y),g<15&&(m+=S[n++]<<g,g+=8,m+=S[n++]<<g,g+=8),b=p[m&w];r:for(;;){if(y=b>>>24,m>>>=y,g-=y,y=b>>>16&255,!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<<y)-1)];continue r}e.msg="invalid distance code",I.mode=t;break e}if(v=65535&b,y&=15,g<y&&(m+=S[n++]<<g,g+=8,g<y&&(m+=S[n++]<<g,g+=8)),v+=m&(1<<y)-1,v>l){e.msg="invalid distance too far back",I.mode=t;break e}if(m>>>=y,g-=y,y=a-i,v>y){if(y=v-y,y>u&&I.sane){e.msg="invalid distance too far back",I.mode=t;break e}if(D=0,T=f,0===d){if(D+=c-y,y<k){k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}}else if(d<y){if(D+=c+d-y,y-=d,y<k){k-=y;do{P[a++]=f[D++]}while(--y);if(D=0,d<k){y=d,k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}}}else if(D+=d-y,y<k){k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}for(;k>2;)P[a++]=T[D++],P[a++]=T[D++],P[a++]=T[D++],k-=3;k&&(P[a++]=T[D++],k>1&&(P[a++]=T[D++]))}else{D=a-v;do{P[a++]=P[D++],P[a++]=P[D++],P[a++]=P[D++],k-=3}while(k>2);k&&(P[a++]=P[D++],k>1&&(P[a++]=P[D++]))}break}}break}}while(n<o&&a<s);k=g>>3,n-=k,g-=k<<3,m&=(1<<g)-1,e.next_in=n,e.next_out=a,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=a<s?s-a+257:257-(a-s),I.hold=m,I.bits=g}},823:(e,t,r)=>{const n=r(693),o=r(464),a=r(365),i=r(446),{Z_FINISH:s,Z_BLOCK:l,Z_TREES:c,Z_OK:u,Z_STREAM_END:d,Z_NEED_DICT:f,Z_STREAM_ERROR:m,Z_DATA_ERROR:g,Z_MEM_ERROR:h,Z_BUF_ERROR:p,Z_DEFLATED:x}=r(684),w=16180,b=16190,y=16191,k=16192,v=16194,D=16199,T=16200,S=16206,P=16209,I=16210,C=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function _(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const A=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<w||t.mode>16211?1:0},L=e=>{if(A(e))return m;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=w,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},E=e=>{if(A(e))return m;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,L(e)},M=(e,t)=>{let r;if(A(e))return m;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?m:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,E(e))},R=(e,t)=>{if(!e)return m;const r=new _;e.state=r,r.strm=e,r.window=null,r.mode=w;const n=M(e,t);return n!==u&&(e.state=null),n};let F,O,B=!0;const U=e=>{if(B){F=new Int32Array(512),O=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(i(1,e.lens,0,288,F,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;i(2,e.lens,0,32,O,0,e.work,{bits:5}),B=!1}e.lencode=F,e.lenbits=9,e.distcode=O,e.distbits=5},N=(e,t,r,n)=>{let o;const a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>n&&(o=n),a.window.set(t.subarray(r-n,r-n+o),a.wnext),(n-=o)?(a.window.set(t.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0};e.exports.inflateReset=E,e.exports.inflateReset2=M,e.exports.inflateResetKeep=L,e.exports.inflateInit=e=>R(e,15),e.exports.inflateInit2=R,e.exports.inflate=(e,t)=>{let r,_,L,E,M,R,F,O,B,j,W,Z,$,G,V,q,z,Y,H,K,J,X,Q=0;const ee=new Uint8Array(4);let te,re;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(A(e)||!e.output||!e.input&&0!==e.avail_in)return m;r=e.state,r.mode===y&&(r.mode=k),M=e.next_out,L=e.output,F=e.avail_out,E=e.next_in,_=e.input,R=e.avail_in,O=r.hold,B=r.bits,j=R,W=F,X=u;e:for(;;)switch(r.mode){case w:if(0===r.wrap){r.mode=k;break}for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(2&r.wrap&&35615===O){0===r.wbits&&(r.wbits=15),r.check=0,ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0),O=0,B=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&O)<<8)+(O>>8))%31){e.msg="incorrect header check",r.mode=P;break}if((15&O)!==x){e.msg="unknown compression method",r.mode=P;break}if(O>>>=4,B-=4,J=8+(15&O),0===r.wbits&&(r.wbits=J),J>15||J>r.wbits){e.msg="invalid window size",r.mode=P;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=512&O?16189:y,O=0,B=0;break;case 16181:for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(r.flags=O,(255&r.flags)!==x){e.msg="unknown compression method",r.mode=P;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=P;break}r.head&&(r.head.text=O>>8&1),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0,r.mode=16182;case 16182:for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.head&&(r.head.time=O),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,ee[2]=O>>>16&255,ee[3]=O>>>24&255,r.check=o(r.check,ee,4,0)),O=0,B=0,r.mode=16183;case 16183:for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.head&&(r.head.xflags=255&O,r.head.os=O>>8),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0,r.mode=16184;case 16184:if(1024&r.flags){for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.length=O,r.head&&(r.head.extra_len=O),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(Z=r.length,Z>R&&(Z=R),Z&&(r.head&&(J=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(_.subarray(E,E+Z),J)),512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,r.length-=Z),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===R)break e;Z=0;do{J=_[E+Z++],r.head&&J&&r.length<65536&&(r.head.name+=String.fromCharCode(J))}while(J&&Z<R);if(512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,J)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===R)break e;Z=0;do{J=_[E+Z++],r.head&&J&&r.length<65536&&(r.head.comment+=String.fromCharCode(J))}while(J&&Z<R);if(512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,J)break e}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(4&r.wrap&&O!==(65535&r.check)){e.msg="header crc mismatch",r.mode=P;break}O=0,B=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=y;break;case 16189:for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}e.adler=r.check=C(O),O=0,B=0,r.mode=b;case b:if(0===r.havedict)return e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,f;e.adler=r.check=1,r.mode=y;case y:if(t===l||t===c)break e;case k:if(r.last){O>>>=7&B,B-=7&B,r.mode=S;break}for(;B<3;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}switch(r.last=1&O,O>>>=1,B-=1,3&O){case 0:r.mode=16193;break;case 1:if(U(r),r.mode=D,t===c){O>>>=2,B-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=P}O>>>=2,B-=2;break;case 16193:for(O>>>=7&B,B-=7&B;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if((65535&O)!=(O>>>16^65535)){e.msg="invalid stored block lengths",r.mode=P;break}if(r.length=65535&O,O=0,B=0,r.mode=v,t===c)break e;case v:r.mode=16195;case 16195:if(Z=r.length,Z){if(Z>R&&(Z=R),Z>F&&(Z=F),0===Z)break e;L.set(_.subarray(E,E+Z),M),R-=Z,E+=Z,F-=Z,M+=Z,r.length-=Z;break}r.mode=y;break;case 16196:for(;B<14;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(r.nlen=257+(31&O),O>>>=5,B-=5,r.ndist=1+(31&O),O>>>=5,B-=5,r.ncode=4+(15&O),O>>>=4,B-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=P;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;B<3;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.lens[ne[r.have++]]=7&O,O>>>=3,B-=3}for(;r.have<19;)r.lens[ne[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,te={bits:r.lenbits},X=i(0,r.lens,0,19,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid code lengths set",r.mode=P;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;Q=r.lencode[O&(1<<r.lenbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(z<16)O>>>=V,B-=V,r.lens[r.have++]=z;else{if(16===z){for(re=V+2;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(O>>>=V,B-=V,0===r.have){e.msg="invalid bit length repeat",r.mode=P;break}J=r.lens[r.have-1],Z=3+(3&O),O>>>=2,B-=2}else if(17===z){for(re=V+3;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=V,B-=V,J=0,Z=3+(7&O),O>>>=3,B-=3}else{for(re=V+7;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=V,B-=V,J=0,Z=11+(127&O),O>>>=7,B-=7}if(r.have+Z>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=P;break}for(;Z--;)r.lens[r.have++]=J}}if(r.mode===P)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=P;break}if(r.lenbits=9,te={bits:r.lenbits},X=i(1,r.lens,0,r.nlen,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid literal/lengths set",r.mode=P;break}if(r.distbits=6,r.distcode=r.distdyn,te={bits:r.distbits},X=i(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,te),r.distbits=te.bits,X){e.msg="invalid distances set",r.mode=P;break}if(r.mode=D,t===c)break e;case D:r.mode=T;case T:if(R>=6&&F>=258){e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,a(e,W),M=e.next_out,L=e.output,F=e.avail_out,E=e.next_in,_=e.input,R=e.avail_in,O=r.hold,B=r.bits,r.mode===y&&(r.back=-1);break}for(r.back=0;Q=r.lencode[O&(1<<r.lenbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(q&&0==(240&q)){for(Y=V,H=q,K=z;Q=r.lencode[K+((O&(1<<Y+H)-1)>>Y)],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(Y+V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=Y,B-=Y,r.back+=Y}if(O>>>=V,B-=V,r.back+=V,r.length=z,0===q){r.mode=16205;break}if(32&q){r.back=-1,r.mode=y;break}if(64&q){e.msg="invalid literal/length code",r.mode=P;break}r.extra=15&q,r.mode=16201;case 16201:if(r.extra){for(re=r.extra;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.length+=O&(1<<r.extra)-1,O>>>=r.extra,B-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;Q=r.distcode[O&(1<<r.distbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(0==(240&q)){for(Y=V,H=q,K=z;Q=r.distcode[K+((O&(1<<Y+H)-1)>>Y)],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(Y+V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=Y,B-=Y,r.back+=Y}if(O>>>=V,B-=V,r.back+=V,64&q){e.msg="invalid distance code",r.mode=P;break}r.offset=z,r.extra=15&q,r.mode=16203;case 16203:if(r.extra){for(re=r.extra;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.offset+=O&(1<<r.extra)-1,O>>>=r.extra,B-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=P;break}r.mode=16204;case 16204:if(0===F)break e;if(Z=W-F,r.offset>Z){if(Z=r.offset-Z,Z>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=P;break}Z>r.wnext?(Z-=r.wnext,$=r.wsize-Z):$=r.wnext-Z,Z>r.length&&(Z=r.length),G=r.window}else G=L,$=M-r.offset,Z=r.length;Z>F&&(Z=F),F-=Z,r.length-=Z;do{L[M++]=G[$++]}while(--Z);0===r.length&&(r.mode=T);break;case 16205:if(0===F)break e;L[M++]=r.length,F--,r.mode=T;break;case S:if(r.wrap){for(;B<32;){if(0===R)break e;R--,O|=_[E++]<<B,B+=8}if(W-=F,e.total_out+=W,r.total+=W,4&r.wrap&&W&&(e.adler=r.check=r.flags?o(r.check,L,W,M-W):n(r.check,L,W,M-W)),W=F,4&r.wrap&&(r.flags?O:C(O))!==r.check){e.msg="incorrect data check",r.mode=P;break}O=0,B=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(4&r.wrap&&O!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=P;break}O=0,B=0}r.mode=16208;case 16208:X=d;break e;case P:X=g;break e;case I:return h;default:return m}return e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,(r.wsize||W!==e.avail_out&&r.mode<P&&(r.mode<S||t!==s))&&N(e,e.output,e.next_out,W-e.avail_out)?(r.mode=I,h):(j-=e.avail_in,W-=e.avail_out,e.total_in+=j,e.total_out+=W,r.total+=W,4&r.wrap&&W&&(e.adler=r.check=r.flags?o(r.check,L,W,e.next_out-W):n(r.check,L,W,e.next_out-W)),e.data_type=r.bits+(r.last?64:0)+(r.mode===y?128:0)+(r.mode===D||r.mode===v?256:0),(0===j&&0===W||t===s)&&X===u&&(X=p),X)},e.exports.inflateEnd=e=>{if(A(e))return m;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(A(e))return m;const r=e.state;return 0==(2&r.wrap)?m:(r.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const r=t.length;let o,a,i;return A(e)?m:(o=e.state,0!==o.wrap&&o.mode!==b?m:o.mode===b&&(a=1,a=n(a,t,r,0),a!==o.check)?g:(i=N(e,t,r,r),i?(o.mode=I,h):(o.havedict=1,u)))},e.exports.inflateInfo="pako inflate (from Nodeca project)"},446:e=>{const t=15,r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),o=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),a=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,i,s,l,c,u,d,f)=>{const m=f.bits;let g,h,p,x,w,b,y=0,k=0,v=0,D=0,T=0,S=0,P=0,I=0,C=0,_=0,A=null;const L=new Uint16Array(16),E=new Uint16Array(16);let M,R,F,O=null;for(y=0;y<=t;y++)L[y]=0;for(k=0;k<l;k++)L[i[s+k]]++;for(T=m,D=t;D>=1&&0===L[D];D--);if(T>D&&(T=D),0===D)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(v=1;v<D&&0===L[v];v++);for(T<v&&(T=v),I=1,y=1;y<=t;y++)if(I<<=1,I-=L[y],I<0)return-1;if(I>0&&(0===e||1!==D))return-1;for(E[1]=0,y=1;y<t;y++)E[y+1]=E[y]+L[y];for(k=0;k<l;k++)0!==i[s+k]&&(d[E[i[s+k]]++]=k);if(0===e?(A=O=d,b=20):1===e?(A=r,O=n,b=257):(A=o,O=a,b=0),_=0,k=0,y=v,w=u,S=T,P=0,p=-1,C=1<<T,x=C-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){M=y-P,d[k]+1<b?(R=0,F=d[k]):d[k]>=b?(R=O[d[k]-b],F=A[d[k]-b]):(R=96,F=0),g=1<<y-P,h=1<<S,v=h;do{h-=g,c[w+(_>>P)+h]=M<<24|R<<16|F|0}while(0!==h);for(g=1<<y-1;_&g;)g>>=1;if(0!==g?(_&=g-1,_+=g):_=0,k++,0==--L[y]){if(y===D)break;y=i[s+d[k]]}if(y>T&&(_&x)!==p){for(0===P&&(P=T),w+=v,S=y-P,I=1<<S;S+P<D&&(I-=L[S+P],!(I<=0));)S++,I<<=1;if(C+=1<<S,1===e&&C>852||2===e&&C>592)return 1;p=_&x,c[p]=T<<24|S<<16|w-u|0}}return 0!==_&&(c[w+_]=y-P<<24|64<<16|0),f.bits=T,0}},604:e=>{e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},249:e=>{e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var n={};return(()=>{function e(e,t,r){if(void 0===e)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");const n=e.length/3;let o=0,a=0;if(r)for(let r=0;r<n;r++)t[a++]=e[o++],t[a++]=e[o++],t[a++]=e[o++],t[a++]=255;else t.set(e)}function t(e,t,r){if(void 0===e)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");const n=e.length/3;let o=0,a=0,i=n,s=2*n;if(r)for(let r=0;r<n;r++)t[o++]=e[a++],t[o++]=e[i++],t[o++]=e[s++],t[o++]=255;else t.set(e)}function o(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/3;let o=0,a=0;if(r)for(let r=0;r<n;r++){const r=e[o++],n=e[o++],i=e[o++];t[a++]=r+1.402*(i-128),t[a++]=r-.34414*(n-128)-.71414*(i-128),t[a++]=r+1.772*(n-128),t[a++]=255}else for(let r=0;r<n;r++){const r=e[o++],n=e[o++],i=e[o++];t[a++]=r+1.402*(i-128),t[a++]=r-.34414*(n-128)-.71414*(i-128),t[a++]=r+1.772*(n-128)}}function a(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/3;let o=0,a=0,i=n,s=2*n;if(r)for(let r=0;r<n;r++){const r=e[a++],n=e[i++],l=e[s++];t[o++]=r+1.402*(l-128),t[o++]=r-.34414*(n-128)-.71414*(l-128),t[o++]=r+1.772*(n-128),t[o++]=255}else for(let r=0;r<n;r++){const r=e[a++],n=e[i++],l=e[s++];t[o++]=r+1.402*(l-128),t[o++]=r-.34414*(n-128)-.71414*(l-128),t[o++]=r+1.772*(n-128)}}r.r(n),r.d(n,{configure:()=>tt,convertColorSpace:()=>O,convertPALETTECOLOR:()=>et,convertRGBColorByPixel:()=>e,convertRGBColorByPlane:()=>t,convertYBRFullByPixel:()=>o,convertYBRFullByPlane:()=>a,createImage:()=>se,decodeImageFrame:()=>ee,decodeJPEGBaseline8BitColor:()=>U,default:()=>rt,external:()=>Xe,getImageFrame:()=>te,getMinMax:()=>R,getPixelData:()=>M,internal:()=>L,isColorImage:()=>re,isJPEGBaseline8BitColor:()=>ne,wadors:()=>ce,wadouri:()=>ze,webWorkerManager:()=>J});const i=function(e,t,r){return t=t||0,e&&e.Value?e.Value.length<=t?r:e.Value[t]:r};const s=function(e,t,r){const n=i(e,t,r);if(void 0!==n)return parseFloat(n)};const l=function(e,t){const r=i(e,t);if(void 0!==r)return parseFloat(r)};const c=function(e,t){if(!e)return;if(!e.Value)return;if(!Array.isArray(e.Value))return;if(t&&e.Value.length<t)return;const r=[];for(let t=0;t<e.Value.length;t++)r.push(parseFloat(e.Value[t]));return r};function u(e){const t=e.indexOf(":");return e.substring(t+1)}function d(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&e.Value?e.Value[0]&&t?e.Value[0]:e.Value:e}function f(e,t,r){return{shared:(t?Object.values(t[0]):[]).map((e=>e[0])).filter((e=>void 0!==e&&"object"==typeof e)),perFrame:(e?Object.values(e[r-1]):[]).map((e=>e.Value[0])).filter((e=>void 0!==e&&"object"==typeof e))}}function m(e){let{52009230:t,52009229:r,"00280008":n,...o}=e;return t=d(t,!1),r=d(r,!1),n=d(n),{PerFrameFunctionalGroupsSequence:t,SharedFunctionalGroupsSequence:r,NumberOfFrames:n,rest:o}}function g(e){const t=e.indexOf("/frames/")+8,r=e.slice(0,t),n=parseInt(e.slice(t),10);return{metadata:p[`${r}1`],frame:n}}const h={_retrieveMultiframeMetadata:g,retrieveMultiframeMetadata:function(e){return g(u(e))},isMultiframe:function(e){const t=i(e["00280008"]);return t&&t>1}};let p=[],x={};const w={add:function(e,t){const r=u(e);t.isMultiframe=h.isMultiframe(t),p[r]=t},get:function(e){const t=u(e),r=p[t];if(r&&!r?.isMultiframe)return r;const n=x[t];if(n)return n;const o=h._retrieveMultiframeMetadata(t);if(!o||!o.metadata)return;const{metadata:a,frame:i}=o;if(a){const e=function(e,t){const{PerFrameFunctionalGroupsSequence:r,SharedFunctionalGroupsSequence:n,NumberOfFrames:o,rest:a}=m(t);if(r||o>1){const{shared:i,perFrame:s}=f(r,n,e),l=Object.assign(t,{frameNumber:e});return[...i,...s].forEach((e=>{Object.entries(e).forEach((e=>{let[t,r]=e;l[t]=r}))})),Object.assign(a,{"00280008":o},l)}return t}(i,a);return x[t]=e,e}},remove:function(e){const t=u(e);p[t]=void 0,x[t]=void 0},purge:function(){p=[],x={}}};function b(e){return"RECON TOMO"===e||"RECON GATED TOMO"===e}function y(e){return i(e["00080060"]).includes("NM")}function k(e,t){const r=d(e["00080008"],!1);if(r)return r[t]}function v(e){let t=c(e["00200037"],6);return!t&&y(e)&&(t=function(e){let t;const r=k(e,2);if(r&&b(r)){const r=d(e["00540022"]);r&&(t=c(r["00200037"],6))}return t}(e)),t}function D(e){let t=c(e["00200032"],3);return!t&&y(e)&&(t=function(e){let t;const r=k(e,2);if(r&&b(r)){const r=d(e["00540022"]);r&&(t=c(r["00200032"],3))}return t}(e)),t}const T=function(e,t){if("multiframeModule"===e){const{metadata:e,frame:r}=h.retrieveMultiframeMetadata(t);if(!e)return;const{PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,NumberOfFrames:a}=m(e);if(n||a>1){const{shared:e,perFrame:t}=f(n,o,r);return{NumberOfFrames:a,PerFrameFunctionalInformation:t,SharedFunctionalInformation:e}}return{NumberOfFrames:a}}const{dicomParser:r}=Xe,n=w.get(t);if(n){if("generalSeriesModule"===e)return{modality:i(n["00080060"]),seriesInstanceUID:i(n["0020000E"]),seriesNumber:l(n["00200011"]),studyInstanceUID:i(n["0020000D"]),seriesDate:r.parseDA(i(n["00080021"])),seriesTime:r.parseTM(i(n["00080031"],0,"")),acquisitionDate:r.parseDA(i(n["00080022"]),""),acquisitionTime:r.parseTM(i(n["00080032"],0,""))};if("patientStudyModule"===e)return{patientAge:l(n["00101010"]),patientSize:l(n["00101020"]),patientSex:i(n["00100040"]),patientWeight:l(n["00101030"])};if("nmMultiframeGeometryModule"===e){const e=i(n["00080060"]),t=k(n,2);return{modality:e,imageType:i(n["00080008"]),imageSubType:t,imageOrientationPatient:v(n),imagePositionPatient:D(n),sliceThickness:l(n["00180050"]),pixelSpacing:c(n["00280030"],2),numberOfFrames:l(n["00280008"]),isNMReconstructable:b(t)&&e.includes("NM")}}if("imagePlaneModule"===e){const e=v(n),t=D(n),r=c(n["00280030"],2);let o=null,a=null;r&&(a=r[0],o=r[1]);let s=null,u=null;return e&&(s=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])],u=[parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])]),{frameOfReferenceUID:i(n["00200052"]),rows:l(n["00280010"]),columns:l(n["00280011"]),imageOrientationPatient:e,rowCosines:s,columnCosines:u,imagePositionPatient:t,sliceThickness:l(n["00180050"]),sliceLocation:l(n["00201041"]),pixelSpacing:r,rowPixelSpacing:a,columnPixelSpacing:o}}if("imagePixelModule"===e)return{samplesPerPixel:l(n["00280002"]),photometricInterpretation:i(n["00280004"]),rows:l(n["00280010"]),columns:l(n["00280011"]),bitsAllocated:l(n["00280100"]),bitsStored:l(n["00280101"]),highBit:i(n["00280102"]),pixelRepresentation:l(n["00280103"]),planarConfiguration:l(n["00280006"]),pixelAspectRatio:i(n["00280034"]),smallestPixelValue:l(n["00280106"]),largestPixelValue:l(n["00280107"]),redPaletteColorLookupTableDescriptor:c(n["00281101"]),greenPaletteColorLookupTableDescriptor:c(n["00281102"]),bluePaletteColorLookupTableDescriptor:c(n["00281103"]),redPaletteColorLookupTableData:c(n["00281201"]),greenPaletteColorLookupTableData:c(n["00281202"]),bluePaletteColorLookupTableData:c(n["00281203"])};if("voiLutModule"===e)return{windowCenter:c(n["00281050"],1),windowWidth:c(n["00281051"],1)};if("modalityLutModule"===e)return{rescaleIntercept:l(n["00281052"]),rescaleSlope:l(n["00281053"]),rescaleType:i(n["00281054"])};if("sopCommonModule"===e)return{sopClassUID:i(n["00080016"]),sopInstanceUID:i(n["00080018"])};if("petIsotopeModule"===e){const e=i(n["00540016"]);if(void 0===e)return;return{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:r.parseTM(i(e["00181072"],0,"")),radiopharmaceuticalStartDateTime:i(e["00181078"],0,""),radionuclideTotalDose:l(e["00181074"]),radionuclideHalfLife:l(e["00181075"])}}}return"overlayPlaneModule"===e?function(e){const t=[];for(let r=0;r<=30;r+=2){let n=`x60${r.toString(16)}`;4===n.length&&(n=`x600${r.toString(16)}`);const o=i(e[`${n}3000`]);if(!o)continue;const a=[];for(let t=0;t<o.length;t++)for(let r=0;r<8;r++){const n=e.Value[o.dataOffset+t];a[8*t+r]=n>>r&1}t.push({rows:l(e[`${n}0010`]),columns:l(e[`${n}0011`]),type:i(e[`${n}0040`]),x:l(e[`${n}0050`],1)-1,y:l(e[`${n}0050`],0)-1,pixelData:a,description:i(e[`${n}0022`]),label:i(e[`${n}1500`]),roiArea:i(e[`${n}1301`]),roiMean:i(e[`${n}1302`]),roiStandardDeviation:i(e[`${n}1303`])})}return{overlays:t}}(n):"transferSyntax"===e?{transferSyntaxUID:i(n["00020010"])}:"petSeriesModule"===e?{correctedImage:i(n["00280051"]),units:i(n["00541001"]),decayCorrection:i(n["00541102"])}:"petImageModule"===e?{frameReferenceTime:l(n["00541300"]),actualFrameDuration:l(n["00181242"])}:void 0}};function S(e,t,r){if(r+e.length>t.length)return!1;let n=r;for(let r=0;r<e.length;r++)if(e[r]!==t[n++])return!1;return!0}const P=function(e,t,r){r=r||0;const n=function(e){const t=new Uint8Array(e.length);for(let r=0,n=e.length;r<n;r++)t[r]=e.charCodeAt(r);return t}(t);for(let t=r;t<e.length;t++)if(n[0]===e[t]&&S(n,e,t))return t;return-1};let I={open(e,t){e.open("get",t,!0)},beforeSend(){},beforeProcessing:e=>Promise.resolve(e.response),imageCreated(){},strict:!1,decodeConfig:{convertFloatPixelDataToInt:!0,use16BitDataType:!1}};function C(e){I=Object.assign(I,e)}function _(){return I}const A=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{cornerstone:o}=Xe,a=_(),i=e=>{if("function"==typeof a.errorInterceptor){const t=new Error("request failed");t.request=e,t.response=e.response,t.status=e.status,a.errorInterceptor(t)}},s=new XMLHttpRequest,l=new Promise(((l,c)=>{a.open(s,e,r,n);const u=a.beforeSend(s,t,r,n);s.responseType="arraybuffer";const d=Object.assign({},r,u);Object.keys(d).forEach((function(t){null!==d[t]&&("Accept"===t&&-1!==e.indexOf("accept=")||s.setRequestHeader(t,d[t]))})),n.deferred={resolve:l,reject:c},n.url=e,n.imageId=t,s.onloadstart=function(r){a.onloadstart&&a.onloadstart(r,n);const i={url:e,imageId:t};o.triggerEvent(o.events,"cornerstoneimageloadstart",i)},s.onloadend=function(r){a.onloadend&&a.onloadend(r,n);const i={url:e,imageId:t};o.triggerEvent(o.events,"cornerstoneimageloadend",i)},s.onreadystatechange=function(e){a.onreadystatechange?a.onreadystatechange(e,n):4===s.readyState&&(200===s.status?a.beforeProcessing(s).then(l).catch((()=>{i(s),c(s)})):(i(s),c(s)))},s.onprogress=function(r){const i=r.loaded;let s,l;r.lengthComputable&&(s=r.total,l=Math.round(i/s*100)),a.onprogress&&a.onprogress(r,n);const c={url:e,imageId:t,loaded:i,total:s,percentComplete:l};o.triggerEvent(o.events,o.EVENTS.IMAGE_LOAD_PROGRESS,c)},s.onerror=function(){i(s),c(s)},s.onabort=function(){i(s),c(s)},s.send()}));return l.xhr=s,l},L={xhrRequest:A,setOptions:C,getOptions:_};function E(e){for(let t=0;t<e.length;t++)if("Content-Type:"===e[t].substr(0,13))return e[t].substr(13).trim()}const M=function(e,t){const r={Accept:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/octet-stream"};return new Promise(((n,o)=>{const a=A(e,t,r),{xhr:i}=a;a.then((function(e){const t=new Uint8Array(e),r=i.getResponseHeader("Content-Type")||"application/octet-stream";if(-1===r.indexOf("multipart"))return void n({contentType:r,imageFrame:{pixelData:t}});const a=P(t,"\r\n\r\n");-1===a&&o(new Error("invalid response - no multipart mime header"));const s=function(e,t,r){t=t||0,r=r||e.length-t;let n="";for(let o=t;o<t+r;o++)n+=String.fromCharCode(e[o]);return n}(t,0,a),l=s.split("\r\n"),c=function(e){for(let t=0;t<e.length;t++)if("--"===e[t].substr(0,2))return e[t]}(l);c||o(new Error("invalid response - no boundary marker"));const u=a+4,d=P(t,c,u);-1===d&&o(new Error("invalid response - terminating boundary not found"));const f=d-u-2;n({contentType:E(l),imageFrame:{pixelData:new Uint8Array(e,u,f)}})}),o)}))};const R=function(e){let t,r=e[0],n=e[0];const o=e.length;for(let a=1;a<o;a++)t=e[a],r=Math.min(r,t),n=Math.max(n,t);return{min:r,max:n}};function F(r,n,o){0===r.planarConfiguration?e(r.pixelData,n,o):t(r.pixelData,n,o)}function O(e,t,r){if("RGB"===e.photometricInterpretation)F(e,t,r);else if("YBR_RCT"===e.photometricInterpretation)F(e,t,r);else if("YBR_ICT"===e.photometricInterpretation)F(e,t,r);else if("PALETTE COLOR"===e.photometricInterpretation)et(e,t,r);else if("YBR_FULL_422"===e.photometricInterpretation)!function(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%2!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/2;let o=0,a=0;if(r)for(let r=0;r<n;r+=2){const r=e[o++],n=e[o++],i=e[o++],s=e[o++];t[a++]=r+1.402*(s-128),t[a++]=r-.34414*(i-128)-.71414*(s-128),t[a++]=r+1.772*(i-128),t[a++]=255,t[a++]=n+1.402*(s-128),t[a++]=n-.34414*(i-128)-.71414*(s-128),t[a++]=n+1.772*(i-128),t[a++]=255}else for(let r=0;r<n;r+=2){const r=e[o++],n=e[o++],i=e[o++],s=e[o++];t[a++]=r+1.402*(s-128),t[a++]=r-.34414*(i-128)-.71414*(s-128),t[a++]=r+1.772*(i-128),t[a++]=n+1.402*(s-128),t[a++]=n-.34414*(i-128)-.71414*(s-128),t[a++]=n+1.772*(i-128)}}(e.pixelData,t,r);else{if("YBR_FULL"!==e.photometricInterpretation)throw new Error(`No color space conversion for photometric interpretation ${e.photometricInterpretation}`);!function(e,t,r){0===e.planarConfiguration?o(e.pixelData,t,r):a(e.pixelData,t,r)}(e,t,r)}}function B(e){return function(e){let t;try{return decodeURIComponent(escape(e))}catch(r){if(t=r,t instanceof URIError)return e;throw t}}(String.fromCharCode.apply(null,Array.prototype.slice.apply(new Uint8Array(e))))}const U=function(e,t,r){const n=(new Date).getTime(),o=new Blob([t],{type:"image/jpeg"});return new Promise(((t,a)=>{const i=new FileReader;void 0===i.readAsBinaryString?i.readAsArrayBuffer(o):i.readAsBinaryString(o),i.onload=function(){const o=new Image;o.onload=function(){r.height=o.height,r.width=o.width,e.rows=o.height,e.columns=o.width;const a=r.getContext("2d");a.drawImage(this,0,0);const i=a.getImageData(0,0,o.width,o.height),s=(new Date).getTime();e.pixelData=new Uint8Array(i.data.buffer),e.imageData=i,e.decodeTimeInMS=s-n;const l=R(e.pixelData);e.smallestPixelValue=l.min,e.largestPixelValue=l.max,e.pixelDataLength=e.pixelData.length,t(e)},o.onerror=function(e){a(e)},void 0===i.readAsBinaryString?o.src=`data:image/jpeg;base64,${window.btoa(B(i.result))}`:o.src=`data:image/jpeg;base64,${window.btoa(i.result)}`},i.onerror=e=>{a(e)}}))};function N(){return new Worker(r.p+"index.worker.1c69152d710fa7b84bce.worker.js")}let j=0;const W=[],Z=[],$=_(),G={maxWebWorkers:navigator.hardwareConcurrency||1,startWebWorkersOnDemand:!0,webWorkerTaskPaths:[],taskConfiguration:{decodeTask:{initializeCodecsOnStartup:!1,strict:$.strict}}};let V;const q={maxWebWorkers:0,numWebWorkers:0,numTasksQueued:0,numTasksExecuting:0,numTasksCompleted:0,totalTaskTimeInMS:0,totalTimeDelayedInMS:0};function z(){if(W.length){for(let e=0;e<Z.length;e++)if("ready"===Z[e].status){Z[e].status="busy";const t=W.shift();t.start=(new Date).getTime();const r=(new Date).getTime();return q.totalTimeDelayedInMS+=r-t.added,Z[e].task=t,Z[e].worker.postMessage({taskType:t.taskType,workerIndex:e,data:t.data},t.transferList),void q.numTasksExecuting++}Z.length<V.maxWebWorkers&&H()}}function Y(e){if("initialize"===e.data.taskType)Z[e.data.workerIndex].status="ready",z();else{const t=Z[e.data.workerIndex].task.start,r="success"===e.data.status?"resolve":"reject";try{Z[e.data.workerIndex].task.deferred[r](e.data.result)}catch(e){console.warn("Caught error delivering response",e)}Z[e.data.workerIndex].task=void 0,q.numTasksExecuting--,Z[e.data.workerIndex].status="ready",q.numTasksCompleted++;const n=(new Date).getTime();q.totalTaskTimeInMS+=n-t,z()}}function H(){if(Z.length>=V.maxWebWorkers)return;const e=new N;Z.push({worker:e,status:"initializing"}),e.addEventListener("message",Y),e.postMessage({taskType:"initialize",workerIndex:Z.length-1,config:V})}function K(e){if(V=e=e||G,V.maxWebWorkers=V.maxWebWorkers||navigator.hardwareConcurrency||1,!V.startWebWorkersOnDemand)for(let e=0;e<V.maxWebWorkers;e++)H()}const J={initialize:K,loadWebWorkerTask:function(e,t){V.webWorkerTaskPaths.push(e),t&&(V.taskConfiguration=Object.assign(V.taskConfiguration,t));for(let t=0;t<Z.length;t++)Z[t].worker.postMessage({taskType:"loadWebWorkerTask",workerIndex:Z.length-1,sourcePath:e,config:V})},addTask:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;V||K();let o={resolve:void 0,reject:void 0};const a=new Promise(((e,t)=>{o={resolve:e,reject:t}}));let i;for(i=0;i<W.length&&!(W[i].priority<r);i++);const s=j++;return W.splice(i,0,{taskId:s,taskType:e,status:"ready",added:(new Date).getTime(),data:t,deferred:o,priority:r,transferList:n}),z(),{taskId:s,promise:a}},getStatistics:function(){return q.maxWebWorkers=V.maxWebWorkers,q.numWebWorkers=Z.length,q.numTasksQueued=W.length,q},setTaskPriority:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let r=0;r<W.length;r++)if(W[r].taskId===e){const e=W.splice(r,1)[0];for(e.priority=t,r=0;r<W.length&&!(W[r].priority<t);r++);return W.splice(r,0,e),!0}return!1},cancelTask:function(e,t){for(let r=0;r<W.length;r++)if(W[r].taskId===e){return W.splice(r,1).deferred.reject(t),!0}return!1},webWorkers:Z,terminate:function(){for(let e=0;e<Z.length;e++)Z[e].worker.terminate();Z.length=0,V=void 0}};var X=r(578);function Q(e,t,r,n,o){const a=n.priority||void 0,i=n.transferPixelData?[r.buffer]:void 0;return J.addTask("decodeTask",{imageFrame:e,transferSyntax:t,pixelData:r,options:n,decodeConfig:o},a,i).promise}window.pako={inflateRaw:X.Hq};const ee=function(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5?arguments[5]:void 0;switch(t){case"1.2.840.10008.1.2":case"1.2.840.10008.1.2.1":case"1.2.840.10008.1.2.2":case"1.2.840.10008.1.2.1.99":case"1.2.840.10008.1.2.5":case"1.2.840.10008.1.2.4.51":case"1.2.840.10008.1.2.4.57":case"1.2.840.10008.1.2.4.70":case"1.2.840.10008.1.2.4.80":case"1.2.840.10008.1.2.4.81":case"1.2.840.10008.1.2.4.90":case"1.2.840.10008.1.2.4.91":case"3.2.840.10008.1.2.4.96":return Q(e,t,r,o,a);case"1.2.840.10008.1.2.4.50":return 8!==e.bitsAllocated||3!==e.samplesPerPixel&&4!==e.samplesPerPixel?Q(e,t,r,o,a):U(e,r,n)}return Promise.reject(new Error(`No decoder for transfer syntax ${t}`))};const te=function(e){const{cornerstone:t}=Xe,r=t.metaData.get("imagePixelModule",e);return{samplesPerPixel:r.samplesPerPixel,photometricInterpretation:r.photometricInterpretation,planarConfiguration:r.planarConfiguration,rows:r.rows,columns:r.columns,bitsAllocated:r.bitsAllocated,bitsStored:r.bitsStored,pixelRepresentation:r.pixelRepresentation,smallestPixelValue:r.smallestPixelValue,largestPixelValue:r.largestPixelValue,redPaletteColorLookupTableDescriptor:r.redPaletteColorLookupTableDescriptor,greenPaletteColorLookupTableDescriptor:r.greenPaletteColorLookupTableDescriptor,bluePaletteColorLookupTableDescriptor:r.bluePaletteColorLookupTableDescriptor,redPaletteColorLookupTableData:r.redPaletteColorLookupTableData,greenPaletteColorLookupTableData:r.greenPaletteColorLookupTableData,bluePaletteColorLookupTableData:r.bluePaletteColorLookupTableData,pixelData:void 0,imageId:e}};function re(e){return"RGB"===e||"PALETTE COLOR"===e||"YBR_FULL"===e||"YBR_FULL_422"===e||"YBR_PARTIAL_422"===e||"YBR_PARTIAL_420"===e||"YBR_RCT"===e||"YBR_ICT"===e}const ne=function(e,t){if(t=t||e.transferSyntax,8===e.bitsAllocated&&"1.2.840.10008.1.2.4.50"===t&&(3===e.samplesPerPixel||4===e.samplesPerPixel))return!0};let oe="";function ae(e){const t=function(e,t){let r;return Number.isInteger(e)&&Number.isInteger(t)?e>=0?t<=255?r=Uint8Array:t<=65535&&(r=Uint16Array):e>=-128&&t<=127?r=Int8Array:e>=-32768&&t<=32767&&(r=Int16Array):r=Float32Array,r}(e.smallestPixelValue,e.largestPixelValue);if(!t)throw new Error("Could not apply a typed array to the pixel data");{const r=new t(e.pixelData);e.pixelData=r}}function ie(e,t){const r=e.length/4;let n=0,o=0;for(let a=0;a<r;a++)t[o++]=e[n++],t[o++]=e[n++],t[o++]=e[n++],n++;return t}const se=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=n.useRGBA;if(n.preScale={enabled:!(!n.preScale||void 0===n.preScale.enabled)&&n.preScale.enabled},!t||!t.length)return Promise.reject(new Error("The file does not contain image data."));const{cornerstone:a}=Xe,i=document.createElement("canvas"),s=te(e);if(n.preScale.enabled){const t=function(e,t){const r=e.get("modalityLutModule",t)||{},n=e.get("generalSeriesModule",t)||{},{modality:o}=n,a={rescaleSlope:r.rescaleSlope,rescaleIntercept:r.rescaleIntercept,modality:o},i=e.get("scalingModule",t)||{};return{...a,..."PT"===o&&{suvbw:i.suvbw}}}(a.metaData,e);t&&(n.preScale={...n.preScale,scalingParameters:t})}n.isSharedArrayBuffer=n.targetBuffer?.arrayBuffer&&n.targetBuffer.arrayBuffer instanceof SharedArrayBuffer;const{decodeConfig:l}=_(),c=ee(s,r,t,i,n,l),{use16BitDataType:u}=l,d=re(s.photometricInterpretation);return new Promise(((t,s)=>{c.then((function(s){if(n.skipCreateImage)return t(s);let l=!1;if(n.targetBuffer&&n.targetBuffer.type&&!d){const{arrayBuffer:e,type:t,offset:r=0,length:o}=n.targetBuffer,a=s.pixelDataLength,i=r,c=null!=o?o:a-i,d={Uint8Array,Uint16Array:u?Uint16Array:void 0,Int16Array:u?Int16Array:void 0,Float32Array};if(c!==s.pixelDataLength)throw new Error(`target array for image does not have the same length (${c}) as the decoded image length (${s.pixelDataLength}).`);const f=d[t],m=e?new f(e,i,c):new f(s.pixelData);if(c!==s.pixelDataLength)throw new Error("target array for image does not have the same length as the decoded image length.");s.pixelData=m,l=!0}l||ae(s);const c=a.metaData.get("imagePlaneModule",e)||{},f=a.metaData.get("voiLutModule",e)||{},m=a.metaData.get("modalityLutModule",e)||{},g=a.metaData.get("sopCommonModule",e)||{};if(d){if(o){if(!ne(s,r)&&"RGB"!==s.photometricInterpretation){i.height=s.rows,i.width=s.columns;const e=i.getContext("2d").createImageData(s.columns,s.rows);O(s,e.data,o),s.imageData=e,s.pixelData=e.data,s.pixelDataLength=e.data.length}}else if(ne(s,r)){const e=new Uint8Array(s.pixelData.length/4*3);s.pixelData=ie(s.pixelData,e),s.pixelDataLength=s.pixelData.length}else if("PALETTE COLOR"===s.photometricInterpretation){i.height=s.rows,i.width=s.columns;const e=i.getContext("2d").createImageData(s.columns,s.rows);O(s,e.data,!0);const t=new e.data.constructor(e.data.length/4*3);s.pixelData=new Uint8Array(ie(e.data,t)),s.pixelDataLength=s.pixelData.length}const e=R(s.pixelData);s.smallestPixelValue=e.min,s.largestPixelValue=e.max}const h={imageId:e,color:d,columnPixelSpacing:c.columnPixelSpacing,columns:s.columns,height:s.rows,preScale:s.preScale,intercept:m.rescaleIntercept?m.rescaleIntercept:0,slope:m.rescaleSlope?m.rescaleSlope:1,invert:"MONOCHROME1"===s.photometricInterpretation,minPixelValue:s.smallestPixelValue,maxPixelValue:s.largestPixelValue,rowPixelSpacing:c.rowPixelSpacing,rows:s.rows,sizeInBytes:s.pixelData.byteLength,width:s.columns,windowCenter:f.windowCenter?f.windowCenter[0]:void 0,windowWidth:f.windowWidth?f.windowWidth[0]:void 0,voiLUTFunction:f.voiLUTFunction?f.voiLUTFunction:void 0,decodeTimeInMS:s.decodeTimeInMS,floatPixelData:void 0,imageFrame:s,rgba:d&&o,getPixelData:()=>s.pixelData,getCanvas:void 0,numComps:void 0};var p;if(window.image=h,h.color&&(h.getCanvas=function(){if(oe===e)return i;const t=h.columns,r=h.rows;i.height=r,i.width=t;const n=i.getContext("2d"),o=n.createImageData(t,r),a=s.pixelData;if(a.length===t*r*4)for(let e=0;e<a.length;e++)o.data[e]=a[e];else if(a.length===t*r*3){let e=0;for(let t=0;t<a.length;t+=3)o.data[e++]=a[t],o.data[e++]=a[t+1],o.data[e++]=a[t+2],o.data[e++]=255}return s.pixelData=o.data,s.pixelDataLength=o.data.length,s.imageData=o,n.putImageData(s.imageData,0,0),oe=e,i}),m.modalityLUTSequence&&m.modalityLUTSequence.length>0&&("1.2.840.10008.5.1.4.1.1.12.1"!==(p=g.sopClassUID)&&"1.2.840.10008.5.1.4.1.1.12.2.1"!==p)&&(h.modalityLUT=m.modalityLUTSequence[0]),f.voiLUTSequence&&f.voiLUTSequence.length>0&&(h.voiLUT=f.voiLUTSequence[0]),h.color&&(h.windowWidth=255,h.windowCenter=127),void 0===h.windowCenter||void 0===h.windowWidth){const e=h.imageFrame.minAfterScale,t=h.imageFrame.maxAfterScale;h.windowWidth=t-e,h.windowCenter=(t+e)/2}t(h)}),s)}))};const le=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Xe.cornerstone.imageRetrievalPoolManager,n=(new Date).getTime();return{promise:new Promise(((o,a)=>{const i=t.requestType||"interaction",s=t.additionalDetails||{imageId:e},l=void 0===t.priority?5:t.priority,c=t.addToBeginning||!1,u=e.substring(7);r.addRequest(function(e,r,i){return M(e,r,i).then((e=>{const i=function(e){const t="1.2.840.10008.1.2";if(!e)return t;const r=e.split(";"),n={};r.forEach((e=>{const t=e.split("=");if(2!==t.length)return;const r=t[1].trim().replace(/"/g,"");n[t[0].trim()]=r}));const o={"image/jpeg":"1.2.840.10008.1.2.4.50","image/x-dicom-rle":"1.2.840.10008.1.2.5","image/x-jls":"1.2.840.10008.1.2.4.80","image/jls":"1.2.840.10008.1.2.4.80","image/jll":"1.2.840.10008.1.2.4.70","image/jp2":"1.2.840.10008.1.2.4.90","image/jpx":"1.2.840.10008.1.2.4.92","image/jphc":"3.2.840.10008.1.2.4.96","image/jxl":"1.2.840.10008.1.2.4.140"};return n["transfer-syntax"]?n["transfer-syntax"]:e&&!Object.keys(n).length&&o[e]?o[e]:n.type&&o[n.type]?o[n.type]:o[e]?o[e]:t}(e.contentType),s=e.imageFrame.pixelData;se(r,s,i,t).then((e=>{const t=(new Date).getTime();e.loadTimeInMS=t-n,o(e)}),a)}),a).catch((e=>{a(e)}))}.bind(this,u,e,"multipart/related; type=application/octet-stream; transfer-syntax=*"),i,s,l,c)})),cancelFn:void 0}};const ce={metaData:{getNumberString:s,getNumberValue:l,getNumberValues:c,getValue:i,metaDataProvider:T},findIndexOfString:P,getPixelData:M,loadImage:le,metaDataManager:w,register:function(e){e.registerImageLoader("wadors",le),e.metaData.addProvider(T)}};function ue(e,t){if(e.elements[t]&&6===e.elements[t].length)return[e.uint16(t,0),e.uint16(t,1),e.uint16(t,2)]}function de(e,t,r){const n=[],o=e.elements[t];for(let a=0;a<r[0];a++)16===r[2]?n[a]=e.uint16(t,a):n[a]=e.byteArray[a+o.dataOffset];return n}const fe=function(e){const t={samplesPerPixel:e.uint16("x00280002"),photometricInterpretation:e.string("x00280004"),rows:e.uint16("x00280010"),columns:e.uint16("x00280011"),bitsAllocated:e.uint16("x00280100"),bitsStored:e.uint16("x00280101"),highBit:e.uint16("x00280102"),pixelRepresentation:e.uint16("x00280103"),planarConfiguration:e.uint16("x00280006"),pixelAspectRatio:e.string("x00280034")};return function(e,t){0===e.uint16("x00280103")?(t.smallestPixelValue=e.uint16("x00280106"),t.largestPixelValue=e.uint16("x00280107")):(t.smallestPixelValue=e.int16("x00280106"),t.largestPixelValue=e.int16("x00280107"))}(e,t),"PALETTE COLOR"===t.photometricInterpretation&&e.elements.x00281101&&function(e,t){t.redPaletteColorLookupTableDescriptor=ue(e,"x00281101"),t.greenPaletteColorLookupTableDescriptor=ue(e,"x00281102"),t.bluePaletteColorLookupTableDescriptor=ue(e,"x00281103"),0===t.redPaletteColorLookupTableDescriptor[0]&&(t.redPaletteColorLookupTableDescriptor[0]=65536,t.greenPaletteColorLookupTableDescriptor[0]=65536,t.bluePaletteColorLookupTableDescriptor[0]=65536);const r=t.redPaletteColorLookupTableDescriptor[0],n=e.elements.x00281201.length===r?8:16;t.redPaletteColorLookupTableDescriptor[2]!==n&&(t.redPaletteColorLookupTableDescriptor[2]=n,t.greenPaletteColorLookupTableDescriptor[2]=n,t.bluePaletteColorLookupTableDescriptor[2]=n),t.redPaletteColorLookupTableData=de(e,"x00281201",t.redPaletteColorLookupTableDescriptor),t.greenPaletteColorLookupTableData=de(e,"x00281202",t.greenPaletteColorLookupTableDescriptor),t.bluePaletteColorLookupTableData=de(e,"x00281203",t.bluePaletteColorLookupTableDescriptor)}(e,t),t};function me(e,t){let r=t.uint16("x00283002",0);0===r&&(r=65535);let n=0;n=0===e?t.uint16("x00283002",1):t.int16("x00283002",1);const o={id:"1",firstValueMapped:n,numBitsPerEntry:t.uint16("x00283002",2),lut:[]};for(let n=0;n<r;n++)o.lut[n]=0===e?t.uint16("x00283006",n):t.int16("x00283006",n);return o}const ge=function(e,t){if(!t||!t.items||!t.items.length)return;const r=[];for(let n=0;n<t.items.length;n++){const o=me(e,t.items[n].dataSet);o&&r.push(o)}return r};const he=function(e){const t=e.string("x00080016");if("1.2.840.10008.5.1.4.1.1.2"===t||"1.2.840.10008.5.1.4.1.1.2.1"===t)return 1;const r=e.floatString("x00281052"),n=e.floatString("x00281053");if(void 0!==r&&void 0!==n){const t=function(e){const t=e.uint16("x00280103"),r=e.uint16("x00280101");return 0===t?0:-1<<r-1}(e);return t*n+r<0?1:0}return e.elements.x00283000&&e.elements.x00283000.length>0?0:e.uint16("x00280103")};const pe=function(e,t,r){const n=[],o=e.string(t);if(!o)return;const a=o.split("\\");if(!(r&&a.length<r)){for(let e=0;e<a.length;e++)n.push(parseFloat(a[e]));return n}};const xe=function(e){const t=e.indexOf(":");let r=e.substring(t+1);const n=r.indexOf("frame=");let o;if(-1!==n){const e=r.substring(n+6);o=parseInt(e,10),r=r.substring(0,n-1)}return{scheme:e.substring(0,t),url:r,frame:o,pixelDataFrame:void 0!==o?o-1:void 0}};function we(e){const{dicomParser:t}=Xe;let r,n=t.parseDicom(e,{untilTag:"x7fe00010"});n.elements.x7fe00010||console.warn("Pixel data not found!");try{r=t.parseDicom(e)}catch(e){console.error(e),console.log("pixel data dataset:",e.dataSet),r=e.dataSet}return n.elements.x7fe00010=r.elements.x7fe00010,n=function(e){const t=e.elements.x7fe00010.fragments,r=e.byteArray.length;for(const e of t){const{position:t,length:n}=e;n>r-t&&(console.log(`Truncated fragment, changing fragment length from ${e.length} to ${r-t}`),e.length=r-t)}return e}(n),n}async function be(e,t,r){const n=we(e),{uri:o,imageId:a,fileTotalLength:i}=r;return n.fetchMore=async function(s){const l=Object.assign({uri:o,imageId:a,fetchedLength:e.length,lengthToFetch:i-e.length},s),{fetchedLength:c,lengthToFetch:u}=l,{arrayBuffer:d}=await t(o,a,{byteRange:`${c}-${c+u}`}),f=new Uint8Array(d),m=new Uint8Array(n.byteArray.length+f.length);return m.set(n.byteArray),m.set(f,n.byteArray.length),be(m,t,r)},n}function ye(e,t,r){const n={};(t?Object.values(t.items[0].dataSet.elements):[]).map((e=>n[e.tag]=e));const o={};return(e?Object.values(e.items[r-1].dataSet.elements):[]).map((e=>o[e.tag]=e)),{shared:n,perFrame:o}}function ke(e){if(!e)return;const{elements:t,...r}=e,{x52009230:n,x52009229:o,...a}=t;return{NumberOfFrames:e.intString("x00280008"),PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,otherElements:a,otherAttributtes:r}}function ve(e){if(Pe[e])return Pe[e]}function De(e){if(!e)return!1;const t=e.intString("x00280008");return t&&t>1}const Te={_get:ve,generateMultiframeWADOURIs:function(e){const t=[],r=ve(e);if(De(r)){const n=r.intString("x00280008");for(let r=1;r<=n;r++)t.push(`${e}&frame=${r}`)}else t.push(e);return t},retrieveMultiframeDataset:function(e){const t=function(e){return e.indexOf("&frame=")}(e),r=-1===t?e:e.slice(0,t),n=parseInt(e.slice(t+7),10)||1;let o;return o=Pe[r]?Pe[r].dataSet:void 0,{dataSet:o,frame:n}},isMultiframeDataset:function(e){return De(ve(e))}};let Se=0,Pe={},Ie={};function Ce(){return{cacheSizeInBytes:Se,numberOfDataSetsCached:Object.keys(Pe).length}}const _e={isLoaded:function(e){return void 0!==Pe[e]},load:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A,r=arguments.length>2?arguments[2]:void 0;const{cornerstone:n,dicomParser:o}=Xe;if(Pe[e])return new Promise((t=>{Pe[e].cacheCount++,t(Pe[e].dataSet)}));if(Ie[e])return Ie[e].cacheCount++,Ie[e];const a=t(e,r),i=new Promise(((s,l)=>{a.then((async function(a){const c={isPartialContent:!1,fileTotalLength:null};if(!(a instanceof ArrayBuffer)){if(!a.arrayBuffer)return l(new Error("If not returning ArrayBuffer, must return object with `arrayBuffer` parameter"));c.isPartialContent=a.flags.isPartialContent,c.fileTotalLength=a.flags.fileTotalLength,a=a.arrayBuffer}const u=new Uint8Array(a);let d;try{d=c.isPartialContent?await be(u,t,{uri:e,imageId:r,fileTotalLength:c.fileTotalLength}):o.parseDicom(u)}catch(e){return l(e)}Pe[e]={dataSet:d,cacheCount:i.cacheCount},Se+=d.byteArray.length,s(d),n.triggerEvent(n.events,"datasetscachechanged",{uri:e,action:"loaded",cacheInfo:Ce()})}),l).then((()=>{delete Ie[e]}),(()=>{delete Ie[e]}))}));return i.cacheCount=1,Ie[e]=i,i},unload:function(e){const{cornerstone:t}=Xe;Pe[e]&&(Pe[e].cacheCount--,0===Pe[e].cacheCount&&(Se-=Pe[e].dataSet.byteArray.length,delete Pe[e],t.triggerEvent(t.events,"datasetscachechanged",{uri:e,action:"unloaded",cacheInfo:Ce()})))},getInfo:Ce,purge:function(){Pe={},Ie={},Se=0},get:function(e){let t;if(e.includes("&frame=")){const{frame:r,dataSet:n}=Te.retrieveMultiframeDataset(e);t=function(e,t){if(!t)return;const{NumberOfFrames:r,PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,otherElements:a}=ke(t);if(n||r>1){const{shared:r,perFrame:i}=ye(n,o,e),s={elements:{...a,...r,...i}},l=Object.create(t);return Object.assign(l,s)}return t}(r,n)}else Pe[e]&&(t=Pe[e].dataSet);return t},update:function(e,t){const r=Pe[e];r?(Se-=r.dataSet.byteArray.length,r.dataSet=t,Se+=t.byteArray.length,Xe.cornerstone.triggerEvent(Xe.cornerstone.events,"datasetscachechanged",{uri:e,action:"updated",cacheInfo:Ce()})):console.error(`No loaded dataSet for uri ${e}`)}};function Ae(e,t){const r=e.string("x00080008");if(r){const e=r.split("\\");if(e.length>t)return e[t]}}function Le(e){let t=pe(e,"x00200037",6);return!t&&e.elements.x00209116&&(t=pe(e.elements.x00209116.items[0].dataSet,"x00200037",6)),t||(t=function(e){let t;if(e.string("x00080060").includes("NM")){const r=Ae(e,2);r&&b(r)&&e.elements.x00540022&&(t=pe(e.elements.x00540022.items[0].dataSet,"x00200037",6))}return t}(e)),t}function Ee(e){let t=pe(e,"x00200032",3);return!t&&e.elements.x00209113&&(t=pe(e.elements.x00209113.items[0].dataSet,"x00200032",3)),t||(t=function(e){let t;if(e.string("x00080060").includes("NM")){const r=Ae(e,2);r&&b(r)&&e.elements.x00540022&&(t=pe(e.elements.x00540022.items[0].dataSet,"x00200032",3))}return t}(e)),t}function Me(e){let t=pe(e,"x00280030",2);return!t&&e.elements.x00289110&&(t=pe(e.elements.x00289110.items[0].dataSet,"x00280030",2)),t}function Re(e){let t;return e.elements.x00180050?t=e.floatString("x00180050"):e.elements.x00289110&&e.elements.x00289110.items.length&&e.elements.x00289110.items[0].dataSet.elements.x00180050&&(t=e.elements.x00289110.items[0].dataSet.floatString("x00180050")),t}const Fe=function(e,t){const{dicomParser:r}=Xe,n=xe(t);if("multiframeModule"===e){const e=Te.retrieveMultiframeDataset(n.url);if(!e.dataSet)return;const t=function(e,t){if(!e)return;const{NumberOfFrames:r,PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o}=ke(e);if(n||r>1){const{shared:e,perFrame:a}=ye(n,o,t);return{NumberOfFrames:r,PerFrameFunctionalInformation:a,SharedFunctionalInformation:e}}return{NumberOfFrames:r}}(e.dataSet,e.frame);return t}let o=n.url;n.frame&&(o=`${o}&frame=${n.frame}`);const a=_e.get(o);if(a){if("generalSeriesModule"===e)return{modality:a.string("x00080060"),seriesInstanceUID:a.string("x0020000e"),seriesNumber:a.intString("x00200011"),studyInstanceUID:a.string("x0020000d"),seriesDate:r.parseDA(a.string("x00080021")),seriesTime:r.parseTM(a.string("x00080031")||""),acquisitionDate:r.parseDA(a.string("x00080022")||""),acquisitionTime:r.parseTM(a.string("x00080032")||"")};if("patientStudyModule"===e)return{patientAge:a.intString("x00101010"),patientSize:a.floatString("x00101020"),patientWeight:a.floatString("x00101030")};if("imagePlaneModule"===e){const e=Le(a),t=Ee(a),r=Me(a);let n;a.elements.x00200052&&(n=a.string("x00200052"));const o=Re(a);let i;a.elements.x00201041&&(i=a.floatString("x00201041"));let s=null,l=null;r&&(l=r[0],s=r[1]);let c=null,u=null;return e&&(c=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])],u=[parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])]),{frameOfReferenceUID:n,rows:a.uint16("x00280010"),columns:a.uint16("x00280011"),imageOrientationPatient:e,rowCosines:c,columnCosines:u,imagePositionPatient:t,sliceThickness:o,sliceLocation:i,pixelSpacing:r,rowPixelSpacing:l,columnPixelSpacing:s}}if("nmMultiframeGeometryModule"===e){const e=a.string("x00080060"),t=Ae(a,2);return{modality:e,imageType:a.string("x00080008"),imageSubType:t,imageOrientationPatient:Le(a),imagePositionPatient:Ee(a),sliceThickness:Re(a),pixelSpacing:Me(a),numberOfFrames:a.uint16("x00280008"),isNMReconstructable:b(t)&&e.includes("NM")}}if("imagePixelModule"===e)return fe(a);if("modalityLutModule"===e)return{rescaleIntercept:a.floatString("x00281052"),rescaleSlope:a.floatString("x00281053"),rescaleType:a.string("x00281054"),modalityLUTSequence:ge(a.uint16("x00280103"),a.elements.x00283000)};if("voiLutModule"===e){const e=he(a);return{windowCenter:pe(a,"x00281050",1),windowWidth:pe(a,"x00281051",1),voiLUTSequence:ge(e,a.elements.x00283010)}}if("sopCommonModule"===e)return{sopClassUID:a.string("x00080016"),sopInstanceUID:a.string("x00080018")};if("petIsotopeModule"===e){const e=a.elements.x00540016;if(void 0===e)return;const t=e.items[0].dataSet;return{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:r.parseTM(t.string("x00181072")||""),radionuclideTotalDose:t.floatString("x00181074"),radionuclideHalfLife:t.floatString("x00181075")}}}return"overlayPlaneModule"===e?function(e){const t=[];for(let r=0;r<=30;r+=2){let n=`x60${r.toString(16)}`;4===n.length&&(n=`x600${r.toString(16)}`);const o=e.elements[`${n}3000`];if(!o)continue;const a=[];for(let t=0;t<o.length;t++)for(let r=0;r<8;r++){const n=e.byteArray[o.dataOffset+t];a[8*t+r]=n>>r&1}t.push({rows:e.uint16(`${n}0010`),columns:e.uint16(`${n}0011`),type:e.string(`${n}0040`),x:e.int16(`${n}0050`,1)-1,y:e.int16(`${n}0050`,0)-1,pixelData:a,description:e.string(`${n}0022`),label:e.string(`${n}1500`),roiArea:e.string(`${n}1301`),roiMean:e.string(`${n}1302`),roiStandardDeviation:e.string(`${n}1303`)})}return{overlays:t}}(a):"transferSyntax"===e?{transferSyntaxUID:a.string("x00020010")}:"petSeriesModule"===e?{correctedImage:a.string("x00280051"),units:a.string("x00541001"),decayCorrection:a.string("x00541102")}:"petImageModule"===e?{frameReferenceTime:r.floatString(a.string("x00541300")||""),actualFrameDuration:r.intString(a.string("x00181242"))}:void 0}};let Oe=[];const Be={add:function(e){return"dicomfile:"+(Oe.push(e)-1)},get:function(e){return Oe[e]},remove:function(e){Oe[e]=void 0},purge:function(){Oe=[]}};function Ue(e,t){const{dicomParser:r}=Xe;if(e.elements.x7fe00010&&e.elements.x7fe00010.basicOffsetTable.length)return r.readEncapsulatedImageFrame(e,e.elements.x7fe00010,t);if(function(e){return e.intString("x00280008")!==e.elements.x7fe00010.fragments.length}(e)){const n=r.createJPEGBasicOffsetTable(e,e.elements.x7fe00010);return r.readEncapsulatedImageFrame(e,e.elements.x7fe00010,t,n)}return r.readEncapsulatedPixelDataFromFragments(e,e.elements.x7fe00010,t)}function Ne(e,t){return e&1<<t}const je=function(e,t,r){const n=new Uint8Array(r);for(let o=0;o<r;o++){const r=e[Math.floor(o/8)+t],a=o%8;n[o]=Ne(r,a)?1:0}return n};const We=function(e,t){const r=e.elements.x7fe00010||e.elements.x7fe00008,n=e.uint16("x00280100"),o=e.uint16("x00280010"),a=e.uint16("x00280011");let i=e.uint16("x00280002");"YBR_FULL_422"===e.string("x00280004")&&(i=2,console.warn("Using SamplesPerPixel of 2 for YBR_FULL_422 photometric interpretation.\n See http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.3.html for more information."));const s=r.dataOffset,l=o*a*i;let c;if(8===n){if(c=s+t*l,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer.slice(c,c+l))}if(16===n){if(c=s+t*l*2,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer.slice(c,c+2*l))}if(1===n){if(c=s+t*l*.125,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return je(e.byteArray,c,l)}if(32===n){if(c=s+t*l*4,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer.slice(c,c+4*l))}throw new Error("unsupported pixel format")};const Ze=function(e){const t=xe(e),r=parseInt(t.url,10),n=Be.get(r);return new Promise(((e,t)=>{const r=new FileReader;r.onload=t=>{const r=t.target.result;e(r)},r.onerror=t,r.readAsArrayBuffer(n)}))};const $e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=e.elements.x7fe00010||e.elements.x7fe00008;return r?r.encapsulatedPixelData?Ue(e,t):We(e,t):null};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;const i=(new Date).getTime(),s={cancelFn:void 0,promise:void 0};return s.promise=new Promise(((l,c)=>{e.then((e=>{const u=$e(e,r),d=e.string("x00020010"),f=(new Date).getTime(),m=se(t,u,d,o);!function(e,t){e.decache=function(){const e=xe(t);_e.unload(e.url)}}(s,t),m.then((t=>{t.data=e,t.sharedCacheKey=n;const r=(new Date).getTime();t.loadTimeInMS=f-i,t.totalTimeInMS=r-i,void 0!==a&&void 0!==a.imageDoneCallback&&a.imageDoneCallback(t),l(t)}),(function(t){c({error:t,dataSet:e})}))}),(function(e){c({error:e})}))})),s}function Ve(e){return"dicomweb"===e||"wadouri"===e?A:"dicomfile"===e?Ze:void 0}function qe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=xe(e);t=Object.assign({},t);let n=t.loader;if(void 0===n?n=Ve(r.scheme):delete t.loader,_e.isLoaded(r.url)){return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const a=(new Date).getTime();return{promise:new Promise(((i,s)=>{const l=(new Date).getTime();let c;try{const n=$e(e,r),a=e.string("x00020010");c=se(t,n,a,o)}catch(t){return void s({error:t,dataSet:e})}c.then((t=>{t.data=e,t.sharedCacheKey=n;const r=(new Date).getTime();t.loadTimeInMS=l-a,t.totalTimeInMS=r-a,i(t)}),s)})),cancelFn:void 0}}(_e.get(r.url,n,e),e,r.pixelDataFrame,r.url,t)}return Ge(_e.load(r.url,n,e),e,r.frame,r.url,t)}const ze={metaData:{getImagePixelModule:fe,getLUTs:ge,getModalityLUTOutputPixelRepresentation:he,getNumberValues:pe,metaDataProvider:Fe},dataSetCacheManager:_e,fileManager:Be,getEncapsulatedImageFrame:Ue,getUncompressedImageFrame:We,loadFileRequest:Ze,loadImageFromPromise:Ge,getLoaderForScheme:Ve,loadImage:qe,parseImageId:xe,unpackBinaryFrame:je,register:function(e){e.registerImageLoader("dicomweb",qe),e.registerImageLoader("wadouri",qe),e.registerImageLoader("dicomfile",qe),e.metaData.addProvider(Fe)}};const Ye=function(e){ce.register(e),ze.register(e)};let He,Ke;const Je={set cornerstone(e){He=e,Ye(He)},get cornerstone(){if(!He){if(He=window&&window.cornerstone,!He)throw new Error("cornerstoneDICOMImageLoader requires a copy of Cornerstone to work properly. Please add cornerstoneDICOMImageLoader.external.cornerstone = cornerstone; to your application.");Ye(He)}return He},set dicomParser(e){Ke=e},get dicomParser(){if(!Ke){if(!window||!window.dicomParser)throw new Error("cornerstoneDICOMImageLoader requires a copy of dicomParser to work properly. Please add cornerstoneDICOMImageLoader.external.dicomParser = dicomParser; to your application.");Ke=window.dicomParser}return Ke}},Xe=Je;function Qe(e,t){const r=e.length,n=new Uint8ClampedArray(r);for(let o=0;o<r;++o)n[o]=e[o]>>t;return n}function et(e,t,r){const n=e.columns*e.rows,o=e.pixelData;let a=e.redPaletteColorLookupTableData;a||(a=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.redPaletteColorLookupTableData);let i=e.greenPaletteColorLookupTableData;i||(i=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.greenPaletteColorLookupTableData);let s=e.bluePaletteColorLookupTableData;if(s||(s=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.bluePaletteColorLookupTableData),!a||!i||!s)throw new Error("The image does not have a complete color palette. R, G, and B palette data are required.");const l=e.redPaletteColorLookupTableData.length;let c=0,u=0;const d=e.redPaletteColorLookupTableDescriptor[1],f=8===e.redPaletteColorLookupTableDescriptor[2]?0:8,m=Qe(a,f),g=Qe(i,f),h=Qe(s,f);if(r)for(let e=0;e<n;++e){let e=o[c++];e<d?e=0:e>d+l-1?e=l-1:e-=d,t[u++]=m[e],t[u++]=g[e],t[u++]=h[e],t[u++]=255}else for(let e=0;e<n;++e){let e=o[c++];e<d?e=0:e>d+l-1?e=l-1:e-=d,t[u++]=m[e],t[u++]=g[e],t[u++]=h[e]}}const tt=function(e){C(e)},rt={convertRGBColorByPixel:e,convertRGBColorByPlane:t,convertYBRFullByPixel:o,convertYBRFullByPlane:a,convertPALETTECOLOR:et,wadouri:ze,wadors:ce,configure:tt,convertColorSpace:O,createImage:se,decodeImageFrame:ee,decodeJPEGBaseline8BitColor:U,getImageFrame:te,getPixelData:M,getMinMax:R,isColorImage:re,isJPEGBaseline8BitColor:ne,webWorkerManager:J,internal:L,external:Je}})(),n})()));
|
|
8
8
|
//# sourceMappingURL=cornerstoneDICOMImageLoader.min.js.map
|
|
9
9
|
|
|
10
10
|
/***/ }),
|
|
@@ -4330,12 +4330,12 @@ Compose.propTypes = {
|
|
|
4330
4330
|
components: (prop_types_default()).array,
|
|
4331
4331
|
children: (prop_types_default()).node.isRequired
|
|
4332
4332
|
};
|
|
4333
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
4334
|
-
var ui_src = __webpack_require__(
|
|
4333
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 452 modules
|
|
4334
|
+
var ui_src = __webpack_require__(28619);
|
|
4335
4335
|
// EXTERNAL MODULE: ./state/index.js + 1 modules
|
|
4336
4336
|
var state = __webpack_require__(22896);
|
|
4337
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
4338
|
-
var core_src = __webpack_require__(
|
|
4337
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 102 modules
|
|
4338
|
+
var core_src = __webpack_require__(62771);
|
|
4339
4339
|
// EXTERNAL MODULE: ../node_modules/react-router/dist/index.js
|
|
4340
4340
|
var react_router_dist = __webpack_require__(14935);
|
|
4341
4341
|
;// CONCATENATED MODULE: ./routes/DataSourceWrapper.tsx
|
|
@@ -5092,7 +5092,7 @@ function WorkList(_ref) {
|
|
|
5092
5092
|
key: i,
|
|
5093
5093
|
to: `${dataPath ? '../../' : ''}${mode.routeName}${dataPath || ''}?${query.toString()}`
|
|
5094
5094
|
// to={`${mode.routeName}/dicomweb?StudyInstanceUIDs=${studyInstanceUid}`}
|
|
5095
|
-
}, /*#__PURE__*/react.createElement(ui_src/*
|
|
5095
|
+
}, /*#__PURE__*/react.createElement(ui_src/* LegacyButton */.mN, {
|
|
5096
5096
|
rounded: "full",
|
|
5097
5097
|
variant: isValidMode ? 'contained' : 'disabled',
|
|
5098
5098
|
disabled: !isValidMode,
|
|
@@ -5100,7 +5100,7 @@ function WorkList(_ref) {
|
|
|
5100
5100
|
name: "launch-arrow"
|
|
5101
5101
|
}) // launch-arrow | launch-info
|
|
5102
5102
|
,
|
|
5103
|
-
className: classnames_default()(
|
|
5103
|
+
className: classnames_default()({
|
|
5104
5104
|
'ml-2': !isFirst
|
|
5105
5105
|
}),
|
|
5106
5106
|
onClick: () => {}
|
|
@@ -5111,8 +5111,8 @@ function WorkList(_ref) {
|
|
|
5111
5111
|
};
|
|
5112
5112
|
});
|
|
5113
5113
|
const hasStudies = numOfStudies > 0;
|
|
5114
|
-
const versionNumber = "3.7.0-beta.
|
|
5115
|
-
const commitHash = "
|
|
5114
|
+
const versionNumber = "3.7.0-beta.21";
|
|
5115
|
+
const commitHash = "3efa793e602a3d85409ece95b4e970b4c40d03b1";
|
|
5116
5116
|
const menuOptions = [{
|
|
5117
5117
|
title: t('Header:About'),
|
|
5118
5118
|
icon: 'info',
|
|
@@ -7131,7 +7131,7 @@ function App(_ref) {
|
|
|
7131
7131
|
i18n: src["default"]
|
|
7132
7132
|
}], [ui_src/* ThemeWrapper */.$S], [ui_src/* ViewportGridProvider */.CW, {
|
|
7133
7133
|
service: viewportGridService
|
|
7134
|
-
}], [ui_src/* ViewportDialogProvider */.
|
|
7134
|
+
}], [ui_src/* ViewportDialogProvider */.DF, {
|
|
7135
7135
|
service: uiViewportDialogService
|
|
7136
7136
|
}], [ui_src/* CineProvider */.bC, {
|
|
7137
7137
|
service: cineService
|
|
@@ -7441,7 +7441,7 @@ function _getImageOrientationPatient(image) {
|
|
|
7441
7441
|
|
|
7442
7442
|
/***/ }),
|
|
7443
7443
|
|
|
7444
|
-
/***/
|
|
7444
|
+
/***/ 62771:
|
|
7445
7445
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7446
7446
|
|
|
7447
7447
|
"use strict";
|
|
@@ -10458,23 +10458,176 @@ var validate = __webpack_require__(7315);
|
|
|
10458
10458
|
var validate_default = /*#__PURE__*/__webpack_require__.n(validate);
|
|
10459
10459
|
;// CONCATENATED MODULE: ../../core/src/services/HangingProtocolService/lib/validator.js
|
|
10460
10460
|
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10461
|
+
/**
|
|
10462
|
+
* check if the value is strictly equal to options
|
|
10463
|
+
*
|
|
10464
|
+
* @example
|
|
10465
|
+
* value = ['abc', 'def', 'GHI']
|
|
10466
|
+
* testValue = 'abc' (Fail)
|
|
10467
|
+
* = ['abc'] (Fail)
|
|
10468
|
+
* = ['abc', 'def', 'GHI'] (Valid)
|
|
10469
|
+
* = ['abc', 'GHI', 'def'] (Fail)
|
|
10470
|
+
* = ['abc', 'def'] (Fail)
|
|
10471
|
+
*
|
|
10472
|
+
* value = 'Attenuation Corrected'
|
|
10473
|
+
* testValue = 'Attenuation Corrected' (Valid)
|
|
10474
|
+
* testValue = 'Attenuation' (Fail)
|
|
10475
|
+
*
|
|
10476
|
+
* value = ['Attenuation Corrected']
|
|
10477
|
+
* testValue = ['Attenuation Corrected'] (Valid)
|
|
10478
|
+
* = 'Attenuation Corrected' (Valid)
|
|
10479
|
+
* = 'Attenuation' (Fail)
|
|
10480
|
+
*
|
|
10481
|
+
* */
|
|
10482
|
+
(validate_default()).validators.equals = function (value, options, key) {
|
|
10483
|
+
const testValue = getTestValue(options);
|
|
10484
|
+
const dicomArrayValue = dicomTagToArray(value);
|
|
10485
|
+
|
|
10486
|
+
// If options is an array, then we need to validate each element in the array
|
|
10487
|
+
if (Array.isArray(testValue)) {
|
|
10488
|
+
// If the array has only one element, then we need to compare the value to that element
|
|
10489
|
+
if (testValue.length !== dicomArrayValue.length) {
|
|
10490
|
+
return `${key} must be an array of length ${testValue.length}`;
|
|
10491
|
+
} else {
|
|
10492
|
+
for (let i = 0; i < testValue.length; i++) {
|
|
10493
|
+
if (testValue[i] !== dicomArrayValue[i]) {
|
|
10494
|
+
return `${key} ${testValue[i]} must equal ${dicomArrayValue[i]}`;
|
|
10495
|
+
}
|
|
10496
|
+
}
|
|
10497
|
+
}
|
|
10498
|
+
} else if (testValue !== dicomArrayValue[0]) {
|
|
10499
|
+
return `${key} must equal ${testValue}`;
|
|
10465
10500
|
}
|
|
10466
10501
|
};
|
|
10502
|
+
/**
|
|
10503
|
+
* check if the value is not equal to options
|
|
10504
|
+
*
|
|
10505
|
+
* @example
|
|
10506
|
+
* value = ['abc', 'def', 'GHI']
|
|
10507
|
+
* testValue = 'abc' (Valid)
|
|
10508
|
+
* = ['abc'] (Valid)
|
|
10509
|
+
* = ['abc', 'def', 'GHI'] (Fail)
|
|
10510
|
+
* = ['abc', 'GHI', 'def'] (Valid)
|
|
10511
|
+
* = ['abc', 'def'] (Valid)
|
|
10512
|
+
*
|
|
10513
|
+
* value = 'Attenuation Corrected'
|
|
10514
|
+
* = 'Attenuation Corrected' (Fail)
|
|
10515
|
+
* = 'Attenuation' (Valid)
|
|
10516
|
+
*
|
|
10517
|
+
* value = ['Attenuation Corrected']
|
|
10518
|
+
* testValue = ['Attenuation Corrected'] (Fail)
|
|
10519
|
+
* = 'Attenuation Corrected' (Fail)
|
|
10520
|
+
* = 'Attenuation' (Fail)
|
|
10521
|
+
* */
|
|
10467
10522
|
(validate_default()).validators.doesNotEqual = function (value, options, key) {
|
|
10468
|
-
const testValue = options
|
|
10469
|
-
|
|
10470
|
-
|
|
10523
|
+
const testValue = getTestValue(options);
|
|
10524
|
+
const dicomArrayValue = dicomTagToArray(value);
|
|
10525
|
+
if (Array.isArray(testValue)) {
|
|
10526
|
+
if (testValue.length === dicomArrayValue.length) {
|
|
10527
|
+
let score = 0;
|
|
10528
|
+
testValue.forEach((x, i) => {
|
|
10529
|
+
if (x === dicomArrayValue[i]) {
|
|
10530
|
+
score++;
|
|
10531
|
+
}
|
|
10532
|
+
});
|
|
10533
|
+
if (score === testValue.length) {
|
|
10534
|
+
return `${key} must not equal to ${testValue}`;
|
|
10535
|
+
}
|
|
10536
|
+
}
|
|
10537
|
+
} else if (testValue === dicomArrayValue[0]) {
|
|
10538
|
+
console.debug(dicomArrayValue, testValue);
|
|
10539
|
+
return `${key} must not equal to ${testValue}`;
|
|
10471
10540
|
}
|
|
10472
10541
|
};
|
|
10473
10542
|
|
|
10543
|
+
/**
|
|
10544
|
+
* Check if a value includes one or more specified options.
|
|
10545
|
+
*
|
|
10546
|
+
* @example
|
|
10547
|
+
* value = ['abc', 'def', 'GHI']
|
|
10548
|
+
* testValue = ‘abc’ (Fail)
|
|
10549
|
+
* = ‘dog’ (Fail)
|
|
10550
|
+
* = [‘abc’] (Valid)
|
|
10551
|
+
* = [‘att’, ‘abc’] (Valid)
|
|
10552
|
+
* = ['abc', 'def', 'dog'] (Valid)
|
|
10553
|
+
* = ['cat', 'dog'] (Fail)
|
|
10554
|
+
*
|
|
10555
|
+
* value = ['Attenuation Corrected']
|
|
10556
|
+
* testValue = 'Attenuation Corrected' (Fail)
|
|
10557
|
+
* = ['Attenuation Corrected', 'Corrected'] (Valid)
|
|
10558
|
+
* = ['Attenuation', 'Corrected'] (Fail)
|
|
10559
|
+
*
|
|
10560
|
+
* value = 'Attenuation Corrected'
|
|
10561
|
+
* testValue = ['Attenuation Corrected', 'Corrected'] (Valid)
|
|
10562
|
+
* = ['Attenuation', 'Corrected'] (Fail)
|
|
10563
|
+
* */
|
|
10564
|
+
(validate_default()).validators.includes = function (value, options, key) {
|
|
10565
|
+
const testValue = getTestValue(options);
|
|
10566
|
+
const dicomArrayValue = dicomTagToArray(value);
|
|
10567
|
+
if (Array.isArray(testValue)) {
|
|
10568
|
+
const includedValues = testValue.filter(el => dicomArrayValue.includes(el));
|
|
10569
|
+
if (includedValues.length === 0) {
|
|
10570
|
+
return `${key} must include at least one of the following values: ${testValue.join(', ')}`;
|
|
10571
|
+
}
|
|
10572
|
+
} else return `${key} ${testValue} must be an array`;
|
|
10573
|
+
// else if (!value.includes(testValue)) {
|
|
10574
|
+
// return `${key} ${value} must include ${testValue}`;
|
|
10575
|
+
// }
|
|
10576
|
+
};
|
|
10577
|
+
/**
|
|
10578
|
+
* Check if a value does not include one or more specified options.
|
|
10579
|
+
*
|
|
10580
|
+
* @example
|
|
10581
|
+
* value = ['abc', 'def', 'GHI']
|
|
10582
|
+
* testValue = ['Corr'] (Valid)
|
|
10583
|
+
* = 'abc' (Fail)
|
|
10584
|
+
* = ['abc'] (Fail)
|
|
10585
|
+
* = [‘att’, ‘cor’] (Valid)
|
|
10586
|
+
* = ['abc', 'def', 'dog'] (Fail)
|
|
10587
|
+
*
|
|
10588
|
+
* value = ['Attenuation Corrected']
|
|
10589
|
+
* testValue = 'Attenuation Corrected' (Fail)
|
|
10590
|
+
* = ['Attenuation Corrected', 'Corrected'] (Fail)
|
|
10591
|
+
* = ['Attenuation', 'Corrected'] (Valid)
|
|
10592
|
+
*
|
|
10593
|
+
* value = 'Attenuation Corrected'
|
|
10594
|
+
* testValue = ['Attenuation Corrected', 'Corrected'] (Fail)
|
|
10595
|
+
* = ['Attenuation', 'Corrected'] (Valid)
|
|
10596
|
+
* */
|
|
10597
|
+
(validate_default()).validators.doesNotInclude = function (value, options, key) {
|
|
10598
|
+
const testValue = getTestValue(options);
|
|
10599
|
+
const dicomArrayValue = dicomTagToArray(value);
|
|
10600
|
+
|
|
10601
|
+
// if (!Array.isArray(value) || value.length === 1) {
|
|
10602
|
+
// return `${key} is not allowed as a single value`;
|
|
10603
|
+
// }
|
|
10604
|
+
if (Array.isArray(testValue)) {
|
|
10605
|
+
const includedValues = testValue.filter(el => dicomArrayValue.includes(el));
|
|
10606
|
+
if (includedValues.length > 0) {
|
|
10607
|
+
return `${key} must not include the following value: ${includedValues}`;
|
|
10608
|
+
}
|
|
10609
|
+
} else return `${key} ${testValue} must be an array`;
|
|
10610
|
+
};
|
|
10474
10611
|
// Ignore case contains.
|
|
10475
10612
|
// options testValue MUST be in lower case already, otherwise it won't match
|
|
10613
|
+
/**
|
|
10614
|
+
* @example
|
|
10615
|
+
* value = 'Attenuation Corrected'
|
|
10616
|
+
* testValue = ‘Corr’ (Valid)
|
|
10617
|
+
* = ‘corr’ (Valid)
|
|
10618
|
+
* = [‘att’, ‘cor’] (Valid)
|
|
10619
|
+
* = [‘Att’, ‘Wall’] (Valid)
|
|
10620
|
+
* = [‘cat’, ‘dog’] (Fail)
|
|
10621
|
+
*
|
|
10622
|
+
* value = ['abc', 'def', 'GHI']
|
|
10623
|
+
* testValue = 'def' (Valid)
|
|
10624
|
+
* = 'dog' (Fail)
|
|
10625
|
+
* = ['gh', 'de'] (Valid)
|
|
10626
|
+
* = ['cat', 'dog'] (Fail)
|
|
10627
|
+
*
|
|
10628
|
+
* */
|
|
10476
10629
|
(validate_default()).validators.containsI = function (value, options, key) {
|
|
10477
|
-
const testValue = options
|
|
10630
|
+
const testValue = getTestValue(options);
|
|
10478
10631
|
if (Array.isArray(value)) {
|
|
10479
10632
|
if (value.some(item => !validate_default().validators.containsI(item.toLowerCase(), options, key))) {
|
|
10480
10633
|
return undefined;
|
|
@@ -10482,17 +10635,33 @@ var validate_default = /*#__PURE__*/__webpack_require__.n(validate);
|
|
|
10482
10635
|
return `No item of ${value.join(',')} contains ${JSON.stringify(testValue)}`;
|
|
10483
10636
|
}
|
|
10484
10637
|
if (Array.isArray(testValue)) {
|
|
10485
|
-
if (testValue.some(subTest => !validate_default().validators.containsI(value, subTest, key))) {
|
|
10638
|
+
if (testValue.some(subTest => !validate_default().validators.containsI(value, subTest.toLowerCase(), key))) {
|
|
10486
10639
|
return;
|
|
10487
10640
|
}
|
|
10488
10641
|
return `${key} must contain at least one of ${testValue.join(',')}`;
|
|
10489
10642
|
}
|
|
10490
|
-
if (testValue && value.indexOf && value.toLowerCase().indexOf(testValue) === -1) {
|
|
10643
|
+
if (testValue && value.indexOf && value.toLowerCase().indexOf(testValue.toLowerCase()) === -1) {
|
|
10491
10644
|
return key + 'must contain any case of' + testValue;
|
|
10492
10645
|
}
|
|
10493
10646
|
};
|
|
10647
|
+
/**
|
|
10648
|
+
* @example
|
|
10649
|
+
* value = 'Attenuation Corrected'
|
|
10650
|
+
* testValue = ‘Corr’ (Valid)
|
|
10651
|
+
* = ‘corr’ (Fail)
|
|
10652
|
+
* = [‘att’, ‘cor’] (Fail)
|
|
10653
|
+
* = [‘Att’, ‘Wall’] (Valid)
|
|
10654
|
+
* = [‘cat’, ‘dog’] (Fail)
|
|
10655
|
+
*
|
|
10656
|
+
* value = ['abc', 'def', 'GHI']
|
|
10657
|
+
* testValue = 'def' (Valid)
|
|
10658
|
+
* = 'dog' (Fail)
|
|
10659
|
+
* = ['cat', 'de'] (Valid)
|
|
10660
|
+
* = ['cat', 'dog'] (Fail)
|
|
10661
|
+
*
|
|
10662
|
+
* */
|
|
10494
10663
|
(validate_default()).validators.contains = function (value, options, key) {
|
|
10495
|
-
const testValue = options
|
|
10664
|
+
const testValue = getTestValue(options);
|
|
10496
10665
|
if (Array.isArray(value)) {
|
|
10497
10666
|
if (value.some(item => !validate_default().validators.contains(item, options, key))) {
|
|
10498
10667
|
return undefined;
|
|
@@ -10509,35 +10678,231 @@ var validate_default = /*#__PURE__*/__webpack_require__.n(validate);
|
|
|
10509
10678
|
return key + 'must contain ' + testValue;
|
|
10510
10679
|
}
|
|
10511
10680
|
};
|
|
10681
|
+
/**
|
|
10682
|
+
* @example
|
|
10683
|
+
* value = 'Attenuation Corrected'
|
|
10684
|
+
* testValue = ‘Corr’ (Fail)
|
|
10685
|
+
* = ‘corr’ (Valid)
|
|
10686
|
+
* = [‘att’, ‘cor’] (Valid)
|
|
10687
|
+
* = [‘Att’, ‘Wall’] (Fail)
|
|
10688
|
+
* = [‘cat’, ‘dog’] (Valid)
|
|
10689
|
+
*
|
|
10690
|
+
* value = ['abc', 'def', 'GHI']
|
|
10691
|
+
* testValue = 'def' (Fail)
|
|
10692
|
+
* = 'dog' (Valid)
|
|
10693
|
+
* = ['cat', 'de'] (Fail)
|
|
10694
|
+
* = ['cat', 'dog'] (Valid)
|
|
10695
|
+
*
|
|
10696
|
+
* */
|
|
10512
10697
|
(validate_default()).validators.doesNotContain = function (value, options, key) {
|
|
10513
|
-
|
|
10514
|
-
|
|
10698
|
+
const containsResult = validate_default().validators.contains(value, options, key);
|
|
10699
|
+
if (!containsResult) {
|
|
10700
|
+
return `No item of ${value} should contain ${getTestValue(options)}`;
|
|
10701
|
+
}
|
|
10702
|
+
};
|
|
10703
|
+
|
|
10704
|
+
/**
|
|
10705
|
+
* @example
|
|
10706
|
+
* value = 'Attenuation Corrected'
|
|
10707
|
+
* testValue = ‘Corr’ (Fail)
|
|
10708
|
+
* = ‘corr’ (Fail)
|
|
10709
|
+
* = [‘att’, ‘cor’] (Fail)
|
|
10710
|
+
* = [‘Att’, ‘Wall’] (Fail)
|
|
10711
|
+
* = [‘cat’, ‘dog’] (Valid)
|
|
10712
|
+
*
|
|
10713
|
+
* value = ['abc', 'def', 'GHI']
|
|
10714
|
+
* testValue = 'DEF' (Fail)
|
|
10715
|
+
* = 'dog' (Valid)
|
|
10716
|
+
* = ['cat', 'gh'] (Fail)
|
|
10717
|
+
* = ['cat', 'dog'] (Valid)
|
|
10718
|
+
*
|
|
10719
|
+
* */
|
|
10720
|
+
(validate_default()).validators.doesNotContainI = function (value, options, key) {
|
|
10721
|
+
const containsResult = validate_default().validators.containsI(value, options, key);
|
|
10722
|
+
if (!containsResult) {
|
|
10723
|
+
return `No item of ${value} should not contain ${getTestValue(options)}`;
|
|
10515
10724
|
}
|
|
10516
10725
|
};
|
|
10726
|
+
/**
|
|
10727
|
+
* @example
|
|
10728
|
+
* value = 'Attenuation Corrected'
|
|
10729
|
+
* testValue = ‘Corr’ (Fail)
|
|
10730
|
+
* = ‘Att’ (Fail)
|
|
10731
|
+
* = ['cat', 'dog', 'Att'] (Valid)
|
|
10732
|
+
* = [‘cat’, ‘dog’] (Fail)
|
|
10733
|
+
*
|
|
10734
|
+
* value = ['abc', 'def', 'GHI']
|
|
10735
|
+
* testValue = 'deg' (Valid)
|
|
10736
|
+
* = ['cat', 'GH'] (Valid)
|
|
10737
|
+
* = ['cat', 'gh'] (Fail)
|
|
10738
|
+
* = ['cat', 'dog'] (Fail)
|
|
10739
|
+
*
|
|
10740
|
+
* */
|
|
10517
10741
|
(validate_default()).validators.startsWith = function (value, options, key) {
|
|
10518
|
-
|
|
10519
|
-
|
|
10742
|
+
let testValues = getTestValue(options);
|
|
10743
|
+
if (typeof testValues === 'string') {
|
|
10744
|
+
testValues = [testValues];
|
|
10745
|
+
}
|
|
10746
|
+
if (typeof value === 'string') {
|
|
10747
|
+
if (!testValues.some(testValue => value.startsWith(testValue))) {
|
|
10748
|
+
return key + ' must start with any of these values: ' + testValues;
|
|
10749
|
+
}
|
|
10750
|
+
} else if (Array.isArray(value)) {
|
|
10751
|
+
let valid = false;
|
|
10752
|
+
for (let i = 0; i < value.length; i++) {
|
|
10753
|
+
for (let j = 0; j < testValues.length; j++) {
|
|
10754
|
+
if (value[i].startsWith(testValues[j])) {
|
|
10755
|
+
valid = true; // set valid flag to true if a match is found
|
|
10756
|
+
break;
|
|
10757
|
+
}
|
|
10758
|
+
}
|
|
10759
|
+
if (valid) {
|
|
10760
|
+
return undefined; // break out of loop if a match is found
|
|
10761
|
+
}
|
|
10762
|
+
}
|
|
10763
|
+
|
|
10764
|
+
if (!valid) {
|
|
10765
|
+
return key + ' must start with any of these values: ' + testValues; // return undefined if no match is found
|
|
10766
|
+
}
|
|
10767
|
+
} else {
|
|
10768
|
+
return 'Value must be a string or an array';
|
|
10520
10769
|
}
|
|
10521
10770
|
};
|
|
10771
|
+
|
|
10772
|
+
/**
|
|
10773
|
+
* @example
|
|
10774
|
+
* value = 'Attenuation Corrected'
|
|
10775
|
+
* testValue = ‘TED’ (Fail)
|
|
10776
|
+
* = ‘ted’ (Valid)
|
|
10777
|
+
* = ['cat', 'dog', 'ted'] (Valid)
|
|
10778
|
+
* = [‘cat’, ‘dog’] (Fail)
|
|
10779
|
+
*
|
|
10780
|
+
* value = ['abc', 'def', 'GHI']
|
|
10781
|
+
* testValue = 'deg' (Valid)
|
|
10782
|
+
* = ['cat', 'HI'] (Valid)
|
|
10783
|
+
* = ['cat', 'hi'] (Fail)
|
|
10784
|
+
* = ['cat', 'dog'] (Fail)
|
|
10785
|
+
*
|
|
10786
|
+
* */
|
|
10522
10787
|
(validate_default()).validators.endsWith = function (value, options, key) {
|
|
10523
|
-
|
|
10524
|
-
|
|
10788
|
+
let testValues = getTestValue(options);
|
|
10789
|
+
if (typeof testValues === 'string') {
|
|
10790
|
+
testValues = [testValues];
|
|
10791
|
+
}
|
|
10792
|
+
if (typeof value === 'string') {
|
|
10793
|
+
if (!testValues.some(testValue => value.endsWith(testValue))) {
|
|
10794
|
+
return key + ' must end with any of these values: ' + testValues;
|
|
10795
|
+
}
|
|
10796
|
+
} else if (Array.isArray(value)) {
|
|
10797
|
+
let valid = false;
|
|
10798
|
+
for (let i = 0; i < value.length; i++) {
|
|
10799
|
+
for (let j = 0; j < testValues.length; j++) {
|
|
10800
|
+
if (value[i].endsWith(testValues[j])) {
|
|
10801
|
+
valid = true; // set valid flag to true if a match is found
|
|
10802
|
+
break;
|
|
10803
|
+
}
|
|
10804
|
+
}
|
|
10805
|
+
if (valid) {
|
|
10806
|
+
return undefined; // break out of loop if a match is found
|
|
10807
|
+
}
|
|
10808
|
+
}
|
|
10809
|
+
|
|
10810
|
+
if (!valid) {
|
|
10811
|
+
return key + ' must end with any of these values: ' + testValues; // return undefined if no match is found
|
|
10812
|
+
}
|
|
10813
|
+
} else {
|
|
10814
|
+
return key + ' must be a string or an array';
|
|
10525
10815
|
}
|
|
10526
10816
|
};
|
|
10527
|
-
|
|
10817
|
+
/**
|
|
10818
|
+
* @example
|
|
10819
|
+
* value = 30
|
|
10820
|
+
* testValue = 20 (Valid)
|
|
10821
|
+
* = 40 (Fail)
|
|
10822
|
+
*
|
|
10823
|
+
* */
|
|
10528
10824
|
(validate_default()).validators.greaterThan = function (value, options, key) {
|
|
10529
10825
|
const testValue = getTestValue(options);
|
|
10530
|
-
if (value
|
|
10531
|
-
return key
|
|
10826
|
+
if (Array.isArray(value) || typeof value === 'string') {
|
|
10827
|
+
return `${key} is not allowed as an array or string`;
|
|
10828
|
+
}
|
|
10829
|
+
if (Array.isArray(testValue)) {
|
|
10830
|
+
if (testValue.length === 1) {
|
|
10831
|
+
if (!(value >= testValue[0])) {
|
|
10832
|
+
return `${key} must be greater than or equal to ${testValue[0]}, but was ${value}`;
|
|
10833
|
+
}
|
|
10834
|
+
} else if (testValue.length > 1) {
|
|
10835
|
+
return key + ' must be an array of length 1';
|
|
10836
|
+
}
|
|
10837
|
+
} else {
|
|
10838
|
+
if (!(value >= testValue)) {
|
|
10839
|
+
return key + ' must be greater than ' + testValue;
|
|
10840
|
+
}
|
|
10532
10841
|
}
|
|
10533
10842
|
};
|
|
10534
|
-
|
|
10843
|
+
/**
|
|
10844
|
+
* @example
|
|
10845
|
+
* value = 30
|
|
10846
|
+
* testValue = 40 (Valid)
|
|
10847
|
+
* = 20 (Fail)
|
|
10848
|
+
*
|
|
10849
|
+
* */
|
|
10850
|
+
(validate_default()).validators.lessThan = function (value, options, key) {
|
|
10535
10851
|
const testValue = getTestValue(options);
|
|
10536
|
-
if (
|
|
10537
|
-
|
|
10852
|
+
if (Array.isArray(testValue)) {
|
|
10853
|
+
if (testValue.length === 1) {
|
|
10854
|
+
if (!(value <= testValue[0])) {
|
|
10855
|
+
return `${key} must be less than or equal to ${testValue[0]}, but was ${value}`;
|
|
10856
|
+
}
|
|
10857
|
+
} else if (testValue.length > 1) {
|
|
10858
|
+
return key + ' must be an array of length 1';
|
|
10859
|
+
}
|
|
10860
|
+
} else {
|
|
10861
|
+
if (!(value <= testValue)) {
|
|
10862
|
+
return key + ' must be less than ' + testValue;
|
|
10863
|
+
}
|
|
10538
10864
|
}
|
|
10539
10865
|
};
|
|
10866
|
+
/**
|
|
10867
|
+
* @example
|
|
10868
|
+
|
|
10869
|
+
*
|
|
10870
|
+
* value = 50
|
|
10871
|
+
* testValue = [10,60] (Valid)
|
|
10872
|
+
* = [60, 10] (Valid)
|
|
10873
|
+
* = [0, 10] (Fail)
|
|
10874
|
+
* = [70, 80] (Fail)
|
|
10875
|
+
* = 45 (Fail)
|
|
10876
|
+
* = [45] (Fail)
|
|
10877
|
+
*
|
|
10878
|
+
* */
|
|
10879
|
+
(validate_default()).validators.range = function (value, options, key) {
|
|
10880
|
+
const testValue = getTestValue(options);
|
|
10881
|
+
if (Array.isArray(testValue) && testValue.length === 2) {
|
|
10882
|
+
const min = Math.min(testValue[0], testValue[1]);
|
|
10883
|
+
const max = Math.max(testValue[0], testValue[1]);
|
|
10884
|
+
if (value === undefined || value < min || value > max) {
|
|
10885
|
+
return `${key} with value ${value} must be between ${min} and ${max}`;
|
|
10886
|
+
}
|
|
10887
|
+
} else return `${key} must be an array of length 2`;
|
|
10888
|
+
};
|
|
10540
10889
|
(validate_default()).validators.notNull = value => value === null || value === undefined ? 'Value is null' : undefined;
|
|
10890
|
+
const getTestValue = options => {
|
|
10891
|
+
if (Array.isArray(options)) {
|
|
10892
|
+
return options.map(option => option?.value ?? option);
|
|
10893
|
+
} else {
|
|
10894
|
+
return options?.value ?? options;
|
|
10895
|
+
}
|
|
10896
|
+
};
|
|
10897
|
+
const dicomTagToArray = value => {
|
|
10898
|
+
let dicomArrayValue;
|
|
10899
|
+
if (!Array.isArray(value)) {
|
|
10900
|
+
dicomArrayValue = [value];
|
|
10901
|
+
} else {
|
|
10902
|
+
dicomArrayValue = [...value];
|
|
10903
|
+
}
|
|
10904
|
+
return dicomArrayValue;
|
|
10905
|
+
};
|
|
10541
10906
|
/* harmony default export */ const validator = ((validate_default()));
|
|
10542
10907
|
;// CONCATENATED MODULE: ../../core/src/services/HangingProtocolService/HPMatcher.js
|
|
10543
10908
|
|
|
@@ -11404,7 +11769,8 @@ var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
|
11404
11769
|
*/
|
|
11405
11770
|
/* harmony default export */ const formatDate = (function (date) {
|
|
11406
11771
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'DD-MMM-YYYY';
|
|
11407
|
-
|
|
11772
|
+
// moment(undefined) returns the current date, so return the empty string instead
|
|
11773
|
+
return date ? moment_default()(date).format(format) : '';
|
|
11408
11774
|
});
|
|
11409
11775
|
;// CONCATENATED MODULE: ../../core/src/utils/formatPN.js
|
|
11410
11776
|
/**
|
|
@@ -11426,6 +11792,58 @@ function formatPN(name) {
|
|
|
11426
11792
|
// Trim any extraneous whitespace
|
|
11427
11793
|
return cleaned.trim();
|
|
11428
11794
|
}
|
|
11795
|
+
;// CONCATENATED MODULE: ../../core/src/utils/generateAcceptHeader.ts
|
|
11796
|
+
const generateAcceptHeader = function () {
|
|
11797
|
+
let configAcceptHeader = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
11798
|
+
let requestTransferSyntaxUID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
11799
|
+
let omitQuotationForMultipartRequest = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
11800
|
+
//if acceptedHeader is passed by config use it as it.
|
|
11801
|
+
if (configAcceptHeader.length > 0) {
|
|
11802
|
+
return configAcceptHeader;
|
|
11803
|
+
}
|
|
11804
|
+
let acceptHeader = ['multipart/related'];
|
|
11805
|
+
if (requestTransferSyntaxUID && typeForTS[requestTransferSyntaxUID]) {
|
|
11806
|
+
const type = typeForTS[requestTransferSyntaxUID];
|
|
11807
|
+
acceptHeader.push('type=' + type);
|
|
11808
|
+
acceptHeader.push('transfer-syntax=' + requestTransferSyntaxUID);
|
|
11809
|
+
} else {
|
|
11810
|
+
acceptHeader.push('type=application/octet-stream');
|
|
11811
|
+
}
|
|
11812
|
+
if (!omitQuotationForMultipartRequest) {
|
|
11813
|
+
//need to add quotation for each mime type of each accept entry
|
|
11814
|
+
acceptHeader = acceptHeader.map(mime => {
|
|
11815
|
+
if (mime.startsWith('type=')) {
|
|
11816
|
+
const quotedParam = 'type="' + mime.substring(5, mime.length) + '"';
|
|
11817
|
+
return quotedParam;
|
|
11818
|
+
}
|
|
11819
|
+
if (mime.startsWith('transfer-syntax=')) {
|
|
11820
|
+
const quotedParam = 'transfer-syntax="' + mime.substring(16, mime.length) + '"';
|
|
11821
|
+
return quotedParam;
|
|
11822
|
+
} else {
|
|
11823
|
+
return mime;
|
|
11824
|
+
}
|
|
11825
|
+
});
|
|
11826
|
+
}
|
|
11827
|
+
return [acceptHeader.join('; ')];
|
|
11828
|
+
};
|
|
11829
|
+
const typeForTS = {
|
|
11830
|
+
'*': 'application/octet-stream',
|
|
11831
|
+
'1.2.840.10008.1.2.1': 'application/octet-stream',
|
|
11832
|
+
'1.2.840.10008.1.2': 'application/octet-stream',
|
|
11833
|
+
'1.2.840.10008.1.2.2': 'application/octet-stream',
|
|
11834
|
+
'1.2.840.10008.1.2.4.70': 'image/jpeg',
|
|
11835
|
+
'1.2.840.10008.1.2.4.50': 'image/jpeg',
|
|
11836
|
+
'1.2.840.10008.1.2.4.51': 'image/dicom+jpeg',
|
|
11837
|
+
'1.2.840.10008.1.2.4.57': 'image/jpeg',
|
|
11838
|
+
'1.2.840.10008.1.2.5': 'image/dicom-rle',
|
|
11839
|
+
'1.2.840.10008.1.2.4.80': 'image/jls',
|
|
11840
|
+
'1.2.840.10008.1.2.4.81': 'image/jls',
|
|
11841
|
+
'1.2.840.10008.1.2.4.90': 'image/jp2',
|
|
11842
|
+
'1.2.840.10008.1.2.4.91': 'image/jp2',
|
|
11843
|
+
'1.2.840.10008.1.2.4.92': 'image/jpx',
|
|
11844
|
+
'1.2.840.10008.1.2.4.93': 'image/jpx'
|
|
11845
|
+
};
|
|
11846
|
+
/* harmony default export */ const utils_generateAcceptHeader = (generateAcceptHeader);
|
|
11429
11847
|
;// CONCATENATED MODULE: ../../core/src/utils/resolveObjectPath.js
|
|
11430
11848
|
function resolveObjectPath(root, path, defaultValue) {
|
|
11431
11849
|
if (root !== null && typeof root === 'object' && typeof path === 'string') {
|
|
@@ -12194,6 +12612,7 @@ const getSplitParam = function (lowerCaseKey) {
|
|
|
12194
12612
|
|
|
12195
12613
|
|
|
12196
12614
|
|
|
12615
|
+
|
|
12197
12616
|
|
|
12198
12617
|
|
|
12199
12618
|
// Commented out unused functionality.
|
|
@@ -12234,7 +12653,8 @@ const utils = {
|
|
|
12234
12653
|
downloadCSVReport: downloadCSVReport,
|
|
12235
12654
|
subscribeToNextViewportGridChange: subscribeToNextViewportGridChange,
|
|
12236
12655
|
splitComma: splitComma,
|
|
12237
|
-
getSplitParam: getSplitParam
|
|
12656
|
+
getSplitParam: getSplitParam,
|
|
12657
|
+
generateAcceptHeader: utils_generateAcceptHeader
|
|
12238
12658
|
};
|
|
12239
12659
|
|
|
12240
12660
|
/* harmony default export */ const src_utils = (utils);
|
|
@@ -12842,10 +13262,13 @@ class HangingProtocolService extends PubSubService {
|
|
|
12842
13262
|
const {
|
|
12843
13263
|
id
|
|
12844
13264
|
} = displaySet;
|
|
13265
|
+
const displaySetMatchDetail = displaySetMatchDetails.get(id);
|
|
12845
13266
|
const {
|
|
12846
13267
|
displaySetInstanceUID: oldDisplaySetInstanceUID
|
|
12847
|
-
} =
|
|
12848
|
-
|
|
13268
|
+
} = displaySetMatchDetail;
|
|
13269
|
+
const displaySetInstanceUID = displaySet.id === displaySetSelectorId ? newDisplaySetInstanceUID : oldDisplaySetInstanceUID;
|
|
13270
|
+
displaySetMatchDetail.displaySetInstanceUID = displaySetInstanceUID;
|
|
13271
|
+
displaySetInstanceUIDs.push(displaySetInstanceUID);
|
|
12849
13272
|
displaySetOptions.push(displaySet);
|
|
12850
13273
|
});
|
|
12851
13274
|
}
|
|
@@ -13405,6 +13828,7 @@ class HangingProtocolService extends PubSubService {
|
|
|
13405
13828
|
const studyMatchDetails = this.protocolEngine.findMatch(study, studyMatchingRules, {
|
|
13406
13829
|
studies: this.studies,
|
|
13407
13830
|
displaySets: studyDisplaySets,
|
|
13831
|
+
allDisplaySets: this.displaySets,
|
|
13408
13832
|
displaySetMatchDetails: this.displaySetMatchDetails
|
|
13409
13833
|
});
|
|
13410
13834
|
|
|
@@ -14771,7 +15195,7 @@ const combineFrameInstance = (frame, instance) => {
|
|
|
14771
15195
|
} = instance;
|
|
14772
15196
|
if (PerFrameFunctionalGroupsSequence || NumberOfFrames > 1) {
|
|
14773
15197
|
const frameNumber = Number.parseInt(frame || 1);
|
|
14774
|
-
const shared = (SharedFunctionalGroupsSequence ? Object.values(SharedFunctionalGroupsSequence[0]) : []).map(it => it[0]).filter(it => it !== undefined && typeof it === 'object');
|
|
15198
|
+
const shared = (SharedFunctionalGroupsSequence ? Object.values(SharedFunctionalGroupsSequence[0]) : []).filter(it => !!it).map(it => it[0]).filter(it => it !== undefined && typeof it === 'object');
|
|
14775
15199
|
const perFrame = (PerFrameFunctionalGroupsSequence ? Object.values(PerFrameFunctionalGroupsSequence[frameNumber - 1]) : []).map(it => it[0]).filter(it => it !== undefined && typeof it === 'object');
|
|
14776
15200
|
|
|
14777
15201
|
// this is to fix NM multiframe datasets with position and orientation
|
|
@@ -19929,7 +20353,7 @@ const detectionOptions = {
|
|
|
19929
20353
|
}
|
|
19930
20354
|
});
|
|
19931
20355
|
;// CONCATENATED MODULE: ../../i18n/package.json
|
|
19932
|
-
const package_namespaceObject = JSON.parse('{"i8":"3.7.0-beta.
|
|
20356
|
+
const package_namespaceObject = JSON.parse('{"i8":"3.7.0-beta.20"}');
|
|
19933
20357
|
;// CONCATENATED MODULE: ../../i18n/src/utils.js
|
|
19934
20358
|
const languagesMap = {
|
|
19935
20359
|
ar: 'Arabic',
|
|
@@ -20015,11 +20439,11 @@ const UserPreferencesModal_namespaceObject = JSON.parse('{"No hotkeys found":"Ne
|
|
|
20015
20439
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/AboutModal.json
|
|
20016
20440
|
const AboutModal_namespaceObject = JSON.parse('{"Browser":"Browser","Build Number":"Build Number","Latest Master Commits":"Latest Master Commits","More details":"More details","Name":"Name","OHIF Viewer - About":"OHIF Viewer - About","OS":"OS","Report an issue":"Report an issue","Repository URL":"Repository URL","Value":"Value","Version Information":"Version Information","Visit the forum":"Visit the forum"}');
|
|
20017
20441
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/Buttons.json
|
|
20018
|
-
const Buttons_namespaceObject = JSON.parse('{"Acquired":"Acquired","Angle":"Angle","Axial":"Axial","Bidirectional":"Bidirectional","Brush":"Brush","CINE":"CINE","Cancel":"Cancel","Circle":"Circle","Clear":"Clear","Coronal":"Coronal","Crosshairs":"Crosshairs","Download":"Download","Ellipse":"Ellipse","Elliptical":"Elliptical","Flip H":"Flip H","Flip V":"Flip V","Freehand":"Freehand","Invert":"Invert","Layout":"$t(Common:Layout)","Length":"Length","Levels":"Levels","Magnify":"Magnify","Manual":"Manual","Measurements":"Measurements","More":"$t(Common:More)","Next":"$t(Common:Next)","Pan":"Pan","Play":"$t(Common:Play)","Previous":"$t(Common:Previous)","Probe":"Probe","ROI Window":"ROI Window","Rectangle":"Rectangle","Reset":"$t(Common:Reset)","Reset to Defaults":"$t(Common:Reset) to Defaults","Rotate Right":"Rotate Right","Sagittal":"Sagittal","Save":"Save","Stack Scroll":"Stack Scroll","Stop":"$t(Common:Stop)","Themes":"Themes","Zoom":"Zoom"}');
|
|
20442
|
+
const Buttons_namespaceObject = JSON.parse('{"Acquired":"Acquired","Angle":"Angle","Annotation":"Annotation","Axial":"Axial","Bidirectional":"Bidirectional","Brush":"Brush","Cine":"Cine","CINE":"CINE","Cancel":"Cancel","Capture":"Capture","Circle":"Circle","Clear":"Clear","Coronal":"Coronal","Crosshairs":"Crosshairs","Download":"Download","Ellipse":"Ellipse","Elliptical":"Elliptical","Flip H":"Flip H","Flip Horizontally":"Flip Horizontally","Flip V":"Flip V","Freehand":"Freehand","Grid Layout":"Grid Layout","Invert":"Invert","Layout":"$t(Common:Layout)","Length":"Length","Levels":"Levels","Magnify":"Magnify","Manual":"Manual","Measurements":"Measurements","More":"$t(Common:More)","More Tools":"More Tools","Next":"$t(Common:Next)","Pan":"Pan","Play":"$t(Common:Play)","Previous":"$t(Common:Previous)","Probe":"Probe","ROI Window":"ROI Window","Rectangle":"Rectangle","Reference Lines":"Reference Lines","Reset":"$t(Common:Reset)","Reset to Defaults":"$t(Common:Reset) to Defaults","Rotate Right":"Rotate Right","Sagittal":"Sagittal","Save":"Save","Stack Scroll":"Stack Scroll","Stack Image Sync":"Stack Image Sync","Stop":"$t(Common:Stop)","Themes":"Themes","Zoom":"Zoom"}');
|
|
20019
20443
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/CineDialog.json
|
|
20020
20444
|
const CineDialog_namespaceObject = JSON.parse('{"Next image":"$t(Common:Next) $t(Common:Image)","Play / Stop":"$t(Common:Play) / $t(Common:Stop)","Previous image":"$t(Common:Previous) $t(Common:Image)","Skip to first image":"Skip to first $t(Common:Image)","Skip to last image":"Skip to last $t(Common:Image)","fps":"fps"}');
|
|
20021
20445
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/Common.json
|
|
20022
|
-
const Common_namespaceObject = JSON.parse('{"Close":"Close","Image":"Image","Layout":"Layout","LOAD":"LOAD","Measurements":"Measurements","More":"More","Next":"Next","Play":"Play","Previous":"Previous","Reset":"Reset","RowsPerPage":"rows per page","Series":"Series","Show":"Show","Stop":"Stop","StudyDate":"Study Date"}');
|
|
20446
|
+
const Common_namespaceObject = JSON.parse('{"Close":"Close","Image":"Image","Layout":"Layout","LOAD":"LOAD","Measurements":"Measurements","More":"More","Next":"Next","NoStudyDate":"No Study Date","Play":"Play","Previous":"Previous","Reset":"Reset","RowsPerPage":"rows per page","Series":"Series","Show":"Show","Stop":"Stop","StudyDate":"Study Date"}');
|
|
20023
20447
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/DatePicker.json
|
|
20024
20448
|
const DatePicker_namespaceObject = JSON.parse('{"Clear dates":"Clear dates","End Date":"End Date","Start Date":"Start Date"}');
|
|
20025
20449
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/Header.json
|
|
@@ -20252,7 +20676,7 @@ const vi_UserPreferencesModal_namespaceObject = JSON.parse('{"Cancel":"$t(Button
|
|
|
20252
20676
|
}
|
|
20253
20677
|
});
|
|
20254
20678
|
;// CONCATENATED MODULE: ../../i18n/src/locales/zh/Buttons.json
|
|
20255
|
-
const zh_Buttons_namespaceObject = JSON.parse('{"Acquired":"已获取","Angle":"角度","Axial":"轴状面","Bidirectional":"双向","Brush":"橡皮擦","CINE":"播放动画","Cancel":"取消","Circle":"圆","Clear":"清除","Coronal":"冠状面","Crosshairs":"十字线","Ellipse":"椭圆","Elliptical":"椭圆的","Flip H":"左右翻转","Flip V":"上下翻转","Freehand":"自由画线","Invert":"灰度反转","Layout":"显示窗口","Length":"长度","Levels":"层级","Magnify":"放大镜","Manual":"手动","Measurements":"测量","More":"更多","Next":"下一个","Pan":"移动","Play":"播放","Previous":"上一个","Probe":"探针","ROI Window":"选择对比度","Rectangle":"矩形","Reset":"复原","Reset to Defaults":"返回默认","Rotate Right":"顺时针旋转","Sagittal":"矢状面","Save":"保存","Stack Scroll":"滑动切换图层","Stop":"停止","Themes":"主题","Zoom":"放大"}');
|
|
20679
|
+
const zh_Buttons_namespaceObject = JSON.parse('{"Acquired":"已获取","Angle":"角度","Annotation":"注释","Axial":"轴状面","Bidirectional":"双向","Brush":"橡皮擦","Cine":"播放动画","CINE":"播放动画","Cancel":"取消","Capture":"下载","Circle":"圆","Clear":"清除","Coronal":"冠状面","Crosshairs":"十字线","Ellipse":"椭圆","Elliptical":"椭圆的","Flip H":"左右翻转","Flip Horizontally":"左右翻转","Flip V":"上下翻转","Freehand":"自由画线","Grid Layout":"窗口布局","Invert":"灰度反转","Layout":"显示窗口","Length":"长度","Levels":"层级","Magnify":"放大镜","Manual":"手动","Measurements":"测量","More":"更多","More Tools":"更多工具","More Measure Tools":"更多测量工具","Next":"下一个","Pan":"移动","Play":"播放","Previous":"上一个","Probe":"探针","ROI Window":"选择对比度","Rectangle":"矩形","Reference Lines":"参考线","Reset":"复原","Reset to Defaults":"返回默认","Rotate Right":"顺时针旋转","Sagittal":"矢状面","Save":"保存","Stack Scroll":"滑动切换图层","Stack Image Sync":"影像联动","Stop":"停止","Themes":"主题","Zoom":"放大"}');
|
|
20256
20680
|
;// CONCATENATED MODULE: ../../i18n/src/locales/zh/CineDialog.json
|
|
20257
20681
|
const zh_CineDialog_namespaceObject = JSON.parse('{"Next image":"下一个图像","Play / Stop":"播放/停止","Previous image":"上一个图像","Skip to first image":"跳转到第一个图像","Skip to last image":"跳转到最后一个图像","fps":"帧率"}');
|
|
20258
20682
|
;// CONCATENATED MODULE: ../../i18n/src/locales/zh/Common.json
|
|
@@ -23363,7 +23787,7 @@ Typography.propTypes = {
|
|
|
23363
23787
|
|
|
23364
23788
|
/***/ }),
|
|
23365
23789
|
|
|
23366
|
-
/***/
|
|
23790
|
+
/***/ 28619:
|
|
23367
23791
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23368
23792
|
|
|
23369
23793
|
"use strict";
|
|
@@ -23372,6 +23796,7 @@ Typography.propTypes = {
|
|
|
23372
23796
|
__webpack_require__.d(__webpack_exports__, {
|
|
23373
23797
|
tk: () => (/* reexport */ components_AboutModal),
|
|
23374
23798
|
zx: () => (/* reexport */ components_Button),
|
|
23799
|
+
LZ: () => (/* reexport */ ButtonEnums_namespaceObject),
|
|
23375
23800
|
hE: () => (/* reexport */ components_ButtonGroup),
|
|
23376
23801
|
H6: () => (/* reexport */ components_CinePlayer),
|
|
23377
23802
|
bC: () => (/* reexport */ CineProvider),
|
|
@@ -23388,6 +23813,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23388
23813
|
OX: () => (/* reexport */ components_InputRange),
|
|
23389
23814
|
__: () => (/* reexport */ components_Label),
|
|
23390
23815
|
OF: () => (/* reexport */ components_LayoutSelector),
|
|
23816
|
+
mN: () => (/* reexport */ components_LegacyButton),
|
|
23391
23817
|
LE: () => (/* reexport */ components_LoadingIndicatorProgress),
|
|
23392
23818
|
bk: () => (/* reexport */ components_LoadingIndicatorTotalPercent),
|
|
23393
23819
|
wt: () => (/* reexport */ components_MeasurementTable),
|
|
@@ -23415,7 +23841,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23415
23841
|
ux: () => (/* reexport */ UserAuthenticationProvider),
|
|
23416
23842
|
i1: () => (/* reexport */ components_UserPreferences),
|
|
23417
23843
|
uY: () => (/* reexport */ components_ViewportActionBar),
|
|
23418
|
-
|
|
23844
|
+
DF: () => (/* reexport */ contextProviders_ViewportDialogProvider),
|
|
23419
23845
|
mQ: () => (/* reexport */ ViewportDownloadForm_ViewportDownloadForm),
|
|
23420
23846
|
_e: () => (/* reexport */ components_ViewportGrid),
|
|
23421
23847
|
CW: () => (/* reexport */ ViewportGridProvider),
|
|
@@ -23442,6 +23868,14 @@ __webpack_require__.d(NativeTypes_namespaceObject, {
|
|
|
23442
23868
|
URL: () => (NativeTypes_URL)
|
|
23443
23869
|
});
|
|
23444
23870
|
|
|
23871
|
+
// NAMESPACE OBJECT: ../../ui/src/components/Button/ButtonEnums.ts
|
|
23872
|
+
var ButtonEnums_namespaceObject = {};
|
|
23873
|
+
__webpack_require__.r(ButtonEnums_namespaceObject);
|
|
23874
|
+
__webpack_require__.d(ButtonEnums_namespaceObject, {
|
|
23875
|
+
d: () => (size),
|
|
23876
|
+
U: () => (type)
|
|
23877
|
+
});
|
|
23878
|
+
|
|
23445
23879
|
// EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
|
|
23446
23880
|
var prop_types = __webpack_require__(60216);
|
|
23447
23881
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
@@ -30810,8 +31244,8 @@ ViewportDialogProvider.propTypes = {
|
|
|
30810
31244
|
// EXTERNAL MODULE: ../../../node_modules/lodash.isequal/index.js
|
|
30811
31245
|
var lodash_isequal = __webpack_require__(68652);
|
|
30812
31246
|
var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal);
|
|
30813
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
30814
|
-
var src = __webpack_require__(
|
|
31247
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 102 modules
|
|
31248
|
+
var src = __webpack_require__(62771);
|
|
30815
31249
|
;// CONCATENATED MODULE: ../../ui/src/utils/viewportLabels.ts
|
|
30816
31250
|
const viewportLabels = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
|
|
30817
31251
|
/* harmony default export */ const utils_viewportLabels = (viewportLabels);
|
|
@@ -32072,153 +32506,67 @@ AboutModal.propTypes = {
|
|
|
32072
32506
|
;// CONCATENATED MODULE: ../../ui/src/components/AboutModal/index.js
|
|
32073
32507
|
|
|
32074
32508
|
/* harmony default export */ const components_AboutModal = (AboutModal_AboutModal);
|
|
32509
|
+
;// CONCATENATED MODULE: ../../ui/src/components/Button/ButtonEnums.ts
|
|
32510
|
+
var type = /*#__PURE__*/function (type) {
|
|
32511
|
+
type["primary"] = "primary";
|
|
32512
|
+
type["secondary"] = "secondary";
|
|
32513
|
+
return type;
|
|
32514
|
+
}(type || {});
|
|
32515
|
+
var size = /*#__PURE__*/function (size) {
|
|
32516
|
+
size["medium"] = "medium";
|
|
32517
|
+
size["small"] = "small";
|
|
32518
|
+
return size;
|
|
32519
|
+
}(size || {});
|
|
32520
|
+
|
|
32075
32521
|
;// CONCATENATED MODULE: ../../ui/src/components/Button/Button.tsx
|
|
32076
|
-
function Button_extends() { Button_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Button_extends.apply(this, arguments); }
|
|
32077
32522
|
|
|
32078
32523
|
|
|
32079
32524
|
|
|
32080
|
-
|
|
32525
|
+
|
|
32526
|
+
const sizeClasses = {
|
|
32527
|
+
[size.small]: 'h-[26px] text-[13px]',
|
|
32528
|
+
[size.medium]: 'h-[32px] text-[14px]'
|
|
32529
|
+
};
|
|
32530
|
+
const layoutClasses = 'box-content inline-flex flex-row items-center justify-center gap-[5px] justify center px-[10px] outline-none rounded';
|
|
32531
|
+
const baseFontTextClasses = 'leading-[1.2] font-sans text-center whitespace-nowrap';
|
|
32532
|
+
const fontTextClasses = {
|
|
32533
|
+
[type.primary]: classnames_default()(baseFontTextClasses, 'font-semibold'),
|
|
32534
|
+
[type.secondary]: classnames_default()(baseFontTextClasses, 'font-400')
|
|
32535
|
+
};
|
|
32536
|
+
const baseEnabledEffectClasses = 'transition duration-300 ease-in-out focus:outline-none';
|
|
32537
|
+
const enabledEffectClasses = {
|
|
32538
|
+
[type.primary]: classnames_default()(baseEnabledEffectClasses, 'hover:bg-customblue-80 active:bg-customblue-40'),
|
|
32539
|
+
[type.secondary]: classnames_default()(baseEnabledEffectClasses, 'hover:bg-customblue-50 active:bg-customblue-20')
|
|
32540
|
+
};
|
|
32541
|
+
const baseEnabledClasses = 'text-white';
|
|
32542
|
+
const enabledClasses = {
|
|
32543
|
+
[type.primary]: classnames_default()('bg-primary-main', baseEnabledClasses, enabledEffectClasses[type.primary]),
|
|
32544
|
+
[type.secondary]: classnames_default()('bg-customblue-30', baseEnabledClasses, enabledEffectClasses[type.secondary])
|
|
32545
|
+
};
|
|
32546
|
+
const disabledClasses = 'bg-inputfield-placeholder text-common-light cursor-default';
|
|
32081
32547
|
const defaults = {
|
|
32082
32548
|
color: 'default',
|
|
32083
32549
|
disabled: false,
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
|
|
32087
|
-
size: 'medium',
|
|
32088
|
-
type: 'button',
|
|
32089
|
-
variant: 'contained'
|
|
32090
|
-
};
|
|
32091
|
-
const roundedClasses = {
|
|
32092
|
-
none: '',
|
|
32093
|
-
small: 'rounded',
|
|
32094
|
-
medium: 'rounded-md',
|
|
32095
|
-
large: 'rounded-lg',
|
|
32096
|
-
full: 'rounded-full'
|
|
32097
|
-
};
|
|
32098
|
-
const variants = {
|
|
32099
|
-
text: {
|
|
32100
|
-
default: 'text-primary-light hover:bg-primary-light hover:text-white active:opacity-80 focus:bg-primary-light focus:text-white',
|
|
32101
|
-
primary: 'text-primary-main hover:bg-primary-main hover:text-white active:opacity-80 focus:bg-primary-main focus:text-white',
|
|
32102
|
-
secondary: 'text-secondary-light hover:bg-secondary-light hover:text-white active:opacity-80 focus:bg-secondary-light focus:text-white',
|
|
32103
|
-
white: 'text-white hover:bg-white hover:text-black active:opacity-80 focus:bg-white focus:text-black',
|
|
32104
|
-
black: 'text-black hover:bg-black hover:text-white focus:bg-black focus:text-white active:opacity-80'
|
|
32105
|
-
},
|
|
32106
|
-
outlined: {
|
|
32107
|
-
default: 'text-primary-light hover:bg-primary-light hover:text-black focus:text-black focus:bg-primary-light active:opacity-80',
|
|
32108
|
-
primary: 'text-primary-main hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32109
|
-
secondary: 'text-secondary-light hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32110
|
-
translucent: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32111
|
-
white: 'text-black hover:bg-primary-main focus:bg-primary-main hover:border-black focus:border-black',
|
|
32112
|
-
black: 'text-white hover:bg-primary-main focus:bg-primary-main hover:border-black focus:border-black',
|
|
32113
|
-
primaryActive: 'text-primary-active hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32114
|
-
primaryLight: 'border bg-transparent border-primary-main text-white hover:opacity-80 active:opacity-100 focus:opacity-80'
|
|
32115
|
-
},
|
|
32116
|
-
contained: {
|
|
32117
|
-
default: 'text-black hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32118
|
-
primary: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32119
|
-
primaryDark: 'text-primary-active hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32120
|
-
secondary: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32121
|
-
white: 'text-black hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32122
|
-
black: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32123
|
-
light: 'border text-black hover:opacity-80 active:opacity-100 focus:opacity-80'
|
|
32124
|
-
},
|
|
32125
|
-
disabled: {
|
|
32126
|
-
default: 'cursor-not-allowed opacity-50 text-black',
|
|
32127
|
-
primary: 'cursor-not-allowed opacity-50 text-white',
|
|
32128
|
-
secondary: 'cursor-not-allowed opacity-50 text-white',
|
|
32129
|
-
white: 'cursor-not-allowed opacity-50 text-black',
|
|
32130
|
-
black: 'cursor-not-allowed opacity-50 text-white',
|
|
32131
|
-
light: 'cursor-not-allowed opacity-50 border text-black'
|
|
32132
|
-
}
|
|
32133
|
-
};
|
|
32134
|
-
const defaultVariantBackGroundColor = {
|
|
32135
|
-
text: {
|
|
32136
|
-
default: '',
|
|
32137
|
-
primary: '',
|
|
32138
|
-
secondary: '',
|
|
32139
|
-
white: '',
|
|
32140
|
-
black: ''
|
|
32141
|
-
},
|
|
32142
|
-
outlined: {
|
|
32143
|
-
default: 'bg-transparent',
|
|
32144
|
-
primary: 'bg-transparent',
|
|
32145
|
-
secondary: 'bg-transparent',
|
|
32146
|
-
black: 'bg-black',
|
|
32147
|
-
white: ''
|
|
32148
|
-
},
|
|
32149
|
-
contained: {
|
|
32150
|
-
default: 'bg-primary-light',
|
|
32151
|
-
primary: 'bg-primary-main',
|
|
32152
|
-
primaryDark: 'bg-primary-dark',
|
|
32153
|
-
secondary: 'bg-secondary-light',
|
|
32154
|
-
white: 'bg-white',
|
|
32155
|
-
black: 'bg-black',
|
|
32156
|
-
light: 'bg-primary-light'
|
|
32157
|
-
},
|
|
32158
|
-
disabled: {
|
|
32159
|
-
default: 'bg-primary-light',
|
|
32160
|
-
primary: 'bg-primary-main',
|
|
32161
|
-
secondary: 'bg-secondary-light',
|
|
32162
|
-
white: 'bg-white',
|
|
32163
|
-
black: 'bg-black',
|
|
32164
|
-
light: 'bg-primary-light'
|
|
32165
|
-
}
|
|
32166
|
-
};
|
|
32167
|
-
const _getVariantClass = function (variant, color) {
|
|
32168
|
-
let bgColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
32169
|
-
const defaultBackgroundColor = defaultVariantBackGroundColor[variant][color];
|
|
32170
|
-
if (!bgColor) {
|
|
32171
|
-
bgColor = defaultBackgroundColor;
|
|
32172
|
-
}
|
|
32173
|
-
return `${variants[variant][color]} ${bgColor}`;
|
|
32174
|
-
};
|
|
32175
|
-
const borderClasses = {
|
|
32176
|
-
none: '',
|
|
32177
|
-
light: 'border border-primary-light',
|
|
32178
|
-
primary: 'border border-primary-main',
|
|
32179
|
-
primaryActive: 'border border-primary-active',
|
|
32180
|
-
secondary: 'border border-secondary-light',
|
|
32181
|
-
white: 'border border-white',
|
|
32182
|
-
black: 'border border-black'
|
|
32183
|
-
};
|
|
32184
|
-
const sizeClasses = {
|
|
32185
|
-
small: 'py-2 px-2 text-sm min-w-md',
|
|
32186
|
-
medium: 'py-2 px-2 text-lg min-w-md',
|
|
32187
|
-
large: 'py-2 px-6 text-xl min-w-md',
|
|
32188
|
-
initial: ''
|
|
32189
|
-
};
|
|
32190
|
-
const fullWidthClasses = {
|
|
32191
|
-
true: 'flex w-full',
|
|
32192
|
-
false: 'inline-flex'
|
|
32550
|
+
rounded: 'small',
|
|
32551
|
+
size: size.medium,
|
|
32552
|
+
type: type.primary
|
|
32193
32553
|
};
|
|
32194
32554
|
const Button = _ref => {
|
|
32195
32555
|
let {
|
|
32196
32556
|
children,
|
|
32197
|
-
variant = defaults.variant,
|
|
32198
|
-
color = defaults.color,
|
|
32199
|
-
border = defaults.border,
|
|
32200
32557
|
size = defaults.size,
|
|
32201
|
-
rounded = defaults.rounded,
|
|
32202
32558
|
disabled = defaults.disabled,
|
|
32203
32559
|
type = defaults.type,
|
|
32204
|
-
fullWidth = defaults.fullWidth,
|
|
32205
|
-
bgColor = null,
|
|
32206
32560
|
startIcon: startIconProp,
|
|
32207
32561
|
endIcon: endIconProp,
|
|
32208
32562
|
name,
|
|
32209
32563
|
className,
|
|
32210
|
-
onClick
|
|
32211
|
-
/** TODO: All possible props should be explicitly defined -- avoid spreading props */
|
|
32212
|
-
...rest
|
|
32564
|
+
onClick
|
|
32213
32565
|
} = _ref;
|
|
32214
|
-
const startIcon = startIconProp && /*#__PURE__*/react.createElement(
|
|
32215
|
-
className: "mr-2"
|
|
32216
|
-
}, /*#__PURE__*/react.cloneElement(startIconProp, {
|
|
32566
|
+
const startIcon = startIconProp && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.cloneElement(startIconProp, {
|
|
32217
32567
|
className: classnames_default()('w-4 h-4 fill-current')
|
|
32218
32568
|
}));
|
|
32219
|
-
const endIcon = endIconProp && /*#__PURE__*/react.createElement(
|
|
32220
|
-
className: "ml-2"
|
|
32221
|
-
}, /*#__PURE__*/react.cloneElement(endIconProp, {
|
|
32569
|
+
const endIcon = endIconProp && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.cloneElement(endIconProp, {
|
|
32222
32570
|
className: classnames_default()('w-4 h-4 fill-current')
|
|
32223
32571
|
}));
|
|
32224
32572
|
const buttonElement = (0,react.useRef)(null);
|
|
@@ -32228,21 +32576,23 @@ const Button = _ref => {
|
|
|
32228
32576
|
onClick(e);
|
|
32229
32577
|
}
|
|
32230
32578
|
};
|
|
32231
|
-
const finalClassName = classnames_default()(
|
|
32232
|
-
|
|
32579
|
+
const finalClassName = classnames_default()(layoutClasses, fontTextClasses[type], disabled ? disabledClasses : enabledClasses[type], sizeClasses[size], children ? 'min-w-[32px]' : '',
|
|
32580
|
+
// minimum width for buttons with text; icon only button does NOT get a minimum width
|
|
32581
|
+
className);
|
|
32582
|
+
return /*#__PURE__*/react.createElement("button", {
|
|
32233
32583
|
className: finalClassName,
|
|
32234
32584
|
disabled: disabled,
|
|
32235
32585
|
ref: buttonElement,
|
|
32236
32586
|
onClick: handleOnClick,
|
|
32237
|
-
type: type,
|
|
32238
32587
|
"data-cy": `${name}-btn`
|
|
32239
|
-
},
|
|
32588
|
+
}, startIcon, children, endIcon);
|
|
32240
32589
|
};
|
|
32241
32590
|
Button.defaultProps = {
|
|
32242
|
-
color: defaults.color,
|
|
32243
32591
|
disabled: false,
|
|
32244
32592
|
children: '',
|
|
32245
|
-
onClick: () => {}
|
|
32593
|
+
onClick: () => {},
|
|
32594
|
+
type: defaults.type,
|
|
32595
|
+
size: defaults.size
|
|
32246
32596
|
};
|
|
32247
32597
|
Button.propTypes = {
|
|
32248
32598
|
/** What is inside the button, can be text or react component */
|
|
@@ -32250,32 +32600,24 @@ Button.propTypes = {
|
|
|
32250
32600
|
/** Callback to be called when the button is clicked */
|
|
32251
32601
|
onClick: (prop_types_default()).func.isRequired,
|
|
32252
32602
|
/** Button size */
|
|
32253
|
-
size: prop_types_default().oneOf([
|
|
32254
|
-
/** Button corner roundness */
|
|
32255
|
-
rounded: prop_types_default().oneOf(['none', 'small', 'medium', 'large', 'full']),
|
|
32256
|
-
variant: prop_types_default().oneOf(['text', 'outlined', 'contained', 'disabled']),
|
|
32257
|
-
/* color prop must have all the possible keys of variants defined above */
|
|
32258
|
-
color: prop_types_default().oneOf(['default', 'primary', 'primaryDark', 'primaryActive', 'secondary', 'white', 'black', 'inherit', 'light', 'translucent']),
|
|
32259
|
-
border: prop_types_default().oneOf(['none', 'light', 'default', 'primary', 'primaryActive', 'secondary', 'white', 'black']),
|
|
32260
|
-
/** Whether the button should have full width */
|
|
32261
|
-
fullWidth: (prop_types_default()).bool,
|
|
32603
|
+
size: prop_types_default().oneOf([size.medium, size.small]),
|
|
32262
32604
|
/** Whether the button should be disabled */
|
|
32263
32605
|
disabled: (prop_types_default()).bool,
|
|
32264
32606
|
/** Button type */
|
|
32265
|
-
type:
|
|
32607
|
+
type: prop_types_default().oneOf([type.primary, type.secondary]),
|
|
32266
32608
|
name: (prop_types_default()).string,
|
|
32267
32609
|
/** Button start icon name - if any icon is specified */
|
|
32268
32610
|
startIcon: (prop_types_default()).node,
|
|
32269
32611
|
/** Button end icon name - if any icon is specified */
|
|
32270
32612
|
endIcon: (prop_types_default()).node,
|
|
32271
32613
|
/** Additional TailwindCSS classnames */
|
|
32272
|
-
className: (prop_types_default()).string
|
|
32273
|
-
/** Background color for the button to override*/
|
|
32274
|
-
bgColor: (prop_types_default()).string
|
|
32614
|
+
className: (prop_types_default()).string
|
|
32275
32615
|
};
|
|
32276
32616
|
/* harmony default export */ const Button_Button = (Button);
|
|
32277
32617
|
;// CONCATENATED MODULE: ../../ui/src/components/Button/index.js
|
|
32278
32618
|
|
|
32619
|
+
|
|
32620
|
+
|
|
32279
32621
|
/* harmony default export */ const components_Button = (Button_Button);
|
|
32280
32622
|
;// CONCATENATED MODULE: ../../ui/src/components/ButtonGroup/ButtonGroup.tsx
|
|
32281
32623
|
function ButtonGroup_extends() { ButtonGroup_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonGroup_extends.apply(this, arguments); }
|
|
@@ -32283,7 +32625,7 @@ function ButtonGroup_extends() { ButtonGroup_extends = Object.assign ? Object.as
|
|
|
32283
32625
|
|
|
32284
32626
|
|
|
32285
32627
|
const baseButtonClass = 'border outline-none';
|
|
32286
|
-
const
|
|
32628
|
+
const roundedClasses = {
|
|
32287
32629
|
vertical: {
|
|
32288
32630
|
none: '',
|
|
32289
32631
|
small: 'first:rounded-t last:rounded-b',
|
|
@@ -32299,7 +32641,7 @@ const ButtonGroup_roundedClasses = {
|
|
|
32299
32641
|
full: 'first:rounded-l-full last:rounded-r-full'
|
|
32300
32642
|
}
|
|
32301
32643
|
};
|
|
32302
|
-
const
|
|
32644
|
+
const borderClasses = {
|
|
32303
32645
|
text: {
|
|
32304
32646
|
vertical: 'border-t-0 border-l-0 border-r-0 last:border-b-0',
|
|
32305
32647
|
horizontal: 'border-l-0 border-t-0 border-b-0 last:border-r-0'
|
|
@@ -32363,7 +32705,7 @@ const ButtonGroup = _ref => {
|
|
|
32363
32705
|
...other
|
|
32364
32706
|
} = _ref;
|
|
32365
32707
|
const ref = (0,react.useRef)(null);
|
|
32366
|
-
const buttonClasses = classnames_default()(baseButtonClass,
|
|
32708
|
+
const buttonClasses = classnames_default()(baseButtonClass, borderClasses[variant] && borderClasses[variant][orientation], variantClasses[variant] && variantClasses[variant][color], roundedClasses[orientation] && roundedClasses[orientation][rounded]);
|
|
32367
32709
|
return /*#__PURE__*/react.createElement("div", ButtonGroup_extends({
|
|
32368
32710
|
role: "group",
|
|
32369
32711
|
className: classnames_default()('group', className, orientationClasses[orientation], fullWidth ? fullWidthDisplayClass : baseDisplayClass),
|
|
@@ -32889,7 +33231,6 @@ const Footer = _ref => {
|
|
|
32889
33231
|
className: classnames_default()(flex, padding, className)
|
|
32890
33232
|
}, actions.map((action, index) => {
|
|
32891
33233
|
const isFirst = index === 0;
|
|
32892
|
-
const isPrimary = action.type === 'primary';
|
|
32893
33234
|
const onClickHandler = event => onSubmit({
|
|
32894
33235
|
action,
|
|
32895
33236
|
value,
|
|
@@ -32900,12 +33241,8 @@ const Footer = _ref => {
|
|
|
32900
33241
|
className: classnames_default()({
|
|
32901
33242
|
'ml-2': !isFirst
|
|
32902
33243
|
}, action.classes),
|
|
32903
|
-
|
|
32904
|
-
onClick: onClickHandler
|
|
32905
|
-
style: {
|
|
32906
|
-
transition: 'all .15s ease',
|
|
32907
|
-
height: 34
|
|
32908
|
-
}
|
|
33244
|
+
type: action.type,
|
|
33245
|
+
onClick: onClickHandler
|
|
32909
33246
|
}, action.text);
|
|
32910
33247
|
}));
|
|
32911
33248
|
};
|
|
@@ -32917,7 +33254,7 @@ Footer.propTypes = {
|
|
|
32917
33254
|
id: (prop_types_default()).string.isRequired,
|
|
32918
33255
|
text: (prop_types_default()).string.isRequired,
|
|
32919
33256
|
value: (prop_types_default()).any,
|
|
32920
|
-
type: prop_types_default().oneOf([
|
|
33257
|
+
type: prop_types_default().oneOf([type.primary, type.secondary]).isRequired,
|
|
32921
33258
|
classes: prop_types_default().arrayOf((prop_types_default()).string)
|
|
32922
33259
|
})).isRequired
|
|
32923
33260
|
};
|
|
@@ -33450,7 +33787,7 @@ Modal.propTypes = {
|
|
|
33450
33787
|
|
|
33451
33788
|
|
|
33452
33789
|
|
|
33453
|
-
const
|
|
33790
|
+
const baseClasses = 'text-center items-center justify-center transition duration-300 ease-in-out outline-none font-bold focus:outline-none';
|
|
33454
33791
|
const IconButton_roundedClasses = {
|
|
33455
33792
|
none: '',
|
|
33456
33793
|
small: 'rounded',
|
|
@@ -33458,7 +33795,7 @@ const IconButton_roundedClasses = {
|
|
|
33458
33795
|
large: 'rounded-lg',
|
|
33459
33796
|
full: 'rounded-full'
|
|
33460
33797
|
};
|
|
33461
|
-
const
|
|
33798
|
+
const IconButton_disabledClasses = {
|
|
33462
33799
|
true: 'cursor-not-allowed',
|
|
33463
33800
|
false: ''
|
|
33464
33801
|
};
|
|
@@ -33521,7 +33858,7 @@ const iconSizeClasses = {
|
|
|
33521
33858
|
large: 'w-6 h-6',
|
|
33522
33859
|
toolbar: 'w-5 h-5'
|
|
33523
33860
|
};
|
|
33524
|
-
const
|
|
33861
|
+
const fullWidthClasses = {
|
|
33525
33862
|
true: 'flex w-full',
|
|
33526
33863
|
false: 'inline-flex'
|
|
33527
33864
|
};
|
|
@@ -33549,7 +33886,7 @@ const IconButton = _ref => {
|
|
|
33549
33886
|
};
|
|
33550
33887
|
const bgColorToUse = bgColor ? bgColor : backgroundClasses[variant][color];
|
|
33551
33888
|
return /*#__PURE__*/react.createElement("button", {
|
|
33552
|
-
className: classnames_default()(
|
|
33889
|
+
className: classnames_default()(baseClasses, IconButton_variantClasses[variant][color], IconButton_roundedClasses[rounded], IconButton_sizeClasses[size], fullWidthClasses[fullWidth], IconButton_disabledClasses[disabled], bgColorToUse, className),
|
|
33553
33890
|
style: {
|
|
33554
33891
|
padding: size === 'toolbar' ? '10px' : null
|
|
33555
33892
|
},
|
|
@@ -40761,6 +41098,211 @@ LayoutSelector.propTypes = {
|
|
|
40761
41098
|
;// CONCATENATED MODULE: ../../ui/src/components/LayoutSelector/index.js
|
|
40762
41099
|
|
|
40763
41100
|
/* harmony default export */ const components_LayoutSelector = (LayoutSelector_LayoutSelector);
|
|
41101
|
+
;// CONCATENATED MODULE: ../../ui/src/components/LegacyButton/LegacyButton.tsx
|
|
41102
|
+
function LegacyButton_extends() { LegacyButton_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return LegacyButton_extends.apply(this, arguments); }
|
|
41103
|
+
|
|
41104
|
+
|
|
41105
|
+
|
|
41106
|
+
const LegacyButton_baseClasses = 'leading-none font-sans text-center justify-center items-center outline-none transition duration-300 ease-in-out focus:outline-none';
|
|
41107
|
+
const LegacyButton_defaults = {
|
|
41108
|
+
color: 'default',
|
|
41109
|
+
disabled: false,
|
|
41110
|
+
fullWidth: false,
|
|
41111
|
+
rounded: 'medium',
|
|
41112
|
+
border: 'none',
|
|
41113
|
+
size: 'medium',
|
|
41114
|
+
type: 'button',
|
|
41115
|
+
variant: 'contained'
|
|
41116
|
+
};
|
|
41117
|
+
const LegacyButton_roundedClasses = {
|
|
41118
|
+
none: '',
|
|
41119
|
+
small: 'rounded',
|
|
41120
|
+
medium: 'rounded-md',
|
|
41121
|
+
large: 'rounded-lg',
|
|
41122
|
+
full: 'rounded-full'
|
|
41123
|
+
};
|
|
41124
|
+
const variants = {
|
|
41125
|
+
text: {
|
|
41126
|
+
default: 'text-primary-light hover:bg-primary-light hover:text-white active:opacity-80 focus:bg-primary-light focus:text-white',
|
|
41127
|
+
primary: 'text-primary-main hover:bg-primary-main hover:text-white active:opacity-80 focus:bg-primary-main focus:text-white',
|
|
41128
|
+
secondary: 'text-secondary-light hover:bg-secondary-light hover:text-white active:opacity-80 focus:bg-secondary-light focus:text-white',
|
|
41129
|
+
white: 'text-white hover:bg-white hover:text-black active:opacity-80 focus:bg-white focus:text-black',
|
|
41130
|
+
black: 'text-black hover:bg-black hover:text-white focus:bg-black focus:text-white active:opacity-80'
|
|
41131
|
+
},
|
|
41132
|
+
outlined: {
|
|
41133
|
+
default: 'text-primary-light hover:bg-primary-light hover:text-black focus:text-black focus:bg-primary-light active:opacity-80',
|
|
41134
|
+
primary: 'text-primary-main hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41135
|
+
secondary: 'text-secondary-light hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41136
|
+
translucent: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41137
|
+
white: 'text-black hover:bg-primary-main focus:bg-primary-main hover:border-black focus:border-black',
|
|
41138
|
+
black: 'text-white hover:bg-primary-main focus:bg-primary-main hover:border-black focus:border-black',
|
|
41139
|
+
primaryActive: 'text-primary-active hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41140
|
+
primaryLight: 'border bg-transparent border-primary-main text-white hover:opacity-80 active:opacity-100 focus:opacity-80'
|
|
41141
|
+
},
|
|
41142
|
+
contained: {
|
|
41143
|
+
default: 'text-black hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41144
|
+
primary: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41145
|
+
primaryDark: 'text-primary-active hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41146
|
+
secondary: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41147
|
+
white: 'text-black hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41148
|
+
black: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41149
|
+
light: 'border text-black hover:opacity-80 active:opacity-100 focus:opacity-80'
|
|
41150
|
+
},
|
|
41151
|
+
disabled: {
|
|
41152
|
+
default: 'cursor-not-allowed opacity-50 text-black',
|
|
41153
|
+
primary: 'cursor-not-allowed opacity-50 text-white',
|
|
41154
|
+
secondary: 'cursor-not-allowed opacity-50 text-white',
|
|
41155
|
+
white: 'cursor-not-allowed opacity-50 text-black',
|
|
41156
|
+
black: 'cursor-not-allowed opacity-50 text-white',
|
|
41157
|
+
light: 'cursor-not-allowed opacity-50 border text-black'
|
|
41158
|
+
}
|
|
41159
|
+
};
|
|
41160
|
+
const defaultVariantBackGroundColor = {
|
|
41161
|
+
text: {
|
|
41162
|
+
default: '',
|
|
41163
|
+
primary: '',
|
|
41164
|
+
secondary: '',
|
|
41165
|
+
white: '',
|
|
41166
|
+
black: ''
|
|
41167
|
+
},
|
|
41168
|
+
outlined: {
|
|
41169
|
+
default: 'bg-transparent',
|
|
41170
|
+
primary: 'bg-transparent',
|
|
41171
|
+
secondary: 'bg-transparent',
|
|
41172
|
+
black: 'bg-black',
|
|
41173
|
+
white: ''
|
|
41174
|
+
},
|
|
41175
|
+
contained: {
|
|
41176
|
+
default: 'bg-primary-light',
|
|
41177
|
+
primary: 'bg-primary-main',
|
|
41178
|
+
primaryDark: 'bg-primary-dark',
|
|
41179
|
+
secondary: 'bg-secondary-light',
|
|
41180
|
+
white: 'bg-white',
|
|
41181
|
+
black: 'bg-black',
|
|
41182
|
+
light: 'bg-primary-light'
|
|
41183
|
+
},
|
|
41184
|
+
disabled: {
|
|
41185
|
+
default: 'bg-primary-light',
|
|
41186
|
+
primary: 'bg-primary-main',
|
|
41187
|
+
secondary: 'bg-secondary-light',
|
|
41188
|
+
white: 'bg-white',
|
|
41189
|
+
black: 'bg-black',
|
|
41190
|
+
light: 'bg-primary-light'
|
|
41191
|
+
}
|
|
41192
|
+
};
|
|
41193
|
+
const _getVariantClass = function (variant, color) {
|
|
41194
|
+
let bgColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
41195
|
+
const defaultBackgroundColor = defaultVariantBackGroundColor[variant][color];
|
|
41196
|
+
if (!bgColor) {
|
|
41197
|
+
bgColor = defaultBackgroundColor;
|
|
41198
|
+
}
|
|
41199
|
+
return `${variants[variant][color]} ${bgColor}`;
|
|
41200
|
+
};
|
|
41201
|
+
const LegacyButton_borderClasses = {
|
|
41202
|
+
none: '',
|
|
41203
|
+
light: 'border border-primary-light',
|
|
41204
|
+
primary: 'border border-primary-main',
|
|
41205
|
+
primaryActive: 'border border-primary-active',
|
|
41206
|
+
secondary: 'border border-secondary-light',
|
|
41207
|
+
white: 'border border-white',
|
|
41208
|
+
black: 'border border-black'
|
|
41209
|
+
};
|
|
41210
|
+
const LegacyButton_sizeClasses = {
|
|
41211
|
+
small: 'py-2 px-2 text-sm min-w-md',
|
|
41212
|
+
medium: 'py-2 px-2 text-lg min-w-md',
|
|
41213
|
+
large: 'py-2 px-6 text-xl min-w-md',
|
|
41214
|
+
initial: ''
|
|
41215
|
+
};
|
|
41216
|
+
const LegacyButton_fullWidthClasses = {
|
|
41217
|
+
true: 'flex w-full',
|
|
41218
|
+
false: 'inline-flex'
|
|
41219
|
+
};
|
|
41220
|
+
const LegacyButton = _ref => {
|
|
41221
|
+
let {
|
|
41222
|
+
children,
|
|
41223
|
+
variant = LegacyButton_defaults.variant,
|
|
41224
|
+
color = LegacyButton_defaults.color,
|
|
41225
|
+
border = LegacyButton_defaults.border,
|
|
41226
|
+
size = LegacyButton_defaults.size,
|
|
41227
|
+
rounded = LegacyButton_defaults.rounded,
|
|
41228
|
+
disabled = LegacyButton_defaults.disabled,
|
|
41229
|
+
type = LegacyButton_defaults.type,
|
|
41230
|
+
fullWidth = LegacyButton_defaults.fullWidth,
|
|
41231
|
+
bgColor = null,
|
|
41232
|
+
startIcon: startIconProp,
|
|
41233
|
+
endIcon: endIconProp,
|
|
41234
|
+
name,
|
|
41235
|
+
className,
|
|
41236
|
+
onClick,
|
|
41237
|
+
/** TODO: All possible props should be explicitly defined -- avoid spreading props */
|
|
41238
|
+
...rest
|
|
41239
|
+
} = _ref;
|
|
41240
|
+
const startIcon = startIconProp && /*#__PURE__*/react.createElement("div", {
|
|
41241
|
+
className: "mr-2"
|
|
41242
|
+
}, /*#__PURE__*/react.cloneElement(startIconProp, {
|
|
41243
|
+
className: classnames_default()('w-4 h-4 fill-current')
|
|
41244
|
+
}));
|
|
41245
|
+
const endIcon = endIconProp && /*#__PURE__*/react.createElement("div", {
|
|
41246
|
+
className: "ml-2"
|
|
41247
|
+
}, /*#__PURE__*/react.cloneElement(endIconProp, {
|
|
41248
|
+
className: classnames_default()('w-4 h-4 fill-current')
|
|
41249
|
+
}));
|
|
41250
|
+
const buttonElement = (0,react.useRef)(null);
|
|
41251
|
+
const handleOnClick = e => {
|
|
41252
|
+
buttonElement.current.blur();
|
|
41253
|
+
if (!disabled) {
|
|
41254
|
+
onClick(e);
|
|
41255
|
+
}
|
|
41256
|
+
};
|
|
41257
|
+
const finalClassName = classnames_default()(LegacyButton_baseClasses, _getVariantClass(variant, color, bgColor), LegacyButton_borderClasses[border], LegacyButton_roundedClasses[rounded], LegacyButton_sizeClasses[size], LegacyButton_fullWidthClasses[fullWidth], className);
|
|
41258
|
+
return /*#__PURE__*/react.createElement("button", LegacyButton_extends({
|
|
41259
|
+
className: finalClassName,
|
|
41260
|
+
disabled: disabled,
|
|
41261
|
+
ref: buttonElement,
|
|
41262
|
+
onClick: handleOnClick,
|
|
41263
|
+
type: type,
|
|
41264
|
+
"data-cy": `${name}-btn`
|
|
41265
|
+
}, rest), startIcon, children, endIcon);
|
|
41266
|
+
};
|
|
41267
|
+
LegacyButton.defaultProps = {
|
|
41268
|
+
color: LegacyButton_defaults.color,
|
|
41269
|
+
disabled: false,
|
|
41270
|
+
children: '',
|
|
41271
|
+
onClick: () => {}
|
|
41272
|
+
};
|
|
41273
|
+
LegacyButton.propTypes = {
|
|
41274
|
+
/** What is inside the button, can be text or react component */
|
|
41275
|
+
children: (prop_types_default()).node,
|
|
41276
|
+
/** Callback to be called when the button is clicked */
|
|
41277
|
+
onClick: (prop_types_default()).func.isRequired,
|
|
41278
|
+
/** Button size */
|
|
41279
|
+
size: prop_types_default().oneOf(['small', 'medium', 'large', 'initial', 'inherit']),
|
|
41280
|
+
/** Button corner roundness */
|
|
41281
|
+
rounded: prop_types_default().oneOf(['none', 'small', 'medium', 'large', 'full']),
|
|
41282
|
+
variant: prop_types_default().oneOf(['text', 'outlined', 'contained', 'disabled']),
|
|
41283
|
+
/* color prop must have all the possible keys of variants defined above */
|
|
41284
|
+
color: prop_types_default().oneOf(['default', 'primary', 'primaryDark', 'primaryActive', 'secondary', 'white', 'black', 'inherit', 'light', 'translucent']),
|
|
41285
|
+
border: prop_types_default().oneOf(['none', 'light', 'default', 'primary', 'primaryActive', 'secondary', 'white', 'black']),
|
|
41286
|
+
/** Whether the button should have full width */
|
|
41287
|
+
fullWidth: (prop_types_default()).bool,
|
|
41288
|
+
/** Whether the button should be disabled */
|
|
41289
|
+
disabled: (prop_types_default()).bool,
|
|
41290
|
+
/** Button type */
|
|
41291
|
+
type: (prop_types_default()).string,
|
|
41292
|
+
name: (prop_types_default()).string,
|
|
41293
|
+
/** Button start icon name - if any icon is specified */
|
|
41294
|
+
startIcon: (prop_types_default()).node,
|
|
41295
|
+
/** Button end icon name - if any icon is specified */
|
|
41296
|
+
endIcon: (prop_types_default()).node,
|
|
41297
|
+
/** Additional TailwindCSS classnames */
|
|
41298
|
+
className: (prop_types_default()).string,
|
|
41299
|
+
/** Background color for the button to override*/
|
|
41300
|
+
bgColor: (prop_types_default()).string
|
|
41301
|
+
};
|
|
41302
|
+
/* harmony default export */ const LegacyButton_LegacyButton = (LegacyButton);
|
|
41303
|
+
;// CONCATENATED MODULE: ../../ui/src/components/LegacyButton/index.js
|
|
41304
|
+
|
|
41305
|
+
/* harmony default export */ const components_LegacyButton = (LegacyButton_LegacyButton);
|
|
40764
41306
|
;// CONCATENATED MODULE: ../../ui/src/components/LegacyCinePlayer/LegacyCinePlayerCustomInputRange.css
|
|
40765
41307
|
// extracted by mini-css-extract-plugin
|
|
40766
41308
|
|
|
@@ -41103,7 +41645,7 @@ const LegacyViewportActionBar = _ref => {
|
|
|
41103
41645
|
style: {
|
|
41104
41646
|
pointerEvents: 'all'
|
|
41105
41647
|
}
|
|
41106
|
-
}, /*#__PURE__*/react.createElement(components_ButtonGroup, null, /*#__PURE__*/react.createElement(
|
|
41648
|
+
}, /*#__PURE__*/react.createElement(components_ButtonGroup, null, /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
41107
41649
|
size: "initial",
|
|
41108
41650
|
className: "px-2 py-1 bg-black",
|
|
41109
41651
|
border: "light",
|
|
@@ -41111,7 +41653,7 @@ const LegacyViewportActionBar = _ref => {
|
|
|
41111
41653
|
}, /*#__PURE__*/react.createElement(Icon/* default */.Z, {
|
|
41112
41654
|
name: "chevron-left",
|
|
41113
41655
|
className: "w-4 text-white"
|
|
41114
|
-
})), /*#__PURE__*/react.createElement(
|
|
41656
|
+
})), /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
41115
41657
|
size: "initial",
|
|
41116
41658
|
border: "light",
|
|
41117
41659
|
className: "px-2 py-1 bg-black",
|
|
@@ -41401,7 +41943,7 @@ const Notification = _ref => {
|
|
|
41401
41943
|
color: 'text-yellow-500'
|
|
41402
41944
|
},
|
|
41403
41945
|
info: {
|
|
41404
|
-
icon: 'info',
|
|
41946
|
+
icon: 'notifications-info',
|
|
41405
41947
|
color: 'text-primary-main'
|
|
41406
41948
|
},
|
|
41407
41949
|
success: {
|
|
@@ -41421,27 +41963,24 @@ const Notification = _ref => {
|
|
|
41421
41963
|
} = getIconData();
|
|
41422
41964
|
return /*#__PURE__*/react.createElement("div", {
|
|
41423
41965
|
ref: notificationRef,
|
|
41424
|
-
className: "flex flex-col p-2 mx-2 mt-2 rounded bg-
|
|
41966
|
+
className: "flex flex-col p-2 mx-2 mt-2 border-2 rounded-md border-customblue-10 bg-customblue-400",
|
|
41425
41967
|
"data-cy": id
|
|
41426
41968
|
}, /*#__PURE__*/react.createElement("div", {
|
|
41427
|
-
className: "flex grow"
|
|
41969
|
+
className: "flex items-center grow"
|
|
41428
41970
|
}, /*#__PURE__*/react.createElement(Icon/* default */.Z, {
|
|
41429
41971
|
name: icon,
|
|
41430
|
-
className: classnames_default()('w-
|
|
41972
|
+
className: classnames_default()('w-6 h-6', color)
|
|
41431
41973
|
}), /*#__PURE__*/react.createElement("span", {
|
|
41432
|
-
className: "ml-2 text-
|
|
41974
|
+
className: "ml-2 text-[13px] text-black"
|
|
41433
41975
|
}, message)), /*#__PURE__*/react.createElement("div", {
|
|
41434
|
-
className: "flex justify-end mt-2"
|
|
41976
|
+
className: "flex flex-wrap gap-2 justify-end mt-2"
|
|
41435
41977
|
}, actions.map((action, index) => {
|
|
41436
41978
|
const isFirst = index === 0;
|
|
41437
|
-
const isPrimary = action.type === 'primary';
|
|
41438
41979
|
return /*#__PURE__*/react.createElement(components_Button, {
|
|
41439
|
-
|
|
41980
|
+
name: action.id,
|
|
41440
41981
|
key: index,
|
|
41441
|
-
|
|
41442
|
-
|
|
41443
|
-
}),
|
|
41444
|
-
color: isPrimary ? 'primary' : undefined,
|
|
41982
|
+
type: action.type,
|
|
41983
|
+
size: action.size || size.small,
|
|
41445
41984
|
onClick: () => {
|
|
41446
41985
|
onSubmit(action.value);
|
|
41447
41986
|
}
|
|
@@ -41458,7 +41997,8 @@ Notification.propTypes = {
|
|
|
41458
41997
|
actions: prop_types_default().arrayOf(prop_types_default().shape({
|
|
41459
41998
|
text: (prop_types_default()).string.isRequired,
|
|
41460
41999
|
value: (prop_types_default()).any.isRequired,
|
|
41461
|
-
type: prop_types_default().oneOf([
|
|
42000
|
+
type: prop_types_default().oneOf([type.primary, type.secondary]).isRequired,
|
|
42001
|
+
size: prop_types_default().oneOf([size.small, size.medium])
|
|
41462
42002
|
})).isRequired,
|
|
41463
42003
|
onSubmit: (prop_types_default()).func.isRequired,
|
|
41464
42004
|
/** Can be used as a callback to dismiss the notification for clicks that occur outside of it */
|
|
@@ -54848,7 +55388,7 @@ const SidePanel = _ref => {
|
|
|
54848
55388
|
},
|
|
54849
55389
|
|
|
54850
55390
|
"data-cy": `side-panel-header-${side}`
|
|
54851
|
-
}, /*#__PURE__*/react.createElement(
|
|
55391
|
+
}, /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
54852
55392
|
variant: "text",
|
|
54853
55393
|
color: "inherit",
|
|
54854
55394
|
border: "none",
|
|
@@ -56006,7 +56546,7 @@ const StudyBrowser = _ref => {
|
|
|
56006
56546
|
false: 'default'
|
|
56007
56547
|
};
|
|
56008
56548
|
const color = classStudyBrowser[`${isActive}`];
|
|
56009
|
-
return /*#__PURE__*/react.createElement(
|
|
56549
|
+
return /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56010
56550
|
key: name,
|
|
56011
56551
|
className: 'text-white text-base p-2 min-w-18',
|
|
56012
56552
|
size: "initial",
|
|
@@ -56396,7 +56936,7 @@ const StudyListFilter = _ref => {
|
|
|
56396
56936
|
name: "icon-upload"
|
|
56397
56937
|
}), /*#__PURE__*/react.createElement("span", null, "Upload"))), /*#__PURE__*/react.createElement("div", {
|
|
56398
56938
|
className: "flex flex-row"
|
|
56399
|
-
}, isFiltering && /*#__PURE__*/react.createElement(
|
|
56939
|
+
}, isFiltering && /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56400
56940
|
rounded: "full",
|
|
56401
56941
|
variant: "outlined",
|
|
56402
56942
|
color: "primaryActive",
|
|
@@ -56523,21 +57063,21 @@ const StudyListPagination = _ref => {
|
|
|
56523
57063
|
className: "flex items-center"
|
|
56524
57064
|
}, /*#__PURE__*/react.createElement(Typography/* default */.Z, {
|
|
56525
57065
|
className: "opacity-60 mr-4 text-base"
|
|
56526
|
-
}, t('Page'), " ", currentPage), /*#__PURE__*/react.createElement(components_ButtonGroup, null, /*#__PURE__*/react.createElement(
|
|
57066
|
+
}, t('Page'), " ", currentPage), /*#__PURE__*/react.createElement(components_ButtonGroup, null, /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56527
57067
|
size: "initial",
|
|
56528
57068
|
className: "px-4 py-2 text-base",
|
|
56529
57069
|
color: "translucent",
|
|
56530
57070
|
border: "primary",
|
|
56531
57071
|
variant: "outlined",
|
|
56532
57072
|
onClick: () => navigateToPage(1)
|
|
56533
|
-
}, `<<`), /*#__PURE__*/react.createElement(
|
|
57073
|
+
}, `<<`), /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56534
57074
|
size: "initial",
|
|
56535
57075
|
className: "py-2 px-2 text-base",
|
|
56536
57076
|
color: "translucent",
|
|
56537
57077
|
border: "primary",
|
|
56538
57078
|
variant: "outlined",
|
|
56539
57079
|
onClick: () => navigateToPage(currentPage - 1)
|
|
56540
|
-
}, t('Previous')), /*#__PURE__*/react.createElement(
|
|
57080
|
+
}, t('Previous')), /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56541
57081
|
size: "initial",
|
|
56542
57082
|
className: "py-2 px-4 text-base",
|
|
56543
57083
|
color: "translucent",
|
|
@@ -57368,19 +57908,15 @@ const ViewportDownloadForm = _ref => {
|
|
|
57368
57908
|
}, t('Active viewport has no displayed image')))), /*#__PURE__*/react.createElement("div", {
|
|
57369
57909
|
className: "flex justify-end mt-4"
|
|
57370
57910
|
}, /*#__PURE__*/react.createElement(components_Button, {
|
|
57371
|
-
|
|
57372
|
-
|
|
57373
|
-
|
|
57374
|
-
color: "black",
|
|
57375
|
-
border: "secondary",
|
|
57376
|
-
onClick: onClose,
|
|
57377
|
-
className: "p-2"
|
|
57911
|
+
name: "cancel",
|
|
57912
|
+
type: type.secondary,
|
|
57913
|
+
onClick: onClose
|
|
57378
57914
|
}, t('Cancel')), /*#__PURE__*/react.createElement(components_Button, {
|
|
57379
57915
|
className: "ml-2",
|
|
57380
57916
|
disabled: hasError,
|
|
57381
57917
|
onClick: downloadImage,
|
|
57382
|
-
|
|
57383
|
-
|
|
57918
|
+
type: type.primary,
|
|
57919
|
+
name: 'download'
|
|
57384
57920
|
}, t('Download'))));
|
|
57385
57921
|
};
|
|
57386
57922
|
/* harmony default export */ const ViewportDownloadForm_ViewportDownloadForm = (ViewportDownloadForm);
|
|
@@ -57974,6 +58510,7 @@ HotkeysPreferences.defaultProps = {
|
|
|
57974
58510
|
|
|
57975
58511
|
|
|
57976
58512
|
|
|
58513
|
+
|
|
57977
58514
|
const UserPreferences = _ref => {
|
|
57978
58515
|
let {
|
|
57979
58516
|
availableLanguages,
|
|
@@ -58070,21 +58607,16 @@ const UserPreferences = _ref => {
|
|
|
58070
58607
|
})), /*#__PURE__*/react.createElement("div", {
|
|
58071
58608
|
className: "flex flex-row justify-between"
|
|
58072
58609
|
}, /*#__PURE__*/react.createElement(components_Button, {
|
|
58073
|
-
|
|
58074
|
-
border: "light",
|
|
58610
|
+
type: type.secondary,
|
|
58075
58611
|
onClick: onResetHandler,
|
|
58076
58612
|
disabled: disabled
|
|
58077
58613
|
}, t('Reset to Defaults')), /*#__PURE__*/react.createElement("div", {
|
|
58078
58614
|
className: "flex flex-row"
|
|
58079
58615
|
}, /*#__PURE__*/react.createElement(components_Button, {
|
|
58080
|
-
|
|
58081
|
-
border: "light",
|
|
58616
|
+
type: type.secondary,
|
|
58082
58617
|
onClick: onCancelHandler
|
|
58083
58618
|
}, t('Cancel')), /*#__PURE__*/react.createElement(components_Button, {
|
|
58084
|
-
variant: "contained",
|
|
58085
58619
|
disabled: state.isDisabled,
|
|
58086
|
-
color: "light",
|
|
58087
|
-
border: "light",
|
|
58088
58620
|
className: "ml-2",
|
|
58089
58621
|
onClick: onSubmitHandler
|
|
58090
58622
|
}, t('Save')))));
|
|
@@ -58807,6 +59339,8 @@ ViewportActionBar.propTypes = {
|
|
|
58807
59339
|
|
|
58808
59340
|
|
|
58809
59341
|
|
|
59342
|
+
|
|
59343
|
+
|
|
58810
59344
|
|
|
58811
59345
|
|
|
58812
59346
|
|
|
@@ -153878,7 +154412,7 @@ var selectOrdinal = function selectOrdinal() {
|
|
|
153878
154412
|
/******/ // This function allow to reference async chunks
|
|
153879
154413
|
/******/ __webpack_require__.u = (chunkId) => {
|
|
153880
154414
|
/******/ // return url for filenames based on template
|
|
153881
|
-
/******/ return "" + (chunkId === 18 ? "dicom-microscopy-viewer" : chunkId) + ".bundle." + {"18":"aa60bdf008c32c39cfd7","50":"
|
|
154415
|
+
/******/ return "" + (chunkId === 18 ? "dicom-microscopy-viewer" : chunkId) + ".bundle." + {"18":"aa60bdf008c32c39cfd7","50":"f3f85e8e2fb4532bb16b","55":"e9bf24eb17d84049c640","82":"dbd076c633a0568628be","151":"31ea35044218837bf73f","192":"c08c5ab814e2b37f7de8","199":"fff9b2c82296ac60e336","205":"b5a473c200dcf2bbcdb4","208":"44dbeaafde7c957eb5ec","270":"cddac4adcfdf8d1082a3","283":"e0463be176208a49ae07","295":"957b1159fec14b9199a1","331":"af86275686a78739ec4c","351":"bbd6e3b383ac731edc94","381":"0905e683605fcbc0895f","404":"6ab9072b6ca4fdc8e5ad","531":"2a82fb1d69e5b57cc72b","569":"f71780087b8c9a75d44e","581":"0b1b8273eb694c11366d","606":"5d876f5f3dd8287f0a28","616":"5b72d71408acf40a8372","642":"81fd0ee19e55de71af16","664":"09abae984223969d1bde","707":"112a221af4d036185312","728":"d13856835357400fef82","744":"480d918dc1d9eb8293da","780":"fd0f13dc92e9caa0581e","790":"981ed07d900d4a0a4b53","799":"6fbb7a97bccfb55dc79f","806":"2e7934d0833c4315c292","917":"3f61a417e9a607b190da","926":"dbc9d0e591cb9217fda2","935":"deeffff0e4f7b528e3c3","953":"bad442420f62f5ab0c4b","973":"b833bec4e621fe4283c4","976":"0ec9edf8d307c412df16","984":"1a1fe6f2b122b329a61d"}[chunkId] + ".js";
|
|
153882
154416
|
/******/ };
|
|
153883
154417
|
/******/ })();
|
|
153884
154418
|
/******/
|