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vC,EAAI,MAAM,EAAY,IAAM,EAAS,KAAK,GAAG,EAAY,IAE3D,EAAO,KAAK,GACZ,EAAM,CAAC,CACT,CACA,OAAO,EAAe,EAAS,OAAO,KAAM,EAAQ,EACtD,GACJ,CA9CA,EAAU,UAAU,IAAM,SAAU,GAClC,IAAI,EAAO,KACX,OAAO,IAAI,EAAK,OACb,MAAK,WACJ,OAAO,EAAI,KAAK,KAAK,CACnB,KAAM,MACN,IAAK,EAAkB,OAAO,CAAC,QAAS,EACtC,OAAQ,EAAK,oBAAqB,aAAc,EAAK,iBAE3D,IACC,MAAK,SAAU,GACd,OAAO,KAAK,MAAM,EAAO,OAAO,aAClC,GACJ,EAmCA,EAAU,UAAU,WAAa,SAAU,GACzC,IAAiB,EAAS,GAAI,EAAQ,KAAK,eACzC,EAAoB,CAClB,QAAS,KAAK,SACd,MAAO,EACP,aAAc,KAAK,eAavB,OAXI,EAAM,eACR,EAAS,EAAO,OAPP,KAOmB,sBAE1B,EAAM,cACR,EAAS,EAAO,OAAO,EAAM,cAE3B,EAAM,QACR,EAAQ,EAAM,MAAM,IAEtB,EAAkB,OAAS,EAC3B,EAAkB,MAAQ,EACnB,EAAe,EAAkB,OAAO,GAAoB,GACjE,GACC,MAAK,SAAU,GACd,OAAK,EAAM,MAGJ,EAAO,MAAM,EAAM,MAAM,GAAI,EAAM,MAAM,IAFvC,CAGX,GACJ,EAEA,EAAU,UAAU,YAAc,SAAU,GAE1C,IAAkD,IADjB,CAAC,OAAQ,SAAU,UAAW,SAChC,QAAQ,GACrC,OAAO,CAEX,EAEA,EAAI,WAAW,WAAY,EAE7B,CA/GA,CA+GE,EAAK,EAAM,GACX,OAAS,EAET,EAAI,SAAW,EACf,OAAO,QAAU,CAEnB,CAzoeA,CAyoeG,CAAC","file":"/npm/jio@3.45.0/dist/jio-latest-node.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/jio@3.45.0/dist/jio-latest-node.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (define, exports) {\n  var navigator = null,\n    window = {},\n    node_module = module;\n\n  module = undefined;\n(function(globals) {\nvar define, requireModule;\n\n(function() {\n  var registry = {}, seen = {};\n\n  define = function(name, deps, callback) {\n    registry[name] = { deps: deps, callback: callback };\n  };\n\n  requireModule = function(name) {\n    if (seen[name]) { return seen[name]; }\n    seen[name] = {};\n\n    var mod = registry[name];\n    if (!mod) {\n      throw new Error(\"Module '\" + name + \"' not found.\");\n    }\n\n    var deps = mod.deps,\n        callback = mod.callback,\n        reified = [],\n        exports;\n\n    for (var i=0, l=deps.length; i<l; i++) {\n      if (deps[i] === 'exports') {\n        reified.push(exports = {});\n      } else {\n        reified.push(requireModule(deps[i]));\n      }\n    }\n\n    var value = callback.apply(this, reified);\n    return seen[name] = exports || value;\n  };\n})();\n\ndefine(\"rsvp/all\",\n  [\"rsvp/promise\",\"exports\"],\n  function(__dependency1__, __exports__) {\n    \"use strict\";\n    var Promise = __dependency1__.Promise;\n    /* global toString */\n\n\n    function promiseAtLeast(expected_count, promises) {\n      if (Object.prototype.toString.call(promises) !== \"[object Array]\") {\n        throw new TypeError('You must pass an array to all.');\n      }\n\n      function canceller() {\n        var promise;\n        for (var i = 0; i < promises.length; i++) {\n          promise = promises[i];\n\n          if (promise && typeof promise.then === 'function' &&\n              typeof promise.cancel === 'function') {\n            promise.cancel();\n          }\n        }\n      }\n\n      return new Promise(function(resolve, reject) {\n        var results = [], remaining = promises.length,\n        promise, remaining_count = promises.length - expected_count;\n\n        if (remaining === 0) {\n          if (expected_count === 1) {\n            resolve();\n          } else {\n            resolve([]);\n          }\n        }\n\n        function resolver(index) {\n          return function(value) {\n            resolveAll(index, value);\n          };\n        }\n\n        function resolveAll(index, value) {\n          results[index] = value;\n          if (--remaining === remaining_count) {\n            if (remaining_count === 0) {\n              resolve(results);\n            } else {\n              resolve(value);\n              canceller();\n            }\n          }\n        }\n\n        function cancelAll(rejectionValue) {\n          reject(rejectionValue);\n          canceller();\n        }\n\n        for (var i = 0; i < promises.length; i++) {\n          promise = promises[i];\n\n          if (promise && typeof promise.then === 'function') {\n            promise.then(resolver(i), cancelAll);\n          } else {\n            resolveAll(i, promise);\n          }\n        }\n      }, canceller\n      );\n    }\n\n    function all(promises) {\n      return promiseAtLeast(promises.length, promises);\n    }\n\n    function any(promises) {\n      return promiseAtLeast(1, promises);\n    }\n\n\n    __exports__.all = all;\n    __exports__.any = any;\n  });\ndefine(\"rsvp/async\",\n  [\"exports\"],\n  function(__exports__) {\n    \"use strict\";\n    var browserGlobal = (typeof window !== 'undefined') ? window : {};\n    var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\n    var async;\n    var local = (typeof global !== 'undefined') ? global : this;\n\n    function checkNativePromise() {\n      if (typeof Promise === \"function\" &&\n          typeof Promise.resolve === \"function\") {\n        try {\n          /* global Promise */\n          var promise = new Promise(function(){});\n          if ({}.toString.call(promise) === \"[object Promise]\") {\n            return true;\n          }\n        } catch (e) {}\n      }\n      return false;\n    }\n\n    function useNativePromise() {\n      var nativePromise = Promise.resolve();\n      return function(callback, arg) {\n        nativePromise.then(function () {\n          callback(arg);\n        });\n      };\n    }\n\n    // old node\n    function useNextTick() {\n      return function(callback, arg) {\n        process.nextTick(function() {\n          callback(arg);\n        });\n      };\n    }\n\n    // node >= 0.10.x\n    function useSetImmediate() {\n      return function(callback, arg) {\n        /* global  setImmediate */\n        setImmediate(function(){\n          callback(arg);\n        });\n      };\n    }\n\n    function useMutationObserver() {\n      var queue = [];\n\n      var observer = new BrowserMutationObserver(function() {\n        var toProcess = queue.slice();\n        queue = [];\n\n        toProcess.forEach(function(tuple) {\n          var callback = tuple[0], arg= tuple[1];\n          callback(arg);\n        });\n      });\n\n      var element = document.createElement('div');\n      observer.observe(element, { attributes: true });\n\n      // Chrome Memory Leak: https://bugs.webkit.org/show_bug.cgi?id=93661\n      window.addEventListener('unload', function(){\n        observer.disconnect();\n        observer = null;\n      }, false);\n\n      return function(callback, arg) {\n        queue.push([callback, arg]);\n        element.setAttribute('drainQueue', 'drainQueue');\n      };\n    }\n\n    function useSetTimeout() {\n      return function(callback, arg) {\n        local.setTimeout(function() {\n          callback(arg);\n        }, 1);\n      };\n    }\n\n    if (checkNativePromise()) {\n      async = useNativePromise();\n    } else if (typeof setImmediate === 'function') {\n      async = useSetImmediate();\n    } else if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {\n      async = useNextTick();\n    } else if (BrowserMutationObserver) {\n      async = useMutationObserver();\n    } else {\n      async = useSetTimeout();\n    }\n\n\n    __exports__.async = async;\n  });\ndefine(\"rsvp/cancellation_error\",\n  [\"exports\"],\n  function(__exports__) {\n    \"use strict\";\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n    function CancellationError(message) {\n      this.name = \"cancel\";\n      if ((message !== undefined) && (typeof message !== \"string\")) {\n        throw new TypeError('You must pass a string.');\n      }\n      this.message = message || \"Default Message\";\n    }\n    CancellationError.prototype = new Error();\n    CancellationError.prototype.constructor = CancellationError;\n\n\n    __exports__.CancellationError = CancellationError;\n  });\ndefine(\"rsvp/config\",\n  [\"rsvp/async\",\"exports\"],\n  function(__dependency1__, __exports__) {\n    \"use strict\";\n    var async = __dependency1__.async;\n\n    var config = {};\n    config.async = async;\n\n\n    __exports__.config = config;\n  });\ndefine(\"rsvp/defer\",\n  [\"rsvp/promise\",\"exports\"],\n  function(__dependency1__, __exports__) {\n    \"use strict\";\n    var Promise = __dependency1__.Promise;\n\n    function defer() {\n      var deferred = {\n        // pre-allocate shape\n        resolve: undefined,\n        reject:  undefined,\n        promise: undefined\n      };\n\n      deferred.promise = new Promise(function(resolve, reject) {\n        deferred.resolve = resolve;\n        deferred.reject = reject;\n      });\n\n      return deferred;\n    }\n\n\n    __exports__.defer = defer;\n  });\ndefine(\"rsvp/events\",\n  [\"exports\"],\n  function(__exports__) {\n    \"use strict\";\n    var Event = function(type, options) {\n      this.type = type;\n\n      for (var option in options) {\n        if (!options.hasOwnProperty(option)) { continue; }\n\n        this[option] = options[option];\n      }\n    };\n\n    var indexOf = function(callbacks, callback) {\n      for (var i=0, l=callbacks.length; i<l; i++) {\n        if (callbacks[i][0] === callback) { return i; }\n      }\n\n      return -1;\n    };\n\n    var callbacksFor = function(object) {\n      var callbacks = object._promiseCallbacks;\n\n      if (!callbacks) {\n        callbacks = object._promiseCallbacks = {};\n      }\n\n      return callbacks;\n    };\n\n    var EventTarget = {\n      mixin: function(object) {\n        object.on = this.on;\n        object.off = this.off;\n        object.trigger = this.trigger;\n        return object;\n      },\n\n      on: function(eventNames, callback, binding) {\n        var allCallbacks = callbacksFor(this), callbacks, eventName;\n        eventNames = eventNames.split(/\\s+/);\n        binding = binding || this;\n\n        while (eventName = eventNames.shift()) {\n          callbacks = allCallbacks[eventName];\n\n          if (!callbacks) {\n            callbacks = allCallbacks[eventName] = [];\n          }\n\n          if (indexOf(callbacks, callback) === -1) {\n            callbacks.push([callback, binding]);\n          }\n        }\n      },\n\n      off: function(eventNames, callback) {\n        var allCallbacks = callbacksFor(this), callbacks, eventName, index;\n        eventNames = eventNames.split(/\\s+/);\n\n        while (eventName = eventNames.shift()) {\n          if (!callback) {\n            allCallbacks[eventName] = [];\n            continue;\n          }\n\n          callbacks = allCallbacks[eventName];\n\n          index = indexOf(callbacks, callback);\n\n          if (index !== -1) { callbacks.splice(index, 1); }\n        }\n      },\n\n      trigger: function(eventName, options) {\n        var allCallbacks = callbacksFor(this),\n            callbacks, callbackTuple, callback, binding, event;\n\n        if (callbacks = allCallbacks[eventName]) {\n          // Don't cache the callbacks.length since it may grow\n          for (var i=0; i<callbacks.length; i++) {\n            callbackTuple = callbacks[i];\n            callback = callbackTuple[0];\n            binding = callbackTuple[1];\n\n            if (typeof options !== 'object') {\n              options = { detail: options };\n            }\n\n            event = new Event(eventName, options);\n            callback.call(binding, event);\n          }\n        }\n      }\n    };\n\n\n    __exports__.EventTarget = EventTarget;\n  });\ndefine(\"rsvp/hash\",\n  [\"rsvp/promise\",\"exports\"],\n  function(__dependency1__, __exports__) {\n    \"use strict\";\n    var Promise = __dependency1__.Promise;\n\n    function size(object) {\n      var s = 0;\n\n      for (var prop in object) {\n        s++;\n      }\n\n      return s;\n    }\n\n    function hash(promises) {\n\n      function canceller() {\n        var promise,\n          key;\n        for (key in promises) {\n          if (promises.hasOwnProperty(key)) {\n            promise = promises[key];\n\n            if (promise && typeof promise.then === 'function' &&\n                typeof promise.cancel === 'function') {\n              promise.cancel();\n            }\n          }\n        }\n      }\n\n      return new Promise(function(resolve, reject) {\n        var results = {}, remaining = size(promises),\n          promise;\n\n        if (remaining === 0) {\n          resolve(results);\n        }\n\n        function resolver(key) {\n          return function(value) {\n            resolveAll(key, value);\n          };\n        }\n\n        function resolveAll(key, value) {\n          results[key] = value;\n          if (--remaining === 0) {\n            resolve(results);\n          }\n        }\n\n        function cancelAll(rejectionValue) {\n          reject(rejectionValue);\n          canceller();\n        }\n\n        for (var prop in promises) {\n          promise = promises[prop];\n\n          if (promise && typeof promise.then === 'function') {\n            promise.then(resolver(prop), cancelAll);\n          } else {\n            resolveAll(prop, promise);\n          }\n        }\n\n      }, canceller\n      );\n\n    }\n\n\n    __exports__.hash = hash;\n  });\ndefine(\"rsvp/node\",\n  [\"rsvp/promise\",\"rsvp/all\",\"exports\"],\n  function(__dependency1__, __dependency2__, __exports__) {\n    \"use strict\";\n    var Promise = __dependency1__.Promise;\n    var all = __dependency2__.all;\n\n    function makeNodeCallbackFor(resolve, reject) {\n      return function (error, value) {\n        if (error) {\n          reject(error);\n        } else if (arguments.length > 2) {\n          resolve(Array.prototype.slice.call(arguments, 1));\n        } else {\n          resolve(value);\n        }\n      };\n    }\n\n    function denodeify(nodeFunc) {\n      return function()  {\n        var nodeArgs = Array.prototype.slice.call(arguments), resolve, reject;\n        var thisArg = this;\n\n        var promise = new Promise(function(nodeResolve, nodeReject) {\n          resolve = nodeResolve;\n          reject = nodeReject;\n        });\n\n        all(nodeArgs).then(function(nodeArgs) {\n          nodeArgs.push(makeNodeCallbackFor(resolve, reject));\n\n          try {\n            nodeFunc.apply(thisArg, nodeArgs);\n          } catch(e) {\n            reject(e);\n          }\n        });\n\n        return promise;\n      };\n    }\n\n\n    __exports__.denodeify = denodeify;\n  });\ndefine(\"rsvp/promise\",\n  [\"rsvp/config\",\"rsvp/events\",\"rsvp/cancellation_error\",\"exports\"],\n  function(__dependency1__, __dependency2__, __dependency3__, __exports__) {\n    \"use strict\";\n    var config = __dependency1__.config;\n    var EventTarget = __dependency2__.EventTarget;\n    var CancellationError = __dependency3__.CancellationError;\n\n    function objectOrFunction(x) {\n      return isFunction(x) || (typeof x === \"object\" && x !== null);\n    }\n\n    function isFunction(x){\n      return typeof x === \"function\";\n    }\n\n    var Promise = function(resolver, canceller) {\n      var promise = this,\n      resolved = false;\n\n      if (typeof resolver !== 'function') {\n        throw new TypeError('You must pass a resolver function as the sole argument to the promise constructor');\n      }\n\n      if ((canceller !== undefined) && (typeof canceller !== 'function')) {\n        throw new TypeError('You can only pass a canceller function' +\n          ' as the second argument to the promise constructor');\n      }\n\n      if (!(promise instanceof Promise)) {\n        return new Promise(resolver, canceller);\n      }\n\n      var resolvePromise = function(value) {\n        if (resolved) { return; }\n        resolved = true;\n        resolve(promise, value);\n      };\n\n      var rejectPromise = function(value) {\n        if (resolved) { return; }\n        resolved = true;\n        reject(promise, value);\n      };\n\n      this.on('promise:failed', function(event) {\n        this.trigger('error', { detail: event.detail });\n      }, this);\n\n      this.on('error', onerror);\n\n      this.cancel = function () {\n        // For now, simply reject the promise and does not propagate the cancel\n        // to parent or children\n        if (resolved) { return; }\n        promise.isCancelled = true;\n        if (canceller !== undefined) {\n          try {\n            canceller();\n          } catch (e) {\n            rejectPromise(e);\n            return;\n          }\n        }\n        // Trigger cancel?\n        rejectPromise(new CancellationError());\n      };\n\n      try {\n        resolver(resolvePromise, rejectPromise);\n      } catch(e) {\n        rejectPromise(e);\n      }\n    };\n\n    function onerror(event) {\n      if (config.onerror) {\n        config.onerror(event.detail);\n      }\n    }\n\n    var invokeCallback = function(type, promise, callback, event) {\n      var hasCallback = isFunction(callback),\n          value, error, succeeded, failed;\n\n      if (promise.isFulfilled) { return; }\n      if (promise.isRejected) { return; }\n      if (promise.isCancelled) { return; }\n\n      if (hasCallback) {\n        try {\n          value = callback(event.detail);\n          succeeded = true;\n        } catch(e) {\n          failed = true;\n          error = e;\n        }\n      } else {\n        value = event.detail;\n        succeeded = true;\n      }\n\n      if (handleThenable(promise, value)) {\n        return;\n      } else if (hasCallback && succeeded) {\n        resolve(promise, value);\n      } else if (failed) {\n        reject(promise, error);\n      } else if (type === 'resolve') {\n        resolve(promise, value);\n      } else if (type === 'reject') {\n        reject(promise, value);\n      }\n    };\n\n    Promise.prototype = {\n      constructor: Promise,\n\n      isCancelled: undefined,\n      isRejected: undefined,\n      isFulfilled: undefined,\n      rejectedReason: undefined,\n      fulfillmentValue: undefined,\n\n      then: function(done, fail) {\n        this.off('error', onerror);\n\n        var thenPromise = new this.constructor(function() {},\n            function () {\n              thenPromise.trigger('promise:cancelled', {});\n            });\n\n        if (this.isFulfilled) {\n          config.async(function(promise) {\n            invokeCallback('resolve', thenPromise, done, { detail: promise.fulfillmentValue });\n          }, this);\n        }\n\n        if (this.isRejected) {\n          config.async(function(promise) {\n            invokeCallback('reject', thenPromise, fail, { detail: promise.rejectedReason });\n          }, this);\n        }\n\n        this.on('promise:resolved', function(event) {\n          invokeCallback('resolve', thenPromise, done, event);\n        });\n\n        this.on('promise:failed', function(event) {\n          invokeCallback('reject', thenPromise, fail, event);\n        });\n\n        return thenPromise;\n      },\n\n      fail: function(fail) {\n        return this.then(null, fail);\n      },\n\n      always: function(fail) {\n        return this.then(fail, fail);\n      }\n    };\n\n    EventTarget.mixin(Promise.prototype);\n\n    function resolve(promise, value) {\n      if (promise === value) {\n        fulfill(promise, value);\n      } else if (!handleThenable(promise, value)) {\n        fulfill(promise, value);\n      }\n    }\n\n    function handleThenable(promise, value) {\n      var then = null,\n      resolved;\n\n      try {\n        if (promise === value) {\n          throw new TypeError(\"A promises callback cannot return that same promise.\");\n        }\n\n        if (objectOrFunction(value)) {\n          then = value.then;\n\n          if (isFunction(then)) {\n            promise.on('promise:cancelled', function(event) {\n              if (isFunction(value.cancel)) {\n                value.cancel();\n              }\n            });\n            then.call(value, function(val) {\n              if (resolved) { return true; }\n              resolved = true;\n\n              if (value !== val) {\n                resolve(promise, val);\n              } else {\n                fulfill(promise, val);\n              }\n            }, function(val) {\n              if (resolved) { return true; }\n              resolved = true;\n\n              reject(promise, val);\n            });\n\n            return true;\n          }\n        }\n      } catch (error) {\n        reject(promise, error);\n        return true;\n      }\n\n      return false;\n    }\n\n    function fulfill(promise, value) {\n      config.async(function() {\n        if (promise.isFulfilled) { return; }\n        if (promise.isRejected) { return; }\n        promise.trigger('promise:resolved', { detail: value });\n        promise.isFulfilled = true;\n        promise.fulfillmentValue = value;\n      });\n    }\n\n    function reject(promise, value) {\n      config.async(function() {\n        if (promise.isFulfilled) { return; }\n        if (promise.isRejected) { return; }\n        promise.trigger('promise:failed', { detail: value });\n        promise.isRejected = true;\n        promise.rejectedReason = value;\n      });\n    }\n\n\n    __exports__.Promise = Promise;\n  });\ndefine(\"rsvp/queue\",\n  [\"rsvp/promise\",\"rsvp/resolve\",\"exports\"],\n  function(__dependency1__, __dependency2__, __exports__) {\n    \"use strict\";\n    var Promise = __dependency1__.Promise;\n    var resolve = __dependency2__.resolve;\n\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n    function ResolvedQueueError(message) {\n      this.name = \"resolved\";\n      if ((message !== undefined) && (typeof message !== \"string\")) {\n        throw new TypeError('You must pass a string.');\n      }\n      this.message = message || \"Default Message\";\n    }\n    ResolvedQueueError.prototype = new Error();\n    ResolvedQueueError.prototype.constructor = ResolvedQueueError;\n\n    var Queue = function(thenable) {\n      var queue = this,\n        promise_list = [],\n        promise,\n        fulfill,\n        reject,\n        resolved;\n\n      if (!(this instanceof Queue)) {\n        return new Queue();\n      }\n\n      function canceller() {\n        for (var i = promise_list.length; i > 0; i--) {\n          promise_list[i - 1].cancel();\n        }\n      }\n\n      function checkPromise(next_promise) {\n        promise_list.push(next_promise);\n        // Handle pop\n        promise_list.push(next_promise.then(function (fulfillmentValue) {\n          promise_list.splice(0, 2);\n          if (promise_list.length === 0) {\n            fulfill(fulfillmentValue);\n          } else {\n            return fulfillmentValue;\n          }\n        }, function (rejectedReason) {\n          promise_list.splice(0, 2);\n          if (promise_list.length === 0) {\n            reject(rejectedReason);\n          } else {\n            throw rejectedReason;\n          }\n        }));\n      }\n\n      promise = new Promise(function(done, fail) {\n        fulfill = function (fulfillmentValue) {\n          if (resolved) {return;}\n          queue.isFulfilled = true;\n          queue.fulfillmentValue = fulfillmentValue;\n          resolved = true;\n          return done(fulfillmentValue);\n        };\n        reject = function (rejectedReason) {\n          if (resolved) {return;}\n          queue.isRejected = true;\n          queue.rejectedReason = rejectedReason ;\n          resolved = true;\n          return fail(rejectedReason);\n        };\n      }, canceller);\n\n      checkPromise(resolve(thenable));\n\n      queue.cancel = function () {\n        if (resolved) {return;}\n        resolved = true;\n        promise.cancel();\n        promise.fail(function (rejectedReason) {\n          queue.isRejected = true;\n          queue.rejectedReason = rejectedReason;\n        });\n      };\n      queue.then = function () {\n        return promise.then.apply(promise, arguments);\n      };\n\n      queue.push = function(done, fail) {\n        var last_promise = promise_list[promise_list.length - 1],\n          next_promise;\n\n        if (resolved) {\n          throw new ResolvedQueueError();\n        }\n\n        // Handle pop\n        checkPromise(last_promise.then(done, fail));\n\n\n        return this;\n      };\n    };\n\n    Queue.prototype = Object.create(Promise.prototype);\n    Queue.prototype.constructor = Queue;\n\n\n    __exports__.Queue = Queue;\n    __exports__.ResolvedQueueError = ResolvedQueueError;\n  });\ndefine(\"rsvp/reject\",\n  [\"rsvp/promise\",\"exports\"],\n  function(__dependency1__, __exports__) {\n    \"use strict\";\n    var Promise = __dependency1__.Promise;\n\n    function reject(reason) {\n      return new Promise(function (resolve, reject) {\n        reject(reason);\n      });\n    }\n\n\n    __exports__.reject = reject;\n  });\ndefine(\"rsvp/resolve\",\n  [\"rsvp/promise\",\"exports\"],\n  function(__dependency1__, __exports__) {\n    \"use strict\";\n    var Promise = __dependency1__.Promise;\n\n    function resolve(thenable) {\n      return new Promise(function(resolve, reject) {\n        if (typeof thenable === \"object\" && thenable !== null) {\n          var then = thenable.then;\n          if ((then !== undefined) && (typeof then === \"function\")) {\n            return then.apply(thenable, [resolve, reject]);\n          }\n        }\n        return resolve(thenable);\n      }, function () {\n        if ((thenable !== undefined) && (thenable.cancel !== undefined)) {\n          thenable.cancel();\n        }\n      });\n    }\n\n\n    __exports__.resolve = resolve;\n  });\ndefine(\"rsvp/rethrow\",\n  [\"exports\"],\n  function(__exports__) {\n    \"use strict\";\n    var local = (typeof global === \"undefined\") ? this : global;\n\n    function rethrow(reason) {\n      local.setTimeout(function() {\n        throw reason;\n      });\n      throw reason;\n    }\n\n\n    __exports__.rethrow = rethrow;\n  });\ndefine(\"rsvp/timeout\",\n  [\"rsvp/promise\",\"exports\"],\n  function(__dependency1__, __exports__) {\n    \"use strict\";\n    var Promise = __dependency1__.Promise;\n\n    function promiseSetTimeout(millisecond, should_reject, message) {\n      var timeout_id;\n\n      function resolver(resolve, reject) {\n        timeout_id = setTimeout(function () {\n          if (should_reject) {\n            reject(message);\n          } else {\n            resolve(message);\n          }\n        }, millisecond);\n      }\n      function canceller() {\n        clearTimeout(timeout_id);\n      }\n      return new Promise(resolver, canceller);\n    }\n\n    function delay(millisecond, message) {\n      return promiseSetTimeout(millisecond, false, message);\n    }\n\n    function timeout(millisecond) {\n      return promiseSetTimeout(millisecond, true,\n                               \"Timed out after \" + millisecond + \" ms\");\n    }\n\n    Promise.prototype.delay = function(millisecond) {\n      return this.then(function (fulfillmentValue) {\n        return delay(millisecond, fulfillmentValue);\n      });\n    };\n\n\n    __exports__.delay = delay;\n    __exports__.timeout = timeout;\n  });\ndefine(\"rsvp\",\n  [\"rsvp/events\",\"rsvp/cancellation_error\",\"rsvp/promise\",\"rsvp/node\",\"rsvp/all\",\"rsvp/queue\",\"rsvp/timeout\",\"rsvp/hash\",\"rsvp/rethrow\",\"rsvp/defer\",\"rsvp/config\",\"rsvp/resolve\",\"rsvp/reject\",\"exports\"],\n  function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __exports__) {\n    \"use strict\";\n    var EventTarget = __dependency1__.EventTarget;\n    var CancellationError = __dependency2__.CancellationError;\n    var Promise = __dependency3__.Promise;\n    var denodeify = __dependency4__.denodeify;\n    var all = __dependency5__.all;\n    var any = __dependency5__.any;\n    var Queue = __dependency6__.Queue;\n    var ResolvedQueueError = __dependency6__.ResolvedQueueError;\n    var delay = __dependency7__.delay;\n    var timeout = __dependency7__.timeout;\n    var hash = __dependency8__.hash;\n    var rethrow = __dependency9__.rethrow;\n    var defer = __dependency10__.defer;\n    var config = __dependency11__.config;\n    var resolve = __dependency12__.resolve;\n    var reject = __dependency13__.reject;\n\n    function configure(name, value) {\n      config[name] = value;\n    }\n\n\n    __exports__.CancellationError = CancellationError;\n    __exports__.Promise = Promise;\n    __exports__.EventTarget = EventTarget;\n    __exports__.all = all;\n    __exports__.any = any;\n    __exports__.Queue = Queue;\n    __exports__.ResolvedQueueError = ResolvedQueueError;\n    __exports__.delay = delay;\n    __exports__.timeout = timeout;\n    __exports__.hash = hash;\n    __exports__.rethrow = rethrow;\n    __exports__.defer = defer;\n    __exports__.denodeify = denodeify;\n    __exports__.configure = configure;\n    __exports__.resolve = resolve;\n    __exports__.reject = reject;\n  });\nwindow.RSVP = requireModule(\"rsvp\");\n})(window);//! moment.js\n\n;(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, (function () { 'use strict';\n\n    var hookCallback;\n\n    function hooks () {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback (callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n    }\n\n    function isObject(input) {\n        // IE8 will treat undefined and null as object if it wasn't for\n        // input != null\n        return input != null && Object.prototype.toString.call(input) === '[object Object]';\n    }\n\n    function isObjectEmpty(obj) {\n        if (Object.getOwnPropertyNames) {\n            return (Object.getOwnPropertyNames(obj).length === 0);\n        } else {\n            var k;\n            for (k in obj) {\n                if (obj.hasOwnProperty(k)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n    }\n\n    function isUndefined(input) {\n        return input === void 0;\n    }\n\n    function isNumber(input) {\n        return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n    }\n\n    function isDate(input) {\n        return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n    }\n\n    function map(arr, fn) {\n        var res = [], i;\n        for (i = 0; i < arr.length; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function createUTC (input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty           : false,\n            unusedTokens    : [],\n            unusedInput     : [],\n            overflow        : -2,\n            charsLeftOver   : 0,\n            nullInput       : false,\n            invalidMonth    : null,\n            invalidFormat   : false,\n            userInvalidated : false,\n            iso             : false,\n            parsedDateParts : [],\n            meridiem        : null,\n            rfc2822         : false,\n            weekdayMismatch : false\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    var some;\n    if (Array.prototype.some) {\n        some = Array.prototype.some;\n    } else {\n        some = function (fun) {\n            var t = Object(this);\n            var len = t.length >>> 0;\n\n            for (var i = 0; i < len; i++) {\n                if (i in t && fun.call(this, t[i], i, t)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    function isValid(m) {\n        if (m._isValid == null) {\n            var flags = getParsingFlags(m);\n            var parsedParts = some.call(flags.parsedDateParts, function (i) {\n                return i != null;\n            });\n            var isNowValid = !isNaN(m._d.getTime()) &&\n                flags.overflow < 0 &&\n                !flags.empty &&\n                !flags.invalidMonth &&\n                !flags.invalidWeekday &&\n                !flags.weekdayMismatch &&\n                !flags.nullInput &&\n                !flags.invalidFormat &&\n                !flags.userInvalidated &&\n                (!flags.meridiem || (flags.meridiem && parsedParts));\n\n            if (m._strict) {\n                isNowValid = isNowValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n\n            if (Object.isFrozen == null || !Object.isFrozen(m)) {\n                m._isValid = isNowValid;\n            }\n            else {\n                return isNowValid;\n            }\n        }\n        return m._isValid;\n    }\n\n    function createInvalid (flags) {\n        var m = createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        }\n        else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    // Plugins that add properties should also add the key here (null value),\n    // so we can properly clone ourselves.\n    var momentProperties = hooks.momentProperties = [];\n\n    function copyConfig(to, from) {\n        var i, prop, val;\n\n        if (!isUndefined(from._isAMomentObject)) {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (!isUndefined(from._i)) {\n            to._i = from._i;\n        }\n        if (!isUndefined(from._f)) {\n            to._f = from._f;\n        }\n        if (!isUndefined(from._l)) {\n            to._l = from._l;\n        }\n        if (!isUndefined(from._strict)) {\n            to._strict = from._strict;\n        }\n        if (!isUndefined(from._tzm)) {\n            to._tzm = from._tzm;\n        }\n        if (!isUndefined(from._isUTC)) {\n            to._isUTC = from._isUTC;\n        }\n        if (!isUndefined(from._offset)) {\n            to._offset = from._offset;\n        }\n        if (!isUndefined(from._pf)) {\n            to._pf = getParsingFlags(from);\n        }\n        if (!isUndefined(from._locale)) {\n            to._locale = from._locale;\n        }\n\n        if (momentProperties.length > 0) {\n            for (i = 0; i < momentProperties.length; i++) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (!isUndefined(val)) {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    var updateInProgress = false;\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        if (!this.isValid()) {\n            this._d = new Date(NaN);\n        }\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment (obj) {\n        return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n    }\n\n    function absFloor (number) {\n        if (number < 0) {\n            // -0 -> 0\n            return Math.ceil(number) || 0;\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    // compare two arrays, return the number of differences\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if ((dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    function warn(msg) {\n        if (hooks.suppressDeprecationWarnings === false &&\n                (typeof console !==  'undefined') && console.warn) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (hooks.deprecationHandler != null) {\n                hooks.deprecationHandler(null, msg);\n            }\n            if (firstTime) {\n                var args = [];\n                var arg;\n                for (var i = 0; i < arguments.length; i++) {\n                    arg = '';\n                    if (typeof arguments[i] === 'object') {\n                        arg += '\\n[' + i + '] ';\n                        for (var key in arguments[0]) {\n                            arg += key + ': ' + arguments[0][key] + ', ';\n                        }\n                        arg = arg.slice(0, -2); // Remove trailing comma and space\n                    } else {\n                        arg = arguments[i];\n                    }\n                    args.push(arg);\n                }\n                warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(name, msg);\n        }\n        if (!deprecations[name]) {\n            warn(msg);\n            deprecations[name] = true;\n        }\n    }\n\n    hooks.suppressDeprecationWarnings = false;\n    hooks.deprecationHandler = null;\n\n    function isFunction(input) {\n        return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n    }\n\n    function set (config) {\n        var prop, i;\n        for (i in config) {\n            prop = config[i];\n            if (isFunction(prop)) {\n                this[i] = prop;\n            } else {\n                this['_' + i] = prop;\n            }\n        }\n        this._config = config;\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        this._dayOfMonthOrdinalParseLenient = new RegExp(\n            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n                '|' + (/\\d{1,2}/).source);\n    }\n\n    function mergeConfigs(parentConfig, childConfig) {\n        var res = extend({}, parentConfig), prop;\n        for (prop in childConfig) {\n            if (hasOwnProp(childConfig, prop)) {\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                    res[prop] = {};\n                    extend(res[prop], parentConfig[prop]);\n                    extend(res[prop], childConfig[prop]);\n                } else if (childConfig[prop] != null) {\n                    res[prop] = childConfig[prop];\n                } else {\n                    delete res[prop];\n                }\n            }\n        }\n        for (prop in parentConfig) {\n            if (hasOwnProp(parentConfig, prop) &&\n                    !hasOwnProp(childConfig, prop) &&\n                    isObject(parentConfig[prop])) {\n                // make sure changes to properties don't modify parent config\n                res[prop] = extend({}, res[prop]);\n            }\n        }\n        return res;\n    }\n\n    function Locale(config) {\n        if (config != null) {\n            this.set(config);\n        }\n    }\n\n    var keys;\n\n    if (Object.keys) {\n        keys = Object.keys;\n    } else {\n        keys = function (obj) {\n            var i, res = [];\n            for (i in obj) {\n                if (hasOwnProp(obj, i)) {\n                    res.push(i);\n                }\n            }\n            return res;\n        };\n    }\n\n    var defaultCalendar = {\n        sameDay : '[Today at] LT',\n        nextDay : '[Tomorrow at] LT',\n        nextWeek : 'dddd [at] LT',\n        lastDay : '[Yesterday at] LT',\n        lastWeek : '[Last] dddd [at] LT',\n        sameElse : 'L'\n    };\n\n    function calendar (key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\n    }\n\n    var defaultLongDateFormat = {\n        LTS  : 'h:mm:ss A',\n        LT   : 'h:mm A',\n        L    : 'MM/DD/YYYY',\n        LL   : 'MMMM D, YYYY',\n        LLL  : 'MMMM D, YYYY h:mm A',\n        LLLL : 'dddd, MMMM D, YYYY h:mm A'\n    };\n\n    function longDateFormat (key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()];\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n            return val.slice(1);\n        });\n\n        return this._longDateFormat[key];\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate () {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d';\n    var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n    function ordinal (number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    var defaultRelativeTime = {\n        future : 'in %s',\n        past   : '%s ago',\n        s  : 'a few seconds',\n        ss : '%d seconds',\n        m  : 'a minute',\n        mm : '%d minutes',\n        h  : 'an hour',\n        hh : '%d hours',\n        d  : 'a day',\n        dd : '%d days',\n        M  : 'a month',\n        MM : '%d months',\n        y  : 'a year',\n        yy : '%d years'\n    };\n\n    function relativeTime (number, withoutSuffix, string, isFuture) {\n        var output = this._relativeTime[string];\n        return (isFunction(output)) ?\n            output(number, withoutSuffix, string, isFuture) :\n            output.replace(/%d/i, number);\n    }\n\n    function pastFuture (diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n    }\n\n    var aliases = {};\n\n    function addUnitAlias (unit, shorthand) {\n        var lowerCase = unit.toLowerCase();\n        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n    }\n\n    function normalizeUnits(units) {\n        return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    var priorities = {};\n\n    function addUnitPriority(unit, priority) {\n        priorities[unit] = priority;\n    }\n\n    function getPrioritizedUnits(unitsObj) {\n        var units = [];\n        for (var u in unitsObj) {\n            units.push({unit: u, priority: priorities[u]});\n        }\n        units.sort(function (a, b) {\n            return a.priority - b.priority;\n        });\n        return units;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n    }\n\n    var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n    var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n    var formatFunctions = {};\n\n    var formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken (token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(func.apply(this, arguments), token);\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens), i, length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '', i;\n            for (i = 0; i < length; i++) {\n                output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var match1         = /\\d/;            //       0 - 9\n    var match2         = /\\d\\d/;          //      00 - 99\n    var match3         = /\\d{3}/;         //     000 - 999\n    var match4         = /\\d{4}/;         //    0000 - 9999\n    var match6         = /[+-]?\\d{6}/;    // -999999 - 999999\n    var match1to2      = /\\d\\d?/;         //       0 - 99\n    var match3to4      = /\\d\\d\\d\\d?/;     //     999 - 9999\n    var match5to6      = /\\d\\d\\d\\d\\d\\d?/; //   99999 - 999999\n    var match1to3      = /\\d{1,3}/;       //       0 - 999\n    var match1to4      = /\\d{1,4}/;       //       0 - 9999\n    var match1to6      = /[+-]?\\d{1,6}/;  // -999999 - 999999\n\n    var matchUnsigned  = /\\d+/;           //       0 - inf\n    var matchSigned    = /[+-]?\\d+/;      //    -inf - inf\n\n    var matchOffset    = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n    var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n    var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n    // any word (or two) characters or numbers including two/three word month in arabic.\n    // includes scottish gaelic two word and hyphenated months\n    var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n\n    var regexes = {};\n\n    function addRegexToken (token, regex, strictRegex) {\n        regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n            return (isStrict && strictRegex) ? strictRegex : regex;\n        };\n    }\n\n    function getParseRegexForToken (token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n            return p1 || p2 || p3 || p4;\n        }));\n    }\n\n    function regexEscape(s) {\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    var tokens = {};\n\n    function addParseToken (token, callback) {\n        var i, func = callback;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (isNumber(callback)) {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        for (i = 0; i < token.length; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken (token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    var YEAR = 0;\n    var MONTH = 1;\n    var DATE = 2;\n    var HOUR = 3;\n    var MINUTE = 4;\n    var SECOND = 5;\n    var MILLISECOND = 6;\n    var WEEK = 7;\n    var WEEKDAY = 8;\n\n    // FORMATTING\n\n    addFormatToken('Y', 0, 0, function () {\n        var y = this.year();\n        return y <= 9999 ? '' + y : '+' + y;\n    });\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY',   4],       0, 'year');\n    addFormatToken(0, ['YYYYY',  5],       0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // ALIASES\n\n    addUnitAlias('year', 'y');\n\n    // PRIORITIES\n\n    addUnitPriority('year', 1);\n\n    // PARSING\n\n    addRegexToken('Y',      matchSigned);\n    addRegexToken('YY',     match1to2, match2);\n    addRegexToken('YYYY',   match1to4, match4);\n    addRegexToken('YYYYY',  match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = hooks.parseTwoDigitYear(input);\n    });\n    addParseToken('Y', function (input, array) {\n        array[YEAR] = parseInt(input, 10);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    // HOOKS\n\n    hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', true);\n\n    function getIsLeapYear () {\n        return isLeapYear(this.year());\n    }\n\n    function makeGetSet (unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                set$1(this, unit, value);\n                hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get(this, unit);\n            }\n        };\n    }\n\n    function get (mom, unit) {\n        return mom.isValid() ?\n            mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n    }\n\n    function set$1 (mom, unit, value) {\n        if (mom.isValid() && !isNaN(value)) {\n            if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n            }\n            else {\n                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function stringGet (units) {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units]();\n        }\n        return this;\n    }\n\n\n    function stringSet (units, value) {\n        if (typeof units === 'object') {\n            units = normalizeObjectUnits(units);\n            var prioritized = getPrioritizedUnits(units);\n            for (var i = 0; i < prioritized.length; i++) {\n                this[prioritized[i].unit](units[prioritized[i].unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (isFunction(this[units])) {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    function mod(n, x) {\n        return ((n % x) + x) % x;\n    }\n\n    var indexOf;\n\n    if (Array.prototype.indexOf) {\n        indexOf = Array.prototype.indexOf;\n    } else {\n        indexOf = function (o) {\n            // I know\n            var i;\n            for (i = 0; i < this.length; ++i) {\n                if (this[i] === o) {\n                    return i;\n                }\n            }\n            return -1;\n        };\n    }\n\n    function daysInMonth(year, month) {\n        if (isNaN(year) || isNaN(month)) {\n            return NaN;\n        }\n        var modMonth = mod(month, 12);\n        year += (month - modMonth) / 12;\n        return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // ALIASES\n\n    addUnitAlias('month', 'M');\n\n    // PRIORITY\n\n    addUnitPriority('month', 8);\n\n    // PARSING\n\n    addRegexToken('M',    match1to2);\n    addRegexToken('MM',   match1to2, match2);\n    addRegexToken('MMM',  function (isStrict, locale) {\n        return locale.monthsShortRegex(isStrict);\n    });\n    addRegexToken('MMMM', function (isStrict, locale) {\n        return locale.monthsRegex(isStrict);\n    });\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n    var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n    function localeMonths (m, format) {\n        if (!m) {\n            return isArray(this._months) ? this._months :\n                this._months['standalone'];\n        }\n        return isArray(this._months) ? this._months[m.month()] :\n            this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n    }\n\n    var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n    function localeMonthsShort (m, format) {\n        if (!m) {\n            return isArray(this._monthsShort) ? this._monthsShort :\n                this._monthsShort['standalone'];\n        }\n        return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n            this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n    }\n\n    function handleStrictParse(monthName, format, strict) {\n        var i, ii, mom, llc = monthName.toLocaleLowerCase();\n        if (!this._monthsParse) {\n            // this is not used\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n            for (i = 0; i < 12; ++i) {\n                mom = createUTC([2000, i]);\n                this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeMonthsParse (monthName, format, strict) {\n        var i, mom, regex;\n\n        if (this._monthsParseExact) {\n            return handleStrictParse.call(this, monthName, format, strict);\n        }\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        // TODO: add sorting\n        // Sorting makes sure if one month (or abbr) is a prefix of another\n        // see sorting in computeMonthsParse\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n                this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n                return i;\n            } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth (mom, value) {\n        var dayOfMonth;\n\n        if (!mom.isValid()) {\n            // No op\n            return mom;\n        }\n\n        if (typeof value === 'string') {\n            if (/^\\d+$/.test(value)) {\n                value = toInt(value);\n            } else {\n                value = mom.localeData().monthsParse(value);\n                // TODO: Another silent failure?\n                if (!isNumber(value)) {\n                    return mom;\n                }\n            }\n        }\n\n        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n        return mom;\n    }\n\n    function getSetMonth (value) {\n        if (value != null) {\n            setMonth(this, value);\n            hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth () {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    var defaultMonthsShortRegex = matchWord;\n    function monthsShortRegex (isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsShortStrictRegex;\n            } else {\n                return this._monthsShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\n                this._monthsShortRegex = defaultMonthsShortRegex;\n            }\n            return this._monthsShortStrictRegex && isStrict ?\n                this._monthsShortStrictRegex : this._monthsShortRegex;\n        }\n    }\n\n    var defaultMonthsRegex = matchWord;\n    function monthsRegex (isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsStrictRegex;\n            } else {\n                return this._monthsRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                this._monthsRegex = defaultMonthsRegex;\n            }\n            return this._monthsStrictRegex && isStrict ?\n                this._monthsStrictRegex : this._monthsRegex;\n        }\n    }\n\n    function computeMonthsParse () {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var shortPieces = [], longPieces = [], mixedPieces = [],\n            i, mom;\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            shortPieces.push(this.monthsShort(mom, ''));\n            longPieces.push(this.months(mom, ''));\n            mixedPieces.push(this.months(mom, ''));\n            mixedPieces.push(this.monthsShort(mom, ''));\n        }\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\n        // will match the longer piece.\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n        for (i = 0; i < 12; i++) {\n            shortPieces[i] = regexEscape(shortPieces[i]);\n            longPieces[i] = regexEscape(longPieces[i]);\n        }\n        for (i = 0; i < 24; i++) {\n            mixedPieces[i] = regexEscape(mixedPieces[i]);\n        }\n\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._monthsShortRegex = this._monthsRegex;\n        this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n        this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n    }\n\n    function createDate (y, m, d, h, M, s, ms) {\n        // can't just apply() to create a date:\n        // https://stackoverflow.com/q/181348\n        var date = new Date(y, m, d, h, M, s, ms);\n\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n            date.setFullYear(y);\n        }\n        return date;\n    }\n\n    function createUTCDate (y) {\n        var date = new Date(Date.UTC.apply(null, arguments));\n\n        // the Date.UTC function remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n            date.setUTCFullYear(y);\n        }\n        return date;\n    }\n\n    // start-of-first-week - start-of-year\n    function firstWeekOffset(year, dow, doy) {\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n            fwd = 7 + dow - doy,\n            // first-week day local weekday -- which local weekday is fwd\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n        return -fwdlw + fwd - 1;\n    }\n\n    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n        var localWeekday = (7 + weekday - dow) % 7,\n            weekOffset = firstWeekOffset(year, dow, doy),\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n            resYear, resDayOfYear;\n\n        if (dayOfYear <= 0) {\n            resYear = year - 1;\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\n        } else if (dayOfYear > daysInYear(year)) {\n            resYear = year + 1;\n            resDayOfYear = dayOfYear - daysInYear(year);\n        } else {\n            resYear = year;\n            resDayOfYear = dayOfYear;\n        }\n\n        return {\n            year: resYear,\n            dayOfYear: resDayOfYear\n        };\n    }\n\n    function weekOfYear(mom, dow, doy) {\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n            resWeek, resYear;\n\n        if (week < 1) {\n            resYear = mom.year() - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\n            resYear = mom.year() + 1;\n        } else {\n            resYear = mom.year();\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear\n        };\n    }\n\n    function weeksInYear(year, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n    }\n\n    // FORMATTING\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // ALIASES\n\n    addUnitAlias('week', 'w');\n    addUnitAlias('isoWeek', 'W');\n\n    // PRIORITIES\n\n    addUnitPriority('week', 5);\n    addUnitPriority('isoWeek', 5);\n\n    // PARSING\n\n    addRegexToken('w',  match1to2);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W',  match1to2);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n        week[token.substr(0, 1)] = toInt(input);\n    });\n\n    // HELPERS\n\n    // LOCALES\n\n    function localeWeek (mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek () {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear () {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek (input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek (input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n\n    // ALIASES\n\n    addUnitAlias('day', 'd');\n    addUnitAlias('weekday', 'e');\n    addUnitAlias('isoWeekday', 'E');\n\n    // PRIORITY\n    addUnitPriority('day', 11);\n    addUnitPriority('weekday', 11);\n    addUnitPriority('isoWeekday', 11);\n\n    // PARSING\n\n    addRegexToken('d',    match1to2);\n    addRegexToken('e',    match1to2);\n    addRegexToken('E',    match1to2);\n    addRegexToken('dd',   function (isStrict, locale) {\n        return locale.weekdaysMinRegex(isStrict);\n    });\n    addRegexToken('ddd',   function (isStrict, locale) {\n        return locale.weekdaysShortRegex(isStrict);\n    });\n    addRegexToken('dddd',   function (isStrict, locale) {\n        return locale.weekdaysRegex(isStrict);\n    });\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    function parseIsoWeekday(input, locale) {\n        if (typeof input === 'string') {\n            return locale.weekdaysParse(input) % 7 || 7;\n        }\n        return isNaN(input) ? null : input;\n    }\n\n    // LOCALES\n\n    var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n    function localeWeekdays (m, format) {\n        if (!m) {\n            return isArray(this._weekdays) ? this._weekdays :\n                this._weekdays['standalone'];\n        }\n        return isArray(this._weekdays) ? this._weekdays[m.day()] :\n            this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\n    }\n\n    var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n    function localeWeekdaysShort (m) {\n        return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n    }\n\n    var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n    function localeWeekdaysMin (m) {\n        return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n    }\n\n    function handleStrictParse$1(weekdayName, format, strict) {\n        var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._minWeekdaysParse = [];\n\n            for (i = 0; i < 7; ++i) {\n                mom = createUTC([2000, 1]).day(i);\n                this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n                this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeWeekdaysParse (weekdayName, format, strict) {\n        var i, mom, regex;\n\n        if (this._weekdaysParseExact) {\n            return handleStrictParse$1.call(this, weekdayName, format, strict);\n        }\n\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._minWeekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._fullWeekdaysParse = [];\n        }\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n\n            mom = createUTC([2000, 1]).day(i);\n            if (strict && !this._fullWeekdaysParse[i]) {\n                this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\n                this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\n                this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\n            }\n            if (!this._weekdaysParse[i]) {\n                regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n                return i;\n            } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n                return i;\n            } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n                return i;\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek (input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek (input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek (input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n\n        if (input != null) {\n            var weekday = parseIsoWeekday(input, this.localeData());\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\n        } else {\n            return this.day() || 7;\n        }\n    }\n\n    var defaultWeekdaysRegex = matchWord;\n    function weekdaysRegex (isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysStrictRegex;\n            } else {\n                return this._weekdaysRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                this._weekdaysRegex = defaultWeekdaysRegex;\n            }\n            return this._weekdaysStrictRegex && isStrict ?\n                this._weekdaysStrictRegex : this._weekdaysRegex;\n        }\n    }\n\n    var defaultWeekdaysShortRegex = matchWord;\n    function weekdaysShortRegex (isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysShortStrictRegex;\n            } else {\n                return this._weekdaysShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n            }\n            return this._weekdaysShortStrictRegex && isStrict ?\n                this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n        }\n    }\n\n    var defaultWeekdaysMinRegex = matchWord;\n    function weekdaysMinRegex (isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysMinStrictRegex;\n            } else {\n                return this._weekdaysMinRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n            }\n            return this._weekdaysMinStrictRegex && isStrict ?\n                this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n        }\n    }\n\n\n    function computeWeekdaysParse () {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n            i, mom, minp, shortp, longp;\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, 1]).day(i);\n            minp = this.weekdaysMin(mom, '');\n            shortp = this.weekdaysShort(mom, '');\n            longp = this.weekdays(mom, '');\n            minPieces.push(minp);\n            shortPieces.push(shortp);\n            longPieces.push(longp);\n            mixedPieces.push(minp);\n            mixedPieces.push(shortp);\n            mixedPieces.push(longp);\n        }\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n        // will match the longer piece.\n        minPieces.sort(cmpLenRev);\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n        for (i = 0; i < 7; i++) {\n            shortPieces[i] = regexEscape(shortPieces[i]);\n            longPieces[i] = regexEscape(longPieces[i]);\n            mixedPieces[i] = regexEscape(mixedPieces[i]);\n        }\n\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._weekdaysShortRegex = this._weekdaysRegex;\n        this._weekdaysMinRegex = this._weekdaysRegex;\n\n        this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n        this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n        this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n    }\n\n    // FORMATTING\n\n    function hFormat() {\n        return this.hours() % 12 || 12;\n    }\n\n    function kFormat() {\n        return this.hours() || 24;\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, hFormat);\n    addFormatToken('k', ['kk', 2], 0, kFormat);\n\n    addFormatToken('hmm', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('hmmss', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2);\n    });\n\n    addFormatToken('Hmm', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('Hmmss', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2);\n    });\n\n    function meridiem (token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // ALIASES\n\n    addUnitAlias('hour', 'h');\n\n    // PRIORITY\n    addUnitPriority('hour', 13);\n\n    // PARSING\n\n    function matchMeridiem (isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a',  matchMeridiem);\n    addRegexToken('A',  matchMeridiem);\n    addRegexToken('H',  match1to2);\n    addRegexToken('h',  match1to2);\n    addRegexToken('k',  match1to2);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n    addRegexToken('kk', match1to2, match2);\n\n    addRegexToken('hmm', match3to4);\n    addRegexToken('hmmss', match5to6);\n    addRegexToken('Hmm', match3to4);\n    addRegexToken('Hmmss', match5to6);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['k', 'kk'], function (input, array, config) {\n        var kInput = toInt(input);\n        array[HOUR] = kInput === 24 ? 0 : kInput;\n    });\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmmss', function (input, array, config) {\n        var pos1 = input.length - 4;\n        var pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('Hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n    });\n    addParseToken('Hmmss', function (input, array, config) {\n        var pos1 = input.length - 4;\n        var pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n    });\n\n    // LOCALES\n\n    function localeIsPM (input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return ((input + '').toLowerCase().charAt(0) === 'p');\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n    function localeMeridiem (hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n\n    // MOMENTS\n\n    // Setting the hour should keep the time, because the user explicitly\n    // specified which hour they want. So trying to maintain the same hour (in\n    // a new timezone) makes sense. Adding/subtracting hours does not follow\n    // this rule.\n    var getSetHour = makeGetSet('Hours', true);\n\n    var baseConfig = {\n        calendar: defaultCalendar,\n        longDateFormat: defaultLongDateFormat,\n        invalidDate: defaultInvalidDate,\n        ordinal: defaultOrdinal,\n        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n        relativeTime: defaultRelativeTime,\n\n        months: defaultLocaleMonths,\n        monthsShort: defaultLocaleMonthsShort,\n\n        week: defaultLocaleWeek,\n\n        weekdays: defaultLocaleWeekdays,\n        weekdaysMin: defaultLocaleWeekdaysMin,\n        weekdaysShort: defaultLocaleWeekdaysShort,\n\n        meridiemParse: defaultLocaleMeridiemParse\n    };\n\n    // internal storage for locale config files\n    var locales = {};\n    var localeFamilies = {};\n    var globalLocale;\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0, j, next, locale, split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return globalLocale;\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (!locales[name] && (typeof module !== 'undefined') &&\n                module && module.exports) {\n            try {\n                oldLocale = globalLocale._abbr;\n                var aliasedRequire = require;\n                aliasedRequire('./locale/' + name);\n                getSetGlobalLocale(oldLocale);\n            } catch (e) {}\n        }\n        return locales[name];\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function getSetGlobalLocale (key, values) {\n        var data;\n        if (key) {\n            if (isUndefined(values)) {\n                data = getLocale(key);\n            }\n            else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            }\n            else {\n                if ((typeof console !==  'undefined') && console.warn) {\n                    //warn user if arguments are passed but the locale could not be set\n                    console.warn('Locale ' + key +  ' not found. Did you forget to load it?');\n                }\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale (name, config) {\n        if (config !== null) {\n            var locale, parentConfig = baseConfig;\n            config.abbr = name;\n            if (locales[name] != null) {\n                deprecateSimple('defineLocaleOverride',\n                        'use moment.updateLocale(localeName, config) to change ' +\n                        'an existing locale. moment.defineLocale(localeName, ' +\n                        'config) should only be used for creating a new locale ' +\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n                parentConfig = locales[name]._config;\n            } else if (config.parentLocale != null) {\n                if (locales[config.parentLocale] != null) {\n                    parentConfig = locales[config.parentLocale]._config;\n                } else {\n                    locale = loadLocale(config.parentLocale);\n                    if (locale != null) {\n                        parentConfig = locale._config;\n                    } else {\n                        if (!localeFamilies[config.parentLocale]) {\n                            localeFamilies[config.parentLocale] = [];\n                        }\n                        localeFamilies[config.parentLocale].push({\n                            name: name,\n                            config: config\n                        });\n                        return null;\n                    }\n                }\n            }\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n            if (localeFamilies[name]) {\n                localeFamilies[name].forEach(function (x) {\n                    defineLocale(x.name, x.config);\n                });\n            }\n\n            // backwards compat for now: also set the locale\n            // make sure we set the locale AFTER all child locales have been\n            // created, so we won't end up with the child locale set.\n            getSetGlobalLocale(name);\n\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    function updateLocale(name, config) {\n        if (config != null) {\n            var locale, tmpLocale, parentConfig = baseConfig;\n            // MERGE\n            tmpLocale = loadLocale(name);\n            if (tmpLocale != null) {\n                parentConfig = tmpLocale._config;\n            }\n            config = mergeConfigs(parentConfig, config);\n            locale = new Locale(config);\n            locale.parentLocale = locales[name];\n            locales[name] = locale;\n\n            // backwards compat for now: also set the locale\n            getSetGlobalLocale(name);\n        } else {\n            // pass null for config to unupdate, useful for tests\n            if (locales[name] != null) {\n                if (locales[name].parentLocale != null) {\n                    locales[name] = locales[name].parentLocale;\n                } else if (locales[name] != null) {\n                    delete locales[name];\n                }\n            }\n        }\n        return locales[name];\n    }\n\n    // returns locale data\n    function getLocale (key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    function listLocales() {\n        return keys(locales);\n    }\n\n    function checkOverflow (m) {\n        var overflow;\n        var a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :\n                a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n                a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n                a[MINUTE]      < 0 || a[MINUTE]      > 59  ? MINUTE :\n                a[SECOND]      < 0 || a[SECOND]      > 59  ? SECOND :\n                a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n                -1;\n\n            if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n                overflow = DATE;\n            }\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n                overflow = WEEK;\n            }\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n                overflow = WEEKDAY;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config) {\n        // hooks is actually the exported moment object\n        var nowValue = new Date(hooks.now());\n        if (config._useUTC) {\n            return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n        }\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n    }\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray (config) {\n        var i, date, input = [], currentDate, expectedWeekday, yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear != null) {\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n            if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (config._a[HOUR] === 24 &&\n                config._a[MINUTE] === 0 &&\n                config._a[SECOND] === 0 &&\n                config._a[MILLISECOND] === 0) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n        expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();\n\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n\n        // check for mismatching day of week\n        if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n            getParsingFlags(config).weekdayMismatch = true;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n            if (weekday < 1 || weekday > 7) {\n                weekdayOverflow = true;\n            }\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            var curWeek = weekOfYear(createLocal(), dow, doy);\n\n            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n            // Default to current week.\n            week = defaults(w.w, curWeek.week);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < 0 || weekday > 6) {\n                    weekdayOverflow = true;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from begining of week\n                weekday = w.e + dow;\n                if (w.e < 0 || w.e > 6) {\n                    weekdayOverflow = true;\n                }\n            } else {\n                // default to begining of week\n                weekday = dow;\n            }\n        }\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n            getParsingFlags(config)._overflowWeeks = true;\n        } else if (weekdayOverflow != null) {\n            getParsingFlags(config)._overflowWeekday = true;\n        } else {\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n            config._a[YEAR] = temp.year;\n            config._dayOfYear = temp.dayOfYear;\n        }\n    }\n\n    // iso 8601 regex\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n    var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n    var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n    var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\n    var isoDates = [\n        ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n        ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n        ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n        ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n        ['YYYY-DDD', /\\d{4}-\\d{3}/],\n        ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n        ['YYYYYYMMDD', /[+-]\\d{10}/],\n        ['YYYYMMDD', /\\d{8}/],\n        // YYYYMM is NOT allowed by the standard\n        ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n        ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n        ['YYYYDDD', /\\d{7}/]\n    ];\n\n    // iso time formats and regexes\n    var isoTimes = [\n        ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n        ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n        ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n        ['HH:mm', /\\d\\d:\\d\\d/],\n        ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n        ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n        ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n        ['HHmm', /\\d\\d\\d\\d/],\n        ['HH', /\\d\\d/]\n    ];\n\n    var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n    // date from iso format\n    function configFromISO(config) {\n        var i, l,\n            string = config._i,\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n            allowTime, dateFormat, timeFormat, tzFormat;\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n\n            for (i = 0, l = isoDates.length; i < l; i++) {\n                if (isoDates[i][1].exec(match[1])) {\n                    dateFormat = isoDates[i][0];\n                    allowTime = isoDates[i][2] !== false;\n                    break;\n                }\n            }\n            if (dateFormat == null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[3]) {\n                for (i = 0, l = isoTimes.length; i < l; i++) {\n                    if (isoTimes[i][1].exec(match[3])) {\n                        // match[2] should be 'T' or space\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                        break;\n                    }\n                }\n                if (timeFormat == null) {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            if (!allowTime && timeFormat != null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[4]) {\n                if (tzRegex.exec(match[4])) {\n                    tzFormat = 'Z';\n                } else {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n    var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n    function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n        var result = [\n            untruncateYear(yearStr),\n            defaultLocaleMonthsShort.indexOf(monthStr),\n            parseInt(dayStr, 10),\n            parseInt(hourStr, 10),\n            parseInt(minuteStr, 10)\n        ];\n\n        if (secondStr) {\n            result.push(parseInt(secondStr, 10));\n        }\n\n        return result;\n    }\n\n    function untruncateYear(yearStr) {\n        var year = parseInt(yearStr, 10);\n        if (year <= 49) {\n            return 2000 + year;\n        } else if (year <= 999) {\n            return 1900 + year;\n        }\n        return year;\n    }\n\n    function preprocessRFC2822(s) {\n        // Remove comments and folding whitespace and replace multiple-spaces with a single space\n        return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').trim();\n    }\n\n    function checkWeekday(weekdayStr, parsedInput, config) {\n        if (weekdayStr) {\n            // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n                weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n            if (weekdayProvided !== weekdayActual) {\n                getParsingFlags(config).weekdayMismatch = true;\n                config._isValid = false;\n                return false;\n            }\n        }\n        return true;\n    }\n\n    var obsOffsets = {\n        UT: 0,\n        GMT: 0,\n        EDT: -4 * 60,\n        EST: -5 * 60,\n        CDT: -5 * 60,\n        CST: -6 * 60,\n        MDT: -6 * 60,\n        MST: -7 * 60,\n        PDT: -7 * 60,\n        PST: -8 * 60\n    };\n\n    function calculateOffset(obsOffset, militaryOffset, numOffset) {\n        if (obsOffset) {\n            return obsOffsets[obsOffset];\n        } else if (militaryOffset) {\n            // the only allowed military tz is Z\n            return 0;\n        } else {\n            var hm = parseInt(numOffset, 10);\n            var m = hm % 100, h = (hm - m) / 100;\n            return h * 60 + m;\n        }\n    }\n\n    // date and time from ref 2822 format\n    function configFromRFC2822(config) {\n        var match = rfc2822.exec(preprocessRFC2822(config._i));\n        if (match) {\n            var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n            if (!checkWeekday(match[1], parsedArray, config)) {\n                return;\n            }\n\n            config._a = parsedArray;\n            config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n            config._d = createUTCDate.apply(null, config._a);\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n            getParsingFlags(config).rfc2822 = true;\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from iso format or fallback\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        configFromRFC2822(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        // Final attempt, use Input Fallback\n        hooks.createFromInputFallback(config);\n    }\n\n    hooks.createFromInputFallback = deprecate(\n        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n        'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n        'discouraged and will be removed in an upcoming major release. Please refer to ' +\n        'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    // constant that refers to the ISO standard\n    hooks.ISO_8601 = function () {};\n\n    // constant that refers to the RFC 2822 form\n    hooks.RFC_2822 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n        if (config._f === hooks.RFC_2822) {\n            configFromRFC2822(config);\n            return;\n        }\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i, parsedInput, tokens, token, skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0;\n\n        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n        for (i = 0; i < tokens.length; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n            // console.log('token', token, 'parsedInput', parsedInput,\n            //         'regex', getParseRegexForToken(token, config));\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                }\n                else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            }\n            else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (config._a[HOUR] <= 12 &&\n            getParsingFlags(config).bigHour === true &&\n            config._a[HOUR] > 0) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\n        getParsingFlags(config).meridiem = config._meridiem;\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n\n    function meridiemFixWrap (locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    // date from string and array of format strings\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n\n            scoreToBeat,\n            i,\n            currentScore;\n\n        if (config._f.length === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < config._f.length; i++) {\n            currentScore = 0;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (!isValid(tempConfig)) {\n                continue;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (scoreToBeat == null || currentScore < scoreToBeat) {\n                scoreToBeat = currentScore;\n                bestMoment = tempConfig;\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i);\n        config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n            return obj && parseInt(obj, 10);\n        });\n\n        configFromArray(config);\n    }\n\n    function createFromConfig (config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig (config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return createInvalid({nullInput: true});\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isDate(input)) {\n            config._d = input;\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (format) {\n            configFromStringAndFormat(config);\n        }  else {\n            configFromInput(config);\n        }\n\n        if (!isValid(config)) {\n            config._d = null;\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (isUndefined(input)) {\n            config._d = new Date(hooks.now());\n        } else if (isDate(input)) {\n            config._d = new Date(input.valueOf());\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (isObject(input)) {\n            configFromObject(config);\n        } else if (isNumber(input)) {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC (input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (locale === true || locale === false) {\n            strict = locale;\n            locale = undefined;\n        }\n\n        if ((isObject(input) && isObjectEmpty(input)) ||\n                (isArray(input) && input.length === 0)) {\n            input = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function createLocal (input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n        'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n        function () {\n            var other = createLocal.apply(null, arguments);\n            if (this.isValid() && other.isValid()) {\n                return other < this ? this : other;\n            } else {\n                return createInvalid();\n            }\n        }\n    );\n\n    var prototypeMax = deprecate(\n        'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n        function () {\n            var other = createLocal.apply(null, arguments);\n            if (this.isValid() && other.isValid()) {\n                return other > this ? this : other;\n            } else {\n                return createInvalid();\n            }\n        }\n    );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return createLocal();\n        }\n        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min () {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max () {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    var now = function () {\n        return Date.now ? Date.now() : +(new Date());\n    };\n\n    var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n    function isDurationValid(m) {\n        for (var key in m) {\n            if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n                return false;\n            }\n        }\n\n        var unitHasDecimal = false;\n        for (var i = 0; i < ordering.length; ++i) {\n            if (m[ordering[i]]) {\n                if (unitHasDecimal) {\n                    return false; // only allow non-integers for smallest unit\n                }\n                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n                    unitHasDecimal = true;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    function isValid$1() {\n        return this._isValid;\n    }\n\n    function createInvalid$1() {\n        return createDuration(NaN);\n    }\n\n    function Duration (duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        this._isValid = isDurationValid(normalizedInput);\n\n        // representation for dateAddRemove\n        this._milliseconds = +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days +\n            weeks * 7;\n        // It is impossible to translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months +\n            quarters * 3 +\n            years * 12;\n\n        this._data = {};\n\n        this._locale = getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration (obj) {\n        return obj instanceof Duration;\n    }\n\n    function absRound (number) {\n        if (number < 0) {\n            return Math.round(-1 * number) * -1;\n        } else {\n            return Math.round(number);\n        }\n    }\n\n    // FORMATTING\n\n    function offset (token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset();\n            var sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z',  matchShortOffset);\n    addRegexToken('ZZ', matchShortOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        config._useUTC = true;\n        config._tzm = offsetFromString(matchShortOffset, input);\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(matcher, string) {\n        var matches = (string || '').match(matcher);\n\n        if (matches === null) {\n            return null;\n        }\n\n        var chunk   = matches[matches.length - 1] || [];\n        var parts   = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        return minutes === 0 ?\n          0 :\n          parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(res._d.valueOf() + diff);\n            hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return createLocal(input).local();\n        }\n    }\n\n    function getDateOffset (m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset (input, keepLocalTime, keepMinutes) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(matchShortOffset, input);\n                if (input === null) {\n                    return this;\n                }\n            } else if (Math.abs(input) < 16 && !keepMinutes) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone (input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC (keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal (keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset () {\n        if (this._tzm != null) {\n            this.utcOffset(this._tzm, false, true);\n        } else if (typeof this._i === 'string') {\n            var tZone = offsetFromString(matchOffset, this._i);\n            if (tZone != null) {\n                this.utcOffset(tZone);\n            }\n            else {\n                this.utcOffset(0, true);\n            }\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset (input) {\n        if (!this.isValid()) {\n            return false;\n        }\n        input = input ? createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime () {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted () {\n        if (!isUndefined(this._isDSTShifted)) {\n            return this._isDSTShifted;\n        }\n\n        var c = {};\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n            this._isDSTShifted = this.isValid() &&\n                compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal () {\n        return this.isValid() ? !this._isUTC : false;\n    }\n\n    function isUtcOffset () {\n        return this.isValid() ? this._isUTC : false;\n    }\n\n    function isUtc () {\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\n    }\n\n    // ASP.NET json date format regex\n    var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n    // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n    // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n    // and further modified to allow for strings containing both week and day\n    var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n    function createDuration (input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms : input._milliseconds,\n                d  : input._days,\n                M  : input._months\n            };\n        } else if (isNumber(input)) {\n            duration = {};\n            if (key) {\n                duration[key] = input;\n            } else {\n                duration.milliseconds = input;\n            }\n        } else if (!!(match = aspNetRegex.exec(input))) {\n            sign = (match[1] === '-') ? -1 : 1;\n            duration = {\n                y  : 0,\n                d  : toInt(match[DATE])                         * sign,\n                h  : toInt(match[HOUR])                         * sign,\n                m  : toInt(match[MINUTE])                       * sign,\n                s  : toInt(match[SECOND])                       * sign,\n                ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n            };\n        } else if (!!(match = isoRegex.exec(input))) {\n            sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;\n            duration = {\n                y : parseIso(match[2], sign),\n                M : parseIso(match[3], sign),\n                w : parseIso(match[4], sign),\n                d : parseIso(match[5], sign),\n                h : parseIso(match[6], sign),\n                m : parseIso(match[7], sign),\n                s : parseIso(match[8], sign)\n            };\n        } else if (duration == null) {// checks for null or undefined\n            duration = {};\n        } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n            diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        return ret;\n    }\n\n    createDuration.fn = Duration.prototype;\n    createDuration.invalid = createInvalid$1;\n\n    function parseIso (inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {milliseconds: 0, months: 0};\n\n        res.months = other.month() - base.month() +\n            (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        if (!(base.isValid() && other.isValid())) {\n            return {milliseconds: 0, months: 0};\n        }\n\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    // TODO: remove 'name' arg after deprecation is removed\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(name, 'moment().' + name  + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n                'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n                tmp = val; val = period; period = tmp;\n            }\n\n            val = typeof val === 'string' ? +val : val;\n            dur = createDuration(val, period);\n            addSubtract(this, dur, direction);\n            return this;\n        };\n    }\n\n    function addSubtract (mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = absRound(duration._days),\n            months = absRound(duration._months);\n\n        if (!mom.isValid()) {\n            // No op\n            return;\n        }\n\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (months) {\n            setMonth(mom, get(mom, 'Month') + months * isAdding);\n        }\n        if (days) {\n            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n        }\n        if (milliseconds) {\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n        }\n        if (updateOffset) {\n            hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add      = createAdder(1, 'add');\n    var subtract = createAdder(-1, 'subtract');\n\n    function getCalendarFormat(myMoment, now) {\n        var diff = myMoment.diff(now, 'days', true);\n        return diff < -6 ? 'sameElse' :\n                diff < -1 ? 'lastWeek' :\n                diff < 0 ? 'lastDay' :\n                diff < 1 ? 'sameDay' :\n                diff < 2 ? 'nextDay' :\n                diff < 7 ? 'nextWeek' : 'sameElse';\n    }\n\n    function calendar$1 (time, formats) {\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n        var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n        return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n    }\n\n    function clone () {\n        return new Moment(this);\n    }\n\n    function isAfter (input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n        if (units === 'millisecond') {\n            return this.valueOf() > localInput.valueOf();\n        } else {\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\n        }\n    }\n\n    function isBefore (input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n        if (units === 'millisecond') {\n            return this.valueOf() < localInput.valueOf();\n        } else {\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\n        }\n    }\n\n    function isBetween (from, to, units, inclusivity) {\n        inclusivity = inclusivity || '()';\n        return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\n            (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\n    }\n\n    function isSame (input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input),\n            inputMs;\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units || 'millisecond');\n        if (units === 'millisecond') {\n            return this.valueOf() === localInput.valueOf();\n        } else {\n            inputMs = localInput.valueOf();\n            return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n        }\n    }\n\n    function isSameOrAfter (input, units) {\n        return this.isSame(input, units) || this.isAfter(input,units);\n    }\n\n    function isSameOrBefore (input, units) {\n        return this.isSame(input, units) || this.isBefore(input,units);\n    }\n\n    function diff (input, units, asFloat) {\n        var that,\n            zoneDelta,\n            output;\n\n        if (!this.isValid()) {\n            return NaN;\n        }\n\n        that = cloneWithOffset(input, this);\n\n        if (!that.isValid()) {\n            return NaN;\n        }\n\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n        units = normalizeUnits(units);\n\n        switch (units) {\n            case 'year': output = monthDiff(this, that) / 12; break;\n            case 'month': output = monthDiff(this, that); break;\n            case 'quarter': output = monthDiff(this, that) / 3; break;\n            case 'second': output = (this - that) / 1e3; break; // 1000\n            case 'minute': output = (this - that) / 6e4; break; // 1000 * 60\n            case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60\n            case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst\n            case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst\n            default: output = this - that;\n        }\n\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff (a, b) {\n        // difference in months\n        var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2, adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        //check for negative zero, return zero if negative zero\n        return -(wholeMonthDiff + adjust) || 0;\n    }\n\n    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n    function toString () {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function toISOString(keepOffset) {\n        if (!this.isValid()) {\n            return null;\n        }\n        var utc = keepOffset !== true;\n        var m = utc ? this.clone().utc() : this;\n        if (m.year() < 0 || m.year() > 9999) {\n            return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n        }\n        if (isFunction(Date.prototype.toISOString)) {\n            // native implementation is ~50x faster, use it when we can\n            if (utc) {\n                return this.toDate().toISOString();\n            } else {\n                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n            }\n        }\n        return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n    }\n\n    /**\n     * Return a human readable representation of a moment that can\n     * also be evaluated to get a new moment which is the same\n     *\n     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n     */\n    function inspect () {\n        if (!this.isValid()) {\n            return 'moment.invalid(/* ' + this._i + ' */)';\n        }\n        var func = 'moment';\n        var zone = '';\n        if (!this.isLocal()) {\n            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n            zone = 'Z';\n        }\n        var prefix = '[' + func + '(\"]';\n        var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n        var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n        var suffix = zone + '[\")]';\n\n        return this.format(prefix + year + datetime + suffix);\n    }\n\n    function format (inputString) {\n        if (!inputString) {\n            inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n        }\n        var output = formatMoment(this, inputString);\n        return this.localeData().postformat(output);\n    }\n\n    function from (time, withoutSuffix) {\n        if (this.isValid() &&\n                ((isMoment(time) && time.isValid()) ||\n                 createLocal(time).isValid())) {\n            return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function fromNow (withoutSuffix) {\n        return this.from(createLocal(), withoutSuffix);\n    }\n\n    function to (time, withoutSuffix) {\n        if (this.isValid() &&\n                ((isMoment(time) && time.isValid()) ||\n                 createLocal(time).isValid())) {\n            return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function toNow (withoutSuffix) {\n        return this.to(createLocal(), withoutSuffix);\n    }\n\n    // If passed a locale key, it will set the locale for this\n    // instance.  Otherwise, it will return the locale configuration\n    // variables for this instance.\n    function locale (key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData () {\n        return this._locale;\n    }\n\n    function startOf (units) {\n        units = normalizeUnits(units);\n        // the following switch intentionally omits break keywords\n        // to utilize falling through the cases.\n        switch (units) {\n            case 'year':\n                this.month(0);\n                /* falls through */\n            case 'quarter':\n            case 'month':\n                this.date(1);\n                /* falls through */\n            case 'week':\n            case 'isoWeek':\n            case 'day':\n            case 'date':\n                this.hours(0);\n                /* falls through */\n            case 'hour':\n                this.minutes(0);\n                /* falls through */\n            case 'minute':\n                this.seconds(0);\n                /* falls through */\n            case 'second':\n                this.milliseconds(0);\n        }\n\n        // weeks are a special case\n        if (units === 'week') {\n            this.weekday(0);\n        }\n        if (units === 'isoWeek') {\n            this.isoWeekday(1);\n        }\n\n        // quarters are also special\n        if (units === 'quarter') {\n            this.month(Math.floor(this.month() / 3) * 3);\n        }\n\n        return this;\n    }\n\n    function endOf (units) {\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond') {\n            return this;\n        }\n\n        // 'date' is an alias for 'day', so it should be considered as such.\n        if (units === 'date') {\n            units = 'day';\n        }\n\n        return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n    }\n\n    function valueOf () {\n        return this._d.valueOf() - ((this._offset || 0) * 60000);\n    }\n\n    function unix () {\n        return Math.floor(this.valueOf() / 1000);\n    }\n\n    function toDate () {\n        return new Date(this.valueOf());\n    }\n\n    function toArray () {\n        var m = this;\n        return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n    }\n\n    function toObject () {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds()\n        };\n    }\n\n    function toJSON () {\n        // new Date(NaN).toJSON() === null\n        return this.isValid() ? this.toISOString() : null;\n    }\n\n    function isValid$2 () {\n        return isValid(this);\n    }\n\n    function parsingFlags () {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt () {\n        return getParsingFlags(this).overflow;\n    }\n\n    function creationData() {\n        return {\n            input: this._i,\n            format: this._f,\n            locale: this._locale,\n            isUTC: this._isUTC,\n            strict: this._strict\n        };\n    }\n\n    // FORMATTING\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken (token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg',     'weekYear');\n    addWeekYearFormatToken('ggggg',    'weekYear');\n    addWeekYearFormatToken('GGGG',  'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    addUnitAlias('weekYear', 'gg');\n    addUnitAlias('isoWeekYear', 'GG');\n\n    // PRIORITY\n\n    addUnitPriority('weekYear', 1);\n    addUnitPriority('isoWeekYear', 1);\n\n\n    // PARSING\n\n    addRegexToken('G',      matchSigned);\n    addRegexToken('g',      matchSigned);\n    addRegexToken('GG',     match1to2, match2);\n    addRegexToken('gg',     match1to2, match2);\n    addRegexToken('GGGG',   match1to4, match4);\n    addRegexToken('gggg',   match1to4, match4);\n    addRegexToken('GGGGG',  match1to6, match6);\n    addRegexToken('ggggg',  match1to6, match6);\n\n    addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n        week[token.substr(0, 2)] = toInt(input);\n    });\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = hooks.parseTwoDigitYear(input);\n    });\n\n    // MOMENTS\n\n    function getSetWeekYear (input) {\n        return getSetWeekYearHelper.call(this,\n                input,\n                this.week(),\n                this.weekday(),\n                this.localeData()._week.dow,\n                this.localeData()._week.doy);\n    }\n\n    function getSetISOWeekYear (input) {\n        return getSetWeekYearHelper.call(this,\n                input, this.isoWeek(), this.isoWeekday(), 1, 4);\n    }\n\n    function getISOWeeksInYear () {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getWeeksInYear () {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n        var weeksTarget;\n        if (input == null) {\n            return weekOfYear(this, dow, doy).year;\n        } else {\n            weeksTarget = weeksInYear(input, dow, doy);\n            if (week > weeksTarget) {\n                week = weeksTarget;\n            }\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\n        }\n    }\n\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n        this.year(date.getUTCFullYear());\n        this.month(date.getUTCMonth());\n        this.date(date.getUTCDate());\n        return this;\n    }\n\n    // FORMATTING\n\n    addFormatToken('Q', 0, 'Qo', 'quarter');\n\n    // ALIASES\n\n    addUnitAlias('quarter', 'Q');\n\n    // PRIORITY\n\n    addUnitPriority('quarter', 7);\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter (input) {\n        return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n    }\n\n    // FORMATTING\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // ALIASES\n\n    addUnitAlias('date', 'D');\n\n    // PRIORITY\n    addUnitPriority('date', 9);\n\n    // PARSING\n\n    addRegexToken('D',  match1to2);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        return isStrict ?\n          (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n          locale._dayOfMonthOrdinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0]);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    // FORMATTING\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // ALIASES\n\n    addUnitAlias('dayOfYear', 'DDD');\n\n    // PRIORITY\n    addUnitPriority('dayOfYear', 4);\n\n    // PARSING\n\n    addRegexToken('DDD',  match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    // MOMENTS\n\n    function getSetDayOfYear (input) {\n        var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n        return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // ALIASES\n\n    addUnitAlias('minute', 'm');\n\n    // PRIORITY\n\n    addUnitPriority('minute', 14);\n\n    // PARSING\n\n    addRegexToken('m',  match1to2);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    // FORMATTING\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // ALIASES\n\n    addUnitAlias('second', 's');\n\n    // PRIORITY\n\n    addUnitPriority('second', 15);\n\n    // PARSING\n\n    addRegexToken('s',  match1to2);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    // FORMATTING\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n\n    // ALIASES\n\n    addUnitAlias('millisecond', 'ms');\n\n    // PRIORITY\n\n    addUnitPriority('millisecond', 16);\n\n    // PARSING\n\n    addRegexToken('S',    match1to3, match1);\n    addRegexToken('SS',   match1to3, match2);\n    addRegexToken('SSS',  match1to3, match3);\n\n    var token;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n    // MOMENTS\n\n    var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    // FORMATTING\n\n    addFormatToken('z',  0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr () {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName () {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var proto = Moment.prototype;\n\n    proto.add               = add;\n    proto.calendar          = calendar$1;\n    proto.clone             = clone;\n    proto.diff              = diff;\n    proto.endOf             = endOf;\n    proto.format            = format;\n    proto.from              = from;\n    proto.fromNow           = fromNow;\n    proto.to                = to;\n    proto.toNow             = toNow;\n    proto.get               = stringGet;\n    proto.invalidAt         = invalidAt;\n    proto.isAfter           = isAfter;\n    proto.isBefore          = isBefore;\n    proto.isBetween         = isBetween;\n    proto.isSame            = isSame;\n    proto.isSameOrAfter     = isSameOrAfter;\n    proto.isSameOrBefore    = isSameOrBefore;\n    proto.isValid           = isValid$2;\n    proto.lang              = lang;\n    proto.locale            = locale;\n    proto.localeData        = localeData;\n    proto.max               = prototypeMax;\n    proto.min               = prototypeMin;\n    proto.parsingFlags      = parsingFlags;\n    proto.set               = stringSet;\n    proto.startOf           = startOf;\n    proto.subtract          = subtract;\n    proto.toArray           = toArray;\n    proto.toObject          = toObject;\n    proto.toDate            = toDate;\n    proto.toISOString       = toISOString;\n    proto.inspect           = inspect;\n    proto.toJSON            = toJSON;\n    proto.toString          = toString;\n    proto.unix              = unix;\n    proto.valueOf           = valueOf;\n    proto.creationData      = creationData;\n    proto.year       = getSetYear;\n    proto.isLeapYear = getIsLeapYear;\n    proto.weekYear    = getSetWeekYear;\n    proto.isoWeekYear = getSetISOWeekYear;\n    proto.quarter = proto.quarters = getSetQuarter;\n    proto.month       = getSetMonth;\n    proto.daysInMonth = getDaysInMonth;\n    proto.week           = proto.weeks        = getSetWeek;\n    proto.isoWeek        = proto.isoWeeks     = getSetISOWeek;\n    proto.weeksInYear    = getWeeksInYear;\n    proto.isoWeeksInYear = getISOWeeksInYear;\n    proto.date       = getSetDayOfMonth;\n    proto.day        = proto.days             = getSetDayOfWeek;\n    proto.weekday    = getSetLocaleDayOfWeek;\n    proto.isoWeekday = getSetISODayOfWeek;\n    proto.dayOfYear  = getSetDayOfYear;\n    proto.hour = proto.hours = getSetHour;\n    proto.minute = proto.minutes = getSetMinute;\n    proto.second = proto.seconds = getSetSecond;\n    proto.millisecond = proto.milliseconds = getSetMillisecond;\n    proto.utcOffset            = getSetOffset;\n    proto.utc                  = setOffsetToUTC;\n    proto.local                = setOffsetToLocal;\n    proto.parseZone            = setOffsetToParsedOffset;\n    proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    proto.isDST                = isDaylightSavingTime;\n    proto.isLocal              = isLocal;\n    proto.isUtcOffset          = isUtcOffset;\n    proto.isUtc                = isUtc;\n    proto.isUTC                = isUtc;\n    proto.zoneAbbr = getZoneAbbr;\n    proto.zoneName = getZoneName;\n    proto.dates  = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n    proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n    proto.years  = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n    proto.zone   = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n    proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n    function createUnix (input) {\n        return createLocal(input * 1000);\n    }\n\n    function createInZone () {\n        return createLocal.apply(null, arguments).parseZone();\n    }\n\n    function preParsePostFormat (string) {\n        return string;\n    }\n\n    var proto$1 = Locale.prototype;\n\n    proto$1.calendar        = calendar;\n    proto$1.longDateFormat  = longDateFormat;\n    proto$1.invalidDate     = invalidDate;\n    proto$1.ordinal         = ordinal;\n    proto$1.preparse        = preParsePostFormat;\n    proto$1.postformat      = preParsePostFormat;\n    proto$1.relativeTime    = relativeTime;\n    proto$1.pastFuture      = pastFuture;\n    proto$1.set             = set;\n\n    proto$1.months            =        localeMonths;\n    proto$1.monthsShort       =        localeMonthsShort;\n    proto$1.monthsParse       =        localeMonthsParse;\n    proto$1.monthsRegex       = monthsRegex;\n    proto$1.monthsShortRegex  = monthsShortRegex;\n    proto$1.week = localeWeek;\n    proto$1.firstDayOfYear = localeFirstDayOfYear;\n    proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n    proto$1.weekdays       =        localeWeekdays;\n    proto$1.weekdaysMin    =        localeWeekdaysMin;\n    proto$1.weekdaysShort  =        localeWeekdaysShort;\n    proto$1.weekdaysParse  =        localeWeekdaysParse;\n\n    proto$1.weekdaysRegex       =        weekdaysRegex;\n    proto$1.weekdaysShortRegex  =        weekdaysShortRegex;\n    proto$1.weekdaysMinRegex    =        weekdaysMinRegex;\n\n    proto$1.isPM = localeIsPM;\n    proto$1.meridiem = localeMeridiem;\n\n    function get$1 (format, index, field, setter) {\n        var locale = getLocale();\n        var utc = createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function listMonthsImpl (format, index, field) {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return get$1(format, index, field, 'month');\n        }\n\n        var i;\n        var out = [];\n        for (i = 0; i < 12; i++) {\n            out[i] = get$1(format, i, field, 'month');\n        }\n        return out;\n    }\n\n    // ()\n    // (5)\n    // (fmt, 5)\n    // (fmt)\n    // (true)\n    // (true, 5)\n    // (true, fmt, 5)\n    // (true, fmt)\n    function listWeekdaysImpl (localeSorted, format, index, field) {\n        if (typeof localeSorted === 'boolean') {\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        } else {\n            format = localeSorted;\n            index = format;\n            localeSorted = false;\n\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        }\n\n        var locale = getLocale(),\n            shift = localeSorted ? locale._week.dow : 0;\n\n        if (index != null) {\n            return get$1(format, (index + shift) % 7, field, 'day');\n        }\n\n        var i;\n        var out = [];\n        for (i = 0; i < 7; i++) {\n            out[i] = get$1(format, (i + shift) % 7, field, 'day');\n        }\n        return out;\n    }\n\n    function listMonths (format, index) {\n        return listMonthsImpl(format, index, 'months');\n    }\n\n    function listMonthsShort (format, index) {\n        return listMonthsImpl(format, index, 'monthsShort');\n    }\n\n    function listWeekdays (localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n    }\n\n    function listWeekdaysShort (localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n    }\n\n    function listWeekdaysMin (localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n    }\n\n    getSetGlobalLocale('en', {\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (toInt(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        }\n    });\n\n    // Side effect imports\n\n    hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n    hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\n    var mathAbs = Math.abs;\n\n    function abs () {\n        var data           = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days         = mathAbs(this._days);\n        this._months       = mathAbs(this._months);\n\n        data.milliseconds  = mathAbs(data.milliseconds);\n        data.seconds       = mathAbs(data.seconds);\n        data.minutes       = mathAbs(data.minutes);\n        data.hours         = mathAbs(data.hours);\n        data.months        = mathAbs(data.months);\n        data.years         = mathAbs(data.years);\n\n        return this;\n    }\n\n    function addSubtract$1 (duration, input, value, direction) {\n        var other = createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days         += direction * other._days;\n        duration._months       += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function add$1 (input, value) {\n        return addSubtract$1(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function subtract$1 (input, value) {\n        return addSubtract$1(this, input, value, -1);\n    }\n\n    function absCeil (number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble () {\n        var milliseconds = this._milliseconds;\n        var days         = this._days;\n        var months       = this._months;\n        var data         = this._data;\n        var seconds, minutes, hours, years, monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0))) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds           = absFloor(milliseconds / 1000);\n        data.seconds      = seconds % 60;\n\n        minutes           = absFloor(seconds / 60);\n        data.minutes      = minutes % 60;\n\n        hours             = absFloor(minutes / 60);\n        data.hours        = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days   = days;\n        data.months = months;\n        data.years  = years;\n\n        return this;\n    }\n\n    function daysToMonths (days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return days * 4800 / 146097;\n    }\n\n    function monthsToDays (months) {\n        // the reverse of daysToMonths\n        return months * 146097 / 4800;\n    }\n\n    function as (units) {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        var days;\n        var months;\n        var milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'year') {\n            days   = this._days   + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            return units === 'month' ? months : months / 12;\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week'   : return days / 7     + milliseconds / 6048e5;\n                case 'day'    : return days         + milliseconds / 864e5;\n                case 'hour'   : return days * 24    + milliseconds / 36e5;\n                case 'minute' : return days * 1440  + milliseconds / 6e4;\n                case 'second' : return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n                default: throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    // TODO: Use this.as('ms')?\n    function valueOf$1 () {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        return (\n            this._milliseconds +\n            this._days * 864e5 +\n            (this._months % 12) * 2592e6 +\n            toInt(this._months / 12) * 31536e6\n        );\n    }\n\n    function makeAs (alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms');\n    var asSeconds      = makeAs('s');\n    var asMinutes      = makeAs('m');\n    var asHours        = makeAs('h');\n    var asDays         = makeAs('d');\n    var asWeeks        = makeAs('w');\n    var asMonths       = makeAs('M');\n    var asYears        = makeAs('y');\n\n    function clone$1 () {\n        return createDuration(this);\n    }\n\n    function get$2 (units) {\n        units = normalizeUnits(units);\n        return this.isValid() ? this[units + 's']() : NaN;\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this.isValid() ? this._data[name] : NaN;\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds');\n    var seconds      = makeGetter('seconds');\n    var minutes      = makeGetter('minutes');\n    var hours        = makeGetter('hours');\n    var days         = makeGetter('days');\n    var months       = makeGetter('months');\n    var years        = makeGetter('years');\n\n    function weeks () {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round;\n    var thresholds = {\n        ss: 44,         // a few seconds to seconds\n        s : 45,         // seconds to minute\n        m : 45,         // minutes to hour\n        h : 22,         // hours to day\n        d : 26,         // days to month\n        M : 11          // months to year\n    };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n        var duration = createDuration(posNegDuration).abs();\n        var seconds  = round(duration.as('s'));\n        var minutes  = round(duration.as('m'));\n        var hours    = round(duration.as('h'));\n        var days     = round(duration.as('d'));\n        var months   = round(duration.as('M'));\n        var years    = round(duration.as('y'));\n\n        var a = seconds <= thresholds.ss && ['s', seconds]  ||\n                seconds < thresholds.s   && ['ss', seconds] ||\n                minutes <= 1             && ['m']           ||\n                minutes < thresholds.m   && ['mm', minutes] ||\n                hours   <= 1             && ['h']           ||\n                hours   < thresholds.h   && ['hh', hours]   ||\n                days    <= 1             && ['d']           ||\n                days    < thresholds.d   && ['dd', days]    ||\n                months  <= 1             && ['M']           ||\n                months  < thresholds.M   && ['MM', months]  ||\n                years   <= 1             && ['y']           || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set the rounding function for relative time strings\n    function getSetRelativeTimeRounding (roundingFunction) {\n        if (roundingFunction === undefined) {\n            return round;\n        }\n        if (typeof(roundingFunction) === 'function') {\n            round = roundingFunction;\n            return true;\n        }\n        return false;\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function getSetRelativeTimeThreshold (threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        if (threshold === 's') {\n            thresholds.ss = limit - 1;\n        }\n        return true;\n    }\n\n    function humanize (withSuffix) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var locale = this.localeData();\n        var output = relativeTime$1(this, !withSuffix, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var abs$1 = Math.abs;\n\n    function sign(x) {\n        return ((x > 0) - (x < 0)) || +x;\n    }\n\n    function toISOString$1() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var seconds = abs$1(this._milliseconds) / 1000;\n        var days         = abs$1(this._days);\n        var months       = abs$1(this._months);\n        var minutes, hours, years;\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes           = absFloor(seconds / 60);\n        hours             = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years  = absFloor(months / 12);\n        months %= 12;\n\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        var Y = years;\n        var M = months;\n        var D = days;\n        var h = hours;\n        var m = minutes;\n        var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n        var total = this.asSeconds();\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        var totalSign = total < 0 ? '-' : '';\n        var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n        var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n        var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n        return totalSign + 'P' +\n            (Y ? ymSign + Y + 'Y' : '') +\n            (M ? ymSign + M + 'M' : '') +\n            (D ? daysSign + D + 'D' : '') +\n            ((h || m || s) ? 'T' : '') +\n            (h ? hmsSign + h + 'H' : '') +\n            (m ? hmsSign + m + 'M' : '') +\n            (s ? hmsSign + s + 'S' : '');\n    }\n\n    var proto$2 = Duration.prototype;\n\n    proto$2.isValid        = isValid$1;\n    proto$2.abs            = abs;\n    proto$2.add            = add$1;\n    proto$2.subtract       = subtract$1;\n    proto$2.as             = as;\n    proto$2.asMilliseconds = asMilliseconds;\n    proto$2.asSeconds      = asSeconds;\n    proto$2.asMinutes      = asMinutes;\n    proto$2.asHours        = asHours;\n    proto$2.asDays         = asDays;\n    proto$2.asWeeks        = asWeeks;\n    proto$2.asMonths       = asMonths;\n    proto$2.asYears        = asYears;\n    proto$2.valueOf        = valueOf$1;\n    proto$2._bubble        = bubble;\n    proto$2.clone          = clone$1;\n    proto$2.get            = get$2;\n    proto$2.milliseconds   = milliseconds;\n    proto$2.seconds        = seconds;\n    proto$2.minutes        = minutes;\n    proto$2.hours          = hours;\n    proto$2.days           = days;\n    proto$2.weeks          = weeks;\n    proto$2.months         = months;\n    proto$2.years          = years;\n    proto$2.humanize       = humanize;\n    proto$2.toISOString    = toISOString$1;\n    proto$2.toString       = toISOString$1;\n    proto$2.toJSON         = toISOString$1;\n    proto$2.locale         = locale;\n    proto$2.localeData     = localeData;\n\n    proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n    proto$2.lang = lang;\n\n    // Side effect imports\n\n    // FORMATTING\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input, 10) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    // Side effect imports\n\n\n    hooks.version = '2.22.1';\n\n    setHookCallback(createLocal);\n\n    hooks.fn                    = proto;\n    hooks.min                   = min;\n    hooks.max                   = max;\n    hooks.now                   = now;\n    hooks.utc                   = createUTC;\n    hooks.unix                  = createUnix;\n    hooks.months                = listMonths;\n    hooks.isDate                = isDate;\n    hooks.locale                = getSetGlobalLocale;\n    hooks.invalid               = createInvalid;\n    hooks.duration              = createDuration;\n    hooks.isMoment              = isMoment;\n    hooks.weekdays              = listWeekdays;\n    hooks.parseZone             = createInZone;\n    hooks.localeData            = getLocale;\n    hooks.isDuration            = isDuration;\n    hooks.monthsShort           = listMonthsShort;\n    hooks.weekdaysMin           = listWeekdaysMin;\n    hooks.defineLocale          = defineLocale;\n    hooks.updateLocale          = updateLocale;\n    hooks.locales               = listLocales;\n    hooks.weekdaysShort         = listWeekdaysShort;\n    hooks.normalizeUnits        = normalizeUnits;\n    hooks.relativeTimeRounding  = getSetRelativeTimeRounding;\n    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n    hooks.calendarFormat        = getCalendarFormat;\n    hooks.prototype             = proto;\n\n    // currently HTML5 input type only supports 24-hour formats\n    hooks.HTML5_FMT = {\n        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',             // <input type=\"datetime-local\" />\n        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',  // <input type=\"datetime-local\" step=\"1\" />\n        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',   // <input type=\"datetime-local\" step=\"0.001\" />\n        DATE: 'YYYY-MM-DD',                             // <input type=\"date\" />\n        TIME: 'HH:mm',                                  // <input type=\"time\" />\n        TIME_SECONDS: 'HH:mm:ss',                       // <input type=\"time\" step=\"1\" />\n        TIME_MS: 'HH:mm:ss.SSS',                        // <input type=\"time\" step=\"0.001\" />\n        WEEK: 'YYYY-[W]WW',                             // <input type=\"week\" />\n        MONTH: 'YYYY-MM'                                // <input type=\"month\" />\n    };\n\n    return hooks;\n\n})));\n/*! URI.js v1.12.0 http://medialize.github.com/URI.js/ */\n/* build contains: IPv6.js, punycode.js, SecondLevelDomains.js, URI.js, URI.fragmentQuery.js */\n(function(e,k){\"object\"===typeof exports?module.exports=k():\"function\"===typeof define&&define.amd?define(k):e.IPv6=k(e)})(this,function(e){var k=e&&e.IPv6;return{best:function(e){e=e.toLowerCase().split(\":\");var k=e.length,d=8;\"\"===e[0]&&\"\"===e[1]&&\"\"===e[2]?(e.shift(),e.shift()):\"\"===e[0]&&\"\"===e[1]?e.shift():\"\"===e[k-1]&&\"\"===e[k-2]&&e.pop();k=e.length;-1!==e[k-1].indexOf(\".\")&&(d=7);var g;for(g=0;g<k&&\"\"!==e[g];g++);if(g<d)for(e.splice(g,1,\"0000\");e.length<d;)e.splice(g,0,\"0000\");for(g=0;g<d;g++){for(var k=\ne[g].split(\"\"),q=0;3>q;q++)if(\"0\"===k[0]&&1<k.length)k.splice(0,1);else break;e[g]=k.join(\"\")}var k=-1,l=q=0,r=-1,z=!1;for(g=0;g<d;g++)z?\"0\"===e[g]?l+=1:(z=!1,l>q&&(k=r,q=l)):\"0\"==e[g]&&(z=!0,r=g,l=1);l>q&&(k=r,q=l);1<q&&e.splice(k,q,\"\");k=e.length;d=\"\";\"\"===e[0]&&(beststr=\":\");for(g=0;g<k;g++){d+=e[g];if(g===k-1)break;d+=\":\"}\"\"===e[k-1]&&(d+=\":\");return d},noConflict:function(){e.IPv6===this&&(e.IPv6=k);return this}}});\n(function(e){function k(a){throw RangeError(p[a]);}function u(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function m(a,b){return u(a.split(h),b).join(\".\")}function d(a){for(var b=[],c=0,d=a.length,h,p;c<d;)h=a.charCodeAt(c++),55296<=h&&56319>=h&&c<d?(p=a.charCodeAt(c++),56320==(p&64512)?b.push(((h&1023)<<10)+(p&1023)+65536):(b.push(h),c--)):b.push(h);return b}function g(a){return u(a,function(a){var b=\"\";65535<a&&(a-=65536,b+=x(a>>>10&1023|55296),a=56320|a&1023);return b+=x(a)}).join(\"\")}function q(a,\nb){return a+22+75*(26>a)-((0!=b)<<5)}function l(a,b,c){var d=0;a=c?A(a/H):a>>1;for(a+=A(a/b);a>n*y>>1;d+=s)a=A(a/n);return A(d+(n+1)*a/(a+I))}function r(b){var c=[],d=b.length,h,p=0,e=F,f=G,n,x,q,t,m;n=b.lastIndexOf(a);0>n&&(n=0);for(x=0;x<n;++x)128<=b.charCodeAt(x)&&k(\"not-basic\"),c.push(b.charCodeAt(x));for(n=0<n?n+1:0;n<d;){x=p;h=1;for(q=s;;q+=s){n>=d&&k(\"invalid-input\");t=b.charCodeAt(n++);t=10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:s;(t>=s||t>A((w-p)/h))&&k(\"overflow\");p+=t*h;m=q<=f?v:q>=f+y?y:\nq-f;if(t<m)break;t=s-m;h>A(w/t)&&k(\"overflow\");h*=t}h=c.length+1;f=l(p-x,h,0==x);A(p/h)>w-e&&k(\"overflow\");e+=A(p/h);p%=h;c.splice(p++,0,e)}return g(c)}function z(b){var c,h,p,e,f,n,g,m,r,t=[],B,u,z;b=d(b);B=b.length;c=F;h=0;f=G;for(n=0;n<B;++n)r=b[n],128>r&&t.push(x(r));for((p=e=t.length)&&t.push(a);p<B;){g=w;for(n=0;n<B;++n)r=b[n],r>=c&&r<g&&(g=r);u=p+1;g-c>A((w-h)/u)&&k(\"overflow\");h+=(g-c)*u;c=g;for(n=0;n<B;++n)if(r=b[n],r<c&&++h>w&&k(\"overflow\"),r==c){m=h;for(g=s;;g+=s){r=g<=f?v:g>=f+y?y:g-f;\nif(m<r)break;z=m-r;m=s-r;t.push(x(q(r+z%m,0)));m=A(z/m)}t.push(x(q(m,0)));f=l(h,u,p==e);h=0;++p}++h;++c}return t.join(\"\")}var D=\"object\"==typeof exports&&exports,E=\"object\"==typeof module&&module&&module.exports==D&&module,C=\"object\"==typeof global&&global;if(C.global===C||C.window===C)e=C;var f,w=2147483647,s=36,v=1,y=26,I=38,H=700,G=72,F=128,a=\"-\",b=/^xn--/,c=/[^ -~]/,h=/\\x2E|\\u3002|\\uFF0E|\\uFF61/g,p={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\n\"invalid-input\":\"Invalid input\"},n=s-v,A=Math.floor,x=String.fromCharCode,B;f={version:\"1.2.3\",ucs2:{decode:d,encode:g},decode:r,encode:z,toASCII:function(a){return m(a,function(a){return c.test(a)?\"xn--\"+z(a):a})},toUnicode:function(a){return m(a,function(a){return b.test(a)?r(a.slice(4).toLowerCase()):a})}};if(\"function\"==typeof define&&\"object\"==typeof define.amd&&define.amd)define(function(){return f});else if(D&&!D.nodeType)if(E)E.exports=f;else for(B in f)f.hasOwnProperty(B)&&(D[B]=f[B]);else e.punycode=\nf})(this);\n(function(e,k){\"object\"===typeof exports?module.exports=k():\"function\"===typeof define&&define.amd?define(k):e.SecondLevelDomains=k(e)})(this,function(e){var k=e&&e.SecondLevelDomains,u=Object.prototype.hasOwnProperty,m={list:{ac:\"com|gov|mil|net|org\",ae:\"ac|co|gov|mil|name|net|org|pro|sch\",af:\"com|edu|gov|net|org\",al:\"com|edu|gov|mil|net|org\",ao:\"co|ed|gv|it|og|pb\",ar:\"com|edu|gob|gov|int|mil|net|org|tur\",at:\"ac|co|gv|or\",au:\"asn|com|csiro|edu|gov|id|net|org\",ba:\"co|com|edu|gov|mil|net|org|rs|unbi|unmo|unsa|untz|unze\",bb:\"biz|co|com|edu|gov|info|net|org|store|tv\",\nbh:\"biz|cc|com|edu|gov|info|net|org\",bn:\"com|edu|gov|net|org\",bo:\"com|edu|gob|gov|int|mil|net|org|tv\",br:\"adm|adv|agr|am|arq|art|ato|b|bio|blog|bmd|cim|cng|cnt|com|coop|ecn|edu|eng|esp|etc|eti|far|flog|fm|fnd|fot|fst|g12|ggf|gov|imb|ind|inf|jor|jus|lel|mat|med|mil|mus|net|nom|not|ntr|odo|org|ppg|pro|psc|psi|qsl|rec|slg|srv|tmp|trd|tur|tv|vet|vlog|wiki|zlg\",bs:\"com|edu|gov|net|org\",bz:\"du|et|om|ov|rg\",ca:\"ab|bc|mb|nb|nf|nl|ns|nt|nu|on|pe|qc|sk|yk\",ck:\"biz|co|edu|gen|gov|info|net|org\",cn:\"ac|ah|bj|com|cq|edu|fj|gd|gov|gs|gx|gz|ha|hb|he|hi|hl|hn|jl|js|jx|ln|mil|net|nm|nx|org|qh|sc|sd|sh|sn|sx|tj|tw|xj|xz|yn|zj\",\nco:\"com|edu|gov|mil|net|nom|org\",cr:\"ac|c|co|ed|fi|go|or|sa\",cy:\"ac|biz|com|ekloges|gov|ltd|name|net|org|parliament|press|pro|tm\",\"do\":\"art|com|edu|gob|gov|mil|net|org|sld|web\",dz:\"art|asso|com|edu|gov|net|org|pol\",ec:\"com|edu|fin|gov|info|med|mil|net|org|pro\",eg:\"com|edu|eun|gov|mil|name|net|org|sci\",er:\"com|edu|gov|ind|mil|net|org|rochest|w\",es:\"com|edu|gob|nom|org\",et:\"biz|com|edu|gov|info|name|net|org\",fj:\"ac|biz|com|info|mil|name|net|org|pro\",fk:\"ac|co|gov|net|nom|org\",fr:\"asso|com|f|gouv|nom|prd|presse|tm\",\ngg:\"co|net|org\",gh:\"com|edu|gov|mil|org\",gn:\"ac|com|gov|net|org\",gr:\"com|edu|gov|mil|net|org\",gt:\"com|edu|gob|ind|mil|net|org\",gu:\"com|edu|gov|net|org\",hk:\"com|edu|gov|idv|net|org\",id:\"ac|co|go|mil|net|or|sch|web\",il:\"ac|co|gov|idf|k12|muni|net|org\",\"in\":\"ac|co|edu|ernet|firm|gen|gov|i|ind|mil|net|nic|org|res\",iq:\"com|edu|gov|i|mil|net|org\",ir:\"ac|co|dnssec|gov|i|id|net|org|sch\",it:\"edu|gov\",je:\"co|net|org\",jo:\"com|edu|gov|mil|name|net|org|sch\",jp:\"ac|ad|co|ed|go|gr|lg|ne|or\",ke:\"ac|co|go|info|me|mobi|ne|or|sc\",\nkh:\"com|edu|gov|mil|net|org|per\",ki:\"biz|com|de|edu|gov|info|mob|net|org|tel\",km:\"asso|com|coop|edu|gouv|k|medecin|mil|nom|notaires|pharmaciens|presse|tm|veterinaire\",kn:\"edu|gov|net|org\",kr:\"ac|busan|chungbuk|chungnam|co|daegu|daejeon|es|gangwon|go|gwangju|gyeongbuk|gyeonggi|gyeongnam|hs|incheon|jeju|jeonbuk|jeonnam|k|kg|mil|ms|ne|or|pe|re|sc|seoul|ulsan\",kw:\"com|edu|gov|net|org\",ky:\"com|edu|gov|net|org\",kz:\"com|edu|gov|mil|net|org\",lb:\"com|edu|gov|net|org\",lk:\"assn|com|edu|gov|grp|hotel|int|ltd|net|ngo|org|sch|soc|web\",\nlr:\"com|edu|gov|net|org\",lv:\"asn|com|conf|edu|gov|id|mil|net|org\",ly:\"com|edu|gov|id|med|net|org|plc|sch\",ma:\"ac|co|gov|m|net|org|press\",mc:\"asso|tm\",me:\"ac|co|edu|gov|its|net|org|priv\",mg:\"com|edu|gov|mil|nom|org|prd|tm\",mk:\"com|edu|gov|inf|name|net|org|pro\",ml:\"com|edu|gov|net|org|presse\",mn:\"edu|gov|org\",mo:\"com|edu|gov|net|org\",mt:\"com|edu|gov|net|org\",mv:\"aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro\",mw:\"ac|co|com|coop|edu|gov|int|museum|net|org\",mx:\"com|edu|gob|net|org\",my:\"com|edu|gov|mil|name|net|org|sch\",\nnf:\"arts|com|firm|info|net|other|per|rec|store|web\",ng:\"biz|com|edu|gov|mil|mobi|name|net|org|sch\",ni:\"ac|co|com|edu|gob|mil|net|nom|org\",np:\"com|edu|gov|mil|net|org\",nr:\"biz|com|edu|gov|info|net|org\",om:\"ac|biz|co|com|edu|gov|med|mil|museum|net|org|pro|sch\",pe:\"com|edu|gob|mil|net|nom|org|sld\",ph:\"com|edu|gov|i|mil|net|ngo|org\",pk:\"biz|com|edu|fam|gob|gok|gon|gop|gos|gov|net|org|web\",pl:\"art|bialystok|biz|com|edu|gda|gdansk|gorzow|gov|info|katowice|krakow|lodz|lublin|mil|net|ngo|olsztyn|org|poznan|pwr|radom|slupsk|szczecin|torun|warszawa|waw|wroc|wroclaw|zgora\",\npr:\"ac|biz|com|edu|est|gov|info|isla|name|net|org|pro|prof\",ps:\"com|edu|gov|net|org|plo|sec\",pw:\"belau|co|ed|go|ne|or\",ro:\"arts|com|firm|info|nom|nt|org|rec|store|tm|www\",rs:\"ac|co|edu|gov|in|org\",sb:\"com|edu|gov|net|org\",sc:\"com|edu|gov|net|org\",sh:\"co|com|edu|gov|net|nom|org\",sl:\"com|edu|gov|net|org\",st:\"co|com|consulado|edu|embaixada|gov|mil|net|org|principe|saotome|store\",sv:\"com|edu|gob|org|red\",sz:\"ac|co|org\",tr:\"av|bbs|bel|biz|com|dr|edu|gen|gov|info|k12|name|net|org|pol|tel|tsk|tv|web\",tt:\"aero|biz|cat|co|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel\",\ntw:\"club|com|ebiz|edu|game|gov|idv|mil|net|org\",mu:\"ac|co|com|gov|net|or|org\",mz:\"ac|co|edu|gov|org\",na:\"co|com\",nz:\"ac|co|cri|geek|gen|govt|health|iwi|maori|mil|net|org|parliament|school\",pa:\"abo|ac|com|edu|gob|ing|med|net|nom|org|sld\",pt:\"com|edu|gov|int|net|nome|org|publ\",py:\"com|edu|gov|mil|net|org\",qa:\"com|edu|gov|mil|net|org\",re:\"asso|com|nom\",ru:\"ac|adygeya|altai|amur|arkhangelsk|astrakhan|bashkiria|belgorod|bir|bryansk|buryatia|cbg|chel|chelyabinsk|chita|chukotka|chuvashia|com|dagestan|e-burg|edu|gov|grozny|int|irkutsk|ivanovo|izhevsk|jar|joshkar-ola|kalmykia|kaluga|kamchatka|karelia|kazan|kchr|kemerovo|khabarovsk|khakassia|khv|kirov|koenig|komi|kostroma|kranoyarsk|kuban|kurgan|kursk|lipetsk|magadan|mari|mari-el|marine|mil|mordovia|mosreg|msk|murmansk|nalchik|net|nnov|nov|novosibirsk|nsk|omsk|orenburg|org|oryol|penza|perm|pp|pskov|ptz|rnd|ryazan|sakhalin|samara|saratov|simbirsk|smolensk|spb|stavropol|stv|surgut|tambov|tatarstan|tom|tomsk|tsaritsyn|tsk|tula|tuva|tver|tyumen|udm|udmurtia|ulan-ude|vladikavkaz|vladimir|vladivostok|volgograd|vologda|voronezh|vrn|vyatka|yakutia|yamal|yekaterinburg|yuzhno-sakhalinsk\",\nrw:\"ac|co|com|edu|gouv|gov|int|mil|net\",sa:\"com|edu|gov|med|net|org|pub|sch\",sd:\"com|edu|gov|info|med|net|org|tv\",se:\"a|ac|b|bd|c|d|e|f|g|h|i|k|l|m|n|o|org|p|parti|pp|press|r|s|t|tm|u|w|x|y|z\",sg:\"com|edu|gov|idn|net|org|per\",sn:\"art|com|edu|gouv|org|perso|univ\",sy:\"com|edu|gov|mil|net|news|org\",th:\"ac|co|go|in|mi|net|or\",tj:\"ac|biz|co|com|edu|go|gov|info|int|mil|name|net|nic|org|test|web\",tn:\"agrinet|com|defense|edunet|ens|fin|gov|ind|info|intl|mincom|nat|net|org|perso|rnrt|rns|rnu|tourism\",tz:\"ac|co|go|ne|or\",\nua:\"biz|cherkassy|chernigov|chernovtsy|ck|cn|co|com|crimea|cv|dn|dnepropetrovsk|donetsk|dp|edu|gov|if|in|ivano-frankivsk|kh|kharkov|kherson|khmelnitskiy|kiev|kirovograd|km|kr|ks|kv|lg|lugansk|lutsk|lviv|me|mk|net|nikolaev|od|odessa|org|pl|poltava|pp|rovno|rv|sebastopol|sumy|te|ternopil|uzhgorod|vinnica|vn|zaporizhzhe|zhitomir|zp|zt\",ug:\"ac|co|go|ne|or|org|sc\",uk:\"ac|bl|british-library|co|cym|gov|govt|icnet|jet|lea|ltd|me|mil|mod|national-library-scotland|nel|net|nhs|nic|nls|org|orgn|parliament|plc|police|sch|scot|soc\",\nus:\"dni|fed|isa|kids|nsn\",uy:\"com|edu|gub|mil|net|org\",ve:\"co|com|edu|gob|info|mil|net|org|web\",vi:\"co|com|k12|net|org\",vn:\"ac|biz|com|edu|gov|health|info|int|name|net|org|pro\",ye:\"co|com|gov|ltd|me|net|org|plc\",yu:\"ac|co|edu|gov|org\",za:\"ac|agric|alt|bourse|city|co|cybernet|db|edu|gov|grondar|iaccess|imt|inca|landesign|law|mil|net|ngo|nis|nom|olivetti|org|pix|school|tm|web\",zm:\"ac|co|com|edu|gov|net|org|sch\"},has_expression:null,is_expression:null,has:function(d){return!!d.match(m.has_expression)},\nis:function(d){return!!d.match(m.is_expression)},get:function(d){return(d=d.match(m.has_expression))&&d[1]||null},noConflict:function(){e.SecondLevelDomains===this&&(e.SecondLevelDomains=k);return this},init:function(){var d=\"\",e;for(e in m.list)u.call(m.list,e)&&(d+=\"|(\"+(\"(\"+m.list[e]+\").\"+e)+\")\");m.has_expression=RegExp(\"\\\\.(\"+d.substr(1)+\")$\",\"i\");m.is_expression=RegExp(\"^(\"+d.substr(1)+\")$\",\"i\")}};m.init();return m});\n(function(e,k){\"object\"===typeof exports?module.exports=k(require(\"./punycode\"),require(\"./IPv6\"),require(\"./SecondLevelDomains\")):\"function\"===typeof define&&define.amd?define([\"./punycode\",\"./IPv6\",\"./SecondLevelDomains\"],k):e.URI=k(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(this,function(e,k,u,m){function d(a,b){if(!(this instanceof d))return new d(a,b);void 0===a&&(a=\"undefined\"!==typeof location?location.href+\"\":\"\");this.href(a);return void 0!==b?this.absoluteTo(b):this}function g(a){return a.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g,\n\"\\\\$1\")}function q(a){return void 0===a?\"Undefined\":String(Object.prototype.toString.call(a)).slice(8,-1)}function l(a){return\"Array\"===q(a)}function r(a,b){var c,d;if(l(b)){c=0;for(d=b.length;c<d;c++)if(!r(a,b[c]))return!1;return!0}var p=q(b);c=0;for(d=a.length;c<d;c++)if(\"RegExp\"===p){if(\"string\"===typeof a[c]&&a[c].match(b))return!0}else if(a[c]===b)return!0;return!1}function z(a,b){if(!l(a)||!l(b)||a.length!==b.length)return!1;a.sort();b.sort();for(var c=0,d=a.length;c<d;c++)if(a[c]!==b[c])return!1;\nreturn!0}function D(a){return escape(a)}function E(a){return encodeURIComponent(a).replace(/[!'()*]/g,D).replace(/\\*/g,\"%2A\")}var C=m&&m.URI;d.version=\"1.12.0\";var f=d.prototype,w=Object.prototype.hasOwnProperty;d._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:d.duplicateQueryParameters,escapeQuerySpace:d.escapeQuerySpace}};d.duplicateQueryParameters=!1;d.escapeQuerySpace=!0;d.protocol_expression=\n/^[a-z][a-z0-9.+-]*$/i;d.idn_expression=/[^a-z0-9\\.-]/i;d.punycode_expression=/(xn--)/i;d.ip4_expression=/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;d.ip6_expression=/^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$/;\nd.find_uri_expression=/\\b((?:[a-z][\\w-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?\\u00ab\\u00bb\\u201c\\u201d\\u2018\\u2019]))/ig;d.findUri={start:/\\b(?:([a-z][a-z0-9.+-]*:\\/\\/)|www\\.)/gi,end:/[\\s\\r\\n]|$/,trim:/[`!()\\[\\]{};:'\".,<>?\\u00ab\\u00bb\\u201c\\u201d\\u201e\\u2018\\u2019]+$/};d.defaultPorts={http:\"80\",https:\"443\",ftp:\"21\",gopher:\"70\",ws:\"80\",wss:\"443\"};d.invalid_hostname_characters=\n/[^a-zA-Z0-9\\.-]/;d.domAttributes={a:\"href\",blockquote:\"cite\",link:\"href\",base:\"href\",script:\"src\",form:\"action\",img:\"src\",area:\"href\",iframe:\"src\",embed:\"src\",source:\"src\",track:\"src\",input:\"src\"};d.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();return\"input\"===b&&\"image\"!==a.type?void 0:d.domAttributes[b]}};d.encode=E;d.decode=decodeURIComponent;d.iso8859=function(){d.encode=escape;d.decode=unescape};d.unicode=function(){d.encode=E;d.decode=decodeURIComponent};d.characters=\n{pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{\"%24\":\"$\",\"%26\":\"&\",\"%2B\":\"+\",\"%2C\":\",\",\"%3B\":\";\",\"%3D\":\"=\",\"%3A\":\":\",\"%40\":\"@\"}},decode:{expression:/[\\/\\?#]/g,map:{\"/\":\"%2F\",\"?\":\"%3F\",\"#\":\"%23\"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{\"%3A\":\":\",\"%2F\":\"/\",\"%3F\":\"?\",\"%23\":\"#\",\"%5B\":\"[\",\"%5D\":\"]\",\"%40\":\"@\",\"%21\":\"!\",\"%24\":\"$\",\"%26\":\"&\",\"%27\":\"'\",\"%28\":\"(\",\"%29\":\")\",\"%2A\":\"*\",\"%2B\":\"+\",\"%2C\":\",\",\"%3B\":\";\",\"%3D\":\"=\"}}}};d.encodeQuery=\nfunction(a,b){var c=d.encode(a+\"\");return b?c.replace(/%20/g,\"+\"):c};d.decodeQuery=function(a,b){a+=\"\";try{return d.decode(b?a.replace(/\\+/g,\"%20\"):a)}catch(c){return a}};d.recodePath=function(a){a=(a+\"\").split(\"/\");for(var b=0,c=a.length;b<c;b++)a[b]=d.encodePathSegment(d.decode(a[b]));return a.join(\"/\")};d.decodePath=function(a){a=(a+\"\").split(\"/\");for(var b=0,c=a.length;b<c;b++)a[b]=d.decodePathSegment(a[b]);return a.join(\"/\")};var s={encode:\"encode\",decode:\"decode\"},v,y=function(a,b){return function(c){return d[b](c+\n\"\").replace(d.characters[a][b].expression,function(c){return d.characters[a][b].map[c]})}};for(v in s)d[v+\"PathSegment\"]=y(\"pathname\",s[v]);d.encodeReserved=y(\"reserved\",\"encode\");d.parse=function(a,b){var c;b||(b={});c=a.indexOf(\"#\");-1<c&&(b.fragment=a.substring(c+1)||null,a=a.substring(0,c));c=a.indexOf(\"?\");-1<c&&(b.query=a.substring(c+1)||null,a=a.substring(0,c));\"//\"===a.substring(0,2)?(b.protocol=null,a=a.substring(2),a=d.parseAuthority(a,b)):(c=a.indexOf(\":\"),-1<c&&(b.protocol=a.substring(0,\nc)||null,b.protocol&&!b.protocol.match(d.protocol_expression)?b.protocol=void 0:\"file\"===b.protocol?a=a.substring(c+3):\"//\"===a.substring(c+1,c+3)?(a=a.substring(c+3),a=d.parseAuthority(a,b)):(a=a.substring(c+1),b.urn=!0)));b.path=a;return b};d.parseHost=function(a,b){var c=a.indexOf(\"/\"),d;-1===c&&(c=a.length);\"[\"===a.charAt(0)?(d=a.indexOf(\"]\"),b.hostname=a.substring(1,d)||null,b.port=a.substring(d+2,c)||null):a.indexOf(\":\")!==a.lastIndexOf(\":\")?(b.hostname=a.substring(0,c)||null,b.port=null):(d=\na.substring(0,c).split(\":\"),b.hostname=d[0]||null,b.port=d[1]||null);b.hostname&&\"/\"!==a.substring(c).charAt(0)&&(c++,a=\"/\"+a);return a.substring(c)||\"/\"};d.parseAuthority=function(a,b){a=d.parseUserinfo(a,b);return d.parseHost(a,b)};d.parseUserinfo=function(a,b){var c=a.indexOf(\"/\"),h=-1<c?a.lastIndexOf(\"@\",c):a.indexOf(\"@\");-1<h&&(-1===c||h<c)?(c=a.substring(0,h).split(\":\"),b.username=c[0]?d.decode(c[0]):null,c.shift(),b.password=c[0]?d.decode(c.join(\":\")):null,a=a.substring(h+1)):(b.username=null,\nb.password=null);return a};d.parseQuery=function(a,b){if(!a)return{};a=a.replace(/&+/g,\"&\").replace(/^\\?*&*|&+$/g,\"\");if(!a)return{};for(var c={},h=a.split(\"&\"),p=h.length,n,e,f=0;f<p;f++)n=h[f].split(\"=\"),e=d.decodeQuery(n.shift(),b),n=n.length?d.decodeQuery(n.join(\"=\"),b):null,c[e]?(\"string\"===typeof c[e]&&(c[e]=[c[e]]),c[e].push(n)):c[e]=n;return c};d.build=function(a){var b=\"\";a.protocol&&(b+=a.protocol+\":\");a.urn||!b&&!a.hostname||(b+=\"//\");b+=d.buildAuthority(a)||\"\";\"string\"===typeof a.path&&\n(\"/\"!==a.path.charAt(0)&&\"string\"===typeof a.hostname&&(b+=\"/\"),b+=a.path);\"string\"===typeof a.query&&a.query&&(b+=\"?\"+a.query);\"string\"===typeof a.fragment&&a.fragment&&(b+=\"#\"+a.fragment);return b};d.buildHost=function(a){var b=\"\";if(a.hostname)d.ip6_expression.test(a.hostname)?b=a.port?b+(\"[\"+a.hostname+\"]:\"+a.port):b+a.hostname:(b+=a.hostname,a.port&&(b+=\":\"+a.port));else return\"\";return b};d.buildAuthority=function(a){return d.buildUserinfo(a)+d.buildHost(a)};d.buildUserinfo=function(a){var b=\n\"\";a.username&&(b+=d.encode(a.username),a.password&&(b+=\":\"+d.encode(a.password)),b+=\"@\");return b};d.buildQuery=function(a,b,c){var h=\"\",p,e,f,k;for(e in a)if(w.call(a,e)&&e)if(l(a[e]))for(p={},f=0,k=a[e].length;f<k;f++)void 0!==a[e][f]&&void 0===p[a[e][f]+\"\"]&&(h+=\"&\"+d.buildQueryParameter(e,a[e][f],c),!0!==b&&(p[a[e][f]+\"\"]=!0));else void 0!==a[e]&&(h+=\"&\"+d.buildQueryParameter(e,a[e],c));return h.substring(1)};d.buildQueryParameter=function(a,b,c){return d.encodeQuery(a,c)+(null!==b?\"=\"+d.encodeQuery(b,\nc):\"\")};d.addQuery=function(a,b,c){if(\"object\"===typeof b)for(var h in b)w.call(b,h)&&d.addQuery(a,h,b[h]);else if(\"string\"===typeof b)void 0===a[b]?a[b]=c:(\"string\"===typeof a[b]&&(a[b]=[a[b]]),l(c)||(c=[c]),a[b]=a[b].concat(c));else throw new TypeError(\"URI.addQuery() accepts an object, string as the name parameter\");};d.removeQuery=function(a,b,c){var h;if(l(b))for(c=0,h=b.length;c<h;c++)a[b[c]]=void 0;else if(\"object\"===typeof b)for(h in b)w.call(b,h)&&d.removeQuery(a,h,b[h]);else if(\"string\"===\ntypeof b)if(void 0!==c)if(a[b]===c)a[b]=void 0;else{if(l(a[b])){h=a[b];var p={},e,f;if(l(c))for(e=0,f=c.length;e<f;e++)p[c[e]]=!0;else p[c]=!0;e=0;for(f=h.length;e<f;e++)void 0!==p[h[e]]&&(h.splice(e,1),f--,e--);a[b]=h}}else a[b]=void 0;else throw new TypeError(\"URI.addQuery() accepts an object, string as the first parameter\");};d.hasQuery=function(a,b,c,h){if(\"object\"===typeof b){for(var e in b)if(w.call(b,e)&&!d.hasQuery(a,e,b[e]))return!1;return!0}if(\"string\"!==typeof b)throw new TypeError(\"URI.hasQuery() accepts an object, string as the name parameter\");\nswitch(q(c)){case \"Undefined\":return b in a;case \"Boolean\":return a=Boolean(l(a[b])?a[b].length:a[b]),c===a;case \"Function\":return!!c(a[b],b,a);case \"Array\":return l(a[b])?(h?r:z)(a[b],c):!1;case \"RegExp\":return l(a[b])?h?r(a[b],c):!1:Boolean(a[b]&&a[b].match(c));case \"Number\":c=String(c);case \"String\":return l(a[b])?h?r(a[b],c):!1:a[b]===c;default:throw new TypeError(\"URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter\");}};d.commonPath=function(a,b){var c=\nMath.min(a.length,b.length),d;for(d=0;d<c;d++)if(a.charAt(d)!==b.charAt(d)){d--;break}if(1>d)return a.charAt(0)===b.charAt(0)&&\"/\"===a.charAt(0)?\"/\":\"\";if(\"/\"!==a.charAt(d)||\"/\"!==b.charAt(d))d=a.substring(0,d).lastIndexOf(\"/\");return a.substring(0,d+1)};d.withinString=function(a,b,c){c||(c={});var h=c.start||d.findUri.start,e=c.end||d.findUri.end,f=c.trim||d.findUri.trim,k=/[a-z0-9-]=[\"']?$/i;for(h.lastIndex=0;;){var g=h.exec(a);if(!g)break;g=g.index;if(c.ignoreHtml){var l=a.slice(Math.max(g-3,0),\ng);if(l&&k.test(l))continue}var l=g+a.slice(g).search(e),q=a.slice(g,l).replace(f,\"\");c.ignore&&c.ignore.test(q)||(l=g+q.length,q=b(q,g,l,a),a=a.slice(0,g)+q+a.slice(l),h.lastIndex=g+q.length)}h.lastIndex=0;return a};d.ensureValidHostname=function(a){if(a.match(d.invalid_hostname_characters)){if(!e)throw new TypeError(\"Hostname '\"+a+\"' contains characters other than [A-Z0-9.-] and Punycode.js is not available\");if(e.toASCII(a).match(d.invalid_hostname_characters))throw new TypeError(\"Hostname '\"+\na+\"' contains characters other than [A-Z0-9.-]\");}};d.noConflict=function(a){if(a)return a={URI:this.noConflict()},URITemplate&&\"function\"==typeof URITemplate.noConflict&&(a.URITemplate=URITemplate.noConflict()),k&&\"function\"==typeof k.noConflict&&(a.IPv6=k.noConflict()),SecondLevelDomains&&\"function\"==typeof SecondLevelDomains.noConflict&&(a.SecondLevelDomains=SecondLevelDomains.noConflict()),a;m.URI===this&&(m.URI=C);return this};f.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===\na||this._deferred_build)this._string=d.build(this._parts),this._deferred_build=!1;return this};f.clone=function(){return new d(this)};f.valueOf=f.toString=function(){return this.build(!1)._string};s={protocol:\"protocol\",username:\"username\",password:\"password\",hostname:\"hostname\",port:\"port\"};y=function(a){return function(b,c){if(void 0===b)return this._parts[a]||\"\";this._parts[a]=b||null;this.build(!c);return this}};for(v in s)f[v]=y(s[v]);s={query:\"?\",fragment:\"#\"};y=function(a,b){return function(c,\nd){if(void 0===c)return this._parts[a]||\"\";null!==c&&(c+=\"\",c.charAt(0)===b&&(c=c.substring(1)));this._parts[a]=c;this.build(!d);return this}};for(v in s)f[v]=y(v,s[v]);s={search:[\"?\",\"query\"],hash:[\"#\",\"fragment\"]};y=function(a,b){return function(c,d){var e=this[a](c,d);return\"string\"===typeof e&&e.length?b+e:e}};for(v in s)f[v]=y(s[v][1],s[v][0]);f.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?\"/\":\"\");return a?d.decodePath(c):c}this._parts.path=a?d.recodePath(a):\n\"/\";this.build(!b);return this};f.path=f.pathname;f.href=function(a,b){var c;if(void 0===a)return this.toString();this._string=\"\";this._parts=d._parts();var h=a instanceof d,e=\"object\"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(e=d.getDomAttribute(a),a=a[e]||\"\",e=!1);!h&&e&&void 0!==a.pathname&&(a=a.toString());if(\"string\"===typeof a)this._parts=d.parse(a,this._parts);else if(h||e)for(c in h=h?a._parts:a,h)w.call(this._parts,c)&&(this._parts[c]=h[c]);else throw new TypeError(\"invalid input\");\nthis.build(!b);return this};f.is=function(a){var b=!1,c=!1,h=!1,e=!1,f=!1,g=!1,k=!1,l=!this._parts.urn;this._parts.hostname&&(l=!1,c=d.ip4_expression.test(this._parts.hostname),h=d.ip6_expression.test(this._parts.hostname),b=c||h,f=(e=!b)&&u&&u.has(this._parts.hostname),g=e&&d.idn_expression.test(this._parts.hostname),k=e&&d.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case \"relative\":return l;case \"absolute\":return!l;case \"domain\":case \"name\":return e;case \"sld\":return f;\ncase \"ip\":return b;case \"ip4\":case \"ipv4\":case \"inet4\":return c;case \"ip6\":case \"ipv6\":case \"inet6\":return h;case \"idn\":return g;case \"url\":return!this._parts.urn;case \"urn\":return!!this._parts.urn;case \"punycode\":return k}return null};var I=f.protocol,H=f.port,G=f.hostname;f.protocol=function(a,b){if(void 0!==a&&a&&(a=a.replace(/:(\\/\\/)?$/,\"\"),!a.match(d.protocol_expression)))throw new TypeError(\"Protocol '\"+a+\"' contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]\");return I.call(this,\na,b)};f.scheme=f.protocol;f.port=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;if(void 0!==a&&(0===a&&(a=null),a&&(a+=\"\",\":\"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError(\"Port '\"+a+\"' contains characters other than [0-9]\");return H.call(this,a,b)};f.hostname=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;if(void 0!==a){var c={};d.parseHost(a,c);a=c.hostname}return G.call(this,a,b)};f.host=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;\nif(void 0===a)return this._parts.hostname?d.buildHost(this._parts):\"\";d.parseHost(a,this._parts);this.build(!b);return this};f.authority=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;if(void 0===a)return this._parts.hostname?d.buildAuthority(this._parts):\"\";d.parseAuthority(a,this._parts);this.build(!b);return this};f.userinfo=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;if(void 0===a){if(!this._parts.username)return\"\";var c=d.buildUserinfo(this._parts);return c.substring(0,\nc.length-1)}\"@\"!==a[a.length-1]&&(a+=\"@\");d.parseUserinfo(a,this._parts);this.build(!b);return this};f.resource=function(a,b){var c;if(void 0===a)return this.path()+this.search()+this.hash();c=d.parse(a);this._parts.path=c.path;this._parts.query=c.query;this._parts.fragment=c.fragment;this.build(!b);return this};f.subdomain=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;if(void 0===a){if(!this._parts.hostname||this.is(\"IP\"))return\"\";var c=this._parts.hostname.length-this.domain().length-\n1;return this._parts.hostname.substring(0,c)||\"\"}c=this._parts.hostname.length-this.domain().length;c=this._parts.hostname.substring(0,c);c=RegExp(\"^\"+g(c));a&&\".\"!==a.charAt(a.length-1)&&(a+=\".\");a&&d.ensureValidHostname(a);this._parts.hostname=this._parts.hostname.replace(c,a);this.build(!b);return this};f.domain=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;\"boolean\"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is(\"IP\"))return\"\";var c=this._parts.hostname.match(/\\./g);\nif(c&&2>c.length)return this._parts.hostname;c=this._parts.hostname.length-this.tld(b).length-1;c=this._parts.hostname.lastIndexOf(\".\",c-1)+1;return this._parts.hostname.substring(c)||\"\"}if(!a)throw new TypeError(\"cannot set domain empty\");d.ensureValidHostname(a);!this._parts.hostname||this.is(\"IP\")?this._parts.hostname=a:(c=RegExp(g(this.domain())+\"$\"),this._parts.hostname=this._parts.hostname.replace(c,a));this.build(!b);return this};f.tld=function(a,b){if(this._parts.urn)return void 0===a?\"\":\nthis;\"boolean\"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is(\"IP\"))return\"\";var c=this._parts.hostname.lastIndexOf(\".\"),c=this._parts.hostname.substring(c+1);return!0!==b&&u&&u.list[c.toLowerCase()]?u.get(this._parts.hostname)||c:c}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(u&&u.is(a))c=RegExp(g(this.tld())+\"$\"),this._parts.hostname=this._parts.hostname.replace(c,a);else throw new TypeError(\"TLD '\"+a+\"' contains characters other than [A-Z0-9]\");else{if(!this._parts.hostname||\nthis.is(\"IP\"))throw new ReferenceError(\"cannot set TLD on non-domain host\");c=RegExp(g(this.tld())+\"$\");this._parts.hostname=this._parts.hostname.replace(c,a)}else throw new TypeError(\"cannot set TLD empty\");this.build(!b);return this};f.directory=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return\"\";if(\"/\"===this._parts.path)return\"/\";var c=this._parts.path.length-this.filename().length-1,c=this._parts.path.substring(0,\nc)||(this._parts.hostname?\"/\":\"\");return a?d.decodePath(c):c}c=this._parts.path.length-this.filename().length;c=this._parts.path.substring(0,c);c=RegExp(\"^\"+g(c));this.is(\"relative\")||(a||(a=\"/\"),\"/\"!==a.charAt(0)&&(a=\"/\"+a));a&&\"/\"!==a.charAt(a.length-1)&&(a+=\"/\");a=d.recodePath(a);this._parts.path=this._parts.path.replace(c,a);this.build(!b);return this};f.filename=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;if(void 0===a||!0===a){if(!this._parts.path||\"/\"===this._parts.path)return\"\";\nvar c=this._parts.path.lastIndexOf(\"/\"),c=this._parts.path.substring(c+1);return a?d.decodePathSegment(c):c}c=!1;\"/\"===a.charAt(0)&&(a=a.substring(1));a.match(/\\.?\\//)&&(c=!0);var h=RegExp(g(this.filename())+\"$\");a=d.recodePath(a);this._parts.path=this._parts.path.replace(h,a);c?this.normalizePath(b):this.build(!b);return this};f.suffix=function(a,b){if(this._parts.urn)return void 0===a?\"\":this;if(void 0===a||!0===a){if(!this._parts.path||\"/\"===this._parts.path)return\"\";var c=this.filename(),h=c.lastIndexOf(\".\");\nif(-1===h)return\"\";c=c.substring(h+1);c=/^[a-z0-9%]+$/i.test(c)?c:\"\";return a?d.decodePathSegment(c):c}\".\"===a.charAt(0)&&(a=a.substring(1));if(c=this.suffix())h=a?RegExp(g(c)+\"$\"):RegExp(g(\".\"+c)+\"$\");else{if(!a)return this;this._parts.path+=\".\"+d.recodePath(a)}h&&(a=d.recodePath(a),this._parts.path=this._parts.path.replace(h,a));this.build(!b);return this};f.segment=function(a,b,c){var d=this._parts.urn?\":\":\"/\",e=this.path(),f=\"/\"===e.substring(0,1),e=e.split(d);void 0!==a&&\"number\"!==typeof a&&\n(c=b,b=a,a=void 0);if(void 0!==a&&\"number\"!==typeof a)throw Error(\"Bad segment '\"+a+\"', must be 0-based integer\");f&&e.shift();0>a&&(a=Math.max(e.length+a,0));if(void 0===b)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(l(b)){e=[];a=0;for(var g=b.length;a<g;a++)if(b[a].length||e.length&&e[e.length-1].length)e.length&&!e[e.length-1].length&&e.pop(),e.push(b[a])}else{if(b||\"string\"===typeof b)\"\"===e[e.length-1]?e[e.length-1]=b:e.push(b)}else b||\"string\"===typeof b&&b.length?e[a]=b:e.splice(a,\n1);f&&e.unshift(\"\");return this.path(e.join(d),c)};f.segmentCoded=function(a,b,c){var e,f;\"number\"!==typeof a&&(c=b,b=a,a=void 0);if(void 0===b){a=this.segment(a,b,c);if(l(a))for(e=0,f=a.length;e<f;e++)a[e]=d.decode(a[e]);else a=void 0!==a?d.decode(a):void 0;return a}if(l(b))for(e=0,f=b.length;e<f;e++)b[e]=d.decode(b[e]);else b=\"string\"===typeof b?d.encode(b):b;return this.segment(a,b,c)};var F=f.query;f.query=function(a,b){if(!0===a)return d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);\nif(\"function\"===typeof a){var c=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,c);this._parts.query=d.buildQuery(e||c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!b);return this}return void 0!==a&&\"string\"!==typeof a?(this._parts.query=d.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this):F.call(this,a,b)};f.setQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);\nif(\"object\"===typeof a)for(var f in a)w.call(a,f)&&(e[f]=a[f]);else if(\"string\"===typeof a)e[a]=void 0!==b?b:null;else throw new TypeError(\"URI.addQuery() accepts an object, string as the name parameter\");this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);\"string\"!==typeof a&&(c=b);this.build(!c);return this};f.addQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);d.addQuery(e,a,void 0===b?null:b);this._parts.query=\nd.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);\"string\"!==typeof a&&(c=b);this.build(!c);return this};f.removeQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);d.removeQuery(e,a,b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);\"string\"!==typeof a&&(c=b);this.build(!c);return this};f.hasQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);\nreturn d.hasQuery(e,a,b,c)};f.setSearch=f.setQuery;f.addSearch=f.addQuery;f.removeSearch=f.removeQuery;f.hasSearch=f.hasQuery;f.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};f.normalizeProtocol=function(a){\"string\"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),\nthis.build(!a));return this};f.normalizeHostname=function(a){this._parts.hostname&&(this.is(\"IDN\")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is(\"IPv6\")&&k&&(this._parts.hostname=k.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!a));return this};f.normalizePort=function(a){\"string\"===typeof this._parts.protocol&&this._parts.port===d.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};f.normalizePath=\nfunction(a){if(this._parts.urn||!this._parts.path||\"/\"===this._parts.path)return this;var b,c=this._parts.path,e=\"\",f,g;\"/\"!==c.charAt(0)&&(b=!0,c=\"/\"+c);c=c.replace(/(\\/(\\.\\/)+)|(\\/\\.$)/g,\"/\").replace(/\\/{2,}/g,\"/\");b&&(e=c.substring(1).match(/^(\\.\\.\\/)+/)||\"\")&&(e=e[0]);for(;;){f=c.indexOf(\"/..\");if(-1===f)break;else if(0===f){c=c.substring(3);continue}g=c.substring(0,f).lastIndexOf(\"/\");-1===g&&(g=f);c=c.substring(0,g)+c.substring(f+3)}b&&this.is(\"relative\")&&(c=e+c.substring(1));c=d.recodePath(c);\nthis._parts.path=c;this.build(!a);return this};f.normalizePathname=f.normalizePath;f.normalizeQuery=function(a){\"string\"===typeof this._parts.query&&(this._parts.query.length?this.query(d.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};f.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};f.normalizeSearch=f.normalizeQuery;f.normalizeHash=f.normalizeFragment;f.iso8859=function(){var a=\nd.encode,b=d.decode;d.encode=escape;d.decode=decodeURIComponent;this.normalize();d.encode=a;d.decode=b;return this};f.unicode=function(){var a=d.encode,b=d.decode;d.encode=E;d.decode=unescape;this.normalize();d.encode=a;d.decode=b;return this};f.readable=function(){var a=this.clone();a.username(\"\").password(\"\").normalize();var b=\"\";a._parts.protocol&&(b+=a._parts.protocol+\"://\");a._parts.hostname&&(a.is(\"punycode\")&&e?(b+=e.toUnicode(a._parts.hostname),a._parts.port&&(b+=\":\"+a._parts.port)):b+=a.host());\na._parts.hostname&&a._parts.path&&\"/\"!==a._parts.path.charAt(0)&&(b+=\"/\");b+=a.path(!0);if(a._parts.query){for(var c=\"\",f=0,g=a._parts.query.split(\"&\"),k=g.length;f<k;f++){var l=(g[f]||\"\").split(\"=\"),c=c+(\"&\"+d.decodeQuery(l[0],this._parts.escapeQuerySpace).replace(/&/g,\"%26\"));void 0!==l[1]&&(c+=\"=\"+d.decodeQuery(l[1],this._parts.escapeQuerySpace).replace(/&/g,\"%26\"))}b+=\"?\"+c.substring(1)}return b+=d.decodeQuery(a.hash(),!0)};f.absoluteTo=function(a){var b=this.clone(),c=[\"protocol\",\"username\",\n\"password\",\"hostname\",\"port\"],e,f;if(this._parts.urn)throw Error(\"URNs do not have any generally defined hierarchical components\");a instanceof d||(a=new d(a));b._parts.protocol||(b._parts.protocol=a._parts.protocol);if(this._parts.hostname)return b;for(e=0;f=c[e];e++)b._parts[f]=a._parts[f];b._parts.path?\"..\"===b._parts.path.substring(-2)&&(b._parts.path+=\"/\"):(b._parts.path=a._parts.path,b._parts.query||(b._parts.query=a._parts.query));\"/\"!==b.path().charAt(0)&&(a=a.directory(),b._parts.path=(a?\na+\"/\":\"\")+b._parts.path,b.normalizePath());b.build();return b};f.relativeTo=function(a){var b=this.clone().normalize(),c,e,f,g;if(b._parts.urn)throw Error(\"URNs do not have any generally defined hierarchical components\");a=(new d(a)).normalize();c=b._parts;e=a._parts;f=b.path();g=a.path();if(\"/\"!==f.charAt(0))throw Error(\"URI is already relative\");if(\"/\"!==g.charAt(0))throw Error(\"Cannot calculate a URI relative to another relative URI\");c.protocol===e.protocol&&(c.protocol=null);if(c.username===\ne.username&&c.password===e.password&&null===c.protocol&&null===c.username&&null===c.password&&c.hostname===e.hostname&&c.port===e.port)c.hostname=null,c.port=null;else return b.build();if(f===g)return c.path=\"\",b.build();a=d.commonPath(b.path(),a.path());if(!a)return b.build();e=e.path.substring(a.length).replace(/[^\\/]*$/,\"\").replace(/.*?\\//g,\"../\");c.path=e+c.path.substring(a.length);return b.build()};f.equals=function(a){var b=this.clone();a=new d(a);var c={},e={},f={},g;b.normalize();a.normalize();\nif(b.toString()===a.toString())return!0;c=b.query();e=a.query();b.query(\"\");a.query(\"\");if(b.toString()!==a.toString()||c.length!==e.length)return!1;c=d.parseQuery(c,this._parts.escapeQuerySpace);e=d.parseQuery(e,this._parts.escapeQuerySpace);for(g in c)if(w.call(c,g)){if(!l(c[g])){if(c[g]!==e[g])return!1}else if(!z(c[g],e[g]))return!1;f[g]=!0}for(g in e)if(w.call(e,g)&&!f[g])return!1;return!0};f.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};f.escapeQuerySpace=\nfunction(a){this._parts.escapeQuerySpace=!!a;return this};return d});\n(function(e,k){\"object\"===typeof exports?module.exports=k(require(\"./URI\")):\"function\"===typeof define&&define.amd?define([\"./URI\"],k):k(e.URI)})(this,function(e){var k=e.prototype,u=k.fragment;e.fragmentPrefix=\"?\";var m=e._parts;e._parts=function(){var d=m();d.fragmentPrefix=e.fragmentPrefix;return d};k.fragmentPrefix=function(d){this._parts.fragmentPrefix=d;return this};k.fragment=function(d,g){var k=this._parts.fragmentPrefix,l=this._parts.fragment||\"\";return!0===d?l.substring(0,k.length)!==k?\n{}:e.parseQuery(l.substring(k.length)):void 0!==d&&\"string\"!==typeof d?(this._parts.fragment=k+e.buildQuery(d),this.build(!g),this):u.call(this,d,g)};k.addFragment=function(d,g,k){var l=this._parts.fragmentPrefix,m=e.parseQuery((this._parts.fragment||\"\").substring(l.length));e.addQuery(m,d,g);this._parts.fragment=l+e.buildQuery(m);\"string\"!==typeof d&&(k=g);this.build(!k);return this};k.removeFragment=function(d,g,k){var l=this._parts.fragmentPrefix,m=e.parseQuery((this._parts.fragment||\"\").substring(l.length));\ne.removeQuery(m,d,g);this._parts.fragment=l+e.buildQuery(m);\"string\"!==typeof d&&(k=g);this.build(!k);return this};k.addHash=k.addFragment;k.removeHash=k.removeFragment;return{}});\n/*global unescape, module, define, window, global*/\n\n/*\n UriTemplate Copyright (c) 2012-2013 Franz Antesberger. All Rights Reserved.\n Available via the MIT license.\n*/\n\n(function (exportCallback) {\n    \"use strict\";\n\nvar UriTemplateError = (function () {\n\n    function UriTemplateError (options) {\n        this.options = options;\n    }\n\n    UriTemplateError.prototype.toString = function () {\n        if (JSON && JSON.stringify) {\n            return JSON.stringify(this.options);\n        }\n        else {\n            return this.options;\n        }\n    };\n\n    return UriTemplateError;\n}());\n\nvar objectHelper = (function () {\n    function isArray (value) {\n        return Object.prototype.toString.apply(value) === '[object Array]';\n    }\n\n    function isString (value) {\n        return Object.prototype.toString.apply(value) === '[object String]';\n    }\n    \n    function isNumber (value) {\n        return Object.prototype.toString.apply(value) === '[object Number]';\n    }\n    \n    function isBoolean (value) {\n        return Object.prototype.toString.apply(value) === '[object Boolean]';\n    }\n    \n    function join (arr, separator) {\n        var\n            result = '',\n            first = true,\n            index;\n        for (index = 0; index < arr.length; index += 1) {\n            if (first) {\n                first = false;\n            }\n            else {\n                result += separator;\n            }\n            result += arr[index];\n        }\n        return result;\n    }\n\n    function map (arr, mapper) {\n        var\n            result = [],\n            index = 0;\n        for (; index < arr.length; index += 1) {\n            result.push(mapper(arr[index]));\n        }\n        return result;\n    }\n\n    function filter (arr, predicate) {\n        var\n            result = [],\n            index = 0;\n        for (; index < arr.length; index += 1) {\n            if (predicate(arr[index])) {\n                result.push(arr[index]);\n            }\n        }\n        return result;\n    }\n\n    function deepFreezeUsingObjectFreeze (object) {\n        if (typeof object !== \"object\" || object === null) {\n            return object;\n        }\n        Object.freeze(object);\n        var property, propertyName;\n        for (propertyName in object) {\n            if (object.hasOwnProperty(propertyName)) {\n                property = object[propertyName];\n                // be aware, arrays are 'object', too\n                if ((typeof property === \"object\") && !(property instanceof RegExp)) {\n                    deepFreeze(property);\n                }\n            }\n        }\n        return object;\n    }\n\n    function deepFreeze (object) {\n        if (typeof Object.freeze === 'function') {\n            return deepFreezeUsingObjectFreeze(object);\n        }\n        return object;\n    }\n\n\n    return {\n        isArray: isArray,\n        isString: isString,\n        isNumber: isNumber,\n        isBoolean: isBoolean,\n        join: join,\n        map: map,\n        filter: filter,\n        deepFreeze: deepFreeze\n    };\n}());\n\nvar charHelper = (function () {\n\n    function isAlpha (chr) {\n        return (chr >= 'a' && chr <= 'z') || ((chr >= 'A' && chr <= 'Z'));\n    }\n\n    function isDigit (chr) {\n        return chr >= '0' && chr <= '9';\n    }\n\n    function isHexDigit (chr) {\n        return isDigit(chr) || (chr >= 'a' && chr <= 'f') || (chr >= 'A' && chr <= 'F');\n    }\n\n    return {\n        isAlpha: isAlpha,\n        isDigit: isDigit,\n        isHexDigit: isHexDigit\n    };\n}());\n\nvar pctEncoder = (function () {\n    var utf8 = {\n        encode: function (chr) {\n            // see http://ecmanaut.blogspot.de/2006/07/encoding-decoding-utf8-in-javascript.html\n            return unescape(encodeURIComponent(chr));\n        },\n        numBytes: function (firstCharCode) {\n            if (firstCharCode <= 0x7F) {\n                return 1;\n            }\n            else if (0xC2 <= firstCharCode && firstCharCode <= 0xDF) {\n                return 2;\n            }\n            else if (0xE0 <= firstCharCode && firstCharCode <= 0xEF) {\n                return 3;\n            }\n            else if (0xF0 <= firstCharCode && firstCharCode <= 0xF4) {\n                return 4;\n            }\n            // no valid first octet\n            return 0;\n        },\n        isValidFollowingCharCode: function (charCode) {\n            return 0x80 <= charCode && charCode <= 0xBF;\n        }\n    };\n\n    /**\n     * encodes a character, if needed or not.\n     * @param chr\n     * @return pct-encoded character\n     */\n    function encodeCharacter (chr) {\n        var\n            result = '',\n            octets = utf8.encode(chr),\n            octet,\n            index;\n        for (index = 0; index < octets.length; index += 1) {\n            octet = octets.charCodeAt(index);\n            result += '%' + (octet < 0x10 ? '0' : '') + octet.toString(16).toUpperCase();\n        }\n        return result;\n    }\n\n    /**\n     * Returns, whether the given text at start is in the form 'percent hex-digit hex-digit', like '%3F'\n     * @param text\n     * @param start\n     * @return {boolean|*|*}\n     */\n    function isPercentDigitDigit (text, start) {\n        return text.charAt(start) === '%' && charHelper.isHexDigit(text.charAt(start + 1)) && charHelper.isHexDigit(text.charAt(start + 2));\n    }\n\n    /**\n     * Parses a hex number from start with length 2.\n     * @param text a string\n     * @param start the start index of the 2-digit hex number\n     * @return {Number}\n     */\n    function parseHex2 (text, start) {\n        return parseInt(text.substr(start, 2), 16);\n    }\n\n    /**\n     * Returns whether or not the given char sequence is a correctly pct-encoded sequence.\n     * @param chr\n     * @return {boolean}\n     */\n    function isPctEncoded (chr) {\n        if (!isPercentDigitDigit(chr, 0)) {\n            return false;\n        }\n        var firstCharCode = parseHex2(chr, 1);\n        var numBytes = utf8.numBytes(firstCharCode);\n        if (numBytes === 0) {\n            return false;\n        }\n        for (var byteNumber = 1; byteNumber < numBytes; byteNumber += 1) {\n            if (!isPercentDigitDigit(chr, 3*byteNumber) || !utf8.isValidFollowingCharCode(parseHex2(chr, 3*byteNumber + 1))) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * Reads as much as needed from the text, e.g. '%20' or '%C3%B6'. It does not decode!\n     * @param text\n     * @param startIndex\n     * @return the character or pct-string of the text at startIndex\n     */\n    function pctCharAt(text, startIndex) {\n        var chr = text.charAt(startIndex);\n        if (!isPercentDigitDigit(text, startIndex)) {\n            return chr;\n        }\n        var utf8CharCode = parseHex2(text, startIndex + 1);\n        var numBytes = utf8.numBytes(utf8CharCode);\n        if (numBytes === 0) {\n            return chr;\n        }\n        for (var byteNumber = 1; byteNumber < numBytes; byteNumber += 1) {\n            if (!isPercentDigitDigit(text, startIndex + 3 * byteNumber) || !utf8.isValidFollowingCharCode(parseHex2(text, startIndex + 3 * byteNumber + 1))) {\n                return chr;\n            }\n        }\n        return text.substr(startIndex, 3 * numBytes);\n    }\n\n    return {\n        encodeCharacter: encodeCharacter,\n        isPctEncoded: isPctEncoded,\n        pctCharAt: pctCharAt\n    };\n}());\n\nvar rfcCharHelper = (function () {\n\n    /**\n     * Returns if an character is an varchar character according 2.3 of rfc 6570\n     * @param chr\n     * @return (Boolean)\n     */\n    function isVarchar (chr) {\n        return charHelper.isAlpha(chr) || charHelper.isDigit(chr) || chr === '_' || pctEncoder.isPctEncoded(chr);\n    }\n\n    /**\n     * Returns if chr is an unreserved character according 1.5 of rfc 6570\n     * @param chr\n     * @return {Boolean}\n     */\n    function isUnreserved (chr) {\n        return charHelper.isAlpha(chr) || charHelper.isDigit(chr) || chr === '-' || chr === '.' || chr === '_' || chr === '~';\n    }\n\n    /**\n     * Returns if chr is an reserved character according 1.5 of rfc 6570\n     * or the percent character mentioned in 3.2.1.\n     * @param chr\n     * @return {Boolean}\n     */\n    function isReserved (chr) {\n        return chr === ':' || chr === '/' || chr === '?' || chr === '#' || chr === '[' || chr === ']' || chr === '@' || chr === '!' || chr === '$' || chr === '&' || chr === '(' ||\n            chr === ')' || chr === '*' || chr === '+' || chr === ',' || chr === ';' || chr === '=' || chr === \"'\";\n    }\n\n    return {\n        isVarchar: isVarchar,\n        isUnreserved: isUnreserved,\n        isReserved: isReserved\n    };\n\n}());\n\n/**\n * encoding of rfc 6570\n */\nvar encodingHelper = (function () {\n\n    function encode (text, passReserved) {\n        var\n            result = '',\n            index,\n            chr = '';\n        if (typeof text === \"number\" || typeof text === \"boolean\") {\n            text = text.toString();\n        }\n        for (index = 0; index < text.length; index += chr.length) {\n            chr = text.charAt(index);\n            result += rfcCharHelper.isUnreserved(chr) || (passReserved && rfcCharHelper.isReserved(chr)) ? chr : pctEncoder.encodeCharacter(chr);\n        }\n        return result;\n    }\n\n    function encodePassReserved (text) {\n        return encode(text, true);\n    }\n\n    function encodeLiteralCharacter (literal, index) {\n        var chr = pctEncoder.pctCharAt(literal, index);\n        if (chr.length > 1) {\n            return chr;\n        }\n        else {\n            return rfcCharHelper.isReserved(chr) || rfcCharHelper.isUnreserved(chr) ? chr : pctEncoder.encodeCharacter(chr);\n        }\n    }\n\n    function encodeLiteral (literal) {\n        var\n            result = '',\n            index,\n            chr = '';\n        for (index = 0; index < literal.length; index += chr.length) {\n            chr = pctEncoder.pctCharAt(literal, index);\n            if (chr.length > 1) {\n                result += chr;\n            }\n            else {\n                result += rfcCharHelper.isReserved(chr) || rfcCharHelper.isUnreserved(chr) ? chr : pctEncoder.encodeCharacter(chr);\n            }\n        }\n        return result;\n    }\n\n    return {\n        encode: encode,\n        encodePassReserved: encodePassReserved,\n        encodeLiteral: encodeLiteral,\n        encodeLiteralCharacter: encodeLiteralCharacter\n    };\n\n}());\n\n\n// the operators defined by rfc 6570\nvar operators = (function () {\n\n    var\n        bySymbol = {};\n\n    function create (symbol) {\n        bySymbol[symbol] = {\n            symbol: symbol,\n            separator: (symbol === '?') ? '&' : (symbol === '' || symbol === '+' || symbol === '#') ? ',' : symbol,\n            named: symbol === ';' || symbol === '&' || symbol === '?',\n            ifEmpty: (symbol === '&' || symbol === '?') ? '=' : '',\n            first: (symbol === '+' ) ? '' : symbol,\n            encode: (symbol === '+' || symbol === '#') ? encodingHelper.encodePassReserved : encodingHelper.encode,\n            toString: function () {\n                return this.symbol;\n            }\n        };\n    }\n\n    create('');\n    create('+');\n    create('#');\n    create('.');\n    create('/');\n    create(';');\n    create('?');\n    create('&');\n    return {\n        valueOf: function (chr) {\n            if (bySymbol[chr]) {\n                return bySymbol[chr];\n            }\n            if (\"=,!@|\".indexOf(chr) >= 0) {\n                return null;\n            }\n            return bySymbol[''];\n        }\n    };\n}());\n\n\n/**\n * Detects, whether a given element is defined in the sense of rfc 6570\n * Section 2.3 of the RFC makes clear defintions:\n * * undefined and null are not defined.\n * * the empty string is defined\n * * an array (\"list\") is defined, if it is not empty (even if all elements are not defined)\n * * an object (\"map\") is defined, if it contains at least one property with defined value\n * @param object\n * @return {Boolean}\n */\nfunction isDefined (object) {\n    var\n        propertyName;\n    if (object === null || object === undefined) {\n        return false;\n    }\n    if (objectHelper.isArray(object)) {\n        // Section 2.3: A variable defined as a list value is considered undefined if the list contains zero members\n        return object.length > 0;\n    }\n    if (typeof object === \"string\" || typeof object === \"number\" || typeof object === \"boolean\") {\n        // falsy values like empty strings, false or 0 are \"defined\"\n        return true;\n    }\n    // else Object\n    for (propertyName in object) {\n        if (object.hasOwnProperty(propertyName) && isDefined(object[propertyName])) {\n            return true;\n        }\n    }\n    return false;\n}\n\nvar LiteralExpression = (function () {\n    function LiteralExpression (literal) {\n        this.literal = encodingHelper.encodeLiteral(literal);\n    }\n\n    LiteralExpression.prototype.expand = function () {\n        return this.literal;\n    };\n\n    LiteralExpression.prototype.toString = LiteralExpression.prototype.expand;\n\n    return LiteralExpression;\n}());\n\nvar parse = (function () {\n\n    function parseExpression (expressionText) {\n        var\n            operator,\n            varspecs = [],\n            varspec = null,\n            varnameStart = null,\n            maxLengthStart = null,\n            index,\n            chr = '';\n\n        function closeVarname () {\n            var varname = expressionText.substring(varnameStart, index);\n            if (varname.length === 0) {\n                throw new UriTemplateError({expressionText: expressionText, message: \"a varname must be specified\", position: index});\n            }\n            varspec = {varname: varname, exploded: false, maxLength: null};\n            varnameStart = null;\n        }\n\n        function closeMaxLength () {\n            if (maxLengthStart === index) {\n                throw new UriTemplateError({expressionText: expressionText, message: \"after a ':' you have to specify the length\", position: index});\n            }\n            varspec.maxLength = parseInt(expressionText.substring(maxLengthStart, index), 10);\n            maxLengthStart = null;\n        }\n\n        operator = (function (operatorText) {\n            var op = operators.valueOf(operatorText);\n            if (op === null) {\n                throw new UriTemplateError({expressionText: expressionText, message: \"illegal use of reserved operator\", position: index, operator: operatorText});\n            }\n            return op;\n        }(expressionText.charAt(0)));\n        index = operator.symbol.length;\n\n        varnameStart = index;\n\n        for (; index < expressionText.length; index += chr.length) {\n            chr = pctEncoder.pctCharAt(expressionText, index);\n\n            if (varnameStart !== null) {\n                // the spec says: varname =  varchar *( [\".\"] varchar )\n                // so a dot is allowed except for the first char\n                if (chr === '.') {\n                    if (varnameStart === index) {\n                        throw new UriTemplateError({expressionText: expressionText, message: \"a varname MUST NOT start with a dot\", position: index});\n                    }\n                    continue;\n                }\n                if (rfcCharHelper.isVarchar(chr)) {\n                    continue;\n                }\n                closeVarname();\n            }\n            if (maxLengthStart !== null) {\n                if (index === maxLengthStart && chr === '0') {\n                    throw new UriTemplateError({expressionText: expressionText, message: \"A :prefix must not start with digit 0\", position: index});\n                }\n                if (charHelper.isDigit(chr)) {\n                    if (index - maxLengthStart >= 4) {\n                        throw new UriTemplateError({expressionText: expressionText, message: \"A :prefix must have max 4 digits\", position: index});\n                    }\n                    continue;\n                }\n                closeMaxLength();\n            }\n            if (chr === ':') {\n                if (varspec.maxLength !== null) {\n                    throw new UriTemplateError({expressionText: expressionText, message: \"only one :maxLength is allowed per varspec\", position: index});\n                }\n                if (varspec.exploded) {\n                    throw new UriTemplateError({expressionText: expressionText, message: \"an exploeded varspec MUST NOT be varspeced\", position: index});\n                }\n                maxLengthStart = index + 1;\n                continue;\n            }\n            if (chr === '*') {\n                if (varspec === null) {\n                    throw new UriTemplateError({expressionText: expressionText, message: \"exploded without varspec\", position: index});\n                }\n                if (varspec.exploded) {\n                    throw new UriTemplateError({expressionText: expressionText, message: \"exploded twice\", position: index});\n                }\n                if (varspec.maxLength) {\n                    throw new UriTemplateError({expressionText: expressionText, message: \"an explode (*) MUST NOT follow to a prefix\", position: index});\n                }\n                varspec.exploded = true;\n                continue;\n            }\n            // the only legal character now is the comma\n            if (chr === ',') {\n                varspecs.push(varspec);\n                varspec = null;\n                varnameStart = index + 1;\n                continue;\n            }\n            throw new UriTemplateError({expressionText: expressionText, message: \"illegal character\", character: chr, position: index});\n        } // for chr\n        if (varnameStart !== null) {\n            closeVarname();\n        }\n        if (maxLengthStart !== null) {\n            closeMaxLength();\n        }\n        varspecs.push(varspec);\n        return new VariableExpression(expressionText, operator, varspecs);\n    }\n\n    function escape_regexp_string(string) {\n      // http://simonwillison.net/2006/Jan/20/escape/\n      return string.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n    }\n\n    function parse (uriTemplateText) {\n        // assert filled string\n        var\n            index,\n            chr,\n            expressions = [],\n            expression,\n            braceOpenIndex = null,\n            regexp_string = '',\n            can_match = true,\n            literalStart = 0;\n        for (index = 0; index < uriTemplateText.length; index += 1) {\n            chr = uriTemplateText.charAt(index);\n            if (literalStart !== null) {\n                if (chr === '}') {\n                    throw new UriTemplateError({templateText: uriTemplateText, message: \"unopened brace closed\", position: index});\n                }\n                if (chr === '{') {\n                    if (literalStart < index) {\n                        expression = new LiteralExpression(uriTemplateText.substring(literalStart, index));\n                        expressions.push(expression);\n                        regexp_string += escape_regexp_string(\n                            expression.literal);\n                    }\n                    literalStart = null;\n                    braceOpenIndex = index;\n                }\n                continue;\n            }\n\n            if (braceOpenIndex !== null) {\n                // here just { is forbidden\n                if (chr === '{') {\n                    throw new UriTemplateError({templateText: uriTemplateText, message: \"brace already opened\", position: index});\n                }\n                if (chr === '}') {\n                    if (braceOpenIndex + 1 === index) {\n                        throw new UriTemplateError({templateText: uriTemplateText, message: \"empty braces\", position: braceOpenIndex});\n                    }\n                    try {\n                        expression = parseExpression(uriTemplateText.substring(braceOpenIndex + 1, index));\n                    }\n                    catch (error) {\n                        if (error.prototype === UriTemplateError.prototype) {\n                            throw new UriTemplateError({templateText: uriTemplateText, message: error.options.message, position: braceOpenIndex + error.options.position, details: error.options});\n                        }\n                        throw error;\n                    }\n                    expressions.push(expression);\n                    if (expression.operator.symbol.length === 0) {\n                      regexp_string += \"([^/]+)\";\n                    } else {\n                      can_match = false;\n                    }\n                    braceOpenIndex = null;\n                    literalStart = index + 1;\n                }\n                continue;\n            }\n            throw new Error('reached unreachable code');\n        }\n        if (braceOpenIndex !== null) {\n            throw new UriTemplateError({templateText: uriTemplateText, message: \"unclosed brace\", position: braceOpenIndex});\n        }\n        if (literalStart < uriTemplateText.length) {\n            expression = new LiteralExpression(uriTemplateText.substring(literalStart));\n            expressions.push(expression);\n            regexp_string += escape_regexp_string(expression.literal);\n        }\n        if (can_match === false) {\n          regexp_string = undefined;\n        }\n        return new UriTemplate(uriTemplateText, expressions, regexp_string);\n    }\n\n    return parse;\n}());\n\nvar VariableExpression = (function () {\n    // helper function if JSON is not available\n    function prettyPrint (value) {\n        return (JSON && JSON.stringify) ? JSON.stringify(value) : value;\n    }\n\n    function isEmpty (value) {\n        if (!isDefined(value)) {\n            return true;\n        }\n        if (objectHelper.isString(value)) {\n            return value === '';\n        }\n        if (objectHelper.isNumber(value) || objectHelper.isBoolean(value)) {\n            return false;\n        }\n        if (objectHelper.isArray(value)) {\n            return value.length === 0;\n        }\n        for (var propertyName in value) {\n            if (value.hasOwnProperty(propertyName)) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    function propertyArray (object) {\n        var\n            result = [],\n            propertyName;\n        for (propertyName in object) {\n            if (object.hasOwnProperty(propertyName)) {\n                result.push({name: propertyName, value: object[propertyName]});\n            }\n        }\n        return result;\n    }\n\n    function VariableExpression (templateText, operator, varspecs) {\n        this.templateText = templateText;\n        this.operator = operator;\n        this.varspecs = varspecs;\n    }\n\n    VariableExpression.prototype.toString = function () {\n        return this.templateText;\n    };\n\n    function expandSimpleValue(varspec, operator, value) {\n        var result = '';\n        value = value.toString();\n        if (operator.named) {\n            result += encodingHelper.encodeLiteral(varspec.varname);\n            if (value === '') {\n                result += operator.ifEmpty;\n                return result;\n            }\n            result += '=';\n        }\n        if (varspec.maxLength !== null) {\n            value = value.substr(0, varspec.maxLength);\n        }\n        result += operator.encode(value);\n        return result;\n    }\n\n    function valueDefined (nameValue) {\n        return isDefined(nameValue.value);\n    }\n\n    function expandNotExploded(varspec, operator, value) {\n        var\n            arr = [],\n            result = '';\n        if (operator.named) {\n            result += encodingHelper.encodeLiteral(varspec.varname);\n            if (isEmpty(value)) {\n                result += operator.ifEmpty;\n                return result;\n            }\n            result += '=';\n        }\n        if (objectHelper.isArray(value)) {\n            arr = value;\n            arr = objectHelper.filter(arr, isDefined);\n            arr = objectHelper.map(arr, operator.encode);\n            result += objectHelper.join(arr, ',');\n        }\n        else {\n            arr = propertyArray(value);\n            arr = objectHelper.filter(arr, valueDefined);\n            arr = objectHelper.map(arr, function (nameValue) {\n                return operator.encode(nameValue.name) + ',' + operator.encode(nameValue.value);\n            });\n            result += objectHelper.join(arr, ',');\n        }\n        return result;\n    }\n\n    function expandExplodedNamed (varspec, operator, value) {\n        var\n            isArray = objectHelper.isArray(value),\n            arr = [];\n        if (isArray) {\n            arr = value;\n            arr = objectHelper.filter(arr, isDefined);\n            arr = objectHelper.map(arr, function (listElement) {\n                var tmp = encodingHelper.encodeLiteral(varspec.varname);\n                if (isEmpty(listElement)) {\n                    tmp += operator.ifEmpty;\n                }\n                else {\n                    tmp += '=' + operator.encode(listElement);\n                }\n                return tmp;\n            });\n        }\n        else {\n            arr = propertyArray(value);\n            arr = objectHelper.filter(arr, valueDefined);\n            arr = objectHelper.map(arr, function (nameValue) {\n                var tmp = encodingHelper.encodeLiteral(nameValue.name);\n                if (isEmpty(nameValue.value)) {\n                    tmp += operator.ifEmpty;\n                }\n                else {\n                    tmp += '=' + operator.encode(nameValue.value);\n                }\n                return tmp;\n            });\n        }\n        return objectHelper.join(arr, operator.separator);\n    }\n\n    function expandExplodedUnnamed (operator, value) {\n        var\n            arr = [],\n            result = '';\n        if (objectHelper.isArray(value)) {\n            arr = value;\n            arr = objectHelper.filter(arr, isDefined);\n            arr = objectHelper.map(arr, operator.encode);\n            result += objectHelper.join(arr, operator.separator);\n        }\n        else {\n            arr = propertyArray(value);\n            arr = objectHelper.filter(arr, function (nameValue) {\n                return isDefined(nameValue.value);\n            });\n            arr = objectHelper.map(arr, function (nameValue) {\n                return operator.encode(nameValue.name) + '=' + operator.encode(nameValue.value);\n            });\n            result += objectHelper.join(arr, operator.separator);\n        }\n        return result;\n    }\n\n\n    VariableExpression.prototype.expand = function (variables) {\n        var\n            expanded = [],\n            index,\n            varspec,\n            value,\n            valueIsArr,\n            oneExploded = false,\n            operator = this.operator;\n\n        // expand each varspec and join with operator's separator\n        for (index = 0; index < this.varspecs.length; index += 1) {\n            varspec = this.varspecs[index];\n            value = variables[varspec.varname];\n            // if (!isDefined(value)) {\n            // if (variables.hasOwnProperty(varspec.name)) {\n            if (value === null || value === undefined) {\n                continue;\n            }\n            if (varspec.exploded) {\n                oneExploded = true;\n            }\n            valueIsArr = objectHelper.isArray(value);\n            if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n                expanded.push(expandSimpleValue(varspec, operator, value));\n            }\n            else if (varspec.maxLength && isDefined(value)) {\n                // 2.4.1 of the spec says: \"Prefix modifiers are not applicable to variables that have composite values.\"\n                throw new Error('Prefix modifiers are not applicable to variables that have composite values. You tried to expand ' + this + \" with \" + prettyPrint(value));\n            }\n            else if (!varspec.exploded) {\n                if (operator.named || !isEmpty(value)) {\n                    expanded.push(expandNotExploded(varspec, operator, value));\n                }\n            }\n            else if (isDefined(value)) {\n                if (operator.named) {\n                    expanded.push(expandExplodedNamed(varspec, operator, value));\n                }\n                else {\n                    expanded.push(expandExplodedUnnamed(operator, value));\n                }\n            }\n        }\n\n        if (expanded.length === 0) {\n            return \"\";\n        }\n        else {\n            return operator.first + objectHelper.join(expanded, operator.separator);\n        }\n    };\n\n    return VariableExpression;\n}());\n\nvar UriTemplate = (function () {\n    function UriTemplate (templateText, expressions, regexp_string) {\n        this.templateText = templateText;\n        this.expressions = expressions;\n\n        if (regexp_string !== undefined) {\n          this.regexp = new RegExp(\"^\" + regexp_string + \"$\");\n        }\n\n        objectHelper.deepFreeze(this);\n    }\n\n    UriTemplate.prototype.toString = function () {\n        return this.templateText;\n    };\n\n    UriTemplate.prototype.expand = function (variables) {\n        // this.expressions.map(function (expression) {return expression.expand(variables);}).join('');\n        var\n            index,\n            result = '';\n        for (index = 0; index < this.expressions.length; index += 1) {\n            result += this.expressions[index].expand(variables);\n        }\n        return result;\n    };\n\n    UriTemplate.prototype.extract = function (text) {\n      var expression_index,\n          extracted_index = 1,\n          expression,\n          varspec,\n          matched = true,\n          variables = {},\n          result;\n\n      if ((this.regexp !== undefined) && (this.regexp.test(text))) {\n        result = this.regexp.exec(text);\n        for (expression_index = 0; expression_index < this.expressions.length; expression_index += 1) {\n          expression = this.expressions[expression_index];\n          if (expression.literal === undefined) {\n            if ((expression.operator !== undefined) && (expression.operator.symbol.length === 0) && (expression.varspecs.length === 1)) {\n              varspec = expression.varspecs[0];\n              if ((varspec.exploded === false) && (varspec.maxLength === null)) {\n                if (result[extracted_index].indexOf(',') === -1) {\n                  variables[varspec.varname] = decodeURIComponent(result[extracted_index]);\n                  extracted_index += 1;\n                } else {\n                  matched = false;\n                }\n              } else {\n                matched = false;\n              }\n            } else {\n              matched = false;\n            }\n          }\n        }\n        if (matched) {\n          return variables;\n        }\n      }\n      return false;\n    };\n\n    UriTemplate.parse = parse;\n    UriTemplate.UriTemplateError = UriTemplateError;\n    return UriTemplate;\n}());\n\n    exportCallback(UriTemplate);\n\n}(function (UriTemplate) {\n        \"use strict\";\n        // export UriTemplate, when module is present, or pass it to window or global\n        if (typeof module !== \"undefined\") {\n            module.exports = UriTemplate;\n        }\n        else if (typeof define === \"function\") {\n            define([],function() {\n                return UriTemplate;\n            });\n        }\n        else if (typeof window !== \"undefined\") {\n            window.UriTemplate = UriTemplate;\n        }\n        else {\n            global.UriTemplate = UriTemplate;\n        }\n    }\n));\n/*\n * Rusha, a JavaScript implementation of the Secure Hash Algorithm, SHA-1,\n * as defined in FIPS PUB 180-1, tuned for high performance with large inputs.\n * (http://github.com/srijs/rusha)\n *\n * Inspired by Paul Johnstons implementation (http://pajhome.org.uk/crypt/md5).\n *\n * Copyright (c) 2013 Sam Rijs (http://awesam.de).\n * Released under the terms of the MIT license as follows:\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n(function () {\n    // If we'e running in Node.JS, export a module.\n    if (typeof module !== 'undefined') {\n        module.exports = Rusha;\n    } else if (typeof window !== 'undefined') {\n        window.Rusha = Rusha;\n    }\n    // If we're running in a webworker, accept\n    // messages containing a jobid and a buffer\n    // or blob object, and return the hash result.\n    if (typeof FileReaderSync !== 'undefined') {\n        var reader = new FileReaderSync(), hasher = new Rusha(4 * 1024 * 1024);\n        self.onmessage = function onMessage(event) {\n            var hash, data = event.data.data;\n            try {\n                hash = hasher.digest(data);\n                self.postMessage({\n                    id: event.data.id,\n                    hash: hash\n                });\n            } catch (e) {\n                self.postMessage({\n                    id: event.data.id,\n                    error: e.name\n                });\n            }\n        };\n    }\n    var util = {\n            getDataType: function (data) {\n                if (typeof data === 'string') {\n                    return 'string';\n                }\n                if (data instanceof Array) {\n                    return 'array';\n                }\n                if (typeof global !== 'undefined' && global.Buffer && global.Buffer.isBuffer(data)) {\n                    return 'buffer';\n                }\n                if (data instanceof ArrayBuffer) {\n                    return 'arraybuffer';\n                }\n                if (data.buffer instanceof ArrayBuffer) {\n                    return 'view';\n                }\n                if (data instanceof Blob) {\n                    return 'blob';\n                }\n                throw new Error('Unsupported data type.');\n            }\n        };\n    // The Rusha object is a wrapper around the low-level RushaCore.\n    // It provides means of converting different inputs to the\n    // format accepted by RushaCore as well as other utility methods.\n    function Rusha(chunkSize) {\n        'use strict';\n        // Private object structure.\n        var self$2 = { fill: 0 };\n        // Calculate the length of buffer that the sha1 routine uses\n        // including the padding.\n        var padlen = function (len) {\n            for (len += 9; len % 64 > 0; len += 1);\n            return len;\n        };\n        var padZeroes = function (bin, len) {\n            for (var i = len >> 2; i < bin.length; i++)\n                bin[i] = 0;\n        };\n        var padData = function (bin, chunkLen, msgLen) {\n            bin[chunkLen >> 2] |= 128 << 24 - (chunkLen % 4 << 3);\n            bin[((chunkLen >> 2) + 2 & ~15) + 14] = msgLen >> 29;\n            bin[((chunkLen >> 2) + 2 & ~15) + 15] = msgLen << 3;\n        };\n        // Convert a binary string and write it to the heap.\n        // A binary string is expected to only contain char codes < 256.\n        var convStr = function (H8, H32, start, len, off) {\n            var str = this, i, om = off % 4, lm = len % 4, j = len - lm;\n            if (j > 0) {\n                switch (om) {\n                case 0:\n                    H8[off + 3 | 0] = str.charCodeAt(start);\n                case 1:\n                    H8[off + 2 | 0] = str.charCodeAt(start + 1);\n                case 2:\n                    H8[off + 1 | 0] = str.charCodeAt(start + 2);\n                case 3:\n                    H8[off | 0] = str.charCodeAt(start + 3);\n                }\n            }\n            for (i = om; i < j; i = i + 4 | 0) {\n                H32[off + i >> 2] = str.charCodeAt(start + i) << 24 | str.charCodeAt(start + i + 1) << 16 | str.charCodeAt(start + i + 2) << 8 | str.charCodeAt(start + i + 3);\n            }\n            switch (lm) {\n            case 3:\n                H8[off + j + 1 | 0] = str.charCodeAt(start + j + 2);\n            case 2:\n                H8[off + j + 2 | 0] = str.charCodeAt(start + j + 1);\n            case 1:\n                H8[off + j + 3 | 0] = str.charCodeAt(start + j);\n            }\n        };\n        // Convert a buffer or array and write it to the heap.\n        // The buffer or array is expected to only contain elements < 256.\n        var convBuf = function (H8, H32, start, len, off) {\n            var buf = this, i, om = off % 4, lm = len % 4, j = len - lm;\n            if (j > 0) {\n                switch (om) {\n                case 0:\n                    H8[off + 3 | 0] = buf[start];\n                case 1:\n                    H8[off + 2 | 0] = buf[start + 1];\n                case 2:\n                    H8[off + 1 | 0] = buf[start + 2];\n                case 3:\n                    H8[off | 0] = buf[start + 3];\n                }\n            }\n            for (i = 4 - om; i < j; i = i += 4 | 0) {\n                H32[off + i >> 2] = buf[start + i] << 24 | buf[start + i + 1] << 16 | buf[start + i + 2] << 8 | buf[start + i + 3];\n            }\n            switch (lm) {\n            case 3:\n                H8[off + j + 1 | 0] = buf[start + j + 2];\n            case 2:\n                H8[off + j + 2 | 0] = buf[start + j + 1];\n            case 1:\n                H8[off + j + 3 | 0] = buf[start + j];\n            }\n        };\n        var convBlob = function (H8, H32, start, len, off) {\n            var blob = this, i, om = off % 4, lm = len % 4, j = len - lm;\n            var buf = new Uint8Array(reader.readAsArrayBuffer(blob.slice(start, start + len)));\n            if (j > 0) {\n                switch (om) {\n                case 0:\n                    H8[off + 3 | 0] = buf[0];\n                case 1:\n                    H8[off + 2 | 0] = buf[1];\n                case 2:\n                    H8[off + 1 | 0] = buf[2];\n                case 3:\n                    H8[off | 0] = buf[3];\n                }\n            }\n            for (i = 4 - om; i < j; i = i += 4 | 0) {\n                H32[off + i >> 2] = buf[i] << 24 | buf[i + 1] << 16 | buf[i + 2] << 8 | buf[i + 3];\n            }\n            switch (lm) {\n            case 3:\n                H8[off + j + 1 | 0] = buf[j + 2];\n            case 2:\n                H8[off + j + 2 | 0] = buf[j + 1];\n            case 1:\n                H8[off + j + 3 | 0] = buf[j];\n            }\n        };\n        var convFn = function (data) {\n            switch (util.getDataType(data)) {\n            case 'string':\n                return convStr.bind(data);\n            case 'array':\n                return convBuf.bind(data);\n            case 'buffer':\n                return convBuf.bind(data);\n            case 'arraybuffer':\n                return convBuf.bind(new Uint8Array(data));\n            case 'view':\n                return convBuf.bind(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));\n            case 'blob':\n                return convBlob.bind(data);\n            }\n        };\n        var slice = function (data, offset) {\n            switch (util.getDataType(data)) {\n            case 'string':\n                return data.slice(offset);\n            case 'array':\n                return data.slice(offset);\n            case 'buffer':\n                return data.slice(offset);\n            case 'arraybuffer':\n                return data.slice(offset);\n            case 'view':\n                return data.buffer.slice(offset);\n            }\n        };\n        // Convert an ArrayBuffer into its hexadecimal string representation.\n        var hex = function (arrayBuffer) {\n            var i, x, hex_tab = '0123456789abcdef', res = [], binarray = new Uint8Array(arrayBuffer);\n            for (i = 0; i < binarray.length; i++) {\n                x = binarray[i];\n                res[i] = hex_tab.charAt(x >> 4 & 15) + hex_tab.charAt(x >> 0 & 15);\n            }\n            return res.join('');\n        };\n        var ceilHeapSize = function (v) {\n            // The asm.js spec says:\n            // The heap object's byteLength must be either\n            // 2^n for n in [12, 24) or 2^24 * n for n ≥ 1.\n            // Also, byteLengths smaller than 2^16 are deprecated.\n            var p;\n            // If v is smaller than 2^16, the smallest possible solution\n            // is 2^16.\n            if (v <= 65536)\n                return 65536;\n            // If v < 2^24, we round up to 2^n,\n            // otherwise we round up to 2^24 * n.\n            if (v < 16777216) {\n                for (p = 1; p < v; p = p << 1);\n            } else {\n                for (p = 16777216; p < v; p += 16777216);\n            }\n            return p;\n        };\n        // Initialize the internal data structures to a new capacity.\n        var init = function (size) {\n            if (size % 64 > 0) {\n                throw new Error('Chunk size must be a multiple of 128 bit');\n            }\n            self$2.maxChunkLen = size;\n            self$2.padMaxChunkLen = padlen(size);\n            // The size of the heap is the sum of:\n            // 1. The padded input message size\n            // 2. The extended space the algorithm needs (320 byte)\n            // 3. The 160 bit state the algoritm uses\n            self$2.heap = new ArrayBuffer(ceilHeapSize(self$2.padMaxChunkLen + 320 + 20));\n            self$2.h32 = new Int32Array(self$2.heap);\n            self$2.h8 = new Int8Array(self$2.heap);\n            self$2.core = RushaCore({\n                Int32Array: Int32Array,\n                DataView: DataView\n            }, {}, self$2.heap);\n            self$2.buffer = null;\n        };\n        // Iinitializethe datastructures according\n        // to a chunk siyze.\n        init(chunkSize || 64 * 1024);\n        var initState = function (heap, padMsgLen) {\n            var io = new Int32Array(heap, padMsgLen + 320, 5);\n            io[0] = 1732584193;\n            io[1] = -271733879;\n            io[2] = -1732584194;\n            io[3] = 271733878;\n            io[4] = -1009589776;\n        };\n        var padChunk = function (chunkLen, msgLen) {\n            var padChunkLen = padlen(chunkLen);\n            var view = new Int32Array(self$2.heap, 0, padChunkLen >> 2);\n            padZeroes(view, chunkLen);\n            padData(view, chunkLen, msgLen);\n            return padChunkLen;\n        };\n        // Write data to the heap.\n        var write = function (data, chunkOffset, chunkLen) {\n            convFn(data)(self$2.h8, self$2.h32, chunkOffset, chunkLen, 0);\n        };\n        // Initialize and call the RushaCore,\n        // assuming an input buffer of length len * 4.\n        var coreCall = function (data, chunkOffset, chunkLen, msgLen, finalize) {\n            var padChunkLen = chunkLen;\n            if (finalize) {\n                padChunkLen = padChunk(chunkLen, msgLen);\n            }\n            write(data, chunkOffset, chunkLen);\n            self$2.core.hash(padChunkLen, self$2.padMaxChunkLen);\n        };\n        var getRawDigest = function (heap, padMaxChunkLen) {\n            var io = new Int32Array(heap, padMaxChunkLen + 320, 5);\n            var out = new Int32Array(5);\n            var arr = new DataView(out.buffer);\n            arr.setInt32(0, io[0], false);\n            arr.setInt32(4, io[1], false);\n            arr.setInt32(8, io[2], false);\n            arr.setInt32(12, io[3], false);\n            arr.setInt32(16, io[4], false);\n            return out;\n        };\n        // Calculate the hash digest as an array of 5 32bit integers.\n        var rawDigest = this.rawDigest = function (str) {\n                var msgLen = str.byteLength || str.length || str.size || 0;\n                initState(self$2.heap, self$2.padMaxChunkLen);\n                var chunkOffset = 0, chunkLen = self$2.maxChunkLen, last;\n                for (chunkOffset = 0; msgLen > chunkOffset + chunkLen; chunkOffset += chunkLen) {\n                    coreCall(str, chunkOffset, chunkLen, msgLen, false);\n                }\n                coreCall(str, chunkOffset, msgLen - chunkOffset, msgLen, true);\n                return getRawDigest(self$2.heap, self$2.padMaxChunkLen);\n            };\n        // The digest and digestFrom* interface returns the hash digest\n        // as a hex string.\n        this.digest = this.digestFromString = this.digestFromBuffer = this.digestFromArrayBuffer = function (str) {\n            return hex(rawDigest(str).buffer);\n        };\n    }\n    ;\n    // The low-level RushCore module provides the heart of Rusha,\n    // a high-speed sha1 implementation working on an Int32Array heap.\n    // At first glance, the implementation seems complicated, however\n    // with the SHA1 spec at hand, it is obvious this almost a textbook\n    // implementation that has a few functions hand-inlined and a few loops\n    // hand-unrolled.\n    function RushaCore(stdlib, foreign, heap) {\n        'use asm';\n        var H = new stdlib.Int32Array(heap);\n        function hash(k, x) {\n            // k in bytes\n            k = k | 0;\n            x = x | 0;\n            var i = 0, j = 0, y0 = 0, z0 = 0, y1 = 0, z1 = 0, y2 = 0, z2 = 0, y3 = 0, z3 = 0, y4 = 0, z4 = 0, t0 = 0, t1 = 0;\n            y0 = H[x + 320 >> 2] | 0;\n            y1 = H[x + 324 >> 2] | 0;\n            y2 = H[x + 328 >> 2] | 0;\n            y3 = H[x + 332 >> 2] | 0;\n            y4 = H[x + 336 >> 2] | 0;\n            for (i = 0; (i | 0) < (k | 0); i = i + 64 | 0) {\n                z0 = y0;\n                z1 = y1;\n                z2 = y2;\n                z3 = y3;\n                z4 = y4;\n                for (j = 0; (j | 0) < 64; j = j + 4 | 0) {\n                    t1 = H[i + j >> 2] | 0;\n                    t0 = ((y0 << 5 | y0 >>> 27) + (y1 & y2 | ~y1 & y3) | 0) + ((t1 + y4 | 0) + 1518500249 | 0) | 0;\n                    y4 = y3;\n                    y3 = y2;\n                    y2 = y1 << 30 | y1 >>> 2;\n                    y1 = y0;\n                    y0 = t0;\n                    ;\n                    H[k + j >> 2] = t1;\n                }\n                for (j = k + 64 | 0; (j | 0) < (k + 80 | 0); j = j + 4 | 0) {\n                    t1 = (H[j - 12 >> 2] ^ H[j - 32 >> 2] ^ H[j - 56 >> 2] ^ H[j - 64 >> 2]) << 1 | (H[j - 12 >> 2] ^ H[j - 32 >> 2] ^ H[j - 56 >> 2] ^ H[j - 64 >> 2]) >>> 31;\n                    t0 = ((y0 << 5 | y0 >>> 27) + (y1 & y2 | ~y1 & y3) | 0) + ((t1 + y4 | 0) + 1518500249 | 0) | 0;\n                    y4 = y3;\n                    y3 = y2;\n                    y2 = y1 << 30 | y1 >>> 2;\n                    y1 = y0;\n                    y0 = t0;\n                    ;\n                    H[j >> 2] = t1;\n                }\n                for (j = k + 80 | 0; (j | 0) < (k + 160 | 0); j = j + 4 | 0) {\n                    t1 = (H[j - 12 >> 2] ^ H[j - 32 >> 2] ^ H[j - 56 >> 2] ^ H[j - 64 >> 2]) << 1 | (H[j - 12 >> 2] ^ H[j - 32 >> 2] ^ H[j - 56 >> 2] ^ H[j - 64 >> 2]) >>> 31;\n                    t0 = ((y0 << 5 | y0 >>> 27) + (y1 ^ y2 ^ y3) | 0) + ((t1 + y4 | 0) + 1859775393 | 0) | 0;\n                    y4 = y3;\n                    y3 = y2;\n                    y2 = y1 << 30 | y1 >>> 2;\n                    y1 = y0;\n                    y0 = t0;\n                    ;\n                    H[j >> 2] = t1;\n                }\n                for (j = k + 160 | 0; (j | 0) < (k + 240 | 0); j = j + 4 | 0) {\n                    t1 = (H[j - 12 >> 2] ^ H[j - 32 >> 2] ^ H[j - 56 >> 2] ^ H[j - 64 >> 2]) << 1 | (H[j - 12 >> 2] ^ H[j - 32 >> 2] ^ H[j - 56 >> 2] ^ H[j - 64 >> 2]) >>> 31;\n                    t0 = ((y0 << 5 | y0 >>> 27) + (y1 & y2 | y1 & y3 | y2 & y3) | 0) + ((t1 + y4 | 0) - 1894007588 | 0) | 0;\n                    y4 = y3;\n                    y3 = y2;\n                    y2 = y1 << 30 | y1 >>> 2;\n                    y1 = y0;\n                    y0 = t0;\n                    ;\n                    H[j >> 2] = t1;\n                }\n                for (j = k + 240 | 0; (j | 0) < (k + 320 | 0); j = j + 4 | 0) {\n                    t1 = (H[j - 12 >> 2] ^ H[j - 32 >> 2] ^ H[j - 56 >> 2] ^ H[j - 64 >> 2]) << 1 | (H[j - 12 >> 2] ^ H[j - 32 >> 2] ^ H[j - 56 >> 2] ^ H[j - 64 >> 2]) >>> 31;\n                    t0 = ((y0 << 5 | y0 >>> 27) + (y1 ^ y2 ^ y3) | 0) + ((t1 + y4 | 0) - 899497514 | 0) | 0;\n                    y4 = y3;\n                    y3 = y2;\n                    y2 = y1 << 30 | y1 >>> 2;\n                    y1 = y0;\n                    y0 = t0;\n                    ;\n                    H[j >> 2] = t1;\n                }\n                y0 = y0 + z0 | 0;\n                y1 = y1 + z1 | 0;\n                y2 = y2 + z2 | 0;\n                y3 = y3 + z3 | 0;\n                y4 = y4 + z4 | 0;\n            }\n            H[x + 320 >> 2] = y0;\n            H[x + 324 >> 2] = y1;\n            H[x + 328 >> 2] = y2;\n            H[x + 332 >> 2] = y3;\n            H[x + 336 >> 2] = y4;\n        }\n        return { hash: hash };\n    }\n}());  var RSVP = window.RSVP,\n    moment = global.moment,\n    UriTemplate = window.UriTemplate,\n    Rusha = window.Rusha;\n\n  // Allow xhr2 to export XMLHttpRequest\n  module = {};\n// Generated by CoffeeScript 1.12.2\n(function() {\n  var InvalidStateError, NetworkError, ProgressEvent, SecurityError, SyntaxError, XMLHttpRequest, XMLHttpRequestEventTarget, XMLHttpRequestUpload, http, https, os, url,\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  XMLHttpRequestEventTarget = (function() {\n    function XMLHttpRequestEventTarget() {\n      this.onloadstart = null;\n      this.onprogress = null;\n      this.onabort = null;\n      this.onerror = null;\n      this.onload = null;\n      this.ontimeout = null;\n      this.onloadend = null;\n      this._listeners = {};\n    }\n\n    XMLHttpRequestEventTarget.prototype.onloadstart = null;\n\n    XMLHttpRequestEventTarget.prototype.onprogress = null;\n\n    XMLHttpRequestEventTarget.prototype.onabort = null;\n\n    XMLHttpRequestEventTarget.prototype.onerror = null;\n\n    XMLHttpRequestEventTarget.prototype.onload = null;\n\n    XMLHttpRequestEventTarget.prototype.ontimeout = null;\n\n    XMLHttpRequestEventTarget.prototype.onloadend = null;\n\n    XMLHttpRequestEventTarget.prototype.addEventListener = function(eventType, listener) {\n      var base;\n      eventType = eventType.toLowerCase();\n      (base = this._listeners)[eventType] || (base[eventType] = []);\n      this._listeners[eventType].push(listener);\n      return void 0;\n    };\n\n    XMLHttpRequestEventTarget.prototype.removeEventListener = function(eventType, listener) {\n      var index;\n      eventType = eventType.toLowerCase();\n      if (this._listeners[eventType]) {\n        index = this._listeners[eventType].indexOf(listener);\n        if (index !== -1) {\n          this._listeners[eventType].splice(index, 1);\n        }\n      }\n      return void 0;\n    };\n\n    XMLHttpRequestEventTarget.prototype.dispatchEvent = function(event) {\n      var eventType, j, len, listener, listeners;\n      event.currentTarget = event.target = this;\n      eventType = event.type;\n      if (listeners = this._listeners[eventType]) {\n        for (j = 0, len = listeners.length; j < len; j++) {\n          listener = listeners[j];\n          listener.call(this, event);\n        }\n      }\n      if (listener = this[\"on\" + eventType]) {\n        listener.call(this, event);\n      }\n      return void 0;\n    };\n\n    return XMLHttpRequestEventTarget;\n\n  })();\n\n  http = require('http');\n\n  https = require('https');\n\n  os = require('os');\n\n  url = require('url');\n\n  XMLHttpRequest = (function(superClass) {\n    extend(XMLHttpRequest, superClass);\n\n    function XMLHttpRequest(options) {\n      XMLHttpRequest.__super__.constructor.call(this);\n      this.onreadystatechange = null;\n      this._anonymous = options && options.anon;\n      this.readyState = XMLHttpRequest.UNSENT;\n      this.response = null;\n      this.responseText = '';\n      this.responseType = '';\n      this.responseURL = '';\n      this.status = 0;\n      this.statusText = '';\n      this.timeout = 0;\n      this.upload = new XMLHttpRequestUpload(this);\n      this._method = null;\n      this._url = null;\n      this._sync = false;\n      this._headers = null;\n      this._loweredHeaders = null;\n      this._mimeOverride = null;\n      this._request = null;\n      this._response = null;\n      this._responseParts = null;\n      this._responseHeaders = null;\n      this._aborting = null;\n      this._error = null;\n      this._loadedBytes = 0;\n      this._totalBytes = 0;\n      this._lengthComputable = false;\n    }\n\n    XMLHttpRequest.prototype.onreadystatechange = null;\n\n    XMLHttpRequest.prototype.readyState = null;\n\n    XMLHttpRequest.prototype.response = null;\n\n    XMLHttpRequest.prototype.responseText = null;\n\n    XMLHttpRequest.prototype.responseType = null;\n\n    XMLHttpRequest.prototype.status = null;\n\n    XMLHttpRequest.prototype.timeout = null;\n\n    XMLHttpRequest.prototype.upload = null;\n\n    XMLHttpRequest.prototype.open = function(method, url, async, user, password) {\n      var xhrUrl;\n      method = method.toUpperCase();\n      if (method in this._restrictedMethods) {\n        throw new SecurityError(\"HTTP method \" + method + \" is not allowed in XHR\");\n      }\n      xhrUrl = this._parseUrl(url);\n      if (async === void 0) {\n        async = true;\n      }\n      switch (this.readyState) {\n        case XMLHttpRequest.UNSENT:\n        case XMLHttpRequest.OPENED:\n        case XMLHttpRequest.DONE:\n          null;\n          break;\n        case XMLHttpRequest.HEADERS_RECEIVED:\n        case XMLHttpRequest.LOADING:\n          null;\n      }\n      this._method = method;\n      this._url = xhrUrl;\n      this._sync = !async;\n      this._headers = {};\n      this._loweredHeaders = {};\n      this._mimeOverride = null;\n      this._setReadyState(XMLHttpRequest.OPENED);\n      this._request = null;\n      this._response = null;\n      this.status = 0;\n      this.statusText = '';\n      this._responseParts = [];\n      this._responseHeaders = null;\n      this._loadedBytes = 0;\n      this._totalBytes = 0;\n      this._lengthComputable = false;\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype.setRequestHeader = function(name, value) {\n      var loweredName;\n      if (this.readyState !== XMLHttpRequest.OPENED) {\n        throw new InvalidStateError(\"XHR readyState must be OPENED\");\n      }\n      loweredName = name.toLowerCase();\n      if (this._restrictedHeaders[loweredName] || /^sec\\-/.test(loweredName) || /^proxy-/.test(loweredName)) {\n        console.warn(\"Refused to set unsafe header \\\"\" + name + \"\\\"\");\n        return void 0;\n      }\n      value = value.toString();\n      if (loweredName in this._loweredHeaders) {\n        name = this._loweredHeaders[loweredName];\n        this._headers[name] = this._headers[name] + ', ' + value;\n      } else {\n        this._loweredHeaders[loweredName] = name;\n        this._headers[name] = value;\n      }\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype.send = function(data) {\n      if (this.readyState !== XMLHttpRequest.OPENED) {\n        throw new InvalidStateError(\"XHR readyState must be OPENED\");\n      }\n      if (this._request) {\n        throw new InvalidStateError(\"send() already called\");\n      }\n      switch (this._url.protocol) {\n        case 'file:':\n          this._sendFile(data);\n          break;\n        case 'http:':\n        case 'https:':\n          this._sendHttp(data);\n          break;\n        default:\n          throw new NetworkError(\"Unsupported protocol \" + this._url.protocol);\n      }\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype.abort = function() {\n      if (!this._request) {\n        return;\n      }\n      this._request.abort();\n      this._setError();\n      this._dispatchProgress('abort');\n      this._dispatchProgress('loadend');\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype.getResponseHeader = function(name) {\n      var loweredName;\n      if (!this._responseHeaders) {\n        return null;\n      }\n      loweredName = name.toLowerCase();\n      if (loweredName in this._responseHeaders) {\n        return this._responseHeaders[loweredName];\n      } else {\n        return null;\n      }\n    };\n\n    XMLHttpRequest.prototype.getAllResponseHeaders = function() {\n      var lines, name, value;\n      if (!this._responseHeaders) {\n        return '';\n      }\n      lines = (function() {\n        var ref, results;\n        ref = this._responseHeaders;\n        results = [];\n        for (name in ref) {\n          value = ref[name];\n          results.push(name + \": \" + value);\n        }\n        return results;\n      }).call(this);\n      return lines.join(\"\\r\\n\");\n    };\n\n    XMLHttpRequest.prototype.overrideMimeType = function(newMimeType) {\n      if (this.readyState === XMLHttpRequest.LOADING || this.readyState === XMLHttpRequest.DONE) {\n        throw new InvalidStateError(\"overrideMimeType() not allowed in LOADING or DONE\");\n      }\n      this._mimeOverride = newMimeType.toLowerCase();\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype.nodejsSet = function(options) {\n      var baseUrl, parsedUrl;\n      if ('httpAgent' in options) {\n        this.nodejsHttpAgent = options.httpAgent;\n      }\n      if ('httpsAgent' in options) {\n        this.nodejsHttpsAgent = options.httpsAgent;\n      }\n      if ('baseUrl' in options) {\n        baseUrl = options.baseUrl;\n        if (baseUrl !== null) {\n          parsedUrl = url.parse(baseUrl, false, true);\n          if (!parsedUrl.protocol) {\n            throw new SyntaxError(\"baseUrl must be an absolute URL\");\n          }\n        }\n        this.nodejsBaseUrl = baseUrl;\n      }\n      return void 0;\n    };\n\n    XMLHttpRequest.nodejsSet = function(options) {\n      XMLHttpRequest.prototype.nodejsSet(options);\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype.UNSENT = 0;\n\n    XMLHttpRequest.UNSENT = 0;\n\n    XMLHttpRequest.prototype.OPENED = 1;\n\n    XMLHttpRequest.OPENED = 1;\n\n    XMLHttpRequest.prototype.HEADERS_RECEIVED = 2;\n\n    XMLHttpRequest.HEADERS_RECEIVED = 2;\n\n    XMLHttpRequest.prototype.LOADING = 3;\n\n    XMLHttpRequest.LOADING = 3;\n\n    XMLHttpRequest.prototype.DONE = 4;\n\n    XMLHttpRequest.DONE = 4;\n\n    XMLHttpRequest.prototype.nodejsHttpAgent = http.globalAgent;\n\n    XMLHttpRequest.prototype.nodejsHttpsAgent = https.globalAgent;\n\n    XMLHttpRequest.prototype.nodejsBaseUrl = null;\n\n    XMLHttpRequest.prototype._restrictedMethods = {\n      CONNECT: true,\n      TRACE: true,\n      TRACK: true\n    };\n\n    XMLHttpRequest.prototype._restrictedHeaders = {\n      'accept-charset': true,\n      'accept-encoding': true,\n      'access-control-request-headers': true,\n      'access-control-request-method': true,\n      connection: true,\n      'content-length': true,\n      // cookie: true,\n      cookie2: true,\n      date: true,\n      dnt: true,\n      expect: true,\n      host: true,\n      'keep-alive': true,\n      origin: true,\n      referer: true,\n      te: true,\n      trailer: true,\n      'transfer-encoding': true,\n      upgrade: true,\n      'user-agent': true,\n      via: true\n    };\n\n    XMLHttpRequest.prototype._privateHeaders = {\n      // 'set-cookie': true,\n      'set-cookie2': true\n    };\n\n    XMLHttpRequest.prototype._userAgent = (\"Mozilla/5.0 (\" + (os.type()) + \" \" + (os.arch()) + \") \") + (\"node.js/\" + process.versions.node + \" v8/\" + process.versions.v8);\n\n    XMLHttpRequest.prototype._setReadyState = function(newReadyState) {\n      var event;\n      this.readyState = newReadyState;\n      event = new ProgressEvent('readystatechange');\n      this.dispatchEvent(event);\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._sendFile = function() {\n      if (this._url.method !== 'GET') {\n        throw new NetworkError('The file protocol only supports GET');\n      }\n      throw new Error(\"Protocol file: not implemented\");\n    };\n\n    XMLHttpRequest.prototype._sendHttp = function(data) {\n      if (this._sync) {\n        throw new Error(\"Synchronous XHR processing not implemented\");\n      }\n      if ((data != null) && (this._method === 'GET' || this._method === 'HEAD')) {\n        console.warn(\"Discarding entity body for \" + this._method + \" requests\");\n        data = null;\n      } else {\n        data || (data = '');\n      }\n      this.upload._setData(data);\n      this._finalizeHeaders();\n      this._sendHxxpRequest();\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._sendHxxpRequest = function() {\n      var agent, hxxp, request;\n      if (this._url.protocol === 'http:') {\n        hxxp = http;\n        agent = this.nodejsHttpAgent;\n      } else {\n        hxxp = https;\n        agent = this.nodejsHttpsAgent;\n      }\n      request = hxxp.request({\n        hostname: this._url.hostname,\n        port: this._url.port,\n        path: this._url.path,\n        auth: this._url.auth,\n        method: this._method,\n        headers: this._headers,\n        agent: agent\n      });\n      this._request = request;\n      if (this.timeout) {\n        request.setTimeout(this.timeout, (function(_this) {\n          return function() {\n            return _this._onHttpTimeout(request);\n          };\n        })(this));\n      }\n      request.on('response', (function(_this) {\n        return function(response) {\n          return _this._onHttpResponse(request, response);\n        };\n      })(this));\n      request.on('error', (function(_this) {\n        return function(error) {\n          return _this._onHttpRequestError(request, error);\n        };\n      })(this));\n      this.upload._startUpload(request);\n      if (this._request === request) {\n        this._dispatchProgress('loadstart');\n      }\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._finalizeHeaders = function() {\n      this._headers['Connection'] = 'keep-alive';\n      this._headers['Host'] = this._url.host;\n      if (this._anonymous) {\n        this._headers['Referer'] = 'about:blank';\n      }\n      this._headers['User-Agent'] = this._userAgent;\n      this.upload._finalizeHeaders(this._headers, this._loweredHeaders);\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._onHttpResponse = function(request, response) {\n      var lengthString;\n      if (this._request !== request) {\n        return;\n      }\n      switch (response.statusCode) {\n        case 301:\n        case 302:\n        case 303:\n        case 307:\n        case 308:\n          this._url = this._parseUrl(response.headers['location']);\n          this._method = 'GET';\n          if ('content-type' in this._loweredHeaders) {\n            delete this._headers[this._loweredHeaders['content-type']];\n            delete this._loweredHeaders['content-type'];\n          }\n          if ('Content-Type' in this._headers) {\n            delete this._headers['Content-Type'];\n          }\n          delete this._headers['Content-Length'];\n          this.upload._reset();\n          this._finalizeHeaders();\n          this._sendHxxpRequest();\n          return;\n      }\n      this._response = response;\n      this._response.on('data', (function(_this) {\n        return function(data) {\n          return _this._onHttpResponseData(response, data);\n        };\n      })(this));\n      this._response.on('end', (function(_this) {\n        return function() {\n          return _this._onHttpResponseEnd(response);\n        };\n      })(this));\n      this._response.on('close', (function(_this) {\n        return function() {\n          return _this._onHttpResponseClose(response);\n        };\n      })(this));\n      this.responseURL = this._url.href.split('#')[0];\n      this.status = this._response.statusCode;\n      this.statusText = http.STATUS_CODES[this.status];\n      this._parseResponseHeaders(response);\n      if (lengthString = this._responseHeaders['content-length']) {\n        this._totalBytes = parseInt(lengthString);\n        this._lengthComputable = true;\n      } else {\n        this._lengthComputable = false;\n      }\n      return this._setReadyState(XMLHttpRequest.HEADERS_RECEIVED);\n    };\n\n    XMLHttpRequest.prototype._onHttpResponseData = function(response, data) {\n      if (this._response !== response) {\n        return;\n      }\n      this._responseParts.push(data);\n      this._loadedBytes += data.length;\n      if (this.readyState !== XMLHttpRequest.LOADING) {\n        this._setReadyState(XMLHttpRequest.LOADING);\n      }\n      return this._dispatchProgress('progress');\n    };\n\n    XMLHttpRequest.prototype._onHttpResponseEnd = function(response) {\n      if (this._response !== response) {\n        return;\n      }\n      this._parseResponse();\n      this._request = null;\n      this._response = null;\n      this._setReadyState(XMLHttpRequest.DONE);\n      this._dispatchProgress('load');\n      return this._dispatchProgress('loadend');\n    };\n\n    XMLHttpRequest.prototype._onHttpResponseClose = function(response) {\n      var request;\n      if (this._response !== response) {\n        return;\n      }\n      request = this._request;\n      this._setError();\n      request.abort();\n      this._setReadyState(XMLHttpRequest.DONE);\n      this._dispatchProgress('error');\n      return this._dispatchProgress('loadend');\n    };\n\n    XMLHttpRequest.prototype._onHttpTimeout = function(request) {\n      if (this._request !== request) {\n        return;\n      }\n      this._setError();\n      request.abort();\n      this._setReadyState(XMLHttpRequest.DONE);\n      this._dispatchProgress('timeout');\n      return this._dispatchProgress('loadend');\n    };\n\n    XMLHttpRequest.prototype._onHttpRequestError = function(request, error) {\n      if (this._request !== request) {\n        return;\n      }\n      this._setError();\n      request.abort();\n      this._setReadyState(XMLHttpRequest.DONE);\n      this._dispatchProgress('error');\n      return this._dispatchProgress('loadend');\n    };\n\n    XMLHttpRequest.prototype._dispatchProgress = function(eventType) {\n      var event;\n      event = new ProgressEvent(eventType);\n      event.lengthComputable = this._lengthComputable;\n      event.loaded = this._loadedBytes;\n      event.total = this._totalBytes;\n      this.dispatchEvent(event);\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._setError = function() {\n      this._request = null;\n      this._response = null;\n      this._responseHeaders = null;\n      this._responseParts = null;\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._parseUrl = function(urlString) {\n      var absoluteUrlString, index, password, user, xhrUrl;\n      if (this.nodejsBaseUrl === null) {\n        absoluteUrlString = urlString;\n      } else {\n        absoluteUrlString = url.resolve(this.nodejsBaseUrl, urlString);\n      }\n      xhrUrl = url.parse(absoluteUrlString, false, true);\n      xhrUrl.hash = null;\n      if (xhrUrl.auth && ((typeof user !== \"undefined\" && user !== null) || (typeof password !== \"undefined\" && password !== null))) {\n        index = xhrUrl.auth.indexOf(':');\n        if (index === -1) {\n          if (!user) {\n            user = xhrUrl.auth;\n          }\n        } else {\n          if (!user) {\n            user = xhrUrl.substring(0, index);\n          }\n          if (!password) {\n            password = xhrUrl.substring(index + 1);\n          }\n        }\n      }\n      if (user || password) {\n        xhrUrl.auth = user + \":\" + password;\n      }\n      return xhrUrl;\n    };\n\n    XMLHttpRequest.prototype._parseResponseHeaders = function(response) {\n      var loweredName, name, ref, value;\n      this._responseHeaders = {};\n      ref = response.headers;\n      for (name in ref) {\n        value = ref[name];\n        loweredName = name.toLowerCase();\n        if (this._privateHeaders[loweredName]) {\n          continue;\n        }\n        if (this._mimeOverride !== null && loweredName === 'content-type') {\n          value = this._mimeOverride;\n        }\n        this._responseHeaders[loweredName] = value;\n      }\n      if (this._mimeOverride !== null && !('content-type' in this._responseHeaders)) {\n        this._responseHeaders['content-type'] = this._mimeOverride;\n      }\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._parseResponse = function() {\n      var arrayBuffer, buffer, i, j, jsonError, ref, view;\n      if (Buffer.concat) {\n        buffer = Buffer.concat(this._responseParts);\n      } else {\n        buffer = this._concatBuffers(this._responseParts);\n      }\n      this._responseParts = null;\n      switch (this.responseType) {\n        case 'text':\n          this._parseTextResponse(buffer);\n          break;\n        case 'json':\n          this.responseText = null;\n          try {\n            this.response = JSON.parse(buffer.toString('utf-8'));\n          } catch (error1) {\n            jsonError = error1;\n            this.response = null;\n          }\n          break;\n        case 'buffer':\n          this.responseText = null;\n          this.response = buffer;\n          break;\n        case 'arraybuffer':\n          this.responseText = null;\n          arrayBuffer = new ArrayBuffer(buffer.length);\n          view = new Uint8Array(arrayBuffer);\n          for (i = j = 0, ref = buffer.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {\n            view[i] = buffer[i];\n          }\n          this.response = arrayBuffer;\n          break;\n        default:\n          this._parseTextResponse(buffer);\n      }\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._parseTextResponse = function(buffer) {\n      var e;\n      try {\n        this.responseText = buffer.toString(this._parseResponseEncoding());\n      } catch (error1) {\n        e = error1;\n        this.responseText = buffer.toString('binary');\n      }\n      this.response = this.responseText;\n      return void 0;\n    };\n\n    XMLHttpRequest.prototype._parseResponseEncoding = function() {\n      var contentType, encoding, match;\n      encoding = null;\n      if (contentType = this._responseHeaders['content-type']) {\n        if (match = /\\;\\s*charset\\=(.*)$/.exec(contentType)) {\n          return match[1];\n        }\n      }\n      return 'utf-8';\n    };\n\n    XMLHttpRequest.prototype._concatBuffers = function(buffers) {\n      var buffer, j, k, len, len1, length, target;\n      if (buffers.length === 0) {\n        return new Buffer(0);\n      }\n      if (buffers.length === 1) {\n        return buffers[0];\n      }\n      length = 0;\n      for (j = 0, len = buffers.length; j < len; j++) {\n        buffer = buffers[j];\n        length += buffer.length;\n      }\n      target = new Buffer(length);\n      length = 0;\n      for (k = 0, len1 = buffers.length; k < len1; k++) {\n        buffer = buffers[k];\n        buffer.copy(target, length);\n        length += buffer.length;\n      }\n      return target;\n    };\n\n    return XMLHttpRequest;\n\n  })(XMLHttpRequestEventTarget);\n\n  module.exports = XMLHttpRequest;\n\n  XMLHttpRequest.XMLHttpRequest = XMLHttpRequest;\n\n  SecurityError = (function(superClass) {\n    extend(SecurityError, superClass);\n\n    function SecurityError() {\n      SecurityError.__super__.constructor.apply(this, arguments);\n    }\n\n    return SecurityError;\n\n  })(Error);\n\n  XMLHttpRequest.SecurityError = SecurityError;\n\n  InvalidStateError = (function(superClass) {\n    extend(InvalidStateError, superClass);\n\n    function InvalidStateError() {\n      InvalidStateError.__super__.constructor.apply(this, arguments);\n    }\n\n    return InvalidStateError;\n\n  })(Error);\n\n  InvalidStateError = (function(superClass) {\n    extend(InvalidStateError, superClass);\n\n    function InvalidStateError() {\n      return InvalidStateError.__super__.constructor.apply(this, arguments);\n    }\n\n    return InvalidStateError;\n\n  })(Error);\n\n  XMLHttpRequest.InvalidStateError = InvalidStateError;\n\n  NetworkError = (function(superClass) {\n    extend(NetworkError, superClass);\n\n    function NetworkError() {\n      NetworkError.__super__.constructor.apply(this, arguments);\n    }\n\n    return NetworkError;\n\n  })(Error);\n\n  XMLHttpRequest.SyntaxError = SyntaxError;\n\n  SyntaxError = (function(superClass) {\n    extend(SyntaxError, superClass);\n\n    function SyntaxError() {\n      SyntaxError.__super__.constructor.apply(this, arguments);\n    }\n\n    return SyntaxError;\n\n  })(Error);\n\n  ProgressEvent = (function() {\n    function ProgressEvent(type) {\n      this.type = type;\n      this.target = null;\n      this.currentTarget = null;\n      this.lengthComputable = false;\n      this.loaded = 0;\n      this.total = 0;\n    }\n\n    ProgressEvent.prototype.bubbles = false;\n\n    ProgressEvent.prototype.cancelable = false;\n\n    ProgressEvent.prototype.target = null;\n\n    ProgressEvent.prototype.loaded = null;\n\n    ProgressEvent.prototype.lengthComputable = null;\n\n    ProgressEvent.prototype.total = null;\n\n    return ProgressEvent;\n\n  })();\n\n  XMLHttpRequest.ProgressEvent = ProgressEvent;\n\n  XMLHttpRequestUpload = (function(superClass) {\n    extend(XMLHttpRequestUpload, superClass);\n\n    function XMLHttpRequestUpload(request) {\n      XMLHttpRequestUpload.__super__.constructor.call(this);\n      this._request = request;\n      this._reset();\n    }\n\n    XMLHttpRequestUpload.prototype._reset = function() {\n      this._contentType = null;\n      this._body = null;\n      return void 0;\n    };\n\n    XMLHttpRequestUpload.prototype._setData = function(data) {\n      var body, i, j, k, offset, ref, ref1, view;\n      if (typeof data === 'undefined' || data === null) {\n        return;\n      }\n      if (typeof data === 'string') {\n        if (data.length !== 0) {\n          this._contentType = 'text/plain;charset=UTF-8';\n        }\n        this._body = new Buffer(data, 'utf8');\n      } else if (Buffer.isBuffer(data)) {\n        this._body = data;\n      } else if (data instanceof ArrayBuffer) {\n        body = new Buffer(data.byteLength);\n        view = new Uint8Array(data);\n        for (i = j = 0, ref = data.byteLength; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {\n          body[i] = view[i];\n        }\n        this._body = body;\n      } else if (data.buffer && data.buffer instanceof ArrayBuffer) {\n        body = new Buffer(data.byteLength);\n        offset = data.byteOffset;\n        view = new Uint8Array(data.buffer);\n        for (i = k = 0, ref1 = data.byteLength; 0 <= ref1 ? k < ref1 : k > ref1; i = 0 <= ref1 ? ++k : --k) {\n          body[i] = view[i + offset];\n        }\n        this._body = body;\n      } else {\n        throw new Error(\"Unsupported send() data \" + data);\n      }\n      return void 0;\n    };\n\n    XMLHttpRequestUpload.prototype._finalizeHeaders = function(headers, loweredHeaders) {\n      if (this._contentType) {\n        if (!('content-type' in loweredHeaders)) {\n          headers['Content-Type'] = this._contentType;\n        }\n      }\n      if (this._body) {\n        headers['Content-Length'] = this._body.length.toString();\n      }\n      return void 0;\n    };\n\n    XMLHttpRequestUpload.prototype._startUpload = function(request) {\n      if (this._body) {\n        request.write(this._body);\n      }\n      request.end();\n      return void 0;\n    };\n\n    return XMLHttpRequestUpload;\n\n  })(XMLHttpRequestEventTarget);\n\n  XMLHttpRequest.XMLHttpRequestUpload = XMLHttpRequestUpload;\n\n}).call(this);/*\n * Copyright 2013, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/**\n * Parse a text request to a json query object tree\n *\n * @param  {String} string The string to parse\n * @return {Object} The json query tree\n */\nfunction parseStringToObject(string) {\n\nvar arrayExtend = function () {\n  var j, i, newlist = [], list_list = arguments;\n  for (j = 0; j < list_list.length; j += 1) {\n    for (i = 0; i < list_list[j].length; i += 1) {\n      newlist.push(list_list[j][i]);\n    }\n  }\n  return newlist;\n\n}, mkSimpleQuery = function (key, value, operator) {\n  var object = {\"type\": \"simple\", \"key\": key, \"value\": value};\n  if (operator !== undefined) {\n    object.operator = operator;\n  }\n  return object;\n\n}, mkNotQuery = function (query) {\n  if (query.operator === \"NOT\") {\n    return query.query_list[0];\n  }\n  return {\"type\": \"complex\", \"operator\": \"NOT\", \"query_list\": [query]};\n\n}, mkComplexQuery = function (operator, query_list) {\n  var i, query_list2 = [];\n  for (i = 0; i < query_list.length; i += 1) {\n    if (query_list[i].operator === operator) {\n      query_list2 = arrayExtend(query_list2, query_list[i].query_list);\n    } else {\n      query_list2.push(query_list[i]);\n    }\n  }\n  return {type:\"complex\",operator:operator,query_list:query_list2};\n\n}, querySetKey = function (query, key) {\n  var i;\n  if (query.type === \"complex\") {\n    for (i = 0; i < query.query_list.length; ++i) {\n      querySetKey(query.query_list[i], key);\n    }\n    return true;\n  }\n  if (query.type === \"simple\" && !query.key) {\n    query.key = key;\n    return true;\n  }\n  return false;\n}, parseQuotedString = function (string) {\n  return string.replace(/(?:\\\\(\")|(\\\\[^\"]))/g, '$1$2');\n},\n  error_offsets = [],\n  error_lookaheads = [],\n  error_count = 0,\n  result;\n/* parser generated by jison 0.4.16 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,7],$V2=[1,8],$V3=[1,10],$V4=[1,12],$V5=[1,6,7,15],$V6=[1,6,7,9,12,14,15,16,19,21],$V7=[1,6,7,9,11,12,14,15,16,19,21],$V8=[2,17];\nvar parser = {trace: function trace() { },\nyy: {},\nsymbols_: {\"error\":2,\"begin\":3,\"search_text\":4,\"end\":5,\"EOF\":6,\"NEWLINE\":7,\"and_expression\":8,\"OR\":9,\"boolean_expression\":10,\"AND\":11,\"NOT\":12,\"expression\":13,\"LEFT_PARENTHESE\":14,\"RIGHT_PARENTHESE\":15,\"WORD\":16,\"DEFINITION\":17,\"value\":18,\"OPERATOR\":19,\"string\":20,\"QUOTE\":21,\"QUOTED_STRING\":22,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",6:\"EOF\",7:\"NEWLINE\",9:\"OR\",11:\"AND\",12:\"NOT\",14:\"LEFT_PARENTHESE\",15:\"RIGHT_PARENTHESE\",16:\"WORD\",17:\"DEFINITION\",19:\"OPERATOR\",21:\"QUOTE\",22:\"QUOTED_STRING\"},\nproductions_: [0,[3,2],[5,0],[5,1],[5,1],[4,1],[4,2],[4,3],[8,1],[8,3],[10,2],[10,1],[13,3],[13,3],[13,1],[18,2],[18,1],[20,1],[20,3]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 5: case 8: case 11: case 14: case 16:\n this.$ = $$[$0]; \nbreak;\ncase 6:\n this.$ = mkComplexQuery('AND', [$$[$0-1], $$[$0]]); \nbreak;\ncase 7:\n this.$ = mkComplexQuery('OR', [$$[$0-2], $$[$0]]); \nbreak;\ncase 9:\n this.$ = mkComplexQuery('AND', [$$[$0-2], $$[$0]]); \nbreak;\ncase 10:\n this.$ = mkNotQuery($$[$0]); \nbreak;\ncase 12:\n this.$ = $$[$0-1]; \nbreak;\ncase 13:\n querySetKey($$[$0], $$[$0-2]); this.$ = $$[$0]; \nbreak;\ncase 15:\n $$[$0].operator = $$[$0-1] ; this.$ = $$[$0]; \nbreak;\ncase 17:\n this.$ = mkSimpleQuery('', $$[$0]); \nbreak;\ncase 18:\n this.$ = mkSimpleQuery('', parseQuotedString($$[$0-1])); \nbreak;\n}\n},\ntable: [{3:1,4:2,8:3,10:4,12:$V0,13:6,14:$V1,16:$V2,18:9,19:$V3,20:11,21:$V4},{1:[3]},{1:[2,2],5:13,6:[1,14],7:[1,15]},o($V5,[2,5],{8:3,10:4,13:6,18:9,20:11,4:16,9:[1,17],12:$V0,14:$V1,16:$V2,19:$V3,21:$V4}),o($V6,[2,8],{11:[1,18]}),{13:19,14:$V1,16:$V2,18:9,19:$V3,20:11,21:$V4},o($V7,[2,11]),{4:20,8:3,10:4,12:$V0,13:6,14:$V1,16:$V2,18:9,19:$V3,20:11,21:$V4},o($V7,$V8,{17:[1,21]}),o($V7,[2,14]),{16:[1,23],20:22,21:$V4},o($V7,[2,16]),{22:[1,24]},{1:[2,1]},{1:[2,3]},{1:[2,4]},o($V5,[2,6]),{4:25,8:3,10:4,12:$V0,13:6,14:$V1,16:$V2,18:9,19:$V3,20:11,21:$V4},{8:26,10:4,12:$V0,13:6,14:$V1,16:$V2,18:9,19:$V3,20:11,21:$V4},o($V7,[2,10]),{15:[1,27]},{13:28,14:$V1,16:$V2,18:9,19:$V3,20:11,21:$V4},o($V7,[2,15]),o($V7,$V8),{21:[1,29]},o($V5,[2,7]),o($V6,[2,9]),o($V7,[2,12]),o($V7,[2,13]),o($V7,[2,18])],\ndefaultActions: {13:[2,1],14:[2,3],15:[2,4]},\nparseError: function parseError(str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        function _parseError (msg, hash) {\n            this.message = msg;\n            this.hash = hash;\n        }\n        _parseError.prototype = new Error();\n\n        throw new _parseError(str, hash);\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    function popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n    }\n    _token_stack:\n        var lex = function () {\n            var token;\n            token = lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        };\n    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n                    if (typeof action === 'undefined' || !action.length || !action[0]) {\n                var errStr = '';\n                expected = [];\n                for (p in table[state]) {\n                    if (this.terminals_[p] && p > TERROR) {\n                        expected.push('\\'' + this.terminals_[p] + '\\'');\n                    }\n                }\n                if (lexer.showPosition) {\n                    errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n                } else {\n                    errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n                }\n                this.parseError(errStr, {\n                    text: lexer.match,\n                    token: this.terminals_[symbol] || symbol,\n                    line: lexer.yylineno,\n                    loc: yyloc,\n                    expected: expected\n                });\n            }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            if (!preErrorSymbol) {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n                if (recovering > 0) {\n                    recovering--;\n                }\n            } else {\n                symbol = preErrorSymbol;\n                preErrorSymbol = null;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function (match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex() {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin(condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState() {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules() {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState(n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState(condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:this.begin(\"letsquote\"); return \"QUOTE\";\nbreak;\ncase 1:this.popState(); this.begin(\"endquote\"); return \"QUOTED_STRING\";\nbreak;\ncase 2:this.popState(); return \"QUOTE\";\nbreak;\ncase 3:/* skip whitespace */\nbreak;\ncase 4:return \"LEFT_PARENTHESE\";\nbreak;\ncase 5:return \"RIGHT_PARENTHESE\";\nbreak;\ncase 6:return \"AND\";\nbreak;\ncase 7:return \"OR\";\nbreak;\ncase 8:return \"NOT\";\nbreak;\ncase 9:return \"DEFINITION\";\nbreak;\ncase 10:return 19;\nbreak;\ncase 11:return 16;\nbreak;\ncase 12:return 6;\nbreak;\n}\n},\nrules: [/^(?:\")/,/^(?:(\\\\\"|[^\"])*)/,/^(?:\")/,/^(?:[^\\S]+)/,/^(?:\\()/,/^(?:\\))/,/^(?:AND\\b)/,/^(?:OR\\b)/,/^(?:NOT\\b)/,/^(?::)/,/^(?:(!?=|<=?|>=?))/,/^(?:[^\\s\\n\"():><!=]+)/,/^(?:$)/],\nconditions: {\"endquote\":{\"rules\":[2],\"inclusive\":false},\"letsquote\":{\"rules\":[1],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,3,4,5,6,7,8,9,10,11,12],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();/*\n * Copyright 2013, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n  return parser.parse(string);\n} // parseStringToObject\n\n/*\n * Copyright 2013, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*global RSVP, window, parseStringToObject*/\n/*jslint nomen: true, maxlen: 90*/\n(function (RSVP, window, parseStringToObject) {\n  \"use strict\";\n\n  var query_class_dict = {},\n    regexp_escape = /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\n    regexp_percent = /%/g,\n    regexp_underscore = /_/g,\n    regexp_operator = /^(?:AND|OR|NOT)$/i,\n    regexp_comparaison = /^(?:!?=|<=?|>=?)$/i;\n\n  /**\n   * Convert metadata values to array of strings. ex:\n   *\n   *     \"a\" -> [\"a\"],\n   *     {\"content\": \"a\"} -> [\"a\"]\n   *\n   * @param  {Any} value The metadata value\n   * @return {Array} The value in string array format\n   */\n  function metadataValueToStringArray(value) {\n    var i, new_value = [];\n    if (value === undefined) {\n      return undefined;\n    }\n    if (!Array.isArray(value)) {\n      value = [value];\n    }\n    for (i = 0; i < value.length; i += 1) {\n      if ((value[i] !== null) && (typeof value[i] === 'object')) {\n        new_value[i] = value[i].content;\n      } else {\n        new_value[i] = value[i];\n      }\n    }\n    return new_value;\n  }\n\n  /**\n   * A sort function to sort items by key\n   *\n   * @param  {Array} sort_list List of couples [key, direction]\n   * @return {Function} The sort function\n   */\n  function generateSortFunction(key_schema, sort_list) {\n    return function sortByMultipleIndex(a, b) {\n      var result,\n        cast_to,\n        key = sort_list[0][0],\n        way = sort_list[0][1],\n        i,\n        l,\n        a_string_array,\n        b_string_array,\n        f_a,\n        f_b,\n        tmp;\n\n      if (way === 'descending') {\n        result = 1;\n      } else if (way === 'ascending') {\n        result = -1;\n      } else {\n        throw new TypeError(\"Query.sortFunction(): \" +\n                            \"Argument 2 must be 'ascending' or 'descending'\");\n      }\n\n      if (key_schema !== undefined &&\n          key_schema.key_set !== undefined &&\n          key_schema.key_set[key] !== undefined &&\n          key_schema.key_set[key].cast_to !== undefined) {\n        if (typeof key_schema.key_set[key].cast_to === \"string\") {\n          cast_to = key_schema.cast_lookup[key_schema.key_set[key].cast_to];\n        } else {\n          cast_to = key_schema.key_set[key].cast_to;\n        }\n        f_a = cast_to(a[key]);\n        f_b = cast_to(b[key]);\n        if (typeof f_b.cmp === 'function') {\n          tmp = result * f_b.cmp(f_a);\n          if (tmp !== 0) {\n            return tmp;\n          }\n          if (sort_list.length > 1) {\n            return generateSortFunction(key_schema, sort_list.slice(1))(a, b);\n          }\n          return tmp;\n        }\n        if (f_a > f_b) {\n          return -result;\n        }\n        if (f_a < f_b) {\n          return result;\n        }\n        if (sort_list.length > 1) {\n          return generateSortFunction(key_schema, sort_list.slice(1))(a, b);\n        }\n        return 0;\n      }\n\n      // this comparison is 5 times faster than json comparison\n      a_string_array = metadataValueToStringArray(a[key]) || [];\n      b_string_array = metadataValueToStringArray(b[key]) || [];\n      l = Math.max(a_string_array.length, b_string_array.length);\n      for (i = 0; i < l; i += 1) {\n        if (a_string_array[i] === undefined) {\n          return result;\n        }\n        if (b_string_array[i] === undefined) {\n          return -result;\n        }\n        if (a_string_array[i] > b_string_array[i]) {\n          return -result;\n        }\n        if (a_string_array[i] < b_string_array[i]) {\n          return result;\n        }\n      }\n      if (sort_list.length > 1) {\n        return generateSortFunction(key_schema, sort_list.slice(1))(a, b);\n      }\n      return 0;\n\n    };\n  }\n\n\n  /**\n   * Sort a list of items, according to keys and directions.\n   *\n   * @param  {Array} sort_on_option List of couples [key, direction]\n   * @param  {Array} list The item list to sort\n   * @return {Array} The filtered list\n   */\n  function sortOn(sort_on_option, list, key_schema) {\n    if (!Array.isArray(sort_on_option)) {\n      throw new TypeError(\"jioquery.sortOn(): \" +\n                          \"Argument 1 is not of type 'array'\");\n    }\n    if (sort_on_option.length === 0) {\n      return list;\n    }\n    list.sort(generateSortFunction(\n      key_schema,\n      sort_on_option\n    ));\n    return list;\n  }\n\n  /**\n   * Limit a list of items, according to index and length.\n   *\n   * @param  {Array} limit_option A couple [from, length]\n   * @param  {Array} list The item list to limit\n   * @return {Array} The filtered list\n   */\n  function limit(limit_option, list) {\n    if (!Array.isArray(limit_option)) {\n      throw new TypeError(\"jioquery.limit(): \" +\n                          \"Argument 1 is not of type 'array'\");\n    }\n    if (!Array.isArray(list)) {\n      throw new TypeError(\"jioquery.limit(): \" +\n                          \"Argument 2 is not of type 'array'\");\n    }\n    list.splice(0, limit_option[0]);\n    if (limit_option[1]) {\n      list.splice(limit_option[1]);\n    }\n    return list;\n  }\n\n  /**\n   * Filter a list of items, modifying them to select only wanted keys.\n   *\n   * @param  {Array} select_option Key list to keep\n   * @param  {Array} list The item list to filter\n   * @return {Array} The filtered list\n   */\n  function select(select_option, list) {\n    var i, j, new_item;\n    if (!Array.isArray(select_option)) {\n      throw new TypeError(\"jioquery.select(): \" +\n                          \"Argument 1 is not of type Array\");\n    }\n    if (!Array.isArray(list)) {\n      throw new TypeError(\"jioquery.select(): \" +\n                          \"Argument 2 is not of type Array\");\n    }\n    for (i = 0; i < list.length; i += 1) {\n      new_item = {};\n      for (j = 0; j < select_option.length; j += 1) {\n        if (list[i].hasOwnProperty([select_option[j]])) {\n          new_item[select_option[j]] = list[i][select_option[j]];\n        }\n      }\n      for (j in new_item) {\n        if (new_item.hasOwnProperty(j)) {\n          list[i] = new_item;\n          break;\n        }\n      }\n    }\n    return list;\n  }\n\n  function checkKeySchema(key_schema) {\n    var prop;\n\n    if (key_schema !== undefined) {\n      if (typeof key_schema !== 'object') {\n        throw new TypeError(\"Query().create(): \" +\n                            \"key_schema is not of type 'object'\");\n      }\n      // key_set is mandatory\n      if (key_schema.key_set === undefined) {\n        throw new TypeError(\"Query().create(): \" +\n                            \"key_schema has no 'key_set' property\");\n      }\n      for (prop in key_schema) {\n        if (key_schema.hasOwnProperty(prop)) {\n          switch (prop) {\n          case 'key_set':\n          case 'cast_lookup':\n          case 'match_lookup':\n            break;\n          default:\n            throw new TypeError(\"Query().create(): \" +\n                               \"key_schema has unknown property '\" + prop + \"'\");\n          }\n        }\n      }\n    }\n  }\n\n  /**\n   * The query to use to filter a list of objects.\n   * This is an abstract class.\n   *\n   * @class Query\n   * @constructor\n   */\n  function Query(key_schema) {\n\n    checkKeySchema(key_schema);\n    this._key_schema = key_schema || {};\n\n    /**\n     * Called before parsing the query. Must be overridden!\n     *\n     * @method onParseStart\n     * @param  {Object} object The object shared in the parse process\n     * @param  {Object} option Some option gave in parse()\n     */\n  //   this.onParseStart = emptyFunction;\n\n    /**\n     * Called when parsing a simple query. Must be overridden!\n     *\n     * @method onParseSimpleQuery\n     * @param  {Object} object The object shared in the parse process\n     * @param  {Object} option Some option gave in parse()\n     */\n  //   this.onParseSimpleQuery = emptyFunction;\n\n    /**\n     * Called when parsing a complex query. Must be overridden!\n     *\n     * @method onParseComplexQuery\n     * @param  {Object} object The object shared in the parse process\n     * @param  {Object} option Some option gave in parse()\n     */\n  //   this.onParseComplexQuery = emptyFunction;\n\n    /**\n     * Called after parsing the query. Must be overridden!\n     *\n     * @method onParseEnd\n     * @param  {Object} object The object shared in the parse process\n     * @param  {Object} option Some option gave in parse()\n     */\n  //   this.onParseEnd = emptyFunction;\n\n    return;\n  }\n\n  /**\n   * Filter the item list with matching item only\n   *\n   * @method exec\n   * @param  {Array} item_list The list of object\n   * @param  {Object} [option] Some operation option\n   * @param  {Array} [option.select_list] A object keys to retrieve\n   * @param  {Array} [option.sort_on] Couples of object keys and \"ascending\"\n   *                 or \"descending\"\n   * @param  {Array} [option.limit] Couple of integer, first is an index and\n   *                 second is the length.\n   */\n  Query.prototype.exec = function (item_list, option) {\n    if (!Array.isArray(item_list)) {\n      throw new TypeError(\"Query().exec(): Argument 1 is not of type 'array'\");\n    }\n    if (option === undefined) {\n      option = {};\n    }\n    if (typeof option !== 'object') {\n      throw new TypeError(\"Query().exec(): \" +\n                          \"Optional argument 2 is not of type 'object'\");\n    }\n    var context = this,\n      i;\n    for (i = item_list.length - 1; i >= 0; i -= 1) {\n      if (!context.match(item_list[i])) {\n        item_list.splice(i, 1);\n      }\n    }\n\n    if (option.sort_on) {\n      sortOn(option.sort_on, item_list, this._key_schema);\n    }\n\n    if (option.limit) {\n      limit(option.limit, item_list);\n    }\n\n    select(option.select_list || [], item_list);\n\n    return new RSVP.Queue()\n      .push(function () {\n        return item_list;\n      });\n  };\n\n  /**\n   * Test if an item matches this query\n   *\n   * @method match\n   * @param  {Object} item The object to test\n   * @return {Boolean} true if match, false otherwise\n   */\n  Query.prototype.match = function () {\n    return true;\n  };\n\n  /**\n   * Browse the Query in deep calling parser method in each step.\n   *\n   * `onParseStart` is called first, on end `onParseEnd` is called.\n   * It starts from the simple queries at the bottom of the tree calling the\n   * parser method `onParseSimpleQuery`, and go up calling the\n   * `onParseComplexQuery` method.\n   *\n   * @method parse\n   * @param  {Object} option Any options you want (except 'parsed')\n   * @return {Any} The parse result\n   */\n  Query.prototype.parse = function (option) {\n    var that = this,\n      object;\n    /**\n     * The recursive parser.\n     *\n     * @param  {Object} object The object shared in the parse process\n     * @param  {Object} options Some options usable in the parseMethods\n     * @return {Any} The parser result\n     */\n    function recParse(object, option) {\n      var query = object.parsed,\n        queue = new RSVP.Queue(),\n        i;\n\n      function enqueue(j) {\n        queue\n          .push(function () {\n            object.parsed = query.query_list[j];\n            return recParse(object, option);\n          })\n          .push(function () {\n            query.query_list[j] = object.parsed;\n          });\n      }\n\n      if (query.type === \"complex\") {\n\n\n        for (i = 0; i < query.query_list.length; i += 1) {\n          enqueue(i);\n        }\n\n        return queue\n          .push(function () {\n            object.parsed = query;\n            return that.onParseComplexQuery(object, option);\n          });\n\n      }\n      if (query.type === \"simple\") {\n        return that.onParseSimpleQuery(object, option);\n      }\n    }\n    object = {\n      parsed: JSON.parse(JSON.stringify(that.serialized()))\n    };\n    return new RSVP.Queue()\n      .push(function () {\n        return that.onParseStart(object, option);\n      })\n      .push(function () {\n        return recParse(object, option);\n      })\n      .push(function () {\n        return that.onParseEnd(object, option);\n      })\n      .push(function () {\n        return object.parsed;\n      });\n\n  };\n\n  /**\n   * Convert this query to a parsable string.\n   *\n   * @method toString\n   * @return {String} The string version of this query\n   */\n  Query.prototype.toString = function () {\n    return \"\";\n  };\n\n  /**\n   * Convert this query to an jsonable object in order to be remake thanks to\n   * QueryFactory class.\n   *\n   * @method serialized\n   * @return {Object} The jsonable object\n   */\n  Query.prototype.serialized = function () {\n    return undefined;\n  };\n\n  /**\n   * Provides static methods to create Query object\n   *\n   * @class QueryFactory\n   */\n  function QueryFactory() {\n    return;\n  }\n\n  /**\n   * Escapes regexp special chars from a string.\n   *\n   * @param  {String} string The string to escape\n   * @return {String} The escaped string\n   */\n  function stringEscapeRegexpCharacters(string) {\n    return string.replace(regexp_escape, \"\\\\$&\");\n  }\n\n  /**\n   * Inherits the prototype methods from one constructor into another. The\n   * prototype of `constructor` will be set to a new object created from\n   * `superConstructor`.\n   *\n   * @param  {Function} constructor The constructor which inherits the super one\n   * @param  {Function} superConstructor The super constructor\n   */\n  function inherits(constructor, superConstructor) {\n    constructor.super_ = superConstructor;\n    constructor.prototype = Object.create(superConstructor.prototype, {\n      \"constructor\": {\n        \"configurable\": true,\n        \"enumerable\": false,\n        \"writable\": true,\n        \"value\": constructor\n      }\n    });\n  }\n\n  /**\n   * Convert a search text to a regexp.\n   *\n   * @param  {String} string The string to convert\n   * @param  {Boolean} [use_wildcard_character=true] Use wildcard \"%\" and \"_\"\n   * @return {RegExp} The search text regexp\n   */\n  function searchTextToRegExp(string, use_wildcard_characters) {\n    if (typeof string !== 'string') {\n      throw new TypeError(\"jioquery.searchTextToRegExp(): \" +\n                          \"Argument 1 is not of type 'string'\");\n    }\n    if (use_wildcard_characters === false) {\n      return new RegExp(\"^\" + stringEscapeRegexpCharacters(string) + \"$\");\n    }\n    return new RegExp(\"^\" + stringEscapeRegexpCharacters(string)\n      .replace(regexp_percent, '[\\\\s\\\\S]*')\n      .replace(regexp_underscore, '.') + \"$\", \"i\");\n  }\n\n  /**\n   * The ComplexQuery inherits from Query, and compares one or several metadata\n   * values.\n   *\n   * @class ComplexQuery\n   * @extends Query\n   * @param  {Object} [spec={}] The specifications\n   * @param  {String} [spec.operator=\"AND\"] The compare method to use\n   * @param  {String} spec.key The metadata key\n   * @param  {String} spec.value The value of the metadata to compare\n   */\n  function ComplexQuery(spec, key_schema) {\n    Query.call(this, key_schema);\n\n    /**\n     * Logical operator to use to compare object values\n     *\n     * @attribute operator\n     * @type String\n     * @default \"AND\"\n     * @optional\n     */\n    this.operator = spec.operator;\n\n    /**\n     * The sub Query list which are used to query an item.\n     *\n     * @attribute query_list\n     * @type Array\n     * @default []\n     * @optional\n     */\n    this.query_list = spec.query_list || [];\n    this.query_list = this.query_list.map(\n      // decorate the map to avoid sending the index as key_schema argument\n      function (o) { return QueryFactory.create(o, key_schema); }\n    );\n\n  }\n  inherits(ComplexQuery, Query);\n\n  ComplexQuery.prototype.operator = \"AND\";\n  ComplexQuery.prototype.type = \"complex\";\n\n  /**\n   * #crossLink \"Query/match:method\"\n   */\n  ComplexQuery.prototype.match = function (item) {\n    var operator = this.operator;\n    if (!(regexp_operator.test(operator))) {\n      operator = \"AND\";\n    }\n    return this[operator.toUpperCase()](item);\n  };\n\n  /**\n   * #crossLink \"Query/toString:method\"\n   */\n  ComplexQuery.prototype.toString = function () {\n    /*global objectToSearchText */\n    return objectToSearchText(this.toJSON());\n  };\n\n  /**\n   * #crossLink \"Query/serialized:method\"\n   */\n  ComplexQuery.prototype.serialized = function () {\n    var s = {\n      \"type\": \"complex\",\n      \"operator\": this.operator,\n      \"query_list\": []\n    };\n    this.query_list.forEach(function (query) {\n      s.query_list.push(\n        typeof query.toJSON === \"function\" ? query.toJSON() : query\n      );\n    });\n    return s;\n  };\n  ComplexQuery.prototype.toJSON = ComplexQuery.prototype.serialized;\n\n  /**\n   * Comparison operator, test if all sub queries match the\n   * item value\n   *\n   * @method AND\n   * @param  {Object} item The item to match\n   * @return {Boolean} true if all match, false otherwise\n   */\n  ComplexQuery.prototype.AND = function (item) {\n    var result = true,\n      i = 0;\n\n    while (result && (i !== this.query_list.length)) {\n      result = this.query_list[i].match(item);\n      i += 1;\n    }\n    return result;\n\n  };\n\n  /**\n   * Comparison operator, test if one of the sub queries matches the\n   * item value\n   *\n   * @method OR\n   * @param  {Object} item The item to match\n   * @return {Boolean} true if one match, false otherwise\n   */\n  ComplexQuery.prototype.OR = function (item) {\n    var result = false,\n      i = 0;\n\n    while ((!result) && (i !== this.query_list.length)) {\n      result = this.query_list[i].match(item);\n      i += 1;\n    }\n\n    return result;\n  };\n\n  /**\n   * Comparison operator, test if the sub query does not match the\n   * item value\n   *\n   * @method NOT\n   * @param  {Object} item The item to match\n   * @return {Boolean} true if one match, false otherwise\n   */\n  ComplexQuery.prototype.NOT = function (item) {\n    return !this.query_list[0].match(item);\n  };\n\n  /**\n   * Creates Query object from a search text string or a serialized version\n   * of a Query.\n   *\n   * @method create\n   * @static\n   * @param  {Object,String} object The search text or the serialized version\n   *         of a Query\n   * @return {Query} A Query object\n   */\n  QueryFactory.create = function (object, key_schema) {\n    if (object === \"\") {\n      return new Query(key_schema);\n    }\n    if (typeof object === \"string\") {\n      object = parseStringToObject(object);\n    }\n    if (typeof (object || {}).type === \"string\" &&\n        query_class_dict[object.type]) {\n      return new query_class_dict[object.type](object, key_schema);\n    }\n    throw new TypeError(\"QueryFactory.create(): \" +\n                        \"Argument 1 is not a search text or a parsable object\");\n  };\n\n  function ensureString(value) {\n    if (value === undefined) { return \"undefined\"; }\n    if (value === null) { return \"null\"; }\n    return value.toString();\n  }\n\n  function renderSearchTextValue(value) {\n    return '\"' + ensureString(value).replace(/\"/g, '\\\\\"') + '\"';\n  }\n\n  function objectToSearchText(query) {\n    var i = 0,\n      query_list = null,\n      string_list = null,\n      operator = \"\",\n      common_key = \"\";\n    if (query.type === \"simple\") {\n      return (query.key ? query.key + \": \" : \"\") +\n        (query.operator || \"\") + ' ' +\n        renderSearchTextValue(query.value);\n    }\n    if (query.type === \"complex\") {\n      query_list = query.query_list;\n      if (!query_list || query_list.length === 0) {\n        return \"\";\n      }\n      operator = query.operator || \"\";\n      if (operator === \"NOT\") {\n        // fallback to AND operator if several queries are given\n        // i.e. `NOT ( a AND b )`\n        return \"NOT ( \" + objectToSearchText(\n          {type: \"complex\", operator: \"AND\", query_list: query_list}\n        ) + \" )\";\n      }\n      if (query_list.length === 1) {\n        return objectToSearchText(query_list[0]);\n      }\n\n      common_key = query_list[i].key;\n      for (i = 1; i < query_list.length; i += 1) {\n        if (query_list[i].type !== \"simple\" ||\n            query_list[i].key !== common_key) {\n          break;\n        }\n      }\n      string_list = [];\n      if (i === query_list.length) {\n        for (i = 0; i < query_list.length; i += 1) {\n          string_list.push(\n            (query_list[i].operator || \"\") +\n              ' ' + renderSearchTextValue(query_list[i].value)\n          );\n        }\n      } else {\n        common_key = \"\";\n        for (i = 0; i < query_list.length; i += 1) {\n          string_list.push(objectToSearchText(query_list[i]));\n        }\n      }\n      if (string_list.length > 1) {\n        return (common_key ? common_key + \": \" : \"\") +\n          \"( \" + string_list.join(\" \" + operator + \" \") + \" )\";\n      }\n      return (common_key ? common_key + \": \" : \"\") +\n        string_list[0];\n    }\n    throw new TypeError(\"This object is not a query\");\n  }\n\n  /**\n   * The SimpleQuery inherits from Query, and compares one metadata value\n   *\n   * @class SimpleQuery\n   * @extends Query\n   * @param  {Object} [spec={}] The specifications\n   * @param  {String} [spec.operator=\"=\"] The compare method to use\n   * @param  {String} spec.key The metadata key\n   * @param  {String} spec.value The value of the metadata to compare\n   */\n  function SimpleQuery(spec, key_schema) {\n    Query.call(this, key_schema);\n\n    /**\n     * Operator to use to compare object values\n     *\n     * @attribute operator\n     * @type String\n     * @optional\n     */\n    this.operator = spec.operator;\n\n    /**\n     * Key of the object which refers to the value to compare\n     *\n     * @attribute key\n     * @type String\n     */\n    this.key = spec.key;\n\n    /**\n     * Value is used to do the comparison with the object value\n     *\n     * @attribute value\n     * @type String\n     */\n    this.value = spec.value;\n\n  }\n  inherits(SimpleQuery, Query);\n\n  SimpleQuery.prototype.type = \"simple\";\n\n  function checkKey(key) {\n    var prop;\n\n    if (key.read_from === undefined) {\n      throw new TypeError(\"Custom key is missing the read_from property\");\n    }\n\n    for (prop in key) {\n      if (key.hasOwnProperty(prop)) {\n        switch (prop) {\n        case 'read_from':\n        case 'cast_to':\n        case 'equal_match':\n          break;\n        default:\n          throw new TypeError(\"Custom key has unknown property '\" +\n                              prop + \"'\");\n        }\n      }\n    }\n  }\n\n  /**\n   * #crossLink \"Query/match:method\"\n   */\n  SimpleQuery.prototype.match = function (item) {\n    var object_value = null,\n      equal_match = null,\n      cast_to = null,\n      matchMethod = null,\n      operator = this.operator,\n      value = null,\n      key = this.key,\n      k;\n\n    if (!(regexp_comparaison.test(operator))) {\n      // `operator` is not correct, we have to change it to \"like\" or \"=\"\n      if (regexp_percent.test(this.value)) {\n        // `value` contains a non escaped `%`\n        operator = \"like\";\n      } else {\n        // `value` does not contain non escaped `%`\n        operator = \"=\";\n      }\n    }\n\n    matchMethod = this[operator];\n\n    if (this._key_schema.key_set && this._key_schema.key_set[key] !== undefined) {\n      key = this._key_schema.key_set[key];\n    }\n\n    // match with all the fields if key is empty\n    if (key === '') {\n      matchMethod = this.like;\n      value = '%' + this.value + '%';\n      for (k in item) {\n        if (item.hasOwnProperty(k)) {\n          if (k !== '__id' && item[k]) {\n            if (matchMethod(item[k], value) === true) {\n              return true;\n            }\n          }\n        }\n      }\n      return false;\n    }\n\n    if (typeof key === 'object') {\n      checkKey(key);\n      object_value = item[key.read_from];\n\n      equal_match = key.equal_match;\n\n      // equal_match can be a string\n      if (typeof equal_match === 'string') {\n        // XXX raise error if equal_match not in match_lookup\n        equal_match = this._key_schema.match_lookup[equal_match];\n      }\n\n      // equal_match overrides the default '=' operator\n      if (equal_match !== undefined) {\n        matchMethod = (operator === \"=\" || operator === \"like\" ?\n                       equal_match : matchMethod);\n      }\n\n      value = this.value;\n      cast_to = key.cast_to;\n      if (cast_to) {\n        // cast_to can be a string\n        if (typeof cast_to === 'string') {\n          // XXX raise error if cast_to not in cast_lookup\n          cast_to = this._key_schema.cast_lookup[cast_to];\n        }\n\n        try {\n          value = cast_to(value);\n        } catch (e) {\n          value = undefined;\n        }\n\n        try {\n          object_value = cast_to(object_value);\n        } catch (e) {\n          object_value = undefined;\n        }\n      }\n    } else {\n      object_value = item[key];\n      value = this.value;\n    }\n    if (object_value === undefined || value === undefined) {\n      return false;\n    }\n    return matchMethod(object_value, value);\n  };\n\n  /**\n   * #crossLink \"Query/toString:method\"\n   */\n  SimpleQuery.prototype.toString = function () {\n    return objectToSearchText(this.toJSON());\n  };\n\n  /**\n   * #crossLink \"Query/serialized:method\"\n   */\n  SimpleQuery.prototype.serialized = function () {\n    var object = {\n      \"type\": \"simple\",\n      \"key\": this.key,\n      \"value\": this.value\n    };\n    if (this.operator !== undefined) {\n      object.operator = this.operator;\n    }\n    return object;\n  };\n  SimpleQuery.prototype.toJSON = SimpleQuery.prototype.serialized;\n\n  /**\n   * Comparison operator, test if this query value matches the item value\n   *\n   * @method =\n   * @param  {String} object_value The value to compare\n   * @param  {String} comparison_value The comparison value\n   * @return {Boolean} true if match, false otherwise\n   */\n  SimpleQuery.prototype[\"=\"] = function (object_value, comparison_value) {\n    var value, i;\n    if (!Array.isArray(object_value)) {\n      object_value = [object_value];\n    }\n    for (i = 0; i < object_value.length; i += 1) {\n      value = object_value[i];\n      if (typeof value === 'object' && value.hasOwnProperty('content')) {\n        value = value.content;\n      }\n      if (typeof value.cmp === \"function\") {\n        return (value.cmp(comparison_value) === 0);\n      }\n      if (comparison_value.toString() === value.toString()) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  /**\n   * Comparison operator, test if this query value matches the item value\n   *\n   * @method like\n   * @param  {String} object_value The value to compare\n   * @param  {String} comparison_value The comparison value\n   * @return {Boolean} true if match, false otherwise\n   */\n  SimpleQuery.prototype.like = function (object_value, comparison_value) {\n    var value, i;\n    if (!Array.isArray(object_value)) {\n      object_value = [object_value];\n    }\n    for (i = 0; i < object_value.length; i += 1) {\n      value = object_value[i];\n      if (typeof value === 'object' && value.hasOwnProperty('content')) {\n        value = value.content;\n      }\n      if (typeof value.cmp === \"function\") {\n        return (value.cmp(comparison_value) === 0);\n      }\n      if (\n        searchTextToRegExp(comparison_value.toString()).test(value.toString())\n      ) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  /**\n   * Comparison operator, test if this query value does not match the item value\n   *\n   * @method !=\n   * @param  {String} object_value The value to compare\n   * @param  {String} comparison_value The comparison value\n   * @return {Boolean} true if not match, false otherwise\n   */\n  SimpleQuery.prototype[\"!=\"] = function (object_value, comparison_value) {\n    var value, i;\n    if (!Array.isArray(object_value)) {\n      object_value = [object_value];\n    }\n    for (i = 0; i < object_value.length; i += 1) {\n      value = object_value[i];\n      if (typeof value === 'object' && value.hasOwnProperty('content')) {\n        value = value.content;\n      }\n      if (typeof value.cmp === \"function\") {\n        return (value.cmp(comparison_value) !== 0);\n      }\n      if (comparison_value.toString() === value.toString()) {\n        return false;\n      }\n    }\n    return true;\n  };\n\n  /**\n   * Comparison operator, test if this query value is lower than the item value\n   *\n   * @method <\n   * @param  {Number, String} object_value The value to compare\n   * @param  {Number, String} comparison_value The comparison value\n   * @return {Boolean} true if lower, false otherwise\n   */\n  SimpleQuery.prototype[\"<\"] = function (object_value, comparison_value) {\n    var value;\n    if (!Array.isArray(object_value)) {\n      object_value = [object_value];\n    }\n    value = object_value[0];\n    if (typeof value === 'object' && value.hasOwnProperty('content')) {\n      value = value.content;\n    }\n    if (typeof value.cmp === \"function\") {\n      return (value.cmp(comparison_value) < 0);\n    }\n    return (value < comparison_value);\n  };\n\n  /**\n   * Comparison operator, test if this query value is equal or lower than the\n   * item value\n   *\n   * @method <=\n   * @param  {Number, String} object_value The value to compare\n   * @param  {Number, String} comparison_value The comparison value\n   * @return {Boolean} true if equal or lower, false otherwise\n   */\n  SimpleQuery.prototype[\"<=\"] = function (object_value, comparison_value) {\n    var value;\n    if (!Array.isArray(object_value)) {\n      object_value = [object_value];\n    }\n    value = object_value[0];\n    if (typeof value === 'object' && value.hasOwnProperty('content')) {\n      value = value.content;\n    }\n    if (typeof value.cmp === \"function\") {\n      return (value.cmp(comparison_value) <= 0);\n    }\n    return (value <= comparison_value);\n  };\n\n  /**\n   * Comparison operator, test if this query value is greater than the item\n   * value\n   *\n   * @method >\n   * @param  {Number, String} object_value The value to compare\n   * @param  {Number, String} comparison_value The comparison value\n   * @return {Boolean} true if greater, false otherwise\n   */\n  SimpleQuery.prototype[\">\"] = function (object_value, comparison_value) {\n    var value;\n    if (!Array.isArray(object_value)) {\n      object_value = [object_value];\n    }\n    value = object_value[0];\n    if (typeof value === 'object' && value.hasOwnProperty('content')) {\n      value = value.content;\n    }\n    if (typeof value.cmp === \"function\") {\n      return (value.cmp(comparison_value) > 0);\n    }\n    return (value > comparison_value);\n  };\n\n  /**\n   * Comparison operator, test if this query value is equal or greater than the\n   * item value\n   *\n   * @method >=\n   * @param  {Number, String} object_value The value to compare\n   * @param  {Number, String} comparison_value The comparison value\n   * @return {Boolean} true if equal or greater, false otherwise\n   */\n  SimpleQuery.prototype[\">=\"] = function (object_value, comparison_value) {\n    var value;\n    if (!Array.isArray(object_value)) {\n      object_value = [object_value];\n    }\n    value = object_value[0];\n    if (typeof value === 'object' && value.hasOwnProperty('content')) {\n      value = value.content;\n    }\n    if (typeof value.cmp === \"function\") {\n      return (value.cmp(comparison_value) >= 0);\n    }\n    return (value >= comparison_value);\n  };\n\n  query_class_dict.simple = SimpleQuery;\n  query_class_dict.complex = ComplexQuery;\n\n  Query.parseStringToObject = parseStringToObject;\n  Query.objectToSearchText = objectToSearchText;\n\n  window.Query = Query;\n  window.SimpleQuery = SimpleQuery;\n  window.ComplexQuery = ComplexQuery;\n  window.QueryFactory = QueryFactory;\n\n}(RSVP, window, parseStringToObject));\n/*\n * Copyright 2018, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n\n/*global window, WeakMap, ArrayBuffer, Uint8Array */\n(function (window, WeakMap, ArrayBuffer, Uint8Array) {\n  \"use strict\";\n\n  var html5weakmap = new WeakMap();\n\n  function EventTarget() {\n    html5weakmap.set(this, Object.create(null));\n  }\n\n  EventTarget.prototype.addEventListener = function (type, listener) {\n    if (typeof listener !== 'function') {\n      return;\n    }\n    var em = html5weakmap.get(this);\n    type = type.toString();\n    if (em[type]) {\n      em[type].push(listener);\n    } else {\n      em[type] = [listener];\n    }\n  };\n\n  EventTarget.prototype.removeEventListener = function (type, listener) {\n    if (typeof listener !== 'function') {\n      return;\n    }\n    var em = html5weakmap.get(this),\n      i,\n      listeners = em[type];\n\n    type = type.toString();\n\n    if (listeners) {\n      for (i = 0; i < listeners.length; i += 1) {\n        if (listeners[i] === listener) {\n          if (listeners.length === 1) {\n            delete em[type];\n            return;\n          }\n          listeners.splice(i, 1);\n          return;\n        }\n      }\n    }\n  };\n\n  EventTarget.prototype.dispatchEvent = function (event) {\n    var type = event.type.toString(),\n      em = html5weakmap.get(this),\n      ontype = 'on' + type,\n      i,\n      listeners;\n\n    if (typeof this[ontype] === 'function') {\n      try {\n        this[ontype](event);\n      } catch (ignore) {}\n    }\n    listeners = em[type];\n    if (listeners) {\n      for (i = 0; i < listeners.length; i += 1) {\n        try {\n          listeners[i](event);\n        } catch (ignore) {}\n      }\n    }\n  };\n\n  window.EventTarget = window.EventTarget || EventTarget;\n\n  function Blob(blobParts, options) {\n    // https://developer.mozilla.org/en-US/docs/Web/API/Blob\n    var i,\n      priv = {},\n      buffers = [];\n\n    html5weakmap.set(this, priv);\n    if (blobParts) {\n      for (i = 0; i < blobParts.length; i += 1) {\n        if (Buffer.isBuffer(blobParts[i])) {\n          buffers.push(blobParts[i]);\n        } else if (blobParts[i] instanceof Blob) {\n          buffers.push(html5weakmap.get(blobParts[i]).data);\n        } else if (blobParts[i] instanceof ArrayBuffer) {\n          buffers.push(new Buffer(new Uint8Array(blobParts[i])));\n        } else {\n          buffers.push(new Buffer(String(blobParts[i])));\n        }\n      }\n    }\n    priv.data = Buffer.concat(buffers);\n    Object.defineProperty(this, 'size', {\n      enumerable: true,\n      value: priv.data.length\n    });\n    Object.defineProperty(this, 'type', {\n      enumerable: true,\n      value: options ? String(options.type || '') : ''\n    });\n  }\n\n  Blob.prototype.size = 0;\n  Blob.prototype.type = '';\n  Blob.prototype.slice = function (start, end, contentType) {\n    return new Blob([html5weakmap.get(this).data.slice(start, end)], {\n      type: contentType\n    });\n  };\n\n  window.Blob = Blob;//window.Blob || Blob;\n\n  function FileReader() {\n    EventTarget.call(this);\n  }\n\n  FileReader.prototype = Object.create(EventTarget.prototype);\n  Object.defineProperty(FileReader, 'constructor', {\n    value: FileReader\n  });\n\n  FileReader.prototype.readAsText = function (blob) {\n    var target = this,\n      priv = html5weakmap.get(blob),\n      result = priv.data.toString(),\n      event = Object.freeze({\n        type: 'load',\n        target: target\n      });\n\n    process.nextTick(function () {\n      target.result = result;\n      target.dispatchEvent(event);\n    });\n  };\n\n  FileReader.prototype.readAsArrayBuffer = function (blob) {\n    var target = this,\n      priv = html5weakmap.get(blob),\n      result = new Uint8Array(priv.data).buffer,\n      event = Object.freeze({\n        type: 'load',\n        target: target\n      });\n\n    process.nextTick(function () {\n      target.result = result;\n      target.dispatchEvent(event);\n    });\n  };\n\n  FileReader.prototype.readAsDataURL = function (blob) {\n    var target = this,\n      priv = html5weakmap.get(blob),\n      result = 'data:' + blob.type + ';base64,' + priv.data.toString('base64'),\n      event = Object.freeze({\n        type: 'load',\n        target: target\n      });\n\n    process.nextTick(function () {\n      target.result = result;\n      target.dispatchEvent(event);\n    });\n  };\n\n  window.FileReader = window.FileReader || FileReader;\n\n  function atob(str) {\n    try {\n      return window.atob(str);\n    } catch (err) {\n      var buffer = Buffer.from(str.toString(), 'base64');\n      // Provide the same behaviour than the browser atob\n      if (buffer.toString('base64') !== str) {\n        throw new Error('The string to be decoded is not correctly encoded.');\n      }\n      return buffer.toString('binary');\n    }\n  }\n\n  window.atob = window.atob || atob;\n\n  function btoa(str) {\n    try {\n      return window.btoa(str);\n    } catch (err) {\n      return Buffer.from(str.toString(), 'binary').toString('base64');\n    }\n  }\n\n  window.btoa = window.btoa || btoa;\n\n}(window, WeakMap, ArrayBuffer, Uint8Array));\n\nglobal.XMLHttpRequest = module.exports;\nvar Blob = window.Blob,\n  atob = window.atob,\n  btoa = window.btoa,\n  FileReader = window.FileReader,\n  QueryFactory = window.QueryFactory,\n  Query = window.Query,\n  SimpleQuery = window.SimpleQuery,\n  ComplexQuery = window.ComplexQuery;\n\n/*\n * Copyright 2014, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*global window, moment */\n/*jslint nomen: true, maxlen: 200*/\n(function (window, moment) {\n  \"use strict\";\n\n//   /**\n//    * Add a secured (write permission denied) property to an object.\n//    *\n//    * @param  {Object} object The object to fill\n//    * @param  {String} key The object key where to store the property\n//    * @param  {Any} value The value to store\n//    */\n//   function _export(key, value) {\n//     Object.defineProperty(to_export, key, {\n//       \"configurable\": false,\n//       \"enumerable\": true,\n//       \"writable\": false,\n//       \"value\": value\n//     });\n//   }\n\n  var YEAR = 'year',\n    MONTH = 'month',\n    DAY = 'day',\n    HOUR = 'hour',\n    MIN = 'minute',\n    SEC = 'second',\n    MSEC = 'millisecond',\n    precision_grade = {\n      'year': 0,\n      'month': 1,\n      'day': 2,\n      'hour': 3,\n      'minute': 4,\n      'second': 5,\n      'millisecond': 6\n    },\n    lesserPrecision = function (p1, p2) {\n      return (precision_grade[p1] < precision_grade[p2]) ? p1 : p2;\n    },\n    JIODate;\n\n\n  JIODate = function (str) {\n    // in case of forgotten 'new'\n    if (!(this instanceof JIODate)) {\n      return new JIODate(str);\n    }\n\n    if (str instanceof JIODate) {\n      this.mom = str.mom.clone();\n      this._precision = str._precision;\n      return;\n    }\n\n    if (str === undefined) {\n      this.mom = moment();\n      this.setPrecision(MSEC);\n      return;\n    }\n\n    this.mom = null;\n    this._str = str;\n\n    // http://www.w3.org/TR/NOTE-datetime\n    // http://dotat.at/tmp/ISO_8601-2004_E.pdf\n\n    // XXX these regexps fail to detect many invalid dates.\n\n    if (str.match(/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+\\-][0-2]\\d:[0-5]\\d|Z)/)\n          || str.match(/\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\d/)) {\n      // ISO, milliseconds\n      this.mom = moment(str);\n      this.setPrecision(MSEC);\n    } else if (str.match(/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+\\-][0-2]\\d:[0-5]\\d|Z)/)\n          || str.match(/\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d/)) {\n      // ISO, seconds\n      this.mom = moment(str);\n      this.setPrecision(SEC);\n    } else if (str.match(/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+\\-][0-2]\\d:[0-5]\\d|Z)/)\n          || str.match(/\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d/)) {\n      // ISO, minutes\n      this.mom = moment(str);\n      this.setPrecision(MIN);\n    } else if (str.match(/\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d/)) {\n      this.mom = moment(str);\n      this.setPrecision(HOUR);\n    } else if (str.match(/\\d\\d\\d\\d-\\d\\d-\\d\\d/)) {\n      this.mom = moment(str);\n      this.setPrecision(DAY);\n    } else if (str.match(/\\d\\d\\d\\d-\\d\\d/)) {\n      this.mom = moment(str);\n      this.setPrecision(MONTH);\n    } else if (str.match(/\\d\\d\\d\\d/)) {\n      // Creating a moment with only the year will show this deprecation\n      // warning:\n      //\n      // Deprecation warning: moment construction falls back to js Date. This is\n      // discouraged and will be removed in upcoming major release. Please refer\n      // to https://github.com/moment/moment/issues/1407 for more info.\n      //\n      // TL;DR: parsing year-only strings with momentjs falls back to native\n      // Date and it won't correctly represent the year in local time if UTF\n      // offset is negative.\n      //\n      // The solution is to use the format parameter, so momentjs won't fall\n      // back to the native Date and we will have the correct year in local\n      // time.\n      //\n      this.mom = moment(str, 'YYYY');\n      this.setPrecision(YEAR);\n    }\n\n    if (!this.mom) {\n      throw new Error(\"Cannot parse: \" + str);\n    }\n\n  };\n\n\n  JIODate.prototype.setPrecision = function (prec) {\n    this._precision = prec;\n  };\n\n\n  JIODate.prototype.getPrecision = function () {\n    return this._precision;\n  };\n\n\n  JIODate.prototype.cmp = function (other) {\n    var m1 = this.mom,\n      m2 = other.mom,\n      p = lesserPrecision(this._precision, other._precision);\n    return m1.isBefore(m2, p) ? -1 : (m1.isSame(m2, p) ? 0 : +1);\n  };\n\n\n  JIODate.prototype.toPrecisionString = function (precision) {\n    var fmt;\n\n    precision = precision || this._precision;\n\n    fmt = {\n      'millisecond': 'YYYY-MM-DD HH:mm:ss.SSS',\n      'second': 'YYYY-MM-DD HH:mm:ss',\n      'minute': 'YYYY-MM-DD HH:mm',\n      'hour': 'YYYY-MM-DD HH',\n      'day': 'YYYY-MM-DD',\n      'month': 'YYYY-MM',\n      'year': 'YYYY'\n    }[precision];\n\n    if (!fmt) {\n      throw new TypeError(\"Unsupported precision value '\" + precision + \"'\");\n    }\n\n    return this.mom.format(fmt);\n  };\n\n\n  JIODate.prototype.toString = function () {\n    return this._str;\n  };\n\n\n//   _export('JIODate', JIODate);\n// \n//   _export('YEAR', YEAR);\n//   _export('MONTH', MONTH);\n//   _export('DAY', DAY);\n//   _export('HOUR', HOUR);\n//   _export('MIN', MIN);\n//   _export('SEC', SEC);\n//   _export('MSEC', MSEC);\n\n  window.jiodate = {\n    JIODate: JIODate,\n    YEAR: YEAR,\n    MONTH: MONTH,\n    DAY: DAY,\n    HOUR: HOUR,\n    MIN: MIN,\n    SEC: SEC,\n    MSEC: MSEC\n  };\n}(window, moment));\n/*\n * Copyright 2014, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*global window, RSVP, Blob, XMLHttpRequest, QueryFactory, Query, atob,\n  FileReader, ArrayBuffer, Uint8Array */\n(function (window, RSVP, Blob, QueryFactory, Query, atob,\n           FileReader, ArrayBuffer, Uint8Array) {\n  \"use strict\";\n\n  /* Safari does not define DOMError */\n  /* + compat issue with private Firefox */\n  if (window.DOMError === undefined) {\n    window.DOMError = function FakeDOMError(message) {\n      this.message = message;\n    };\n  }\n\n  var util = {},\n    jIO;\n\n  function jIOError(message, status_code) {\n    if ((message !== undefined) && (typeof message !== \"string\")) {\n      throw new TypeError('You must pass a string.');\n    }\n    this.message = message || \"Default Message\";\n    this.status_code = status_code || 500;\n  }\n  jIOError.prototype = new Error();\n  jIOError.prototype.constructor = jIOError;\n  util.jIOError = jIOError;\n\n  /**\n   * Send request with XHR and return a promise. xhr.onload: The promise is\n   * resolved when the status code is lower than 400 with the xhr object as\n   * first parameter. xhr.onerror: reject with xhr object as first\n   * parameter. xhr.onprogress: notifies the xhr object.\n   *\n   * @param  {Object} param The parameters\n   * @param  {String} [param.type=\"GET\"] The request method\n   * @param  {String} [param.dataType=\"\"] The data type to retrieve\n   * @param  {String} param.url The url\n   * @param  {Any} [param.data] The data to send\n   * @param  {Number} param.timeout The request timeout value\n   * @param  {Function} [param.beforeSend] A function called just before the\n   *    send request. The first parameter of this function is the XHR object.\n   * @return {Promise} The promise\n   */\n  function ajax(param) {\n    var xhr = new XMLHttpRequest();\n    return new RSVP.Promise(function (resolve, reject) {\n      var k;\n      xhr.open(param.type || \"GET\", param.url, true);\n      xhr.responseType = param.dataType || \"\";\n      if (typeof param.headers === 'object' && param.headers !== null) {\n        for (k in param.headers) {\n          if (param.headers.hasOwnProperty(k)) {\n            xhr.setRequestHeader(k, param.headers[k]);\n          }\n        }\n      }\n      xhr.addEventListener(\"load\", function (e) {\n        if (e.target.status >= 400) {\n          return reject(e);\n        }\n        resolve(e);\n      });\n      xhr.addEventListener(\"error\", reject);\n      if (typeof param.xhrFields === 'object' && param.xhrFields !== null) {\n        for (k in param.xhrFields) {\n          if (param.xhrFields.hasOwnProperty(k)) {\n            xhr[k] = param.xhrFields[k];\n          }\n        }\n      }\n      if (param.timeout !== undefined && param.timeout !== 0) {\n        xhr.timeout = param.timeout;\n        xhr.ontimeout = function () {\n          return reject(new jIO.util.jIOError(\"Gateway Timeout\", 504));\n        };\n      }\n      if (typeof param.beforeSend === 'function') {\n        param.beforeSend(xhr);\n      }\n      xhr.send(param.data);\n    }, function () {\n      xhr.abort();\n    });\n  }\n  util.ajax = ajax;\n\n  function readBlobAsText(blob, encoding) {\n    var fr = new FileReader();\n    return new RSVP.Promise(function (resolve, reject) {\n      fr.addEventListener(\"load\", resolve);\n      fr.addEventListener(\"error\", reject);\n      fr.readAsText(blob, encoding);\n    }, function () {\n      fr.abort();\n    });\n  }\n  util.readBlobAsText = readBlobAsText;\n\n  function readBlobAsArrayBuffer(blob) {\n    var fr = new FileReader();\n    return new RSVP.Promise(function (resolve, reject) {\n      fr.addEventListener(\"load\", resolve);\n      fr.addEventListener(\"error\", reject);\n      fr.readAsArrayBuffer(blob);\n    }, function () {\n      fr.abort();\n    });\n  }\n  util.readBlobAsArrayBuffer = readBlobAsArrayBuffer;\n\n  function readBlobAsDataURL(blob) {\n    var fr = new FileReader();\n    return new RSVP.Promise(function (resolve, reject) {\n      fr.addEventListener(\"load\", resolve);\n      fr.addEventListener(\"error\", reject);\n      fr.readAsDataURL(blob);\n    }, function () {\n      fr.abort();\n    });\n  }\n  util.readBlobAsDataURL = readBlobAsDataURL;\n\n  function stringify(obj) {\n    // Implement a stable JSON.stringify\n    // Object's keys are alphabetically ordered\n    var key,\n      key_list,\n      i,\n      value,\n      result_list;\n    if (obj === undefined) {\n      return undefined;\n    }\n    if (obj === null) {\n      return 'null';\n    }\n    if (obj.constructor === Object) {\n      key_list = Object.keys(obj).sort();\n      result_list = [];\n      for (i = 0; i < key_list.length; i += 1) {\n        key = key_list[i];\n        value = stringify(obj[key]);\n        if (value !== undefined) {\n          result_list.push(stringify(key) + ':' + value);\n        }\n      }\n      return '{' + result_list.join(',') + '}';\n    }\n    if (obj.constructor === Array) {\n      result_list = [];\n      for (i = 0; i < obj.length; i += 1) {\n        result_list.push(stringify(obj[i]));\n      }\n      return '[' + result_list.join(',') + ']';\n    }\n    return JSON.stringify(obj);\n  }\n  util.stringify = stringify;\n\n  function base64toBlob(b64String, mimeString) {\n\n    var byteString = atob(b64String),\n    // write the bytes of the string to an ArrayBuffer\n      arrayBuffer = new ArrayBuffer(byteString.length),\n      _ia = new Uint8Array(arrayBuffer),\n      i;\n    for (i = 0; i < byteString.length; i += 1) {\n      _ia[i] = byteString.charCodeAt(i);\n    }\n    return new Blob([arrayBuffer], {type: mimeString});\n  }\n\n  util.base64toBlob = base64toBlob;\n\n  // https://gist.github.com/davoclavo/4424731\n  function dataURItoBlob(dataURI) {\n    if (dataURI === 'data:') {\n      return new Blob();\n    }\n    // convert base64 to raw binary data held in a string\n    var mimeString = dataURI.split(',')[0].split(':')[1];\n    mimeString = mimeString.slice(0, mimeString.length - \";base64\".length);\n    return base64toBlob(dataURI.split(',')[1], mimeString);\n  }\n\n  util.dataURItoBlob = dataURItoBlob;\n\n  // tools\n  function checkId(argument_list, storage, method_name) {\n    if (typeof argument_list[0] !== 'string' || argument_list[0] === '') {\n      throw new jIO.util.jIOError(\n        \"Document id must be a non empty string on '\" + storage.__type +\n          \".\" + method_name + \"'.\",\n        400\n      );\n    }\n  }\n\n  function checkAttachmentId(argument_list, storage, method_name) {\n    if (typeof argument_list[1] !== 'string' || argument_list[1] === '') {\n      throw new jIO.util.jIOError(\n        \"Attachment id must be a non empty string on '\" + storage.__type +\n          \".\" + method_name + \"'.\",\n        400\n      );\n    }\n  }\n\n  function ensurePushableQueue(callback, argument_list, context) {\n    var result;\n    try {\n      result = callback.apply(context, argument_list);\n    } catch (e) {\n      return new RSVP.Queue()\n        .push(function returnPushableError() {\n          return RSVP.reject(e);\n        });\n    }\n    if (result instanceof RSVP.Queue) {\n      return result;\n    }\n    return new RSVP.Queue(result);\n  }\n\n  function declareMethod(klass, name, precondition_function, post_function) {\n    klass.prototype[name] = function () {\n      var argument_list = arguments,\n        context = this,\n        precondition_result,\n        storage_method,\n        queue;\n\n      // Precondition function are not asynchronous\n      if (precondition_function !== undefined) {\n        precondition_result = precondition_function.apply(\n          context.__storage,\n          [argument_list, context, name]\n        );\n      }\n\n      storage_method = context.__storage[name];\n      if (storage_method === undefined) {\n        throw new jIO.util.jIOError(\n          \"Capacity '\" + name + \"' is not implemented on '\" +\n            context.__type + \"'\",\n          501\n        );\n      }\n      queue = ensurePushableQueue(storage_method, argument_list,\n                                  context.__storage);\n\n      if (post_function !== undefined) {\n        queue\n          .push(function (result) {\n            return post_function.call(\n              context,\n              argument_list,\n              result,\n              precondition_result\n            );\n          });\n      }\n      return queue;\n    };\n    // Allow chain\n    return this;\n  }\n\n\n\n\n  /////////////////////////////////////////////////////////////////\n  // jIO Storage Proxy\n  /////////////////////////////////////////////////////////////////\n  function JioProxyStorage(type, storage) {\n    if (!(this instanceof JioProxyStorage)) {\n      return new JioProxyStorage();\n    }\n    this.__type = type;\n    this.__storage = storage;\n  }\n\n  declareMethod(JioProxyStorage, \"put\", checkId, function (argument_list) {\n    return argument_list[0];\n  });\n  declareMethod(JioProxyStorage, \"get\", checkId);\n  declareMethod(JioProxyStorage, \"bulk\");\n  declareMethod(JioProxyStorage, \"remove\", checkId, function (argument_list) {\n    return argument_list[0];\n  });\n\n  JioProxyStorage.prototype.post = function () {\n    var context = this,\n      argument_list = arguments;\n    return ensurePushableQueue(function () {\n      var storage_method = context.__storage.post;\n      if (storage_method === undefined) {\n        throw new jIO.util.jIOError(\n          \"Capacity 'post' is not implemented on '\" + context.__type + \"'\",\n          501\n        );\n      }\n      return context.__storage.post.apply(context.__storage, argument_list);\n    });\n  };\n\n  declareMethod(JioProxyStorage, 'putAttachment', function (argument_list,\n                                                            storage,\n                                                            method_name) {\n    checkId(argument_list, storage, method_name);\n    checkAttachmentId(argument_list, storage, method_name);\n\n    var options = argument_list[3] || {};\n\n    if (typeof argument_list[2] === 'string') {\n      argument_list[2] = new Blob([argument_list[2]], {\n        \"type\": options._content_type || options._mimetype ||\n                \"text/plain;charset=utf-8\"\n      });\n    } else if (!(argument_list[2] instanceof Blob)) {\n      throw new jIO.util.jIOError(\n        'Attachment content is not a blob',\n        400\n      );\n    }\n  });\n\n  declareMethod(JioProxyStorage, 'removeAttachment', function (argument_list,\n                                                               storage,\n                                                               method_name) {\n    checkId(argument_list, storage, method_name);\n    checkAttachmentId(argument_list, storage, method_name);\n  });\n\n  declareMethod(JioProxyStorage, 'getAttachment', function (argument_list,\n                                                            storage,\n                                                            method_name) {\n    var result = \"blob\";\n//     if (param.storage_spec.type !== \"indexeddb\" &&\n//         param.storage_spec.type !== \"dav\" &&\n//         (param.kwargs._start !== undefined\n//          || param.kwargs._end !== undefined)) {\n//       restCommandRejecter(param, [\n//         'bad_request',\n//         'unsupport',\n//         '_start, _end not support'\n//       ]);\n//       return false;\n//     }\n    checkId(argument_list, storage, method_name);\n    checkAttachmentId(argument_list, storage, method_name);\n    // Drop optional parameters, which are only used in postfunction\n    if (argument_list[2] !== undefined) {\n      result = argument_list[2].format || result;\n      delete argument_list[2].format;\n    }\n    return result;\n  }, function (argument_list, blob, convert) {\n    var result;\n    if (!(blob instanceof Blob)) {\n      throw new jIO.util.jIOError(\n        \"'getAttachment' (\" + argument_list[0] + \" , \" +\n          argument_list[1] + \") on '\" + this.__type +\n          \"' does not return a Blob.\",\n        501\n      );\n    }\n    if (convert === \"blob\") {\n      result = blob;\n    } else if (convert === \"data_url\") {\n      result = new RSVP.Queue()\n        .push(function () {\n          return jIO.util.readBlobAsDataURL(blob);\n        })\n        .push(function (evt) {\n          return evt.target.result;\n        });\n    } else if (convert === \"array_buffer\") {\n      result = new RSVP.Queue()\n        .push(function () {\n          return jIO.util.readBlobAsArrayBuffer(blob);\n        })\n        .push(function (evt) {\n          return evt.target.result;\n        });\n    } else if (convert === \"text\") {\n      result = new RSVP.Queue()\n        .push(function () {\n          return jIO.util.readBlobAsText(blob);\n        })\n        .push(function (evt) {\n          return evt.target.result;\n        });\n    } else if (convert === \"json\") {\n      result = new RSVP.Queue()\n        .push(function () {\n          return jIO.util.readBlobAsText(blob);\n        })\n        .push(function (evt) {\n          return JSON.parse(evt.target.result);\n        });\n    } else {\n      throw new jIO.util.jIOError(\n        this.__type + \".getAttachment format: '\" + convert +\n          \"' is not supported\",\n        400\n      );\n    }\n    return result;\n  });\n\n  JioProxyStorage.prototype.buildQuery = function () {\n    var storage_method = this.__storage.buildQuery,\n      context = this,\n      argument_list = arguments;\n    if (storage_method === undefined) {\n      throw new jIO.util.jIOError(\n        \"Capacity 'buildQuery' is not implemented on '\" + this.__type + \"'\",\n        501\n      );\n    }\n    return ensurePushableQueue(storage_method, argument_list,\n                               context.__storage);\n  };\n\n  JioProxyStorage.prototype.hasCapacity = function (name) {\n    var storage_method = this.__storage.hasCapacity,\n      capacity_method = this.__storage[name];\n    if (capacity_method !== undefined) {\n      return true;\n    }\n    if ((storage_method === undefined) ||\n        !storage_method.apply(this.__storage, arguments)) {\n      throw new jIO.util.jIOError(\n        \"Capacity '\" + name + \"' is not implemented on '\" + this.__type + \"'\",\n        501\n      );\n    }\n    return true;\n  };\n\n  JioProxyStorage.prototype.allDocs = function (options) {\n    var context = this;\n    if (options === undefined) {\n      options = {};\n    }\n    return ensurePushableQueue(function () {\n      if (context.hasCapacity(\"list\") &&\n          ((options.query === undefined) || context.hasCapacity(\"query\")) &&\n          ((options.sort_on === undefined) || context.hasCapacity(\"sort\")) &&\n          ((options.group_by === undefined) || context.hasCapacity(\"group\")) &&\n          ((options.select_list === undefined) ||\n           context.hasCapacity(\"select\")) &&\n          ((options.include_docs === undefined) ||\n           context.hasCapacity(\"include\")) &&\n          ((options.limit === undefined) || context.hasCapacity(\"limit\"))) {\n        return context.buildQuery(options)\n          .push(function (result) {\n            return {\n              data: {\n                rows: result,\n                total_rows: result.length\n              }\n            };\n          });\n      }\n    });\n  };\n\n  declareMethod(JioProxyStorage, \"allAttachments\", checkId);\n  declareMethod(JioProxyStorage, \"repair\");\n\n  JioProxyStorage.prototype.repair = function () {\n    var context = this,\n      argument_list = arguments;\n    return ensurePushableQueue(function () {\n      var storage_method = context.__storage.repair;\n      if (storage_method !== undefined) {\n        return context.__storage.repair.apply(context.__storage,\n                                              argument_list);\n      }\n    });\n  };\n\n  /////////////////////////////////////////////////////////////////\n  // Storage builder\n  /////////////////////////////////////////////////////////////////\n  function JioBuilder() {\n    if (!(this instanceof JioBuilder)) {\n      return new JioBuilder();\n    }\n    this.__storage_types = {};\n  }\n\n  JioBuilder.prototype.createJIO = function (storage_spec, util) {\n\n    if (typeof storage_spec.type !== 'string') {\n      throw new TypeError(\"Invalid storage description\");\n    }\n    if (!this.__storage_types[storage_spec.type]) {\n      throw new TypeError(\"Unknown storage '\" + storage_spec.type + \"'\");\n    }\n\n    return new JioProxyStorage(\n      storage_spec.type,\n      new this.__storage_types[storage_spec.type](storage_spec, util)\n    );\n\n  };\n\n  JioBuilder.prototype.addStorage = function (type, Constructor) {\n    if (typeof type !== 'string') {\n      throw new TypeError(\n        \"jIO.addStorage(): Argument 1 is not of type 'string'\"\n      );\n    }\n    if (typeof Constructor !== 'function') {\n      throw new TypeError(\"jIO.addStorage(): \" +\n                          \"Argument 2 is not of type 'function'\");\n    }\n    if (this.__storage_types[type] !== undefined) {\n      throw new TypeError(\"jIO.addStorage(): Storage type already exists\");\n    }\n    this.__storage_types[type] = Constructor;\n  };\n\n  JioBuilder.prototype.util = util;\n  JioBuilder.prototype.QueryFactory = QueryFactory;\n  JioBuilder.prototype.Query = Query;\n\n  /////////////////////////////////////////////////////////////////\n  // global\n  /////////////////////////////////////////////////////////////////\n  jIO = new JioBuilder();\n  window.jIO = jIO;\n\n}(window, RSVP, Blob, QueryFactory, Query, atob,\n  FileReader, ArrayBuffer, Uint8Array));\n/*\n * Copyright 2018, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n\n/*global window */\n(function (window, jIO, Blob, RSVP) {\n  \"use strict\";\n\n  var FormData,\n    originalAjax;\n\n  // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n  // Using_XMLHttpRequest#Submitting_forms_and_uploading_files\n  FormData = function FormData() {\n    this.boundary = \"---------------------------\" + Date.now().toString(16);\n    this.body = '';\n  };\n  FormData.prototype.append = function (name, value, filename) {\n    this.body += '--' + this.boundary +\n                 '\\r\\nContent-Disposition: form-data; name=\"' + name;\n    if (filename !== undefined) {\n      this.body += '\"; filename=\"' + filename;\n    }\n    this.body += '\"\\r\\n\\r\\n' + value + '\\r\\n';\n  };\n  window.FormData = FormData;\n\n  function convertToBlob(promise, convert) {\n    if (!convert) {\n      return promise;\n    }\n    var result;\n    if (promise instanceof RSVP.Queue) {\n      result = promise;\n    } else {\n      result = new RSVP.Queue()\n        .push(function () {\n          return promise;\n        });\n    }\n    return result\n      .push(function (evt) {\n        evt.target.response = new Blob(\n          [evt.target.response || evt.target.responseText],\n          {type: evt.target.getResponseHeader('Content-Type')}\n        );\n        return evt;\n      });\n  }\n\n  originalAjax = jIO.util.ajax;\n  jIO.util.ajax = function ajax(param) {\n    var result,\n      need_convertion = (param.dataType === 'blob');\n    // Copy the param dict document (no need for deep copy) to\n    // allow tests to check them\n    param = Object.assign({}, param);\n    if (need_convertion) {\n      param.dataType = 'arraybuffer';\n    }\n    if (param.data instanceof Blob) {\n      // Blob is not supported by xhr2, so convert to ArrayBuffer instead\n      result = new RSVP.Queue()\n        .push(function () {\n          return jIO.util.readBlobAsArrayBuffer(param.data);\n        })\n        .push(function (evt) {\n          param.data = evt.target.result;\n          return originalAjax(param);\n        });\n    } else if (param.data instanceof FormData) {\n      // Implement minimal FormData for erp5storage\n      if (!param.hasOwnProperty('headers')) {\n        param.headers = {};\n      } else {\n        // Copy the param dict document (no need for deep copy) to\n        // allow tests to check them\n        param.headers = Object.assign({}, param.headers);\n      }\n      param.headers[\"Content-Type\"] = \"multipart\\/form-data; boundary=\" +\n                                      param.data.boundary;\n      param.data.body += '--' + param.data.boundary + '--\\r\\n';\n      param.data = param.data.body;\n      result = originalAjax(param);\n    } else {\n      result = originalAjax(param);\n    }\n\n    return convertToBlob(result, need_convertion);\n  };\n\n}(window, window.jIO, window.Blob, window.RSVP));\n\n// Define a global variable to allow storages to access jIO\nvar jIO = window.jIO,\n  FormData = window.FormData,\n  jiodate = window.jiodate;\n/*\n * JIO extension for resource replication.\n * Copyright (C) 2013, 2015  Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n\n/*jslint nomen: true*/\n/*global jIO, RSVP, Rusha*/\n\n(function (jIO, RSVP, Rusha, stringify) {\n  \"use strict\";\n\n  var rusha = new Rusha(),\n    CONFLICT_THROW = 0,\n    CONFLICT_KEEP_LOCAL = 1,\n    CONFLICT_KEEP_REMOTE = 2,\n    CONFLICT_CONTINUE = 3,\n\n    // 0 - 99 error\n    LOG_UNEXPECTED_ERROR = 0,\n    LOG_UNRESOLVED_CONFLICT = 74,\n    LOG_UNEXPECTED_LOCAL_ATTACHMENT = 49,\n    LOG_UNEXPECTED_REMOTE_ATTACHMENT = 47,\n    LOG_UNRESOLVED_ATTACHMENT_CONFLICT = 75,\n    // 100 - 199 solving conflict\n    LOG_FORCE_PUT_REMOTE = 116,\n    LOG_FORCE_DELETE_REMOTE = 136,\n    LOG_FORCE_PUT_REMOTE_ATTACHMENT = 117,\n    LOG_FORCE_DELETE_REMOTE_ATTACHMENT = 137,\n    LOG_FORCE_PUT_LOCAL = 118,\n    LOG_FORCE_DELETE_LOCAL = 138,\n    LOG_FORCE_PUT_LOCAL_ATTACHMENT = 119,\n    LOG_FORCE_DELETE_LOCAL_ATTACHMENT = 139,\n    // 200 - 299 pushing change\n    LOG_PUT_REMOTE = 216,\n    LOG_POST_REMOTE = 226,\n    LOG_DELETE_REMOTE = 236,\n    LOG_PUT_REMOTE_ATTACHMENT = 217,\n    LOG_DELETE_REMOTE_ATTACHMENT = 237,\n    LOG_PUT_LOCAL = 218,\n    LOG_POST_LOCAL = 228,\n    LOG_DELETE_LOCAL = 238,\n    LOG_PUT_LOCAL_ATTACHMENT = 219,\n    LOG_DELETE_LOCAL_ATTACHMENT = 239,\n    LOG_FALSE_CONFLICT = 284,\n    LOG_FALSE_CONFLICT_ATTACHMENT = 285,\n    // 300 - 399 nothing to do\n    LOG_SKIP_LOCAL_CREATION = 348,\n    LOG_SKIP_LOCAL_MODIFICATION = 358,\n    LOG_SKIP_LOCAL_DELETION = 368,\n    LOG_SKIP_REMOTE_CREATION = 346,\n    LOG_SKIP_REMOTE_MODIFICATION = 356,\n    LOG_SKIP_REMOTE_DELETION = 366,\n    LOG_SKIP_LOCAL_ATTACHMENT_CREATION = 349,\n    LOG_SKIP_LOCAL_ATTACHMENT_MODIFICATION = 359,\n    LOG_SKIP_LOCAL_ATTACHMENT_DELETION = 369,\n    LOG_SKIP_REMOTE_ATTACHMENT_CREATION = 347,\n    LOG_SKIP_REMOTE_ATTACHMENT_MODIFICATION = 357,\n    LOG_SKIP_REMOTE_ATTACHMENT_DELETION = 367,\n    LOG_SKIP_CONFLICT = 374,\n    LOG_SKIP_CONFLICT_ATTACHMENT = 375,\n    LOG_NO_CHANGE = 384,\n    LOG_NO_CHANGE_ATTACHMENT = 385;\n\n  function ReplicateReport(log_level, log_console) {\n    this._list = [];\n    this.name = 'ReplicateReport';\n    this.message = this.name;\n    this.has_error = false;\n    this._log_level = log_level;\n    this._log_console = log_console;\n  }\n\n  ReplicateReport.prototype = {\n    constructor: ReplicateReport,\n\n    LOG_UNEXPECTED_ERROR: LOG_UNEXPECTED_ERROR,\n    LOG_UNRESOLVED_CONFLICT: LOG_UNRESOLVED_CONFLICT,\n    LOG_UNEXPECTED_LOCAL_ATTACHMENT: LOG_UNEXPECTED_LOCAL_ATTACHMENT,\n    LOG_UNEXPECTED_REMOTE_ATTACHMENT: LOG_UNEXPECTED_REMOTE_ATTACHMENT,\n    LOG_UNRESOLVED_ATTACHMENT_CONFLICT: LOG_UNRESOLVED_ATTACHMENT_CONFLICT,\n    LOG_FORCE_PUT_REMOTE: LOG_FORCE_PUT_REMOTE,\n    LOG_FORCE_DELETE_REMOTE: LOG_FORCE_DELETE_REMOTE,\n    LOG_FORCE_PUT_LOCAL: LOG_FORCE_PUT_LOCAL,\n    LOG_FORCE_DELETE_LOCAL: LOG_FORCE_DELETE_LOCAL,\n    LOG_FORCE_PUT_REMOTE_ATTACHMENT: LOG_FORCE_PUT_REMOTE_ATTACHMENT,\n    LOG_FORCE_DELETE_REMOTE_ATTACHMENT: LOG_FORCE_DELETE_REMOTE_ATTACHMENT,\n    LOG_FORCE_PUT_LOCAL_ATTACHMENT: LOG_FORCE_PUT_LOCAL_ATTACHMENT,\n    LOG_FORCE_DELETE_LOCAL_ATTACHMENT: LOG_FORCE_DELETE_LOCAL_ATTACHMENT,\n    LOG_PUT_REMOTE: LOG_PUT_REMOTE,\n    LOG_POST_REMOTE: LOG_POST_REMOTE,\n    LOG_DELETE_REMOTE: LOG_DELETE_REMOTE,\n    LOG_PUT_REMOTE_ATTACHMENT: LOG_PUT_REMOTE_ATTACHMENT,\n    LOG_DELETE_REMOTE_ATTACHMENT: LOG_DELETE_REMOTE_ATTACHMENT,\n    LOG_PUT_LOCAL: LOG_PUT_LOCAL,\n    LOG_DELETE_LOCAL: LOG_DELETE_LOCAL,\n    LOG_PUT_LOCAL_ATTACHMENT: LOG_PUT_LOCAL_ATTACHMENT,\n    LOG_DELETE_LOCAL_ATTACHMENT: LOG_DELETE_LOCAL_ATTACHMENT,\n    LOG_FALSE_CONFLICT: LOG_FALSE_CONFLICT,\n    LOG_FALSE_CONFLICT_ATTACHMENT: LOG_FALSE_CONFLICT_ATTACHMENT,\n    LOG_SKIP_LOCAL_CREATION: LOG_SKIP_LOCAL_CREATION,\n    LOG_SKIP_LOCAL_MODIFICATION: LOG_SKIP_LOCAL_MODIFICATION,\n    LOG_SKIP_LOCAL_DELETION: LOG_SKIP_LOCAL_DELETION,\n    LOG_SKIP_REMOTE_CREATION: LOG_SKIP_REMOTE_CREATION,\n    LOG_SKIP_REMOTE_MODIFICATION: LOG_SKIP_REMOTE_MODIFICATION,\n    LOG_SKIP_REMOTE_DELETION: LOG_SKIP_REMOTE_DELETION,\n    LOG_SKIP_LOCAL_ATTACHMENT_CREATION: LOG_SKIP_LOCAL_ATTACHMENT_CREATION,\n    LOG_SKIP_LOCAL_ATTACHMENT_MODIFICATION:\n      LOG_SKIP_LOCAL_ATTACHMENT_MODIFICATION,\n    LOG_SKIP_LOCAL_ATTACHMENT_DELETION: LOG_SKIP_LOCAL_ATTACHMENT_DELETION,\n    LOG_SKIP_REMOTE_ATTACHMENT_CREATION: LOG_SKIP_REMOTE_ATTACHMENT_CREATION,\n    LOG_SKIP_REMOTE_ATTACHMENT_MODIFICATION:\n      LOG_SKIP_REMOTE_ATTACHMENT_MODIFICATION,\n    LOG_SKIP_REMOTE_ATTACHMENT_DELETION: LOG_SKIP_REMOTE_ATTACHMENT_DELETION,\n    LOG_SKIP_CONFLICT: LOG_SKIP_CONFLICT,\n    LOG_SKIP_CONFLICT_ATTACHMENT: LOG_SKIP_CONFLICT_ATTACHMENT,\n    LOG_NO_CHANGE: LOG_NO_CHANGE,\n    LOG_NO_CHANGE_ATTACHMENT: LOG_NO_CHANGE_ATTACHMENT,\n\n    logConsole: function (code, a, b, c) {\n      if (!this._log_console) {\n        return;\n      }\n      var txt = code,\n        parsed_code = code,\n        log;\n\n      // Check severity level\n      if (parsed_code >= 300) {\n        txt += ' SKIP ';\n        log = console.info;\n      } else if (parsed_code >= 200) {\n        txt += ' SOLVE ';\n        log = console.log;\n      } else if (parsed_code >= 100) {\n        txt += ' FORCE ';\n        log = console.warn;\n      } else {\n        txt += ' ERROR ';\n        log = console.error;\n      }\n\n      // Check operation\n      parsed_code = code % 100;\n      if (parsed_code >= 80) {\n        txt += 'idem ';\n      } else if (parsed_code >= 70) {\n        txt += 'conflict ';\n      } else if (parsed_code >= 60) {\n        txt += 'deleted ';\n      } else if (parsed_code >= 50) {\n        txt += 'modified ';\n      } else if (parsed_code >= 40) {\n        txt += 'created ';\n      } else if (parsed_code >= 30) {\n        txt += 'delete ';\n      } else if (parsed_code >= 20) {\n        txt += 'post ';\n      } else if (parsed_code >= 10) {\n        txt += 'put ';\n      }\n\n      // Check document\n      parsed_code = code % 10;\n      if (parsed_code >= 8) {\n        txt += 'local ';\n      } else if (parsed_code >= 6) {\n        txt += 'remote ';\n      }\n      if (parsed_code !== 0) {\n        txt += (parsed_code % 2 === 0) ? 'document' : 'attachment';\n      }\n      txt += ' ' + a;\n      if (b !== undefined) {\n        txt += ' ' + b;\n        if (c !== undefined) {\n          txt += ' ' + c;\n        }\n      }\n      log(txt);\n    },\n\n    log: function (id, type, extra) {\n      if (type === undefined) {\n        if (extra === undefined) {\n          extra = 'Unknown type: ' + type;\n        }\n        type = LOG_UNEXPECTED_ERROR;\n      }\n      if (type < this._log_level) {\n        if (extra === undefined) {\n          this.logConsole(type, id);\n          this._list.push([type, id]);\n        } else {\n          this.logConsole(type, id, extra);\n          this._list.push([type, id, extra]);\n        }\n        if (type < 100) {\n          this.has_error = true;\n        }\n      }\n    },\n\n    logAttachment: function (id, name, type, extra) {\n      if (type === undefined) {\n        if (extra === undefined) {\n          extra = 'Unknown type: ' + type;\n        }\n        type = LOG_UNEXPECTED_ERROR;\n      }\n      if (type < this._log_level) {\n        if (extra === undefined) {\n          this.logConsole(type, id, name);\n          this._list.push([type, id, name]);\n        } else {\n          this.logConsole(type, id, name, extra);\n          this._list.push([type, id, name, extra]);\n        }\n        if (type < 100) {\n          this.has_error = true;\n        }\n      }\n    },\n\n    toString: function () {\n      return this._list.toString();\n    }\n  };\n\n  function SkipError(message) {\n    if ((message !== undefined) && (typeof message !== \"string\")) {\n      throw new TypeError('You must pass a string.');\n    }\n    this.message = message || \"Skip some asynchronous code\";\n  }\n  SkipError.prototype = new Error();\n  SkipError.prototype.constructor = SkipError;\n\n  /****************************************************\n   Use a local jIO to read/write/search documents\n   Synchronize in background those document with a remote jIO.\n   Synchronization status is stored for each document as an local attachment.\n  ****************************************************/\n\n  function generateHash(content) {\n    // XXX Improve performance by moving calculation to WebWorker\n    return rusha.digestFromString(content);\n  }\n\n  function generateHashFromArrayBuffer(content) {\n    // XXX Improve performance by moving calculation to WebWorker\n    return rusha.digestFromArrayBuffer(content);\n  }\n\n  function ReplicateStorage(spec) {\n    this._query_options = spec.query || {};\n    this._log_level = spec.report_level || 100;\n    this._log_console = spec.debug || false;\n    if (spec.signature_hash_key !== undefined) {\n      this._query_options.select_list = [spec.signature_hash_key];\n    }\n    this._signature_hash_key = spec.signature_hash_key;\n\n    this._local_sub_storage = jIO.createJIO(spec.local_sub_storage);\n    this._remote_sub_storage = jIO.createJIO(spec.remote_sub_storage);\n\n    if (spec.hasOwnProperty('signature_sub_storage')) {\n      this._signature_sub_storage = jIO.createJIO(spec.signature_sub_storage);\n      this._custom_signature_sub_storage = true;\n    } else {\n      this._signature_hash = \"_replicate_\" + generateHash(\n        stringify(spec.local_sub_storage) +\n          stringify(spec.remote_sub_storage) +\n          stringify(this._query_options)\n      );\n      this._signature_sub_storage = jIO.createJIO({\n        type: \"query\",\n        sub_storage: {\n          type: \"document\",\n          document_id: this._signature_hash,\n          sub_storage: spec.local_sub_storage\n        }\n      });\n      this._custom_signature_sub_storage = false;\n    }\n\n    this._use_remote_post = spec.use_remote_post || false;\n    // Number of request we allow browser execution for attachments\n    this._parallel_operation_attachment_amount =\n      spec.parallel_operation_attachment_amount || 1;\n    // Number of request we allow browser execution for documents\n    this._parallel_operation_amount =\n      spec.parallel_operation_amount || 1;\n\n    this._conflict_handling = spec.conflict_handling || 0;\n    // 0: no resolution (ie, throw an Error)\n    // 1: keep the local state\n    //    (overwrites the remote document with local content)\n    //    (delete remote document if local is deleted)\n    // 2: keep the remote state\n    //    (overwrites the local document with remote content)\n    //    (delete local document if remote is deleted)\n    // 3: keep both copies (leave documents untouched, no signature update)\n    if ((this._conflict_handling !== CONFLICT_THROW) &&\n        (this._conflict_handling !== CONFLICT_KEEP_LOCAL) &&\n        (this._conflict_handling !== CONFLICT_KEEP_REMOTE) &&\n        (this._conflict_handling !== CONFLICT_CONTINUE)) {\n      throw new jIO.util.jIOError(\"Unsupported conflict handling: \" +\n                                  this._conflict_handling, 400);\n    }\n\n    this._check_local_modification = spec.check_local_modification;\n    if (this._check_local_modification === undefined) {\n      this._check_local_modification = true;\n    }\n    this._check_local_creation = spec.check_local_creation;\n    if (this._check_local_creation === undefined) {\n      this._check_local_creation = true;\n    }\n    this._check_local_deletion = spec.check_local_deletion;\n    if (this._check_local_deletion === undefined) {\n      this._check_local_deletion = true;\n    }\n    this._check_remote_modification = spec.check_remote_modification;\n    if (this._check_remote_modification === undefined) {\n      this._check_remote_modification = true;\n    }\n    this._check_remote_creation = spec.check_remote_creation;\n    if (this._check_remote_creation === undefined) {\n      this._check_remote_creation = true;\n    }\n    this._check_remote_deletion = spec.check_remote_deletion;\n    if (this._check_remote_deletion === undefined) {\n      this._check_remote_deletion = true;\n    }\n    this._check_local_attachment_modification =\n      spec.check_local_attachment_modification;\n    if (this._check_local_attachment_modification === undefined) {\n      this._check_local_attachment_modification = false;\n    }\n    this._check_local_attachment_creation =\n      spec.check_local_attachment_creation;\n    if (this._check_local_attachment_creation === undefined) {\n      this._check_local_attachment_creation = false;\n    }\n    this._check_local_attachment_deletion =\n      spec.check_local_attachment_deletion;\n    if (this._check_local_attachment_deletion === undefined) {\n      this._check_local_attachment_deletion = false;\n    }\n    this._check_remote_attachment_modification =\n      spec.check_remote_attachment_modification;\n    if (this._check_remote_attachment_modification === undefined) {\n      this._check_remote_attachment_modification = false;\n    }\n    this._check_remote_attachment_creation =\n      spec.check_remote_attachment_creation;\n    if (this._check_remote_attachment_creation === undefined) {\n      this._check_remote_attachment_creation = false;\n    }\n    this._check_remote_attachment_deletion =\n      spec.check_remote_attachment_deletion;\n    if (this._check_remote_attachment_deletion === undefined) {\n      this._check_remote_attachment_deletion = false;\n    }\n  }\n\n  ReplicateStorage.prototype.remove = function (id) {\n    if (id === this._signature_hash) {\n      throw new jIO.util.jIOError(this._signature_hash + \" is frozen\",\n                                  403);\n    }\n    return this._local_sub_storage.remove.apply(this._local_sub_storage,\n                                                arguments);\n  };\n  ReplicateStorage.prototype.post = function () {\n    return this._local_sub_storage.post.apply(this._local_sub_storage,\n                                              arguments);\n  };\n  ReplicateStorage.prototype.put = function (id) {\n    if (id === this._signature_hash) {\n      throw new jIO.util.jIOError(this._signature_hash + \" is frozen\",\n                                  403);\n    }\n    return this._local_sub_storage.put.apply(this._local_sub_storage,\n                                             arguments);\n  };\n  ReplicateStorage.prototype.get = function () {\n    return this._local_sub_storage.get.apply(this._local_sub_storage,\n                                             arguments);\n  };\n  ReplicateStorage.prototype.getAttachment = function () {\n    return this._local_sub_storage.getAttachment.apply(this._local_sub_storage,\n                                                       arguments);\n  };\n  ReplicateStorage.prototype.allAttachments = function () {\n    return this._local_sub_storage.allAttachments.apply(this._local_sub_storage,\n                                                        arguments);\n  };\n  ReplicateStorage.prototype.putAttachment = function (id) {\n    if (id === this._signature_hash) {\n      throw new jIO.util.jIOError(this._signature_hash + \" is frozen\",\n                                  403);\n    }\n    return this._local_sub_storage.putAttachment.apply(this._local_sub_storage,\n                                                       arguments);\n  };\n  ReplicateStorage.prototype.removeAttachment = function (id) {\n    if (id === this._signature_hash) {\n      throw new jIO.util.jIOError(this._signature_hash + \" is frozen\",\n                                  403);\n    }\n    return this._local_sub_storage.removeAttachment.apply(\n      this._local_sub_storage,\n      arguments\n    );\n  };\n  ReplicateStorage.prototype.hasCapacity = function () {\n    return this._local_sub_storage.hasCapacity.apply(this._local_sub_storage,\n                                                     arguments);\n  };\n  ReplicateStorage.prototype.buildQuery = function () {\n    // XXX Remove signature document?\n    return this._local_sub_storage.buildQuery.apply(this._local_sub_storage,\n                                                    arguments);\n  };\n\n  function dispatchQueue(context, function_used, argument_list,\n                         number_queue) {\n    var result_promise_list = [],\n      i;\n\n    function pushAndExecute(queue) {\n      queue\n        .push(function () {\n          if (argument_list.length > 0) {\n            var argument_array = argument_list.shift(),\n              sub_queue = new RSVP.Queue();\n            argument_array[0] = sub_queue;\n            function_used.apply(context, argument_array);\n            pushAndExecute(queue);\n            return sub_queue;\n          }\n        });\n    }\n    for (i = 0; i < number_queue; i += 1) {\n      result_promise_list.push(new RSVP.Queue());\n      pushAndExecute(result_promise_list[i]);\n    }\n    if (number_queue > 1) {\n      return RSVP.all(result_promise_list);\n    }\n    return result_promise_list[0];\n  }\n\n  function callAllDocsOnStorage(context, storage, cache, cache_key) {\n    return new RSVP.Queue()\n      .push(function () {\n        if (!cache.hasOwnProperty(cache_key)) {\n          return storage.allDocs(context._query_options)\n            .push(function (result) {\n              var i,\n                cache_entry = {};\n              for (i = 0; i < result.data.total_rows; i += 1) {\n                cache_entry[result.data.rows[i].id] = result.data.rows[i].value;\n              }\n              cache[cache_key] = cache_entry;\n            });\n        }\n      })\n      .push(function () {\n        return cache[cache_key];\n      });\n  }\n\n  function propagateAttachmentDeletion(context,\n                                       destination,\n                                       id, name,\n                                       conflict, from_local, report) {\n    if (conflict) {\n      report.logAttachment(id, name, from_local ?\n                                     LOG_FORCE_DELETE_REMOTE_ATTACHMENT :\n                                     LOG_FORCE_DELETE_LOCAL_ATTACHMENT);\n    } else {\n      report.logAttachment(id, name, from_local ? LOG_DELETE_REMOTE_ATTACHMENT :\n                                                  LOG_DELETE_LOCAL_ATTACHMENT);\n    }\n    return destination.removeAttachment(id, name)\n      .push(function () {\n        return context._signature_sub_storage.removeAttachment(id, name);\n      });\n  }\n\n  function propagateAttachmentModification(context,\n                                           destination,\n                                           blob, hash, id, name,\n                                           from_local, is_conflict, report) {\n    if (is_conflict) {\n      report.logAttachment(id, name, from_local ?\n                                     LOG_FORCE_PUT_REMOTE_ATTACHMENT :\n                                     LOG_FORCE_PUT_LOCAL_ATTACHMENT);\n    } else {\n      report.logAttachment(id, name, from_local ? LOG_PUT_REMOTE_ATTACHMENT :\n                                                  LOG_PUT_LOCAL_ATTACHMENT);\n    }\n    return destination.putAttachment(id, name, blob)\n      .push(function () {\n        return context._signature_sub_storage.putAttachment(id, name,\n                                                            JSON.stringify({\n            hash: hash\n          }));\n      });\n  }\n\n  function checkAndPropagateAttachment(context,\n                                       skip_attachment_dict,\n                                       status_hash, local_hash, blob,\n                                       source, destination, id, name,\n                                       conflict_force, conflict_revert,\n                                       conflict_ignore, from_local, report) {\n    // No need to check twice\n    skip_attachment_dict[name] = null;\n    var remote_blob;\n    return destination.getAttachment(id, name)\n      .push(function (result) {\n        remote_blob = result;\n        return jIO.util.readBlobAsArrayBuffer(remote_blob);\n      })\n      .push(function (evt) {\n        return generateHashFromArrayBuffer(\n          evt.target.result\n        );\n      }, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          remote_blob = null;\n          return null;\n        }\n        throw error;\n      })\n      .push(function (remote_hash) {\n        if (local_hash === remote_hash) {\n          // Same modifications on both side\n          report.logAttachment(id, name, LOG_FALSE_CONFLICT_ATTACHMENT);\n          if (local_hash === null) {\n            // Deleted on both side, drop signature\n            return context._signature_sub_storage.removeAttachment(id, name);\n          }\n\n          return context._signature_sub_storage.putAttachment(id, name,\n            JSON.stringify({\n              hash: local_hash\n            }));\n        }\n\n        if ((remote_hash === status_hash) || (conflict_force === true)) {\n          // Modified only locally. No conflict or force\n          if (local_hash === null) {\n            // Deleted locally\n            return propagateAttachmentDeletion(context,\n                                               destination,\n                                               id, name,\n                                               (remote_hash !== status_hash),\n                                               from_local, report);\n          }\n          return propagateAttachmentModification(context,\n                                       destination, blob,\n                                       local_hash, id, name,\n                                       from_local,\n                                       (remote_hash !== status_hash),\n                                       report);\n        }\n\n        // Conflict cases\n        if (conflict_ignore === true) {\n          report.logAttachment(id, name, LOG_SKIP_CONFLICT_ATTACHMENT);\n          return;\n        }\n\n        if ((conflict_revert === true) || (local_hash === null)) {\n          // Automatically resolve conflict or force revert\n          if (remote_hash === null) {\n            // Deleted remotely\n            return propagateAttachmentDeletion(context,\n                                               source, id, name,\n                                               (local_hash !== status_hash),\n                                               !from_local, report);\n          }\n          return propagateAttachmentModification(\n            context,\n            source,\n            remote_blob,\n            remote_hash,\n            id,\n            name,\n            !from_local,\n            (local_hash !== status_hash),\n            report\n          );\n        }\n\n        // Minimize conflict if it can be resolved\n        if (remote_hash === null) {\n          // Copy remote modification remotely\n          return propagateAttachmentModification(context,\n                                       destination, blob,\n                                       local_hash, id, name, from_local,\n                                       false,\n                                       report);\n        }\n        report.logAttachment(id, name, LOG_UNRESOLVED_ATTACHMENT_CONFLICT);\n      })\n      .push(undefined, function (error) {\n        report.logAttachment(id, name, LOG_UNEXPECTED_ERROR, error);\n      });\n  }\n\n  function checkAttachmentSignatureDifference(queue, context,\n                                              skip_attachment_dict,\n                                              source,\n                                              destination, id, name,\n                                              conflict_force,\n                                              conflict_revert,\n                                              conflict_ignore,\n                                              is_creation, is_modification,\n                                              from_local,\n                                              report) {\n    var blob,\n      status_hash;\n    queue\n      .push(function () {\n        // Optimisation to save a get call to signature storage\n        if (is_creation === true) {\n          return RSVP.all([\n            source.getAttachment(id, name),\n            {hash: null}\n          ]);\n        }\n        if (is_modification === true) {\n          return RSVP.all([\n            source.getAttachment(id, name),\n            context._signature_sub_storage.getAttachment(\n              id,\n              name,\n              {format: 'json'}\n            )\n          ]);\n        }\n        throw new jIO.util.jIOError(\"Unexpected call of\"\n                                    + \" checkAttachmentSignatureDifference\",\n                                    409);\n      })\n      .push(function (result_list) {\n        blob = result_list[0];\n        status_hash = result_list[1].hash;\n        return jIO.util.readBlobAsArrayBuffer(blob);\n      })\n      .push(function (evt) {\n        var array_buffer = evt.target.result,\n          local_hash = generateHashFromArrayBuffer(array_buffer);\n\n        if (local_hash === status_hash) {\n          if (!from_local) {\n            report.logAttachment(id, name, LOG_NO_CHANGE_ATTACHMENT);\n          }\n          return;\n        }\n        return checkAndPropagateAttachment(context,\n                                           skip_attachment_dict,\n                                           status_hash, local_hash, blob,\n                                           source, destination, id, name,\n                                           conflict_force, conflict_revert,\n                                           conflict_ignore,\n                                           from_local,\n                                           report);\n      });\n  }\n\n  function checkAttachmentLocalDeletion(queue, context,\n                              skip_attachment_dict,\n                              destination, id, name, source,\n                              conflict_force, conflict_revert,\n                              conflict_ignore, from_local, report) {\n    var status_hash;\n    queue\n      .push(function () {\n        return context._signature_sub_storage.getAttachment(id, name,\n                                                            {format: 'json'});\n      })\n      .push(function (result) {\n        status_hash = result.hash;\n        return checkAndPropagateAttachment(context,\n                                 skip_attachment_dict,\n                                 status_hash, null, null,\n                                 source, destination, id, name,\n                                 conflict_force, conflict_revert,\n                                 conflict_ignore, from_local, report);\n      });\n  }\n\n  function pushDocumentAttachment(context,\n                                  skip_attachment_dict, id, source,\n                                  destination, signature_allAttachments,\n                                  report, options) {\n    var local_dict = {},\n      signature_dict = {},\n      from_local = options.from_local;\n    return source.allAttachments(id)\n      .push(undefined, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          return {};\n        }\n        throw error;\n      })\n      .push(function (source_allAttachments) {\n        var is_modification,\n          is_creation,\n          key,\n          argument_list = [];\n        for (key in source_allAttachments) {\n          if (source_allAttachments.hasOwnProperty(key)) {\n            if (!skip_attachment_dict.hasOwnProperty(key)) {\n              local_dict[key] = null;\n            }\n          }\n        }\n        for (key in signature_allAttachments) {\n          if (signature_allAttachments.hasOwnProperty(key)) {\n            if (!skip_attachment_dict.hasOwnProperty(key)) {\n              signature_dict[key] = null;\n            }\n          }\n        }\n\n        for (key in local_dict) {\n          if (local_dict.hasOwnProperty(key)) {\n            is_modification = signature_dict.hasOwnProperty(key)\n              && options.check_modification;\n            is_creation = !signature_dict.hasOwnProperty(key)\n              && options.check_creation;\n            if (is_modification === true || is_creation === true) {\n              argument_list.push([undefined,\n                                  context,\n                                  skip_attachment_dict,\n                                  source,\n                                  destination, id, key,\n                                  options.conflict_force,\n                                  options.conflict_revert,\n                                  options.conflict_ignore,\n                                  is_creation,\n                                  is_modification,\n                                  from_local,\n                                  report]);\n            } else {\n              if (signature_dict.hasOwnProperty(key)) {\n                report.logAttachment(id, key, from_local ?\n                                     LOG_SKIP_LOCAL_ATTACHMENT_MODIFICATION :\n                                     LOG_SKIP_REMOTE_ATTACHMENT_MODIFICATION);\n              } else {\n                report.logAttachment(id, key, from_local ?\n                                     LOG_SKIP_LOCAL_ATTACHMENT_CREATION :\n                                     LOG_SKIP_REMOTE_ATTACHMENT_CREATION);\n              }\n            }\n          }\n        }\n        return dispatchQueue(\n          context,\n          checkAttachmentSignatureDifference,\n          argument_list,\n          context._parallel_operation_attachment_amount\n        );\n      })\n      .push(function () {\n        var key, argument_list = [];\n        for (key in signature_dict) {\n          if (signature_dict.hasOwnProperty(key)) {\n            if (!local_dict.hasOwnProperty(key)) {\n              if (options.check_deletion === true) {\n                argument_list.push([undefined,\n                                             context,\n                                             skip_attachment_dict,\n                                             destination, id, key,\n                                             source,\n                                             options.conflict_force,\n                                             options.conflict_revert,\n                                             options.conflict_ignore,\n                                             from_local,\n                                             report]);\n              } else {\n                report.logAttachment(id, key, from_local ?\n                                     LOG_SKIP_LOCAL_ATTACHMENT_DELETION :\n                                     LOG_SKIP_REMOTE_ATTACHMENT_DELETION);\n              }\n            }\n          }\n        }\n        return dispatchQueue(\n          context,\n          checkAttachmentLocalDeletion,\n          argument_list,\n          context._parallel_operation_attachment_amount\n        );\n      });\n  }\n\n  function propagateFastAttachmentDeletion(queue, id, name, storage, signature,\n                                           from_local, report) {\n    report.logAttachment(id, name, from_local ? LOG_DELETE_REMOTE_ATTACHMENT :\n                                                LOG_DELETE_LOCAL_ATTACHMENT);\n    return queue\n      .push(function () {\n        return storage.removeAttachment(id, name);\n      })\n      .push(function () {\n        return signature.removeAttachment(id, name);\n      });\n  }\n\n  function propagateFastSignatureDeletion(queue, id, name, signature,\n                                          report) {\n    report.logAttachment(id, name, LOG_FALSE_CONFLICT_ATTACHMENT);\n    return queue\n      .push(function () {\n        return signature.removeAttachment(id, name);\n      });\n  }\n\n  function propagateFastAttachmentModification(queue, id, key, source,\n                                               destination, signature, hash,\n                                               from_local, report) {\n    return queue\n      .push(function () {\n        return signature.getAttachment(id, key, {format: 'json'})\n          .push(undefined, function (error) {\n            if ((error instanceof jIO.util.jIOError) &&\n                (error.status_code === 404)) {\n              return {hash: null};\n            }\n            throw error;\n          })\n          .push(function (result) {\n            if (result.hash !== hash) {\n              report.logAttachment(id, key, from_local ?\n                                            LOG_PUT_REMOTE_ATTACHMENT :\n                                            LOG_PUT_LOCAL_ATTACHMENT);\n              return source.getAttachment(id, key)\n                .push(function (blob) {\n                  return destination.putAttachment(id, key, blob);\n                })\n                .push(function () {\n                  return signature.putAttachment(id, key, JSON.stringify({\n                    hash: hash\n                  }));\n                });\n            }\n          });\n\n      });\n  }\n\n  function repairFastDocumentAttachment(context, id,\n                                        signature_hash,\n                                        signature_attachment_hash,\n                                        signature_from_local,\n                                        report) {\n    if (signature_hash === signature_attachment_hash) {\n      // No replication to do\n      return;\n    }\n    return new RSVP.Queue()\n      .push(function () {\n        return RSVP.all([\n          context._signature_sub_storage.allAttachments(id),\n          context._local_sub_storage.allAttachments(id),\n          context._remote_sub_storage.allAttachments(id)\n        ]);\n      })\n      .push(function (result_list) {\n        var key,\n          source_attachment_dict,\n          destination_attachment_dict,\n          source,\n          destination,\n          push_argument_list = [],\n          delete_argument_list = [],\n          delete_signature_argument_list = [],\n          signature_attachment_dict = result_list[0],\n          local_attachment_dict = result_list[1],\n          remote_attachment_list = result_list[2],\n          check_local_modification =\n            context._check_local_attachment_modification,\n          check_local_creation = context._check_local_attachment_creation,\n          check_local_deletion = context._check_local_attachment_deletion,\n          check_remote_modification =\n            context._check_remote_attachment_modification,\n          check_remote_creation = context._check_remote_attachment_creation,\n          check_remote_deletion = context._check_remote_attachment_deletion,\n          from_local;\n\n        if (signature_from_local) {\n          source_attachment_dict = local_attachment_dict;\n          destination_attachment_dict = remote_attachment_list;\n          source = context._local_sub_storage;\n          destination = context._remote_sub_storage;\n          from_local = true;\n        } else {\n          source_attachment_dict = remote_attachment_list;\n          destination_attachment_dict = local_attachment_dict;\n          source = context._remote_sub_storage;\n          destination = context._local_sub_storage;\n          check_local_modification = check_remote_modification;\n          check_local_creation = check_remote_creation;\n          check_local_deletion = check_remote_deletion;\n          check_remote_creation = check_local_creation;\n          check_remote_deletion = check_local_deletion;\n          from_local = false;\n        }\n\n        // Push all source attachments\n        for (key in source_attachment_dict) {\n          if (source_attachment_dict.hasOwnProperty(key)) {\n\n            if ((check_local_creation &&\n                 !signature_attachment_dict.hasOwnProperty(key)) ||\n                (check_local_modification &&\n                 signature_attachment_dict.hasOwnProperty(key))) {\n              push_argument_list.push([\n                undefined,\n                id,\n                key,\n                source,\n                destination,\n                context._signature_sub_storage,\n                signature_hash,\n                from_local,\n                report\n              ]);\n            } else {\n              if (signature_attachment_dict.hasOwnProperty(key)) {\n                report.logAttachment(id, key, from_local ?\n                                     LOG_SKIP_LOCAL_ATTACHMENT_MODIFICATION :\n                                     LOG_SKIP_REMOTE_ATTACHMENT_MODIFICATION);\n              } else {\n                report.logAttachment(id, key, from_local ?\n                                     LOG_SKIP_LOCAL_ATTACHMENT_CREATION :\n                                     LOG_SKIP_REMOTE_ATTACHMENT_CREATION);\n              }\n            }\n          }\n        }\n\n        // Delete remaining signature + remote attachments\n        for (key in signature_attachment_dict) {\n          if (signature_attachment_dict.hasOwnProperty(key)) {\n            if (check_local_deletion &&\n                !source_attachment_dict.hasOwnProperty(key) &&\n                !destination_attachment_dict.hasOwnProperty(key)) {\n              delete_signature_argument_list.push([\n                undefined,\n                id,\n                key,\n                context._signature_sub_storage,\n                report\n              ]);\n            }\n          }\n        }\n\n        for (key in destination_attachment_dict) {\n          if (destination_attachment_dict.hasOwnProperty(key)) {\n            if (!source_attachment_dict.hasOwnProperty(key)) {\n              if ((check_local_deletion &&\n                   signature_attachment_dict.hasOwnProperty(key)) ||\n                  (check_remote_creation &&\n                   !signature_attachment_dict.hasOwnProperty(key))) {\n                delete_argument_list.push([\n                  undefined,\n                  id,\n                  key,\n                  destination,\n                  context._signature_sub_storage,\n                  from_local,\n                  report\n                ]);\n              } else {\n                if (signature_attachment_dict.hasOwnProperty(key)) {\n                  report.logAttachment(id, key, from_local ?\n                       LOG_SKIP_LOCAL_ATTACHMENT_DELETION :\n                       LOG_SKIP_REMOTE_ATTACHMENT_DELETION);\n                } else {\n                  report.logAttachment(id, key, from_local ?\n                       LOG_SKIP_LOCAL_ATTACHMENT_CREATION :\n                       LOG_SKIP_REMOTE_ATTACHMENT_CREATION);\n                }\n              }\n            }\n          }\n        }\n\n        return RSVP.all([\n          dispatchQueue(\n            context,\n            propagateFastAttachmentModification,\n            push_argument_list,\n            context._parallel_operation_attachment_amount\n          ),\n          dispatchQueue(\n            context,\n            propagateFastAttachmentDeletion,\n            delete_argument_list,\n            context._parallel_operation_attachment_amount\n          ),\n          dispatchQueue(\n            context,\n            propagateFastSignatureDeletion,\n            delete_signature_argument_list,\n            context._parallel_operation_attachment_amount\n          )\n        ]);\n      })\n      .push(function () {\n        // Mark that all attachments have been synchronized\n        return context._signature_sub_storage.put(id, {\n          hash: signature_hash,\n          attachment_hash: signature_hash,\n          from_local: signature_from_local\n        });\n      });\n  }\n\n  function repairDocumentAttachment(context, id, report, signature_hash_key,\n                                    signature_hash,\n                                    signature_attachment_hash,\n                                    signature_from_local) {\n    if (signature_hash_key !== undefined) {\n      return repairFastDocumentAttachment(context, id,\n                                    signature_hash,\n                                    signature_attachment_hash,\n                                    signature_from_local, report);\n    }\n\n    var skip_attachment_dict = {};\n    return new RSVP.Queue()\n      .push(function () {\n        if (context._check_local_attachment_modification ||\n            context._check_local_attachment_creation ||\n            context._check_local_attachment_deletion ||\n            context._check_remote_attachment_modification ||\n            context._check_remote_attachment_creation ||\n            context._check_remote_attachment_deletion) {\n          return context._signature_sub_storage.allAttachments(id);\n        }\n        return {};\n      })\n      .push(undefined, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          return {};\n        }\n        throw error;\n      })\n      .push(function (signature_allAttachments) {\n        if (context._check_local_attachment_modification ||\n            context._check_local_attachment_creation ||\n            context._check_local_attachment_deletion) {\n          return pushDocumentAttachment(\n            context,\n            skip_attachment_dict,\n            id,\n            context._local_sub_storage,\n            context._remote_sub_storage,\n            signature_allAttachments,\n            report,\n            {\n              conflict_force: (context._conflict_handling ===\n                               CONFLICT_KEEP_LOCAL),\n              conflict_revert: (context._conflict_handling ===\n                                CONFLICT_KEEP_REMOTE),\n              conflict_ignore: (context._conflict_handling ===\n                                CONFLICT_CONTINUE),\n              check_modification:\n                context._check_local_attachment_modification,\n              check_creation: context._check_local_attachment_creation,\n              check_deletion: context._check_local_attachment_deletion,\n              from_local: true\n            }\n          )\n            .push(function () {\n              return signature_allAttachments;\n            });\n        }\n        return signature_allAttachments;\n      })\n      .push(function (signature_allAttachments) {\n        if (context._check_remote_attachment_modification ||\n            context._check_remote_attachment_creation ||\n            context._check_remote_attachment_deletion) {\n          return pushDocumentAttachment(\n            context,\n            skip_attachment_dict,\n            id,\n            context._remote_sub_storage,\n            context._local_sub_storage,\n            signature_allAttachments,\n            report,\n            {\n              use_revert_post: context._use_remote_post,\n              conflict_force: (context._conflict_handling ===\n                               CONFLICT_KEEP_REMOTE),\n              conflict_revert: (context._conflict_handling ===\n                                CONFLICT_KEEP_LOCAL),\n              conflict_ignore: (context._conflict_handling ===\n                                CONFLICT_CONTINUE),\n              check_modification:\n                context._check_remote_attachment_modification,\n              check_creation: context._check_remote_attachment_creation,\n              check_deletion: context._check_remote_attachment_deletion,\n              from_local: false\n            }\n          );\n        }\n      });\n  }\n\n  function propagateModification(context, source, destination, doc, hash, id,\n                                 skip_document_dict,\n                                 skip_deleted_document_dict,\n                                 report,\n                                 options) {\n    var result = new RSVP.Queue(),\n      post_id,\n      from_local,\n      conflict;\n    if (options === undefined) {\n      options = {};\n    }\n    from_local = options.from_local;\n    conflict = options.conflict || false;\n\n    if (doc === null) {\n      result\n        .push(function () {\n          return source.get(id);\n        })\n        .push(function (source_doc) {\n          doc = source_doc;\n        }, function (error) {\n          if ((error instanceof jIO.util.jIOError) &&\n              (error.status_code === 404)) {\n            throw new SkipError(id);\n          }\n          throw error;\n        });\n    }\n    if (options.use_post) {\n      result\n        .push(function () {\n          report.log(id, from_local ? LOG_POST_REMOTE : LOG_POST_LOCAL);\n          return destination.post(doc);\n        })\n        .push(function (new_id) {\n          post_id = new_id;\n          return source.put(post_id, doc);\n        })\n        .push(function () {\n          // Copy all attachments\n          // This is not related to attachment replication\n          // It's just about not losing user data\n          return source.allAttachments(id);\n        })\n        .push(function (attachment_dict) {\n          var key,\n            copy_queue = new RSVP.Queue();\n\n          function copyAttachment(name) {\n            copy_queue\n              .push(function () {\n                return source.getAttachment(id, name);\n              })\n              .push(function (blob) {\n                return source.putAttachment(post_id, name, blob);\n              });\n          }\n\n          for (key in attachment_dict) {\n            if (attachment_dict.hasOwnProperty(key)) {\n              copyAttachment(key);\n            }\n          }\n          return copy_queue;\n        })\n        .push(function () {\n          return source.remove(id);\n        })\n        .push(function () {\n          return context._signature_sub_storage.remove(id);\n        })\n        .push(function () {\n          return context._signature_sub_storage.put(post_id, {\n            hash: hash,\n            from_local: from_local\n          });\n        })\n        .push(function () {\n          skip_document_dict[post_id] = null;\n        });\n    } else {\n      result\n        .push(function () {\n          if (conflict) {\n            report.log(id, from_local ? LOG_FORCE_PUT_REMOTE :\n                                        LOG_FORCE_PUT_LOCAL);\n          } else {\n            report.log(id, from_local ? LOG_PUT_REMOTE : LOG_PUT_LOCAL);\n          }\n          // Drop signature if the destination document was empty\n          // but a signature exists\n          if (options.create_new_document === true) {\n            delete skip_deleted_document_dict[id];\n            return context._signature_sub_storage.remove(id);\n          }\n        })\n        .push(function () {\n          return destination.put(id, doc);\n        })\n        .push(function () {\n          return context._signature_sub_storage.put(id, {\n            hash: hash,\n            from_local: from_local\n          });\n        });\n    }\n    return result\n      .push(undefined, function (error) {\n        if (error instanceof SkipError) {\n          return;\n        }\n        throw error;\n      });\n  }\n\n  function propagateDeletion(context, destination, id,\n                             skip_deleted_document_dict, report, options) {\n    // Do not delete a document if it has an attachment\n    // ie, replication should prevent losing user data\n    // Synchronize attachments before, to ensure\n    // all of them will be deleted too\n    var result,\n      previous_report_length;\n    if (context._signature_hash_key !== undefined) {\n      if (options.conflict) {\n        report.log(id, options.from_local ? LOG_FORCE_DELETE_REMOTE :\n                                            LOG_FORCE_DELETE_LOCAL);\n      } else {\n        report.log(id, options.from_local ? LOG_DELETE_REMOTE :\n                                            LOG_DELETE_LOCAL);\n      }\n      result = destination.remove(id)\n        .push(function () {\n          return context._signature_sub_storage.remove(id);\n        });\n    } else {\n      previous_report_length = report._list.length;\n      result = repairDocumentAttachment(context, id, report)\n        .push(function () {\n          var next_report_length = report._list.length,\n            has_error = false,\n            i;\n          // Check if there was an error during attachment replication\n          for (i = previous_report_length; i < next_report_length; i += 1) {\n            if ((report._list[i][1] === id) &&\n                (report._list[i][0] < 100)) {\n              has_error = true;\n            }\n          }\n          if (!has_error) {\n            // Attachment repication has been correctly resolved\n            if (options.conflict) {\n              report.log(id, options.from_local ? LOG_FORCE_DELETE_REMOTE :\n                                                  LOG_FORCE_DELETE_LOCAL);\n            } else {\n              report.log(id, options.from_local ? LOG_DELETE_REMOTE :\n                                                  LOG_DELETE_LOCAL);\n            }\n            return destination.remove(id)\n              .push(function () {\n                return context._signature_sub_storage.remove(id);\n              });\n          }\n          report.log(id, options.from_local ? LOG_UNEXPECTED_REMOTE_ATTACHMENT :\n                                              LOG_UNEXPECTED_LOCAL_ATTACHMENT);\n        }, function (error) {\n          if ((error instanceof jIO.util.jIOError) &&\n              (error.status_code === 404)) {\n            return;\n          }\n          throw error;\n        });\n    }\n    return result\n      .push(function () {\n        // No need to sync attachment twice on this document\n        skip_deleted_document_dict[id] = null;\n      });\n  }\n\n  function checkAndPropagate(context, skip_document_dict,\n                             skip_deleted_document_dict,\n                             cache, destination_key,\n                             status_hash, local_hash, doc,\n                             source, destination, id,\n                             conflict_force, conflict_revert,\n                             conflict_ignore,\n                             report,\n                             options) {\n    // No need to check twice\n    skip_document_dict[id] = null;\n    var from_local = options.from_local;\n    return new RSVP.Queue()\n      .push(function () {\n        if (options.signature_hash_key !== undefined) {\n          return callAllDocsOnStorage(context, destination,\n                                      cache, destination_key)\n            .push(function (result) {\n              if (result.hasOwnProperty(id)) {\n                return [null, result[id][options.signature_hash_key]];\n              }\n              return [null, null];\n            });\n        }\n        return destination.get(id)\n          .push(function (remote_doc) {\n            return [remote_doc, generateHash(stringify(remote_doc))];\n          }, function (error) {\n            if ((error instanceof jIO.util.jIOError) &&\n                (error.status_code === 404)) {\n              return [null, null];\n            }\n            throw error;\n          });\n      })\n\n      .push(function (remote_list) {\n        var remote_doc = remote_list[0],\n          remote_hash = remote_list[1];\n        if (local_hash === remote_hash) {\n          // Same modifications on both side\n          report.log(id, LOG_FALSE_CONFLICT);\n          if (local_hash === null) {\n            // Deleted on both side, drop signature\n            return context._signature_sub_storage.remove(id);\n          }\n\n          return context._signature_sub_storage.put(id, {\n            hash: local_hash,\n            from_local: from_local\n          });\n        }\n\n        if ((remote_hash === status_hash) || (conflict_force === true)) {\n          // Modified only locally. No conflict or force\n          if (local_hash === null) {\n            // Deleted locally\n            return propagateDeletion(context, destination, id,\n                                     skip_deleted_document_dict,\n                                     report,\n                                     {from_local: from_local,\n                                      conflict: (remote_hash !== status_hash)\n                                      });\n          }\n          return propagateModification(context, source, destination, doc,\n                                       local_hash, id, skip_document_dict,\n                                       skip_deleted_document_dict,\n                                       report,\n                                       {use_post: ((options.use_post) &&\n                                                   (remote_hash === null)),\n                                        conflict: (remote_hash !== status_hash),\n                                        from_local: from_local,\n                                        create_new_document:\n                                          ((remote_hash === null) &&\n                                           (status_hash !== null))\n                                        });\n        }\n\n        // Conflict cases\n        if (conflict_ignore === true) {\n          report.log(id, LOG_SKIP_CONFLICT);\n          return;\n        }\n\n        if ((conflict_revert === true) || (local_hash === null)) {\n          // Automatically resolve conflict or force revert\n          if (remote_hash === null) {\n            // Deleted remotely\n            return propagateDeletion(context, source, id,\n                                     skip_deleted_document_dict, report,\n                                     {from_local: !from_local,\n                                      conflict: (local_hash !== null)\n                                     });\n          }\n          return propagateModification(\n            context,\n            destination,\n            source,\n            remote_doc,\n            remote_hash,\n            id,\n            skip_document_dict,\n            skip_deleted_document_dict,\n            report,\n            {use_post: ((options.use_revert_post) &&\n                        (local_hash === null)),\n              from_local: !from_local,\n              conflict: true,\n              create_new_document: ((local_hash === null) &&\n                                    (status_hash !== null))}\n          );\n        }\n\n        // Minimize conflict if it can be resolved\n        if (remote_hash === null) {\n          // Copy remote modification remotely\n          return propagateModification(context, source, destination, doc,\n                                       local_hash, id, skip_document_dict,\n                                       skip_deleted_document_dict,\n                                       report,\n                                       {use_post: options.use_post,\n                                        conflict: true,\n                                        from_local: from_local,\n                                        create_new_document:\n                                          (status_hash !== null)});\n        }\n        report.log(id, LOG_UNRESOLVED_CONFLICT);\n      })\n      .push(undefined, function (error) {\n        report.log(id, LOG_UNEXPECTED_ERROR, error);\n      });\n  }\n\n  function checkLocalDeletion(queue, context, skip_document_dict,\n                              skip_deleted_document_dict,\n                              cache, destination_key,\n                              destination, id, source,\n                              conflict_force, conflict_revert,\n                              conflict_ignore, report, options) {\n    var status_hash;\n    queue\n      .push(function () {\n        return context._signature_sub_storage.get(id);\n      })\n      .push(function (result) {\n        status_hash = result.hash;\n        return checkAndPropagate(context, skip_document_dict,\n                                 skip_deleted_document_dict,\n                                 cache, destination_key,\n                                 status_hash, null, null,\n                                 source, destination, id,\n                                 conflict_force, conflict_revert,\n                                 conflict_ignore, report,\n                                 options);\n      });\n  }\n\n  function checkSignatureDifference(queue, context, skip_document_dict,\n                                    skip_deleted_document_dict,\n                                    cache, destination_key,\n                                    source, destination, id,\n                                    conflict_force, conflict_revert,\n                                    conflict_ignore,\n                                    local_hash, status_hash, report,\n                                    options) {\n    queue\n      .push(function () {\n        if (local_hash === null) {\n          // Hash was not provided by the allDocs query\n          return source.get(id);\n        }\n        return null;\n      })\n      .push(function (doc) {\n        if (local_hash === null) {\n          // Hash was not provided by the allDocs query\n          local_hash = generateHash(stringify(doc));\n        }\n\n        if (local_hash !== status_hash) {\n          return checkAndPropagate(context, skip_document_dict,\n                                   skip_deleted_document_dict,\n                                   cache, destination_key,\n                                   status_hash, local_hash, doc,\n                                   source, destination, id,\n                                   conflict_force, conflict_revert,\n                                   conflict_ignore,\n                                   report,\n                                   options);\n        }\n        if (!options.from_local) {\n          report.log(id, LOG_NO_CHANGE);\n        }\n      });\n  }\n\n  function pushStorage(context, skip_document_dict,\n                       skip_deleted_document_dict,\n                       cache, source_key, destination_key,\n                       source, destination, signature_allDocs,\n                       report, options) {\n    var argument_list = [],\n      argument_list_deletion = [];\n    if (!options.hasOwnProperty(\"use_post\")) {\n      options.use_post = false;\n    }\n    if (!options.hasOwnProperty(\"use_revert_post\")) {\n      options.use_revert_post = false;\n    }\n    return callAllDocsOnStorage(context, source, cache, source_key)\n      .push(function (source_allDocs) {\n        var i,\n          local_dict = {},\n          signature_dict = {},\n          is_modification,\n          is_creation,\n          status_hash,\n          local_hash,\n          key,\n          queue = new RSVP.Queue();\n        for (key in source_allDocs) {\n          if (source_allDocs.hasOwnProperty(key)) {\n            if (!skip_document_dict.hasOwnProperty(key)) {\n              local_dict[key] = source_allDocs[key];\n            }\n          }\n        }\n        /*\n        for (i = 0; i < source_allDocs.data.total_rows; i += 1) {\n          if (!skip_document_dict.hasOwnProperty(\n              source_allDocs.data.rows[i].id\n            )) {\n            local_dict[source_allDocs.data.rows[i].id] =\n              source_allDocs.data.rows[i].value;\n          }\n        }\n        */\n        for (i = 0; i < signature_allDocs.data.total_rows; i += 1) {\n          if (!skip_document_dict.hasOwnProperty(\n              signature_allDocs.data.rows[i].id\n            )) {\n            signature_dict[signature_allDocs.data.rows[i].id] =\n              signature_allDocs.data.rows[i].value.hash;\n          }\n        }\n        for (key in local_dict) {\n          if (local_dict.hasOwnProperty(key)) {\n            is_modification = signature_dict.hasOwnProperty(key)\n              && options.check_modification;\n            is_creation = !signature_dict.hasOwnProperty(key)\n              && options.check_creation;\n\n            if (is_creation === true) {\n              status_hash = null;\n            } else if (is_modification === true) {\n              status_hash = signature_dict[key];\n            }\n\n            local_hash = null;\n            if (options.signature_hash_key !== undefined) {\n              local_hash = local_dict[key][options.signature_hash_key];\n              if (is_modification === true) {\n                // Bypass fetching all documents and calculating the sha\n                // Compare the select list values returned by allDocs calls\n                is_modification = false;\n                if (local_hash !== status_hash) {\n                  is_modification = true;\n                }\n              }\n            }\n\n            if (is_modification === true || is_creation === true) {\n              argument_list.push([undefined, context, skip_document_dict,\n                                  skip_deleted_document_dict,\n                                  cache, destination_key,\n                                  source, destination,\n                                  key,\n                                  options.conflict_force,\n                                  options.conflict_revert,\n                                  options.conflict_ignore,\n                                  local_hash, status_hash,\n                                  report,\n                                  options]);\n            } else if (local_hash === status_hash) {\n              report.log(key, LOG_NO_CHANGE);\n            } else {\n              if (signature_dict.hasOwnProperty(key)) {\n                report.log(key, options.from_local ?\n                           LOG_SKIP_LOCAL_MODIFICATION :\n                           LOG_SKIP_REMOTE_MODIFICATION);\n              } else {\n                report.log(key, options.from_local ? LOG_SKIP_LOCAL_CREATION :\n                                                     LOG_SKIP_REMOTE_CREATION);\n              }\n            }\n          }\n        }\n        queue\n          .push(function () {\n            return dispatchQueue(\n              context,\n              checkSignatureDifference,\n              argument_list,\n              options.operation_amount\n            );\n          });\n        for (key in signature_dict) {\n          if (signature_dict.hasOwnProperty(key)) {\n            if (!local_dict.hasOwnProperty(key)) {\n              if (options.check_deletion === true) {\n                argument_list_deletion.push([undefined,\n                                             context,\n                                             skip_document_dict,\n                                             skip_deleted_document_dict,\n                                             cache, destination_key,\n                                             destination, key,\n                                             source,\n                                             options.conflict_force,\n                                             options.conflict_revert,\n                                             options.conflict_ignore,\n                                             report,\n                                             options]);\n              } else {\n                report.log(key, options.from_local ? LOG_SKIP_LOCAL_DELETION :\n                                                     LOG_SKIP_REMOTE_DELETION);\n                skip_deleted_document_dict[key] = null;\n              }\n            }\n          }\n        }\n        if (argument_list_deletion.length !== 0) {\n          queue.push(function () {\n            return dispatchQueue(\n              context,\n              checkLocalDeletion,\n              argument_list_deletion,\n              options.operation_amount\n            );\n          });\n        }\n        return queue;\n      });\n  }\n\n  function repairDocument(queue, context, id, report, signature_hash_key,\n                          signature_hash, signature_attachment_hash,\n                          signature_from_local) {\n    queue.push(function () {\n      return repairDocumentAttachment(context, id, report, signature_hash_key,\n                                      signature_hash,\n                                      signature_attachment_hash,\n                                      signature_from_local);\n    });\n  }\n\n  ReplicateStorage.prototype.repair = function () {\n    var context = this,\n      argument_list = arguments,\n      skip_document_dict = {},\n      skip_deleted_document_dict = {},\n      cache = {},\n      report = new ReplicateReport(this._log_level, this._log_console);\n\n    return new RSVP.Queue()\n      .push(function () {\n        // Ensure that the document storage is usable\n        if (context._custom_signature_sub_storage === false) {\n          // Do not sync the signature document\n          skip_document_dict[context._signature_hash] = null;\n\n          return context._signature_sub_storage.__storage._sub_storage\n                                               .__storage._sub_storage.get(\n              context._signature_hash\n            );\n        }\n      })\n      .push(undefined, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          return context._signature_sub_storage.__storage._sub_storage\n                                               .__storage._sub_storage.put(\n              context._signature_hash,\n              {}\n            );\n        }\n        throw error;\n      })\n\n      .push(function () {\n        return RSVP.all([\n// Don't repair local_sub_storage twice\n//           context._signature_sub_storage.repair.apply(\n//             context._signature_sub_storage,\n//             argument_list\n//           ),\n          context._local_sub_storage.repair.apply(\n            context._local_sub_storage,\n            argument_list\n          ),\n          context._remote_sub_storage.repair.apply(\n            context._remote_sub_storage,\n            argument_list\n          )\n        ]);\n      })\n\n      .push(function () {\n        if (context._check_local_modification ||\n            context._check_local_creation ||\n            context._check_local_deletion ||\n            context._check_remote_modification ||\n            context._check_remote_creation ||\n            context._check_remote_deletion) {\n          return context._signature_sub_storage.allDocs({\n            select_list: ['hash']\n          });\n        }\n      })\n\n      .push(function (signature_allDocs) {\n        if (context._check_local_modification ||\n            context._check_local_creation ||\n            context._check_local_deletion) {\n          return pushStorage(context, skip_document_dict,\n                             skip_deleted_document_dict,\n                             cache, 'local', 'remote',\n                             context._local_sub_storage,\n                             context._remote_sub_storage,\n                             signature_allDocs, report,\n                             {\n              use_post: context._use_remote_post,\n              conflict_force: (context._conflict_handling ===\n                               CONFLICT_KEEP_LOCAL),\n              conflict_revert: (context._conflict_handling ===\n                                CONFLICT_KEEP_REMOTE),\n              conflict_ignore: (context._conflict_handling ===\n                                CONFLICT_CONTINUE),\n              check_modification: context._check_local_modification,\n              check_creation: context._check_local_creation,\n              check_deletion: context._check_local_deletion,\n              operation_amount: context._parallel_operation_amount,\n              signature_hash_key: context._signature_hash_key,\n              from_local: true\n            })\n              .push(function () {\n              return signature_allDocs;\n            });\n        }\n        return signature_allDocs;\n      })\n      .push(function (signature_allDocs) {\n        if (context._check_remote_modification ||\n            context._check_remote_creation ||\n            context._check_remote_deletion) {\n          return pushStorage(context, skip_document_dict,\n                             skip_deleted_document_dict,\n                             cache, 'remote', 'local',\n                             context._remote_sub_storage,\n                             context._local_sub_storage,\n                             signature_allDocs,\n                             report, {\n              use_revert_post: context._use_remote_post,\n              conflict_force: (context._conflict_handling ===\n                               CONFLICT_KEEP_REMOTE),\n              conflict_revert: (context._conflict_handling ===\n                                CONFLICT_KEEP_LOCAL),\n              conflict_ignore: (context._conflict_handling ===\n                                CONFLICT_CONTINUE),\n              check_modification: context._check_remote_modification,\n              check_creation: context._check_remote_creation,\n              check_deletion: context._check_remote_deletion,\n              operation_amount: context._parallel_operation_amount,\n              signature_hash_key: context._signature_hash_key,\n              from_local: false\n            });\n        }\n      })\n      .push(function () {\n        if (context._check_local_attachment_modification ||\n            context._check_local_attachment_creation ||\n            context._check_local_attachment_deletion ||\n            context._check_remote_attachment_modification ||\n            context._check_remote_attachment_creation ||\n            context._check_remote_attachment_deletion) {\n          // Attachments are synchronized if and only if their parent document\n          // has been also marked as synchronized.\n          return context._signature_sub_storage.allDocs({\n            select_list: ['hash', 'attachment_hash', 'from_local']\n          })\n            .push(function (result) {\n              var i,\n                local_argument_list = [],\n                row,\n                len = result.data.total_rows;\n\n              for (i = 0; i < len; i += 1) {\n                row = result.data.rows[i];\n                // Do not synchronize attachment if one version of the document\n                // is deleted but not pushed to the other storage\n                if (!skip_deleted_document_dict.hasOwnProperty(row.id)) {\n                  local_argument_list.push(\n                    [undefined, context, row.id, report,\n                      context._signature_hash_key,\n                      row.value.hash, row.value.attachment_hash,\n                      row.value.from_local, report]\n                  );\n                }\n              }\n              return dispatchQueue(\n                context,\n                repairDocument,\n                local_argument_list,\n                context._parallel_operation_amount\n              );\n            });\n        }\n      })\n      .push(function () {\n        if (report.has_error) {\n          throw report;\n        }\n        return report;\n      });\n  };\n\n  jIO.addStorage('replicate', ReplicateStorage);\n\n}(jIO, RSVP, Rusha, jIO.util.stringify));\n/*\n * JIO extension for resource replication.\n * Copyright (C) 2021  Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n\n/*jslint nomen: true*/\n/*global jIO*/\n\n(function (jIO) {\n  \"use strict\";\n\n  function FallbackStorage(spec) {\n    this._sub_storage = this._current_storage = jIO.createJIO(spec.sub_storage);\n    if (spec.hasOwnProperty('fallback_storage')) {\n      this._fallback_storage = jIO.createJIO(spec.fallback_storage);\n      this._checked = false;\n    } else {\n      this._checked = true;\n    }\n  }\n\n  var method_name_list = [\n    'get',\n    'put',\n    'post',\n    'remove',\n    'buildQuery',\n    'getAttachment',\n    'putAttachment',\n    'allAttachments',\n    'repair'\n  ],\n    i;\n\n  function methodFallback(method_name) {\n    return function () {\n      var storage = this,\n        queue =  storage._current_storage[method_name].apply(\n          storage._current_storage,\n          arguments\n        ),\n        argument_list = arguments;\n      if (!storage._checked) {\n        queue\n          .push(function (result) {\n            storage._checked = true;\n            return result;\n          }, function (error) {\n            storage._checked = true;\n            if ((error instanceof jIO.util.jIOError) &&\n                (error.status_code === 500)) {\n              // If storage is not working, use fallback instead\n              storage._current_storage = storage._fallback_storage;\n              return storage._current_storage[method_name].apply(\n                storage._current_storage,\n                argument_list\n              );\n            }\n            throw error;\n          });\n      }\n      return queue;\n    };\n  }\n\n  for (i = 0; i < method_name_list.length; i += 1) {\n    FallbackStorage.prototype[method_name_list[i]] =\n      methodFallback(method_name_list[i]);\n  }\n\n  FallbackStorage.prototype.hasCapacity = function hasCapacity(name) {\n    return (this._sub_storage.hasCapacity(name) &&\n      this._fallback_storage.hasCapacity(name));\n  };\n\n  jIO.addStorage('fallback', FallbackStorage);\n\n}(jIO));\n/*\n * Copyright 2015, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n\n/*jslint nomen: true*/\n/*global Rusha*/\n\n/**\n * JIO Sha Storage. Type = 'sha'.\n */\n\n(function (Rusha) {\n  \"use strict\";\n\n  var rusha = new Rusha();\n\n  function ShaStorage(spec) {\n    this._sub_storage = jIO.createJIO(spec.sub_storage);\n  }\n\n  ShaStorage.prototype.post = function (param) {\n    return this._sub_storage.put(\n      rusha.digestFromString(JSON.stringify(param)),\n      param\n    );\n  };\n\n  ShaStorage.prototype.get = function () {\n    return this._sub_storage.get.apply(this._sub_storage, arguments);\n  };\n  ShaStorage.prototype.remove = function () {\n    return this._sub_storage.remove.apply(this._sub_storage, arguments);\n  };\n  ShaStorage.prototype.hasCapacity = function () {\n    return this._sub_storage.hasCapacity.apply(this._sub_storage, arguments);\n  };\n  ShaStorage.prototype.buildQuery = function () {\n    return this._sub_storage.buildQuery.apply(this._sub_storage, arguments);\n  };\n  ShaStorage.prototype.getAttachment = function () {\n    return this._sub_storage.getAttachment.apply(this._sub_storage, arguments);\n  };\n  ShaStorage.prototype.putAttachment = function () {\n    return this._sub_storage.putAttachment.apply(this._sub_storage, arguments);\n  };\n  ShaStorage.prototype.removeAttachment = function () {\n    return this._sub_storage.removeAttachment.apply(this._sub_storage,\n                                                    arguments);\n  };\n  ShaStorage.prototype.allAttachments = function () {\n    return this._sub_storage.allAttachments.apply(this._sub_storage, arguments);\n  };\n  ShaStorage.prototype.repair = function () {\n    return this._sub_storage.repair.apply(this._sub_storage, arguments);\n  };\n\n  jIO.addStorage('sha', ShaStorage);\n\n}(Rusha));\n/*\n * Copyright 2015, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*jslint nomen: true*/\n(function (jIO) {\n  \"use strict\";\n\n  /**\n   * The jIO UUIDStorage extension\n   *\n   * @class UUIDStorage\n   * @constructor\n   */\n  function UUIDStorage(spec) {\n    this._sub_storage = jIO.createJIO(spec.sub_storage);\n  }\n\n  UUIDStorage.prototype.get = function () {\n    return this._sub_storage.get.apply(this._sub_storage, arguments);\n  };\n  UUIDStorage.prototype.allAttachments = function () {\n    return this._sub_storage.allAttachments.apply(this._sub_storage, arguments);\n  };\n  UUIDStorage.prototype.post = function (param) {\n\n    function S4() {\n      return ('0000' + Math.floor(\n        Math.random() * 0x10000 /* 65536 */\n      ).toString(16)).slice(-4);\n    }\n\n    var id = S4() + S4() + \"-\" +\n      S4() + \"-\" +\n      S4() + \"-\" +\n      S4() + \"-\" +\n      S4() + S4() + S4();\n\n    return this.put(id, param);\n  };\n  UUIDStorage.prototype.put = function () {\n    return this._sub_storage.put.apply(this._sub_storage, arguments);\n  };\n  UUIDStorage.prototype.remove = function () {\n    return this._sub_storage.remove.apply(this._sub_storage, arguments);\n  };\n  UUIDStorage.prototype.getAttachment = function () {\n    return this._sub_storage.getAttachment.apply(this._sub_storage, arguments);\n  };\n  UUIDStorage.prototype.putAttachment = function () {\n    return this._sub_storage.putAttachment.apply(this._sub_storage, arguments);\n  };\n  UUIDStorage.prototype.removeAttachment = function () {\n    return this._sub_storage.removeAttachment.apply(this._sub_storage,\n                                                    arguments);\n  };\n  UUIDStorage.prototype.repair = function () {\n    return this._sub_storage.repair.apply(this._sub_storage, arguments);\n  };\n  UUIDStorage.prototype.hasCapacity = function (name) {\n    return this._sub_storage.hasCapacity(name);\n  };\n  UUIDStorage.prototype.buildQuery = function () {\n    return this._sub_storage.buildQuery.apply(this._sub_storage,\n                                              arguments);\n  };\n\n  jIO.addStorage('uuid', UUIDStorage);\n\n}(jIO));\n/*\n * Copyright 2013, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n\n/*jslint nomen: true*/\n/*global jIO, RSVP*/\n\n/**\n * JIO Memory Storage. Type = 'memory'.\n * Memory browser \"database\" storage.\n *\n * Storage Description:\n *\n *     {\n *       \"type\": \"memory\"\n *     }\n *\n * @class MemoryStorage\n */\n\n(function (jIO, JSON, RSVP) {\n  \"use strict\";\n\n  /**\n   * The JIO MemoryStorage extension\n   *\n   * @class MemoryStorage\n   * @constructor\n   */\n  function MemoryStorage() {\n    this._database = {};\n  }\n\n  MemoryStorage.prototype.put = function (id, metadata) {\n    if (!this._database.hasOwnProperty(id)) {\n      this._database[id] = {\n        attachments: {}\n      };\n    }\n    this._database[id].doc = JSON.stringify(metadata);\n    return id;\n  };\n\n  MemoryStorage.prototype.get = function (id) {\n    try {\n      return JSON.parse(this._database[id].doc);\n    } catch (error) {\n      if (error instanceof TypeError) {\n        throw new jIO.util.jIOError(\n          \"Cannot find document: \" + id,\n          404\n        );\n      }\n      throw error;\n    }\n  };\n\n  MemoryStorage.prototype.allAttachments = function (id) {\n    var key,\n      attachments = {};\n    try {\n      for (key in this._database[id].attachments) {\n        if (this._database[id].attachments.hasOwnProperty(key)) {\n          attachments[key] = {};\n        }\n      }\n    } catch (error) {\n      if (error instanceof TypeError) {\n        throw new jIO.util.jIOError(\n          \"Cannot find document: \" + id,\n          404\n        );\n      }\n      throw error;\n    }\n    return attachments;\n  };\n\n  MemoryStorage.prototype.remove = function (id) {\n    delete this._database[id];\n    return id;\n  };\n\n  MemoryStorage.prototype.getAttachment = function (id, name) {\n    try {\n      var result = this._database[id].attachments[name];\n      if (result === undefined) {\n        throw new jIO.util.jIOError(\n          \"Cannot find attachment: \" + id + \" , \" + name,\n          404\n        );\n      }\n      return jIO.util.dataURItoBlob(result);\n    } catch (error) {\n      if (error instanceof TypeError) {\n        throw new jIO.util.jIOError(\n          \"Cannot find attachment: \" + id + \" , \" + name,\n          404\n        );\n      }\n      throw error;\n    }\n  };\n\n  MemoryStorage.prototype.putAttachment = function (id, name, blob) {\n    var attachment_dict;\n    try {\n      attachment_dict = this._database[id].attachments;\n    } catch (error) {\n      if (error instanceof TypeError) {\n        throw new jIO.util.jIOError(\"Cannot find document: \" + id, 404);\n      }\n      throw error;\n    }\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.readBlobAsDataURL(blob);\n      })\n      .push(function (evt) {\n        attachment_dict[name] = evt.target.result;\n      });\n  };\n\n  MemoryStorage.prototype.removeAttachment = function (id, name) {\n    try {\n      delete this._database[id].attachments[name];\n    } catch (error) {\n      if (error instanceof TypeError) {\n        throw new jIO.util.jIOError(\n          \"Cannot find document: \" + id,\n          404\n        );\n      }\n      throw error;\n    }\n  };\n\n\n  MemoryStorage.prototype.hasCapacity = function (name) {\n    return ((name === \"list\") || (name === \"include\"));\n  };\n\n  MemoryStorage.prototype.buildQuery = function (options) {\n    var rows = [],\n      i;\n    for (i in this._database) {\n      if (this._database.hasOwnProperty(i)) {\n        if (options.include_docs === true) {\n          rows.push({\n            id: i,\n            value: {},\n            doc: JSON.parse(this._database[i].doc)\n          });\n        } else {\n          rows.push({\n            id: i,\n            value: {}\n          });\n        }\n\n      }\n    }\n    return rows;\n  };\n\n  jIO.addStorage('memory', MemoryStorage);\n\n}(jIO, JSON, RSVP));\n/*\n * Copyright 2013, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/**\n * JIO Dropbox Storage. Type = \"dropbox\".\n * Dropbox \"database\" storage.\n */\n/*global Blob, jIO, RSVP*/\n/*jslint nomen: true*/\n\n(function (jIO, RSVP, Blob, JSON) {\n  \"use strict\";\n  var GET_URL = \"https://content.dropboxapi.com/2/files/download\",\n    UPLOAD_URL = \"https://content.dropboxapi.com/2/files/upload\",\n    REMOVE_URL = \"https://api.dropboxapi.com/2/files/delete_v2\",\n    CREATE_DIR_URL = \"https://api.dropboxapi.com/2/files/create_folder_v2\",\n    METADATA_URL = \"https://api.dropboxapi.com/2/files/get_metadata\",\n    LIST_FOLDER_URL = \"https://api.dropboxapi.com/2/files/list_folder\",\n    LIST_MORE_URL = \"https://api.dropboxapi.com/2/files/list_folder/continue\";\n\n  function restrictDocumentId(id) {\n    if (id.indexOf(\"/\") !== 0) {\n      throw new jIO.util.jIOError(\"id \" + id + \" is forbidden (no begin /)\",\n                                  400);\n    }\n    if (id.lastIndexOf(\"/\") !== (id.length - 1)) {\n      throw new jIO.util.jIOError(\"id \" + id + \" is forbidden (no end /)\",\n                                  400);\n    }\n    return id.slice(0, -1);\n  }\n\n  function restrictAttachmentId(id) {\n    if (id.indexOf(\"/\") !== -1) {\n      throw new jIO.util.jIOError(\"attachment \" + id + \" is forbidden\",\n                                  400);\n    }\n  }\n\n  function recursiveAllAttachments(result, token, id, cursor) {\n    var data,\n      url;\n    if (cursor === undefined) {\n      data = {\n        \"path\": id,\n        \"recursive\": false,\n        \"include_media_info\": false,\n        \"include_deleted\": false,\n        \"include_has_explicit_shared_members\": false,\n        \"include_mounted_folders\": true\n      };\n      url = LIST_FOLDER_URL;\n    } else {\n      data = {\"cursor\": cursor};\n      url = LIST_MORE_URL;\n    }\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          type: \"POST\",\n          url: url,\n          headers: {\n            \"Authorization\": \"Bearer \" + token,\n            \"Content-Type\": \"application/json\"\n          },\n          data: JSON.stringify(data)\n        });\n      })\n      .push(function (evt) {\n        var obj = JSON.parse(evt.target.response || evt.target.responseText),\n          i;\n        for (i = 0; i < obj.entries.length; i += 1) {\n          if (obj.entries[i][\".tag\"] === \"file\") {\n            result[obj.entries[i].name] = {};\n          }\n        }\n        if (obj.has_more) {\n          return recursiveAllAttachments(result, token, id, obj.cursor);\n        }\n        return result;\n      }, function (error) {\n        if (error.target !== undefined && error.target.status === 409) {\n          var err_content = JSON.parse(error.target.response ||\n                                       error.target.responseText);\n          if ((err_content.error['.tag'] === 'path') &&\n              (err_content.error.path['.tag'] === 'not_folder')) {\n            throw new jIO.util.jIOError(\"Not a directory: \" + id + \"/\",\n                                        404);\n          }\n          if ((err_content.error['.tag'] === 'path') &&\n              (err_content.error.path['.tag'] === 'not_found')) {\n            throw new jIO.util.jIOError(\"Cannot find document: \" + id + \"/\",\n                                        404);\n          }\n        }\n        throw error;\n      });\n  }\n\n  /**\n   * The JIO Dropbox Storage extension\n   *\n   * @class DropboxStorage\n   * @constructor\n   */\n  function DropboxStorage(spec) {\n    if (typeof spec.access_token !== 'string' || !spec.access_token) {\n      throw new TypeError(\"Access Token' must be a string \" +\n                          \"which contains more than one character.\");\n    }\n    this._access_token = spec.access_token;\n  }\n\n  DropboxStorage.prototype.put = function (id, param) {\n    var that = this;\n    id = restrictDocumentId(id);\n    if (Object.getOwnPropertyNames(param).length > 0) {\n      // Reject if param has some properties\n      throw new jIO.util.jIOError(\"Can not store properties: \" +\n                                  Object.getOwnPropertyNames(param), 400);\n    }\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          type: \"POST\",\n          url: CREATE_DIR_URL,\n          headers: {\n            \"Authorization\": \"Bearer \" + that._access_token,\n            \"Content-Type\": \"application/json\"\n          },\n          data: JSON.stringify({\"path\": id, \"autorename\": false})\n        });\n      })\n      .push(undefined, function (err) {\n        if ((err.target !== undefined) &&\n            (err.target.status === 409)) {\n          var err_content = JSON.parse(err.target.response ||\n                                       err.target.responseText);\n          if ((err_content.error['.tag'] === 'path') &&\n              (err_content.error.path['.tag'] === 'conflict')) {\n            // Directory already exists, no need to fail\n            return;\n          }\n        }\n        throw err;\n      });\n  };\n\n  DropboxStorage.prototype.remove = function (id) {\n    id = restrictDocumentId(id);\n    return jIO.util.ajax({\n      type: \"POST\",\n      url: REMOVE_URL,\n      headers: {\n        \"Authorization\": \"Bearer \" + this._access_token,\n        \"Content-Type\": \"application/json\"\n      },\n      data: JSON.stringify({\"path\": id})\n    });\n  };\n\n  DropboxStorage.prototype.get = function (id) {\n    var that = this;\n\n    if (id === \"/\") {\n      return {};\n    }\n    id = restrictDocumentId(id);\n\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          type: \"POST\",\n          url: METADATA_URL,\n          headers: {\n            \"Authorization\": \"Bearer \" + that._access_token,\n            \"Content-Type\": \"application/json\"\n          },\n          data: JSON.stringify({\"path\": id})\n        });\n      })\n      .push(function (evt) {\n        var obj = JSON.parse(evt.target.response ||\n                             evt.target.responseText);\n        if (obj[\".tag\"] === \"folder\") {\n          return {};\n        }\n        throw new jIO.util.jIOError(\"Not a directory: \" + id + \"/\", 404);\n      }, function (error) {\n        if (error.target !== undefined && error.target.status === 409) {\n          var err_content = JSON.parse(error.target.response ||\n                                       error.target.responseText);\n          if ((err_content.error['.tag'] === 'path') &&\n              (err_content.error.path['.tag'] === 'not_found')) {\n            throw new jIO.util.jIOError(\"Cannot find document: \" + id + \"/\",\n                                        404);\n          }\n        }\n        throw error;\n      });\n  };\n\n  DropboxStorage.prototype.allAttachments = function (id) {\n    id = restrictDocumentId(id);\n    return recursiveAllAttachments({}, this._access_token, id);\n  };\n\n  //currently, putAttachment will fail with files larger than 150MB,\n  //due to the Dropbox API. the API provides the \"chunked_upload\" method\n  //to pass this limit, but upload process becomes more complex to implement.\n  //\n  //putAttachment will also create a folder if you try to put an attachment\n  //to an inexisting foler.\n\n  DropboxStorage.prototype.putAttachment = function (id, name, blob) {\n    id = restrictDocumentId(id);\n    restrictAttachmentId(name);\n\n    return jIO.util.ajax({\n      type: \"POST\",\n      url: UPLOAD_URL,\n      headers: {\n        \"Authorization\": \"Bearer \" + this._access_token,\n        \"Content-Type\": \"application/octet-stream\",\n        \"Dropbox-API-Arg\": JSON.stringify({\n          \"path\": id + \"/\" + name,\n          \"mode\": \"overwrite\",\n          \"autorename\": false,\n          \"mute\": false\n        })\n      },\n      data: blob\n    });\n  };\n\n  DropboxStorage.prototype.getAttachment = function (id, name) {\n    var context = this;\n\n    id = restrictDocumentId(id);\n    restrictAttachmentId(name);\n\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          url: GET_URL,\n          type: \"POST\",\n          dataType: \"blob\",\n          headers: {\n            \"Authorization\": \"Bearer \" + context._access_token,\n            \"Dropbox-API-Arg\": JSON.stringify({\"path\": id + \"/\" + name})\n          }\n        });\n      })\n      .push(function (evt) {\n        if (evt.target.response instanceof Blob) {\n          return evt.target.response;\n        }\n        return new Blob(\n          [evt.target.responseText],\n          {\"type\": evt.target.getResponseHeader('Content-Type') ||\n            \"application/octet-stream\"}\n        );\n      }, function (error) {\n        if (error.target !== undefined && error.target.status === 409) {\n          if (!(error.target.response instanceof Blob)) {\n            var err_content = JSON.parse(error.target.responseText);\n            if ((err_content.error['.tag'] === 'path') &&\n                (err_content.error.path['.tag'] === 'not_found')) {\n              throw new jIO.util.jIOError(\"Cannot find attachment: \" +\n                                          id + \"/, \" + name, 404);\n            }\n            throw error;\n          }\n          return new RSVP.Queue()\n            .push(function () {\n              return jIO.util.readBlobAsText(error.target.response);\n            })\n            .push(function (evt) {\n              var err_content2 = JSON.parse(evt.target.result);\n              if ((err_content2.error['.tag'] === 'path') &&\n                  (err_content2.error.path['.tag'] === 'not_found')) {\n                throw new jIO.util.jIOError(\"Cannot find attachment: \" +\n                                            id + \"/, \" + name, 404);\n              }\n              throw error;\n            });\n        }\n        throw error;\n      });\n  };\n\n  //removeAttachment removes also directories.(due to Dropbox API)\n\n  DropboxStorage.prototype.removeAttachment = function (id, name) {\n    var that = this;\n    id = restrictDocumentId(id);\n    restrictAttachmentId(name);\n\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          type: \"POST\",\n          url: REMOVE_URL,\n          headers: {\n            \"Authorization\": \"Bearer \" + that._access_token,\n            \"Content-Type\": \"application/json\"\n          },\n          data: JSON.stringify({\"path\": id + \"/\" + name})\n        });\n      }).push(undefined, function (error) {\n        if (error.target !== undefined && error.target.status === 409) {\n          var err_content = JSON.parse(error.target.response ||\n                                       error.target.responseText);\n          if ((err_content.error['.tag'] === 'path_lookup') &&\n              (err_content.error.path_lookup['.tag'] === 'not_found')) {\n            throw new jIO.util.jIOError(\"Cannot find attachment: \" +\n                                        id + \"/, \" + name, 404);\n          }\n        }\n        throw error;\n      });\n  };\n\n  jIO.addStorage('dropbox', DropboxStorage);\n\n}(jIO, RSVP, Blob, JSON));\n/*\n * Copyright 2015, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/**\n * JIO Google Drive Storage. Type = \"gdrive\".\n * Google Drive \"database\" storage.\n */\n/*global jIO, Blob, RSVP, UriTemplate, JSON*/\n/*jslint nomen: true*/\n\n(function (jIO, Blob, RSVP, UriTemplate, JSON) {\n  \"use strict\";\n\n  var UPLOAD_URL = \"https://www.googleapis.com{/upload}/drive/v2/files{/id}\" +\n      \"{?uploadType,access_token}\",\n    upload_template = UriTemplate.parse(UPLOAD_URL),\n    REMOVE_URL = \"https://www.googleapis.com/drive/v2/\" +\n      \"files{/id,trash}{?access_token}\",\n    remove_template = UriTemplate.parse(REMOVE_URL),\n    LIST_URL = \"https://www.googleapis.com/drive/v2/files\" +\n      \"?prettyPrint=false{&pageToken}&q=trashed=false\" +\n      \"&fields=nextPageToken,items(id){&access_token}\",\n    list_template = UriTemplate.parse(LIST_URL),\n    GET_URL = \"https://www.googleapis.com/drive/v2/files{/id}{?alt}\",\n    get_template = UriTemplate.parse(GET_URL);\n\n  function handleError(error, id) {\n    if (error.target.status === 404) {\n      throw new jIO.util.jIOError(\n        \"Cannot find document: \" + id,\n        404\n      );\n    }\n    throw error;\n  }\n\n  function listPage(result, token) {\n    var i,\n      obj;\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          \"type\": \"GET\",\n          \"url\": list_template.expand({\n            pageToken : (result.nextPageToken || \"\"),\n            access_token: token\n          })\n        });\n      })\n      .push(function (data) {\n        obj = JSON.parse(data.target.response || data.target.responseText);\n        for (i = 0; i < obj.items.length; i += 1) {\n          obj.items[i].value = {};\n          result.push(obj.items[i]);\n        }\n        result.nextPageToken = obj.nextPageToken;\n        return result;\n      }, handleError);\n  }\n\n  function checkName(name) {\n    if (name !== \"enclosure\") {\n      throw new jIO.util.jIOError(\"Only support 'enclosure' attachment\", 400);\n    }\n  }\n\n  /**\n   * The JIO Google Drive Storage extension\n   *\n   * @class GdriveStorage\n   * @constructor\n   */\n  function GdriveStorage(spec) {\n    if (spec === undefined || spec.access_token === undefined ||\n        typeof spec.access_token !== 'string') {\n      throw new TypeError(\"Access Token must be a string \" +\n                          \"which contains more than one character.\");\n    }\n    if (spec.trashing !== undefined &&\n        (spec.trashing !== true && spec.trashing !== false)) {\n      throw new TypeError(\"trashing parameter\" +\n                          \" must be a boolean (true or false)\");\n    }\n    this._trashing = spec.trashing || true;\n    this._access_token = spec.access_token;\n    return;\n  }\n\n  function recursiveAllDocs(result, accessToken) {\n    return new RSVP.Queue()\n      .push(function () {\n        return listPage(result, accessToken);\n      })\n      .push(function () {\n        if (result.nextPageToken) {\n          return recursiveAllDocs(result, accessToken);\n        }\n        return result;\n      });\n  }\n\n  GdriveStorage.prototype.hasCapacity = function (name) {\n    return (name === \"list\");\n  };\n\n  GdriveStorage.prototype.buildQuery = function () {\n    return recursiveAllDocs([], this._access_token);\n  };\n\n  function sendMetaData(id, param, token) {\n    var boundary = \"-------314159265358979323846\";\n\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          \"type\": id ? \"PUT\" : \"POST\",\n          \"url\": upload_template.expand({\n            access_token: token,\n            id: id || [],\n            upload: id ? [] : \"upload\",\n            uploadType: \"multipart\"\n          }),\n          headers: {\n            \"Content-Type\" : 'multipart/related; boundary=\"' + boundary + '\"'\n          },\n          data: '--' + boundary + '\\n' +\n            'Content-Type: application/json; charset=UTF-8\\n\\n' +\n            JSON.stringify(param) + '\\n\\n--' + boundary + \"--\"\n        });\n      })\n      .push(function (result) {\n        var obj = JSON.parse(result.target.responseText);\n\n        return obj.id;\n      },\n            function (error) {handleError(error, id); });\n  }\n\n  GdriveStorage.prototype.put = function (id, param) {\n    return sendMetaData(id, param, this._access_token);\n  };\n\n  GdriveStorage.prototype.post = function (param) {\n    return sendMetaData(undefined, param, this._access_token);\n  };\n\n  function sendData(id, blob, token) {\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          \"type\": \"PUT\",\n          \"url\": upload_template.expand({\n            access_token: token,\n            upload: \"upload\",\n            id: id,\n            uploadType: \"media\"\n          }),\n          data: blob\n        });\n      })\n      .push(function (data) {\n        data = JSON.parse(data.target.responseText);\n        if (data.mimeType === \"application/vnd.google-apps.folder\") {\n          throw new jIO.util.jIOError(\"cannot put attachments to folder\", 400);\n        }\n        return data;\n      }, function (error) {handleError(error, id); });\n  }\n\n  GdriveStorage.prototype.putAttachment = function (id, name, blob) {\n    checkName(name);\n    return sendData(id, blob, this._access_token);\n  };\n\n  GdriveStorage.prototype.remove = function (id) {\n    var that  = this;\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          type: that._trashing ? \"POST\" : \"DELETE\",\n          url: remove_template.expand({\n            id : id,\n            access_token : that._access_token,\n            trash : that._trashing ? \"trash\" : []\n          })\n        });\n      })\n      .push(undefined, function (error) {handleError(error, id); });\n  };\n\n  function getData(id, attach, token) {\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          type: \"GET\",\n          dataType: attach ? \"blob\" : \"json\",\n          url: get_template.expand({\n            id: id,\n            alt: attach ? \"media\" : [],\n            access_token: token\n          }),\n          headers: {\n            \"Authorization\" : \"Bearer \" + token\n          }\n        });\n      })\n      .push(function (evt) {\n        return evt.target.response ||\n          (attach ? new Blob([evt.target.responseText],\n                             {\"type\" :\n                              evt.target.responseHeaders[\"Content-Type\"]}) :\n              JSON.parse(evt.target.responseText));\n      }, function (error) {handleError(error, id); });\n  }\n\n  GdriveStorage.prototype.get = function (id) {\n    return getData(id, false, this._access_token);\n  };\n\n  GdriveStorage.prototype.getAttachment = function (id, name) {\n    checkName(name);\n    return getData(id, true, this._access_token);\n  };\n\n  GdriveStorage.prototype.allAttachments = function (id) {\n    var token = this._access_token;\n\n    return new RSVP.Queue()\n      .push(function () {\n        return getData(id, false, token);\n      })\n      .push(function (data) {\n        if (data.mimeType === \"application/vnd.google-apps.folder\") {\n          return {};\n        }\n        return {\"enclosure\": {}};\n      });\n  };\n\n  jIO.addStorage('gdrive', GdriveStorage);\n\n}(jIO, Blob, RSVP, UriTemplate, JSON));\n/*\n * Copyright 2014, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*jslint nomen: true */\n/*global RSVP*/\n\n/**\n * JIO Union Storage. Type = 'union'.\n * This provide a unified access other multiple storage.\n * New document are created in the first sub storage.\n * Document are searched in each sub storage until it is found.\n * \n *\n * Storage Description:\n *\n *     {\n *       \"type\": \"union\",\n *       \"storage_list\": [\n *         sub_storage_description_1,\n *         sub_storage_description_2,\n *\n *         sub_storage_description_X,\n *       ]\n *     }\n *\n * @class UnionStorage\n */\n\n(function (jIO, RSVP) {\n  \"use strict\";\n\n  /**\n   * The JIO UnionStorage extension\n   *\n   * @class UnionStorage\n   * @constructor\n   */\n  function UnionStorage(spec) {\n    if (!Array.isArray(spec.storage_list)) {\n      throw new jIO.util.jIOError(\"storage_list is not an Array\", 400);\n    }\n    var i;\n    this._storage_list = [];\n    for (i = 0; i < spec.storage_list.length; i += 1) {\n      this._storage_list.push(jIO.createJIO(spec.storage_list[i]));\n    }\n  }\n\n  UnionStorage.prototype._getWithStorageIndex = function () {\n    var i,\n      index = 0,\n      context = this,\n      arg = arguments,\n      result = this._storage_list[0].get.apply(this._storage_list[0], arg);\n\n    function handle404(j) {\n      result\n        .push(undefined, function (error) {\n          if ((error instanceof jIO.util.jIOError) &&\n              (error.status_code === 404)) {\n            return context._storage_list[j].get.apply(context._storage_list[j],\n                                                      arg)\n              .push(function (doc) {\n                index = j;\n                return doc;\n              });\n          }\n          throw error;\n        });\n    }\n\n    for (i = 1; i < this._storage_list.length; i += 1) {\n      handle404(i);\n    }\n    return result\n      .push(function (doc) {\n        return [index, doc];\n      });\n  };\n\n  /*\n   * Get a document\n   * Try on each substorage on after the other\n   */\n  UnionStorage.prototype.get = function () {\n    return this._getWithStorageIndex.apply(this, arguments)\n      .push(function (result) {\n        return result[1];\n      });\n  };\n\n  /*\n   * Get attachments list\n   * Try on each substorage on after the other\n   */\n  UnionStorage.prototype.allAttachments = function () {\n    var argument_list = arguments,\n      context = this;\n    return this._getWithStorageIndex.apply(this, arguments)\n      .push(function (result) {\n        var sub_storage = context._storage_list[result[0]];\n        return sub_storage.allAttachments.apply(sub_storage, argument_list);\n      });\n  };\n\n  /*\n   * Post a document\n   * Simply store on the first substorage\n   */\n  UnionStorage.prototype.post = function () {\n    return this._storage_list[0].post.apply(this._storage_list[0], arguments);\n  };\n\n  /*\n   * Put a document\n   * Search the document location, and modify it in its storage.\n   */\n  UnionStorage.prototype.put = function () {\n    var arg = arguments,\n      context = this;\n    return this._getWithStorageIndex(arg[0])\n      .push(undefined, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          // Document does not exist, create in first substorage\n          return [0];\n        }\n        throw error;\n      })\n      .push(function (result) {\n        // Storage found, modify in it directly\n        var sub_storage = context._storage_list[result[0]];\n        return sub_storage.put.apply(sub_storage, arg);\n      });\n  };\n\n  /*\n   * Remove a document\n   * Search the document location, and remove it from its storage.\n   */\n  UnionStorage.prototype.remove = function () {\n    var arg = arguments,\n      context = this;\n    return this._getWithStorageIndex(arg[0])\n      .push(function (result) {\n        // Storage found, remove from it directly\n        var sub_storage = context._storage_list[result[0]];\n        return sub_storage.remove.apply(sub_storage, arg);\n      });\n  };\n\n  UnionStorage.prototype.buildQuery = function () {\n    var promise_list = [],\n      i,\n      id_dict = {},\n      len = this._storage_list.length,\n      sub_storage;\n    for (i = 0; i < len; i += 1) {\n      sub_storage = this._storage_list[i];\n      promise_list.push(sub_storage.buildQuery.apply(sub_storage, arguments));\n    }\n    return new RSVP.Queue()\n      .push(function () {\n        return RSVP.all(promise_list);\n      })\n      .push(function (result_list) {\n        var result = [],\n          sub_result,\n          sub_result_len,\n          j;\n        len = result_list.length;\n        for (i = 0; i < len; i += 1) {\n          sub_result = result_list[i];\n          sub_result_len = sub_result.length;\n          for (j = 0; j < sub_result_len; j += 1) {\n            if (!id_dict.hasOwnProperty(sub_result[j].id)) {\n              id_dict[sub_result[j].id] = null;\n              result.push(sub_result[j]);\n            }\n          }\n        }\n        return result;\n      });\n  };\n\n  UnionStorage.prototype.hasCapacity = function (name) {\n    var i,\n      len,\n      result,\n      sub_storage;\n    if ((name === \"list\") ||\n            (name === \"query\") ||\n            (name === \"select\")) {\n      result = true;\n      len = this._storage_list.length;\n      for (i = 0; i < len; i += 1) {\n        sub_storage = this._storage_list[i];\n        result = result && sub_storage.hasCapacity(name);\n      }\n      return result;\n    }\n    return false;\n  };\n\n  UnionStorage.prototype.repair = function () {\n    var i,\n      promise_list = [];\n    for (i = 0; i < this._storage_list.length; i += 1) {\n      promise_list.push(this._storage_list[i].repair.apply(\n        this._storage_list[i],\n        arguments\n      ));\n    }\n    return RSVP.all(promise_list);\n  };\n\n  UnionStorage.prototype.getAttachment = function () {\n    var argument_list = arguments,\n      context = this;\n    return this._getWithStorageIndex.apply(this, arguments)\n      .push(function (result) {\n        var sub_storage = context._storage_list[result[0]];\n        return sub_storage.getAttachment.apply(sub_storage, argument_list);\n      });\n  };\n\n  UnionStorage.prototype.putAttachment = function () {\n    var argument_list = arguments,\n      context = this;\n    return this._getWithStorageIndex.apply(this, arguments)\n      .push(function (result) {\n        var sub_storage = context._storage_list[result[0]];\n        return sub_storage.putAttachment.apply(sub_storage, argument_list);\n      });\n  };\n\n  UnionStorage.prototype.removeAttachment = function () {\n    var argument_list = arguments,\n      context = this;\n    return this._getWithStorageIndex.apply(this, arguments)\n      .push(function (result) {\n        var sub_storage = context._storage_list[result[0]];\n        return sub_storage.removeAttachment.apply(sub_storage, argument_list);\n      });\n  };\n\n  jIO.addStorage('union', UnionStorage);\n\n}(jIO, RSVP));\n/*\n * Copyright 2013, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n// JIO ERP5 Storage Description :\n// {\n//   type: \"erp5\"\n//   url: {string}\n// }\n\n/*jslint nomen: true, unparam: true */\n/*global jIO, UriTemplate, FormData, RSVP, URI, Blob,\n         SimpleQuery, ComplexQuery*/\n\n(function (jIO, UriTemplate, FormData, RSVP, URI, Blob,\n           SimpleQuery, ComplexQuery) {\n  \"use strict\";\n\n  function ajax(storage, options) {\n    if (options === undefined) {\n      options = {};\n    }\n    if (options.xhrFields === undefined) {\n      options.xhrFields = {};\n    }\n    if (storage._access_token !== undefined) {\n      if (options.headers === undefined) {\n        options.headers = {};\n      }\n      options.headers['X-ACCESS-TOKEN'] = storage._access_token;\n      options.xhrFields.withCredentials = false;\n    } else {\n      options.xhrFields.withCredentials = true;\n    }\n\n    return jIO.util.ajax(options);\n  }\n\n  function getSiteDocument(storage) {\n    return new RSVP.Queue()\n      .push(function () {\n        return ajax(storage, {\n          \"type\": \"GET\",\n          \"url\": storage._url\n        });\n      })\n      .push(function (event) {\n        return JSON.parse(event.target.responseText);\n      });\n  }\n\n  function getDocumentAndHateoas(storage, id, options) {\n    if (options === undefined) {\n      options = {};\n    }\n    return getSiteDocument(storage)\n      .push(function (site_hal) {\n        // XXX need to get modified metadata\n        return new RSVP.Queue()\n          .push(function () {\n            return ajax(storage, {\n              \"type\": \"GET\",\n              \"url\": UriTemplate.parse(site_hal._links.traverse.href)\n                                .expand({\n                  relative_url: id,\n                  view: options._view\n                })\n            });\n          })\n          .push(undefined, function (error) {\n            if ((error.target !== undefined) &&\n                (error.target.status === 404)) {\n              throw new jIO.util.jIOError(\"Cannot find document: \" + id, 404);\n            }\n            throw error;\n          });\n      });\n  }\n\n  var allowed_field_dict = {\n    \"StringField\": null,\n    \"EmailField\": null,\n    \"IntegerField\": null,\n    \"FloatField\": null,\n    \"TextAreaField\": null\n  };\n\n  function extractPropertyFromFormJSON(json) {\n    var form = json._embedded._view,\n      converted_json = {\n        portal_type: new URI(json._links.type.href).segment(2)\n                                                   .replace(\"portal_types/\", \"\")\n      },\n      form_data_json = {},\n      field,\n      key,\n      prefix_length,\n      result;\n\n    if (json._links.hasOwnProperty('parent')) {\n      converted_json.parent_relative_url =\n        new URI(json._links.parent.href).segment(2);\n    }\n\n    form_data_json.form_id = {\n      \"key\": [form.form_id.key],\n      \"default\": form.form_id[\"default\"]\n    };\n    // XXX How to store datetime\n    for (key in form) {\n      if (form.hasOwnProperty(key)) {\n        field = form[key];\n        prefix_length = 0;\n        if (key.indexOf('my_') === 0 && field.editable) {\n          prefix_length = 3;\n        }\n        if (key.indexOf('your_') === 0) {\n          prefix_length = 5;\n        }\n        if ((prefix_length !== 0) &&\n            (allowed_field_dict.hasOwnProperty(field.type))) {\n          form_data_json[key.substring(prefix_length)] = {\n            \"default\": field[\"default\"],\n            \"key\": field.key\n          };\n          converted_json[key.substring(prefix_length)] = field[\"default\"];\n        }\n      }\n    }\n\n    result = {\n      data: converted_json,\n      form_data: form_data_json\n    };\n    if (form.hasOwnProperty('_actions') &&\n        form._actions.hasOwnProperty('put')) {\n      result.action_href = form._actions.put.href;\n    }\n    return result;\n  }\n\n  function extractPropertyFromForm(context, id) {\n    return context.getAttachment(id, \"view\")\n      .push(function (blob) {\n        return jIO.util.readBlobAsText(blob);\n      })\n      .push(function (evt) {\n        return JSON.parse(evt.target.result);\n      })\n      .push(function (json) {\n        return extractPropertyFromFormJSON(json);\n      });\n  }\n\n  // XXX docstring\n  function ERP5Storage(spec) {\n    if (typeof spec.url !== \"string\" || !spec.url) {\n      throw new TypeError(\"ERP5 'url' must be a string \" +\n                          \"which contains more than one character.\");\n    }\n    this._url = spec.url;\n    this._default_view_reference = spec.default_view_reference;\n    if (spec.hasOwnProperty('access_token')) {\n      this._access_token = spec.access_token;\n    }\n  }\n\n  function convertJSONToGet(json) {\n    var key,\n      result = json.data;\n    // Remove all ERP5 hateoas links / convert them into jIO ID\n    for (key in result) {\n      if (result.hasOwnProperty(key)) {\n        if (!result[key]) {\n          delete result[key];\n        }\n      }\n    }\n    return result;\n  }\n\n  ERP5Storage.prototype.get = function (id) {\n    return extractPropertyFromForm(this, id)\n      .push(function (result) {\n        return convertJSONToGet(result);\n      });\n  };\n\n  ERP5Storage.prototype.post = function (data) {\n    var context = this,\n      new_id;\n\n    return getSiteDocument(this)\n      .push(function (site_hal) {\n        var form_data = new FormData();\n        form_data.append(\"portal_type\", data.portal_type);\n        form_data.append(\"parent_relative_url\", data.parent_relative_url);\n        return ajax(context, {\n          type: \"POST\",\n          url: site_hal._actions.add.href,\n          data: form_data\n        });\n      })\n      .push(function (evt) {\n        var location = evt.target.getResponseHeader(\"X-Location\"),\n          uri = new URI(location);\n        new_id = uri.segment(2);\n        return context.put(new_id, data);\n      })\n      .push(function () {\n        return new_id;\n      });\n  };\n\n  ERP5Storage.prototype.put = function (id, data) {\n    var context = this;\n\n    return extractPropertyFromForm(context, id)\n      .push(function (result) {\n        var key,\n          json = result.form_data,\n          form_data = {};\n        form_data[json.form_id.key] = json.form_id[\"default\"];\n\n        // XXX How to store datetime:!!!!!\n        for (key in data) {\n          if (data.hasOwnProperty(key)) {\n            if (key === \"form_id\") {\n              throw new jIO.util.jIOError(\n                \"ERP5: forbidden property: \" + key,\n                400\n              );\n            }\n            if ((key !== \"portal_type\") && (key !== \"parent_relative_url\")) {\n              if (!json.hasOwnProperty(key)) {\n                throw new jIO.util.jIOError(\n                  \"ERP5: can not store property: \" + key,\n                  400\n                );\n              }\n              form_data[json[key].key] = data[key];\n            }\n          }\n        }\n        if (!result.hasOwnProperty('action_href')) {\n          throw new jIO.util.jIOError(\n            \"ERP5: can not modify document: \" + id,\n            403\n          );\n        }\n        return context.putAttachment(\n          id,\n          result.action_href,\n          new Blob([JSON.stringify(form_data)], {type: \"application/json\"})\n        );\n      });\n  };\n\n  ERP5Storage.prototype.allAttachments = function (id) {\n    var context = this;\n    return getDocumentAndHateoas(this, id)\n      .push(function () {\n        if (context._default_view_reference === undefined) {\n          return {\n            links: {}\n          };\n        }\n        return {\n          view: {},\n          links: {}\n        };\n      });\n  };\n\n  ERP5Storage.prototype.getAttachment = function (id, action, options) {\n    var storage = this;\n    if (options === undefined) {\n      options = {};\n    }\n    if (action === \"view\") {\n      if (this._default_view_reference === undefined) {\n        throw new jIO.util.jIOError(\n          \"Cannot find attachment view for: \" + id,\n          404\n        );\n      }\n      return getDocumentAndHateoas(this, id,\n                                   {\"_view\": this._default_view_reference})\n        .push(function (response) {\n          var result = JSON.parse(response.target.responseText);\n          // Remove all ERP5 hateoas links / convert them into jIO ID\n\n          // XXX Change default action to an jio urn with attachment name inside\n          // if Base_edit, do put URN\n          // if others, do post URN (ie, unique new attachment name)\n          // XXX Except this attachment name should be generated when\n          return new Blob(\n            [JSON.stringify(result)],\n            {\"type\": 'application/hal+json'}\n          );\n        });\n    }\n    if (action === \"links\") {\n      return getDocumentAndHateoas(this, id)\n        .push(function (response) {\n          return new Blob(\n            [JSON.stringify(JSON.parse(response.target.responseText))],\n            {\"type\": 'application/hal+json'}\n          );\n        });\n    }\n    if (action.indexOf(this._url) === 0) {\n      return new RSVP.Queue()\n        .push(function () {\n          var start,\n            end,\n            range,\n            request_options = {\n              \"type\": \"GET\",\n              \"dataType\": \"blob\",\n              \"url\": action\n            };\n          if (options.start !== undefined ||  options.end !== undefined) {\n            start = options.start || 0;\n            end = options.end;\n            if (end !== undefined && end < 0) {\n              throw new jIO.util.jIOError(\"end must be positive\",\n                                          400);\n            }\n            if (start < 0) {\n              range = \"bytes=\" + start;\n            } else if (end === undefined) {\n              range = \"bytes=\" + start + \"-\";\n            } else {\n              if (start > end) {\n                throw new jIO.util.jIOError(\"start is greater than end\",\n                                            400);\n              }\n              range = \"bytes=\" + start + \"-\" + end;\n            }\n            request_options.headers = {Range: range};\n          }\n          return ajax(storage, request_options);\n        })\n        .push(function (evt) {\n          if (evt.target.response === undefined) {\n            return new Blob(\n              [evt.target.responseText],\n              {\"type\": evt.target.getResponseHeader(\"Content-Type\")}\n            );\n          }\n          return evt.target.response;\n        }, function (error) {\n          if ((error.target !== undefined) &&\n              (error.target.status === 404)) {\n            throw new jIO.util.jIOError(\"Cannot find attachment: \" + action,\n                                        404);\n          }\n          throw error;\n        });\n    }\n    throw new jIO.util.jIOError(\"ERP5: not support get attachment: \" + action,\n                                400);\n  };\n\n  ERP5Storage.prototype.putAttachment = function (id, name, blob) {\n    var storage = this;\n    // Assert we use a callable on a document from the ERP5 site\n    if (name.indexOf(this._url) !== 0) {\n      throw new jIO.util.jIOError(\"Can not store outside ERP5: \" +\n                                  name, 400);\n    }\n\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.readBlobAsText(blob);\n      })\n      .push(function (evt) {\n        var form_data = JSON.parse(evt.target.result),\n          data = new FormData(),\n          array,\n          i,\n          key,\n          value;\n        for (key in form_data) {\n          if (form_data.hasOwnProperty(key)) {\n            if (Array.isArray(form_data[key])) {\n              array = form_data[key];\n            } else {\n              array = [form_data[key]];\n            }\n            for (i = 0; i < array.length; i += 1) {\n              value = array[i];\n              if (typeof value === \"object\") {\n                data.append(key, jIO.util.dataURItoBlob(value.url),\n                            value.file_name);\n              } else {\n                data.append(key, value);\n              }\n            }\n          }\n        }\n        return ajax(storage, {\n          \"type\": \"POST\",\n          \"url\": name,\n          \"data\": data,\n          \"dataType\": \"blob\"\n        });\n      });\n  };\n\n  ERP5Storage.prototype.hasCapacity = function (name) {\n    return ((name === \"list\") || (name === \"query\") ||\n            (name === \"select\") || (name === \"limit\") ||\n            (name === \"sort\") || (name === \"group\"));\n  };\n\n  function isSingleLocalRoles(parsed_query) {\n    if ((parsed_query instanceof SimpleQuery) &&\n        (parsed_query.operator === undefined) &&\n        (parsed_query.key === 'local_roles')) {\n      // local_roles:\"Assignee\"\n      return parsed_query.value;\n    }\n  }\n\n  function isSingleDomain(parsed_query) {\n    if ((parsed_query instanceof SimpleQuery) &&\n        (parsed_query.operator === undefined) &&\n        (parsed_query.key !== undefined) &&\n        (parsed_query.key.indexOf('selection_domain_') === 0)) {\n      // domain_region:\"europe/france\"\n      var result = {};\n      result[parsed_query.key.slice('selection_domain_'.length)] =\n        parsed_query.value;\n      return result;\n    }\n  }\n\n  function isMultipleLocalRoles(parsed_query) {\n    var i,\n      sub_query,\n      is_multiple = true,\n      local_role_list = [];\n    if ((parsed_query instanceof ComplexQuery) &&\n        (parsed_query.operator === 'OR')) {\n\n      for (i = 0; i < parsed_query.query_list.length; i += 1) {\n        sub_query = parsed_query.query_list[i];\n        if ((sub_query instanceof SimpleQuery) &&\n            (sub_query.key !== undefined) &&\n            (sub_query.key === 'local_roles')) {\n          local_role_list.push(sub_query.value);\n        } else {\n          is_multiple = false;\n        }\n      }\n      if (is_multiple) {\n        // local_roles:\"Assignee\" OR local_roles:\"Assignor\"\n        return local_role_list;\n      }\n    }\n  }\n\n  ERP5Storage.prototype.buildQuery = function (options) {\n    var storage = this;\n//     if (typeof options.query !== \"string\") {\n//       options.query = (options.query ?\n//                        jIO.Query.objectToSearchText(options.query) :\n//                        undefined);\n//     }\n    return getSiteDocument(this)\n      .push(function (site_hal) {\n        var query = options.query,\n          i,\n          key,\n          parsed_query,\n          sub_query,\n          result_list,\n          local_roles,\n          local_role_found = false,\n          selection_domain_found = false,\n          selection_domain,\n          sort_list = [],\n          group_list = [];\n        if (options.query) {\n          parsed_query = jIO.QueryFactory.create(options.query);\n          result_list = isSingleLocalRoles(parsed_query);\n          if (result_list) {\n            query = undefined;\n            local_roles = result_list;\n          } else {\n            result_list = isSingleDomain(parsed_query);\n            if (result_list) {\n              query = undefined;\n              selection_domain = result_list;\n            } else {\n\n              result_list = isMultipleLocalRoles(parsed_query);\n              if (result_list) {\n                query = undefined;\n                local_roles = result_list;\n              } else if ((parsed_query instanceof ComplexQuery) &&\n                         (parsed_query.operator === 'AND')) {\n\n                // portal_type:\"Person\" AND local_roles:\"Assignee\"\n                // AND selection_domain_region:\"europe/france\"\n                for (i = 0; i < parsed_query.query_list.length; i += 1) {\n                  sub_query = parsed_query.query_list[i];\n\n                  if (!local_role_found) {\n                    result_list = isSingleLocalRoles(sub_query);\n                    if (result_list) {\n                      local_roles = result_list;\n                      parsed_query.query_list.splice(i, 1);\n                      query = jIO.Query.objectToSearchText(parsed_query);\n                      local_role_found = true;\n                      sub_query = parsed_query.query_list[i];\n                    } else {\n                      result_list = isMultipleLocalRoles(sub_query);\n                      if (result_list) {\n                        local_roles = result_list;\n                        parsed_query.query_list.splice(i, 1);\n                        query = jIO.Query.objectToSearchText(parsed_query);\n                        local_role_found = true;\n                        sub_query = parsed_query.query_list[i];\n                      }\n                    }\n                  }\n\n                  result_list = isSingleDomain(sub_query);\n                  if (result_list) {\n                    selection_domain_found = false;\n                    for (key in result_list) {\n                      if (result_list.hasOwnProperty(key) &&\n                          ((selection_domain === undefined) ||\n                           (!selection_domain.hasOwnProperty(key)))) {\n                        if (selection_domain === undefined) {\n                          selection_domain = {};\n                        }\n                        selection_domain[key] = result_list[key];\n                        selection_domain_found = true;\n                      }\n                    }\n                    if (selection_domain_found === true) {\n                      parsed_query.query_list.splice(i, 1);\n                      query = jIO.Query.objectToSearchText(parsed_query);\n                      i -= 1;\n                    }\n                  }\n\n                }\n              }\n            }\n          }\n        }\n\n        if (options.sort_on) {\n          for (i = 0; i < options.sort_on.length; i += 1) {\n            sort_list.push(JSON.stringify(options.sort_on[i]));\n          }\n        }\n\n        if (options.group_by) {\n          group_list = options.group_by;\n        }\n\n        if (selection_domain) {\n          selection_domain = JSON.stringify(selection_domain);\n        }\n\n        return ajax(storage, {\n          \"type\": \"GET\",\n          \"url\": UriTemplate.parse(site_hal._links.raw_search.href)\n                            .expand({\n              query: query,\n              // XXX Force erp5 to return embedded document\n              select_list: options.select_list || [\"title\", \"reference\"],\n              limit: options.limit,\n              sort_on: sort_list,\n              group_by: group_list,\n              local_roles: local_roles,\n              selection_domain: selection_domain\n            })\n        });\n      })\n      .push(function (response) {\n        return JSON.parse(response.target.responseText);\n      })\n      .push(function (catalog_json) {\n        var data = catalog_json._embedded.contents,\n          count = data.length,\n          i,\n          uri,\n          item,\n          result = [];\n        for (i = 0; i < count; i += 1) {\n          item = data[i];\n          uri = new URI(item._links.self.href);\n          delete item._links;\n          result.push({\n            id: uri.segment(2),\n            value: item\n          });\n        }\n        return result;\n      });\n  };\n\n  jIO.addStorage(\"erp5\", ERP5Storage);\n\n}(jIO, UriTemplate, FormData, RSVP, URI, Blob,\n  SimpleQuery, ComplexQuery));\n/*\n * Copyright 2014, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*jslint nomen: true*/\n/*global RSVP, jiodate*/\n(function (jIO, RSVP, jiodate) {\n  \"use strict\";\n\n  function dateType(str) {\n    return jiodate.JIODate(new Date(str).toISOString());\n  }\n\n  function initKeySchema(storage, spec) {\n    var property;\n    for (property in spec.schema) {\n      if (spec.schema.hasOwnProperty(property)) {\n        if (spec.schema[property].type === \"string\" &&\n            spec.schema[property].format === \"date-time\") {\n          storage._key_schema.key_set[property] = {\n            read_from: property,\n            cast_to: \"dateType\"\n          };\n          if (storage._key_schema.cast_lookup.dateType === undefined) {\n            storage._key_schema.cast_lookup.dateType = dateType;\n          }\n        } else {\n          throw new jIO.util.jIOError(\n            \"Wrong schema for property: \" + property,\n            400\n          );\n        }\n      }\n    }\n  }\n\n  /**\n   * The jIO QueryStorage extension\n   *\n   * @class QueryStorage\n   * @constructor\n   */\n  function QueryStorage(spec) {\n    this._sub_storage = jIO.createJIO(spec.sub_storage);\n    this._key_schema = {key_set: {}, cast_lookup: {}};\n    initKeySchema(this, spec);\n  }\n\n  QueryStorage.prototype.get = function () {\n    return this._sub_storage.get.apply(this._sub_storage, arguments);\n  };\n  QueryStorage.prototype.allAttachments = function () {\n    return this._sub_storage.allAttachments.apply(this._sub_storage, arguments);\n  };\n  QueryStorage.prototype.post = function () {\n    return this._sub_storage.post.apply(this._sub_storage, arguments);\n  };\n  QueryStorage.prototype.put = function () {\n    return this._sub_storage.put.apply(this._sub_storage, arguments);\n  };\n  QueryStorage.prototype.remove = function () {\n    return this._sub_storage.remove.apply(this._sub_storage, arguments);\n  };\n  QueryStorage.prototype.getAttachment = function () {\n    return this._sub_storage.getAttachment.apply(this._sub_storage, arguments);\n  };\n  QueryStorage.prototype.putAttachment = function () {\n    return this._sub_storage.putAttachment.apply(this._sub_storage, arguments);\n  };\n  QueryStorage.prototype.removeAttachment = function () {\n    return this._sub_storage.removeAttachment.apply(this._sub_storage,\n                                                    arguments);\n  };\n  QueryStorage.prototype.repair = function () {\n    return this._sub_storage.repair.apply(this._sub_storage, arguments);\n  };\n\n  QueryStorage.prototype.hasCapacity = function (name) {\n    var this_storage_capacity_list = [\"limit\",\n                                      \"sort\",\n                                      \"select\",\n                                      \"query\"];\n\n    if (this_storage_capacity_list.indexOf(name) !== -1) {\n      return true;\n    }\n    if (name === \"list\") {\n      return this._sub_storage.hasCapacity(name);\n    }\n    return false;\n  };\n  QueryStorage.prototype.buildQuery = function (options) {\n    var substorage = this._sub_storage,\n      context = this,\n      sub_options = {},\n      is_manual_query_needed = false,\n      is_manual_include_needed = false;\n\n    if (substorage.hasCapacity(\"list\")) {\n\n      // Can substorage handle the queries if needed?\n      try {\n        if (((options.query === undefined) ||\n             (substorage.hasCapacity(\"query\"))) &&\n            ((options.sort_on === undefined) ||\n             (substorage.hasCapacity(\"sort\"))) &&\n            ((options.select_list === undefined) ||\n             (substorage.hasCapacity(\"select\"))) &&\n            ((options.limit === undefined) ||\n             (substorage.hasCapacity(\"limit\")))) {\n          sub_options.query = options.query;\n          sub_options.sort_on = options.sort_on;\n          sub_options.select_list = options.select_list;\n          sub_options.limit = options.limit;\n        }\n      } catch (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 501)) {\n          is_manual_query_needed = true;\n        } else {\n          throw error;\n        }\n      }\n\n      // Can substorage include the docs if needed?\n      try {\n        if ((is_manual_query_needed ||\n            (options.include_docs === true)) &&\n            (substorage.hasCapacity(\"include\"))) {\n          sub_options.include_docs = true;\n        }\n      } catch (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 501)) {\n          is_manual_include_needed = true;\n        } else {\n          throw error;\n        }\n      }\n\n      return substorage.buildQuery(sub_options)\n\n        // Include docs if needed\n        .push(function (result) {\n          var include_query_list = [result],\n            len,\n            i;\n\n          function safeGet(j) {\n            var id = result[j].id;\n            return substorage.get(id)\n              .push(function (doc) {\n                // XXX Can delete user data!\n                doc._id = id;\n                return doc;\n              }, function (error) {\n                // Document may have been dropped after listing\n                if ((error instanceof jIO.util.jIOError) &&\n                    (error.status_code === 404)) {\n                  return;\n                }\n                throw error;\n              });\n          }\n\n          if (is_manual_include_needed) {\n            len = result.length;\n            for (i = 0; i < len; i += 1) {\n              include_query_list.push(safeGet(i));\n            }\n            result = RSVP.all(include_query_list);\n          }\n          return result;\n        })\n        .push(function (result) {\n          var original_result,\n            len,\n            i;\n          if (is_manual_include_needed) {\n            original_result = result[0];\n            len = original_result.length;\n            for (i = 0; i < len; i += 1) {\n              original_result[i].doc = result[i + 1];\n            }\n            result = original_result;\n          }\n          return result;\n\n        })\n\n        // Manual query if needed\n        .push(function (result) {\n          var data_rows = [],\n            len,\n            i;\n          if (is_manual_query_needed) {\n            len = result.length;\n            for (i = 0; i < len; i += 1) {\n              result[i].doc.__id = result[i].id;\n              data_rows.push(result[i].doc);\n            }\n            if (options.select_list) {\n              options.select_list.push(\"__id\");\n            }\n            result = jIO.QueryFactory.create(options.query || \"\",\n                                             context._key_schema).\n              exec(data_rows, options);\n          }\n          return result;\n        })\n\n        // reconstruct filtered rows, preserving the order from docs\n        .push(function (result) {\n          var new_result = [],\n            element,\n            len,\n            i;\n          if (is_manual_query_needed) {\n            len = result.length;\n            for (i = 0; i < len; i += 1) {\n              element = {\n                id: result[i].__id,\n                value: options.select_list ? result[i] : {},\n                doc: {}\n              };\n              if (options.select_list) {\n                // Does not work if user manually request __id\n                delete element.value.__id;\n              }\n              if (options.include_docs) {\n                // XXX To implement\n                throw new Error(\"QueryStorage does not support include docs\");\n              }\n              new_result.push(element);\n            }\n            result = new_result;\n          }\n          return result;\n        });\n\n    }\n  };\n\n  jIO.addStorage('query', QueryStorage);\n\n}(jIO, RSVP, jiodate));\n/*\n * Copyright 2014, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*jslint nomen: true*/\n/*global RSVP, Blob*/\n(function (jIO, RSVP, Blob) {\n  \"use strict\";\n\n  /**\n   * The jIO FileSystemBridgeStorage extension\n   *\n   * @class FileSystemBridgeStorage\n   * @constructor\n   */\n  function FileSystemBridgeStorage(spec) {\n    this._sub_storage = jIO.createJIO(spec.sub_storage);\n  }\n  var DOCUMENT_EXTENSION = \".json\",\n    DOCUMENT_KEY = \"/.jio_documents/\",\n    ROOT = \"/\";\n\n  function endsWith(str, suffix) {\n    return str.indexOf(suffix, str.length - suffix.length) !== -1;\n  }\n\n  FileSystemBridgeStorage.prototype.get = function (id) {\n    var context = this;\n    return new RSVP.Queue()\n\n      // First, try to get explicit reference to the document\n\n      .push(function () {\n        // First get the document itself if it exists\n        return context._sub_storage.getAttachment(\n          DOCUMENT_KEY,\n          id + DOCUMENT_EXTENSION,\n          {format: \"json\"}\n        );\n      })\n      .push(undefined, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n\n          // Second, try to get default attachment\n          return context._sub_storage.allAttachments(ROOT)\n            .push(function (attachment_dict) {\n              if (attachment_dict.hasOwnProperty(id)) {\n                return {};\n              }\n              throw new jIO.util.jIOError(\"Cannot find document \" + id,\n                                          404);\n            });\n        }\n        throw error;\n      });\n  };\n\n  FileSystemBridgeStorage.prototype.allAttachments = function (id) {\n    var context = this;\n    return context._sub_storage.allAttachments(ROOT)\n      .push(function (attachment_dict) {\n        if (attachment_dict.hasOwnProperty(id)) {\n          return {\n            enclosure: {}\n          };\n        }\n        // Second get the document itself if it exists\n        return context._sub_storage.getAttachment(\n          DOCUMENT_KEY,\n          id + DOCUMENT_EXTENSION\n        )\n          .push(function () {\n            return {};\n          }, function (error) {\n            if ((error instanceof jIO.util.jIOError) &&\n                (error.status_code === 404)) {\n              throw new jIO.util.jIOError(\"Cannot find document \" + id,\n                                          404);\n            }\n            throw error;\n          });\n      });\n\n  };\n\n  FileSystemBridgeStorage.prototype.put = function (doc_id, param) {\n    var context = this;\n    // XXX Handle conflict!\n\n    return context._sub_storage.putAttachment(\n      DOCUMENT_KEY,\n      doc_id + DOCUMENT_EXTENSION,\n      new Blob([JSON.stringify(param)], {type: \"application/json\"})\n    )\n      .push(undefined, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          return context._sub_storage.put(DOCUMENT_KEY, {})\n            .push(function () {\n              return context._sub_storage.putAttachment(\n                DOCUMENT_KEY,\n                doc_id + DOCUMENT_EXTENSION,\n                new Blob([JSON.stringify(param)],\n                         {type: \"application/json\"})\n              );\n            });\n        }\n        throw error;\n      })\n      .push(function () {\n        return doc_id;\n      });\n\n  };\n\n  FileSystemBridgeStorage.prototype.remove = function (doc_id) {\n    var context = this,\n      got_error = false;\n    return new RSVP.Queue()\n\n      // First, try to remove enclosure\n      .push(function () {\n        return context._sub_storage.removeAttachment(\n          ROOT,\n          doc_id\n        );\n      })\n\n      .push(undefined, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          got_error = true;\n          return;\n        }\n        throw error;\n      })\n\n      // Second, try to remove explicit doc\n      .push(function () {\n        return context._sub_storage.removeAttachment(\n          DOCUMENT_KEY,\n          doc_id + DOCUMENT_EXTENSION\n        );\n      })\n\n      .push(undefined, function (error) {\n        if ((!got_error) && (error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          return doc_id;\n        }\n        throw error;\n      });\n\n  };\n\n  FileSystemBridgeStorage.prototype.hasCapacity = function (capacity) {\n    return (capacity === \"list\");\n  };\n\n  FileSystemBridgeStorage.prototype.buildQuery = function () {\n    var result_dict = {},\n      context = this;\n    return new RSVP.Queue()\n\n      // First, get list of explicit documents\n\n      .push(function () {\n        return context._sub_storage.allAttachments(DOCUMENT_KEY);\n      })\n      .push(function (result) {\n        var key;\n        for (key in result) {\n          if (result.hasOwnProperty(key)) {\n            if (endsWith(key, DOCUMENT_EXTENSION)) {\n              result_dict[key.substring(\n                0,\n                key.length - DOCUMENT_EXTENSION.length\n              )] = null;\n            }\n          }\n        }\n      }, function (error) {\n        if ((error instanceof jIO.util.jIOError) &&\n            (error.status_code === 404)) {\n          return;\n        }\n        throw error;\n      })\n\n      // Second, get list of enclosure\n\n      .push(function () {\n        return context._sub_storage.allAttachments(ROOT);\n      })\n      .push(function (result) {\n        var key;\n        for (key in result) {\n          if (result.hasOwnProperty(key)) {\n            result_dict[key] = null;\n          }\n        }\n      })\n\n      // Finally, build the result\n\n      .push(function () {\n        var result = [],\n          key;\n        for (key in result_dict) {\n          if (result_dict.hasOwnProperty(key)) {\n            result.push({\n              id: key,\n              value: {}\n            });\n          }\n        }\n        return result;\n      });\n\n  };\n\n  FileSystemBridgeStorage.prototype.getAttachment = function (id, name) {\n    if (name !== \"enclosure\") {\n      throw new jIO.util.jIOError(\"Only support 'enclosure' attachment\",\n                                  400);\n    }\n\n    return this._sub_storage.getAttachment(ROOT, id);\n  };\n\n  FileSystemBridgeStorage.prototype.putAttachment = function (id, name, blob) {\n    if (name !== \"enclosure\") {\n      throw new jIO.util.jIOError(\"Only support 'enclosure' attachment\",\n                                  400);\n    }\n\n    return this._sub_storage.putAttachment(\n      ROOT,\n      id,\n      blob\n    );\n  };\n\n  FileSystemBridgeStorage.prototype.removeAttachment = function (id, name) {\n    if (name !== \"enclosure\") {\n      throw new jIO.util.jIOError(\"Only support 'enclosure' attachment\",\n                                  400);\n    }\n\n    return this._sub_storage.removeAttachment(ROOT, id);\n  };\n\n  FileSystemBridgeStorage.prototype.repair = function () {\n    return this._sub_storage.repair.apply(this._sub_storage, arguments);\n  };\n\n  jIO.addStorage('drivetojiomapping', FileSystemBridgeStorage);\n\n}(jIO, RSVP, Blob));\n/*\n * Copyright 2015, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*jslint nomen: true*/\n/*global Blob, RSVP, unescape, escape*/\n(function (jIO, Blob, RSVP, unescape, escape) {\n  \"use strict\";\n  /**\n   * The jIO DocumentStorage extension\n   *\n   * @class DocumentStorage\n   * @constructor\n   */\n  function DocumentStorage(spec) {\n    this._sub_storage = jIO.createJIO(spec.sub_storage);\n    this._document_id = spec.document_id;\n    this._repair_attachment = spec.repair_attachment || false;\n  }\n\n  var DOCUMENT_EXTENSION = \".json\",\n    DOCUMENT_REGEXP = new RegExp(\"^jio_document/([\\\\w=]+)\" +\n                                 DOCUMENT_EXTENSION + \"$\"),\n    ATTACHMENT_REGEXP = new RegExp(\"^jio_attachment/([\\\\w=]+)/([\\\\w=]+)$\"),\n    btoa = function (str) {\n      return window.btoa(unescape(encodeURIComponent(str)));\n    },\n    atob = function (str) {\n      return decodeURIComponent(escape(window.atob(str)));\n    };\n\n  function getSubAttachmentIdFromParam(id, name) {\n    if (name === undefined) {\n      return 'jio_document/' + btoa(id) + DOCUMENT_EXTENSION;\n    }\n    return 'jio_attachment/' + btoa(id) + \"/\" + btoa(name);\n  }\n\n  DocumentStorage.prototype.get = function (id) {\n    return this._sub_storage.getAttachment(\n      this._document_id,\n      getSubAttachmentIdFromParam(id),\n      {format: \"json\"}\n    );\n  };\n\n  DocumentStorage.prototype.allAttachments = function (id) {\n    return this._sub_storage.allAttachments(this._document_id)\n      .push(function (result) {\n        var attachments = {},\n          exec,\n          key;\n        for (key in result) {\n          if (result.hasOwnProperty(key)) {\n            if (ATTACHMENT_REGEXP.test(key)) {\n              exec = ATTACHMENT_REGEXP.exec(key);\n              try {\n                if (atob(exec[1]) === id) {\n                  attachments[atob(exec[2])] = {};\n                }\n              } catch (ignore) {\n                // Check if unable to decode base64 data\n              }\n            }\n          }\n        }\n        return attachments;\n      });\n  };\n\n  DocumentStorage.prototype.put = function (doc_id, param) {\n    return this._sub_storage.putAttachment(\n      this._document_id,\n      getSubAttachmentIdFromParam(doc_id),\n      new Blob([JSON.stringify(param)], {type: \"application/json\"})\n    )\n      .push(function () {\n        return doc_id;\n      });\n\n  };\n\n  DocumentStorage.prototype.remove = function (id) {\n    var context = this;\n    return this.allAttachments(id)\n      .push(function (result) {\n        var key,\n          promise_list = [];\n        for (key in result) {\n          if (result.hasOwnProperty(key)) {\n            promise_list.push(context.removeAttachment(id, key));\n          }\n        }\n        return RSVP.all(promise_list);\n      })\n      .push(function () {\n        return context._sub_storage.removeAttachment(\n          context._document_id,\n          getSubAttachmentIdFromParam(id)\n        );\n      })\n      .push(function () {\n        return id;\n      });\n  };\n\n  DocumentStorage.prototype.repair = function () {\n    var context = this;\n    return this._sub_storage.repair.apply(this._sub_storage, arguments)\n      .push(function (result) {\n        if (context._repair_attachment) {\n          return context._sub_storage.allAttachments(context._document_id)\n            .push(function (result_dict) {\n              var promise_list = [],\n                id_dict = {},\n                attachment_dict = {},\n                id,\n                attachment,\n                exec,\n                key;\n              for (key in result_dict) {\n                if (result_dict.hasOwnProperty(key)) {\n                  id = undefined;\n                  attachment = undefined;\n                  if (DOCUMENT_REGEXP.test(key)) {\n                    try {\n                      id = atob(DOCUMENT_REGEXP.exec(key)[1]);\n                    } catch (ignore) {\n                      // Check if unable to decode base64 data\n                    }\n                    if (id !== undefined) {\n                      id_dict[id] = null;\n                    }\n                  } else if (ATTACHMENT_REGEXP.test(key)) {\n                    exec = ATTACHMENT_REGEXP.exec(key);\n                    try {\n                      id = atob(exec[1]);\n                      attachment = atob(exec[2]);\n                    } catch (ignore) {\n                      // Check if unable to decode base64 data\n                    }\n                    if (attachment !== undefined) {\n                      if (!id_dict.hasOwnProperty(id)) {\n                        if (!attachment_dict.hasOwnProperty(id)) {\n                          attachment_dict[id] = {};\n                        }\n                        attachment_dict[id][attachment] = null;\n                      }\n                    }\n                  }\n                }\n              }\n              for (id in attachment_dict) {\n                if (attachment_dict.hasOwnProperty(id)) {\n                  if (!id_dict.hasOwnProperty(id)) {\n                    for (attachment in attachment_dict[id]) {\n                      if (attachment_dict[id].hasOwnProperty(attachment)) {\n                        promise_list.push(context.removeAttachment(\n                          id,\n                          attachment\n                        ));\n                      }\n                    }\n                  }\n                }\n              }\n              return RSVP.all(promise_list);\n            });\n        }\n        return result;\n      });\n  };\n\n  DocumentStorage.prototype.hasCapacity = function (capacity) {\n    return (capacity === \"list\");\n  };\n\n  DocumentStorage.prototype.buildQuery = function () {\n    return this._sub_storage.allAttachments(this._document_id)\n      .push(function (attachment_dict) {\n        var result = [],\n          key;\n        for (key in attachment_dict) {\n          if (attachment_dict.hasOwnProperty(key)) {\n            if (DOCUMENT_REGEXP.test(key)) {\n              try {\n                result.push({\n                  id: atob(DOCUMENT_REGEXP.exec(key)[1]),\n                  value: {}\n                });\n              } catch (ignore) {\n                // Check if unable to decode base64 data\n              }\n            }\n          }\n        }\n        return result;\n      });\n  };\n\n  DocumentStorage.prototype.getAttachment = function (id, name) {\n    return this._sub_storage.getAttachment(\n      this._document_id,\n      getSubAttachmentIdFromParam(id, name)\n    );\n  };\n\n  DocumentStorage.prototype.putAttachment = function (id, name, blob) {\n    return this._sub_storage.putAttachment(\n      this._document_id,\n      getSubAttachmentIdFromParam(id, name),\n      blob\n    );\n  };\n\n  DocumentStorage.prototype.removeAttachment = function (id, name) {\n    return this._sub_storage.removeAttachment(\n      this._document_id,\n      getSubAttachmentIdFromParam(id, name)\n    );\n  };\n\n  jIO.addStorage('document', DocumentStorage);\n\n}(jIO, Blob, RSVP, unescape, escape));\n/*\n * Copyright 2017, Nexedi SA\n *\n * This program is free software: you can Use, Study, Modify and Redistribute\n * it under the terms of the GNU General Public License version 3, or (at your\n * option) any later version, as published by the Free Software Foundation.\n *\n * You can also Link and Combine this program with other software covered by\n * the terms of any of the Free Software licenses or any of the Open Source\n * Initiative approved licenses and Convey the resulting work. Corresponding\n * source of such a combination shall include the source code for all other\n * software used.\n *\n * This program is distributed WITHOUT ANY WARRANTY; without even the implied\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *\n * See COPYING file for full licensing terms.\n * See https://www.nexedi.com/licensing for rationale and options.\n */\n/*jslint nomen: true */\n/*global RSVP, UriTemplate*/\n(function (jIO, RSVP, UriTemplate) {\n  \"use strict\";\n\n  var GET_POST_URL = \"https://graph.facebook.com/v2.9/{+post_id}\" +\n      \"?fields={+fields}&access_token={+access_token}\",\n    get_post_template = UriTemplate.parse(GET_POST_URL),\n    GET_FEED_URL = \"https://graph.facebook.com/v2.9/{+user_id}/feed\" +\n        \"?fields={+fields}&limit={+limit}&since={+since}&access_token=\" +\n        \"{+access_token}\",\n    get_feed_template = UriTemplate.parse(GET_FEED_URL);\n\n  function FBStorage(spec) {\n    if (typeof spec.access_token !== 'string' || !spec.access_token) {\n      throw new TypeError(\"Access Token must be a string \" +\n                          \"which contains more than one character.\");\n    }\n    if (typeof spec.user_id !== 'string' || !spec.user_id) {\n      throw new TypeError(\"User ID must be a string \" +\n                          \"which contains more than one character.\");\n    }\n    this._access_token = spec.access_token;\n    this._user_id = spec.user_id;\n    this._default_field_list = spec.default_field_list || [];\n    this._default_limit = spec.default_limit || 500;\n  }\n\n  FBStorage.prototype.get = function (id) {\n    var that = this;\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          type: \"GET\",\n          url: get_post_template.expand({post_id: id,\n            fields: that._default_field_list, access_token: that._access_token})\n        });\n      })\n      .push(function (result) {\n        return JSON.parse(result.target.responseText);\n      });\n  };\n\n  function paginateResult(url, result, select_list) {\n    return new RSVP.Queue()\n      .push(function () {\n        return jIO.util.ajax({\n          type: \"GET\",\n          url: url\n        });\n      })\n      .push(function (response) {\n        return JSON.parse(response.target.responseText);\n      },\n        function (err) {\n          throw new jIO.util.jIOError(\"Getting feed failed \" + err.toString(),\n            err.target.status);\n        })\n      .push(function (response) {\n        if (response.data.length === 0) {\n          return result;\n        }\n        var i, j, obj = {};\n        for (i = 0; i < response.data.length; i += 1) {\n          obj.id = response.data[i].id;\n          obj.value = {};\n          for (j = 0; j < select_list.length; j += 1) {\n            obj.value[select_list[j]] = response.data[i][select_list[j]];\n          }\n          result.push(obj);\n          obj = {};\n        }\n        return paginateResult(response.paging.next, result, select_list);\n      });\n  }\n\n  FBStorage.prototype.buildQuery = function (query) {\n    var that = this, fields = [], limit = this._default_limit,\n      template_argument = {\n        user_id: this._user_id,\n        limit: limit,\n        access_token: this._access_token\n      };\n    if (query.include_docs) {\n      fields = fields.concat(that._default_field_list);\n    }\n    if (query.select_list) {\n      fields = fields.concat(query.select_list);\n    }\n    if (query.limit) {\n      limit = query.limit[1];\n    }\n    template_argument.fields = fields;\n    template_argument.limit = limit;\n    return paginateResult(get_feed_template.expand(template_argument), [],\n      fields)\n      .push(function (result) {\n        if (!query.limit) {\n          return result;\n        }\n        return result.slice(query.limit[0], query.limit[1]);\n      });\n  };\n\n  FBStorage.prototype.hasCapacity = function (name) {\n    var this_storage_capacity_list = [\"list\", \"select\", \"include\", \"limit\"];\n    if (this_storage_capacity_list.indexOf(name) !== -1) {\n      return true;\n    }\n  };\n\n  jIO.addStorage('facebook', FBStorage);\n\n}(jIO, RSVP, UriTemplate));\n  module = node_module;\n\n  jIO.node_env = window;\n  module.exports = jIO;\n\n} ({}));"]}