This commit is contained in:
2025-02-26 14:49:25 +07:00
commit 1c1d9c4474
6403 changed files with 1953774 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
---
engines:
csslint:
enabled: true
duplication:
enabled: true
config:
languages:
- javascript
eslint:
enabled: true
fixme:
enabled: true
ratings:
paths:
- "**.css"
- "**.inc"
- "**.js"
exclude_paths:
- dist/
- ext/
- decoders/

2
nv/html/dwv/.csslintrc Normal file
View File

@@ -0,0 +1,2 @@
--exclude-exts=.min.css
--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes

View File

@@ -0,0 +1 @@
**/*{.,-}min.js

213
nv/html/dwv/.eslintrc Normal file
View File

@@ -0,0 +1,213 @@
ecmaFeatures:
modules: true
jsx: true
env:
amd: true
browser: true
es6: true
jquery: true
node: true
# http://eslint.org/docs/rules/
rules:
# Possible Errors
comma-dangle: [2, never]
no-cond-assign: 2
no-console: 0
no-constant-condition: 2
no-control-regex: 2
no-debugger: 2
no-dupe-args: 2
no-dupe-keys: 2
no-duplicate-case: 2
no-empty: 2
no-empty-character-class: 2
no-ex-assign: 2
no-extra-boolean-cast: 2
no-extra-parens: 0
no-extra-semi: 2
no-func-assign: 2
no-inner-declarations: [2, functions]
no-invalid-regexp: 2
no-irregular-whitespace: 2
no-negated-in-lhs: 2
no-obj-calls: 2
no-regex-spaces: 2
no-sparse-arrays: 2
no-unexpected-multiline: 2
no-unreachable: 2
use-isnan: 2
valid-jsdoc: 0
valid-typeof: 2
# Best Practices
accessor-pairs: 2
block-scoped-var: 0
complexity: [2, 6]
consistent-return: 0
curly: 0
default-case: 0
dot-location: 0
dot-notation: 0
eqeqeq: 2
guard-for-in: 2
no-alert: 2
no-caller: 2
no-case-declarations: 2
no-div-regex: 2
no-else-return: 0
no-empty-label: 2
no-empty-pattern: 2
no-eq-null: 2
no-eval: 2
no-extend-native: 2
no-extra-bind: 2
no-fallthrough: 2
no-floating-decimal: 0
no-implicit-coercion: 0
no-implied-eval: 2
no-invalid-this: 0
no-iterator: 2
no-labels: 0
no-lone-blocks: 2
no-loop-func: 2
no-magic-number: 0
no-multi-spaces: 0
no-multi-str: 0
no-native-reassign: 2
no-new-func: 2
no-new-wrappers: 2
no-new: 2
no-octal-escape: 2
no-octal: 2
no-proto: 2
no-redeclare: 2
no-return-assign: 2
no-script-url: 2
no-self-compare: 2
no-sequences: 0
no-throw-literal: 0
no-unused-expressions: 2
no-useless-call: 2
no-useless-concat: 2
no-void: 2
no-warning-comments: 0
no-with: 2
radix: 2
vars-on-top: 0
wrap-iife: 2
yoda: 0
# Strict
strict: 0
# Variables
init-declarations: 0
no-catch-shadow: 2
no-delete-var: 2
no-label-var: 2
no-shadow-restricted-names: 2
no-shadow: 0
no-undef-init: 2
no-undef: 0
no-undefined: 0
no-unused-vars: 0
no-use-before-define: 0
# Node.js and CommonJS
callback-return: 2
global-require: 2
handle-callback-err: 2
no-mixed-requires: 0
no-new-require: 0
no-path-concat: 2
no-process-exit: 2
no-restricted-modules: 0
no-sync: 0
# Stylistic Issues
array-bracket-spacing: 0
block-spacing: 0
brace-style: 0
camelcase: 0
comma-spacing: 0
comma-style: 0
computed-property-spacing: 0
consistent-this: 0
eol-last: 0
func-names: 0
func-style: 0
id-length: 0
id-match: 0
indent: 0
jsx-quotes: 0
key-spacing: 0
linebreak-style: 0
lines-around-comment: 0
max-depth: 0
max-len: 0
max-nested-callbacks: 0
max-params: 0
max-statements: [2, 30]
new-cap: 0
new-parens: 0
newline-after-var: 0
no-array-constructor: 0
no-bitwise: 0
no-continue: 0
no-inline-comments: 0
no-lonely-if: 0
no-mixed-spaces-and-tabs: 0
no-multiple-empty-lines: 0
no-negated-condition: 0
no-nested-ternary: 0
no-new-object: 0
no-plusplus: 0
no-restricted-syntax: 0
no-spaced-func: 0
no-ternary: 0
no-trailing-spaces: 0
no-underscore-dangle: 0
no-unneeded-ternary: 0
object-curly-spacing: 0
one-var: 0
operator-assignment: 0
operator-linebreak: 0
padded-blocks: 0
quote-props: 0
quotes: 0
require-jsdoc: 0
semi-spacing: 0
semi: 0
sort-vars: 0
space-after-keywords: 0
space-before-blocks: 0
space-before-function-paren: 0
space-before-keywords: 0
space-in-parens: 0
space-infix-ops: 0
space-return-throw-case: 0
space-unary-ops: 0
spaced-comment: 0
wrap-regex: 0
# ECMAScript 6
arrow-body-style: 0
arrow-parens: 0
arrow-spacing: 0
constructor-super: 0
generator-star-spacing: 0
no-arrow-condition: 0
no-class-assign: 0
no-const-assign: 0
no-dupe-class-members: 0
no-this-before-super: 0
no-var: 0
object-shorthand: 0
prefer-arrow-callback: 0
prefer-const: 0
prefer-reflect: 0
prefer-spread: 0
prefer-template: 0
require-yield: 0

33
nv/html/dwv/.gitattributes vendored Normal file
View File

@@ -0,0 +1,33 @@
# Auto detect text files and perform LF normalization
* text=auto
# source code
*.js text
*.json text
*.lua text
*.sh text
*.html text
*.css text
*.xml text
*.svg text
# git config
.gitattributes text
.gitignore text
# misc config
.jshintrc text
.project text
*.epf text
*.webapp text
*.yml text
*.map text
# documentation
*.md text
# binary (should be left untouched)
*.dcm binary
*.png binary
*.jpg binary
*.gif binary

38
nv/html/dwv/.github/contributing.md vendored Normal file
View File

@@ -0,0 +1,38 @@
Contributing to DWV
===================
First off, thanks for taking the time to contribute!
The following is a set of guidelines for contributing to DWV,
which is hosted at https://github.com/ivmartel/dwv on GitHub.
Steps
-----
If something is not right, the first step is to submit an issue with as much detail
about your problem and your configuration. This is to make sure this behaviour is not
intended (a 'feature').
The second step, for the braves, is to fork the repository and work on a fix. Don't hesitate
to ask for help, I am here for that! Once finished, you can propose a pull request. I will review
it, make comments and hopefully merge it.
License Terms
-------------
Code committed by you to this repository, whether written by you or a third party, must be
governed by the GNU General Public License version 3 ([GNU GPL v3](http://www.gnu.org/licenses/gpl-3.0.en.html)). By contributing Code,
you confirm that, to the best of your knowledge, the code does not violate the
rights of any person or entity.
You hereby grant me (Yves Martelli) and to recipients of software distributed by me
a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright
license to reproduce, prepare derivative works of, publicly display, publicly perform,
sublicense, relicense, and distribute Your Contributions and such derivative works. Except for this license
You reserve all right, title, and interest in and to Your Contributions.
_In plain English, I do this to simplify the licensing process and not have to ask every contributor
for his approval each time. Rest assured, the code and your contributions will always stay GPL._
Some references about Contributor License Agreement (CLA):
* This text was inspired from [The Apache Software Foundation Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt)
* [in-defense-of-contributor-license-agreements](https://julien.ponge.org/blog/in-defense-of-contributor-license-agreements/)
* [should-open-source-communities-avoid-contributor-agreements](http://www.computerworlduk.com/blogs/simon-says/should-open-source-communities-avoid-contributor-agreements-3569648/)

4
nv/html/dwv/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/.settings
build
node_modules
bower_components

13
nv/html/dwv/.jshintrc Normal file
View File

@@ -0,0 +1,13 @@
{
"browser": true,
"devel": true,
"jquery": true,
"unused": true,
"undef": true,
"globals": {
"dwv": true
},
"curly": true,
"newcap": true,
"indent": 4
}

16
nv/html/dwv/.travis.yml Normal file
View File

@@ -0,0 +1,16 @@
# not using sudo
sudo: false
language: node_js
node_js:
- '4'
# setup the travis token
env:
global:
- secure: jWTxnnLGmoM+j3148tIF2SJMEyub2j9kmR15vEKVeP6BbUvNgWH9jTSwf6Ddv3qjbAb3D8p9nhYBOZgRub1stwjWCH+DS17AoKFeRVj4Q8Sf0XBHGzJbn0FkstilVmGv3Zr/FVmDSEm1xSSHanWCUQX0uH9r/XB8z7khp4pLryo=
# update gh-pages if all good
after_success:
- chmod +x ./resources/scripts/update-gh-pages.sh
- ./resources/scripts/update-gh-pages.sh

72
nv/html/dwv/Gruntfile.js Normal file
View File

@@ -0,0 +1,72 @@
/* global module */
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['Gruntfile.js', 'src/**/*.js', 'viewers/**/*.js', 'tests/**/*.js'],
options: {
jshintrc: '.jshintrc'
}
},
qunit: {
all: ['tests/index.html'],
options: {
'--web-security': 'no',
coverage: {
disposeCollector: true,
src: [ "src/**/*.js" ],
instrumentedFiles: "/tmp/ivmartel/dwv",
htmlReport: "build/report/coverage",
lcovReport: "build/report/lcov",
linesThresholdPct: 0
}
}
},
coveralls: {
options: {
// don't fail if coveralls fails
force: true
},
main_target: {
src: "build/report/lcov/lcov.info"
}
},
concat: {
dist: {
src: ['resources/module/intro.js', 'src/**/*.js', 'resources/module/outro.js'],
dest: 'build/dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= pkg.version %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'build/dist/<%= pkg.name %>-<%= pkg.version %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
jsdoc: {
dist : {
src: ['src/**/*.js', 'tests/**/*.js', 'resources/doc/readme-doc.md'],
options: {
destination: 'build/doc',
template: 'node_modules/ink-docstrap/template',
configure: 'resources/doc/jsdoc.conf.json'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-qunit-istanbul');
grunt.loadNpmTasks('grunt-coveralls');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-jsdoc');
// Task to run tests
grunt.registerTask('publish', ['jshint', 'qunit', 'coveralls', 'concat', 'uglify', 'jsdoc']);
};

45
nv/html/dwv/bower.json Normal file
View File

@@ -0,0 +1,45 @@
{
"name": "dwv",
"description": "DICOM Web Viewer.",
"keywords": ["DICOM", "medical", "imaging"],
"license": "GPL-3.0",
"authors" : ["ivmartel <ivmartel@gmail.com>"],
"homepage": "https://ivmartel.github.io/dwv/",
"repository": {
"type": "git",
"url": "git://github.com/ivmartel/dwv.git"
},
"main": "dist/dwv.js",
"dependencies": {
"modernizr": "~3.5.0",
"i18next": "~10.0.7",
"i18next-xhr-backend": "~1.5.0",
"i18next-browser-languagedetector": "~2.1.0",
"jszip": "~3.1.3",
"konva": "~1.7.3"
},
"devDependencies": {
"qunit": "~2.4.0"
},
"moduleType": [
"amd",
"globals",
"node"
],
"ignore": [
"**/.*",
"css",
"ext",
"resources/conquest",
"resources/doc",
"resources/module",
"resources/scripts",
"src",
"tests",
"viewers",
"eclipse.epf",
"Gruntfile.js",
"manifest.json",
"package.json"
]
}

36
nv/html/dwv/css/style.css Normal file
View File

@@ -0,0 +1,36 @@
body { font-family: Arial, Helvetica, sans-serif; }
/* Layers */
.layerContainer { position: relative; padding: 0; }
.imageLayer { position: absolute; }
.drawDiv { position: absolute; pointer-events: none; }
.dropBox { border: 5px dashed #ccc; }
.dropBox.hover { border: 5px dashed #cc0; }
/* Info */
.info { color: #cde; text-shadow: 1px 1px #000; font-size: 80%; }
.infoc { color: #ff0; text-shadow: 1px 1px #000; font-size: 120%; }
.infotl { position: absolute; top: 0; left: 0; text-align: left; }
.infotc { position: absolute; top: 0; left: 50%; right: 50%; text-align: center; }
.infotr { position: absolute; top: 0; right: 0; text-align: right; }
.infocl { position: absolute; bottom: 50%; left: 0; text-align: left; }
.infocr { position: absolute; bottom: 50%; right: 2px; text-align: right; }
.infobl { position: absolute; bottom: 0; left: 0; text-align: left; }
.infobc { position: absolute; bottom: 0; left: 50%; right: 50%; text-align: center; }
.infobr { position: absolute; bottom: 0; right: 0; text-align: right; }
.plot { position: absolute; width: 100px; height: 50px; bottom: 15px; right: 0; }
.infoLayer ul { margin: 0; padding: 2px; list-style-type: none; }
.infoLayer li { margin-top: 0; }
.infoLayer canvas { margin: 0; padding: 2px; }
/* Tag list */
table.tagsTable { border-collapse: collapse; }
table.tagsTable thead th { text-transform: uppercase;
font-weight: bold; opacity: 0.5;}
table.drawsTable { border-collapse: collapse; }
table.drawsTable td { vertical-align: middle; }
table.drawsTable thead th { text-transform: uppercase;
font-weight: bold; opacity: 0.5;}
.highlighted { background: #f87217; }
.tags form { width: 50%; }

View File

@@ -0,0 +1,185 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/* This class implements the QM Coder decoding as defined in
* JPEG 2000 Part I Final Committee Draft Version 1.0
* Annex C.3 Arithmetic decoding procedure
* available at http://www.jpeg.org/public/fcd15444-1.pdf
*
* The arithmetic decoder is used in conjunction with context models to decode
* JPEG2000 and JBIG2 streams.
*/
var ArithmeticDecoder = (function ArithmeticDecoderClosure() {
// Table C-2
var QeTable = [
{qe: 0x5601, nmps: 1, nlps: 1, switchFlag: 1},
{qe: 0x3401, nmps: 2, nlps: 6, switchFlag: 0},
{qe: 0x1801, nmps: 3, nlps: 9, switchFlag: 0},
{qe: 0x0AC1, nmps: 4, nlps: 12, switchFlag: 0},
{qe: 0x0521, nmps: 5, nlps: 29, switchFlag: 0},
{qe: 0x0221, nmps: 38, nlps: 33, switchFlag: 0},
{qe: 0x5601, nmps: 7, nlps: 6, switchFlag: 1},
{qe: 0x5401, nmps: 8, nlps: 14, switchFlag: 0},
{qe: 0x4801, nmps: 9, nlps: 14, switchFlag: 0},
{qe: 0x3801, nmps: 10, nlps: 14, switchFlag: 0},
{qe: 0x3001, nmps: 11, nlps: 17, switchFlag: 0},
{qe: 0x2401, nmps: 12, nlps: 18, switchFlag: 0},
{qe: 0x1C01, nmps: 13, nlps: 20, switchFlag: 0},
{qe: 0x1601, nmps: 29, nlps: 21, switchFlag: 0},
{qe: 0x5601, nmps: 15, nlps: 14, switchFlag: 1},
{qe: 0x5401, nmps: 16, nlps: 14, switchFlag: 0},
{qe: 0x5101, nmps: 17, nlps: 15, switchFlag: 0},
{qe: 0x4801, nmps: 18, nlps: 16, switchFlag: 0},
{qe: 0x3801, nmps: 19, nlps: 17, switchFlag: 0},
{qe: 0x3401, nmps: 20, nlps: 18, switchFlag: 0},
{qe: 0x3001, nmps: 21, nlps: 19, switchFlag: 0},
{qe: 0x2801, nmps: 22, nlps: 19, switchFlag: 0},
{qe: 0x2401, nmps: 23, nlps: 20, switchFlag: 0},
{qe: 0x2201, nmps: 24, nlps: 21, switchFlag: 0},
{qe: 0x1C01, nmps: 25, nlps: 22, switchFlag: 0},
{qe: 0x1801, nmps: 26, nlps: 23, switchFlag: 0},
{qe: 0x1601, nmps: 27, nlps: 24, switchFlag: 0},
{qe: 0x1401, nmps: 28, nlps: 25, switchFlag: 0},
{qe: 0x1201, nmps: 29, nlps: 26, switchFlag: 0},
{qe: 0x1101, nmps: 30, nlps: 27, switchFlag: 0},
{qe: 0x0AC1, nmps: 31, nlps: 28, switchFlag: 0},
{qe: 0x09C1, nmps: 32, nlps: 29, switchFlag: 0},
{qe: 0x08A1, nmps: 33, nlps: 30, switchFlag: 0},
{qe: 0x0521, nmps: 34, nlps: 31, switchFlag: 0},
{qe: 0x0441, nmps: 35, nlps: 32, switchFlag: 0},
{qe: 0x02A1, nmps: 36, nlps: 33, switchFlag: 0},
{qe: 0x0221, nmps: 37, nlps: 34, switchFlag: 0},
{qe: 0x0141, nmps: 38, nlps: 35, switchFlag: 0},
{qe: 0x0111, nmps: 39, nlps: 36, switchFlag: 0},
{qe: 0x0085, nmps: 40, nlps: 37, switchFlag: 0},
{qe: 0x0049, nmps: 41, nlps: 38, switchFlag: 0},
{qe: 0x0025, nmps: 42, nlps: 39, switchFlag: 0},
{qe: 0x0015, nmps: 43, nlps: 40, switchFlag: 0},
{qe: 0x0009, nmps: 44, nlps: 41, switchFlag: 0},
{qe: 0x0005, nmps: 45, nlps: 42, switchFlag: 0},
{qe: 0x0001, nmps: 45, nlps: 43, switchFlag: 0},
{qe: 0x5601, nmps: 46, nlps: 46, switchFlag: 0}
];
// C.3.5 Initialisation of the decoder (INITDEC)
function ArithmeticDecoder(data, start, end) {
this.data = data;
this.bp = start;
this.dataEnd = end;
this.chigh = data[start];
this.clow = 0;
this.byteIn();
this.chigh = ((this.chigh << 7) & 0xFFFF) | ((this.clow >> 9) & 0x7F);
this.clow = (this.clow << 7) & 0xFFFF;
this.ct -= 7;
this.a = 0x8000;
}
ArithmeticDecoder.prototype = {
// C.3.4 Compressed data input (BYTEIN)
byteIn: function ArithmeticDecoder_byteIn() {
var data = this.data;
var bp = this.bp;
if (data[bp] === 0xFF) {
var b1 = data[bp + 1];
if (b1 > 0x8F) {
this.clow += 0xFF00;
this.ct = 8;
} else {
bp++;
this.clow += (data[bp] << 9);
this.ct = 7;
this.bp = bp;
}
} else {
bp++;
this.clow += bp < this.dataEnd ? (data[bp] << 8) : 0xFF00;
this.ct = 8;
this.bp = bp;
}
if (this.clow > 0xFFFF) {
this.chigh += (this.clow >> 16);
this.clow &= 0xFFFF;
}
},
// C.3.2 Decoding a decision (DECODE)
readBit: function ArithmeticDecoder_readBit(contexts, pos) {
// contexts are packed into 1 byte:
// highest 7 bits carry cx.index, lowest bit carries cx.mps
var cx_index = contexts[pos] >> 1, cx_mps = contexts[pos] & 1;
var qeTableIcx = QeTable[cx_index];
var qeIcx = qeTableIcx.qe;
var d;
var a = this.a - qeIcx;
if (this.chigh < qeIcx) {
// exchangeLps
if (a < qeIcx) {
a = qeIcx;
d = cx_mps;
cx_index = qeTableIcx.nmps;
} else {
a = qeIcx;
d = 1 ^ cx_mps;
if (qeTableIcx.switchFlag === 1) {
cx_mps = d;
}
cx_index = qeTableIcx.nlps;
}
} else {
this.chigh -= qeIcx;
if ((a & 0x8000) !== 0) {
this.a = a;
return cx_mps;
}
// exchangeMps
if (a < qeIcx) {
d = 1 ^ cx_mps;
if (qeTableIcx.switchFlag === 1) {
cx_mps = d;
}
cx_index = qeTableIcx.nlps;
} else {
d = cx_mps;
cx_index = qeTableIcx.nmps;
}
}
// C.3.3 renormD;
do {
if (this.ct === 0) {
this.byteIn();
}
a <<= 1;
this.chigh = ((this.chigh << 1) & 0xFFFF) | ((this.clow >> 15) & 1);
this.clow = (this.clow << 1) & 0xFFFF;
this.ct--;
} while ((a & 0x8000) === 0);
this.a = a;
contexts[pos] = cx_index << 1 | cx_mps;
return d;
}
};
return ArithmeticDecoder;
})();

View File

@@ -0,0 +1,18 @@
/**
* JPEG 2000 decoder worker.
*/
// Do not warn if these variables were not defined before.
/* global importScripts, self, JpxImage */
importScripts('jpx.js', 'util.js', 'arithmetic_decoder.js');
self.addEventListener('message', function (event) {
// decode DICOM buffer
var decoder = new JpxImage();
decoder.parse( event.data.buffer );
// post decoded data
var res = decoder.tiles[0].items;
self.postMessage([res]);
}, false);

View File

@@ -0,0 +1,18 @@
/**
* JPEG Baseline decoder worker.
*/
// Do not warn if these variables were not defined before.
/* global importScripts, self, JpegImage */
importScripts('jpg.js');
self.addEventListener('message', function (event) {
// decode DICOM buffer
var decoder = new JpegImage();
decoder.parse( event.data.buffer );
// post decoded data
var res = decoder.getData(decoder.width,decoder.height);
self.postMessage([res]);
}, false);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
Third Party: pdf.js
=====================
* Web: https://github.com/mozilla/pdf.js
* Version: v1.1.1 (pdf.js) and commit fcaf281 of jpambrun
* Date: copied on 05/05/2015
* Download:
* [jpg.js](https://github.com/mozilla/pdf.js/blob/master/src/core/jpg.js) modified as in
https://github.com/notmasteryet/jpgjs/pull/33
* [jpx.js](https://github.com/jpambrun/jpx-medical/blob/master/jpx.js)
* [arithmetic_decoder.js](https://github.com/mozilla/pdf.js/blob/v1.1.1/src/core/arithmetic_decoder.js)
* [util.js](https://github.com/mozilla/pdf.js/blob/v1.1.1/src/shared/util.js)
* License: Apache 2.0 (see [license.txt](https://github.com/mozilla/pdf.js/blob/master/LICENSE))
* Description: Mozilla's JPEG and JPEG2000 decoder from PDF.js with added support for 16 bit signed grayscale images.
* Purpose for dwv: read DICOM files containing JPEG or JPEG2000 data.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
/**
* JPEG Lossless decoder worker.
*/
// Do not warn if these variables were not defined before.
/* global importScripts, self, jpeg */
importScripts('lossless-min.js');
self.addEventListener('message', function (event) {
// bytes per element
var bpe = event.data.bitsAllocated / 8;
// decode DICOM buffer
var buf = new Uint8Array(event.data.buffer);
var decoder = new jpeg.lossless.Decoder();
var decoded = decoder.decode(buf.buffer, 0, buf.buffer.byteLength, bpe);
// post decoded data
var res = null;
if (event.data.bitsAllocated === 8) {
if (event.data.isSigned) {
res = new Int8Array(decoded.buffer);
}
else {
res = new Uint8Array(decoded.buffer);
}
}
else if (event.data.bitsAllocated === 16) {
if (event.data.isSigned) {
res = new Int16Array(decoded.buffer);
}
else {
res = new Uint16Array(decoded.buffer);
}
}
self.postMessage([res]);
}, false);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
Third Party: rii-mango
======================
JPEGLosslessDecoderJS
---------------------
* Web: https://github.com/rii-mango/JPEGLosslessDecoderJS
* Version: [2.0.2](https://github.com/rii-mango/JPEGLosslessDecoderJS/releases/tag/v2.0.2)
* Date: 19/03/2017
* Download: see release
* License: MIT (see https://github.com/rii-mango/JPEGLosslessDecoderJS/blob/v2.0.2/LICENSE)
* Description: JPEG Lossless decoder.
* Purpose for dwv: Decode JPEG embeded in DICOM.

25789
nv/html/dwv/dist/dwv.js vendored Normal file

File diff suppressed because it is too large Load Diff

3
nv/html/dwv/dist/dwv.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,22 @@
Copyright (c) 2007-2014 IOLA and Ole Laursen
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,13 @@
Third Party: flot
=================
* Web: http://www.flotcharts.org/
* Version: [0.8.3](http://www.flotcharts.org/blog/2014/04/21/flot-083-released/)
* Date: 21/04/2014
* Download: [flot-0.8.3.zip](http://www.flotcharts.org/downloads/flot-0.8.3.zip)
* License: [MIT](http://www.opensource.org/licenses/mit-license.php)
(see [license.txt](/ivmartel/dwv/blob/master/ext/flot/license.txt))
* Description: Flot is a pure Javascript plotting library for jQuery.
It produces graphical plots of arbitrary datasets on-the-fly
client-side.
* Purpose for dwv: Used for the plotting of the image data histogram.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,263 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.i18nextBrowserLanguageDetector = factory());
}(this, function () { 'use strict';
var arr = [];
var each = arr.forEach;
var slice = arr.slice;
function defaults(obj) {
each.call(slice.call(arguments, 1), function (source) {
if (source) {
for (var prop in source) {
if (obj[prop] === undefined) obj[prop] = source[prop];
}
}
});
return obj;
}
var cookie = {
create: function create(name, value, minutes, domain) {
var expires = void 0;
if (minutes) {
var date = new Date();
date.setTime(date.getTime() + minutes * 60 * 1000);
expires = '; expires=' + date.toGMTString();
} else expires = '';
domain = domain ? 'domain=' + domain + ';' : '';
document.cookie = name + '=' + value + expires + ';' + domain + 'path=/';
},
read: function read(name) {
var nameEQ = name + '=';
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) === ' ') {
c = c.substring(1, c.length);
}if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
}
return null;
},
remove: function remove(name) {
this.create(name, '', -1);
}
};
var cookie$1 = {
name: 'cookie',
lookup: function lookup(options) {
var found = void 0;
if (options.lookupCookie && typeof document !== 'undefined') {
var c = cookie.read(options.lookupCookie);
if (c) found = c;
}
return found;
},
cacheUserLanguage: function cacheUserLanguage(lng, options) {
if (options.lookupCookie && typeof document !== 'undefined') {
cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain);
}
}
};
var querystring = {
name: 'querystring',
lookup: function lookup(options) {
var found = void 0;
if (typeof window !== 'undefined') {
var query = window.location.search.substring(1);
var params = query.split('&');
for (var i = 0; i < params.length; i++) {
var pos = params[i].indexOf('=');
if (pos > 0) {
var key = params[i].substring(0, pos);
if (key === options.lookupQuerystring) {
found = params[i].substring(pos + 1);
}
}
}
}
return found;
}
};
var hasLocalStorageSupport = void 0;
try {
hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;
var testKey = 'i18next.translate.boo';
window.localStorage.setItem(testKey, 'foo');
window.localStorage.removeItem(testKey);
} catch (e) {
hasLocalStorageSupport = false;
}
var localStorage = {
name: 'localStorage',
lookup: function lookup(options) {
var found = void 0;
if (options.lookupLocalStorage && hasLocalStorageSupport) {
var lng = window.localStorage.getItem(options.lookupLocalStorage);
if (lng) found = lng;
}
return found;
},
cacheUserLanguage: function cacheUserLanguage(lng, options) {
if (options.lookupLocalStorage && hasLocalStorageSupport) {
window.localStorage.setItem(options.lookupLocalStorage, lng);
}
}
};
var navigator$1 = {
name: 'navigator',
lookup: function lookup(options) {
var found = [];
if (typeof navigator !== 'undefined') {
if (navigator.languages) {
// chrome only; not an array, so can't use .push.apply instead of iterating
for (var i = 0; i < navigator.languages.length; i++) {
found.push(navigator.languages[i]);
}
}
if (navigator.userLanguage) {
found.push(navigator.userLanguage);
}
if (navigator.language) {
found.push(navigator.language);
}
}
return found.length > 0 ? found : undefined;
}
};
var htmlTag = {
name: 'htmlTag',
lookup: function lookup(options) {
var found = void 0;
var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);
if (htmlTag && typeof htmlTag.getAttribute === 'function') {
found = htmlTag.getAttribute('lang');
}
return found;
}
};
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function getDefaults() {
return {
order: ['querystring', 'cookie', 'localStorage', 'navigator', 'htmlTag'],
lookupQuerystring: 'lng',
lookupCookie: 'i18next',
lookupLocalStorage: 'i18nextLng',
// cache user language
caches: ['localStorage'],
excludeCacheFor: ['cimode']
//cookieMinutes: 10,
//cookieDomain: 'myDomain'
};
}
var Browser = function () {
function Browser(services) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Browser);
this.type = 'languageDetector';
this.detectors = {};
this.init(services, options);
}
_createClass(Browser, [{
key: 'init',
value: function init(services) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
this.services = services;
this.options = defaults(options, this.options || {}, getDefaults());
this.i18nOptions = i18nOptions;
this.addDetector(cookie$1);
this.addDetector(querystring);
this.addDetector(localStorage);
this.addDetector(navigator$1);
this.addDetector(htmlTag);
}
}, {
key: 'addDetector',
value: function addDetector(detector) {
this.detectors[detector.name] = detector;
}
}, {
key: 'detect',
value: function detect(detectionOrder) {
var _this = this;
if (!detectionOrder) detectionOrder = this.options.order;
var detected = [];
detectionOrder.forEach(function (detectorName) {
if (_this.detectors[detectorName]) {
var lookup = _this.detectors[detectorName].lookup(_this.options);
if (lookup && typeof lookup === 'string') lookup = [lookup];
if (lookup) detected = detected.concat(lookup);
}
});
var found = void 0;
detected.forEach(function (lng) {
if (found) return;
var cleanedLng = _this.services.languageUtils.formatLanguageCode(lng);
if (_this.services.languageUtils.isWhitelisted(cleanedLng)) found = cleanedLng;
});
return found || this.i18nOptions.fallbackLng[0];
}
}, {
key: 'cacheUserLanguage',
value: function cacheUserLanguage(lng, caches) {
var _this2 = this;
if (!caches) caches = this.options.caches;
if (!caches) return;
if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
caches.forEach(function (cacheName) {
if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);
});
}
}]);
return Browser;
}();
Browser.type = 'languageDetector';
return Browser;
}));

View File

@@ -0,0 +1 @@
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):e.i18nextBrowserLanguageDetector=o()}(this,function(){"use strict";function e(e){return i.call(a.call(arguments,1),function(o){if(o)for(var t in o)void 0===e[t]&&(e[t]=o[t])}),e}function o(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function t(){return{order:["querystring","cookie","localStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var n=[],i=n.forEach,a=n.slice,r={create:function(e,o,t,n){var i=void 0;if(t){var a=new Date;a.setTime(a.getTime()+60*t*1e3),i="; expires="+a.toGMTString()}else i="";n=n?"domain="+n+";":"",document.cookie=e+"="+o+i+";"+n+"path=/"},read:function(e){for(var o=e+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var i=t[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(o))return i.substring(o.length,i.length)}return null},remove:function(e){this.create(e,"",-1)}},u={name:"cookie",lookup:function(e){var o=void 0;if(e.lookupCookie&&"undefined"!=typeof document){var t=r.read(e.lookupCookie);t&&(o=t)}return o},cacheUserLanguage:function(e,o){o.lookupCookie&&"undefined"!=typeof document&&r.create(o.lookupCookie,e,o.cookieMinutes,o.cookieDomain)}},c={name:"querystring",lookup:function(e){var o=void 0;if("undefined"!=typeof window)for(var t=window.location.search.substring(1),n=t.split("&"),i=0;i<n.length;i++){var a=n[i].indexOf("=");if(a>0){var r=n[i].substring(0,a);r===e.lookupQuerystring&&(o=n[i].substring(a+1))}}return o}},l=void 0;try{l="undefined"!==window&&null!==window.localStorage;var s="i18next.translate.boo";window.localStorage.setItem(s,"foo"),window.localStorage.removeItem(s)}catch(g){l=!1}var f={name:"localStorage",lookup:function(e){var o=void 0;if(e.lookupLocalStorage&&l){var t=window.localStorage.getItem(e.lookupLocalStorage);t&&(o=t)}return o},cacheUserLanguage:function(e,o){o.lookupLocalStorage&&l&&window.localStorage.setItem(o.lookupLocalStorage,e)}},d={name:"navigator",lookup:function(e){var o=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var t=0;t<navigator.languages.length;t++)o.push(navigator.languages[t]);navigator.userLanguage&&o.push(navigator.userLanguage),navigator.language&&o.push(navigator.language)}return o.length>0?o:void 0}},v={name:"htmlTag",lookup:function(e){var o=void 0,t=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return t&&"function"==typeof t.getAttribute&&(o=t.getAttribute("lang")),o}},h=function(){function e(e,o){for(var t=0;t<o.length;t++){var n=o[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(o,t,n){return t&&e(o.prototype,t),n&&e(o,n),o}}(),p=function(){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n),this.type="languageDetector",this.detectors={},this.init(e,t)}return h(n,[{key:"init",value:function(o){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=o,this.options=e(n,this.options||{},t()),this.i18nOptions=i,this.addDetector(u),this.addDetector(c),this.addDetector(f),this.addDetector(d),this.addDetector(v)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var o=this;e||(e=this.options.order);var t=[];e.forEach(function(e){if(o.detectors[e]){var n=o.detectors[e].lookup(o.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}});var n=void 0;return t.forEach(function(e){if(!n){var t=o.services.languageUtils.formatLanguageCode(e);o.services.languageUtils.isWhitelisted(t)&&(n=t)}}),n||this.i18nOptions.fallbackLng[0]}},{key:"cacheUserLanguage",value:function(e,o){var t=this;o||(o=this.options.caches),o&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||o.forEach(function(o){t.detectors[o]&&t.detectors[o].cacheUserLanguage(e,t.options)}))}}]),n}();return p.type="languageDetector",p});

View File

@@ -0,0 +1,198 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.i18nextXHRBackend = factory());
}(this, (function () { 'use strict';
var arr = [];
var each = arr.forEach;
var slice = arr.slice;
function defaults(obj) {
each.call(slice.call(arguments, 1), function (source) {
if (source) {
for (var prop in source) {
if (obj[prop] === undefined) obj[prop] = source[prop];
}
}
});
return obj;
}
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
function addQueryString(url, params) {
if (params && (typeof params === 'undefined' ? 'undefined' : _typeof(params)) === 'object') {
var queryString = '',
e = encodeURIComponent;
// Must encode data
for (var paramName in params) {
queryString += '&' + e(paramName) + '=' + e(params[paramName]);
}
if (!queryString) {
return url;
}
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
}
return url;
}
// https://gist.github.com/Xeoncross/7663273
function ajax(url, options, callback, data, cache) {
if (data && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
if (!cache) {
data['_t'] = new Date();
}
// URL encoded form data must be in querystring format
data = addQueryString('', data).slice(1);
}
if (options.queryStringParams) {
url = addQueryString(url, options.queryStringParams);
}
try {
var x;
if (XMLHttpRequest) {
x = new XMLHttpRequest();
} else {
x = new ActiveXObject('MSXML2.XMLHTTP.3.0');
}
x.open(data ? 'POST' : 'GET', url, 1);
if (!options.crossDomain) {
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
}
x.withCredentials = !!options.withCredentials;
if (data) {
x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
}
if (x.overrideMimeType) {
x.overrideMimeType("application/json");
}
var h = options.customHeaders;
if (h) {
for (var i in h) {
x.setRequestHeader(i, h[i]);
}
}
x.onreadystatechange = function () {
x.readyState > 3 && callback && callback(x.responseText, x);
};
x.send(data);
} catch (e) {
console && console.log(e);
}
}
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function getDefaults() {
return {
loadPath: '/locales/{{lng}}/{{ns}}.json',
addPath: 'locales/add/{{lng}}/{{ns}}',
allowMultiLoading: false,
parse: JSON.parse,
crossDomain: false,
ajax: ajax
};
}
var Backend = function () {
function Backend(services) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Backend);
this.init(services, options);
this.type = 'backend';
}
_createClass(Backend, [{
key: 'init',
value: function init(services) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
this.services = services;
this.options = defaults(options, this.options || {}, getDefaults());
}
}, {
key: 'readMulti',
value: function readMulti(languages, namespaces, callback) {
var loadPath = this.options.loadPath;
if (typeof this.options.loadPath === 'function') {
loadPath = this.options.loadPath(languages, namespaces);
}
var url = this.services.interpolator.interpolate(loadPath, { lng: languages.join('+'), ns: namespaces.join('+') });
this.loadUrl(url, callback);
}
}, {
key: 'read',
value: function read(language, namespace, callback) {
var loadPath = this.options.loadPath;
if (typeof this.options.loadPath === 'function') {
loadPath = this.options.loadPath([language], [namespace]);
}
var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });
this.loadUrl(url, callback);
}
}, {
key: 'loadUrl',
value: function loadUrl(url, callback) {
var _this = this;
this.options.ajax(url, this.options, function (data, xhr) {
if (xhr.status >= 500 && xhr.status < 600) return callback('failed loading ' + url, true /* retry */);
if (xhr.status >= 400 && xhr.status < 500) return callback('failed loading ' + url, false /* no retry */);
var ret = void 0,
err = void 0;
try {
ret = _this.options.parse(data, url);
} catch (e) {
err = 'failed parsing ' + url + ' to json';
}
if (err) return callback(err, false);
callback(null, ret);
});
}
}, {
key: 'create',
value: function create(languages, namespace, key, fallbackValue) {
var _this2 = this;
if (typeof languages === 'string') languages = [languages];
var payload = {};
payload[key] = fallbackValue || '';
languages.forEach(function (lng) {
var url = _this2.services.interpolator.interpolate(_this2.options.addPath, { lng: lng, ns: namespace });
_this2.options.ajax(url, _this2.options, function (data, xhr) {
//const statusCode = xhr.status.toString();
// TODO: if statusCode === 4xx do log
}, payload);
});
}
}]);
return Backend;
}();
Backend.type = 'backend';
return Backend;
})));

View File

@@ -0,0 +1 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.i18nextXHRBackend=e()}(this,function(){"use strict";function t(t){return r.call(s.call(arguments,1),function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])}),t}function e(t,e){if(e&&"object"===(void 0===e?"undefined":l(e))){var n="",o=encodeURIComponent;for(var i in e)n+="&"+o(i)+"="+o(e[i]);if(!n)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+n.slice(1)}return t}function n(t,n,o,i,a){i&&"object"===(void 0===i?"undefined":l(i))&&(a||(i._t=new Date),i=e("",i).slice(1)),n.queryStringParams&&(t=e(t,n.queryStringParams));try{var r;r=XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP.3.0"),r.open(i?"POST":"GET",t,1),n.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!n.withCredentials,i&&r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var s=n.customHeaders;if(s)for(var u in s)r.setRequestHeader(u,s[u]);r.onreadystatechange=function(){r.readyState>3&&o&&o(r.responseText,r)},r.send(i)}catch(t){console&&console.log(t)}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:JSON.parse,crossDomain:!1,ajax:n}}var a=[],r=a.forEach,s=a.slice,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n),this.type="backend"}return u(e,[{key:"init",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=e,this.options=t(n,this.options||{},i())}},{key:"readMulti",value:function(t,e,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(t,e));var i=this.services.interpolator.interpolate(o,{lng:t.join("+"),ns:e.join("+")});this.loadUrl(i,n)}},{key:"read",value:function(t,e,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath([t],[e]));var i=this.services.interpolator.interpolate(o,{lng:t,ns:e});this.loadUrl(i,n)}},{key:"loadUrl",value:function(t,e){var n=this;this.options.ajax(t,this.options,function(o,i){if(i.status>=500&&i.status<600)return e("failed loading "+t,!0);if(i.status>=400&&i.status<500)return e("failed loading "+t,!1);var a=void 0,r=void 0;try{a=n.options.parse(o,t)}catch(e){r="failed parsing "+t+" to json"}if(r)return e(r,!1);e(null,a)})}},{key:"create",value:function(t,e,n,o){var i=this;"string"==typeof t&&(t=[t]);var a={};a[n]=o||"",t.forEach(function(t){var n=i.services.interpolator.interpolate(i.options.addPath,{lng:t,ns:e});i.options.ajax(n,i.options,function(t,e){},a)})}}]),e}();return c.type="backend",c});

View File

@@ -0,0 +1,30 @@
Third Party: i18next
====================
* Web: http://i18next.com/
* Version: [10.0.7](https://github.com/i18next/i18next/releases/tag/v10.0.7)
* Date: 31/10/2017
* Download: https://github.com/i18next/i18next/blob/v10.0.7/i18next.min.js
* License: MIT (see https://github.com/i18next/i18next/blob/v10.0.7/LICENSE)
* Description: internationalization framework.
* Purpose for dwv: internationalization of GUI and messages.
i18next-xhr-backend
-------------------
* Web: https://github.com/i18next/i18next-xhr-backend
* Version: [1.5.0](https://github.com/i18next/i18next-xhr-backend/releases/tag/v1.5.0)
* Date: 06/11/2017
* Download: https://github.com/i18next/i18next-xhr-backend/blob/v1.5.0/i18nextXHRBackend.min.js
* License: MIT (see https://github.com/i18next/i18next-xhr-backend/blob/v1.5.0/LICENSE)
* Description: backend layer for i18next using browsers xhr.
* Purpose for dwv: load translation files.
i18next-browser-languageDetector
--------------------------------
* Web: https://github.com/i18next/i18next-browser-languageDetector
* Version: [2.1.0](https://github.com/i18next/i18next-browser-languageDetector/releases/tag/v2.1.0)
* Date: 06/11/2017
* Download: https://github.com/i18next/i18next-browser-languageDetector/blob/v2.1.0/i18nextBrowserLanguageDetector.min.js
* License: MIT (see https://github.com/i18next/i18next-browser-languageDetector/blob/v2.1.0/LICENSE)
* Description: language detector used in browser environment for i18next
* Purpose for dwv: detect user language.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Some files were not shown because too many files have changed in this diff Show More