[Pkg-javascript-commits] [rainloop] 09/38: Change target distribution from UNRELEASED to unstable. Added lintian overrides for remaining bundled libraries from upstream.

Daniel Ring techwolf-guest at moszumanska.debian.org
Fri Dec 15 06:03:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

techwolf-guest pushed a commit to branch master
in repository rainloop.

commit 860134d3c8e2d15148dd7670f8f35fd5e915c370
Author: Techwolf <dring at g33kworld.net>
Date:   Sat May 6 18:37:47 2017 -0700

    Change target distribution from UNRELEASED to unstable.
    Added lintian overrides for remaining bundled libraries from upstream.
---
 debian/changelog                     |   2 +-
 debian/missing-sources/crossroads.js | 395 +++++++++++++++++++++++++++++++
 debian/missing-sources/hasher.js     | 407 ++++++++++++++++++++++++++++++++
 debian/missing-sources/signals.js    | 445 +++++++++++++++++++++++++++++++++++
 debian/source/lintian-overrides      |  12 +-
 5 files changed, 1259 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index da1a9d1..eb703df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-rainloop (1.11.0.205-1) UNRELEASED; urgency=low
+rainloop (1.11.0.205-1) unstable; urgency=low
 
   * Initial release (Closes: #861581)
 
diff --git a/debian/missing-sources/crossroads.js b/debian/missing-sources/crossroads.js
new file mode 100644
index 0000000..08e1169
--- /dev/null
+++ b/debian/missing-sources/crossroads.js
@@ -0,0 +1,395 @@
+/** @license
+ * Crossroads.js <http://millermedeiros.github.com/crossroads.js>
+ * Released under the MIT license
+ * Author: Miller Medeiros
+ * Version: 0.7.1 - Build: 93 (2012/02/02 09:29 AM)
+ */
+
+(function (define) {
+define(['signals'], function (signals) {
+
+    var crossroads,
+        patternLexer,
+        UNDEF;
+
+    // Helpers -----------
+    //====================
+
+    function arrayIndexOf(arr, val) {
+        if (arr.indexOf) {
+            return arr.indexOf(val);
+        } else {
+            //Array.indexOf doesn't work on IE 6-7
+            var n = arr.length;
+            while (n--) {
+                if (arr[n] === val) {
+                    return n;
+                }
+            }
+            return -1;
+        }
+    }
+
+    function isKind(val, kind) {
+        return '[object '+ kind +']' === Object.prototype.toString.call(val);
+    }
+
+    function isRegExp(val) {
+        return isKind(val, 'RegExp');
+    }
+
+    function isArray(val) {
+        return isKind(val, 'Array');
+    }
+
+    function isFunction(val) {
+        return isKind(val, 'Function');
+    }
+
+    //borrowed from AMD-utils
+    function typecastValue(val) {
+        var r;
+        if (val === null || val === 'null') {
+            r = null;
+        } else if (val === 'true') {
+            r = true;
+        } else if (val === 'false') {
+            r = false;
+        } else if (val === UNDEF || val === 'undefined') {
+            r = UNDEF;
+        } else if (val === '' || isNaN(val)) {
+            //isNaN('') returns false
+            r = val;
+        } else {
+            //parseFloat(null || '') returns NaN
+            r = parseFloat(val);
+        }
+        return r;
+    }
+
+    function typecastArrayValues(values) {
+        var n = values.length,
+            result = [];
+        while (n--) {
+            result[n] = typecastValue(values[n]);
+        }
+        return result;
+    }
+
+
+    // Crossroads --------
+    //====================
+
+    /**
+     * @constructor
+     */
+    function Crossroads() {
+        this._routes = [];
+        this.bypassed = new signals.Signal();
+        this.routed = new signals.Signal();
+    }
+
+    Crossroads.prototype = {
+
+        normalizeFn : null,
+
+        create : function () {
+            return new Crossroads();
+        },
+
+        shouldTypecast : false,
+
+        addRoute : function (pattern, callback, priority) {
+            var route = new Route(pattern, callback, priority, this);
+            this._sortedInsert(route);
+            return route;
+        },
+
+        removeRoute : function (route) {
+            var i = arrayIndexOf(this._routes, route);
+            if (i !== -1) {
+                this._routes.splice(i, 1);
+            }
+            route._destroy();
+        },
+
+        removeAllRoutes : function () {
+            var n = this.getNumRoutes();
+            while (n--) {
+                this._routes[n]._destroy();
+            }
+            this._routes.length = 0;
+        },
+
+        parse : function (request) {
+            request = request || '';
+
+            var routes = this._getMatchedRoutes(request),
+                i = 0,
+                n = routes.length,
+                cur;
+
+            if (n) {
+                //shold be incremental loop, execute routes in order
+                while (i < n) {
+                    cur = routes[i];
+                    cur.route.matched.dispatch.apply(cur.route.matched, cur.params);
+                    cur.isFirst = !i;
+                    this.routed.dispatch(request, cur);
+                    i += 1;
+                }
+            } else {
+                this.bypassed.dispatch(request);
+            }
+        },
+
+        getNumRoutes : function () {
+            return this._routes.length;
+        },
+
+        _sortedInsert : function (route) {
+            //simplified insertion sort
+            var routes = this._routes,
+                n = routes.length;
+            do { --n; } while (routes[n] && route._priority <= routes[n]._priority);
+            routes.splice(n+1, 0, route);
+        },
+
+        _getMatchedRoutes : function (request) {
+            var res = [],
+                routes = this._routes,
+                n = routes.length,
+                route;
+            //should be decrement loop since higher priorities are added at the end of array
+            while (route = routes[--n]) {
+                if ((!res.length || route.greedy) && route.match(request)) {
+                    res.push({
+                        route : route,
+                        params : route._getParamsArray(request)
+                    });
+                }
+            }
+            return res;
+        },
+
+        toString : function () {
+            return '[crossroads numRoutes:'+ this.getNumRoutes() +']';
+        }
+    };
+
+    //"static" instance
+    crossroads = new Crossroads();
+    crossroads.VERSION = '0.7.1';
+
+
+
+    // Route --------------
+    //=====================
+
+    /**
+     * @constructor
+     */
+    function Route(pattern, callback, priority, router) {
+        var isRegexPattern = isRegExp(pattern);
+        this._router = router;
+        this._pattern = pattern;
+        this._paramsIds = isRegexPattern? null : patternLexer.getParamIds(this._pattern);
+        this._optionalParamsIds = isRegexPattern? null : patternLexer.getOptionalParamsIds(this._pattern);
+        this._matchRegexp = isRegexPattern? pattern : patternLexer.compilePattern(pattern);
+        this.matched = new signals.Signal();
+        if (callback) {
+            this.matched.add(callback);
+        }
+        this._priority = priority || 0;
+    }
+
+    Route.prototype = {
+
+        greedy : false,
+
+        rules : void(0),
+
+        match : function (request) {
+            return this._matchRegexp.test(request) && this._validateParams(request); //validate params even if regexp because of `request_` rule.
+        },
+
+        _validateParams : function (request) {
+            var rules = this.rules,
+                values = this._getParamsObject(request),
+                key;
+            for (key in rules) {
+                // normalize_ isn't a validation rule... (#39)
+                if(key !== 'normalize_' && rules.hasOwnProperty(key) && ! this._isValidParam(request, key, values)){
+                    return false;
+                }
+            }
+            return true;
+        },
+
+        _isValidParam : function (request, prop, values) {
+            var validationRule = this.rules[prop],
+                val = values[prop],
+                isValid = false;
+
+            if (val == null && this._optionalParamsIds && arrayIndexOf(this._optionalParamsIds, prop) !== -1) {
+                isValid = true;
+            }
+            else if (isRegExp(validationRule)) {
+                isValid = validationRule.test(val);
+            }
+            else if (isArray(validationRule)) {
+                isValid = arrayIndexOf(validationRule, val) !== -1;
+            }
+            else if (isFunction(validationRule)) {
+                isValid = validationRule(val, request, values);
+            }
+
+            return isValid; //fail silently if validationRule is from an unsupported type
+        },
+
+        _getParamsObject : function (request) {
+            var shouldTypecast = this._router.shouldTypecast,
+                values = patternLexer.getParamValues(request, this._matchRegexp, shouldTypecast),
+                o = {},
+                n = values.length;
+            while (n--) {
+                o[n] = values[n]; //for RegExp pattern and also alias to normal paths
+                if (this._paramsIds) {
+                    o[this._paramsIds[n]] = values[n];
+                }
+            }
+            o.request_ = shouldTypecast? typecastValue(request) : request;
+            o.vals_ = values;
+            return o;
+        },
+
+        _getParamsArray : function (request) {
+            var norm = this.rules? this.rules.normalize_ : null,
+                params;
+            norm = norm || this._router.normalizeFn; // default normalize
+            if (norm && isFunction(norm)) {
+                params = norm(request, this._getParamsObject(request));
+            } else {
+                params = patternLexer.getParamValues(request, this._matchRegexp, this._router.shouldTypecast);
+            }
+            return params;
+        },
+
+        dispose : function () {
+            this._router.removeRoute(this);
+        },
+
+        _destroy : function () {
+            this.matched.dispose();
+            this.matched = this._pattern = this._matchRegexp = null;
+        },
+
+        toString : function () {
+            return '[Route pattern:"'+ this._pattern +'", numListeners:'+ this.matched.getNumListeners() +']';
+        }
+
+    };
+
+
+
+    // Pattern Lexer ------
+    //=====================
+
+    patternLexer = crossroads.patternLexer = (function () {
+
+
+        var ESCAPE_CHARS_REGEXP = /[\\.+*?\^$\[\](){}\/'#]/g, //match chars that should be escaped on string regexp
+            UNNECESSARY_SLASHES_REGEXP = /\/$/g, //trailing slash
+            OPTIONAL_SLASHES_REGEXP = /([:}]|\w(?=\/))\/?(:)/g, //slash between `::` or `}:` or `\w:`. $1 = before, $2 = after
+            REQUIRED_SLASHES_REGEXP = /([:}])\/?(\{)/g, //used to insert slash between `:{` and `}{`
+
+            REQUIRED_PARAMS_REGEXP = /\{([^}]+)\}/g, //match everything between `{ }`
+            OPTIONAL_PARAMS_REGEXP = /:([^:]+):/g, //match everything between `: :`
+            PARAMS_REGEXP = /(?:\{|:)([^}:]+)(?:\}|:)/g, //capture everything between `{ }` or `: :`
+
+            //used to save params during compile (avoid escaping things that
+            //shouldn't be escaped).
+            SAVE_REQUIRED_PARAMS = '__CR_RP__',
+            SAVE_OPTIONAL_PARAMS = '__CR_OP__',
+            SAVE_REQUIRED_SLASHES = '__CR_RS__',
+            SAVE_OPTIONAL_SLASHES = '__CR_OS__',
+            SAVED_REQUIRED_REGEXP = new RegExp(SAVE_REQUIRED_PARAMS, 'g'),
+            SAVED_OPTIONAL_REGEXP = new RegExp(SAVE_OPTIONAL_PARAMS, 'g'),
+            SAVED_OPTIONAL_SLASHES_REGEXP = new RegExp(SAVE_OPTIONAL_SLASHES, 'g'),
+            SAVED_REQUIRED_SLASHES_REGEXP = new RegExp(SAVE_REQUIRED_SLASHES, 'g');
+
+
+        function captureVals(regex, pattern) {
+            var vals = [], match;
+            while (match = regex.exec(pattern)) {
+                vals.push(match[1]);
+            }
+            return vals;
+        }
+
+        function getParamIds(pattern) {
+            return captureVals(PARAMS_REGEXP, pattern);
+        }
+
+        function getOptionalParamsIds(pattern) {
+            return captureVals(OPTIONAL_PARAMS_REGEXP, pattern);
+        }
+
+        function compilePattern(pattern) {
+            pattern = pattern || '';
+            if(pattern){
+                pattern = pattern.replace(UNNECESSARY_SLASHES_REGEXP, '');
+                pattern = tokenize(pattern);
+                pattern = pattern.replace(ESCAPE_CHARS_REGEXP, '\\$&');
+                pattern = untokenize(pattern);
+            }
+            return new RegExp('^'+ pattern + '/?$'); //trailing slash is optional
+        }
+
+        function tokenize(pattern) {
+            //save chars that shouldn't be escaped
+            pattern = pattern.replace(OPTIONAL_SLASHES_REGEXP, '$1'+ SAVE_OPTIONAL_SLASHES +'$2');
+            pattern = pattern.replace(REQUIRED_SLASHES_REGEXP, '$1'+ SAVE_REQUIRED_SLASHES +'$2');
+            pattern = pattern.replace(OPTIONAL_PARAMS_REGEXP, SAVE_OPTIONAL_PARAMS);
+            return pattern.replace(REQUIRED_PARAMS_REGEXP, SAVE_REQUIRED_PARAMS);
+        }
+
+        function untokenize(pattern) {
+            pattern = pattern.replace(SAVED_OPTIONAL_SLASHES_REGEXP, '\\/?');
+            pattern = pattern.replace(SAVED_REQUIRED_SLASHES_REGEXP, '\\/');
+            pattern = pattern.replace(SAVED_OPTIONAL_REGEXP, '([^\\/]+)?\/?');
+            return pattern.replace(SAVED_REQUIRED_REGEXP, '([^\\/]+)');
+        }
+
+        function getParamValues(request, regexp, shouldTypecast) {
+            var vals = regexp.exec(request);
+            if (vals) {
+                vals.shift();
+                if (shouldTypecast) {
+                    vals = typecastArrayValues(vals);
+                }
+            }
+            return vals;
+        }
+
+        //API
+        return {
+            getParamIds : getParamIds,
+            getOptionalParamsIds : getOptionalParamsIds,
+            getParamValues : getParamValues,
+            compilePattern : compilePattern
+        };
+
+    }());
+
+
+    return crossroads;
+});
+}(typeof define === 'function' && define.amd ? define : function (deps, factory) {
+    if (typeof module !== 'undefined' && module.exports) { //Node
+        module.exports = factory(require(deps[0]));
+    } else {
+        /*jshint sub:true */
+        window['crossroads'] = factory(window[deps[0]]);
+    }
+}));
diff --git a/debian/missing-sources/hasher.js b/debian/missing-sources/hasher.js
new file mode 100644
index 0000000..a3630ce
--- /dev/null
+++ b/debian/missing-sources/hasher.js
@@ -0,0 +1,407 @@
+/*!!
+ * Hasher <http://github.com/millermedeiros/hasher>
+ * @author Miller Medeiros
+ * @version 1.1.2 (2012/10/31 03:19 PM)
+ * Released under the MIT License
+ */
+
+(function (define) {
+    define('hasher', ['signals'], function(signals){
+
+/*jshint white:false*/
+/*global signals:false, window:false*/
+
+/**
+ * Hasher
+ * @namespace History Manager for rich-media applications.
+ * @name hasher
+ */
+var hasher = (function(window){
+
+    //--------------------------------------------------------------------------------------
+    // Private Vars
+    //--------------------------------------------------------------------------------------
+
+    var
+
+        // frequency that it will check hash value on IE 6-7 since it doesn't
+        // support the hashchange event
+        POOL_INTERVAL = 25,
+
+        // local storage for brevity and better compression --------------------------------
+
+        document = window.document,
+        history = window.history,
+        Signal = signals.Signal,
+
+        // local vars ----------------------------------------------------------------------
+
+        hasher,
+        _hash,
+        _checkInterval,
+        _isActive,
+        _frame, //iframe used for legacy IE (6-7)
+        _checkHistory,
+        _hashValRegexp = /#(.*)$/,
+        _baseUrlRegexp = /(\?.*)|(\#.*)/,
+        _hashRegexp = /^\#/,
+
+        // sniffing/feature detection -------------------------------------------------------
+
+        //hack based on this: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+        _isIE = (!+"\v1"),
+        // hashchange is supported by FF3.6+, IE8+, Chrome 5+, Safari 5+ but
+        // feature detection fails on IE compatibility mode, so we need to
+        // check documentMode
+        _isHashChangeSupported = ('onhashchange' in window) && document.documentMode !== 7,
+        //check if is IE6-7 since hash change is only supported on IE8+ and
+        //changing hash value on IE6-7 doesn't generate history record.
+        _isLegacyIE = _isIE && !_isHashChangeSupported,
+        _isLocal = (location.protocol === 'file:');
+
+
+    //--------------------------------------------------------------------------------------
+    // Private Methods
+    //--------------------------------------------------------------------------------------
+
+    function _trimHash(hash){
+        if(! hash) return '';
+        var regexp = new RegExp('^\\'+ hasher.prependHash +'|\\'+ hasher.appendHash +'$', 'g');
+        return hash.replace(regexp, '');
+    }
+
+    function _getWindowHash(){
+        //parsed full URL instead of getting window.location.hash because Firefox decode hash value (and all the other browsers don't)
+        //also because of IE8 bug with hash query in local file [issue #6]
+        var result = _hashValRegexp.exec( hasher.getURL() );
+        return (result && result[1])? decodeURIComponent(result[1]) : '';
+    }
+
+    function _getFrameHash(){
+        return (_frame)? _frame.contentWindow.frameHash : null;
+    }
+
+    function _createFrame(){
+        _frame = document.createElement('iframe');
+        _frame.src = 'about:blank';
+        _frame.style.display = 'none';
+        document.body.appendChild(_frame);
+    }
+
+    function _updateFrame(){
+        if(_frame && _hash !== _getFrameHash()){
+            var frameDoc = _frame.contentWindow.document;
+            frameDoc.open();
+            //update iframe content to force new history record.
+            //based on Really Simple History, SWFAddress and YUI.history.
+            frameDoc.write('<html><head><title>' + document.title + '</title><script type="text/javascript">var frameHash="' + _hash + '";</script></head><body> </body></html>');
+            frameDoc.close();
+        }
+    }
+
+    function _registerChange(newHash, isReplace){
+        if(_hash !== newHash){
+            var oldHash = _hash;
+            _hash = newHash; //should come before event dispatch to make sure user can get proper value inside event handler
+            if(_isLegacyIE){
+                if(!isReplace){
+                    _updateFrame();
+                } else {
+                    _frame.contentWindow.frameHash = newHash;
+                }
+            }
+            hasher.changed.dispatch(_trimHash(newHash), _trimHash(oldHash));
+        }
+    }
+
+    if (_isLegacyIE) {
+        /**
+         * @private
+         */
+        _checkHistory = function(){
+            var windowHash = _getWindowHash(),
+                frameHash = _getFrameHash();
+            if(frameHash !== _hash && frameHash !== windowHash){
+                //detect changes made pressing browser history buttons.
+                //Workaround since history.back() and history.forward() doesn't
+                //update hash value on IE6/7 but updates content of the iframe.
+                //needs to trim hash since value stored already have
+                //prependHash + appendHash for fast check.
+                hasher.setHash(_trimHash(frameHash));
+            } else if (windowHash !== _hash){
+                //detect if hash changed (manually or using setHash)
+                _registerChange(windowHash);
+            }
+        };
+    } else {
+        /**
+         * @private
+         */
+        _checkHistory = function(){
+            var windowHash = _getWindowHash();
+            if(windowHash !== _hash){
+                _registerChange(windowHash);
+            }
+        };
+    }
+
+    function _addListener(elm, eType, fn){
+        if(elm.addEventListener){
+            elm.addEventListener(eType, fn, false);
+        } else if (elm.attachEvent){
+            elm.attachEvent('on' + eType, fn);
+        }
+    }
+
+    function _removeListener(elm, eType, fn){
+        if(elm.removeEventListener){
+            elm.removeEventListener(eType, fn, false);
+        } else if (elm.detachEvent){
+            elm.detachEvent('on' + eType, fn);
+        }
+    }
+
+    function _makePath(paths){
+        paths = Array.prototype.slice.call(arguments);
+
+        var path = paths.join(hasher.separator);
+        path = path? hasher.prependHash + path.replace(_hashRegexp, '') + hasher.appendHash : path;
+        return path;
+    }
+
+    function _encodePath(path){
+        //used encodeURI instead of encodeURIComponent to preserve '?', '/',
+        //'#'. Fixes Safari bug [issue #8]
+        path = encodeURI(path);
+        if(_isIE && _isLocal){
+            //fix IE8 local file bug [issue #6]
+            path = path.replace(/\?/, '%3F');
+        }
+        return path;
+    }
+
+    //--------------------------------------------------------------------------------------
+    // Public (API)
+    //--------------------------------------------------------------------------------------
+
+    hasher = /** @lends hasher */ {
+
+        /**
+         * hasher Version Number
+         * @type string
+         * @constant
+         */
+        VERSION : '1.1.2',
+
+        /**
+         * String that should always be added to the end of Hash value.
+         * <ul>
+         * <li>default value: '';</li>
+         * <li>will be automatically removed from `hasher.getHash()`</li>
+         * <li>avoid conflicts with elements that contain ID equal to hash value;</li>
+         * </ul>
+         * @type string
+         */
+        appendHash : '',
+
+        /**
+         * String that should always be added to the beginning of Hash value.
+         * <ul>
+         * <li>default value: '/';</li>
+         * <li>will be automatically removed from `hasher.getHash()`</li>
+         * <li>avoid conflicts with elements that contain ID equal to hash value;</li>
+         * </ul>
+         * @type string
+         */
+        prependHash : '/',
+
+        /**
+         * String used to split hash paths; used by `hasher.getHashAsArray()` to split paths.
+         * <ul>
+         * <li>default value: '/';</li>
+         * </ul>
+         * @type string
+         */
+        separator : '/',
+
+        /**
+         * Signal dispatched when hash value changes.
+         * - pass current hash as 1st parameter to listeners and previous hash value as 2nd parameter.
+         * @type signals.Signal
+         */
+        changed : new Signal(),
+
+        /**
+         * Signal dispatched when hasher is stopped.
+         * -  pass current hash as first parameter to listeners
+         * @type signals.Signal
+         */
+        stopped : new Signal(),
+
+        /**
+         * Signal dispatched when hasher is initialized.
+         * - pass current hash as first parameter to listeners.
+         * @type signals.Signal
+         */
+        initialized : new Signal(),
+
+        /**
+         * Start listening/dispatching changes in the hash/history.
+         * <ul>
+         *   <li>hasher won't dispatch CHANGE events by manually typing a new value or pressing the back/forward buttons before calling this method.</li>
+         * </ul>
+         */
+        init : function(){
+            if(_isActive) return;
+
+            _hash = _getWindowHash();
+
+            //thought about branching/overloading hasher.init() to avoid checking multiple times but
+            //don't think worth doing it since it probably won't be called multiple times.
+            if(_isHashChangeSupported){
+                _addListener(window, 'hashchange', _checkHistory);
+            }else {
+                if(_isLegacyIE){
+                    if(! _frame){
+                        _createFrame();
+                    }
+                    _updateFrame();
+                }
+                _checkInterval = setInterval(_checkHistory, POOL_INTERVAL);
+            }
+
+            _isActive = true;
+            hasher.initialized.dispatch(_trimHash(_hash));
+        },
+
+        /**
+         * Stop listening/dispatching changes in the hash/history.
+         * <ul>
+         *   <li>hasher won't dispatch CHANGE events by manually typing a new value or pressing the back/forward buttons after calling this method, unless you call hasher.init() again.</li>
+         *   <li>hasher will still dispatch changes made programatically by calling hasher.setHash();</li>
+         * </ul>
+         */
+        stop : function(){
+            if(! _isActive) return;
+
+            if(_isHashChangeSupported){
+                _removeListener(window, 'hashchange', _checkHistory);
+            }else{
+                clearInterval(_checkInterval);
+                _checkInterval = null;
+            }
+
+            _isActive = false;
+            hasher.stopped.dispatch(_trimHash(_hash));
+        },
+
+        /**
+         * @return {boolean}    If hasher is listening to changes on the browser history and/or hash value.
+         */
+        isActive : function(){
+            return _isActive;
+        },
+
+        /**
+         * @return {string} Full URL.
+         */
+        getURL : function(){
+            return window.location.href;
+        },
+
+        /**
+         * @return {string} Retrieve URL without query string and hash.
+         */
+        getBaseURL : function(){
+            return hasher.getURL().replace(_baseUrlRegexp, ''); //removes everything after '?' and/or '#'
+        },
+
+        /**
+         * Set Hash value, generating a new history record.
+         * @param {...string} path    Hash value without '#'. Hasher will join
+         * path segments using `hasher.separator` and prepend/append hash value
+         * with `hasher.appendHash` and `hasher.prependHash`
+         * @example hasher.setHash('lorem', 'ipsum', 'dolor') -> '#/lorem/ipsum/dolor'
+         */
+        setHash : function(path){
+            path = _makePath.apply(null, arguments);
+            if(path !== _hash){
+                // we should store raw value
+                _registerChange(path);
+                if (path === _hash) {
+                    // we check if path is still === _hash to avoid error in
+                    // case of multiple consecutive redirects [issue #39]
+                    window.location.hash = '#' + _encodePath(path);
+                }
+            }
+        },
+
+        /**
+         * Set Hash value without keeping previous hash on the history record.
+         * Similar to calling `window.location.replace("#/hash")` but will also work on IE6-7.
+         * @param {...string} path    Hash value without '#'. Hasher will join
+         * path segments using `hasher.separator` and prepend/append hash value
+         * with `hasher.appendHash` and `hasher.prependHash`
+         * @example hasher.replaceHash('lorem', 'ipsum', 'dolor') -> '#/lorem/ipsum/dolor'
+         */
+        replaceHash : function(path){
+            path = _makePath.apply(null, arguments);
+            if(path !== _hash){
+                // we should store raw value
+                _registerChange(path, true);
+                if (path === _hash) {
+                    // we check if path is still === _hash to avoid error in
+                    // case of multiple consecutive redirects [issue #39]
+                    window.location.replace('#' + _encodePath(path));
+                }
+            }
+        },
+
+        /**
+         * @return {string} Hash value without '#', `hasher.appendHash` and `hasher.prependHash`.
+         */
+        getHash : function(){
+            //didn't used actual value of the `window.location.hash` to avoid breaking the application in case `window.location.hash` isn't available and also because value should always be synched.
+            return _trimHash(_hash);
+        },
+
+        /**
+         * @return {Array.<string>} Hash value split into an Array.
+         */
+        getHashAsArray : function(){
+            return hasher.getHash().split(hasher.separator);
+        },
+
+        /**
+         * Removes all event listeners, stops hasher and destroy hasher object.
+         * - IMPORTANT: hasher won't work after calling this method, hasher Object will be deleted.
+         */
+        dispose : function(){
+            hasher.stop();
+            hasher.initialized.dispose();
+            hasher.stopped.dispose();
+            hasher.changed.dispose();
+            _frame = hasher = window.hasher = null;
+        },
+
+        /**
+         * @return {string} A string representation of the object.
+         */
+        toString : function(){
+            return '[hasher version="'+ hasher.VERSION +'" hash="'+ hasher.getHash() +'"]';
+        }
+
+    };
+
+    hasher.initialized.memorize = true; //see #33
+
+    return hasher;
+
+}(window));
+
+
+        return hasher;
+    });
+}(typeof define === 'function' && define.amd ? define : function (id, deps, factory) {
+    window[id] = factory(window[deps[0]]);
+}));
diff --git a/debian/missing-sources/signals.js b/debian/missing-sources/signals.js
new file mode 100644
index 0000000..2615d26
--- /dev/null
+++ b/debian/missing-sources/signals.js
@@ -0,0 +1,445 @@
+/*jslint onevar:true, undef:true, newcap:true, regexp:true, bitwise:true, maxerr:50, indent:4, white:false, nomen:false, plusplus:false */
+/*global define:false, require:false, exports:false, module:false, signals:false */
+
+/** @license
+ * JS Signals <http://millermedeiros.github.com/js-signals/>
+ * Released under the MIT license
+ * Author: Miller Medeiros
+ * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM)
+ */
+
+(function(global){
+
+    // SignalBinding -------------------------------------------------
+    //================================================================
+
+    /**
+     * Object that represents a binding between a Signal and a listener function.
+     * <br />- <strong>This is an internal constructor and shouldn't be called by regular users.</strong>
+     * <br />- inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.
+     * @author Miller Medeiros
+     * @constructor
+     * @internal
+     * @name SignalBinding
+     * @param {Signal} signal Reference to Signal object that listener is currently bound to.
+     * @param {Function} listener Handler function bound to the signal.
+     * @param {boolean} isOnce If binding should be executed just once.
+     * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function).
+     * @param {Number} [priority] The priority level of the event listener. (default = 0).
+     */
+    function SignalBinding(signal, listener, isOnce, listenerContext, priority) {
+
+        /**
+         * Handler function bound to the signal.
+         * @type Function
+         * @private
+         */
+        this._listener = listener;
+
+        /**
+         * If binding should be executed just once.
+         * @type boolean
+         * @private
+         */
+        this._isOnce = isOnce;
+
+        /**
+         * Context on which listener will be executed (object that should represent the `this` variable inside listener function).
+         * @memberOf SignalBinding.prototype
+         * @name context
+         * @type Object|undefined|null
+         */
+        this.context = listenerContext;
+
+        /**
+         * Reference to Signal object that listener is currently bound to.
+         * @type Signal
+         * @private
+         */
+        this._signal = signal;
+
+        /**
+         * Listener priority
+         * @type Number
+         * @private
+         */
+        this._priority = priority || 0;
+    }
+
+    SignalBinding.prototype = {
+
+        /**
+         * If binding is active and should be executed.
+         * @type boolean
+         */
+        active : true,
+
+        /**
+         * Default parameters passed to listener during `Signal.dispatch` and `SignalBinding.execute`. (curried parameters)
+         * @type Array|null
+         */
+        params : null,
+
+        /**
+         * Call listener passing arbitrary parameters.
+         * <p>If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.</p>
+         * @param {Array} [paramsArr] Array of parameters that should be passed to the listener
+         * @return {*} Value returned by the listener.
+         */
+        execute : function (paramsArr) {
+            var handlerReturn, params;
+            if (this.active && !!this._listener) {
+                params = this.params? this.params.concat(paramsArr) : paramsArr;
+                handlerReturn = this._listener.apply(this.context, params);
+                if (this._isOnce) {
+                    this.detach();
+                }
+            }
+            return handlerReturn;
+        },
+
+        /**
+         * Detach binding from signal.
+         * - alias to: mySignal.remove(myBinding.getListener());
+         * @return {Function|null} Handler function bound to the signal or `null` if binding was previously detached.
+         */
+        detach : function () {
+            return this.isBound()? this._signal.remove(this._listener, this.context) : null;
+        },
+
+        /**
+         * @return {Boolean} `true` if binding is still bound to the signal and have a listener.
+         */
+        isBound : function () {
+            return (!!this._signal && !!this._listener);
+        },
+
+        /**
+         * @return {boolean} If SignalBinding will only be executed once.
+         */
+        isOnce : function () {
+            return this._isOnce;
+        },
+
+        /**
+         * @return {Function} Handler function bound to the signal.
+         */
+        getListener : function () {
+            return this._listener;
+        },
+
+        /**
+         * @return {Signal} Signal that listener is currently bound to.
+         */
+        getSignal : function () {
+            return this._signal;
+        },
+
+        /**
+         * Delete instance properties
+         * @private
+         */
+        _destroy : function () {
+            delete this._signal;
+            delete this._listener;
+            delete this.context;
+        },
+
+        /**
+         * @return {string} String representation of the object.
+         */
+        toString : function () {
+            return '[SignalBinding isOnce:' + this._isOnce +', isBound:'+ this.isBound() +', active:' + this.active + ']';
+        }
+
+    };
+
+
+/*global SignalBinding:false*/
+
+    // Signal --------------------------------------------------------
+    //================================================================
+
+    function validateListener(listener, fnName) {
+        if (typeof listener !== 'function') {
+            throw new Error( 'listener is a required param of {fn}() and should be a Function.'.replace('{fn}', fnName) );
+        }
+    }
+
+    /**
+     * Custom event broadcaster
+     * <br />- inspired by Robert Penner's AS3 Signals.
+     * @name Signal
+     * @author Miller Medeiros
+     * @constructor
+     */
+    function Signal() {
+        /**
+         * @type Array.<SignalBinding>
+         * @private
+         */
+        this._bindings = [];
+        this._prevParams = null;
+
+        // enforce dispatch to aways work on same context (#47)
+        var self = this;
+        this.dispatch = function(){
+            Signal.prototype.dispatch.apply(self, arguments);
+        };
+    }
+
+    Signal.prototype = {
+
+        /**
+         * Signals Version Number
+         * @type String
+         * @const
+         */
+        VERSION : '1.0.0',
+
+        /**
+         * If Signal should keep record of previously dispatched parameters and
+         * automatically execute listener during `add()`/`addOnce()` if Signal was
+         * already dispatched before.
+         * @type boolean
+         */
+        memorize : false,
+
+        /**
+         * @type boolean
+         * @private
+         */
+        _shouldPropagate : true,
+
+        /**
+         * If Signal is active and should broadcast events.
+         * <p><strong>IMPORTANT:</strong> Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.</p>
+         * @type boolean
+         */
+        active : true,
+
+        /**
+         * @param {Function} listener
+         * @param {boolean} isOnce
+         * @param {Object} [listenerContext]
+         * @param {Number} [priority]
+         * @return {SignalBinding}
+         * @private
+         */
+        _registerListener : function (listener, isOnce, listenerContext, priority) {
+
+            var prevIndex = this._indexOfListener(listener, listenerContext),
+                binding;
+
+            if (prevIndex !== -1) {
+                binding = this._bindings[prevIndex];
+                if (binding.isOnce() !== isOnce) {
+                    throw new Error('You cannot add'+ (isOnce? '' : 'Once') +'() then add'+ (!isOnce? '' : 'Once') +'() the same listener without removing the relationship first.');
+                }
+            } else {
+                binding = new SignalBinding(this, listener, isOnce, listenerContext, priority);
+                this._addBinding(binding);
+            }
+
+            if(this.memorize && this._prevParams){
+                binding.execute(this._prevParams);
+            }
+
+            return binding;
+        },
+
+        /**
+         * @param {SignalBinding} binding
+         * @private
+         */
+        _addBinding : function (binding) {
+            //simplified insertion sort
+            var n = this._bindings.length;
+            do { --n; } while (this._bindings[n] && binding._priority <= this._bindings[n]._priority);
+            this._bindings.splice(n + 1, 0, binding);
+        },
+
+        /**
+         * @param {Function} listener
+         * @return {number}
+         * @private
+         */
+        _indexOfListener : function (listener, context) {
+            var n = this._bindings.length,
+                cur;
+            while (n--) {
+                cur = this._bindings[n];
+                if (cur._listener === listener && cur.context === context) {
+                    return n;
+                }
+            }
+            return -1;
+        },
+
+        /**
+         * Check if listener was attached to Signal.
+         * @param {Function} listener
+         * @param {Object} [context]
+         * @return {boolean} if Signal has the specified listener.
+         */
+        has : function (listener, context) {
+            return this._indexOfListener(listener, context) !== -1;
+        },
+
+        /**
+         * Add a listener to the signal.
+         * @param {Function} listener Signal handler function.
+         * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function).
+         * @param {Number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0)
+         * @return {SignalBinding} An Object representing the binding between the Signal and listener.
+         */
+        add : function (listener, listenerContext, priority) {
+            validateListener(listener, 'add');
+            return this._registerListener(listener, false, listenerContext, priority);
+        },
+
+        /**
+         * Add listener to the signal that should be removed after first execution (will be executed only once).
+         * @param {Function} listener Signal handler function.
+         * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function).
+         * @param {Number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0)
+         * @return {SignalBinding} An Object representing the binding between the Signal and listener.
+         */
+        addOnce : function (listener, listenerContext, priority) {
+            validateListener(listener, 'addOnce');
+            return this._registerListener(listener, true, listenerContext, priority);
+        },
+
+        /**
+         * Remove a single listener from the dispatch queue.
+         * @param {Function} listener Handler function that should be removed.
+         * @param {Object} [context] Execution context (since you can add the same handler multiple times if executing in a different context).
+         * @return {Function} Listener handler function.
+         */
+        remove : function (listener, context) {
+            validateListener(listener, 'remove');
+
+            var i = this._indexOfListener(listener, context);
+            if (i !== -1) {
+                this._bindings[i]._destroy(); //no reason to a SignalBinding exist if it isn't attached to a signal
+                this._bindings.splice(i, 1);
+            }
+            return listener;
+        },
+
+        /**
+         * Remove all listeners from the Signal.
+         */
+        removeAll : function () {
+            var n = this._bindings.length;
+            while (n--) {
+                this._bindings[n]._destroy();
+            }
+            this._bindings.length = 0;
+        },
+
+        /**
+         * @return {number} Number of listeners attached to the Signal.
+         */
+        getNumListeners : function () {
+            return this._bindings.length;
+        },
+
+        /**
+         * Stop propagation of the event, blocking the dispatch to next listeners on the queue.
+         * <p><strong>IMPORTANT:</strong> should be called only during signal dispatch, calling it before/after dispatch won't affect signal broadcast.</p>
+         * @see Signal.prototype.disable
+         */
+        halt : function () {
+            this._shouldPropagate = false;
+        },
+
+        /**
+         * Dispatch/Broadcast Signal to all listeners added to the queue.
+         * @param {...*} [params] Parameters that should be passed to each handler.
+         */
+        dispatch : function (params) {
+            if (! this.active) {
+                return;
+            }
+
+            var paramsArr = Array.prototype.slice.call(arguments),
+                n = this._bindings.length,
+                bindings;
+
+            if (this.memorize) {
+                this._prevParams = paramsArr;
+            }
+
+            if (! n) {
+                //should come after memorize
+                return;
+            }
+
+            bindings = this._bindings.slice(); //clone array in case add/remove items during dispatch
+            this._shouldPropagate = true; //in case `halt` was called before dispatch or during the previous dispatch.
+
+            //execute all callbacks until end of the list or until a callback returns `false` or stops propagation
+            //reverse loop since listeners with higher priority will be added at the end of the list
+            do { n--; } while (bindings[n] && this._shouldPropagate && bindings[n].execute(paramsArr) !== false);
+        },
+
+        /**
+         * Forget memorized arguments.
+         * @see Signal.memorize
+         */
+        forget : function(){
+            this._prevParams = null;
+        },
+
+        /**
+         * Remove all bindings from signal and destroy any reference to external objects (destroy Signal object).
+         * <p><strong>IMPORTANT:</strong> calling any method on the signal instance after calling dispose will throw errors.</p>
+         */
+        dispose : function () {
+            this.removeAll();
+            delete this._bindings;
+            delete this._prevParams;
+        },
+
+        /**
+         * @return {string} String representation of the object.
+         */
+        toString : function () {
+            return '[Signal active:'+ this.active +' numListeners:'+ this.getNumListeners() +']';
+        }
+
+    };
+
+
+    // Namespace -----------------------------------------------------
+    //================================================================
+
+    /**
+     * Signals namespace
+     * @namespace
+     * @name signals
+     */
+    var signals = Signal;
+
+    /**
+     * Custom event broadcaster
+     * @see Signal
+     */
+    // alias for backwards compatibility (see #gh-44)
+    signals.Signal = Signal;
+
+
+
+    //exports to multiple environments
+    if(typeof define === 'function' && define.amd){ //AMD
+        define(function () { return signals; });
+    } else if (typeof module !== 'undefined' && module.exports){ //node
+        module.exports = signals;
+    } else { //browser
+        //use string because of Google closure compiler ADVANCED_MODE
+        /*jslint sub:true */
+        global['signals'] = signals;
+    }
+
+}(this));
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
index fd65693..b872b0d 100644
--- a/debian/source/lintian-overrides
+++ b/debian/source/lintian-overrides
@@ -1,2 +1,12 @@
-#Base64 embedded image in single line of source file
+#Long lines in source files
 rainloop source: source-is-missing dev/Common/Consts.js *
+rainloop source: source-is-missing vendors/jua/jua.js *
+
+#Amalgamated and minified copy of package "ckeditor"; bundled by upstream,
+#package fails to load synchronously unless amalgamated
+rainloop source: source-is-missing vendors/ckeditor/*
+
+#Source provided as vendors/bootstrap/js/bootstrap.orig.js
+rainloop source: source-is-missing vendors/bootstrap/js/bootstrap.min.orig.js *
+rainloop source: source-is-missing vendors/bootstrap/js/old.bootstrap.min.js
+rainloop source: source-is-missing vendors/bootstrap/js/old.bootstrap.min.orig.js *

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/rainloop.git



More information about the Pkg-javascript-commits mailing list